Extends
Constructors
new WebSocketProvider()
Parameters
Returns
WebSocketProvider
Overrides
SocketProvider.constructor
Source
providers/provider-websocket.ts:94Properties
Accessors
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:1193ready
Returns
boolean
True if the provider is ready.
Source
providers/provider-jsonrpc.ts:1117websocket
Throws
If the websocket is closed.Returns
WebSocketLike[]
The array of WebSocketLike objects.
Source
providers/provider-websocket.ts:80Methods
_clearTimeout()
Parameters
Returns
void
Inherited from
SocketProvider._clearTimeout
Source
providers/abstract-provider.ts:2221destroy()
Returns
Promise<void>
A promise that resolves when the WebSocket connections are closed.
Overrides
SocketProvider.destroy
Source
providers/provider-websocket.ts:399getActiveRegions()
Returns
Promise<Shard[]>
A promise that resolves to the active shards.
Inherited from
SocketProvider.getActiveRegions
Source
providers/abstract-provider.ts:1110getActiveZones()
Returns
Promise<Zone[]>
A promise that resolves to the active zones.
Inherited from
SocketProvider.getActiveZones
Source
providers/abstract-provider.ts:1127getLatestQiToQuaiRate()
Parameters
Returns
Promise<bigint>
A promise that resolves to the latest Qi rate.
Inherited from
SocketProvider.getLatestQiToQuaiRate
Source
providers/abstract-provider.ts:1149getLatestQuaiToQiRate()
Parameters
Returns
Promise<bigint>
A promise that resolves to the latest Quai -> Qi rate for the given amount.
Inherited from
SocketProvider.getLatestQuaiToQiRate
Source
providers/abstract-provider.ts:1068getProtocolExpansionNumber()
Returns
Promise<number>
A promise that resolves to the protocol expansion number.
Inherited from
SocketProvider.getProtocolExpansionNumber
Source
providers/abstract-provider.ts:1101getQiToQuaiRateAtBlock()
Parameters
Returns
Promise<bigint>
A promise that resolves to the Qi rate at the specified block.
Inherited from
SocketProvider.getQiToQuaiRateAtBlock
Source
providers/abstract-provider.ts:1162getQuaiToQiRateAtBlock()
Parameters
Returns
Promise<bigint>
A promise that resolves to the Quai rate at the specified block.
Inherited from
SocketProvider.getQuaiToQiRateAtBlock
Source
providers/abstract-provider.ts:1081getSigner()
Parameters
Returns
Promise<JsonRpcSigner>
A promise that resolves to the JsonRpcSigner.
Inherited from
SocketProvider.getSigner
Throws
If the account is invalid.Source
providers/provider-jsonrpc.ts:1542listAccounts()
Returns
Promise<JsonRpcSigner[]>
A promise that resolves to an array of JsonRpcSigners.
Inherited from
SocketProvider.listAccounts
Source
providers/provider-jsonrpc.ts:1579pause()
dropWhilePaused, any events that occur while paused are dropped, otherwise all events
will be emitted once the provider is unpaused.
Parameters
Returns
void
Inherited from
SocketProvider.pause
Source
providers/abstract-provider.ts:2598resume()
Returns
void
Inherited from
SocketProvider.resume
Source
providers/abstract-provider.ts:2627send()
method with params via the JSON-RPC protocol over the underlying channel. This can be used to
call methods on the backend that do not have a high-level API within the Provider API.
This method queues requests according to the batch constraints in the options, assigns the request a unique ID.
Do NOT override this method in sub-classes; instead override JsonRpcApiProvider._send | _send or
force the options values in the call to the constructor to modify this method’s behavior.
Parameters
Returns
Promise<any>
A promise that resolves to the result of the method call.
Inherited from
SocketProvider.send
Source
providers/provider-jsonrpc.ts:1500shardFromHash()
Parameters
Returns
Shard
The shard.
Inherited from
SocketProvider.shardFromHash
Source
providers/abstract-provider.ts:1047waitShardReady()
Parameters
Returns
Promise<void>
A promise that resolves when the shard is ready.
Throws
If the shard is not ready within the timeout period.Source
providers/provider-websocket.ts:166zoneFromAddress()
Parameters
Returns
Promise<Zone>
A promise that resolves to the zone.
Inherited from
SocketProvider.zoneFromAddress
Source
providers/abstract-provider.ts:1036zoneFromHash()
Parameters
Returns
Zone
The zone.
Inherited from
SocketProvider.zoneFromHash
