JSON-RPC
Author
hasKey
hasKey
Returns true if the keystore has private keys for the given public key and key type.
Interface
api.rpc.author.hasKey(publicKey: Bytes, keyType: Text): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_hasKey", "params":[publicKey: Bytes, keyType: Text] }
hasSessionKeys
hasSessionKeys
Returns true if the keystore has private keys for the given session public keys.
Interface
api.rpc.author.hasSessionKeys(sessionKeys: Bytes): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_hasSessionKeys", "params":[sessionKeys: Bytes] }
insertKey
insertKey
Insert a key into the keystore.
Interface
api.rpc.author.insertKey(keyType: Text, suri: Text, publicKey: Bytes): Bytes
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_insertKey", "params":[keyType: Text, suri: Text, publicKey: Bytes] }
pendingExtrinsics
pendingExtrinsics
Returns all pending extrinsics, potentially grouped by sender
Interface
api.rpc.author.pendingExtrinsics(): Vec<Extrinsic>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_pendingExtrinsics", "params":[] }
removeExtrinsic
removeExtrinsic
Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
Interface
api.rpc.author.removeExtrinsic(bytesOrHash: Vec<ExtrinsicOrHash>): Vec<Hash>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_removeExtrinsic", "params":[bytesOrHash: Vec<ExtrinsicOrHash>] }
rotateKeys
rotateKeys
Generate new session keys and returns the corresponding public keys
Interface
api.rpc.author.rotateKeys(): Bytes
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_rotateKeys", "params":[] }
submitAndWatchExtrinsic
submitAndWatchExtrinsic
Submit and subscribe to watch an extrinsic until unsubscribed
Interface
api.rpc.author.submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_submitAndWatchExtrinsic", "params":[extrinsic: Extrinsic] }
submitExtrinsic
submitExtrinsic
Submit a fully formatted extrinsic for block inclusion
Interface
api.rpc.author.submitExtrinsic(extrinsic: Extrinsic): Hash
JSON
{ "id":1, "jsonrpc":"2.0", "method":"author_submitExtrinsic", "params":[extrinsic: Extrinsic] }
Babe
epochAuthorship
epochAuthorship
Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore
Interface
api.rpc.babe.epochAuthorship(): HashMap<AuthorityId, EpochAuthorship>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"babe_epochAuthorship", "params":[] }
Chain
getBlock
getBlock
Get header and body of a relay chain block
Interface
api.rpc.chain.getBlock(hash?: BlockHash): SignedBlock
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_getBlock", "params":[hash?: BlockHash] }
getBlockHash
getBlockHash
Get the block hash for a specific block
Interface
api.rpc.chain.getBlockHash(blockNumber?: BlockNumber): BlockHash
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_getBlockHash", "params":[blockNumber?: BlockNumber] }
getFinalizedHead
getFinalizedHead
Get hash of the last finalized block in the canon chain
Interface
api.rpc.chain.getFinalizedHead(): BlockHash
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_getFinalizedHead", "params":[] }
getHeader
getHeader
Retrieves the header for a specific block
Interface
api.rpc.chain.getHeader(hash?: BlockHash): Header
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_getHeader", "params":[hash?: BlockHash] }
subscribeAllHeads
subscribeAllHeads
Retrieves the newest header via subscription
Interface
api.rpc.chain.subscribeAllHeads(): Header
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_subscribeAllHeads", "params":[] }
subscribeFinalizedHeads
subscribeFinalizedHeads
Retrieves the best finalized header via subscription
Interface
api.rpc.chain.subscribeFinalizedHeads(): Header
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_subscribeFinalizedHeads", "params":[] }
subscribeNewHeads
subscribeNewHeads
Retrieves the best header via subscription
Interface
api.rpc.chain.subscribeNewHeads(): Header
JSON
{ "id":1, "jsonrpc":"2.0", "method":"chain_subscribeNewHeads", "params":[] }
Childstate
getKeys
getKeys
Returns the keys with prefix from a child storage, leave empty to get all the keys
Interface
api.rpc.childstate.getKeys(childKey: PrefixedStorageKey, prefix: StorageKey, at?: Hash): Vec<StorageKey>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getKeys", "params":[childKey: PrefixedStorageKey, prefix: StorageKey, at?: Hash] }
getKeysPaged
getKeysPaged
Returns the keys with prefix from a child storage with pagination support
Interface
api.rpc.childstate.getKeysPaged(childKey: PrefixedStorageKey, prefix: StorageKey, count: u32, startKey?: StorageKey, at?: Hash): Vec<StorageKey>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getKeysPaged", "params":[childKey: PrefixedStorageKey, prefix: StorageKey, count: u32, startKey?: StorageKey, at?: Hash] }
getStorage
getStorage
Returns a child storage entry at a specific block state
Interface
api.rpc.childstate.getStorage(childKey: PrefixedStorageKey, key: StorageKey, at?: Hash): Option<StorageData>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getStorage", "params":[childKey: PrefixedStorageKey, key: StorageKey, at?: Hash] }
getStorageEntries
getStorageEntries
Returns child storage entries for multiple keys at a specific block state
Interface
api.rpc.childstate.getStorageEntries(childKey: PrefixedStorageKey, keys: Vec<StorageKey>, at?: Hash): Vec<Option<StorageData>>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getStorageEntries", "params":[childKey: PrefixedStorageKey, keys: Vec<StorageKey>, at?: Hash] }
getStorageHash
getStorageHash
Returns the hash of a child storage entry at a block state
Interface
api.rpc.childstate.getStorageHash(childKey: PrefixedStorageKey, key: StorageKey, at?: Hash): Option<Hash>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getStorageHash", "params":[childKey: PrefixedStorageKey, key: StorageKey, at?: Hash] }
getStorageSize
getStorageSize
Returns the size of a child storage entry at a block state
Interface
api.rpc.childstate.getStorageSize(childKey: PrefixedStorageKey, key: StorageKey, at?: Hash): Option<u64>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"childstate_getStorageSize", "params":[childKey: PrefixedStorageKey, key: StorageKey, at?: Hash] }
Dex
getAmountsIn
getAmountsIn
Given an array of AssetIds, return amounts in for an amount out
Interface
api.rpc.dex.getAmountsIn(amountOut: u128, path: Vec<AssetId>): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_getAmountsIn", "params":[amountOut: u128, path: Vec<AssetId>] }
getAmountsOut
getAmountsOut
Given an array of AssetIds, return amounts out for an amount in
Interface
api.rpc.dex.getAmountsOut(amountIn: u128, path: Vec<AssetId>): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_getAmountsOut", "params":[amountIn: u128, path: Vec<AssetId>] }
getLPTokenID
getLPTokenID
Given two AssetIds, return liquidity token created for the pair
Interface
api.rpc.dex.getLPTokenID(assetA: AssetId, assetB: AssetId): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_getLPTokenID", "params":[assetA: AssetId, assetB: AssetId] }
getLiquidity
getLiquidity
Given two AssetIds, return liquidity
Interface
api.rpc.dex.getLiquidity(assetA: AssetId, assetB: AssetId): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_getLiquidity", "params":[assetA: AssetId, assetB: AssetId] }
getTradingPairStatus
getTradingPairStatus
Given two AssetIds, return whether trading pair is enabled or disabled
Interface
api.rpc.dex.getTradingPairStatus(assetA: AssetId, assetB: AssetId): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_getTradingPairStatus", "params":[assetA: AssetId, assetB: AssetId] }
quote
quote
Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
Interface
api.rpc.dex.quote(amountA: u128, reserveA: u128, reserveB: u128): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"dex_quote", "params":[amountA: u128, reserveA: u128, reserveB: u128] }
Eth
accounts
accounts
Returns accounts list.
Interface
api.rpc.eth.accounts(): Vec<H160>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_accounts", "params":[] }
blockNumber
blockNumber
Returns the blockNumber
Interface
api.rpc.eth.blockNumber(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_blockNumber", "params":[] }
call
call
Call contract, returning the output data.
Interface
api.rpc.eth.call(request: EthCallRequest, number?: BlockNumber): Bytes
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_call", "params":[request: EthCallRequest, number?: BlockNumber] }
chainId
chainId
Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
Interface
api.rpc.eth.chainId(): U64
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_chainId", "params":[] }
coinbase
coinbase
Returns block author.
Interface
api.rpc.eth.coinbase(): H160
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_coinbase", "params":[] }
estimateGas
estimateGas
Estimate gas needed for execution of given contract.
Interface
api.rpc.eth.estimateGas(request: EthCallRequest, number?: BlockNumber): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_estimateGas", "params":[request: EthCallRequest, number?: BlockNumber] }
feeHistory
feeHistory
Returns fee history for given block count & reward percentiles
Interface
api.rpc.eth.feeHistory(blockCount: U256, newestBlock: BlockNumber, rewardPercentiles: Option<Vec<f64>>): EthFeeHistory
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_feeHistory", "params":[blockCount: U256, newestBlock: BlockNumber, rewardPercentiles: Option<Vec<f64>>] }
gasPrice
gasPrice
Returns current gas price.
Interface
api.rpc.eth.gasPrice(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_gasPrice", "params":[] }
getBalance
getBalance
Returns balance of the given account.
Interface
api.rpc.eth.getBalance(address: H160, number?: BlockNumber): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getBalance", "params":[address: H160, number?: BlockNumber] }
getBlockByHash
getBlockByHash
Returns block with given hash.
Interface
api.rpc.eth.getBlockByHash(hash: H256, full: bool): Option<EthRichBlock>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getBlockByHash", "params":[hash: H256, full: bool] }
getBlockByNumber
getBlockByNumber
Returns block with given number.
Interface
api.rpc.eth.getBlockByNumber(block: BlockNumber, full: bool): Option<EthRichBlock>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getBlockByNumber", "params":[block: BlockNumber, full: bool] }
getBlockTransactionCountByHash
getBlockTransactionCountByHash
Returns the number of transactions in a block with given hash.
Interface
api.rpc.eth.getBlockTransactionCountByHash(hash: H256): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getBlockTransactionCountByHash", "params":[hash: H256] }
getBlockTransactionCountByNumber
getBlockTransactionCountByNumber
Returns the number of transactions in a block with given block number.
Interface
api.rpc.eth.getBlockTransactionCountByNumber(block: BlockNumber): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getBlockTransactionCountByNumber", "params":[block: BlockNumber] }
getCode
getCode
Returns the code at given address at given time (block number).
Interface
api.rpc.eth.getCode(address: H160, number?: BlockNumber): Bytes
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getCode", "params":[address: H160, number?: BlockNumber] }
getFilterChanges
getFilterChanges
Returns filter changes since last poll.
Interface
api.rpc.eth.getFilterChanges(index: U256): EthFilterChanges
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getFilterChanges", "params":[index: U256] }
getFilterLogs
getFilterLogs
Returns all logs matching given filter (in a range 'from' - 'to').
Interface
api.rpc.eth.getFilterLogs(index: U256): Vec<EthLog>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getFilterLogs", "params":[index: U256] }
getLogs
getLogs
Returns logs matching given filter object.
Interface
api.rpc.eth.getLogs(filter: EthFilter): Vec<EthLog>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getLogs", "params":[filter: EthFilter] }
getStorageAt
getStorageAt
Returns content of the storage at given address.
Interface
api.rpc.eth.getStorageAt(address: H160, index: U256, number?: BlockNumber): H256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getStorageAt", "params":[address: H160, index: U256, number?: BlockNumber] }
getTransactionByBlockHashAndIndex
getTransactionByBlockHashAndIndex
Returns transaction at given block hash and index.
Interface
api.rpc.eth.getTransactionByBlockHashAndIndex(hash: H256, index: U256): EthTransaction
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getTransactionByBlockHashAndIndex", "params":[hash: H256, index: U256] }
getTransactionByBlockNumberAndIndex
getTransactionByBlockNumberAndIndex
Returns transaction by given block number and index.
Interface
api.rpc.eth.getTransactionByBlockNumberAndIndex(number: BlockNumber, index: U256): EthTransaction
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getTransactionByBlockNumberAndIndex", "params":[number: BlockNumber, index: U256] }
getTransactionByHash
getTransactionByHash
Get transaction by its hash.
Interface
api.rpc.eth.getTransactionByHash(hash: H256): EthTransaction
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getTransactionByHash", "params":[hash: H256] }
getTransactionCount
getTransactionCount
Returns the number of transactions sent from given address at given time (block number).
Interface
api.rpc.eth.getTransactionCount(address: H160, number?: BlockNumber): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getTransactionCount", "params":[address: H160, number?: BlockNumber] }
getTransactionReceipt
getTransactionReceipt
Returns transaction receipt by transaction hash.
Interface
api.rpc.eth.getTransactionReceipt(hash: H256): EthReceipt
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getTransactionReceipt", "params":[hash: H256] }
getUncleByBlockHashAndIndex
getUncleByBlockHashAndIndex
Returns an uncles at given block and index.
Interface
api.rpc.eth.getUncleByBlockHashAndIndex(hash: H256, index: U256): EthRichBlock
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getUncleByBlockHashAndIndex", "params":[hash: H256, index: U256] }
getUncleByBlockNumberAndIndex
getUncleByBlockNumberAndIndex
Returns an uncles at given block and index.
Interface
api.rpc.eth.getUncleByBlockNumberAndIndex(number: BlockNumber, index: U256): EthRichBlock
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getUncleByBlockNumberAndIndex", "params":[number: BlockNumber, index: U256] }
getUncleCountByBlockHash
getUncleCountByBlockHash
Returns the number of uncles in a block with given hash.
Interface
api.rpc.eth.getUncleCountByBlockHash(hash: H256): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getUncleCountByBlockHash", "params":[hash: H256] }
getUncleCountByBlockNumber
getUncleCountByBlockNumber
Returns the number of uncles in a block with given block number.
Interface
api.rpc.eth.getUncleCountByBlockNumber(number: BlockNumber): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getUncleCountByBlockNumber", "params":[number: BlockNumber] }
getWork
getWork
Returns the hash of the current block, the seedHash, and the boundary condition to be met.
Interface
api.rpc.eth.getWork(): EthWork
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_getWork", "params":[] }
hashrate
hashrate
Returns the number of hashes per second that the node is mining with.
Interface
api.rpc.eth.hashrate(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_hashrate", "params":[] }
maxPriorityFeePerGas
maxPriorityFeePerGas
Returns max priority fee per gas
Interface
api.rpc.eth.maxPriorityFeePerGas(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_maxPriorityFeePerGas", "params":[] }
mining
mining
Returns true if client is actively mining new blocks.
Interface
api.rpc.eth.mining(): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_mining", "params":[] }
newBlockFilter
newBlockFilter
Returns id of new block filter.
Interface
api.rpc.eth.newBlockFilter(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_newBlockFilter", "params":[] }
newFilter
newFilter
Returns id of new filter.
Interface
api.rpc.eth.newFilter(filter: EthFilter): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_newFilter", "params":[filter: EthFilter] }
newPendingTransactionFilter
newPendingTransactionFilter
Returns id of new block filter.
Interface
api.rpc.eth.newPendingTransactionFilter(): U256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_newPendingTransactionFilter", "params":[] }
protocolVersion
protocolVersion
Returns protocol version encoded as a string (quotes are necessary).
Interface
api.rpc.eth.protocolVersion(): u64
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_protocolVersion", "params":[] }
sendRawTransaction
sendRawTransaction
Sends signed transaction, returning its hash.
Interface
api.rpc.eth.sendRawTransaction(bytes: Bytes): H256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_sendRawTransaction", "params":[bytes: Bytes] }
sendTransaction
sendTransaction
Sends transaction; will block waiting for signer to return the transaction hash
Interface
api.rpc.eth.sendTransaction(tx: EthTransactionRequest): H256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[tx: EthTransactionRequest] }
submitHashrate
submitHashrate
Used for submitting mining hashrate.
Interface
api.rpc.eth.submitHashrate(index: U256, hash: H256): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_submitHashrate", "params":[index: U256, hash: H256] }
submitWork
submitWork
Used for submitting a proof-of-work solution.
Interface
api.rpc.eth.submitWork(nonce: H64, headerHash: H256, mixDigest: H256): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_submitWork", "params":[nonce: H64, headerHash: H256, mixDigest: H256] }
subscribe
subscribe
Subscribe to Eth subscription.
Interface
api.rpc.eth.subscribe(kind: EthSubKind, params?: EthSubParams): Null
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_subscribe", "params":[kind: EthSubKind, params?: EthSubParams] }
syncing
syncing
Returns an object with data about the sync status or false.
Interface
api.rpc.eth.syncing(): EthSyncStatus
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_syncing", "params":[] }
uninstallFilter
uninstallFilter
Uninstalls filter.
Interface
api.rpc.eth.uninstallFilter(index: U256): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"eth_uninstallFilter", "params":[index: U256] }
Ethy
getEventProof
getEventProof
Get ETH event proof for event Id
Interface
api.rpc.ethy.getEventProof(eventId: EventProofId): Option<EthEventProofResponse>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"ethy_getEventProof", "params":[eventId: EventProofId] }
getXrplTxProof
getXrplTxProof
Get XRPL event proof for event Id
Interface
api.rpc.ethy.getXrplTxProof(eventId: EventProofId): Option<XrplEventProofResponse>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"ethy_getXrplTxProof", "params":[eventId: EventProofId] }
Grandpa
proveFinality
proveFinality
Prove finality for the given block number, returning the Justification for the last block in the set.
Interface
api.rpc.grandpa.proveFinality(blockNumber: BlockNumber): Option<EncodedFinalityProofs>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"grandpa_proveFinality", "params":[blockNumber: BlockNumber] }
roundState
roundState
Returns the state of the current best round state as well as the ongoing background rounds
Interface
api.rpc.grandpa.roundState(): ReportedRoundStates
JSON
{ "id":1, "jsonrpc":"2.0", "method":"grandpa_roundState", "params":[] }
subscribeJustifications
subscribeJustifications
Subscribes to grandpa justifications
Interface
api.rpc.grandpa.subscribeJustifications(): JustificationNotification
JSON
{ "id":1, "jsonrpc":"2.0", "method":"grandpa_subscribeJustifications", "params":[] }
Net
listening
listening
Returns true if client is actively listening for network connections. Otherwise false.
Interface
api.rpc.net.listening(): bool
JSON
{ "id":1, "jsonrpc":"2.0", "method":"net_listening", "params":[] }
peerCount
peerCount
Returns number of peers connected to node.
Interface
api.rpc.net.peerCount(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"net_peerCount", "params":[] }
version
version
Returns protocol version.
Interface
api.rpc.net.version(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"net_version", "params":[] }
Nft
ownedTokens
ownedTokens
Get all NFTs owned by an account
Interface
api.rpc.nft.ownedTokens(collectionId: CollectionUuid, who: AccountId, cursor: SerialNumber, limit: u16): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"nft_ownedTokens", "params":[collectionId: CollectionUuid, who: AccountId, cursor: SerialNumber, limit: u16] }
tokenUri
tokenUri
Get the URI of a token
Interface
api.rpc.nft.tokenUri(tokenId: TokenId): Json
JSON
{ "id":1, "jsonrpc":"2.0", "method":"nft_tokenUri", "params":[tokenId: TokenId] }
Offchain
localStorageGet
localStorageGet
Get offchain local storage under given key and prefix
Interface
api.rpc.offchain.localStorageGet(kind: StorageKind, key: Bytes): Option<Bytes>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"offchain_localStorageGet", "params":[kind: StorageKind, key: Bytes] }
localStorageSet
localStorageSet
Set offchain local storage under given key and prefix
Interface
api.rpc.offchain.localStorageSet(kind: StorageKind, key: Bytes, value: Bytes): Null
JSON
{ "id":1, "jsonrpc":"2.0", "method":"offchain_localStorageSet", "params":[kind: StorageKind, key: Bytes, value: Bytes] }
Payment
queryFeeDetails
queryFeeDetails
Query the detailed fee of a given encoded extrinsic
Interface
api.rpc.payment.queryFeeDetails(extrinsic: Bytes, at?: BlockHash): FeeDetails
JSON
{ "id":1, "jsonrpc":"2.0", "method":"payment_queryFeeDetails", "params":[extrinsic: Bytes, at?: BlockHash] }
Deprecated Use api.call.transactionPaymentApi.queryFeeDetails
instead
queryInfo
queryInfo
Retrieves the fee information for an encoded extrinsic
Interface
api.rpc.payment.queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfoV1
JSON
{ "id":1, "jsonrpc":"2.0", "method":"payment_queryInfo", "params":[extrinsic: Bytes, at?: BlockHash] }
Deprecated Use api.call.transactionPaymentApi.queryInfo
instead
Rpc
methods
methods
Retrieves the list of RPC methods that are exposed by the node
Interface
api.rpc.rpc.methods(): RpcMethods
JSON
{ "id":1, "jsonrpc":"2.0", "method":"rpc_methods", "params":[] }
State
call
call
Perform a call to a builtin on the chain
Interface
api.rpc.state.call(method: Text, data: Bytes, at?: BlockHash): Bytes
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_call", "params":[method: Text, data: Bytes, at?: BlockHash] }
getChildReadProof
getChildReadProof
Returns proof of storage for child key entries at a specific block state.
Interface
api.rpc.state.getChildReadProof(childStorageKey: PrefixedStorageKey, keys: Vec<StorageKey>, at?: BlockHash): ReadProof
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getChildReadProof", "params":[childStorageKey: PrefixedStorageKey, keys: Vec<StorageKey>, at?: BlockHash] }
getKeys
getKeys
Retrieves the keys with a certain prefix
Interface
api.rpc.state.getKeys(key: StorageKey, at?: BlockHash): Vec<StorageKey>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getKeys", "params":[key: StorageKey, at?: BlockHash] }
Deprecated Use api.rpc.state.getKeysPaged
to retrieve keys
getKeysPaged
getKeysPaged
Returns the keys with prefix with pagination support.
Interface
api.rpc.state.getKeysPaged(key: StorageKey, count: u32, startKey?: StorageKey, at?: BlockHash): Vec<StorageKey>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getKeysPaged", "params":[key: StorageKey, count: u32, startKey?: StorageKey, at?: BlockHash] }
getMetadata
getMetadata
Returns the runtime metadata
Interface
api.rpc.state.getMetadata(at?: BlockHash): Metadata
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getMetadata", "params":[at?: BlockHash] }
getPairs
getPairs
Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
Interface
api.rpc.state.getPairs(prefix: StorageKey, at?: BlockHash): Vec<KeyValue>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getPairs", "params":[prefix: StorageKey, at?: BlockHash] }
Deprecated Use api.rpc.state.getKeysPaged
to retrieve keys
getReadProof
getReadProof
Returns proof of storage entries at a specific block state
Interface
api.rpc.state.getReadProof(keys: Vec<StorageKey>, at?: BlockHash): ReadProof
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getReadProof", "params":[keys: Vec<StorageKey>, at?: BlockHash] }
getRuntimeVersion
getRuntimeVersion
Get the runtime version
Interface
api.rpc.state.getRuntimeVersion(at?: BlockHash): RuntimeVersion
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getRuntimeVersion", "params":[at?: BlockHash] }
getStorage
getStorage
Retrieves the storage for a key
Interface
api.rpc.state.getStorage(key: StorageKey, at?: BlockHash): StorageData
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getStorage", "params":[key: StorageKey, at?: BlockHash] }
getStorageHash
getStorageHash
Retrieves the storage hash
Interface
api.rpc.state.getStorageHash(key: StorageKey, at?: BlockHash): Hash
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getStorageHash", "params":[key: StorageKey, at?: BlockHash] }
getStorageSize
getStorageSize
Retrieves the storage size
Interface
api.rpc.state.getStorageSize(key: StorageKey, at?: BlockHash): u64
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_getStorageSize", "params":[key: StorageKey, at?: BlockHash] }
queryStorage
queryStorage
Query historical storage entries (by key) starting from a start block.
Interface
api.rpc.state.queryStorage(keys: Vec<StorageKey>, fromBlock: Hash, toBlock?: BlockHash): Vec<StorageChangeSet>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_queryStorage", "params":[keys: Vec<StorageKey>, fromBlock: Hash, toBlock?: BlockHash] }
queryStorageAt
queryStorageAt
Query storage entries (by key) starting at block hash given as the second parameter
Interface
api.rpc.state.queryStorageAt(keys: Vec<StorageKey>, at?: BlockHash): Vec<StorageChangeSet>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_queryStorageAt", "params":[keys: Vec<StorageKey>, at?: BlockHash] }
subscribeRuntimeVersion
subscribeRuntimeVersion
Retrieves the runtime version via subscription
Interface
api.rpc.state.subscribeRuntimeVersion(): RuntimeVersion
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_subscribeRuntimeVersion", "params":[] }
subscribeStorage
subscribeStorage
Subscribes to storage changes for the provided keys
Interface
api.rpc.state.subscribeStorage(keys?: Vec<StorageKey>): StorageChangeSet
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_subscribeStorage", "params":[keys?: Vec<StorageKey>] }
traceBlock
traceBlock
Provides a way to trace the re-execution of a single block
Interface
api.rpc.state.traceBlock(block: Hash, targets: Option<Text>, storageKeys: Option<Text>, methods: Option<Text>): TraceBlockResponse
JSON
{ "id":1, "jsonrpc":"2.0", "method":"state_traceBlock", "params":[block: Hash, targets: Option<Text>, storageKeys: Option<Text>, methods: Option<Text>] }
System
accountNextIndex
accountNextIndex
Retrieves the next accountIndex as available on the node
Interface
api.rpc.system.accountNextIndex(accountId: AccountId): Index
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_accountNextIndex", "params":[accountId: AccountId] }
addLogFilter
addLogFilter
Adds the supplied directives to the current log filter.
Interface
api.rpc.system.addLogFilter(directives: Text): Null
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_addLogFilter", "params":[directives: Text] }
addReservedPeer
addReservedPeer
Adds a reserved peer
Interface
api.rpc.system.addReservedPeer(peer: Text): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_addReservedPeer", "params":[peer: Text] }
chain
chain
Retrieves the chain
Interface
api.rpc.system.chain(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_chain", "params":[] }
chainType
chainType
Retrieves the chain type
Interface
api.rpc.system.chainType(): ChainType
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_chainType", "params":[] }
dryRun
dryRun
Dry run an extrinsic at a given block.
Interface
api.rpc.system.dryRun(extrinsic: Bytes, at?: BlockHash): ApplyExtrinsicResult
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_dryRun", "params":[extrinsic: Bytes, at?: BlockHash] }
health
health
Return health status of the node
Interface
api.rpc.system.health(): Health
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_health", "params":[] }
localListenAddresses
localListenAddresses
The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example
Interface
api.rpc.system.localListenAddresses(): Vec<Text>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_localListenAddresses", "params":[] }
localPeerId
localPeerId
Returns the base58-encoded PeerId of the node
Interface
api.rpc.system.localPeerId(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_localPeerId", "params":[] }
name
name
Retrieves the node name
Interface
api.rpc.system.name(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_name", "params":[] }
nodeRoles
nodeRoles
Returns the roles the node is running as
Interface
api.rpc.system.nodeRoles(): Vec<NodeRole>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_nodeRoles", "params":[] }
peers
peers
Returns the currently connected peers.
Interface
api.rpc.system.peers(): Vec<PeerInfo>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_peers", "params":[] }
properties
properties
Get a custom set of properties as a JSON object, defined in the chain spec
Interface
api.rpc.system.properties(): ChainProperties
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_properties", "params":[] }
removeReservedPeer
removeReservedPeer
Remove a reserved peer.
Interface
api.rpc.system.removeReservedPeer(peerId: Text): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_removeReservedPeer", "params":[peerId: Text] }
reservedPeers
reservedPeers
Returns the list of reserved peers
Interface
api.rpc.system.reservedPeers(): Vec<Text>
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_reservedPeers", "params":[] }
resetLogFilter
resetLogFilter
Resets the log filter to Substrate defaults
Interface
api.rpc.system.resetLogFilter(): Null
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_resetLogFilter", "params":[] }
syncState
syncState
Returns the state of the syncing of the node
Interface
api.rpc.system.syncState(): SyncState
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_syncState", "params":[] }
version
version
Retrieves the version of the node
Interface
api.rpc.system.version(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"system_version", "params":[] }
Web3
clientVersion
clientVersion
Returns current client version.
Interface
api.rpc.web3.clientVersion(): Text
JSON
{ "id":1, "jsonrpc":"2.0", "method":"web3_clientVersion", "params":[] }
sha3
sha3
Returns sha3 of the given data
Interface
api.rpc.web3.sha3(data: Bytes): H256
JSON
{ "id":1, "jsonrpc":"2.0", "method":"web3_sha3", "params":[data: Bytes] }
Last updated