Abstract
Creates an instance of ClientJsonRpc.
The URL of the JSON-RPC server.
Optional
config: ClientJsonRpcConfigReadonly
requestorGet fee rate statistics
Optional
blockRange: NumLikeFee rate statistics
Get tip block number
Tip block number
Get tip block header
Optional
verbosity: null | numberresult format which allows 0 and 1. (Optional, the default is 1.)
BlockHeader
Get block by block number
The block number.
Optional
verbosity: null | numberresult format which allows 0 and 2. (Optional, the default is 2.)
Optional
withCycles: null | booleanwhether the return cycles of block transactions. (Optional, default false.)
Block
Get block by block hash
The block hash.
Optional
verbosity: null | numberresult format which allows 0 and 2. (Optional, the default is 2.)
Optional
withCycles: null | booleanwhether the return cycles of block transactions. (Optional, default false.)
Block
Get header by block number
The block number.
Optional
verbosity: null | numberresult format which allows 0 and 1. (Optional, the default is 1.)
BlockHeader
Get header by block hash
The block hash.
Optional
verbosity: null | numberresult format which allows 0 and 1. (Optional, the default is 1.)
BlockHeader
Estimate cycles of a transaction.
The transaction to estimate.
Consumed cycles
Test a transaction.
The transaction to test.
Optional
validator: OutputsValidator"passthrough": Disable validation. "well_known_scripts_only": Only accept well known scripts in the transaction.
Consumed cycles
Send a transaction to node.
The transaction to send.
Optional
validator: OutputsValidator"passthrough": Disable validation. "well_known_scripts_only": Only accept well known scripts in the transaction.
Transaction hash.
Get a transaction from node.
The hash of the transaction.
The transaction with status.
find cells from node.
The search key of cells.
Optional
order: "asc" | "desc"The order of cells.
Optional
limit: NumLikeThe max return size of cells.
Optional
after: stringPagination parameter.
The found cells.
find transactions from node.
get cells capacity from node.
The search key of cells.
The sum of cells capacity.
Abstract
addressReturns the URL of the JSON-RPC server.
The URL of the JSON-RPC server.
Abstract
getOptional
verbosity: null | numberOptional
withCycles: null | booleanOptional
verbosity: null | numberOptional
withCycles: null | booleanOptional
verbosity: null | numberOptional
verbosity: null | numberOptional
withData: null | booleanOptional
includeTxPool: null | booleanOptional
order: "asc" | "desc"Optional
limit: NumLikeOptional
after: stringOptional
order: "asc" | "desc"Find cells by search key designed for collectable cells.
The search key.
Optional
order: "asc" | "desc"A async generator for yielding cells.
Optional
type: null | ScriptLikeOptional
order: "asc" | "desc"Optional
order: "asc" | "desc"Rest
...cellDepsInfoLike: (CellDepInfoLike | CellDepInfoLike[])[]Optional
order: "asc" | "desc"Optional
limit: numberOptional
order: "asc" | "desc"Optional
limit: numberOptional
order: "asc" | "desc"Optional
limit: numberOptional
order: "asc" | "desc"Optional
limit: numberOptional
type: null | ScriptLikeOptional
groupByTransaction: null | falseOptional
order: "asc" | "desc"Optional
limit: numberOptional
type: null | ScriptLikeOptional
groupByTransaction: null | booleanOptional
order: "asc" | "desc"Optional
limit: numberOptional
order: "asc" | "desc"Optional
limit: numberOptional
groupByTransaction: null | falseOptional
order: "asc" | "desc"Optional
limit: numberOptional
groupByTransaction: null | booleanOptional
order: "asc" | "desc"Optional
limit: numberOptional
validator: OutputsValidatorOptional
options: { Optional
maxThis method gets specified transaction with its block header (if existed). This is mainly for caching because we need the header to test if we can safely trust the cached tx status.
Get a live cell from node.
The out point of the cell.
Optional
withData: null | booleanInclude data in the response.
Optional
includeTxPool: null | booleanInclude cells in the tx pool.
The cell
Builds a sender function for a JSON-RPC method.
The JSON-RPC method.
Optional
inTransformers: (undefined | ((_: any) => unknown))[]An array of input transformers.
Optional
outTransformer: ((_: any) => unknown)An output transformer function.
A function that sends a JSON-RPC request with the given method and transformed parameters.
Rest
...req: unknown[]
An abstract class implementing JSON-RPC client functionality for a specific URL and timeout. Provides methods for sending transactions and building JSON-RPC payloads.