Get the UTXO manager.
The payload to send
Build a JSON RPC payload. This method is used to build a JSON RPC payload.
The method to call
The parameters to send
The JSON RPC payload
Call a contract function with a given calldata.
The address of the contract
The calldata of the contract function
Optional
from: BitcoinAddressLikeThe address to call the contract from
Optional
height: BigNumberishThe height to call the contract from
The result of the contract function call
Send multiple payloads. This method is used to send multiple payloads.
The payloads to send
The result of the payloads
Get the bitcoin balance of an address.
The address to get the balance of
Whether to filter ordinals or not
The balance of the address
Get block witnesses.
The block number or hash, use -1 for latest block
Optional
trusted: booleanWhether to trust the witnesses or not
Optional
limit: numberThe maximum number of witnesses to return
Optional
page: numberThe page number of the witnesses
The witnesses of the block
This method is used to get the witnesses of a block. This proves that the action executed inside a block are valid and confirmed by the network. If the minimum number of witnesses are not met, the block is considered as potentially invalid.
await getBlockWitness(123456n);
If something went wrong while fetching the witnesses
Get the contract code of an address.
The address of the contract
Optional
onlyBytecode: boolean = falseWhether to return only the bytecode
The contract data or bytecode
Get reorgs that happened between two blocks.
Optional
fromBlock: BigNumberishThe block number to start from
Optional
toBlock: BigNumberishThe block number to end at
The reorg information
Get the storage at a specific address and pointer.
The address to get the storage from
The pointer to get the storage from as base64 or bigint
Whether to send proofs or not
Optional
height: BigNumberishThe height to get the storage from
The storage value
Get a transaction by its hash or hash id.
The transaction hash
The requested transaction
Get a transaction receipt by its hash.
The transaction hash
The requested transaction receipt
Protected
providerGenerate parameters needed to wrap bitcoin.
The amount to wrap
The wrapped generation parameters
Send a raw transaction.
The raw transaction to send as hex string
Optional
psbt: booleanWhether the transaction is a PSBT or not
The result of the transaction
This method is used to send a raw transaction.
await sendRawTransaction('02000000000101ad897689f66c98daae5fdc3606235c1ad7a17b9e0a6aaa0ea9e58ecc1198ad2a0100000000ffffffff01a154c39400000000160014482038efcc91af945f0c756d07a46401920380520247304402201c1f8718dec637ddb41b42abc44dcbf35a94c6be6a9de8c1db48c9fa6e456b7e022032a4b3286808372a7ac2c5094d6341b4d61b17663f4ccd1c1d92efa85c7dada80121020373626d317ae8788ce3280b491068610d840c23ecb64c14075bbb9f670af52c00000000', false);
If something went wrong while sending the transaction
Description
This class is used to provide a JSON RPC provider. JSONRpcProvider