\AccountsAPI

All URIs are relative to https://beta.usemoon.ai

Method
HTTP request
Description

BroadcastTx

Post /accounts/{accountName}/broadcast-tx

CreateAccount

Post /accounts

DeleteAccount

Delete /accounts/{accountName}

DeployContract

Post /accounts/{accountName}/deploy

GetAccount

Get /accounts/{accountName}

GetBalance

Get /accounts/{accountName}/balance

GetNonce

Get /accounts/{accountName}/nonce

ListAccounts

Get /accounts

SignMessage

Post /accounts/{accountName}/sign-message

SignTransaction

Post /accounts/{accountName}/sign-transaction

SignTypedData

Post /accounts/{accountName}/sign-typed-data

TransferEth

Post /accounts/{accountName}/transfer-eth

BroadcastTx

BroadCastRawTransactionAPIResponse BroadcastTx(ctx, accountName).Authorization(authorization).BroadcastInput(broadcastInput).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/moon-up/moon-sdk-go"
)

func main() {
	authorization := "authorization_example" // string | 
	accountName := "accountName_example" // string | 
	broadcastInput := *openapiclient.NewBroadcastInput("ChainId_example", "RawTransaction_example") // BroadcastInput | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AccountsAPI.BroadcastTx(context.Background(), accountName).Authorization(authorization).BroadcastInput(broadcastInput).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.BroadcastTx``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BroadcastTx`: BroadCastRawTransactionAPIResponse
	fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.BroadcastTx`: %v\n", resp)
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiBroadcastTxRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

broadcastInput | BroadcastInput | |

Return type

BroadCastRawTransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateAccount

AccountAPIResponse CreateAccount(ctx).Authorization(authorization).CreateAccountInput(createAccountInput).Execute()

Example

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateAccountRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

createAccountInput

CreateAccountInput

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteAccount

AccountAPIResponse DeleteAccount(ctx, accountName).Authorization(authorization).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteAccountRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeployContract

TransactionAPIResponse DeployContract(ctx, accountName).Authorization(authorization).DeployInput(deployInput).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiDeployContractRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

deployInput | DeployInput | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAccount

AccountAPIResponse GetAccount(ctx, accountName).Authorization(authorization).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiGetAccountRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBalance

BalanceAPIResponse GetBalance(ctx, accountName).Authorization(authorization).ChainId(chainId).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiGetBalanceRequest struct via the builder pattern

authorization | string | | chainId | string | |

Return type

BalanceAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNonce

NonceAPIResponse GetNonce(ctx, accountName).Authorization(authorization).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiGetNonceRequest struct via the builder pattern

authorization | string | |

Return type

NonceAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListAccounts

AccountAPIResponse ListAccounts(ctx).Authorization(authorization).Execute()

Example

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListAccountsRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SignMessage

SignMessageAPIResponse SignMessage(ctx, accountName).Authorization(authorization).SignMessage(signMessage).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiSignMessageRequest struct via the builder pattern

authorization | string | | signMessage | SignMessage | |

Return type

SignMessageAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SignTransaction

TransactionAPIResponse SignTransaction(ctx, accountName).Authorization(authorization).InputBody(inputBody).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiSignTransactionRequest struct via the builder pattern

authorization | string | | inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SignTypedData

SignMessageAPIResponse SignTypedData(ctx, accountName).Authorization(authorization).SignTypedData(signTypedData).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiSignTypedDataRequest struct via the builder pattern

authorization | string | | signTypedData | SignTypedData | |

Return type

SignMessageAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TransferEth

TransactionAPIResponse TransferEth(ctx, accountName).Authorization(authorization).InputBody(inputBody).Execute()

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

accountName

string

Other Parameters

Other parameters are passed through a pointer to a apiTransferEthRequest struct via the builder pattern

authorization | string | | inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]