All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
ActivateChain | Post /v1/chains/{chainID}/activate | Activate a chain |
AddAccessNode | Put /v1/chains/{chainID}/access-node/{peer} | Configure a trusted node to be an access node. |
CallView | Post /v1/chains/{chainID}/callview | Call a view function on a contract by Hname |
DeactivateChain | Post /v1/chains/{chainID}/deactivate | Deactivate a chain |
EstimateGasOffledger | Post /v1/chains/{chainID}/estimategas-offledger | Estimates gas for a given off-ledger ISC request |
EstimateGasOnledger | Post /v1/chains/{chainID}/estimategas-onledger | Estimates gas for a given on-ledger ISC request |
GetChainInfo | Get /v1/chains/{chainID} | Get information about a specific chain |
GetChains | Get /v1/chains | Get a list of all chains |
GetCommitteeInfo | Get /v1/chains/{chainID}/committee | Get information about the deployed committee |
GetContracts | Get /v1/chains/{chainID}/contracts | Get all available chain contracts |
GetReceipt | Get /v1/chains/{chainID}/receipts/{requestID} | Get a receipt from a request ID |
GetRequestIDFromEVMTransactionID | Get /v1/chains/{chainID}/evm/tx/{txHash} | Get the ISC request ID for the given Ethereum transaction hash |
GetStateValue | Get /v1/chains/{chainID}/state/{stateKey} | Fetch the raw value associated with the given key in the chain state |
RemoveAccessNode | Delete /v1/chains/{chainID}/access-node/{peer} | Remove an access node. |
SetChainRecord | Post /v1/chains/{chainID}/chainrecord | Sets the chain record. |
V1ChainsChainIDEvmPost | Post /v1/chains/{chainID}/evm | Ethereum JSON-RPC |
V1ChainsChainIDEvmWsGet | Get /v1/chains/{chainID}/evm/ws | Ethereum JSON-RPC (Websocket transport) |
WaitForRequest | Get /v1/chains/{chainID}/requests/{requestID}/wait | Wait until the given request has been processed by the node |
ActivateChain(ctx, chainID).Execute()
Activate a chain
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.ActivateChain(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.ActivateChain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiActivateChainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddAccessNode(ctx, chainID, peer).Execute()
Configure a trusted node to be an access node.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
peer := "peer_example" // string | Name or PubKey (hex) of the trusted peer
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.AddAccessNode(context.Background(), chainID, peer).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.AddAccessNode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
peer | string | Name or PubKey (hex) of the trusted peer |
Other parameters are passed through a pointer to a apiAddAccessNodeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JSONDict CallView(ctx, chainID).ContractCallViewRequest(contractCallViewRequest).Execute()
Call a view function on a contract by Hname
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
contractCallViewRequest := *openapiclient.NewContractCallViewRequest(*openapiclient.NewJSONDict(), "ContractHName_example", "ContractName_example", "FunctionHName_example", "FunctionName_example") // ContractCallViewRequest | Parameters
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.CallView(context.Background(), chainID).ContractCallViewRequest(contractCallViewRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.CallView``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CallView`: JSONDict
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.CallView`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiCallViewRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
contractCallViewRequest | ContractCallViewRequest | Parameters |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeactivateChain(ctx, chainID).Execute()
Deactivate a chain
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.DeactivateChain(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.DeactivateChain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiDeactivateChainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReceiptResponse EstimateGasOffledger(ctx, chainID).Request(request).Execute()
Estimates gas for a given off-ledger ISC request
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
request := *openapiclient.NewEstimateGasRequestOffledger("RequestBytes_example") // EstimateGasRequestOffledger | Request
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.EstimateGasOffledger(context.Background(), chainID).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.EstimateGasOffledger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EstimateGasOffledger`: ReceiptResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.EstimateGasOffledger`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiEstimateGasOffledgerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
request | EstimateGasRequestOffledger | Request |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReceiptResponse EstimateGasOnledger(ctx, chainID).Request(request).Execute()
Estimates gas for a given on-ledger ISC request
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
request := *openapiclient.NewEstimateGasRequestOnledger("OutputBytes_example") // EstimateGasRequestOnledger | Request
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.EstimateGasOnledger(context.Background(), chainID).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.EstimateGasOnledger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EstimateGasOnledger`: ReceiptResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.EstimateGasOnledger`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiEstimateGasOnledgerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
request | EstimateGasRequestOnledger | Request |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChainInfoResponse GetChainInfo(ctx, chainID).Execute()
Get information about a specific chain
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetChainInfo(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetChainInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetChainInfo`: ChainInfoResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetChainInfo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiGetChainInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ChainInfoResponse GetChains(ctx).Execute()
Get a list of all chains
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetChains(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetChains``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetChains`: []ChainInfoResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetChains`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetChainsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommitteeInfoResponse GetCommitteeInfo(ctx, chainID).Execute()
Get information about the deployed committee
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetCommitteeInfo(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetCommitteeInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCommitteeInfo`: CommitteeInfoResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetCommitteeInfo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiGetCommitteeInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ContractInfoResponse GetContracts(ctx, chainID).Execute()
Get all available chain contracts
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetContracts(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetContracts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContracts`: []ContractInfoResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetContracts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiGetContractsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReceiptResponse GetReceipt(ctx, chainID, requestID).Execute()
Get a receipt from a request ID
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
requestID := "requestID_example" // string | RequestID (Hex)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetReceipt(context.Background(), chainID, requestID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetReceipt``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReceipt`: ReceiptResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetReceipt`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
requestID | string | RequestID (Hex) |
Other parameters are passed through a pointer to a apiGetReceiptRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RequestIDResponse GetRequestIDFromEVMTransactionID(ctx, chainID, txHash).Execute()
Get the ISC request ID for the given Ethereum transaction hash
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
txHash := "txHash_example" // string | Transaction hash (Hex)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetRequestIDFromEVMTransactionID(context.Background(), chainID, txHash).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetRequestIDFromEVMTransactionID``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRequestIDFromEVMTransactionID`: RequestIDResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetRequestIDFromEVMTransactionID`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
txHash | string | Transaction hash (Hex) |
Other parameters are passed through a pointer to a apiGetRequestIDFromEVMTransactionIDRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StateResponse GetStateValue(ctx, chainID, stateKey).Execute()
Fetch the raw value associated with the given key in the chain state
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
stateKey := "stateKey_example" // string | State Key (Hex)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.GetStateValue(context.Background(), chainID, stateKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetStateValue``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStateValue`: StateResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetStateValue`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
stateKey | string | State Key (Hex) |
Other parameters are passed through a pointer to a apiGetStateValueRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveAccessNode(ctx, chainID, peer).Execute()
Remove an access node.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
peer := "peer_example" // string | Name or PubKey (hex) of the trusted peer
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.RemoveAccessNode(context.Background(), chainID, peer).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.RemoveAccessNode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
peer | string | Name or PubKey (hex) of the trusted peer |
Other parameters are passed through a pointer to a apiRemoveAccessNodeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetChainRecord(ctx, chainID).ChainRecord(chainRecord).Execute()
Sets the chain record.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
chainRecord := *openapiclient.NewChainRecord([]string{"AccessNodes_example"}, false) // ChainRecord | Chain Record
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.SetChainRecord(context.Background(), chainID).ChainRecord(chainRecord).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.SetChainRecord``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiSetChainRecordRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
chainRecord | ChainRecord | Chain Record |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1ChainsChainIDEvmPost(ctx, chainID).Execute()
Ethereum JSON-RPC
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.V1ChainsChainIDEvmPost(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.V1ChainsChainIDEvmPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiV1ChainsChainIDEvmPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1ChainsChainIDEvmWsGet(ctx, chainID).Execute()
Ethereum JSON-RPC (Websocket transport)
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.V1ChainsChainIDEvmWsGet(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.V1ChainsChainIDEvmWsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) |
Other parameters are passed through a pointer to a apiV1ChainsChainIDEvmWsGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReceiptResponse WaitForRequest(ctx, chainID, requestID).TimeoutSeconds(timeoutSeconds).WaitForL1Confirmation(waitForL1Confirmation).Execute()
Wait until the given request has been processed by the node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
chainID := "chainID_example" // string | ChainID (Bech32)
requestID := "requestID_example" // string | RequestID (Hex)
timeoutSeconds := int32(56) // int32 | The timeout in seconds, maximum 60s (optional)
waitForL1Confirmation := true // bool | Wait for the block to be confirmed on L1 (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ChainsApi.WaitForRequest(context.Background(), chainID, requestID).TimeoutSeconds(timeoutSeconds).WaitForL1Confirmation(waitForL1Confirmation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.WaitForRequest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `WaitForRequest`: ReceiptResponse
fmt.Fprintf(os.Stdout, "Response from `ChainsApi.WaitForRequest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chainID | string | ChainID (Bech32) | |
requestID | string | RequestID (Hex) |
Other parameters are passed through a pointer to a apiWaitForRequestRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
timeoutSeconds | int32 | The timeout in seconds, maximum 60s | waitForL1Confirmation | bool | Wait for the block to be confirmed on L1 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]