-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.bitcoin.BitcoinNodeWalletProvider
@liquality/bitcoin.BitcoinNodeWalletProvider
-
Wallet
<any
,any
>↳
BitcoinNodeWalletProvider
- canUpdateFee
- exportPrivateKey
- getAddress
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getSigner
- getUnusedAddress
- getUsedAddresses
- getWalletAddress
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- setChainProvider
- signBatchP2SHTransaction
- signMessage
- signPSBT
- updateTransactionFee
• new BitcoinNodeWalletProvider(chainProvider
, options?
)
Name | Type |
---|---|
chainProvider |
Chain <BitcoinBaseChainProvider , Network > |
options? |
BitcoinNodeWalletOptions |
bitcoin/lib/wallet/BitcoinNodeWallet.ts:30
• Protected
chainProvider: Chain
<any
, Network
>
client/dist/lib/Wallet.d.ts:4
▸ canUpdateFee(): boolean
boolean
bitcoin/lib/wallet/BitcoinNodeWallet.ts:128
▸ 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
Promise
<string
>
IBitcoinWallet.exportPrivateKey
bitcoin/lib/wallet/BitcoinNodeWallet.ts:114
▸ getAddress(): Promise
<AddressType
>
Promise
<AddressType
>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:98
▸ getAddresses(): Promise
<Address
[]>
Get addresses/accounts of the user.
Promise
<Address
[]>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:50
▸ getBalance(assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
assets |
Asset [] |
Promise
<BigNumber
[]>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:109
▸ getChainProvider(): Chain
<any
, Network
>
IBitcoinWallet.getChainProvider
client/dist/lib/Wallet.d.ts:7
▸ getConnectedNetwork(): Promise
<Network
>
Retrieve the network connected to by the wallet
Promise
<Network
>
IBitcoinWallet.getConnectedNetwork
bitcoin/lib/wallet/BitcoinNodeWallet.ts:88
▸ getSigner(): Promise
<null
>
Promise
<null
>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:94
▸ getUnusedAddress(): Promise
<Address
>
Get unused address/account of the user.
Promise
<Address
>
IBitcoinWallet.getUnusedAddress
bitcoin/lib/wallet/BitcoinNodeWallet.ts:38
▸ getUsedAddresses(): Promise
<Address
[]>
Get used addresses/accounts of the user.
Promise
<Address
[]>
IBitcoinWallet.getUsedAddresses
bitcoin/lib/wallet/BitcoinNodeWallet.ts:42
▸ getWalletAddress(address
): Promise
<Address
>
Name | Type |
---|---|
address |
string |
Promise
<Address
>
IBitcoinWallet.getWalletAddress
bitcoin/lib/wallet/BitcoinNodeWallet.ts:181
▸ isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
IBitcoinWallet.isWalletAvailable
bitcoin/lib/wallet/BitcoinNodeWallet.ts:119
▸ sendBatchTransaction(transactions
): Promise
<Transaction
<Transaction
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
transactions |
TransactionRequest [] |
Promise
<Transaction
<Transaction
>[]>
IBitcoinWallet.sendBatchTransaction
bitcoin/lib/wallet/BitcoinNodeWallet.ts:60
▸ sendSweepTransaction(_address
, _asset
, _fee?
): Promise
<Transaction
<any
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
_address |
AddressType |
_asset |
Asset |
_fee? |
FeeType |
Promise
<Transaction
<any
>>
IBitcoinWallet.sendSweepTransaction
bitcoin/lib/wallet/BitcoinNodeWallet.ts:74
▸ sendTransaction(txRequest
): Promise
<Transaction
<Transaction
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
txRequest |
TransactionRequest |
Promise
<Transaction
<Transaction
>>
IBitcoinWallet.sendTransaction
bitcoin/lib/wallet/BitcoinNodeWallet.ts:54
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <any , Network > |
void
IBitcoinWallet.setChainProvider
client/dist/lib/Wallet.d.ts:6
▸ signBatchP2SHTransaction(inputs
, addresses
, tx
, locktime
, segwit?
): Promise
<Buffer
[]>
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 |
Promise
<Buffer
[]>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:146
▸ signMessage(message
, from
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
from |
string |
Promise
<string
>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:103
▸ signPSBT(data
, inputs
): Promise
<string
>
Name | Type |
---|---|
data |
string |
inputs |
PsbtInputTarget [] |
Promise
<string
>
bitcoin/lib/wallet/BitcoinNodeWallet.ts:132
▸ updateTransactionFee(tx
, newFee
): Promise
<Transaction
<any
>>
Update the fee of a transaction.
Name | Type |
---|---|
tx |
string | Transaction <any > |
newFee |
number |
Promise
<Transaction
<any
>>