Skip to content

@liquality.near.NearWalletProvider

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

Class: NearWalletProvider

@liquality/near.NearWalletProvider

Hierarchy

  • Wallet<providers.JsonRpcProvider, InMemorySigner>

    NearWalletProvider

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NearWalletProvider(walletOptions, chainProvider)

Parameters

Name Type
walletOptions WalletOptions
chainProvider Chain<JsonRpcProvider, Network>

Overrides

Wallet.constructor

Defined in

near/lib/wallet/NearWalletProvider.ts:28

Properties

chainProvider

Protected chainProvider: Chain<JsonRpcProvider, Network>

Inherited from

Wallet.chainProvider

Defined in

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

Methods

canUpdateFee

canUpdateFee(): boolean

Returns

boolean

Overrides

Wallet.canUpdateFee

Defined in

near/lib/wallet/NearWalletProvider.ts:158


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

Wallet.exportPrivateKey

Defined in

near/lib/wallet/NearWalletProvider.ts:150


getAddress

getAddress(): Promise<Address>

Returns

Promise<Address>

Overrides

Wallet.getAddress

Defined in

near/lib/wallet/NearWalletProvider.ts:44


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

Wallet.getAddresses

Defined in

near/lib/wallet/NearWalletProvider.ts:75


getBalance

getBalance(_assets): Promise<BigNumber[]>

Parameters

Name Type
_assets Asset[]

Returns

Promise<BigNumber[]>

Overrides

Wallet.getBalance

Defined in

near/lib/wallet/NearWalletProvider.ts:145


getChainProvider

getChainProvider(): Chain<JsonRpcProvider, Network>

Returns

Chain<JsonRpcProvider, Network>

Inherited from

Wallet.getChainProvider

Defined in

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


getConnectedNetwork

getConnectedNetwork(): Promise<NearNetwork>

Retrieve the network connected to by the wallet

Returns

Promise<NearNetwork>

Overrides

Wallet.getConnectedNetwork

Defined in

near/lib/wallet/NearWalletProvider.ts:166


getSigner

getSigner(): InMemorySigner

Returns

InMemorySigner

Overrides

Wallet.getSigner

Defined in

near/lib/wallet/NearWalletProvider.ts:40


getUnusedAddress

getUnusedAddress(): Promise<Address>

Get unused address/account of the user.

Returns

Promise<Address>

Overrides

Wallet.getUnusedAddress

Defined in

near/lib/wallet/NearWalletProvider.ts:67


getUsedAddresses

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

Get used addresses/accounts of the user.

Parameters

Name Type Default value
numAddresses number 1

Returns

Promise<Address[]>

Overrides

Wallet.getUsedAddresses

Defined in

near/lib/wallet/NearWalletProvider.ts:71


isWalletAvailable

isWalletAvailable(): Promise<boolean>

Retrieve the availability status of the wallet

Returns

Promise<boolean>

Overrides

Wallet.isWalletAvailable

Defined in

near/lib/wallet/NearWalletProvider.ts:154


sendBatchTransaction

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

Create, sign & broad a transaction with multiple outputs.

Parameters

Name Type
txRequests NearTxRequest[]

Returns

Promise<Transaction<NearTxLog>[]>

Overrides

Wallet.sendBatchTransaction

Defined in

near/lib/wallet/NearWalletProvider.ts:129


sendSweepTransaction

sendSweepTransaction(to, _asset): Promise<Transaction<NearTxLog>>

Create, sign & broadcast a sweep transaction.

Parameters

Name Type
to AddressType
_asset Asset

Returns

Promise<Transaction<NearTxLog>>

Overrides

Wallet.sendSweepTransaction

Defined in

near/lib/wallet/NearWalletProvider.ts:138


sendTransaction

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

Create, sign & broadcast a transaction.

Parameters

Name Type
txRequest NearTxRequest

Returns

Promise<Transaction<NearTxLog>>

Overrides

Wallet.sendTransaction

Defined in

near/lib/wallet/NearWalletProvider.ts:111


setChainProvider

setChainProvider(chainProvider): void

Parameters

Name Type
chainProvider Chain<JsonRpcProvider, Network>

Returns

void

Inherited from

Wallet.setChainProvider

Defined in

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


signMessage

signMessage(message): Promise<string>

Sign a message.

Parameters

Name Type
message string

Returns

Promise<string>

Overrides

Wallet.signMessage

Defined in

near/lib/wallet/NearWalletProvider.ts:99


updateTransactionFee

updateTransactionFee(_tx): Promise<Transaction<NearTxResponse>>

Update the fee of a transaction.

Parameters

Name Type
_tx string | Transaction<any>

Returns

Promise<Transaction<NearTxResponse>>

Overrides

Wallet.updateTransactionFee

Defined in

near/lib/wallet/NearWalletProvider.ts:162

Clone this wiki locally