JSON-RPC Reference
MoltChain exposes a JSON-RPC 2.0 API for querying blockchain state and submitting transactions. Every validator node runs the RPC server, typically on port 8899. Requests are rate-limited per IP (configurable, default 100 req/s). A companion WebSocket API provides real-time event subscriptions on port 8900.
Endpoint & Format
Default endpoint: http://localhost:8899
All requests are HTTP POST with Content-Type: application/json.
{
"jsonrpc": "2.0",
"id": 1,
"method": "METHOD_NAME",
"params": [...]
}
Successful responses contain a result field. Errors contain an error object with code and message.
Units: All MOLT amounts are returned in shells (1 MOLT = 1,000,000,000 shells) unless a separate molt field is provided.
Chain Methods
getSlot
Returns the current slot number of the chain tip.
Parameters
None
Returns
u64 — Current slot number.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlot","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":42}
getLatestBlock
Returns the most recently produced block.
Parameters
None
Returns
Object — { slot, hash, parentHash, transactions, timestamp, validator, stateRoot }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getLatestBlock","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{
"slot":42,"hash":"a1b2c3...","parentHash":"d4e5f6...",
"transactions":5,"timestamp":1738800000,"validator":"7xK...","stateRoot":"abc..."
}}
getRecentBlockhash
Returns a recent blockhash required for signing transactions. The blockhash is valid for a limited number of slots.
Parameters
None
Returns
string — Hex-encoded recent blockhash, or object { blockhash }.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getRecentBlockhash","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":"a1b2c3d4e5f6..."}
health
Returns node health status. Use this as a liveness probe.
Parameters
None
Returns
Object — { "status": "ok" }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"health","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{"status":"ok"}}
getMetrics
Returns current chain performance metrics including TPS, total transactions, total blocks, and average block time.
Parameters
None
Returns
Object — { tps, totalTransactions, totalBlocks, averageBlockTime }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getMetrics","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{
"tps":120,"totalTransactions":500000,"totalBlocks":42000,"averageBlockTime":400
}}
getChainStatus
Returns comprehensive chain status including current slot, validator count, total stake, TPS, transaction & block counts, average block time, and health flag.
Parameters
None
Returns
Object — { currentSlot, validatorCount, totalStake, tps, totalTransactions, totalBlocks, averageBlockTime, isHealthy }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getChainStatus","params":[]}'
Account Methods
getBalance
Returns the MOLT balance for the given public key, in both shells (raw) and MOLT.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
Returns
Object — { shells: u64, molt: f64 }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{"shells":5000000000,"molt":5.0}}
getAccount
Returns raw account data including balance, owner, executable flag, and data field.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
Returns
Object — { shells, owner, executable, data }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getAccount","params":["7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"]}'
getAccountInfo
Returns enhanced account information including balance, transaction count, and additional metadata.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
Returns
Object — Enhanced account details with balance, owner, executable flag, transaction history summary.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"]}'
getAccountTxCount
Returns the number of transactions involving the given account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
Returns
u64 — Transaction count.
Block Methods
getBlock
Returns a block by its slot number, including header fields and transaction list.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| slot | u64 | Yes | Slot number of the block |
Returns
Object — { slot, hash, parentHash, transactions, timestamp, validator, stateRoot }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getBlock","params":[42]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{
"slot":42,"hash":"a1b2...","parentHash":"d4e5...",
"transactions":[...],"timestamp":1738800000
}}
Transaction Methods
getTransaction
Returns detailed transaction information by its signature hash.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| signature | string | Yes | Hex-encoded transaction signature |
Returns
Object — Transaction details including signatures, instructions, slot, timestamp, fee, and status.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getTransaction","params":["a1b2c3d4..."]}'
sendTransaction
Submits a signed, serialized transaction to the mempool. The transaction must be base64-encoded bincode.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| transaction | string | Yes | Base64-encoded serialized transaction |
Returns
string — Hex-encoded transaction signature.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"sendTransaction","params":["BASE64_ENCODED_TX"]}'
# Response
{"jsonrpc":"2.0","id":1,"result":"a1b2c3d4e5f6..."}
simulateTransaction
Dry-runs a transaction without committing it to the chain. Useful for estimating fees and checking validity.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| transaction | string | Yes | Base64-encoded serialized transaction |
Returns
Object — Simulation result with logs, runtime error messages, and returnCode for contract-level result inspection.
Debugging tip: A transaction can be structurally valid but contract-semantically rejected; inspect returnCode to detect these cases.
getTransactionsByAddress
Returns a list of transactions involving the given address.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
| limit | u64 | No | Max number of results (default 10) |
Returns
Array — List of transaction objects.
getTransactionHistory
Returns paginated transaction history for an account with detailed metadata.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Base58-encoded public key |
| limit | u64 | No | Max results (default 10) |
Returns
Object — Paginated transaction history.
Validator Methods
getValidators
Returns the list of all registered validators with their stake, reputation, blocks proposed, votes cast, and last active slot.
Parameters
None
Returns
Object — { validators: [ { pubkey, stake, reputation, blocksProposed, votesCast, correctVotes, lastActiveSlot } ] }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getValidators","params":[]}'
getValidatorInfo
Returns detailed information for a specific validator by its public key.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Validator's base58-encoded public key |
Returns
Object — Validator details including stake, reputation, and performance counters.
getValidatorPerformance
Returns performance metrics for a validator including block production rate, vote accuracy, and uptime.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Validator's base58-encoded public key |
Returns
Object — Performance metrics.
Staking Methods
getStakingStatus
Returns staking status for an account — active stake, delegated validator, rewards earned.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Staker's base58-encoded public key |
Returns
Object — Staking status details.
getStakingRewards
Returns accumulated staking rewards for the given account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | string | Yes | Staker's base58-encoded public key |
Returns
Object — Reward details.
stake
Submits a signed stake transaction (system instruction opcode 9).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| transaction_base64 | string | Yes | Base64-encoded signed transaction payload. Call shape: stake([transaction_base64]) |
Returns
string — Transaction signature.
unstake
Submits a signed unstake transaction (system instruction opcode 10).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| transaction_base64 | string | Yes | Base64-encoded signed transaction payload. Call shape: unstake([transaction_base64]) |
Returns
string — Transaction signature.
Network Methods
getNetworkInfo
Returns network-level information including chain ID, network ID, version, current slot, validator count, and peer count.
Parameters
None
Returns
Object — { chainId, networkId, version, currentSlot, validatorCount, peerCount }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getNetworkInfo","params":[]}'
getPeers
Returns a list of connected P2P peers.
Parameters
None
Returns
Object — { peers: [ address strings ] }
Contract Methods
getContractInfo
Returns information about a deployed smart contract including owner, code size, storage, and call count.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| contractId | string | Yes | Base58-encoded contract public key |
Returns
Object — Contract metadata.
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getContractInfo","params":["ContractPubkey..."]}'
getAllContracts
Returns a list of all deployed contracts on the chain.
Parameters
None
Returns
Array — List of contract info objects.
getContractLogs
Returns execution logs emitted by a contract.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| contractId | string | Yes | Base58-encoded contract public key |
Returns
Array — Log entries.
getContractAbi
Returns the ABI/IDL (machine-readable interface definition) for a contract, if one has been registered.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| contractId | string | Yes | Base58-encoded contract public key |
Returns
Object — ABI JSON, or null if not set.
Program Methods
getProgram
Returns detailed information about a deployed program.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| programId | string | Yes | Base58-encoded program public key |
Returns
Object — Program info including owner, code size, deploy slot.
getPrograms
Returns a list of all deployed programs.
Parameters
None (optional limit param).
Returns
Array — List of program summaries.
getProgramStats
Returns execution statistics for a program — call count, unique callers, storage used.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| programId | string | Yes | Base58-encoded program public key |
Returns
Object — Program stats.
getProgramCalls
Returns recent call history for a program.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| programId | string | Yes | Base58-encoded program public key |
Returns
Array — Call records.
getProgramStorage
Returns on-chain storage summary for a program.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| programId | string | Yes | Base58-encoded program public key |
Returns
Object — Storage summary.
Token Methods
getTokenBalance
Returns the balance of a specific token for an account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Base58-encoded owner public key |
| tokenMint | string | Yes | Base58-encoded token mint address |
Returns
Object — Token balance details.
getTokenHolders
Returns a list of holders for a given token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tokenMint | string | Yes | Base58-encoded token mint address |
Returns
Array — Token holder entries.
getTokenTransfers
Returns recent transfer events for a token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tokenMint | string | Yes | Base58-encoded token mint address |
Returns
Array — Transfer event records.
NFT & Marketplace Methods
getCollection
Returns metadata for an NFT collection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | Yes | Base58-encoded collection public key |
Returns
Object — Collection metadata (name, symbol, total supply, etc.).
getNFT
Returns a specific NFT by collection and token ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | Yes | Collection public key |
| tokenId | u64 | Yes | Token ID within the collection |
Returns
Object — NFT details (owner, metadata URI, attributes).
getNFTsByOwner
Returns all NFTs owned by a given address.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| owner | string | Yes | Base58-encoded owner public key |
Returns
Array — List of NFT objects.
getMarketListings
Returns active marketplace listings with price, seller, and collection info.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | No | Filter by collection (optional) |
Returns
Array — Active listings.
getMarketSales
Returns recent marketplace sales history.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | No | Filter by collection (optional) |
Returns
Array — Completed sale records.
getMarketOffers
Returns active marketplace offers (bids) optionally filtered by collection or token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | No | Filter by collection public key |
| tokenId | u64 | No | Filter by specific token ID |
Returns
Array — Active offer records.
getMarketAuctions
Returns active and recent marketplace auctions with current bid state.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | No | Filter by collection public key |
| status | string | No | Filter by auction status (`active`, `ended`, `cancelled`) |
Returns
Array — Auction records including reserve, leading bid, and end slot/time.
Burn Methods
getTotalBurned
Returns the total amount of MOLT that has been permanently burned (removed from circulation).
Parameters
None
Returns
Object — { shells: u64, molt: f64 }
curl -X POST http://localhost:8899 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getTotalBurned","params":[]}'
# Response
{"jsonrpc":"2.0","id":1,"result":{"shells":1500000000000,"molt":1500.0}}
Fee & Rent Methods
getFeeConfig
Returns the current fee configuration for the chain (base fee, priority fee multiplier).
Parameters
None
Returns
Object — Fee configuration.
getRentParams
Returns the current rent parameters (rent per byte per epoch, rent-exempt minimum).
Parameters
None
Returns
Object — Rent parameters.
Additional Implemented Methods
These JSON-RPC methods are implemented in the live server dispatch (`rpc/src/lib.rs`) and may not yet have individual method cards on this page.
Compatibility endpoints: POST /solana and POST /evm are also supported in addition to POST /.
Chain / Account / Tx
confirmTransactiongetRecentTransactionsgetTokenAccountsgetTreasuryInfogetGenesisAccounts
Fee / Network / Validator
setFeeConfigsetRentParamsgetClusterInfo
Staking (ReefStake)
stakeToReefStakeunstakeFromReefStakeclaimUnstakedTokensgetStakingPositiongetReefStakePoolInfogetUnstakingQueuegetRewardAdjustmentInfo
Contracts / Registry / Program
setContractAbideployContractupgradeContractgetContractEventsgetSymbolRegistrygetSymbolRegistryByProgramgetAllSymbolRegistry
MoltyID / Names / Identity
getMoltyIdIdentity,getMoltyIdReputation,getMoltyIdSkills,getMoltyIdVouches,getMoltyIdAchievements,getMoltyIdProfileresolveMoltName,reverseMoltName,batchReverseMoltNames,searchMoltNamesgetMoltyIdAgentDirectory,getMoltyIdStatsgetEvmRegistration,lookupEvmAddress
NFT / Market / Prediction / Platform Stats
getNFTsByCollectiongetNFTActivitygetPredictionMarketStats,getPredictionMarkets,getPredictionMarket,getPredictionPositions,getPredictionTraderStats,getPredictionLeaderboard,getPredictionTrending,getPredictionMarketAnalyticsgetDexCoreStats,getDexAmmStats,getDexMarginStats,getDexRewardsStats,getDexRouterStats,getDexAnalyticsStats,getDexGovernanceStatsgetMoltswapStats,getLobsterLendStats,getClawPayStats,getClawVaultStats,getBountyBoardStats,getComputeMarketStats,getReefStorageStats,getMoltMarketStats,getMoltAuctionStats,getMoltPunksStatsgetMusdStats,getWethStats,getWsolStats,getMoltBridgeStats,getMoltDaoStats,getMoltOracleStatsrequestAirdrop(testnet utility)
Bridge
createBridgeDeposit— initiate a cross-chain bridge depositgetBridgeDeposit— query a bridge deposit by IDgetBridgeDepositsByRecipient— list deposits for a recipient address
Shielded Pool (Privacy)
getShieldedPoolState— query shielded pool state (tree size, root, nullifier count)getShieldedPoolStats— aggregated pool statisticsgetShieldedMerkleRoot— current Merkle tree rootgetShieldedMerklePath— Merkle proof for a leaf indexisNullifierSpent— check if a nullifier has been spentcheckNullifier— alias forisNullifierSpentgetShieldedCommitments— list commitments in the treecomputeShieldCommitment— compute commitment hash for shield operationgenerateShieldProof— generate ZK proof for shield (deposit)generateUnshieldProof— generate ZK proof for unshield (withdraw)generateTransferProof— generate ZK proof for private transfer
Contract Execution
callContract— execute a read-only contract call (no state change)getNameAuction— query MoltyID .molt name auction by name
Solana-Compatible Endpoint (/solana)
getLatestBlockhash,getRecentBlockhash,getBalance,getAccountInfo,getBlock,getBlockHeight,getSignaturesForAddress,getSignatureStatuses,getSlot,getTransaction,sendTransaction,getHealth,getVersion
EVM-Compatible Endpoint (/evm)
eth_getBalance,eth_sendRawTransaction,eth_call,eth_chainId,eth_blockNumber,eth_getTransactionReceipt,eth_getTransactionByHash,eth_accounts,net_versioneth_gasPrice,eth_maxPriorityFeePerGas,eth_estimateGas,eth_getCode,eth_getTransactionCounteth_getBlockByNumber,eth_getBlockByHash,eth_getLogs,eth_getStorageAtnet_listening,web3_clientVersion
Looking for real-time events? Check out the WebSocket Reference for subscription-based streaming of blocks, transactions, and account changes.