Skip to content

@liquality.near.NearChainProvider

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

Class: NearChainProvider

@liquality/near.NearChainProvider

Hierarchy

  • Chain<providers.JsonRpcProvider>

    NearChainProvider

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NearChainProvider(network, provider?)

Parameters

Name Type
network NearNetwork
provider? JsonRpcProvider

Overrides

Chain.constructor

Defined in

near/lib/chain/NearChainProvider.ts:8

Properties

feeProvider

Protected feeProvider: Fee

Inherited from

Chain.feeProvider

Defined in

client/dist/lib/Chain.d.ts:11


network

Protected network: Network

Inherited from

Chain.network

Defined in

client/dist/lib/Chain.d.ts:12


provider

Protected provider: JsonRpcProvider

Inherited from

Chain.provider

Defined in

client/dist/lib/Chain.d.ts:13

Methods

_getBlockById

_getBlockById(blockId, includeTx): Promise<Block<BlockResult, any>>

Parameters

Name Type
blockId string | number
includeTx boolean

Returns

Promise<Block<BlockResult, any>>

Defined in

near/lib/chain/NearChainProvider.ts:73


getBalance

getBalance(addresses, _assets): Promise<BigNumber[]>

Parameters

Name Type
addresses AddressType[]
_assets Asset[]

Returns

Promise<BigNumber[]>

Overrides

Chain.getBalance

Defined in

near/lib/chain/NearChainProvider.ts:41


getBlockByHash

getBlockByHash(blockHash, includeTx?): Promise<Block<BlockResult, Transaction<any>>>

Parameters

Name Type
blockHash string
includeTx? boolean

Returns

Promise<Block<BlockResult, Transaction<any>>>

Overrides

Chain.getBlockByHash

Defined in

near/lib/chain/NearChainProvider.ts:16


getBlockByNumber

getBlockByNumber(blockNumber?, includeTx?): Promise<Block<BlockResult, Transaction<any>>>

Parameters

Name Type
blockNumber? number
includeTx? boolean

Returns

Promise<Block<BlockResult, Transaction<any>>>

Overrides

Chain.getBlockByNumber

Defined in

near/lib/chain/NearChainProvider.ts:20


getBlockHeight

getBlockHeight(): Promise<number>

Returns

Promise<number>

Overrides

Chain.getBlockHeight

Defined in

near/lib/chain/NearChainProvider.ts:27


getFeeProvider

getFeeProvider(): Promise<Fee>

Gets the fee provider

Returns

Promise<Fee>

Inherited from

Chain.getFeeProvider

Defined in

client/dist/lib/Chain.d.ts:38


getFees

getFees(): Promise<FeeDetails>

Returns

Promise<FeeDetails>

The fee details - FeeDetails

Overrides

Chain.getFees

Defined in

near/lib/chain/NearChainProvider.ts:59


getNetwork

getNetwork(): Network

Gets the connected network

Returns

Network

Inherited from

Chain.getNetwork

Defined in

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


getProvider

getProvider(): JsonRpcProvider

Gets the chain specific provider

Returns

JsonRpcProvider

Inherited from

Chain.getProvider

Defined in

client/dist/lib/Chain.d.ts:26


getTransactionByHash

getTransactionByHash(txHash): Promise<Transaction<NearTxLog>>

Parameters

Name Type
txHash string

Returns

Promise<Transaction<NearTxLog>>

Overrides

Chain.getTransactionByHash

Defined in

near/lib/chain/NearChainProvider.ts:32


sendRawTransaction

sendRawTransaction(rawTransaction): Promise<string>

Parameters

Name Type
rawTransaction string

Returns

Promise<string>

the transaction hash

Overrides

Chain.sendRawTransaction

Defined in

near/lib/chain/NearChainProvider.ts:65


sendRpcRequest

sendRpcRequest(method, params): Promise<any>

Parameters

Name Type
method string
params any[]

Returns

Promise<any>

Overrides

Chain.sendRpcRequest

Defined in

near/lib/chain/NearChainProvider.ts:69


setFeeProvider

setFeeProvider(feeProvider): Promise<void>

Sets the fee provider

Parameters

Name Type
feeProvider Fee

Returns

Promise<void>

Inherited from

Chain.setFeeProvider

Defined in

client/dist/lib/Chain.d.ts:34


setNetwork

setNetwork(network): void

Sets the network

Parameters

Name Type
network Network

Returns

void

Inherited from

Chain.setNetwork

Defined in

client/dist/lib/Chain.d.ts:18


setProvider

setProvider(provider): Promise<void>

Sets the chain specific provider

Parameters

Name Type
provider JsonRpcProvider

Returns

Promise<void>

Inherited from

Chain.setProvider

Defined in

client/dist/lib/Chain.d.ts:30

Clone this wiki locally