-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.bitcoin.BitcoinBaseWalletProvider
@liquality/bitcoin.BitcoinBaseWalletProvider
Name | Type |
---|---|
T |
extends BitcoinBaseChainProvider = any
|
S |
any |
-
Wallet
<T
,S
>↳
BitcoinBaseWalletProvider
- _getUsedUnusedAddresses
- _sendTransaction
- baseDerivationNode
- buildSweepTransaction
- buildTransaction
- canUpdateFee
- exportPrivateKey
- findAddress
- getAddress
- getAddressFromPublicKey
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getDerivationCache
- getDerivationPathAddress
- getInputsForAmount
- getPaymentVariantFromPublicKey
- getSigner
- getTotalFee
- getTotalFees
- getUnusedAddress
- getUsedAddresses
- getWalletAddress
- isWalletAvailable
- sendBatchTransaction
- sendOptionsToOutputs
- sendSweepTransaction
- sendTransaction
- setChainProvider
- signBatchP2SHTransaction
- signMessage
- signPSBT
- updateTransactionFee
- withCachedUtxos
• new BitcoinBaseWalletProvider<T
, S
>(options
, chainProvider
)
Name | Type |
---|---|
T |
extends BitcoinBaseChainProvider <T > = any
|
S |
any |
Name | Type |
---|---|
options |
BitcoinWalletProviderOptions |
chainProvider |
Chain <T , Network > |
bitcoin/lib/wallet/BitcoinBaseWallet.ts:39
• Protected
_addressType: AddressType
bitcoin/lib/wallet/BitcoinBaseWallet.ts:36
• Protected
_baseDerivationPath: string
bitcoin/lib/wallet/BitcoinBaseWallet.ts:34
• Protected
_derivationCache: DerivationCache
bitcoin/lib/wallet/BitcoinBaseWallet.ts:37
• Protected
_network: BitcoinNetwork
bitcoin/lib/wallet/BitcoinBaseWallet.ts:35
• Protected
chainProvider: Chain
<T
, Network
>
client/dist/lib/Wallet.d.ts:4
▸ Protected
_getUsedUnusedAddresses(numAddressPerCall?
, addressType
): Promise
<{ unusedAddress
: { change
: Address
; external
: Address
} = unusedAddressMap; usedAddresses
: Address
[] }>
Name | Type | Default value |
---|---|---|
numAddressPerCall |
number |
100 |
addressType |
AddressSearchType |
undefined |
Promise
<{ unusedAddress
: { change
: Address
; external
: Address
} = unusedAddressMap; usedAddresses
: Address
[] }>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:211
▸ Protected
_sendTransaction(transactions
, feePerByte?
): Promise
<Transaction
<Transaction
>>
Name | Type |
---|---|
transactions |
OutputTarget [] |
feePerByte? |
number |
Promise
<Transaction
<Transaction
>>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:157
▸ Protected
Abstract
baseDerivationNode(): Promise
<BIP32Interface
>
Promise
<BIP32Interface
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:54
▸ Protected
Abstract
buildSweepTransaction(externalChangeAddress
, feePerByte?
): Promise
<{ fee
: number
; hex
: string
}>
Name | Type |
---|---|
externalChangeAddress |
string |
feePerByte? |
number |
Promise
<{ fee
: number
; hex
: string
}>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:60
▸ Protected
Abstract
buildTransaction(targets
, feePerByte?
, fixedInputs?
): Promise
<{ fee
: number
; hex
: string
}>
Name | Type |
---|---|
targets |
OutputTarget [] |
feePerByte? |
number |
fixedInputs? |
Input [] |
Promise
<{ fee
: number
; hex
: string
}>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:55
▸ Abstract
canUpdateFee(): boolean
boolean
client/dist/lib/Wallet.d.ts:22
▸ Abstract
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
>
client/dist/lib/Wallet.d.ts:20
▸ Protected
findAddress(addresses
, change?
): Promise
<Address
>
Name | Type | Default value |
---|---|---|
addresses |
string [] |
undefined |
change |
boolean |
false |
Promise
<Address
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:163
▸ Abstract
getAddress(): Promise
<AddressType
>
Promise
<AddressType
>
client/dist/lib/Wallet.d.ts:10
▸ Protected
getAddressFromPublicKey(publicKey
): string
Name | Type |
---|---|
publicKey |
Buffer |
string
bitcoin/lib/wallet/BitcoinBaseWallet.ts:464
▸ getAddresses(startingIndex?
, numAddresses?
, change?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
startingIndex |
number |
0 |
numAddresses |
number |
1 |
change |
boolean |
false |
Promise
<Address
[]>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:86
▸ Abstract
getBalance(assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
assets |
Asset [] |
Promise
<BigNumber
[]>
client/dist/lib/Wallet.d.ts:19
▸ getChainProvider(): Chain
<T
, Network
>
client/dist/lib/Wallet.d.ts:7
▸ Abstract
getConnectedNetwork(): Promise
<Network
>
Retrieve the network connected to by the wallet
Promise
<Network
>
client/dist/lib/Wallet.d.ts:8
▸ getDerivationCache(): DerivationCache
bitcoin/lib/wallet/BitcoinBaseWallet.ts:70
▸ Protected
getDerivationPathAddress(path
): Promise
<Address
>
Name | Type |
---|---|
path |
string |
Promise
<Address
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:192
▸ Protected
getInputsForAmount(_targets
, feePerByte?
, fixedInputs?
, numAddressPerCall?
, sweep?
): Promise
<{ change
: CoinSelectTarget
; fee
: number
; inputs
: UTXO
[] ; outputs
: CoinSelectTarget
[] }>
Name | Type | Default value |
---|---|---|
_targets |
OutputTarget [] |
undefined |
feePerByte? |
number |
undefined |
fixedInputs |
Input [] |
[] |
numAddressPerCall |
number |
100 |
sweep |
boolean |
false |
Promise
<{ change
: CoinSelectTarget
; fee
: number
; inputs
: UTXO
[] ; outputs
: CoinSelectTarget
[] }>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:317
▸ Protected
getPaymentVariantFromPublicKey(publicKey
): Payment
Name | Type |
---|---|
publicKey |
Buffer |
Payment
bitcoin/lib/wallet/BitcoinBaseWallet.ts:468
▸ Abstract
getSigner(): S
S
client/dist/lib/Wallet.d.ts:9
▸ Protected
getTotalFee(opts
, max
): Promise
<number
>
Name | Type |
---|---|
opts |
TransactionRequest |
max |
boolean |
Promise
<number
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:300
▸ getTotalFees(transactions
, max
): Promise
<any
>
Name | Type |
---|---|
transactions |
TransactionRequest [] |
max |
boolean |
Promise
<any
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:145
▸ getUnusedAddress(change?
, numAddressPerCall?
): Promise
<Address
>
Get unused address/account of the user.
Name | Type | Default value |
---|---|---|
change |
boolean |
false |
numAddressPerCall |
number |
100 |
Promise
<Address
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:74
▸ getUsedAddresses(numAddressPerCall?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
numAddressPerCall |
number |
100 |
Promise
<Address
[]>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:80
▸ getWalletAddress(address
): Promise
<Address
>
Name | Type |
---|---|
address |
string |
Promise
<Address
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:178
▸ Abstract
isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
client/dist/lib/Wallet.d.ts:21
▸ sendBatchTransaction(transactions
): Promise
<Transaction
<Transaction
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
transactions |
TransactionRequest [] |
Promise
<Transaction
<Transaction
>[]>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:111
▸ Protected
sendOptionsToOutputs(transactions
): OutputTarget
[]
Name | Type |
---|---|
transactions |
TransactionRequest [] |
bitcoin/lib/wallet/BitcoinBaseWallet.ts:441
▸ sendSweepTransaction(externalChangeAddress
, _asset
, feePerByte
): Promise
<Transaction
<Transaction
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
externalChangeAddress |
AddressType |
_asset |
Asset |
feePerByte |
number |
Promise
<Transaction
<Transaction
>>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:115
▸ sendTransaction(options
): Promise
<Transaction
<Transaction
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
options |
TransactionRequest |
Promise
<Transaction
<Transaction
>>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:107
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <T , Network > |
void
client/dist/lib/Wallet.d.ts:6
▸ Abstract
signBatchP2SHTransaction(inputs
, addresses
, tx
, lockTime?
, segwit?
): Promise
<Buffer
[]>
Name | Type |
---|---|
inputs |
P2SHInput [] |
addresses |
string |
tx |
any |
lockTime? |
number |
segwit? |
boolean |
Promise
<Buffer
[]>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:62
▸ Abstract
signMessage(message
, from
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
from |
AddressType |
Promise
<string
>
client/dist/lib/Wallet.d.ts:14
▸ Abstract
signPSBT(data
, inputs
): Promise
<string
>
Name | Type |
---|---|
data |
string |
inputs |
PsbtInputTarget [] |
Promise
<string
>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:61
▸ updateTransactionFee(tx
, newFeePerByte
): Promise
<Transaction
<Transaction
>>
Update the fee of a transaction.
Name | Type |
---|---|
tx |
string | Transaction <Transaction > |
newFeePerByte |
number |
Promise
<Transaction
<Transaction
>>
bitcoin/lib/wallet/BitcoinBaseWallet.ts:121
▸ Protected
withCachedUtxos(func
): Promise
<any
>
Name | Type |
---|---|
func |
() => any
|
Promise
<any
>