-
Notifications
You must be signed in to change notification settings - Fork 69
@liquality.evm.<internal>.ChainProvider
@liquality/evm..ChainProvider
▸ getBalance(addresses
, assets
): Promise
<BigNumber
[]>
Get the balance of an account given its addresses.
Name | Type | Description |
---|---|---|
addresses |
AddressType [] |
A list of addresses. |
assets |
Asset [] |
- |
Promise
<BigNumber
[]>
If addresses is given, returns the cumulative balance of the given addresses. Otherwise returns the balance of the addresses that the signing provider controls. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Chain.d.ts:56
▸ getBlockByHash(blockHash
, includeTx?
): Promise
<Block
<any
, any
>>
Get a block given its hash.
Name | Type | Description |
---|---|---|
blockHash |
string |
A hexadecimal string that represents the hash of the desired block. |
includeTx? |
boolean |
- |
Promise
<Block
<any
, any
>>
Resolves with a Block with the same hash as the given input.
If includeTx
is true, the transaction property is an array of Transactions;
otherwise, it is a list of transaction hashes.
Rejects with TypeError if input is invalid.
Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Chain.d.ts:18
▸ getBlockByNumber(blockNumber
, includeTx?
): Promise
<Block
<any
, any
>>
Get a block given its number.
Name | Type | Description |
---|---|---|
blockNumber |
number |
The number of the desired block. |
includeTx? |
boolean |
- |
Promise
<Block
<any
, any
>>
Resolves with a Block with the same number as the given input.
If includeTx
is true, the transaction property is an array of Transactions;
otherwise, it is a list of transaction hashes.
Rejects with TypeError if input is invalid.
Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Chain.d.ts:30
▸ getBlockHeight(): Promise
<number
>
Get current block height of the chain.
Promise
<number
>
Resolves with chain height. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Chain.d.ts:37
▸ getTransactionByHash(txHash
): Promise
<Transaction
<any
>>
Get a transaction given its hash.
Name | Type | Description |
---|---|---|
txHash |
string |
A hexadecimal string that represents the hash of the desired transaction. |
Promise
<Transaction
<any
>>
Resolves with a Transaction with the same hash as the given input. Rejects with TypeError if input is invalid. Rejects with InvalidProviderResponseError if provider's response is invalid.
types/dist/lib/Chain.d.ts:47