All URIs are relative to http://127.0.0.1:12973
Method | HTTP request | Description |
---|---|---|
GetTransactionsStatus | Get /transactions/status | Get tx status |
GetTransactionsUnconfirmed | Get /transactions/unconfirmed | List unconfirmed transactions |
PostTransactionsBuild | Post /transactions/build | Build an unsigned transaction to a number of recipients |
PostTransactionsDecodeUnsignedTx | Post /transactions/decode-unsigned-tx | Decode an unsigned transaction |
PostTransactionsSubmit | Post /transactions/submit | Submit a signed transaction |
PostTransactionsSweepAddressBuild | Post /transactions/sweep-address/build | Build unsigned transactions to send all unlocked balanced of one address to another address |
TxStatus GetTransactionsStatus(ctx).TxId(txId).FromGroup(fromGroup).ToGroup(toGroup).Execute()
Get tx status
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
txId := "txId_example" // string |
fromGroup := int32(56) // int32 | (optional)
toGroup := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.GetTransactionsStatus(context.Background()).TxId(txId).FromGroup(fromGroup).ToGroup(toGroup).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.GetTransactionsStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransactionsStatus`: TxStatus
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.GetTransactionsStatus`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetTransactionsStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
txId | string | ||
fromGroup | int32 | ||
toGroup | int32 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]UnconfirmedTransactions GetTransactionsUnconfirmed(ctx).Execute()
List unconfirmed transactions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.GetTransactionsUnconfirmed(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.GetTransactionsUnconfirmed``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransactionsUnconfirmed`: []UnconfirmedTransactions
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.GetTransactionsUnconfirmed`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetTransactionsUnconfirmedRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BuildTransactionResult PostTransactionsBuild(ctx).BuildTransaction(buildTransaction).Execute()
Build an unsigned transaction to a number of recipients
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
buildTransaction := *openapiclient.NewBuildTransaction("FromPublicKey_example", []openapiclient.Destination{*openapiclient.NewDestination("Address_example", "AttoAlphAmount_example")}) // BuildTransaction | Format 1: `1000000000000000000` Format 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000`
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.PostTransactionsBuild(context.Background()).BuildTransaction(buildTransaction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.PostTransactionsBuild``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostTransactionsBuild`: BuildTransactionResult
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.PostTransactionsBuild`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostTransactionsBuildRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
buildTransaction | BuildTransaction | Format 1: `1000000000000000000` Format 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000` |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DecodeUnsignedTxResult PostTransactionsDecodeUnsignedTx(ctx).DecodeUnsignedTx(decodeUnsignedTx).Execute()
Decode an unsigned transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
decodeUnsignedTx := *openapiclient.NewDecodeUnsignedTx("UnsignedTx_example") // DecodeUnsignedTx |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.PostTransactionsDecodeUnsignedTx(context.Background()).DecodeUnsignedTx(decodeUnsignedTx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.PostTransactionsDecodeUnsignedTx``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostTransactionsDecodeUnsignedTx`: DecodeUnsignedTxResult
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.PostTransactionsDecodeUnsignedTx`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostTransactionsDecodeUnsignedTxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
decodeUnsignedTx | DecodeUnsignedTx |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubmitTxResult PostTransactionsSubmit(ctx).SubmitTransaction(submitTransaction).Execute()
Submit a signed transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
submitTransaction := *openapiclient.NewSubmitTransaction("UnsignedTx_example", "Signature_example") // SubmitTransaction |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.PostTransactionsSubmit(context.Background()).SubmitTransaction(submitTransaction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.PostTransactionsSubmit``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostTransactionsSubmit`: SubmitTxResult
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.PostTransactionsSubmit`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostTransactionsSubmitRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
submitTransaction | SubmitTransaction |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BuildSweepAddressTransactionsResult PostTransactionsSweepAddressBuild(ctx).BuildSweepAddressTransactions(buildSweepAddressTransactions).Execute()
Build unsigned transactions to send all unlocked balanced of one address to another address
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
buildSweepAddressTransactions := *openapiclient.NewBuildSweepAddressTransactions("FromPublicKey_example", "ToAddress_example") // BuildSweepAddressTransactions |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsApi.PostTransactionsSweepAddressBuild(context.Background()).BuildSweepAddressTransactions(buildSweepAddressTransactions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.PostTransactionsSweepAddressBuild``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostTransactionsSweepAddressBuild`: BuildSweepAddressTransactionsResult
fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.PostTransactionsSweepAddressBuild`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostTransactionsSweepAddressBuildRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
buildSweepAddressTransactions | BuildSweepAddressTransactions |
BuildSweepAddressTransactionsResult
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]