Extended by
Type parameters
Type parameter | Value |
---|---|
C | FetchRequest |
Implements
Constructors
new AbstractProvider()
network
, or use the various network detection capabilities to
discover the Network if necessary.
Parameters
Parameter | Type | Description |
---|---|---|
_network ? | Networkish | The network to connect to, or "any" to |
options ? | AbstractProviderOptions | The options to configure the provider. |
Returns
AbstractProvider
<C
>
Source
providers/abstract-provider.ts:826Accessors
connect
Returns
FetchRequest
[]
The list of connected FetchRequests.
Source
providers/abstract-provider.ts:1026destroyed
Returns
boolean
Source
providers/abstract-provider.ts:2545paused
paused = true
is identical to calling .pause(false)
, which will buffer any events that occur while
paused until the provider is unpaused.
Returns
boolean
Whether the provider is paused.
Source
providers/abstract-provider.ts:2577pollingInterval
Returns
number
The polling interval.
Source
providers/abstract-provider.ts:1183provider
this
, to allow an AbstractProvider to implement the Contract Runner
interface.
Returns
this
The provider instance.
Source
providers/abstract-provider.ts:1193Methods
_clearTimeout()
Parameters
Parameter | Type | Description |
---|---|---|
timerId | number | The ID of the timer to clear. |
Returns
void
Source
providers/abstract-provider.ts:2221destroy()
super.destroy()
.
Returns
void
Implementation of
Provider
.destroy
Source
providers/abstract-provider.ts:2554getActiveRegions()
Returns
Promise
<Shard
[]>
A promise that resolves to the active shards.
Source
providers/abstract-provider.ts:1110getActiveZones()
Returns
Promise
<Zone
[]>
A promise that resolves to the active zones.
Source
providers/abstract-provider.ts:1127getLatestQiToQuaiRate()
Parameters
Parameter | Type | Description |
---|---|---|
zone | Zone | The zone to get the rate for. |
amt ? | bigint | The amount to get the rate for. Default is 1 |
Returns
Promise
<bigint
>
A promise that resolves to the latest Qi rate.
Implementation of
Provider
.getLatestQiToQuaiRate
Source
providers/abstract-provider.ts:1149getLatestQuaiToQiRate()
Parameters
Parameter | Type | Description |
---|---|---|
zone | Zone | The zone to get the rate for. |
amt ? | bigint | The amount in quais to get the rate for. Default is 1 |
Returns
Promise
<bigint
>
A promise that resolves to the latest Quai -> Qi rate for the given amount.
Implementation of
Provider
.getLatestQuaiToQiRate
Source
providers/abstract-provider.ts:1068getProtocolExpansionNumber()
Returns
Promise
<number
>
A promise that resolves to the protocol expansion number.
Implementation of
Provider
.getProtocolExpansionNumber
Source
providers/abstract-provider.ts:1101getQiToQuaiRateAtBlock()
Parameters
Parameter | Type | Description |
---|---|---|
zone | Zone | The zone to get the rate for. |
blockTag | BlockTag | The block tag to get the rate at. |
amt ? | bigint | The amount to get the rate for. Default is 1 |
Returns
Promise
<bigint
>
A promise that resolves to the Qi rate at the specified block.
Implementation of
Provider
.getQiToQuaiRateAtBlock
Source
providers/abstract-provider.ts:1162getQuaiToQiRateAtBlock()
Parameters
Parameter | Type | Description |
---|---|---|
zone | Zone | The zone to get the rate for. |
blockTag | BlockTag | The block tag to get the rate at. |
amt ? | bigint | The amount to get the rate for. Default is 1 |
Returns
Promise
<bigint
>
A promise that resolves to the Quai rate at the specified block.
Implementation of
Provider
.getQuaiToQiRateAtBlock
Source
providers/abstract-provider.ts:1081initialize()
Type parameters
Type parameter | Value |
---|---|
U | string [] | FetchRequest |
Parameters
Parameter | Type | Description |
---|---|---|
urls | U | The URLs to initialize the map with. |
Returns
Promise
<void
>
A promise that resolves when the map is initialized.
Source
providers/abstract-provider.ts:874pause()
dropWhilePaused
, any events that occur while paused are dropped, otherwise all events
will be emitted once the provider is unpaused.
Parameters
Parameter | Type | Description |
---|---|---|
dropWhilePaused ? | boolean | Whether to drop events while paused. |
Returns
void
Source
providers/abstract-provider.ts:2598resume()
Returns
void
Source
providers/abstract-provider.ts:2627shardFromHash()
Parameters
Parameter | Type | Description |
---|---|---|
hash | string | The hash to get the shard from. |
Returns
Shard
The shard.
Source
providers/abstract-provider.ts:1047zoneFromAddress()
Parameters
Parameter | Type | Description |
---|---|---|
_address | AddressLike | The address to get the zone from. |
Returns
Promise
<Zone
>
A promise that resolves to the zone.
Source
providers/abstract-provider.ts:1036zoneFromHash()
Parameters
Parameter | Type | Description |
---|---|---|
hash | string | The hash to get the zone from. |
Returns
Zone
The zone.