Skip to content

@liquality.bitcoin.BitcoinJsonRpcProvider

Krasimir Raykov edited this page Mar 30, 2022 · 4 revisions

Class: BitcoinJsonRpcProvider

@liquality/bitcoin.BitcoinJsonRpcProvider

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BitcoinJsonRpcProvider(options, feeProvider?, feeOptions?)

Parameters

Name Type
options ProviderOptions
feeProvider? Fee
feeOptions? FeeOptions

Overrides

Chain.constructor

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:14

Properties

feeProvider

Protected feeProvider: Fee

Inherited from

Chain.feeProvider

Defined in

client/dist/lib/Chain.d.ts:11


jsonRpc

jsonRpc: JsonRpcProvider

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:11


network

Protected network: Network

Inherited from

Chain.network

Defined in

client/dist/lib/Chain.d.ts:12


provider

Protected provider: BitcoinJsonRpcBaseProvider

Inherited from

Chain.provider

Defined in

client/dist/lib/Chain.d.ts:13

Methods

getBalance

getBalance(_addresses, _assets): Promise<BigNumber[]>

Parameters

Name Type
_addresses AddressType[]
_assets Asset[]

Returns

Promise<BigNumber[]>

Overrides

Chain.getBalance

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:107


getBlockByHash

getBlockByHash(blockHash, includeTx?): Promise<Block<any, any>>

Parameters

Name Type Default value
blockHash string undefined
includeTx boolean false

Returns

Promise<Block<any, any>>

Overrides

Chain.getBlockByHash

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:20


getBlockByNumber

getBlockByNumber(blockNumber?, includeTx?): Promise<Block<any, any>>

Parameters

Name Type
blockNumber? number
includeTx? boolean

Returns

Promise<Block<any, any>>

Overrides

Chain.getBlockByNumber

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:66


getBlockHeight

getBlockHeight(): Promise<number>

Returns

Promise<number>

Overrides

Chain.getBlockHeight

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:88


getFeeProvider

getFeeProvider(): Promise<Fee>

Gets the fee provider

Returns

Promise<Fee>

Inherited from

Chain.getFeeProvider

Defined in

client/dist/lib/Chain.d.ts:38


getFees

getFees(): Promise<FeeDetails>

Returns

Promise<FeeDetails>

The fee details - FeeDetails

Overrides

Chain.getFees

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:114


getNetwork

getNetwork(): Network

Gets the connected network

Returns

Network

Inherited from

Chain.getNetwork

Defined in

client/dist/lib/Chain.d.ts:22


getProvider

getProvider(): BitcoinJsonRpcBaseProvider

Gets the chain specific provider

Returns

BitcoinJsonRpcBaseProvider

Inherited from

Chain.getProvider

Defined in

client/dist/lib/Chain.d.ts:26


getTransactionByHash

getTransactionByHash(txHash): Promise<Transaction<any>>

Parameters

Name Type
txHash string

Returns

Promise<Transaction<any>>

Overrides

Chain.getTransactionByHash

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:92


sendRawTransaction

sendRawTransaction(rawTransaction): Promise<string>

Parameters

Name Type
rawTransaction string

Returns

Promise<string>

the transaction hash

Overrides

Chain.sendRawTransaction

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:132


sendRpcRequest

sendRpcRequest(method, params): Promise<any>

Parameters

Name Type
method string
params any[]

Returns

Promise<any>

Overrides

Chain.sendRpcRequest

Defined in

bitcoin/lib/chain/jsonRpc/BitcoinJsonRpcProvider.ts:136


setFeeProvider

setFeeProvider(feeProvider): Promise<void>

Sets the fee provider

Parameters

Name Type
feeProvider Fee

Returns

Promise<void>

Inherited from

Chain.setFeeProvider

Defined in

client/dist/lib/Chain.d.ts:34


setNetwork

setNetwork(network): void

Sets the network

Parameters

Name Type
network Network

Returns

void

Inherited from

Chain.setNetwork

Defined in

client/dist/lib/Chain.d.ts:18


setProvider

setProvider(provider): Promise<void>

Sets the chain specific provider

Parameters

Name Type
provider BitcoinJsonRpcBaseProvider

Returns

Promise<void>

Inherited from

Chain.setProvider

Defined in

client/dist/lib/Chain.d.ts:30

Clone this wiki locally