-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.client.Wallet
@liquality/client.Wallet
Name |
---|
T |
S |
- canUpdateFee
- exportPrivateKey
- getAddress
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getSigner
- getUnusedAddress
- getUsedAddresses
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- setChainProvider
- signMessage
- updateTransactionFee
• new Wallet<T
, S
>(chainProvider?
)
Name |
---|
T |
S |
Name | Type |
---|---|
chainProvider? |
Chain <T , Network > |
• Protected
chainProvider: Chain
<T
, Network
>
▸ Abstract
canUpdateFee(): boolean
boolean
WalletProvider.canUpdateFee
▸ 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
>
WalletProvider.exportPrivateKey
▸ Abstract
getAddress(): Promise
<AddressType
>
Promise
<AddressType
>
▸ Abstract
getAddresses(start?
, numAddresses?
, change?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type |
---|---|
start? |
number |
numAddresses? |
number |
change? |
boolean |
Promise
<Address
[]>
▸ Abstract
getBalance(assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
assets |
Asset [] |
Promise
<BigNumber
[]>
▸ getChainProvider(): Chain
<T
, Network
>
▸ Abstract
getConnectedNetwork(): Promise
<Network
>
Retrieve the network connected to by the wallet
Promise
<Network
>
WalletProvider.getConnectedNetwork
▸ Abstract
getSigner(): S
S
▸ Abstract
getUnusedAddress(change?
, numAddressPerCall?
): Promise
<Address
>
Get unused address/account of the user.
Name | Type |
---|---|
change? |
boolean |
numAddressPerCall? |
number |
Promise
<Address
>
WalletProvider.getUnusedAddress
▸ Abstract
getUsedAddresses(numAddressPerCall?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type |
---|---|
numAddressPerCall? |
number |
Promise
<Address
[]>
WalletProvider.getUsedAddresses
▸ Abstract
isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
WalletProvider.isWalletAvailable
▸ Abstract
sendBatchTransaction(txRequests
): Promise
<Transaction
<any
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
txRequests |
TransactionRequest [] |
Promise
<Transaction
<any
>[]>
WalletProvider.sendBatchTransaction
▸ Abstract
sendSweepTransaction(address
, asset
, fee?
): Promise
<Transaction
<any
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
address |
AddressType |
asset |
Asset |
fee? |
FeeType |
Promise
<Transaction
<any
>>
WalletProvider.sendSweepTransaction
▸ Abstract
sendTransaction(txRequest
): Promise
<Transaction
<any
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
txRequest |
TransactionRequest |
Promise
<Transaction
<any
>>
WalletProvider.sendTransaction
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <T , Network > |
void
▸ Abstract
signMessage(message
, from
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
from |
AddressType |
Promise
<string
>
▸ Abstract
updateTransactionFee(tx
, newFee
): Promise
<Transaction
<any
>>
Update the fee of a transaction.
Name | Type |
---|---|
tx |
string | Transaction <any > |
newFee |
FeeType |
Promise
<Transaction
<any
>>