Skip to content

@liquality.near.<internal>.Wallet

Krasimir Raykov edited this page Mar 30, 2022 · 1 revision

Class: Wallet<T, S>

@liquality/near..Wallet

Type parameters

Name
T
S

Hierarchy

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/dist/lib/Wallet.d.ts:5

Properties

chainProvider

Protected chainProvider: Chain<T, Network>

Defined in

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

Methods

canUpdateFee

Abstract canUpdateFee(): boolean

Returns

boolean

Implementation of

WalletProvider.canUpdateFee

Defined in

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


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/dist/lib/Wallet.d.ts:20


getAddress

Abstract getAddress(): Promise<AddressType>

Returns

Promise<AddressType>

Defined in

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


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/dist/lib/Wallet.d.ts:13


getBalance

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

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Defined in

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


getChainProvider

getChainProvider(): Chain<T, Network>

Returns

Chain<T, Network>

Defined in

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


getConnectedNetwork

Abstract getConnectedNetwork(): Promise<Network>

Retrieve the network connected to by the wallet

Returns

Promise<Network>

Implementation of

WalletProvider.getConnectedNetwork

Defined in

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


getSigner

Abstract getSigner(): S

Returns

S

Defined in

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


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/dist/lib/Wallet.d.ts:11


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/dist/lib/Wallet.d.ts:12


isWalletAvailable

Abstract isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Implementation of

WalletProvider.isWalletAvailable

Defined in

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


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/dist/lib/Wallet.d.ts:16


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/dist/lib/Wallet.d.ts:17


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/dist/lib/Wallet.d.ts:15


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<T, Network>

Returns

void

Defined in

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


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/dist/lib/Wallet.d.ts:14


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/dist/lib/Wallet.d.ts:18

Clone this wiki locally