Skip to content

RPC & Runtime APIs

Look up the JSON-RPC method or SCALE runtime API you need, and invoke it against a verified RPC endpoint.

Method Parameters Returns
system_chain [] Chain name
system_properties [] Token precision and SS58 address format
chain_getBlockHash [0] Genesis block hash
chain_getFinalizedHead [] Latest finalized block hash
state_getRuntimeVersion [] or [at] Runtime, transaction, and runtime API versions
state_getMetadata [] or [at] SCALE-encoded runtime metadata
state_getStorage [key, at?] SCALE-encoded storage value for an encoded key
state_call [function, encodedInput, at?] SCALE-encoded runtime API result
system_accountNextIndex [address] Next account nonce, including the node’s pending transaction pool
payment_queryInfo [encodedExtrinsic, at?] Dispatch info and estimated transaction fee
  • Re-estimate fees whenever the call payload or chain state changes; each estimate applies only to that exact encoded extrinsic and block.
  • system_accountNextIndex reflects only the queried node’s transaction pool. Coordinate nonces explicitly when submitting multiple concurrent transactions.
  1. Confirm the runtime advertises the API via state_getRuntimeVersion and state_getMetadata.
  2. SCALE-encode the input using compatible descriptors—plain JSON account strings are not accepted.
  3. Call state_call with [function, encodedInput, at?].
  4. SCALE-decode the returned bytes.
state_call function SCALE input SCALE output
UserPortfolioApi_get_user_portfolio AccountId UserPortfolio<AccountId, Balance>
UserPortfolioApi_get_merchant_redemption_quote AccountId Option<MerchantRedemptionQuote<Balance>>
NodeRegistryApi_get_node_profile AccountId Option<NodeProfile<AccountId>>
NodeRegistryApi_get_all_candidate_profiles () Vec<NodeProfile<AccountId>>
Result Contents Notes
Portfolio Native free balance, asset balances, burn portfolio, voting interest, merchant records, referral info, LP shares Native free balance is not the same as transferable balance; see Balances & Assets.
Merchant redemption quote Base and relationship merit, redeemable merit, USDT value, optional estimated D9, cooldown_remaining_ms Cooldown is in milliseconds, not blocks. Distinguish None and a missing D9 estimate from a zero quote. On-chain execution rechecks eligibility and min_d9_out; see Merchant Payments & Merit.
Node profile Lifecycle stage, candidate and validator status, vote count, liveness –