Skip to content

@liquality.bitcoin.BitcoinNodeWalletProvider

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

Class: BitcoinNodeWalletProvider

@liquality/bitcoin.BitcoinNodeWalletProvider

Hierarchy

  • Wallet<any, any>

    BitcoinNodeWalletProvider

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BitcoinNodeWalletProvider(chainProvider, options?)

Parameters

Name Type
chainProvider Chain<BitcoinBaseChainProvider, Network>
options? BitcoinNodeWalletOptions

Overrides

Wallet.constructor

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:30

Properties

chainProvider

Protected chainProvider: Chain<any, Network>

Implementation of

IBitcoinWallet.chainProvider

Inherited from

Wallet.chainProvider

Defined in

client/dist/lib/Wallet.d.ts:4

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Implementation of

IBitcoinWallet.canUpdateFee

Overrides

Wallet.canUpdateFee

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:128


exportPrivateKey

exportPrivateKey(): Promise<string>

Exports the private key for the account for BTC, https://en.bitcoin.it/wiki/Wallet_import_format for ETH, the privateKey for NEAR, the secretKey

Returns

Promise<string>

Implementation of

IBitcoinWallet.exportPrivateKey

Overrides

Wallet.exportPrivateKey

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:114


getAddress

getAddress(): Promise<AddressType>

Returns

Promise<AddressType>

Implementation of

IBitcoinWallet.getAddress

Overrides

Wallet.getAddress

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:98


getAddresses

getAddresses(): Promise<Address[]>

Get addresses/accounts of the user.

Returns

Promise<Address[]>

Implementation of

IBitcoinWallet.getAddresses

Overrides

Wallet.getAddresses

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:50


getBalance

getBalance(assets): Promise<BigNumber[]>

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Implementation of

IBitcoinWallet.getBalance

Overrides

Wallet.getBalance

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:109


getChainProvider

getChainProvider(): Chain<any, Network>

Returns

Chain<any, Network>

Implementation of

IBitcoinWallet.getChainProvider

Inherited from

Wallet.getChainProvider

Defined in

client/dist/lib/Wallet.d.ts:7


getConnectedNetwork

getConnectedNetwork(): Promise<Network>

Retrieve the network connected to by the wallet

Returns

Promise<Network>

Implementation of

IBitcoinWallet.getConnectedNetwork

Overrides

Wallet.getConnectedNetwork

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:88


getSigner

getSigner(): Promise<null>

Returns

Promise<null>

Implementation of

IBitcoinWallet.getSigner

Overrides

Wallet.getSigner

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:94


getUnusedAddress

getUnusedAddress(): Promise<Address>

Get unused address/account of the user.

Returns

Promise<Address>

Implementation of

IBitcoinWallet.getUnusedAddress

Overrides

Wallet.getUnusedAddress

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:38


getUsedAddresses

getUsedAddresses(): Promise<Address[]>

Get used addresses/accounts of the user.

Returns

Promise<Address[]>

Implementation of

IBitcoinWallet.getUsedAddresses

Overrides

Wallet.getUsedAddresses

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:42


getWalletAddress

getWalletAddress(address): Promise<Address>

Parameters

Name Type
address string

Returns

Promise<Address>

Implementation of

IBitcoinWallet.getWalletAddress

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:181


isWalletAvailable

isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Implementation of

IBitcoinWallet.isWalletAvailable

Overrides

Wallet.isWalletAvailable

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:119


sendBatchTransaction

sendBatchTransaction(transactions): Promise<Transaction<Transaction>[]>

Create, sign & broad a transaction with multiple outputs.

Parameters

Name Type
transactions TransactionRequest[]

Returns

Promise<Transaction<Transaction>[]>

Implementation of

IBitcoinWallet.sendBatchTransaction

Overrides

Wallet.sendBatchTransaction

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:60


sendSweepTransaction

sendSweepTransaction(_address, _asset, _fee?): Promise<Transaction<any>>

Create, sign & broadcast a sweep transaction.

Parameters

Name Type
_address AddressType
_asset Asset
_fee? FeeType

Returns

Promise<Transaction<any>>

Implementation of

IBitcoinWallet.sendSweepTransaction

Overrides

Wallet.sendSweepTransaction

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:74


sendTransaction

sendTransaction(txRequest): Promise<Transaction<Transaction>>

Create, sign & broadcast a transaction.

Parameters

Name Type
txRequest TransactionRequest

Returns

Promise<Transaction<Transaction>>

Implementation of

IBitcoinWallet.sendTransaction

Overrides

Wallet.sendTransaction

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:54


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<any, Network>

Returns

void

Implementation of

IBitcoinWallet.setChainProvider

Inherited from

Wallet.setChainProvider

Defined in

client/dist/lib/Wallet.d.ts:6


signBatchP2SHTransaction

signBatchP2SHTransaction(inputs, addresses, tx, locktime, segwit?): Promise<Buffer[]>

Parameters

Name Type Default value
inputs [{ index: number ; inputTxHex: string ; outputScript: Buffer ; vout: any }] undefined
addresses string undefined
tx any undefined
locktime number undefined
segwit boolean false

Returns

Promise<Buffer[]>

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:146


signMessage

signMessage(message, from): Promise<string>

Sign a message.

Parameters

Name Type
message string
from string

Returns

Promise<string>

Implementation of

IBitcoinWallet.signMessage

Overrides

Wallet.signMessage

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:103


signPSBT

signPSBT(data, inputs): Promise<string>

Parameters

Name Type
data string
inputs PsbtInputTarget[]

Returns

Promise<string>

Implementation of

IBitcoinWallet.signPSBT

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:132


updateTransactionFee

updateTransactionFee(tx, newFee): Promise<Transaction<any>>

Update the fee of a transaction.

Parameters

Name Type
tx string | Transaction<any>
newFee number

Returns

Promise<Transaction<any>>

Implementation of

IBitcoinWallet.updateTransactionFee

Overrides

Wallet.updateTransactionFee

Defined in

bitcoin/lib/wallet/BitcoinNodeWallet.ts:78

Clone this wiki locally