-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.bitcoin ledger.<internal>.BitcoinBaseWalletProvider
@liquality/bitcoin-ledger..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/dist/lib/wallet/BitcoinBaseWallet.d.ts:22
• Protected
_addressType: AddressType
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:20
• Protected
_baseDerivationPath: string
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:18
• Protected
_derivationCache: DerivationCache
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:21
• Protected
_network: BitcoinNetwork
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:19
• Protected
chainProvider: Chain
<T
, Network
>
client/dist/lib/Wallet.d.ts:4
▸ Protected
_getUsedUnusedAddresses(numAddressPerCall
, addressType
): Promise
<{ unusedAddress
: { change
: Address
; external
: Address
} ; usedAddresses
: Address
[] }>
Name | Type |
---|---|
numAddressPerCall |
number |
addressType |
AddressSearchType |
Promise
<{ unusedAddress
: { change
: Address
; external
: Address
} ; usedAddresses
: Address
[] }>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:47
▸ Protected
_sendTransaction(transactions
, feePerByte?
): Promise
<Transaction
<Transaction
>>
Name | Type |
---|---|
transactions |
OutputTarget [] |
feePerByte? |
number |
Promise
<Transaction
<Transaction
>>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:43
▸ Protected
Abstract
baseDerivationNode(): Promise
<BIP32Interface
>
Promise
<BIP32Interface
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:23
▸ Protected
Abstract
buildSweepTransaction(externalChangeAddress
, feePerByte?
): Promise
<{ fee
: number
; hex
: string
}>
Name | Type |
---|---|
externalChangeAddress |
string |
feePerByte? |
number |
Promise
<{ fee
: number
; hex
: string
}>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:28
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:24
▸ 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 |
---|---|
addresses |
string [] |
change? |
boolean |
Promise
<Address
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:44
▸ Abstract
getAddress(): Promise
<AddressType
>
Promise
<AddressType
>
client/dist/lib/Wallet.d.ts:10
▸ Protected
getAddressFromPublicKey(publicKey
): string
Name | Type |
---|---|
publicKey |
Buffer |
string
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:63
▸ getAddresses(startingIndex?
, numAddresses?
, change?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type |
---|---|
startingIndex? |
number |
numAddresses? |
number |
change? |
boolean |
Promise
<Address
[]>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:37
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:34
▸ Protected
getDerivationPathAddress(path
): Promise
<Address
>
Name | Type |
---|---|
path |
string |
Promise
<Address
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:46
▸ Protected
getInputsForAmount(_targets
, feePerByte?
, fixedInputs?
, numAddressPerCall?
, sweep?
): Promise
<{ change
: CoinSelectTarget
; fee
: number
; inputs
: UTXO
[] ; outputs
: CoinSelectTarget
[] }>
Name | Type |
---|---|
_targets |
OutputTarget [] |
feePerByte? |
number |
fixedInputs? |
Input [] |
numAddressPerCall? |
number |
sweep? |
boolean |
Promise
<{ change
: CoinSelectTarget
; fee
: number
; inputs
: UTXO
[] ; outputs
: CoinSelectTarget
[] }>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:56
▸ Protected
getPaymentVariantFromPublicKey(publicKey
): Payment
Name | Type |
---|---|
publicKey |
Buffer |
Payment
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:64
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:55
▸ getTotalFees(transactions
, max
): Promise
<any
>
Name | Type |
---|---|
transactions |
TransactionRequest [] |
max |
boolean |
Promise
<any
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:42
▸ getUnusedAddress(change?
, numAddressPerCall?
): Promise
<Address
>
Get unused address/account of the user.
Name | Type |
---|---|
change? |
boolean |
numAddressPerCall? |
number |
Promise
<Address
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:35
▸ getUsedAddresses(numAddressPerCall?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type |
---|---|
numAddressPerCall? |
number |
Promise
<Address
[]>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:36
▸ getWalletAddress(address
): Promise
<Address
>
Name | Type |
---|---|
address |
string |
Promise
<Address
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:45
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:39
▸ Protected
sendOptionsToOutputs(transactions
): OutputTarget
[]
Name | Type |
---|---|
transactions |
TransactionRequest [] |
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:62
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:40
▸ sendTransaction(options
): Promise
<Transaction
<Transaction
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
options |
TransactionRequest |
Promise
<Transaction
<Transaction
>>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:38
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:33
▸ 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/dist/lib/wallet/BitcoinBaseWallet.d.ts:32
▸ updateTransactionFee(tx
, newFeePerByte
): Promise
<Transaction
<Transaction
>>
Update the fee of a transaction.
Name | Type |
---|---|
tx |
string | Transaction <Transaction > |
newFeePerByte |
number |
Promise
<Transaction
<Transaction
>>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:41
▸ Protected
withCachedUtxos(func
): Promise
<any
>
Name | Type |
---|---|
func |
() => any
|
Promise
<any
>
bitcoin/dist/lib/wallet/BitcoinBaseWallet.d.ts:54