All URIs are relative to https://your_deployment.multibaas.com/api/v0
Method | HTTP request | Description |
---|---|---|
CancelTransaction | Post /chains/{chain}/txm/{wallet_address}/nonce/{nonce}/cancel | Cancel transaction |
CountWalletTransactions | Get /chains/{chain}/txm/{wallet_address}/count | Count all transactions for a wallet |
ListWalletTransactions | Get /chains/{chain}/txm/{wallet_address} | List transactions for a wallet |
SpeedUpTransaction | Post /chains/{chain}/txm/{wallet_address}/nonce/{nonce}/speed_up | Speed up transaction |
TransferEth200Response CancelTransaction(ctx, chain, walletAddress, nonce).GasParams(gasParams).Execute()
Cancel transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
walletAddress := "walletAddress_example" // string | An Ethereum address.
nonce := int64(789) // int64 | Transaction nonce.
gasParams := *openapiclient.NewGasParams() // GasParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TxmAPI.CancelTransaction(context.Background(), chain, walletAddress, nonce).GasParams(gasParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TxmAPI.CancelTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CancelTransaction`: TransferEth200Response
fmt.Fprintf(os.Stdout, "Response from `TxmAPI.CancelTransaction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
walletAddress | string | An Ethereum address. | |
nonce | int64 | Transaction nonce. |
Other parameters are passed through a pointer to a apiCancelTransactionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
gasParams | GasParams | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CountWalletTransactions200Response CountWalletTransactions(ctx, chain, walletAddress).Execute()
Count all transactions for a wallet
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
walletAddress := "walletAddress_example" // string | An Ethereum address.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TxmAPI.CountWalletTransactions(context.Background(), chain, walletAddress).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TxmAPI.CountWalletTransactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CountWalletTransactions`: CountWalletTransactions200Response
fmt.Fprintf(os.Stdout, "Response from `TxmAPI.CountWalletTransactions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
walletAddress | string | An Ethereum address. |
Other parameters are passed through a pointer to a apiCountWalletTransactionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
CountWalletTransactions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListWalletTransactions200Response ListWalletTransactions(ctx, chain, walletAddress).Hash(hash).Nonce(nonce).Status(status).Limit(limit).Offset(offset).Execute()
List transactions for a wallet
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
walletAddress := "walletAddress_example" // string | An Ethereum address.
hash := "hash_example" // string | Filter transactions by transaction hash. To filter for multiple hashes, use ampersands: `?hash=HASH1&hash=HASH2&hash=HASH3` (optional)
nonce := int64(789) // int64 | Filter transactions by nonce (optional)
status := openapiclient.TransactionStatus("pending") // TransactionStatus | Filter transactions by status (optional)
limit := int64(789) // int64 | (optional)
offset := int64(789) // int64 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TxmAPI.ListWalletTransactions(context.Background(), chain, walletAddress).Hash(hash).Nonce(nonce).Status(status).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TxmAPI.ListWalletTransactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListWalletTransactions`: ListWalletTransactions200Response
fmt.Fprintf(os.Stdout, "Response from `TxmAPI.ListWalletTransactions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
walletAddress | string | An Ethereum address. |
Other parameters are passed through a pointer to a apiListWalletTransactionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
hash | string | Filter transactions by transaction hash. To filter for multiple hashes, use ampersands: `?hash=HASH1&hash=HASH2&hash=HASH3` | nonce | int64 | Filter transactions by nonce | status | TransactionStatus | Filter transactions by status | limit | int64 | | offset | int64 | |
ListWalletTransactions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransferEth200Response SpeedUpTransaction(ctx, chain, walletAddress, nonce).GasParams(gasParams).Execute()
Speed up transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
walletAddress := "walletAddress_example" // string | An Ethereum address.
nonce := int64(789) // int64 | Transaction nonce.
gasParams := *openapiclient.NewGasParams() // GasParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TxmAPI.SpeedUpTransaction(context.Background(), chain, walletAddress, nonce).GasParams(gasParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TxmAPI.SpeedUpTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SpeedUpTransaction`: TransferEth200Response
fmt.Fprintf(os.Stdout, "Response from `TxmAPI.SpeedUpTransaction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
walletAddress | string | An Ethereum address. | |
nonce | int64 | Transaction nonce. |
Other parameters are passed through a pointer to a apiSpeedUpTransactionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
gasParams | GasParams | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]