Optional
config: { Optional
url?: stringOptional
timeout?: numberOptional
scripts?: Record<KnownScript, ScriptInfoLike>Optional
cache?: ClientCacheGet 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.
Returns the URL of the JSON-RPC server.
The URL of the JSON-RPC server.
Optional
blockRange: NumLikeOptional
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: OutputsValidatorGet 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.
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[]Sends a JSON-RPC request to the server.
The JSON-RPC payload to send.
The result of the JSON-RPC request.
Builds a JSON-RPC payload for the given method and parameters.
The JSON-RPC method name.
The parameters for the JSON-RPC method.
The JSON-RPC payload.
An abstract class implementing JSON-RPC client functionality for a specific URL and timeout. Provides methods for sending transactions and building JSON-RPC payloads.