Skip to main content
Grid exposes a JSON-RPC 2.0 endpoint over HTTPS. The CLI, the Rust SDK, and any third-party integration call the same surface.

How to call it

A JSON-RPC call is a POST of a JSON body to a single URL. The endpoint depends on the network you target. For DevNet:
DevNet access. DevNet requires a bearer token. Ask your Gen Labs contact for one and substitute it for <your-jwt> in the examples below.
Find the endpoint for your network in Network status.

Envelope

Every request follows JSON-RPC 2.0:
Successful responses:
Errors:
Method names are camelCase with a gen_ prefix (gen_getActivation, not gen_GetActivation).

Error model

Errors fall into three layers, checked in this order:
  1. Transport errors - the request never reached the validator. HTTP status codes apply (502, 504). Retry with backoff.
  2. JSON-RPC errors - the request was malformed. Standard codes: -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error. Do not retry without fixing the request.
  3. Application errors - the request was valid but the operation failed (insufficient balance, unknown account, etc.). Returned as a result payload with a status field, not as an error. Treat as a state to handle, not a retry signal.

Binary payloads

Methods that take or return raw bytes (gen_submitActivation, gen_view, gen_simulateActivation, gen_getStorageAt) represent those bytes as base64-encoded strings in JSON-RPC. The Rust SDK handles the encoding for you.

Versioning

Two version fields matter, both returned by gen_getVersion:
  • release_version - the validator’s release.
  • rpc_protocol_version - the wire-protocol version. Pin against this in production; minor revisions can add fields, breaking changes increment the version.
Clients may pass an X-Gen-Protocol-Version header (e.g. 0.1.0) on any request. When present, the server validates it and rejects mismatches with error code -32001. When absent, no validation occurs.

Methods

Sixteen public methods, grouped by domain. Click any method to expand its parameters, response shape, and an example request.

Activations

Sends a signed activation to the network.Parameters
Base64Bytes
required
Arbitrary binary data encoded as a base64 string.
Result
ActivationId
required
Activation ID assigned to the submitted activation
Example request
Simulates an activation without submitting it to the network. The activation is executed locally and all continuations are followed BFS-style. State queries are resolved against the specified block height (if provided).Parameters
U64String | null
Base64Bytes
required
Arbitrary binary data encoded as a base64 string.
Result
SimulationActivationResult[]
required
Per-activation results in BFS execution order.
Example request
Returns activation details by id. Returns JSON-RPC NOT_FOUND if the activation does not exist.Parameters
ActivationId
required
Result
ActivationInfo
required
Activation details returned by the API.
Example request
Returns trace details by id.Parameters
TransactionId
required
Result
ActivationId[]
required
Example request
Executes a read-only activation payload. No state changes occur.Parameters
Base64Bytes
required
Arbitrary binary data encoded as a base64 string.
Result
Base64Bytes
required
Opaque result bytes encoded as base64 on the wire.
Example request

Accounts and balances

Returns account details by address.Parameters
GvmAccount
required
Bech32m-encoded GvmAccount: HRP grd@ over 36 bytes (entity_id || 0u32_LE).
Result
GvmComponentId[]
required
Components installed on the account.
ComponentOwner
required
Owner of the account.
Example request
Returns the routed fungible balance for an account.Parameters
GvmAccount
required
Bech32m-encoded GvmAccount: HRP grd@ over 36 bytes (entity_id || 0u32_LE).
GvmContract | null
Result
Amount
required
Balance amount for the requested contract, or the configured GEN contract when omitted
Example request
Returns all configured fungible balances for an account.Parameters
GvmAccount
required
Bech32m-encoded GvmAccount: HRP grd@ over 36 bytes (entity_id || 0u32_LE).
Result
object
required
Example request

Blocks

Returns an aggregated closed block for a given block index.Parameters
U64String
required
A u64 value serialized as a decimal string to preserve precision.
Result
U64String
required
A u64 value serialized as a decimal string to preserve precision.
BlockOrderEvent[]
required
Example request
Returns the latest finalized block index known to this RPC unit.Parameters
GetCurrentBlockIndexRequest
required
Request for the GetCurrentBlockIndex RPC.
Result
U64String
required
A u64 value serialized as a decimal string to preserve precision.
Example request

Contracts and components

Returns contract metadata and ABI.Parameters
GvmContract
required
Result
Abi[]
required
ABIs for all components in the contract.
ContractDetails
required
Contract details (code ID, owner).
Example request
Returns component metadata and ABI.Parameters
GvmComponentId
required
Identifies a specific applicative GVM component instance (component entity + header). Contains the storage key plus applicative information for validations and orientation in the GVM.Serde/JSON uses the structured component_entity_id + header representation of this type.For human-readable CLI input/output, [fmt::Display] and [FromStr] use two or four comma-separated bech32m parts (HRP grd@), not a single bech32m string.

Equality and Hashing Semantics

GvmComponentId uses custom equality, hashing, and ordering: if either component has ContractVersion::LATEST, the version comparison is skipped. This allows latest-version matching to act as a wildcard that matches any version, which is useful for checks where the exact version shouldn’t matter.Important: The version field is NOT included in hashing or equality comparisons when Latest is involved, ensuring consistent behavior with HashMap/HashSet lookups.
Result
Abi
required
ABI for the component.
GvmComponentId
required
Resolved component identifier (includes index when resolved via default route).
ComponentOwner
required
Owner of the component.
Example request
Returns contract ABIs by contract ID.Parameters
GvmContract
required
Result
Abi[]
required
ABIs for all components in the contract.
Example request
Returns contract ABIs by contract code ID.Parameters
GvmContractCodeId
required
Result
Abi[]
required
ABIs for all components in the contract code.
Example request
Returns the raw storage value for a component at a given key.Parameters
ComponentId
required
H256
required
256-bit hash value. Encoded as a 0x-prefixed, 64-character hex string.
Result
Base64Bytes | null
required
Base64Bytes or null if the key is missing
Example request

Node

Returns the artifact release version and developer-owned RPC protocol version.Parameters
GetVersionRequest
required
Request for the GetVersion RPC.
Result
string
required
string
required
Example request