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. |
DeactivateChain | Post /v1/chains/{chainID}/deactivate | Deactivate a chain |
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 |
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. |
V1ChainsChainIDEvmGet | Get /v1/chains/{chainID}/evm | Ethereum JSON-RPC |
V1ChainsChainIDEvmWsGet | Get /v1/chains/{chainID}/evm/ws | Ethereum JSON-RPC (Websocket transport) |
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]
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]
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 |
---|
- 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]
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]
V1ChainsChainIDEvmGet(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.V1ChainsChainIDEvmGet(context.Background(), chainID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.V1ChainsChainIDEvmGet``: %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 apiV1ChainsChainIDEvmGetRequest 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]