All URIs are relative to https://beta.usemoon.ai
Method | HTTP request | Description |
---|---|---|
CreateTronAccount | Post /tron | |
GetTronAccount | Get /tron/{accountName} | |
ListTronAccounts | Get /tron | |
SignTronTransaction | Post /tron/{accountName}/sign-tx |
AccountAPIResponse CreateTronAccount(ctx).Authorization(authorization).TronInput(tronInput).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/moon-up/moon-sdk-go"
)
func main() {
authorization := "authorization_example" // string |
tronInput := *openapiclient.NewTronInput() // TronInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TronAPI.CreateTronAccount(context.Background()).Authorization(authorization).TronInput(tronInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TronAPI.CreateTronAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateTronAccount`: AccountAPIResponse
fmt.Fprintf(os.Stdout, "Response from `TronAPI.CreateTronAccount`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateTronAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
tronInput | TronInput |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse GetTronAccount(ctx, accountName).Authorization(authorization).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/moon-up/moon-sdk-go"
)
func main() {
authorization := "authorization_example" // string |
accountName := "accountName_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TronAPI.GetTronAccount(context.Background(), accountName).Authorization(authorization).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TronAPI.GetTronAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTronAccount`: AccountAPIResponse
fmt.Fprintf(os.Stdout, "Response from `TronAPI.GetTronAccount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
accountName | string |
Other parameters are passed through a pointer to a apiGetTronAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorization | string |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse ListTronAccounts(ctx).Authorization(authorization).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/moon-up/moon-sdk-go"
)
func main() {
authorization := "authorization_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TronAPI.ListTronAccounts(context.Background()).Authorization(authorization).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TronAPI.ListTronAccounts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTronAccounts`: AccountAPIResponse
fmt.Fprintf(os.Stdout, "Response from `TronAPI.ListTronAccounts`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListTronAccountsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorization | string |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TronAPIResponse SignTronTransaction(ctx, accountName).Authorization(authorization).TronTransactionInput(tronTransactionInput).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/moon-up/moon-sdk-go"
)
func main() {
authorization := "authorization_example" // string |
accountName := "accountName_example" // string |
tronTransactionInput := *openapiclient.NewTronTransactionInput() // TronTransactionInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TronAPI.SignTronTransaction(context.Background(), accountName).Authorization(authorization).TronTransactionInput(tronTransactionInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TronAPI.SignTronTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SignTronTransaction`: TronAPIResponse
fmt.Fprintf(os.Stdout, "Response from `TronAPI.SignTronTransaction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
accountName | string |
Other parameters are passed through a pointer to a apiSignTronTransactionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorization | string |
tronTransactionInput | TronTransactionInput | |
TronAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]