Skip to content

@liquality.terra.TerraWalletProvider

Krasimir Raykov edited this page Mar 30, 2022 · 4 revisions

Class: TerraWalletProvider

@liquality/terra.TerraWalletProvider

Hierarchy

  • Wallet<LCDClient, MnemonicKey>

    TerraWalletProvider

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TerraWalletProvider(chainProvider, options)

Parameters

Name Type
chainProvider TerraChainProvider
options TerraWalletProviderOptions

Overrides

Wallet.constructor

Defined in

terra/lib/wallet/TerraWalletProvider.ts:32

Properties

chainProvider

Protected chainProvider: Chain<LCDClient, Network>

Inherited from

Wallet.chainProvider

Defined in

client/dist/lib/Wallet.d.ts:4


signer

Protected signer: MnemonicKey

Defined in

terra/lib/wallet/TerraWalletProvider.ts:24

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Overrides

Wallet.canUpdateFee

Defined in

terra/lib/wallet/TerraWalletProvider.ts:131


exportPrivateKey

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

Returns

Promise<string>

Overrides

Wallet.exportPrivateKey

Defined in

terra/lib/wallet/TerraWalletProvider.ts:45


getAddress

getAddress(): Promise<AddressType>

Returns

Promise<AddressType>

Overrides

Wallet.getAddress

Defined in

terra/lib/wallet/TerraWalletProvider.ts:54


getAddresses

getAddresses(): Promise<Address[]>

Get addresses/accounts of the user.

Returns

Promise<Address[]>

Overrides

Wallet.getAddresses

Defined in

terra/lib/wallet/TerraWalletProvider.ts:58


getBalance

getBalance(assets): Promise<BigNumber[]>

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Overrides

Wallet.getBalance

Defined in

terra/lib/wallet/TerraWalletProvider.ts:126


getChainProvider

getChainProvider(): Chain<LCDClient, Network>

Returns

Chain<LCDClient, Network>

Inherited from

Wallet.getChainProvider

Defined in

client/dist/lib/Wallet.d.ts:7


getConnectedNetwork

getConnectedNetwork(): Promise<TerraNetwork>

Retrieve the network connected to by the wallet

Returns

Promise<TerraNetwork>

Overrides

Wallet.getConnectedNetwork

Defined in

terra/lib/wallet/TerraWalletProvider.ts:89


getSigner

getSigner(): MnemonicKey

Returns

MnemonicKey

Overrides

Wallet.getSigner

Defined in

terra/lib/wallet/TerraWalletProvider.ts:113


getUnusedAddress

getUnusedAddress(): Promise<Address>

Get unused address/account of the user.

Returns

Promise<Address>

Overrides

Wallet.getUnusedAddress

Defined in

terra/lib/wallet/TerraWalletProvider.ts:79


getUsedAddresses

getUsedAddresses(): Promise<Address[]>

Get used addresses/accounts of the user.

Returns

Promise<Address[]>

Overrides

Wallet.getUsedAddresses

Defined in

terra/lib/wallet/TerraWalletProvider.ts:75


isWalletAvailable

isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Overrides

Wallet.isWalletAvailable

Defined in

terra/lib/wallet/TerraWalletProvider.ts:49


sendBatchTransaction

sendBatchTransaction(_txRequests): Promise<Transaction<any>[]>

Create, sign & broad a transaction with multiple outputs.

Parameters

Name Type
_txRequests TransactionRequest[]

Returns

Promise<Transaction<any>[]>

Overrides

Wallet.sendBatchTransaction

Defined in

terra/lib/wallet/TerraWalletProvider.ts:118


sendSweepTransaction

sendSweepTransaction(address, asset): Promise<Transaction<TerraTxInfo>>

Create, sign & broadcast a sweep transaction.

Parameters

Name Type
address string | Address
asset Asset

Returns

Promise<Transaction<TerraTxInfo>>

Overrides

Wallet.sendSweepTransaction

Defined in

terra/lib/wallet/TerraWalletProvider.ts:107


sendTransaction

sendTransaction(txRequest): Promise<Transaction<TerraTxInfo>>

Create, sign & broadcast a transaction.

Parameters

Name Type
txRequest TerraTxRequest

Returns

Promise<Transaction<TerraTxInfo>>

Overrides

Wallet.sendTransaction

Defined in

terra/lib/wallet/TerraWalletProvider.ts:93


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<LCDClient, Network>

Returns

void

Inherited from

Wallet.setChainProvider

Defined in

client/dist/lib/Wallet.d.ts:6


signMessage

signMessage(message): Promise<string>

Sign a message.

Parameters

Name Type
message string

Returns

Promise<string>

Overrides

Wallet.signMessage

Defined in

terra/lib/wallet/TerraWalletProvider.ts:84


updateTransactionFee

updateTransactionFee(_tx, _newFee): Promise<Transaction<any>>

Update the fee of a transaction.

Parameters

Name Type
_tx string | Transaction<any>
_newFee FeeType

Returns

Promise<Transaction<any>>

Overrides

Wallet.updateTransactionFee

Defined in

terra/lib/wallet/TerraWalletProvider.ts:122

Clone this wiki locally