Skip to content

@liquality.terra.TerraWalletProvider

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

Class: TerraWalletProvider

@liquality/terra.TerraWalletProvider

Hierarchy

  • default<LCDClient, MnemonicKey>

    TerraWalletProvider

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TerraWalletProvider(chainProvider, options)

Parameters

Name Type
chainProvider TerraChainProvider
options TerraWalletProviderOptions

Overrides

default.constructor

Defined in

terra/lib/wallet/TerraWalletProvider.ts:32

Properties

chainProvider

Protected chainProvider: default<LCDClient, Network>

Inherited from

default.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

default.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

default.exportPrivateKey

Defined in

terra/lib/wallet/TerraWalletProvider.ts:45


getAddress

getAddress(): Promise<AddressType>

Returns

Promise<AddressType>

Overrides

default.getAddress

Defined in

terra/lib/wallet/TerraWalletProvider.ts:54


getAddresses

getAddresses(): Promise<Address[]>

Get addresses/accounts of the user.

Returns

Promise<Address[]>

Overrides

default.getAddresses

Defined in

terra/lib/wallet/TerraWalletProvider.ts:58


getBalance

getBalance(assets): Promise<BigNumber[]>

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Overrides

default.getBalance

Defined in

terra/lib/wallet/TerraWalletProvider.ts:126


getChainProvider

getChainProvider(): default<LCDClient, Network>

Returns

default<LCDClient, Network>

Inherited from

default.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

default.getConnectedNetwork

Defined in

terra/lib/wallet/TerraWalletProvider.ts:89


getSigner

getSigner(): MnemonicKey

Returns

MnemonicKey

Overrides

default.getSigner

Defined in

terra/lib/wallet/TerraWalletProvider.ts:113


getUnusedAddress

getUnusedAddress(): Promise<Address>

Get unused address/account of the user.

Returns

Promise<Address>

Overrides

default.getUnusedAddress

Defined in

terra/lib/wallet/TerraWalletProvider.ts:79


getUsedAddresses

getUsedAddresses(): Promise<Address[]>

Get used addresses/accounts of the user.

Returns

Promise<Address[]>

Overrides

default.getUsedAddresses

Defined in

terra/lib/wallet/TerraWalletProvider.ts:75


isWalletAvailable

isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Overrides

default.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

default.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

default.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

default.sendTransaction

Defined in

terra/lib/wallet/TerraWalletProvider.ts:93


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider default<LCDClient, Network>

Returns

void

Inherited from

default.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

default.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

default.updateTransactionFee

Defined in

terra/lib/wallet/TerraWalletProvider.ts:122

Clone this wiki locally