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