Skip to content

@liquality.evm.EvmWalletProvider

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

Class: EvmWalletProvider

@liquality/evm.EvmWalletProvider

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new EvmWalletProvider(walletOptions, chainProvider?)

Parameters

Name Type
walletOptions WalletOptions
chainProvider? Chain<StaticJsonRpcProvider, Network>

Overrides

EvmBaseWalletProvider.constructor

Defined in

evm/lib/wallet/EvmWalletProvider.ts:12

Properties

chainProvider

Protected chainProvider: Chain<StaticJsonRpcProvider, Network>

Inherited from

EvmBaseWalletProvider.chainProvider

Defined in

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


signer

Protected signer: Wallet

Inherited from

EvmBaseWalletProvider.signer

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:11

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Overrides

EvmBaseWalletProvider.canUpdateFee

Defined in

evm/lib/wallet/EvmWalletProvider.ts:68


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

EvmBaseWalletProvider.exportPrivateKey

Defined in

evm/lib/wallet/EvmWalletProvider.ts:60


getAddress

getAddress(): Promise<Address>

Returns

Promise<Address>

Overrides

EvmBaseWalletProvider.getAddress

Defined in

evm/lib/wallet/EvmWalletProvider.ts:24


getAddresses

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

Get addresses/accounts of the user.

Parameters

Name Type Default value
start number 0
numAddresses number 1

Returns

Promise<Address[]>

Overrides

EvmBaseWalletProvider.getAddresses

Defined in

evm/lib/wallet/EvmWalletProvider.ts:45


getBalance

getBalance(assets): Promise<BigNumber[]>

Parameters

Name Type
assets Asset[]

Returns

Promise<BigNumber[]>

Inherited from

EvmBaseWalletProvider.getBalance

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:109


getChainProvider

getChainProvider(): Chain<StaticJsonRpcProvider, Network>

Returns

Chain<StaticJsonRpcProvider, Network>

Inherited from

EvmBaseWalletProvider.getChainProvider

Defined in

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


getConnectedNetwork

getConnectedNetwork(): Promise<Network>

Retrieve the network connected to by the wallet

Returns

Promise<Network>

Inherited from

EvmBaseWalletProvider.getConnectedNetwork

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:114


getSigner

getSigner(): Wallet

Returns

Wallet

Inherited from

EvmBaseWalletProvider.getSigner

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:17


getUnusedAddress

getUnusedAddress(): Promise<Address>

Get unused address/account of the user.

Returns

Promise<Address>

Overrides

EvmBaseWalletProvider.getUnusedAddress

Defined in

evm/lib/wallet/EvmWalletProvider.ts:37


getUsedAddresses

getUsedAddresses(numAddresses?): Promise<Address[]>

Get used addresses/accounts of the user.

Parameters

Name Type Default value
numAddresses number 1

Returns

Promise<Address[]>

Overrides

EvmBaseWalletProvider.getUsedAddresses

Defined in

evm/lib/wallet/EvmWalletProvider.ts:41


isWalletAvailable

isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Overrides

EvmBaseWalletProvider.isWalletAvailable

Defined in

evm/lib/wallet/EvmWalletProvider.ts:64


sendBatchTransaction

sendBatchTransaction(txRequests): Promise<Transaction<TransactionResponse>[]>

Create, sign & broad a transaction with multiple outputs.

Parameters

Name Type
txRequests EthereumTransactionRequest[]

Returns

Promise<Transaction<TransactionResponse>[]>

Inherited from

EvmBaseWalletProvider.sendBatchTransaction

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:54


sendSweepTransaction

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

Inherited from

EvmBaseWalletProvider.sendSweepTransaction

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:63


sendTransaction

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

Create, sign & broadcast a transaction.

Parameters

Name Type
txRequest EthereumTransactionRequest

Returns

Promise<Transaction<TransactionResponse>>

Inherited from

EvmBaseWalletProvider.sendTransaction

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:30


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<StaticJsonRpcProvider, Network>

Returns

void

Inherited from

EvmBaseWalletProvider.setChainProvider

Defined in

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


setSigner

setSigner(signer): void

Parameters

Name Type
signer Wallet

Returns

void

Inherited from

EvmBaseWalletProvider.setSigner

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:21


setWalletIndex

setWalletIndex(index): Promise<AddressType>

Parameters

Name Type
index number

Returns

Promise<AddressType>

Defined in

evm/lib/wallet/EvmWalletProvider.ts:32


signMessage

signMessage(message, _from): Promise<string>

Sign a message.

Parameters

Name Type
message string
_from AddressType

Returns

Promise<string>

Inherited from

EvmBaseWalletProvider.signMessage

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:25


updateTransactionFee

updateTransactionFee(tx, newFee): Promise<Transaction<TransactionResponse>>

Update the fee of a transaction.

Parameters

Name Type
tx string | Transaction<TransactionResponse>
newFee FeeType

Returns

Promise<Transaction<TransactionResponse>>

Inherited from

EvmBaseWalletProvider.updateTransactionFee

Defined in

evm/lib/wallet/EvmBaseWalletProvider.ts:69

Clone this wiki locally