-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.evm.EvmWalletProvider
@liquality/evm.EvmWalletProvider
-
EvmBaseWalletProvider
<StaticJsonRpcProvider
,EthersWallet
>↳
EvmWalletProvider
- canUpdateFee
- exportPrivateKey
- getAddress
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getSigner
- getUnusedAddress
- getUsedAddresses
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- setChainProvider
- setSigner
- setWalletIndex
- signMessage
- updateTransactionFee
• new EvmWalletProvider(walletOptions
, chainProvider?
)
Name | Type |
---|---|
walletOptions |
WalletOptions |
chainProvider? |
Chain <StaticJsonRpcProvider , Network > |
EvmBaseWalletProvider.constructor
evm/lib/wallet/EvmWalletProvider.ts:12
• Protected
chainProvider: Chain
<StaticJsonRpcProvider
, Network
>
EvmBaseWalletProvider.chainProvider
client/dist/lib/Wallet.d.ts:4
• Protected
signer: Wallet
evm/lib/wallet/EvmBaseWalletProvider.ts:11
▸ canUpdateFee(): boolean
boolean
EvmBaseWalletProvider.canUpdateFee
evm/lib/wallet/EvmWalletProvider.ts:68
▸ 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
Promise
<string
>
EvmBaseWalletProvider.exportPrivateKey
evm/lib/wallet/EvmWalletProvider.ts:60
▸ getAddress(): Promise
<Address
>
Promise
<Address
>
EvmBaseWalletProvider.getAddress
evm/lib/wallet/EvmWalletProvider.ts:24
▸ getAddresses(start?
, numAddresses?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
start |
number |
0 |
numAddresses |
number |
1 |
Promise
<Address
[]>
EvmBaseWalletProvider.getAddresses
evm/lib/wallet/EvmWalletProvider.ts:45
▸ getBalance(assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
assets |
Asset [] |
Promise
<BigNumber
[]>
EvmBaseWalletProvider.getBalance
evm/lib/wallet/EvmBaseWalletProvider.ts:109
▸ getChainProvider(): Chain
<StaticJsonRpcProvider
, Network
>
Chain
<StaticJsonRpcProvider
, Network
>
EvmBaseWalletProvider.getChainProvider
client/dist/lib/Wallet.d.ts:7
▸ getConnectedNetwork(): Promise
<Network
>
Retrieve the network connected to by the wallet
Promise
<Network
>
EvmBaseWalletProvider.getConnectedNetwork
evm/lib/wallet/EvmBaseWalletProvider.ts:114
▸ getSigner(): Wallet
Wallet
EvmBaseWalletProvider.getSigner
evm/lib/wallet/EvmBaseWalletProvider.ts:17
▸ getUnusedAddress(): Promise
<Address
>
Get unused address/account of the user.
Promise
<Address
>
EvmBaseWalletProvider.getUnusedAddress
evm/lib/wallet/EvmWalletProvider.ts:37
▸ getUsedAddresses(numAddresses?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
numAddresses |
number |
1 |
Promise
<Address
[]>
EvmBaseWalletProvider.getUsedAddresses
evm/lib/wallet/EvmWalletProvider.ts:41
▸ isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
EvmBaseWalletProvider.isWalletAvailable
evm/lib/wallet/EvmWalletProvider.ts:64
▸ sendBatchTransaction(txRequests
): Promise
<Transaction
<TransactionResponse
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
txRequests |
EthereumTransactionRequest [] |
Promise
<Transaction
<TransactionResponse
>[]>
EvmBaseWalletProvider.sendBatchTransaction
evm/lib/wallet/EvmBaseWalletProvider.ts:54
▸ sendSweepTransaction(address
, asset
, fee?
): Promise
<Transaction
<any
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
address |
AddressType |
asset |
Asset |
fee? |
FeeType |
Promise
<Transaction
<any
>>
EvmBaseWalletProvider.sendSweepTransaction
evm/lib/wallet/EvmBaseWalletProvider.ts:63
▸ sendTransaction(txRequest
): Promise
<Transaction
<TransactionResponse
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
txRequest |
EthereumTransactionRequest |
Promise
<Transaction
<TransactionResponse
>>
EvmBaseWalletProvider.sendTransaction
evm/lib/wallet/EvmBaseWalletProvider.ts:30
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <StaticJsonRpcProvider , Network > |
void
EvmBaseWalletProvider.setChainProvider
client/dist/lib/Wallet.d.ts:6
▸ setSigner(signer
): void
Name | Type |
---|---|
signer |
Wallet |
void
EvmBaseWalletProvider.setSigner
evm/lib/wallet/EvmBaseWalletProvider.ts:21
▸ setWalletIndex(index
): Promise
<AddressType
>
Name | Type |
---|---|
index |
number |
Promise
<AddressType
>
evm/lib/wallet/EvmWalletProvider.ts:32
▸ signMessage(message
, _from
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
_from |
AddressType |
Promise
<string
>
EvmBaseWalletProvider.signMessage
evm/lib/wallet/EvmBaseWalletProvider.ts:25
▸ updateTransactionFee(tx
, newFee
): Promise
<Transaction
<TransactionResponse
>>
Update the fee of a transaction.
Name | Type |
---|---|
tx |
string | Transaction <TransactionResponse > |
newFee |
FeeType |
Promise
<Transaction
<TransactionResponse
>>