-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.bitcoin.<internal>.WalletProvider
@liquality/bitcoin..WalletProvider
- exportPrivateKey
- getAddresses
- getConnectedNetwork
- getUnusedAddress
- getUsedAddresses
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- signMessage
- updateTransactionFee
• Optional
canUpdateFee: boolean
| () => boolean
Flag indicating if the wallet allows apps to update transaction fees
returns
True if wallet accepts fee updating
types/dist/lib/Wallet.d.ts:89
▸ Optional
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
>
Resolves with the key as a string
types/dist/lib/Wallet.d.ts:97
▸ getAddresses(startingIndex?
, numAddresses?
, change?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type |
---|---|
startingIndex? |
number |
numAddresses? |
number |
change? |
boolean |
Promise
<Address
[]>
Resolves with a list of addresses. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Wallet.d.ts:21
▸ getConnectedNetwork(): Promise
<any
>
Retrieve the network connected to by the wallet
Promise
<any
>
Resolves with the network object
types/dist/lib/Wallet.d.ts:79
▸ getUnusedAddress(change?
, numAddressPerCall?
): Promise
<Address
>
Get unused address/account of the user.
Name | Type |
---|---|
change? |
boolean |
numAddressPerCall? |
number |
Promise
<Address
>
Resolves with a address object. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Wallet.d.ts:67
▸ getUsedAddresses(numAddressPerCall?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type |
---|---|
numAddressPerCall? |
number |
Promise
<Address
[]>
Resolves with a list of addresses. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Wallet.d.ts:29
▸ isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
True if the wallet is available to use
types/dist/lib/Wallet.d.ts:84
▸ sendBatchTransaction(transactions
): Promise
<Transaction
<any
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type | Description |
---|---|---|
transactions |
TransactionRequest [] |
to, value, data |
Promise
<Transaction
<any
>[]>
Resolves with a signed transaction.
types/dist/lib/Wallet.d.ts:58
▸ sendSweepTransaction(address
, asset
, fee?
): Promise
<Transaction
<any
>>
Create, sign & broadcast a sweep transaction.
Name | Type | Description |
---|---|---|
address |
AddressType |
External address. |
asset |
Asset |
- |
fee? |
FeeType |
- |
Promise
<Transaction
<any
>>
Resolves with a signed transaction.
types/dist/lib/Wallet.d.ts:45
▸ sendTransaction(options
): Promise
<Transaction
<any
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
options |
TransactionRequest |
Promise
<Transaction
<any
>>
Resolves with a signed transaction.
types/dist/lib/Wallet.d.ts:38
▸ signMessage(message
, from
): Promise
<string
>
Sign a message.
Name | Type | Description |
---|---|---|
message |
string |
Message to be signed. |
from |
string |
The address from which the message is signed. |
Promise
<string
>
Resolves with a signed message.
types/dist/lib/Wallet.d.ts:74
▸ updateTransactionFee(tx
, newFee
): Promise
<Transaction
<any
>>
Update the fee of a transaction.
Name | Type | Description |
---|---|---|
tx |
string | Transaction <any > |
Transaction object or hash of the transaction to update |
newFee |
FeeType |
New fee price in native unit (e.g. sat/b, wei) |
Promise
<Transaction
<any
>>
Resolves with the new transaction
types/dist/lib/Wallet.d.ts:52