-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.near.NearWalletProvider
@liquality/near.NearWalletProvider
-
Wallet
<providers.JsonRpcProvider
,InMemorySigner
>↳
NearWalletProvider
- canUpdateFee
- exportPrivateKey
- getAddress
- getAddresses
- getBalance
- getChainProvider
- getConnectedNetwork
- getSigner
- getUnusedAddress
- getUsedAddresses
- isWalletAvailable
- sendBatchTransaction
- sendSweepTransaction
- sendTransaction
- setChainProvider
- signMessage
- updateTransactionFee
• new NearWalletProvider(walletOptions
, chainProvider
)
Name | Type |
---|---|
walletOptions |
WalletOptions |
chainProvider |
Chain <JsonRpcProvider , Network > |
near/lib/wallet/NearWalletProvider.ts:28
• Protected
chainProvider: Chain
<JsonRpcProvider
, Network
>
client/dist/lib/Wallet.d.ts:4
▸ canUpdateFee(): boolean
boolean
near/lib/wallet/NearWalletProvider.ts:158
▸ 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
>
near/lib/wallet/NearWalletProvider.ts:150
▸ getAddress(): Promise
<Address
>
Promise
<Address
>
near/lib/wallet/NearWalletProvider.ts:44
▸ getAddresses(start?
, numAddresses?
): Promise
<Address
[]>
Get addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
start |
number |
0 |
numAddresses |
number |
1 |
Promise
<Address
[]>
near/lib/wallet/NearWalletProvider.ts:75
▸ getBalance(_assets
): Promise
<BigNumber
[]>
Name | Type |
---|---|
_assets |
Asset [] |
Promise
<BigNumber
[]>
near/lib/wallet/NearWalletProvider.ts:145
▸ getChainProvider(): Chain
<JsonRpcProvider
, Network
>
Chain
<JsonRpcProvider
, Network
>
client/dist/lib/Wallet.d.ts:7
▸ getConnectedNetwork(): Promise
<NearNetwork
>
Retrieve the network connected to by the wallet
Promise
<NearNetwork
>
near/lib/wallet/NearWalletProvider.ts:166
▸ getSigner(): InMemorySigner
InMemorySigner
near/lib/wallet/NearWalletProvider.ts:40
▸ getUnusedAddress(): Promise
<Address
>
Get unused address/account of the user.
Promise
<Address
>
near/lib/wallet/NearWalletProvider.ts:67
▸ getUsedAddresses(numAddresses?
): Promise
<Address
[]>
Get used addresses/accounts of the user.
Name | Type | Default value |
---|---|---|
numAddresses |
number |
1 |
Promise
<Address
[]>
near/lib/wallet/NearWalletProvider.ts:71
▸ isWalletAvailable(): Promise
<boolean
>
Retrieve the availability status of the wallet
Promise
<boolean
>
near/lib/wallet/NearWalletProvider.ts:154
▸ sendBatchTransaction(txRequests
): Promise
<Transaction
<NearTxLog
>[]>
Create, sign & broad a transaction with multiple outputs.
Name | Type |
---|---|
txRequests |
NearTxRequest [] |
Promise
<Transaction
<NearTxLog
>[]>
near/lib/wallet/NearWalletProvider.ts:129
▸ sendSweepTransaction(to
, _asset
): Promise
<Transaction
<NearTxLog
>>
Create, sign & broadcast a sweep transaction.
Name | Type |
---|---|
to |
AddressType |
_asset |
Asset |
Promise
<Transaction
<NearTxLog
>>
near/lib/wallet/NearWalletProvider.ts:138
▸ sendTransaction(txRequest
): Promise
<Transaction
<NearTxLog
>>
Create, sign & broadcast a transaction.
Name | Type |
---|---|
txRequest |
NearTxRequest |
Promise
<Transaction
<NearTxLog
>>
near/lib/wallet/NearWalletProvider.ts:111
▸ setChainProvider(chainProvider
): void
Name | Type |
---|---|
chainProvider |
Chain <JsonRpcProvider , Network > |
void
client/dist/lib/Wallet.d.ts:6
▸ signMessage(message
): Promise
<string
>
Sign a message.
Name | Type |
---|---|
message |
string |
Promise
<string
>
near/lib/wallet/NearWalletProvider.ts:99
▸ updateTransactionFee(_tx
): Promise
<Transaction
<NearTxResponse
>>
Update the fee of a transaction.
Name | Type |
---|---|
_tx |
string | Transaction <any > |
Promise
<Transaction
<NearTxResponse
>>