Skip to content

@liquality.client.Wallet

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

Class: Wallet<T, S>

@liquality/client.Wallet

Type parameters

Name
T
S

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Wallet<T, S>(chainProvider?)

Type parameters

Name
T
S

Parameters

Name Type
chainProvider? Chain<T, Network>

Defined in

client/lib/Wallet.ts:17

Properties

chainProvider

Protected chainProvider: Chain<T, Network>

Defined in

client/lib/Wallet.ts:15

Methods

canUpdateFee

Abstract canUpdateFee(): boolean

Returns

boolean

Implementation of

WalletProvider.canUpdateFee

Defined in

client/lib/Wallet.ts:57


exportPrivateKey

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

Returns

Promise<string>

Implementation of

WalletProvider.exportPrivateKey

Defined in

client/lib/Wallet.ts:53


getAddress

Abstract getAddress(): Promise<AddressType>

Returns

Promise<AddressType>

Defined in

client/lib/Wallet.ts:33


getAddresses

Abstract getAddresses(start?, numAddresses?, change?): Promise<Address[]>

Get addresses/accounts of the user.

Parameters

Name Type
start? number
numAddresses? number
change? boolean

Returns

Promise<Address[]>

Implementation of

WalletProvider.getAddresses

Defined in

client/lib/Wallet.ts:39


getBalance

Abstract getBalance(assets): Promise<BigNumber[]>

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Defined in

client/lib/Wallet.ts:51


getChainProvider

getChainProvider(): Chain<T, Network>

Returns

Chain<T, Network>

Defined in

client/lib/Wallet.ts:25


getConnectedNetwork

Abstract getConnectedNetwork(): Promise<Network>

Retrieve the network connected to by the wallet

Returns

Promise<Network>

Implementation of

WalletProvider.getConnectedNetwork

Defined in

client/lib/Wallet.ts:29


getSigner

Abstract getSigner(): S

Returns

S

Defined in

client/lib/Wallet.ts:31


getUnusedAddress

Abstract getUnusedAddress(change?, numAddressPerCall?): Promise<Address>

Get unused address/account of the user.

Parameters

Name Type
change? boolean
numAddressPerCall? number

Returns

Promise<Address>

Implementation of

WalletProvider.getUnusedAddress

Defined in

client/lib/Wallet.ts:35


getUsedAddresses

Abstract getUsedAddresses(numAddressPerCall?): Promise<Address[]>

Get used addresses/accounts of the user.

Parameters

Name Type
numAddressPerCall? number

Returns

Promise<Address[]>

Implementation of

WalletProvider.getUsedAddresses

Defined in

client/lib/Wallet.ts:37


isWalletAvailable

Abstract isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Implementation of

WalletProvider.isWalletAvailable

Defined in

client/lib/Wallet.ts:55


sendBatchTransaction

Abstract sendBatchTransaction(txRequests): Promise<Transaction<any>[]>

Create, sign & broad a transaction with multiple outputs.

Parameters

Name Type
txRequests TransactionRequest[]

Returns

Promise<Transaction<any>[]>

Implementation of

WalletProvider.sendBatchTransaction

Defined in

client/lib/Wallet.ts:45


sendSweepTransaction

Abstract sendSweepTransaction(address, asset, fee?): Promise<Transaction<any>>

Create, sign & broadcast a sweep transaction.

Parameters

Name Type
address AddressType
asset Asset
fee? FeeType

Returns

Promise<Transaction<any>>

Implementation of

WalletProvider.sendSweepTransaction

Defined in

client/lib/Wallet.ts:47


sendTransaction

Abstract sendTransaction(txRequest): Promise<Transaction<any>>

Create, sign & broadcast a transaction.

Parameters

Name Type
txRequest TransactionRequest

Returns

Promise<Transaction<any>>

Implementation of

WalletProvider.sendTransaction

Defined in

client/lib/Wallet.ts:43


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<T, Network>

Returns

void

Defined in

client/lib/Wallet.ts:21


signMessage

Abstract signMessage(message, from): Promise<string>

Sign a message.

Parameters

Name Type
message string
from AddressType

Returns

Promise<string>

Implementation of

WalletProvider.signMessage

Defined in

client/lib/Wallet.ts:41


updateTransactionFee

Abstract 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>>

Implementation of

WalletProvider.updateTransactionFee

Defined in

client/lib/Wallet.ts:49

Clone this wiki locally