-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.terra.TerraWalletProvider
@liquality/terra.TerraWalletProvider
-
Wallet
<LCDClient
,MnemonicKey
>↳
TerraWalletProvider
- canUpdateFee
- exportPrivateKey
- getAddress
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getSigner
- getUnusedAddress
- getUsedAddresses
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- setChainProvider
- signMessage
- updateTransactionFee
• new TerraWalletProvider(chainProvider
, options
)
Name | Type |
---|---|
chainProvider |
TerraChainProvider |
options |
TerraWalletProviderOptions |
terra/lib/wallet/TerraWalletProvider.ts:32
• Protected
chainProvider: Chain
<LCDClient
, Network
>
client/dist/lib/Wallet.d.ts:4
• Protected
signer: MnemonicKey
terra/lib/wallet/TerraWalletProvider.ts:24
▸ canUpdateFee(): boolean
boolean
terra/lib/wallet/TerraWalletProvider.ts:131
▸ 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
>
terra/lib/wallet/TerraWalletProvider.ts:45
▸ getAddress(): Promise
<AddressType
>
Promise
<AddressType
>
terra/lib/wallet/TerraWalletProvider.ts:54
▸ getAddresses(): Promise
<Address
[]>
Get addresses/accounts of the user.
Promise
<Address
[]>
terra/lib/wallet/TerraWalletProvider.ts:58
▸ getBalance(assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
assets |
Asset [] |
Promise
<BigNumber
[]>
terra/lib/wallet/TerraWalletProvider.ts:126
▸ getChainProvider(): Chain
<LCDClient
, Network
>
client/dist/lib/Wallet.d.ts:7
▸ getConnectedNetwork(): Promise
<TerraNetwork
>
Retrieve the network connected to by the wallet
Promise
<TerraNetwork
>
terra/lib/wallet/TerraWalletProvider.ts:89
▸ getSigner(): MnemonicKey
MnemonicKey
terra/lib/wallet/TerraWalletProvider.ts:113
▸ getUnusedAddress(): Promise
<Address
>
Get unused address/account of the user.
Promise
<Address
>
terra/lib/wallet/TerraWalletProvider.ts:79
▸ getUsedAddresses(): Promise
<Address
[]>
Get used addresses/accounts of the user.
Promise
<Address
[]>
terra/lib/wallet/TerraWalletProvider.ts:75
▸ isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
terra/lib/wallet/TerraWalletProvider.ts:49
▸ sendBatchTransaction(_txRequests
): Promise
<Transaction
<any
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
_txRequests |
TransactionRequest [] |
Promise
<Transaction
<any
>[]>
terra/lib/wallet/TerraWalletProvider.ts:118
▸ sendSweepTransaction(address
, asset
): Promise
<Transaction
<TerraTxInfo
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
address |
string | Address
|
asset |
Asset |
Promise
<Transaction
<TerraTxInfo
>>
terra/lib/wallet/TerraWalletProvider.ts:107
▸ sendTransaction(txRequest
): Promise
<Transaction
<TerraTxInfo
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
txRequest |
TerraTxRequest |
Promise
<Transaction
<TerraTxInfo
>>
terra/lib/wallet/TerraWalletProvider.ts:93
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <LCDClient , Network > |
void
client/dist/lib/Wallet.d.ts:6
▸ signMessage(message
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
Promise
<string
>
terra/lib/wallet/TerraWalletProvider.ts:84
▸ updateTransactionFee(_tx
, _newFee
): Promise
<Transaction
<any
>>
Update the fee of a transaction.
Name | Type |
---|---|
_tx |
string | Transaction <any > |
_newFee |
FeeType |
Promise
<Transaction
<any
>>