Private
#privatePrivate
#privateOptional
config: RPCConfigthe address of target node
addNode
DefaultRPC
attempt to add a node to the peer list and try to connect
clearBannedAddresses
DefaultRPC
clear all banned IPs/Subnets
clearTxPool
DefaultRPC
remove all transactions from the tx pool
Optional
params: anydry run result, including cycles the transaction used.
dryRunTransaction
DefaultRPC
dry run the transaction and return the execution cycles, this method will not check the transaction validaty, but only run the lock script and type script and then return the execution cycles.
how many cycles the scripts consume.
estimateCycles run a transaction and return the execution consumed cycles This method will not check the transaction validity, but only run the lock script and type script and then return the execution cycles.
getBannedAddresses
DefaultRPC
Returns all banned IPs/Subnets
getBlock
DefaultRPC
rpc to get block by its hash
getBlockByNumber
DefaultRPC
rpc to get block by its hash
getBlockEconomicState
DefaultRPC
the block hash.
The block filter by block hash.
getBlockFilter
block hash
getBlockHash
DefaultRPC
rpc to get the block hash by block number
A median time is calculated for a consecutive block sequence. blockHash
indicates the highest block of the sequence.
the past median time by block hash.
When the given block hash is not on the current canonical chain, this RPC returns null;
otherwise returns the median time of the consecutive 37 blocks where the given block_hash has the highest height.
Note that the given block is included in the median time.
The included block number range is [MAX(block - 36, 0), block]
.
getBlockMedianTime
getCellbaseOutputCapacityDetails
DefaultRPC
Returns each component of the created CKB in this block's cellbase, which is issued to a block N - 1 - ProposalWindow.farthest, where this block's height is N.
will be removed from v0.41.0
order cells by blocknumber "asc" or "desc"
limit the number of cells returned per call
Optional
cursor: stringCKBComponents.GetLiveCellsResult
getCells
DefaultRPC
rpc to get a cell by script
CKBComponents.CellsCapacity
getCellsCapacity
DefaultRPC
rpc to get capacities by script
Optional
target: stringSpecify the number (1 - 101) of confirmed blocks to be counted. If the number is even, automatically add one. If not specified, defaults to 2
the feeRate statistics of confirmed blocks on the chain
Optional
target: stringSpecify the number (1 - 101) of confirmed blocks to be counted. If the number is even, automatically add one. If not specified, defaults to 2
the feeRate statistics of confirmed blocks on the chain If the query finds the corresponding historical data, the corresponding statistics are returned, containing the mean and median, in shannons per kilo-weight. If not, it returns null.
getFeeRateStatistics
getHeader
DefaultRPC
Returns the information about a block header by hash.
block hash
getHeaderByNumber
DefaultRPC
Returns the information about a block header by block number
block number
tip info, including block number, block hash
getIndexerTip
DefaultRPC
rpc to get tip info of the longest blockchain
cell's outPoint
set withData to true to return cell data and data hash if the cell is live
liveCellWithStatus
getLiveCell
DefaultRPC
rpc to get a cell by outPoint, the meaning of outPoint could be found in ckb-types, please distinguish outPoint and cellOutPoint
peers' node info
getPeers
DefaultRPC
rpc to get connected peers info
will be removed from v0.41.0
block number
getTipBlockNumber
DefaultRPC
rpc to get the number of blocks in the longest blockchain
getTransaction
DefaultRPC
rpc to get trasnaction wtih its status by its hash
the transaction hash of the target transaction
transaction object with transaction status
Transaction hashes, all transactions must be in the same block
Optional
blockHash: stringAn optional parameter, if specified, looks for transactions in the block with this hash
a Merkle proof of transactions’ witness included in a block
getTransactionAndWitnessProof
transaction hashes, all transactions must be in the same block
Optional
blockHash: stringif specified, looks for transactions in the block with this hash
getTransactionProof
DefaultRPC
request merkle proof that transactions are included in a block
order cells by blocknumber "asc" or "desc"
limit the number of cells returned per call
Optional
cursor: stringCKBComponents.GetTransactionsResult
getTransactions
DefaultRPC
rpc to get a transactions by script
pingPeers
DefaultRPC
request a ping sent to all connected peers to measure ping time
the peer id of the target node
removeNode
DefaultRPC
attempt to remove a node from the peer list and try to disconnect
Optional
outputsValidator: OutputsValidatorValidates the transaction outputs before entering the tx-pool, an optional string parameter (enum: default | passthrough ), null and passthrough mean skipping outputs validation
transaction hash
sendTransaction
DefaultRPC
rpc to send a new transaction into transaction pool
Optional
absolute: booleanOptional
reason: stringsetBan
DefaultRPC
insert or delete an IP/Subnet from the banned list
true to enable networking, false to disable
setNetworkActive
DefaultRPC
disable/enable all p2p network activity
info of transaction pool, including last_txs_updated_at, number of orphan, number of pending, number of proposed
txPoolInfo
DefaultRPC
rpc to get pool information
proof generated by getTransactionAndWitnessProof
the transaction hashes it commits to
verifyTransactionAndWitnessProof
Verifies that a proof points to transactions in a block
hash list of transactions committed in the block
verifyTransactionProof
DefaultRPC
verifies that a proof points to transactions in a block, returns transactions it commits to.
Optional
format: ((args) => any)Optional
format: ((args) => any)Optional
pageNo: string | bigintOptional
pageSize: string | bigintOptional
reverse: booleanthe fork block hash.
Optional
verbosity: "0x2" | 2nresult format which allows 0 and 2. (Optional, the default is 2.)
a fork block or null. When the RPC returns a block, the block hash must equal to the parameter blockHash
.
Please note that due to the technical nature of the peer to peer sync, the RPC may return null or a fork block result on different nodes with same block_hash
even they are fully synced to the canonical chain.
And because of chain reorganization, for the same block_hash
, the RPC may sometimes return null and sometimes return the fork block.
When verbosity is 2, it returns a JSON object as the result. See BlockView for the schema.
When verbosity is 0, it returns a 0x-prefixed hex string as the result. The string encodes the block serialized by molecule using schema table Block.
getForkBlock
CKBComponents.RawTxPool
getRawTxPool
DefaultRPC
Returns all transaction ids in tx pool as a json array of string transaction ids.
Generated using TypeDoc
the peer id of target node