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. Ask your Gen Labs contact for the RPC URL and a bearer token, then substitute them for <DEVNET_RPC_URL> and <your-jwt> in the examples below.
Errors fall into three layers, checked in this order:
Transport errors: the request never reached the validator. HTTP status codes apply (502, 504). Retry with backoff.
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.
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.
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.
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.
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
Uniquely represents a single code artifact.A code artifact is identified by the push that uploaded it and the role index within that push. This is used to identify executable code in the GVM.
Index of a component within a GVM system.0 is reserved for the account component, while values greater than 0 represent explicit user component indices.
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.
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.
Uniquely represents a single code artifact.A code artifact is identified by the push that uploaded it and the role index within that push. This is used to identify executable code in the GVM.
Index of a component within a GVM system.0 is reserved for the account component, while values greater than 0 represent explicit user component indices.
Uniquely represents a single code artifact.A code artifact is identified by the push that uploaded it and the role index within that push. This is used to identify executable code in the GVM.
Index of a component within a GVM system.0 is reserved for the account component, while values greater than 0 represent explicit user component indices.