Contract
Contract state reads (single key and paged prefix scans), read-only contract calls, and the AMA richlist.
State keys are raw byte strings such as account:<48-byte pk>:balance:AMA. Smart contracts are RISC-V (RV64IM) programs and run on testnet only; the built-in contracts (Coin, Epoch, LockupVault, ...) exist on both networks.
Get contract state by key
Read one contract state value. The request body is the raw key bytes, for example `account:` + the 48 raw public key bytes + `:balance:AMA`. The response is the stored value as a JSON string (`'218110150390801'`), or `null` when the key does not exist. Binary values are not encoded, so read those with `get_prefix` or the proof endpoints.
Get contract state by prefix
Paged prefix scan of contract state. The body is the raw prefix bytes (at least 8 bytes).
Execute contract view function (GET)
Call a function of a deployed contract read-only, with no arguments, against the current tip. The contract segment is Base58-decoded, so it must be a contract address; built-in names such as `Coin` do not work here. Everything after the first `/` following the contract becomes the function name, so arguments cannot be added to the path.
Execute contract view function (vecpak)
Call a contract function read-only against the current tip; nothing is written. The body is a VecPak-encoded map. The SDK builds it in `sdk.contract.view()`.
Get richlist
The top 1,000 AMA holders by balance, descending. Recomputed at most once an hour. `float` is truncated to whole AMA.