```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# AbstractSigner
Source: https://docs.qu.ai/sdk/content/classes/AbstractSigner
An **AbstractSigner** includes most of teh functionality required to get a [**Signer**](/sdk/content/interfaces/Signer) working as
expected, but requires a few Signer-specific methods be overridden.
## Extended by
* [`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)
* [`VoidSigner`](/sdk/content/classes/VoidSigner)
## Type parameters
| Type parameter | Value |
| :--------------------------------------------------------------------- | :------------------------------------------------------- |
| `P` *extends* `null` \| [`Provider`](/sdk/content/interfaces/Provider) | `null` \| [`Provider`](/sdk/content/interfaces/Provider) |
## Implements
* [`Signer`](/sdk/content/interfaces/Signer)
## Constructors
### new AbstractSigner()
```ts theme={null}
new AbstractSigner(provider?): AbstractSigner
```
Creates a new Signer connected to `provider`.
#### Parameters
| Parameter | Type |
| :---------- | :--- |
| `provider`? | `P` |
#### Returns
[`AbstractSigner`](/sdk/content/classes/AbstractSigner)\<`P`>
#### Source
[signers/abstract-signer.ts:63](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/signers/abstract-signer.ts#L63)
## Properties
| Property | Modifier | Type | Description |
| :--------- | :--------- | :--- | :---------------------------------------- |
| `provider` | `readonly` | `P` | The provider this signer is connected to. |
## Methods
### connect()
```ts theme={null}
abstract connect(provider): Signer
```
Returns the signer connected to `provider`.
This may throw, for example, a Signer connected over a Socket or to a specific instance of a node may not be
transferrable.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------------------------------------- | :-------------------------- |
| `provider` | `null` \| [`Provider`](/sdk/content/interfaces/Provider) | The provider to connect to. |
#### Returns
[`Signer`](/sdk/content/interfaces/Signer)
The connected signer.
#### Implementation of
[`Signer`](/sdk/content/interfaces/Signer).[`connect`](/sdk/content/interfaces/Signer#connect)
#### Source
[signers/abstract-signer.ts:92](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/signers/abstract-signer.ts#L92)
***
### getAddress()
```ts theme={null}
abstract getAddress(): Promise
```
Resolves to the Signer address.
#### Returns
`Promise`\<`string`>
#### Implementation of
[`Signer`](/sdk/content/interfaces/Signer).[`getAddress`](/sdk/content/interfaces/Signer#getaddress)
#### Source
[signers/abstract-signer.ts:70](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/signers/abstract-signer.ts#L70)
# Block
Source: https://docs.qu.ai/sdk/content/classes/Block
A **Block** represents the data associated with a full block on Ethereum.
## Extended by
* [`MinedBlock`](/sdk/content/interfaces/MinedBlock)
## Implements
* [`BlockParams`](/sdk/content/interfaces/BlockParams)
* `Iterable`\<`string`>
## Constructors
### new Block()
```ts theme={null}
new Block(block, provider): Block
```
Create a new **Block** object.
This should generally not be necessary as the unless implementing a low-level library.
#### Parameters
| Parameter | Type | Description |
| :--------- | :--------------------------------------------------- | :-------------------- |
| `block` | [`BlockParams`](/sdk/content/interfaces/BlockParams) | The block parameters. |
| `provider` | [`Provider`](/sdk/content/interfaces/Provider) | The provider. |
#### Returns
[`Block`](/sdk/content/classes/Block)
#### Source
[providers/provider.ts:627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L627)
## Properties
| Property | Modifier | Type | Description |
| :--------- | :--------- | :--------------------------------------------- | :--------------------------------------------------------------------------------- |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider connected to the block used to fetch additional details if necessary. |
## Accessors
### date
```ts theme={null}
get date(): null | Date
```
The [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) this block was
included at.
#### Returns
`null` | `Date`
The date this block was included at, or null if the timestamp is not available.
#### Source
[providers/provider.ts:826](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L826)
***
### length
```ts theme={null}
get length(): number
```
The number of transactions in this block.
#### Returns
`number`
The number of transactions.
#### Source
[providers/provider.ts:816](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L816)
***
### outboundEtxs
```ts theme={null}
get outboundEtxs(): readonly string[]
```
Returns the list of extended transaction hashes, in the order they were executed within the block.
#### Returns
readonly `string`\[]
The list of extended transaction hashes.
#### Source
[providers/provider.ts:689](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L689)
***
### prefetchedExtTransactions
```ts theme={null}
get prefetchedExtTransactions(): ExternalTransactionResponse[]
```
Returns the complete extended transactions, in the order they were executed within the block.
This is only available for blocks which prefetched transactions, by passing `true` to `prefetchTxs` into
[**getBlock**](/sdk/content/interfaces/Provider#getblock).
#### Throws
If the transactions were not prefetched.
#### Returns
`ExternalTransactionResponse`\[]
The list of prefetched extended transactions.
#### Source
[providers/provider.ts:737](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L737)
***
### prefetchedTransactions
```ts theme={null}
get prefetchedTransactions(): TransactionResponse[]
```
Returns the complete transactions, in the order they were executed within the block.
This is only available for blocks which prefetched transactions, by passing `true` to `prefetchTxs` into
[**getBlock**](/sdk/content/interfaces/Provider#getblock).
#### Throws
If the transactions were not prefetched.
#### Returns
[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)\[]
The list of prefetched transactions.
#### Source
[providers/provider.ts:707](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L707)
***
### transactions
```ts theme={null}
get transactions(): readonly string[]
```
Returns the list of transaction hashes, in the order they were executed within the block.
#### Returns
readonly `string`\[]
The list of transaction hashes.
#### Source
[providers/provider.ts:675](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L675)
## Methods
### getExtTransaction()
```ts theme={null}
getExtTransaction(indexOrHash): Promise
```
Get the extended transaction at `index` within this block.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :--------------------------------------------- |
| `indexOrHash` | `string` \| `number` | The index or hash of the extended transaction. |
#### Returns
`Promise`\<`ExternalTransactionResponse`>
A promise resolving to the extended transaction.
#### Throws
If the extended transaction is not found.
#### Source
[providers/provider.ts:883](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L883)
***
### getPrefetchedTransaction()
```ts theme={null}
getPrefetchedTransaction(indexOrHash): TransactionResponse
```
If a **Block** was fetched with a request to include the transactions this will allow synchronous access to those
transactions.
If the transactions were not prefetched, this will throw.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :------------------------------------ |
| `indexOrHash` | `string` \| `number` | The index or hash of the transaction. |
#### Returns
[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)
The transaction.
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:927](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L927)
***
### getTransaction()
```ts theme={null}
getTransaction(indexOrHash): Promise
```
Get the transaction at `index` within this block.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :------------------------------------ |
| `indexOrHash` | `string` \| `number` | The index or hash of the transaction. |
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | `ExternalTransactionResponse`>
A promise resolving to the transaction.
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:842](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L842)
***
### isMined()
```ts theme={null}
isMined(): this is MinedBlock
```
Returns true if this block been mined. This provides a type guard for all properties on a
[**MinedBlock**](/sdk/content/interfaces/MinedBlock).
#### Returns
`this is MinedBlock`
True if the block has been mined.
#### Source
[providers/provider.ts:949](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L949)
***
### toJSON()
```ts theme={null}
toJSON(): BlockParams
```
Returns a JSON-friendly value.
#### Returns
[`BlockParams`](/sdk/content/interfaces/BlockParams)
The JSON-friendly value.
#### Source
[providers/provider.ts:763](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L763)
# BrowserProvider
Source: https://docs.qu.ai/sdk/content/classes/BrowserProvider
A **BrowserProvider** is intended to wrap an injected provider which adheres to the
[EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) standard, which most (if not all) currently do.
## Extends
* [`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)
## Constructors
### new BrowserProvider()
```ts theme={null}
new BrowserProvider(ethereum, network?): BrowserProvider
```
Connect to the `ethereum` provider, optionally forcing the `network`.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------------- | :------------------------- |
| `ethereum` | [`Eip1193Provider`](/sdk/content/interfaces/Eip1193Provider) | The EIP-1193 provider. |
| `network`? | [`Networkish`](/sdk/content/type-aliases/Networkish) | The network to connect to. |
#### Returns
[`BrowserProvider`](/sdk/content/classes/BrowserProvider)
#### Overrides
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`constructor`](/sdk/content/classes/JsonRpcApiProvider#constructors)
#### Source
[providers/provider-browser.ts:72](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L72)
## Accessors
### connect
```ts theme={null}
get connect(): FetchRequest[]
```
Get the list of connected FetchRequests.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)\[]
The list of connected FetchRequests.
#### Source
[providers/abstract-provider.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1026)
***
### destroyed
```ts theme={null}
get destroyed(): boolean
```
If this provider has been destroyed using the [**destroy**](/sdk/content/classes/AbstractProvider#destroy) method.
Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further
requests may be sent to the provider.
#### Returns
`boolean`
#### Source
[providers/abstract-provider.ts:2545](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2545)
***
### paused
```ts theme={null}
get paused(): boolean
```
Whether the provider is currently paused.
A paused provider will not emit any events, and generally should not make any requests to the network, but that
is up to sub-classes to manage.
Setting `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:2577](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2577)
***
### pollingInterval
```ts theme={null}
get pollingInterval(): number
```
Get the polling interval.
#### Returns
`number`
The polling interval.
#### Source
[providers/abstract-provider.ts:1183](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1183)
***
### provider
```ts theme={null}
get provider(): this
```
Returns `this`, to allow an **AbstractProvider** to implement the [Contract Runner](../classes/ContractRunner)
interface.
#### Returns
`this`
The provider instance.
#### Source
[providers/abstract-provider.ts:1193](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1193)
***
### ready
```ts theme={null}
get ready(): boolean
```
Returns true only if the JsonRpcApiProvider.\_start | **\_start** has been called.
#### Returns
`boolean`
True if the provider is ready.
#### Source
[providers/provider-jsonrpc.ts:1117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1117)
## Methods
### \_clearTimeout()
```ts theme={null}
_clearTimeout(timerId): void
```
Clear a timer created using the AbstractProvider.\_setTimeout | **\_setTimeout** method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------- |
| `timerId` | `number` | The ID of the timer to clear. |
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`_clearTimeout`](/sdk/content/classes/JsonRpcApiProvider#_cleartimeout)
#### Source
[providers/abstract-provider.ts:2221](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2221)
***
### destroy()
```ts theme={null}
destroy(): void
```
Destroys the provider, stopping all processing and canceling all pending requests.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`destroy`](/sdk/content/classes/JsonRpcApiProvider#destroy)
#### Source
[providers/provider-jsonrpc.ts:1587](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1587)
***
### getActiveRegions()
```ts theme={null}
getActiveRegions(): Promise
```
Get the active region shards based on the protocol expansion number.
#### Returns
`Promise`\<[`Shard`](/sdk/content/enumerations/Shard)\[]>
A promise that resolves to the active shards.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveRegions`](/sdk/content/classes/JsonRpcApiProvider#getactiveregions)
#### Source
[providers/abstract-provider.ts:1110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1110)
***
### getActiveZones()
```ts theme={null}
getActiveZones(): Promise
```
Get the active zones for a shard based on the protocol expansion number.
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)\[]>
A promise that resolves to the active zones.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveZones`](/sdk/content/classes/JsonRpcApiProvider#getactivezones)
#### Source
[providers/abstract-provider.ts:1127](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1127)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt?): Promise
```
Get the latest Qi rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQiToQuaiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestqitoquairate)
#### Source
[providers/abstract-provider.ts:1149](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1149)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt?): Promise
```
Get the latest Quai rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :------------------------------------------------------ |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQuaiToQiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestquaitoqirate)
#### Source
[providers/abstract-provider.ts:1068](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1068)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Get the protocol expansion number.
#### Returns
`Promise`\<`number`>
A promise that resolves to the protocol expansion number.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getProtocolExpansionNumber`](/sdk/content/classes/JsonRpcApiProvider#getprotocolexpansionnumber)
#### Source
[providers/abstract-provider.ts:1101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1101)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Qi rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQiToQuaiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getqitoquairateatblock)
#### Source
[providers/abstract-provider.ts:1162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1162)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Quai rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQuaiToQiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getquaitoqirateatblock)
#### Source
[providers/abstract-provider.ts:1081](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1081)
***
### getRpcError()
```ts theme={null}
getRpcError(payload, error): Error
```
Gets the RPC error.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------------------------- | :-------------------- |
| `payload` | [`JsonRpcPayload`](/sdk/content/type-aliases/JsonRpcPayload) | The JSON-RPC payload. |
| `error` | [`JsonRpcError`](/sdk/content/type-aliases/JsonRpcError) | The JSON-RPC error. |
#### Returns
`Error`
The RPC error.
#### Overrides
`JsonRpcApiProvider.getRpcError`
#### Source
[providers/provider-browser.ts:162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L162)
***
### getSigner()
```ts theme={null}
getSigner(address?): Promise
```
Gets the signer for the given address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------- | :--------------------------------- |
| `address`? | `string` \| `number` | The address to get the signer for. |
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)>
The signer for the address.
#### Overrides
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getSigner`](/sdk/content/classes/JsonRpcApiProvider#getsigner)
#### Source
[providers/provider-browser.ts:185](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L185)
***
### hasSigner()
```ts theme={null}
hasSigner(address): Promise
```
Resolves to `true` if the provider manages the `address`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------- | :-------------------- |
| `address` | `string` \| `number` | The address to check. |
#### Returns
`Promise`\<`boolean`>
Resolves to `true` if the provider manages the `address`.
#### Source
[providers/provider-browser.ts:101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L101)
***
### initialize()
```ts theme={null}
initialize(urls): Promise
```
Initialize the URL map with the provided URLs.
#### Type parameters
| Type parameter | Value |
| :------------- | :----------------------------------------------------------------- |
| `U` | `string`\[] \| [`FetchRequest`](/sdk/content/classes/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`initialize`](/sdk/content/classes/JsonRpcApiProvider#initialize)
#### Source
[providers/abstract-provider.ts:874](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L874)
***
### listAccounts()
```ts theme={null}
listAccounts(): Promise
```
Returns a list of JsonRpcSigners for all accounts.
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)\[]>
A promise that resolves to an array of JsonRpcSigners.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`listAccounts`](/sdk/content/classes/JsonRpcApiProvider#listaccounts)
#### Source
[providers/provider-jsonrpc.ts:1579](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1579)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the provider. If `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`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`pause`](/sdk/content/classes/JsonRpcApiProvider#pause)
#### Source
[providers/abstract-provider.ts:2598](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2598)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the provider.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`resume`](/sdk/content/classes/JsonRpcApiProvider#resume)
#### Source
[providers/abstract-provider.ts:2627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2627)
***
### send()
```ts theme={null}
send(
method,
params,
shard?): Promise
```
Sends a JSON-RPC request.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :----------------------------- |
| `method` | `string` | The method name. |
| `params` | `any`\[] \| `Record`\<`string`, `any`> | The parameters for the method. |
| `shard`? | [`Shard`](/sdk/content/enumerations/Shard) | - |
#### Returns
`Promise`\<`any`>
The result of the request.
#### Overrides
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`send`](/sdk/content/classes/JsonRpcApiProvider#send)
#### Source
[providers/provider-browser.ts:122](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L122)
***
### shardFromHash()
```ts theme={null}
shardFromHash(hash): Shard
```
Get the shard from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------ |
| `hash` | `string` | The hash to get the shard from. |
#### Returns
[`Shard`](/sdk/content/enumerations/Shard)
The shard.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`shardFromHash`](/sdk/content/classes/JsonRpcApiProvider#shardfromhash)
#### Source
[providers/abstract-provider.ts:1047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1047)
***
### zoneFromAddress()
```ts theme={null}
zoneFromAddress(_address): Promise
```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromAddress`](/sdk/content/classes/JsonRpcApiProvider#zonefromaddress)
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromHash`](/sdk/content/classes/JsonRpcApiProvider#zonefromhash)
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# EventPayload
Source: https://docs.qu.ai/sdk/content/classes/EventPayload
When an [**EventEmitterable**](/sdk/content/interfaces/EventEmitterable) triggers a Listener, the callback always ahas one additional
argument passed, which is an **EventPayload**.
## Extended by
* [`ContractUnknownEventPayload`](/sdk/content/classes/ContractUnknownEventPayload)
## Type parameters
| Type parameter |
| :------------- |
| `T` |
## Constructors
### new EventPayload()
```ts theme={null}
new EventPayload(
emitter,
listener,
filter): EventPayload
```
Create a new **EventPayload** for `emitter` with the `listener` and for `filter`.
#### Parameters
| Parameter | Type |
| :--------- | :------------------------------------------------------------------- |
| `emitter` | [`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`> |
| `listener` | `null` \| [`Listener`](/sdk/content/type-aliases/Listener) |
| `filter` | `T` |
#### Returns
[`EventPayload`](/sdk/content/classes/EventPayload)\<`T`>
#### Source
[utils/events.ts:91](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L91)
## Properties
| Property | Modifier | Type | Description |
| :-------- | :--------- | :------------------------------------------------------------------- | :------------------------ |
| `emitter` | `readonly` | [`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`> | The **EventEmitterable**. |
| `filter` | `readonly` | `T` | The event filter. |
## Methods
### removeListener()
```ts theme={null}
removeListener(): Promise
```
Unregister the triggered listener for future events.
#### Returns
`Promise`\<`void`>
#### Source
[utils/events.ts:99](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L99)
# FeeData
Source: https://docs.qu.ai/sdk/content/classes/FeeData
A **FeeData** wraps all the fee-related values associated with the network.
## Constructors
### new FeeData()
```ts theme={null}
new FeeData(gasPrice?): FeeData
```
Creates a new FeeData for `gasPrice`.
#### Parameters
| Parameter | Type | Description |
| :---------- | :----------------- | :------------- |
| `gasPrice`? | `null` \| `bigint` | The gas price. |
#### Returns
[`FeeData`](/sdk/content/classes/FeeData)
#### Source
[providers/provider.ts:106](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L106)
## Properties
| Property | Modifier | Type | Description |
| :--------- | :--------- | :----------------- | :--------------------------------- |
| `gasPrice` | `readonly` | `null` \| `bigint` | The gas price for legacy networks. |
## Methods
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-friendly value.
#### Returns
`any`
The JSON-friendly value.
#### Source
[providers/provider.ts:117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L117)
# FetchRequest
Source: https://docs.qu.ai/sdk/content/classes/FetchRequest
Represents a request for a resource using a URI.
By default, the supported schemes are `HTTP`, `HTTPS`, `data:`, and `IPFS:`.
Additional schemes can be added globally using [**registerGateway**](/sdk/content/classes/FetchRequest#registergateway).
## Example
```ts theme={null}
req = new FetchRequest('https://www.ricmoo.com');
resp = await req.send();
resp.body.length;
```
## Implements
* `Iterable`\<\[`string`, `string`]>
## Constructors
### new FetchRequest()
```ts theme={null}
new FetchRequest(url): FetchRequest
```
Create a new FetchRequest instance with default values.
Once created, each property may be set before issuing a `.send()` to make the request.
#### Parameters
| Parameter | Type |
| :-------- | :------- |
| `url` | `string` |
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)
#### Source
[utils/fetch.ts:503](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L503)
## Accessors
### allowGzip
```ts theme={null}
get allowGzip(): boolean
```
Enable and request gzip-encoded responses. The response will automatically be decompressed. (default: true)
#### Returns
`boolean`
#### Source
[utils/fetch.ts:413](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L413)
***
### allowInsecureAuthentication
```ts theme={null}
get allowInsecureAuthentication(): boolean
```
Allow `Authentication` credentials to be sent over insecure channels. (default: false)
#### Returns
`boolean`
#### Source
[utils/fetch.ts:423](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L423)
***
### body
```ts theme={null}
get body(): null | Uint8Array
```
The fetch body, if any, to send as the request body. (default: null)
When setting a body, the intrinsic `Content-Type` is automatically set and will be used if **not overridden** by
setting a custom header.
If `body` is null, the body is cleared (along with the intrinsic `Content-Type`).
If `body` is a string, the intrinsic `Content-Type` is set to `text/plain`.
If `body` is a Uint8Array, the intrinsic `Content-Type` is set to `application/octet-stream`.
If `body` is any other object, the intrinsic `Content-Type` is set to `application/json`.
#### Returns
`null` | `Uint8Array`
#### Source
[utils/fetch.ts:265](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L265)
***
### credentials
```ts theme={null}
get credentials(): null | string
```
The value that will be sent for the `Authorization` header.
To set the credentials, use the `setCredentials` method.
#### Returns
`null` | `string`
#### Source
[utils/fetch.ts:394](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L394)
***
### getUrlFunc
```ts theme={null}
get getUrlFunc(): FetchGetUrlFunc
```
This function is called to fetch content from HTTP and HTTPS URLs and is platform specific (e.g. nodejs vs
browsers).
This is by default the currently registered global getUrl function, which can be changed using
[**registerGetUrl**](/sdk/content/classes/FetchRequest#registergeturl). If this has been set, setting is to `null` will cause this
FetchRequest (and any future clones) to revert back to using the currently registered global getUrl function.
Setting this is generally not necessary, but may be useful for developers that wish to intercept requests or to
configurege a proxy or other agent.
#### Returns
[`FetchGetUrlFunc`](/sdk/content/type-aliases/FetchGetUrlFunc)
#### Source
[utils/fetch.ts:491](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L491)
***
### headers
```ts theme={null}
get headers(): Record
```
The headers that will be used when requesting the URI. All keys are lower-case.
This object is a copy, so any changes will **NOT** be reflected in the `FetchRequest`.
To set a header entry, use the `setHeader` method.
#### Returns
`Record`\<`string`, `string`>
#### Source
[utils/fetch.ts:323](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L323)
***
### method
```ts theme={null}
get method(): string
```
The HTTP method to use when requesting the URI. If no method has been explicitly set, then `GET` is used if the
body is null and `POST` otherwise.
#### Returns
`string`
#### Source
[utils/fetch.ts:300](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L300)
***
### preflightFunc
```ts theme={null}
get preflightFunc(): null | FetchPreflightFunc
```
This function is called prior to each request, for example during a redirection or retry in case of server
throttling.
This offers an opportunity to populate headers or update content before sending a request.
#### Returns
`null` | [`FetchPreflightFunc`](/sdk/content/type-aliases/FetchPreflightFunc)
#### Source
[utils/fetch.ts:447](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L447)
***
### processFunc
```ts theme={null}
get processFunc(): null | FetchProcessFunc
```
This function is called after each response, offering an opportunity to provide client-level throttling or
updating response data.
Any error thrown in this causes the `send()` to throw.
To schedule a retry attempt (assuming the maximum retry limit has not been reached), use
[**FetchResponse.throwThrottleError**](/sdk/content/classes/FetchResponse#throwthrottleerror).
#### Returns
`null` | [`FetchProcessFunc`](/sdk/content/type-aliases/FetchProcessFunc)
#### Source
[utils/fetch.ts:463](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L463)
***
### retryFunc
```ts theme={null}
get retryFunc(): null | FetchRetryFunc
```
This function is called on each retry attempt.
#### Returns
`null` | [`FetchRetryFunc`](/sdk/content/type-aliases/FetchRetryFunc)
#### Source
[utils/fetch.ts:473](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L473)
***
### timeout
```ts theme={null}
get timeout(): number
```
The timeout (in milliseconds) to wait for a complete response. (default: 5 minutes)
#### Returns
`number`
#### Source
[utils/fetch.ts:433](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L433)
***
### url
```ts theme={null}
get url(): string
```
The fetch URL to request.
#### Returns
`string`
#### Source
[utils/fetch.ts:244](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L244)
## Methods
### cancel()
```ts theme={null}
cancel(): void
```
Cancels the inflight response, causing a `CANCELLED` error to be rejected from the
[**send**](/sdk/content/classes/FetchRequest#send).
#### Returns
`void`
#### Source
[utils/fetch.ts:656](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L656)
***
### clearHeaders()
```ts theme={null}
clearHeaders(): void
```
Clear all headers, resetting all intrinsic headers.
#### Returns
`void`
#### Source
[utils/fetch.ts:367](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L367)
***
### clone()
```ts theme={null}
clone(): FetchRequest
```
Create a new copy of this request.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)
The new request.
#### Source
[utils/fetch.ts:709](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L709)
***
### getHeader()
```ts theme={null}
getHeader(key): string
```
Get the header for `key`, ignoring case.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------- |
| `key` | `string` | The header key to retrieve. |
#### Returns
`string`
The header value.
#### Source
[utils/fetch.ts:350](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L350)
***
### hasBody()
```ts theme={null}
hasBody(): this is FetchRequest & Object
```
Returns true if the request has a body.
#### Returns
`this is FetchRequest & Object`
#### Source
[utils/fetch.ts:292](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L292)
***
### redirect()
```ts theme={null}
redirect(location): FetchRequest
```
Returns a new [**FetchRequest**](/sdk/content/classes/FetchRequest) that represents the redirection to `location`.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------- | :--------------------------- |
| `location` | `string` | The location to redirect to. |
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)
The new request.
#### Source
[utils/fetch.ts:673](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L673)
***
### send()
```ts theme={null}
send(): Promise
```
Resolves to the response by sending the request.
#### Returns
`Promise`\<[`FetchResponse`](/sdk/content/classes/FetchResponse)>
#### Source
[utils/fetch.ts:644](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L644)
***
### setCredentials()
```ts theme={null}
setCredentials(username, password): void
```
Sets an `Authorization` for `username` with `password`.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------- | :-------------------------------------------- |
| `username` | `string` | The username to use for basic authentication. |
| `password` | `string` | The password to use for basic authentication. |
#### Returns
`void`
#### Throws
If the `username` contains a colon.
#### Source
[utils/fetch.ts:405](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L405)
***
### setHeader()
```ts theme={null}
setHeader(key, value): void
```
Set the header for `key` to `value`. All values are coerced to a string.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------- | :----------------------- |
| `key` | `string` | The header key to set. |
| `value` | `string` \| `number` | The header value to set. |
#### Returns
`void`
#### Source
[utils/fetch.ts:360](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L360)
***
### setThrottleParams()
```ts theme={null}
setThrottleParams(params): void
```
Update the throttle parameters used to determine maximum attempts and exponential-backoff properties.
#### Parameters
| Parameter | Type | Description |
| :-------- | :-------------------- | :------------------------------ |
| `params` | `FetchThrottleParams` | The throttle parameters to set. |
#### Returns
`void`
#### Throws
If the `slotInterval` is not a positive integer.
#### Source
[utils/fetch.ts:530](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L530)
***
### createDataGateway()
```ts theme={null}
static createDataGateway(): FetchGatewayFunc
```
Creates a function that can "fetch" data URIs.
Note that this is automatically done internally to support data URIs, so it is not necessary to register it.
This is not generally something that is needed, but may be useful in a wrapper to perfom custom data URI
functionality.
#### Returns
[`FetchGatewayFunc`](/sdk/content/type-aliases/FetchGatewayFunc)
The gateway function.
#### Source
[utils/fetch.ts:827](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L827)
***
### createGetUrlFunc()
```ts theme={null}
static createGetUrlFunc(options?): FetchGetUrlFunc
```
Creates a getUrl function that fetches content from HTTP and HTTPS URLs.
The available `options` are dependent on the platform implementation of the default getUrl function.
This is not generally something that is needed, but is useful when trying to customize simple behaviour when
fetching HTTP content.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------- | :---------------------------------------------------- |
| `options`? | `Record`\<`string`, `any`> | The options to use when creating the getUrl function. |
#### Returns
[`FetchGetUrlFunc`](/sdk/content/type-aliases/FetchGetUrlFunc)
The getUrl function.
#### Throws
If the gateways are locked.
#### Source
[utils/fetch.ts:813](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L813)
***
### createIpfsGatewayFunc()
```ts theme={null}
static createIpfsGatewayFunc(baseUrl): FetchGatewayFunc
```
Creates a function that will fetch IPFS (unvalidated) from a custom gateway baseUrl.
The default IPFS gateway used internally is `"https://gateway.ipfs.io/ipfs/"`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `baseUrl` | `string` | The base URL of the IPFS gateway. |
#### Returns
[`FetchGatewayFunc`](/sdk/content/type-aliases/FetchGatewayFunc)
The gateway function.
#### Source
[utils/fetch.ts:839](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L839)
***
### getGateway()
```ts theme={null}
static getGateway(scheme): null | FetchGatewayFunc
```
Get the current Gateway function for `scheme`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :--------------------------------- |
| `scheme` | `string` | The scheme to get the gateway for. |
#### Returns
`null` | [`FetchGatewayFunc`](/sdk/content/type-aliases/FetchGatewayFunc)
The gateway function, or null if not found.
#### Source
[utils/fetch.ts:758](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L758)
***
### lockConfig()
```ts theme={null}
static lockConfig(): void
```
Locks all static configuration for gateways and FetchGetUrlFunc registration.
#### Returns
`void`
#### Source
[utils/fetch.ts:748](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L748)
***
### registerGateway()
```ts theme={null}
static registerGateway(scheme, func): void
```
Use the `func` when fetching URIs using `scheme`.
This method affects all requests globally.
If [**lockConfig**](/sdk/content/classes/FetchRequest#lockconfig) has been called, no change is made and this throws.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------- | :-------------------------------------- |
| `scheme` | `string` | The scheme to register the gateway for. |
| `func` | [`FetchGatewayFunc`](/sdk/content/type-aliases/FetchGatewayFunc) | The gateway function to use. |
#### Returns
`void`
#### Throws
If the scheme is `http` or `https`.
#### Source
[utils/fetch.ts:773](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L773)
***
### registerGetUrl()
```ts theme={null}
static registerGetUrl(getUrl): void
```
Use `getUrl` when fetching URIs over HTTP and HTTPS requests.
This method affects all requests globally.
If [**lockConfig**](/sdk/content/classes/FetchRequest#lockconfig) has been called, no change is made and this throws.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------- | :---------------------------------------------------- |
| `getUrl` | [`FetchGetUrlFunc`](/sdk/content/type-aliases/FetchGetUrlFunc) | The function to use for fetching HTTP and HTTPS URIs. |
#### Returns
`void`
#### Throws
If the gateways are locked.
#### Source
[utils/fetch.ts:794](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L794)
# FetchResponse
Source: https://docs.qu.ai/sdk/content/classes/FetchResponse
The response for a FetchRequest.
## Implements
* `Iterable`\<\[`string`, `string`]>
## Accessors
### body
```ts theme={null}
get body(): null | Readonly
```
The response body, or `null` if there was no body.
#### Returns
`null` | `Readonly`\<`Uint8Array`>
#### Source
[utils/fetch.ts:891](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L891)
***
### bodyJson
```ts theme={null}
get bodyJson(): any
```
The response body, decoded as JSON.
An error is thrown if the body is invalid JSON-encoded data or if there was no body.
#### Returns
`any`
#### Source
[utils/fetch.ts:916](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L916)
***
### bodyText
```ts theme={null}
get bodyText(): string
```
The response body as a UTF-8 encoded string, or the empty string (i.e. `""`) if there was no body.
An error is thrown if the body is invalid UTF-8 data.
#### Returns
`string`
#### Source
[utils/fetch.ts:900](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L900)
***
### headers
```ts theme={null}
get headers(): Record
```
The response headers. All keys are lower-case.
#### Returns
`Record`\<`string`, `string`>
#### Source
[utils/fetch.ts:884](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L884)
***
### request
```ts theme={null}
get request(): null | FetchRequest
```
The request made for this response.
#### Returns
`null` | [`FetchRequest`](/sdk/content/classes/FetchRequest)
#### Source
[utils/fetch.ts:1033](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L1033)
***
### statusCode
```ts theme={null}
get statusCode(): number
```
The response status code.
#### Returns
`number`
#### Source
[utils/fetch.ts:870](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L870)
***
### statusMessage
```ts theme={null}
get statusMessage(): string
```
The response status message.
#### Returns
`string`
#### Source
[utils/fetch.ts:877](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L877)
## Methods
### assertOk()
```ts theme={null}
assertOk(): void
```
Throws a `SERVER_ERROR` if this response is not ok.
#### Returns
`void`
#### Throws
If the response is not ok.
#### Source
[utils/fetch.ts:1049](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L1049)
***
### getHeader()
```ts theme={null}
getHeader(key): string
```
Get the header value for `key`, ignoring case.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------- |
| `key` | `string` | The header key to retrieve. |
#### Returns
`string`
The header value.
#### Source
[utils/fetch.ts:1016](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L1016)
***
### hasBody()
```ts theme={null}
hasBody(): this is FetchResponse & Object
```
Returns true if the response has a body.
#### Returns
`this is FetchResponse & Object`
True if the response has a body.
#### Throws
If the body is invalid UTF-8 data.
#### Source
[utils/fetch.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L1026)
***
### makeServerError()
```ts theme={null}
makeServerError(message?, error?): FetchResponse
```
Return a Response with matching headers and body, but with an error status code (i.e. 599) and `message` with an
optional `error`.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------- | :------------------------ |
| `message`? | `string` | The error message to use. |
| `error`? | `Error` | The error to use. |
#### Returns
[`FetchResponse`](/sdk/content/classes/FetchResponse)
The error response.
#### Source
[utils/fetch.ts:975](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L975)
***
### ok()
```ts theme={null}
ok(): boolean
```
Returns true if this response was a success statusCode.
#### Returns
`boolean`
#### Source
[utils/fetch.ts:1040](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L1040)
***
### throwThrottleError()
```ts theme={null}
throwThrottleError(message?, stall?): never
```
If called within a [request.processFunc](FetchRequest-processFunc) call, causes the request to retry as if
throttled for `stall` milliseconds.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------- | :--------------------------------------------------- |
| `message`? | `string` | The error message to use. |
| `stall`? | `number` | The number of milliseconds to stall before retrying. |
#### Returns
`never`
#### Throws
If `stall` is not a non-negative integer.
#### Source
[utils/fetch.ts:996](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fetch.ts#L996)
# FewestCoinSelector
Source: https://docs.qu.ai/sdk/content/classes/FewestCoinSelector
The FewestCoinSelector class provides a coin selection algorithm that selects the fewest UTXOs required to meet the
target amount. This algorithm is useful for minimizing the size of the transaction and the fees associated with it.
This class is a sub-class of AbstractCoinSelector | **AbstractCoinSelector** and implements the
AbstractCoinSelector.performSelection | **performSelection** method to provide the actual coin selection
logic.
## Extends
* `AbstractCoinSelector`
## Constructors
### new FewestCoinSelector()
```ts theme={null}
new FewestCoinSelector(availableUTXOs): FewestCoinSelector
```
Constructs a new AbstractCoinSelector instance with an empty UTXO array.
#### Parameters
| Parameter | Type | Default value |
| :--------------- | :------------------------------------- | :------------ |
| `availableUTXOs` | [`UTXO`](/sdk/content/classes/UTXO)\[] | `[]` |
#### Returns
[`FewestCoinSelector`](/sdk/content/classes/FewestCoinSelector)
#### Inherited from
`AbstractCoinSelector.constructor`
#### Source
[transaction/abstract-coinselector.ts:61](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-coinselector.ts#L61)
## Methods
### decreaseFee()
```ts theme={null}
decreaseFee(feeReduction): SelectedCoinsResult
```
Decreases the fee by removing inputs if possible and adjusting change outputs.
#### Parameters
| Parameter | Type | Description |
| :------------- | :------- | :----------------------------------------- |
| `feeReduction` | `bigint` | The amount by which the fee has decreased. |
#### Returns
`SelectedCoinsResult`
#### Source
[transaction/coinselector-fewest.ts:280](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/coinselector-fewest.ts#L280)
***
### increaseFee()
```ts theme={null}
increaseFee(additionalFeeNeeded): SelectedCoinsResult
```
Increases the total fee by first reducing change outputs, then selecting additional inputs if necessary.
#### Parameters
| Parameter | Type | Description |
| :-------------------- | :------- | :------------------------- |
| `additionalFeeNeeded` | `bigint` | The additional fee needed. |
#### Returns
`SelectedCoinsResult`
Returns true if successful, false if insufficient funds.
#### Source
[transaction/coinselector-fewest.ts:226](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/coinselector-fewest.ts#L226)
***
### performSelection()
```ts theme={null}
performSelection(config): SelectedCoinsResult
```
Performs coin selection to meet the target amount plus fee, using the smallest possible denominations and
minimizing the number of inputs and outputs.
#### Parameters
| Parameter | Type |
| :-------- | :-------------------- |
| `config` | `CoinSelectionConfig` |
#### Returns
`SelectedCoinsResult`
The selected UTXOs and outputs.
#### Overrides
`AbstractCoinSelector.performSelection`
#### Source
[transaction/coinselector-fewest.ts:24](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/coinselector-fewest.ts#L24)
# FixedNumber
Source: https://docs.qu.ai/sdk/content/classes/FixedNumber
A FixedNumber represents a value over its [**FixedFormat**](/sdk/content/type-aliases/FixedFormat) arithmetic field.
A FixedNumber can be used to perform math, losslessly, on values which have decmial places.
A FixedNumber has a fixed bit-width to store values in, and stores all values internally by multiplying the value by
10 raised to the power of `decimals`.
If operations are performed that cause a value to grow too high (close to positive infinity) or too low (close to
negative infinity), the value is said to overflow.
For example, an 8-bit signed value, with 0 decimals may only be within the range `-128` to `127`; so `-128 - 1` will
overflow and become `127`. Likewise, `127 + 1` will overflow and become `-127`.
Many operation have a normal and unsafe variant. The normal variant will throw a
[NumericFaultError](../interfaces/NumericFaultError) on any overflow, while the unsafe variant will silently allow
overflow, corrupting its value value.
If operations are performed that cause a value to become too small (close to zero), the value loses precison and is
said to underflow.
For example, an value with 1 decimal place may store a number as small as `0.1`, but the value of `0.1 / 2` is
`0.05`, which cannot fit into 1 decimal place, so underflow occurs which means precision is lost and the value
becomes `0`.
Some operations have a normal and signalling variant. The normal variant will silently ignore underflow, while the
signalling variant will thow a [NumericFaultError](../interfaces/NumericFaultError) on underflow.
## Properties
| Property | Modifier | Type | Description |
| :------- | :--------- | :------- | :-------------------------------------------------------- |
| `format` | `readonly` | `string` | The specific fixed-point arithmetic field for this value. |
## Accessors
### decimals
```ts theme={null}
get decimals(): number
```
The number of decimal places in the fixed-point arithment field.
#### Returns
`number`
#### Source
[utils/fixednumber.ts:266](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L266)
***
### signed
```ts theme={null}
get signed(): boolean
```
If true, negative values are permitted, otherwise only positive values and zero are allowed.
#### Returns
`boolean`
#### Source
[utils/fixednumber.ts:252](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L252)
***
### value
```ts theme={null}
get value(): bigint
```
The value as an integer, based on the smallest unit the [**decimals**](/sdk/content/classes/FixedNumber#decimals) allow.
#### Returns
`bigint`
#### Source
[utils/fixednumber.ts:273](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L273)
***
### width
```ts theme={null}
get width(): number
```
The number of bits available to store the value.
#### Returns
`number`
#### Source
[utils/fixednumber.ts:259](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L259)
## Methods
### add()
```ts theme={null}
add(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` added to `other`. A
[NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :-------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to add to `this`. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the addition.
#### Source
[utils/fixednumber.ts:308](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L308)
***
### addUnsafe()
```ts theme={null}
addUnsafe(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` added to `other`, ignoring overflow.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :-------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to add to `this`. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the addition.
#### Source
[utils/fixednumber.ts:297](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L297)
***
### ceiling()
```ts theme={null}
ceiling(): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) which is the smallest **integer** that is greater than or
equal to `this`.
The decimal component of the result will always be `0`.
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The ceiling value.
#### Source
[utils/fixednumber.ts:549](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L549)
***
### cmp()
```ts theme={null}
cmp(other): number
```
Returns a comparison result between `this` and `other`.
This is suitable for use in sorting, where `-1` implies `this` is smaller, `1` implies `this` is larger and `0`
implies both are equal.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`number`
The comparison result.
#### Source
[utils/fixednumber.ts:452](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L452)
***
### div()
```ts theme={null}
div(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` divided by `other`, ignoring
underflow (precision loss). A [NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :----------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to divide `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the division.
#### Source
[utils/fixednumber.ts:415](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L415)
***
### divSignal()
```ts theme={null}
divSignal(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` divided by `other`. A
[NumericFaultError](../interfaces/NumericFaultError) is thrown if underflow (precision loss) occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :----------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to divide `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the division.
#### Throws
Thrown if underflow occurs.
#### Source
[utils/fixednumber.ts:427](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L427)
***
### divUnsafe()
```ts theme={null}
divUnsafe(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` divided by `other`, ignoring
underflow (precision loss). A [NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :----------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to divide `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the division.
#### Source
[utils/fixednumber.ts:404](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L404)
***
### eq()
```ts theme={null}
eq(other): boolean
```
Returns true if `other` is equal to `this`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`boolean`
True if `other` is equal to `this`.
#### Source
[utils/fixednumber.ts:480](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L480)
***
### floor()
```ts theme={null}
floor(): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) which is the largest **integer** that is less than or equal to
`this`.
The decimal component of the result will always be `0`.
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The floored value.
#### Source
[utils/fixednumber.ts:532](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L532)
***
### gt()
```ts theme={null}
gt(other): boolean
```
Returns true if `other` is greater than to `this`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`boolean`
True if `other` is greater than to `this`.
#### Source
[utils/fixednumber.ts:510](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L510)
***
### gte()
```ts theme={null}
gte(other): boolean
```
Returns true if `other` is greater than or equal to `this`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`boolean`
True if `other` is greater than or equal to `this`.
#### Source
[utils/fixednumber.ts:520](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L520)
***
### isNegative()
```ts theme={null}
isNegative(): boolean
```
Returns true if `this` is less than `0`.
#### Returns
`boolean`
True if `this` is less than `0`.
#### Source
[utils/fixednumber.ts:601](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L601)
***
### isZero()
```ts theme={null}
isZero(): boolean
```
Returns true if `this` is equal to `0`.
#### Returns
`boolean`
True if `this` is equal to `0`.
#### Source
[utils/fixednumber.ts:592](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L592)
***
### lt()
```ts theme={null}
lt(other): boolean
```
Returns true if `other` is less than to `this`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`boolean`
True if `other` is less than to `this`.
#### Source
[utils/fixednumber.ts:490](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L490)
***
### lte()
```ts theme={null}
lte(other): boolean
```
Returns true if `other` is less than or equal to `this`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------ |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to compare to `this`. |
#### Returns
`boolean`
True if `other` is less than or equal to `this`.
#### Source
[utils/fixednumber.ts:500](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L500)
***
### mul()
```ts theme={null}
mul(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` multiplied by `other`. A
[NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to multiply `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the multiplication.
#### Source
[utils/fixednumber.ts:362](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L362)
***
### mulSignal()
```ts theme={null}
mulSignal(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` multiplied by `other`. A
[NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs or if underflow (precision
loss) occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to multiply `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the multiplication.
#### Throws
Thrown if overflow or underflow occurs.
#### Throws
Thrown if division by 0 occurs.
#### Source
[utils/fixednumber.ts:376](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L376)
***
### mulUnsafe()
```ts theme={null}
mulUnsafe(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `this` multiplied by `other`, ignoring
overflow and underflow (precision loss).
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :------------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to multiply `this` by. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the multiplication.
#### Source
[utils/fixednumber.ts:351](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L351)
***
### round()
```ts theme={null}
round(decimals?): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the decimal component rounded up on ties at `decimals`
places.
#### Parameters
| Parameter | Type | Description |
| :---------- | :------- | :---------------------------------------- |
| `decimals`? | `number` | The number of decimal places to round to. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The rounded value.
#### Source
[utils/fixednumber.ts:565](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L565)
***
### sub()
```ts theme={null}
sub(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `other` subtracted from `this`. A
[NumericFaultError](../interfaces/NumericFaultError) is thrown if overflow occurs.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :--------------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to subtract from `this`. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the subtraction.
#### Source
[utils/fixednumber.ts:335](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L335)
***
### subUnsafe()
```ts theme={null}
subUnsafe(other): FixedNumber
```
Returns a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the result of `other` subtracted from `this`, ignoring
overflow.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------ | :--------------------------------- |
| `other` | [`FixedNumber`](/sdk/content/classes/FixedNumber) | The value to subtract from `this`. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The result of the subtraction.
#### Source
[utils/fixednumber.ts:324](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L324)
***
### toFormat()
```ts theme={null}
toFormat(format): FixedNumber
```
Return a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the same value but has had its field set to `format`.
This will throw if the value cannot fit into `format`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------------------- | :---------------------------- |
| `format` | [`FixedFormat`](/sdk/content/type-aliases/FixedFormat) | The new format for the value. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
#### Source
[utils/fixednumber.ts:633](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L633)
***
### toString()
```ts theme={null}
toString(): string
```
Returns the string representation of `this`.
#### Returns
`string`
The string representation.
#### Source
[utils/fixednumber.ts:610](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L610)
***
### toUnsafeFloat()
```ts theme={null}
toUnsafeFloat(): number
```
Returns a float approximation.
Due to IEEE 754 precission (or lack thereof), this function can only return an approximation and most values will
contain rounding errors.
#### Returns
`number`
The float approximation.
#### Source
[utils/fixednumber.ts:622](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L622)
***
### fromBytes()
```ts theme={null}
static fromBytes(_value, _format?): FixedNumber
```
Creates a new [**FixedNumber**](/sdk/content/classes/FixedNumber) with the big-endian representation `value` with `format`.
This will throw a [NumericFaultError](../interfaces/NumericFaultError) if `value` cannot fit in `format` due to
overflow.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :------------------------------------------ |
| `_value` | [`BytesLike`](/sdk/content/type-aliases/BytesLike) | The big-endian representation of the value. |
| `_format`? | [`FixedFormat`](/sdk/content/type-aliases/FixedFormat) | The format for the FixedNumber. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The FixedNumber for `value`.
#### Source
[utils/fixednumber.ts:727](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L727)
***
### fromString()
```ts theme={null}
static fromString(_value, _format?): FixedNumber
```
Creates a new [**FixedNumber**](/sdk/content/classes/FixedNumber) for `value` with `format`.
This will throw a [NumericFaultError](../interfaces/NumericFaultError) if `value` cannot fit in `format`, either
due to overflow or underflow (precision loss).
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :------------------------------------- |
| `_value` | `string` | The value to create a FixedNumber for. |
| `_format`? | [`FixedFormat`](/sdk/content/type-aliases/FixedFormat) | The format for the FixedNumber. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The FixedNumber for `value`.
#### Source
[utils/fixednumber.ts:681](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L681)
***
### fromValue()
```ts theme={null}
static fromValue(
_value,
_decimals?,
_format?): FixedNumber
```
Creates a new [**FixedNumber**](/sdk/content/classes/FixedNumber) for `value` divided by `decimal` places with `format`.
This will throw a [NumericFaultError](../interfaces/NumericFaultError) if `value` (once adjusted for `decimals`)
cannot fit in `format`, either due to overflow or underflow (precision loss).
#### Parameters
| Parameter | Type | Description |
| :----------- | :------------------------------------------------------- | :--------------------------------------- |
| `_value` | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The value to create a FixedNumber for. |
| `_decimals`? | [`Numeric`](/sdk/content/type-aliases/Numeric) | The number of decimal places in `value`. |
| `_format`? | [`FixedFormat`](/sdk/content/type-aliases/FixedFormat) | The format for the FixedNumber. |
#### Returns
[`FixedNumber`](/sdk/content/classes/FixedNumber)
The FixedNumber for `value`.
#### Source
[utils/fixednumber.ts:648](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/fixednumber.ts#L648)
# JsonRpcApiProvider
Source: https://docs.qu.ai/sdk/content/classes/JsonRpcApiProvider
The JsonRpcApiProvider is an abstract class and **MUST** be sub-classed.
It provides the base for all JSON-RPC-based Provider interaction.
Sub-classing Notes:
* A sub-class MUST override \_send
* A sub-class MUST call the `_start()` method once connected
## Extends
* [`AbstractProvider`](/sdk/content/classes/AbstractProvider)\<`C`>
## Extended by
* [`JsonRpcProvider`](/sdk/content/classes/JsonRpcProvider)
* [`BrowserProvider`](/sdk/content/classes/BrowserProvider)
* [`SocketProvider`](/sdk/content/classes/SocketProvider)
## Type parameters
| Type parameter | Value |
| :------------- | :-------------------------------------------------- |
| `C` | [`FetchRequest`](/sdk/content/classes/FetchRequest) |
## Constructors
### new JsonRpcApiProvider()
```ts theme={null}
new JsonRpcApiProvider(network?, options?): JsonRpcApiProvider
```
Creates a new JsonRpcApiProvider instance.
#### Parameters
| Parameter | Type | Description |
| :--------- | :--------------------------------------------------------------------------------- | :---------------------------- |
| `network`? | [`Networkish`](/sdk/content/type-aliases/Networkish) | The network to connect to. |
| `options`? | [`JsonRpcApiProviderOptions`](/sdk/content/type-aliases/JsonRpcApiProviderOptions) | The options for the provider. |
#### Returns
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)\<`C`>
#### Overrides
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`constructor`](/sdk/content/classes/AbstractProvider#constructors)
#### Source
[providers/provider-jsonrpc.ts:784](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L784)
## Accessors
### connect
```ts theme={null}
get connect(): FetchRequest[]
```
Get the list of connected FetchRequests.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)\[]
The list of connected FetchRequests.
#### Source
[providers/abstract-provider.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1026)
***
### destroyed
```ts theme={null}
get destroyed(): boolean
```
If this provider has been destroyed using the [**destroy**](/sdk/content/classes/AbstractProvider#destroy) method.
Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further
requests may be sent to the provider.
#### Returns
`boolean`
#### Source
[providers/abstract-provider.ts:2545](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2545)
***
### paused
```ts theme={null}
get paused(): boolean
```
Whether the provider is currently paused.
A paused provider will not emit any events, and generally should not make any requests to the network, but that
is up to sub-classes to manage.
Setting `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:2577](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2577)
***
### pollingInterval
```ts theme={null}
get pollingInterval(): number
```
Get the polling interval.
#### Returns
`number`
The polling interval.
#### Source
[providers/abstract-provider.ts:1183](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1183)
***
### provider
```ts theme={null}
get provider(): this
```
Returns `this`, to allow an **AbstractProvider** to implement the [Contract Runner](../classes/ContractRunner)
interface.
#### Returns
`this`
The provider instance.
#### Source
[providers/abstract-provider.ts:1193](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1193)
***
### ready
```ts theme={null}
get ready(): boolean
```
Returns true only if the JsonRpcApiProvider.\_start | **\_start** has been called.
#### Returns
`boolean`
True if the provider is ready.
#### Source
[providers/provider-jsonrpc.ts:1117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1117)
## Methods
### \_clearTimeout()
```ts theme={null}
_clearTimeout(timerId): void
```
Clear a timer created using the AbstractProvider.\_setTimeout | **\_setTimeout** method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------- |
| `timerId` | `number` | The ID of the timer to clear. |
#### Returns
`void`
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`_clearTimeout`](/sdk/content/classes/AbstractProvider#_cleartimeout)
#### Source
[providers/abstract-provider.ts:2221](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2221)
***
### destroy()
```ts theme={null}
destroy(): void
```
Destroys the provider, stopping all processing and canceling all pending requests.
#### Returns
`void`
#### Overrides
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`destroy`](/sdk/content/classes/AbstractProvider#destroy)
#### Source
[providers/provider-jsonrpc.ts:1587](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1587)
***
### getActiveRegions()
```ts theme={null}
getActiveRegions(): Promise
```
Get the active region shards based on the protocol expansion number.
#### Returns
`Promise`\<[`Shard`](/sdk/content/enumerations/Shard)\[]>
A promise that resolves to the active shards.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getActiveRegions`](/sdk/content/classes/AbstractProvider#getactiveregions)
#### Source
[providers/abstract-provider.ts:1110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1110)
***
### getActiveZones()
```ts theme={null}
getActiveZones(): Promise
```
Get the active zones for a shard based on the protocol expansion number.
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)\[]>
A promise that resolves to the active zones.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getActiveZones`](/sdk/content/classes/AbstractProvider#getactivezones)
#### Source
[providers/abstract-provider.ts:1127](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1127)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt?): Promise
```
Get the latest Qi rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getLatestQiToQuaiRate`](/sdk/content/classes/AbstractProvider#getlatestqitoquairate)
#### Source
[providers/abstract-provider.ts:1149](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1149)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt?): Promise
```
Get the latest Quai rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :------------------------------------------------------ |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getLatestQuaiToQiRate`](/sdk/content/classes/AbstractProvider#getlatestquaitoqirate)
#### Source
[providers/abstract-provider.ts:1068](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1068)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Get the protocol expansion number.
#### Returns
`Promise`\<`number`>
A promise that resolves to the protocol expansion number.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getProtocolExpansionNumber`](/sdk/content/classes/AbstractProvider#getprotocolexpansionnumber)
#### Source
[providers/abstract-provider.ts:1101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1101)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Qi rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getQiToQuaiRateAtBlock`](/sdk/content/classes/AbstractProvider#getqitoquairateatblock)
#### Source
[providers/abstract-provider.ts:1162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1162)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Quai rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`getQuaiToQiRateAtBlock`](/sdk/content/classes/AbstractProvider#getquaitoqirateatblock)
#### Source
[providers/abstract-provider.ts:1081](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1081)
***
### getSigner()
```ts theme={null}
getSigner(address?): Promise
```
Returns a JsonRpcSigner for the given address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------- | :----------------------------------- |
| `address`? | `string` \| `number` | The address or index of the account. |
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)>
A promise that resolves to the JsonRpcSigner.
#### Throws
If the account is invalid.
#### Source
[providers/provider-jsonrpc.ts:1542](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1542)
***
### initialize()
```ts theme={null}
initialize(urls): Promise
```
Initialize the URL map with the provided URLs.
#### Type parameters
| Type parameter | Value |
| :------------- | :----------------------------------------------------------------- |
| `U` | `string`\[] \| [`FetchRequest`](/sdk/content/classes/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.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`initialize`](/sdk/content/classes/AbstractProvider#initialize)
#### Source
[providers/abstract-provider.ts:874](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L874)
***
### listAccounts()
```ts theme={null}
listAccounts(): Promise
```
Returns a list of JsonRpcSigners for all accounts.
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)\[]>
A promise that resolves to an array of JsonRpcSigners.
#### Source
[providers/provider-jsonrpc.ts:1579](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1579)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the provider. If `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`
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`pause`](/sdk/content/classes/AbstractProvider#pause)
#### Source
[providers/abstract-provider.ts:2598](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2598)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the provider.
#### Returns
`void`
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`resume`](/sdk/content/classes/AbstractProvider#resume)
#### Source
[providers/abstract-provider.ts:2627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2627)
***
### send()
```ts theme={null}
send(
method,
params,
shard?,
now?): Promise
```
Requests the `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
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------------------- |
| `method` | `string` | The method to call. |
| `params` | `any`\[] \| `Record`\<`string`, `any`> | The parameters to pass to the method. |
| `shard`? | [`Shard`](/sdk/content/enumerations/Shard) | The shard to send the request to. |
| `now`? | `boolean` | If true, the request will be sent immediately. |
#### Returns
`Promise`\<`any`>
A promise that resolves to the result of the method call.
#### Source
[providers/provider-jsonrpc.ts:1500](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1500)
***
### shardFromHash()
```ts theme={null}
shardFromHash(hash): Shard
```
Get the shard from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------ |
| `hash` | `string` | The hash to get the shard from. |
#### Returns
[`Shard`](/sdk/content/enumerations/Shard)
The shard.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`shardFromHash`](/sdk/content/classes/AbstractProvider#shardfromhash)
#### Source
[providers/abstract-provider.ts:1047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1047)
***
### zoneFromAddress()
```ts theme={null}
zoneFromAddress(_address): Promise
```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`zoneFromAddress`](/sdk/content/classes/AbstractProvider#zonefromaddress)
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Inherited from
[`AbstractProvider`](/sdk/content/classes/AbstractProvider).[`zoneFromHash`](/sdk/content/classes/AbstractProvider#zonefromhash)
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# JsonRpcProvider
Source: https://docs.qu.ai/sdk/content/classes/JsonRpcProvider
The JsonRpcProvider is one of the most common Providers, which performs all operations over HTTP (or HTTPS) requests.
Events are processed by polling the backend for the current block number; when it advances, all block-base events are
then checked for updates.
## Extends
* [`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)
## Accessors
### connect
```ts theme={null}
get connect(): FetchRequest[]
```
Get the list of connected FetchRequests.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)\[]
The list of connected FetchRequests.
#### Source
[providers/abstract-provider.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1026)
***
### destroyed
```ts theme={null}
get destroyed(): boolean
```
If this provider has been destroyed using the [**destroy**](/sdk/content/classes/AbstractProvider#destroy) method.
Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further
requests may be sent to the provider.
#### Returns
`boolean`
#### Source
[providers/abstract-provider.ts:2545](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2545)
***
### paused
```ts theme={null}
get paused(): boolean
```
Whether the provider is currently paused.
A paused provider will not emit any events, and generally should not make any requests to the network, but that
is up to sub-classes to manage.
Setting `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:2577](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2577)
***
### pollingInterval
```ts theme={null}
get pollingInterval(): number
```
Get the polling interval.
#### Returns
`number`
The polling interval.
#### Source
[providers/abstract-provider.ts:1183](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1183)
***
### provider
```ts theme={null}
get provider(): this
```
Returns `this`, to allow an **AbstractProvider** to implement the [Contract Runner](../classes/ContractRunner)
interface.
#### Returns
`this`
The provider instance.
#### Source
[providers/abstract-provider.ts:1193](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1193)
***
### ready
```ts theme={null}
get ready(): boolean
```
Returns true only if the JsonRpcApiProvider.\_start | **\_start** has been called.
#### Returns
`boolean`
True if the provider is ready.
#### Source
[providers/provider-jsonrpc.ts:1117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1117)
## Methods
### \_clearTimeout()
```ts theme={null}
_clearTimeout(timerId): void
```
Clear a timer created using the AbstractProvider.\_setTimeout | **\_setTimeout** method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------- |
| `timerId` | `number` | The ID of the timer to clear. |
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`_clearTimeout`](/sdk/content/classes/JsonRpcApiProvider#_cleartimeout)
#### Source
[providers/abstract-provider.ts:2221](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2221)
***
### destroy()
```ts theme={null}
destroy(): void
```
Destroys the provider, stopping all processing and canceling all pending requests.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`destroy`](/sdk/content/classes/JsonRpcApiProvider#destroy)
#### Source
[providers/provider-jsonrpc.ts:1587](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1587)
***
### getActiveRegions()
```ts theme={null}
getActiveRegions(): Promise
```
Get the active region shards based on the protocol expansion number.
#### Returns
`Promise`\<[`Shard`](/sdk/content/enumerations/Shard)\[]>
A promise that resolves to the active shards.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveRegions`](/sdk/content/classes/JsonRpcApiProvider#getactiveregions)
#### Source
[providers/abstract-provider.ts:1110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1110)
***
### getActiveZones()
```ts theme={null}
getActiveZones(): Promise
```
Get the active zones for a shard based on the protocol expansion number.
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)\[]>
A promise that resolves to the active zones.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveZones`](/sdk/content/classes/JsonRpcApiProvider#getactivezones)
#### Source
[providers/abstract-provider.ts:1127](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1127)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt?): Promise
```
Get the latest Qi rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQiToQuaiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestqitoquairate)
#### Source
[providers/abstract-provider.ts:1149](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1149)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt?): Promise
```
Get the latest Quai rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :------------------------------------------------------ |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQuaiToQiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestquaitoqirate)
#### Source
[providers/abstract-provider.ts:1068](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1068)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Get the protocol expansion number.
#### Returns
`Promise`\<`number`>
A promise that resolves to the protocol expansion number.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getProtocolExpansionNumber`](/sdk/content/classes/JsonRpcApiProvider#getprotocolexpansionnumber)
#### Source
[providers/abstract-provider.ts:1101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1101)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Qi rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQiToQuaiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getqitoquairateatblock)
#### Source
[providers/abstract-provider.ts:1162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1162)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Quai rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQuaiToQiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getquaitoqirateatblock)
#### Source
[providers/abstract-provider.ts:1081](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1081)
***
### getSigner()
```ts theme={null}
getSigner(address?): Promise
```
Returns a JsonRpcSigner for the given address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------- | :----------------------------------- |
| `address`? | `string` \| `number` | The address or index of the account. |
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)>
A promise that resolves to the JsonRpcSigner.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getSigner`](/sdk/content/classes/JsonRpcApiProvider#getsigner)
#### Throws
If the account is invalid.
#### Source
[providers/provider-jsonrpc.ts:1542](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1542)
***
### initialize()
```ts theme={null}
initialize(urls): Promise
```
Initialize the URL map with the provided URLs.
#### Type parameters
| Type parameter | Value |
| :------------- | :----------------------------------------------------------------- |
| `U` | `string`\[] \| [`FetchRequest`](/sdk/content/classes/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`initialize`](/sdk/content/classes/JsonRpcApiProvider#initialize)
#### Source
[providers/abstract-provider.ts:874](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L874)
***
### listAccounts()
```ts theme={null}
listAccounts(): Promise
```
Returns a list of JsonRpcSigners for all accounts.
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)\[]>
A promise that resolves to an array of JsonRpcSigners.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`listAccounts`](/sdk/content/classes/JsonRpcApiProvider#listaccounts)
#### Source
[providers/provider-jsonrpc.ts:1579](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1579)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the provider. If `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`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`pause`](/sdk/content/classes/JsonRpcApiProvider#pause)
#### Source
[providers/abstract-provider.ts:2598](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2598)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the provider.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`resume`](/sdk/content/classes/JsonRpcApiProvider#resume)
#### Source
[providers/abstract-provider.ts:2627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2627)
***
### shardFromHash()
```ts theme={null}
shardFromHash(hash): Shard
```
Get the shard from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------ |
| `hash` | `string` | The hash to get the shard from. |
#### Returns
[`Shard`](/sdk/content/enumerations/Shard)
The shard.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`shardFromHash`](/sdk/content/classes/JsonRpcApiProvider#shardfromhash)
#### Source
[providers/abstract-provider.ts:1047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1047)
***
### zoneFromAddress()
```ts theme={null}
zoneFromAddress(_address): Promise
```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromAddress`](/sdk/content/classes/JsonRpcApiProvider#zonefromaddress)
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromHash`](/sdk/content/classes/JsonRpcApiProvider#zonefromhash)
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# JsonRpcSigner
Source: https://docs.qu.ai/sdk/content/classes/JsonRpcSigner
A signer that uses JSON-RPC to sign transactions and messages.
## Extends
* [`AbstractSigner`](/sdk/content/classes/AbstractSigner)\<[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)>
## Constructors
### new JsonRpcSigner()
```ts theme={null}
new JsonRpcSigner(provider, address): JsonRpcSigner
```
Creates a new JsonRpcSigner instance.
#### Parameters
| Parameter | Type | Description |
| :--------- | :---------------------------------------------------------------------- | :------------------------- |
| `provider` | [`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)\<`any`> | The JSON-RPC provider. |
| `address` | `string` | The address of the signer. |
#### Returns
[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)
#### Overrides
[`AbstractSigner`](/sdk/content/classes/AbstractSigner).[`constructor`](/sdk/content/classes/AbstractSigner#constructors)
#### Source
[providers/provider-jsonrpc.ts:328](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L328)
## Properties
| Property | Modifier | Type | Description | Inherited from |
| :--------- | :--------- | :-------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- | :----------------------------------------------------------------- |
| `provider` | `readonly` | [`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)\<[`FetchRequest`](/sdk/content/classes/FetchRequest)> | The provider this signer is connected to. | [`AbstractSigner`](/sdk/content/classes/AbstractSigner).`provider` |
## Methods
### connect()
```ts theme={null}
connect(provider): Signer
```
Connects the signer to a provider.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------------------------------------- | :-------------------------- |
| `provider` | `null` \| [`Provider`](/sdk/content/interfaces/Provider) | The provider to connect to. |
#### Returns
[`Signer`](/sdk/content/interfaces/Signer)
The connected signer.
#### Overrides
[`AbstractSigner`](/sdk/content/classes/AbstractSigner).[`connect`](/sdk/content/classes/AbstractSigner#connect)
#### Throws
If the signer cannot be reconnected.
#### Source
[providers/provider-jsonrpc.ts:342](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L342)
***
### getAddress()
```ts theme={null}
getAddress(): Promise
```
Gets the address of the signer.
#### Returns
`Promise`\<`string`>
The address of the signer.
#### Overrides
[`AbstractSigner`](/sdk/content/classes/AbstractSigner).[`getAddress`](/sdk/content/classes/AbstractSigner#getaddress)
#### Source
[providers/provider-jsonrpc.ts:353](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L353)
***
### sendTransaction()
```ts theme={null}
sendTransaction(tx): Promise
```
Sends a transaction.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------- | :----------------------- |
| `tx` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction request. |
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)>
The transaction response.
#### Overrides
`AbstractSigner.sendTransaction`
#### Throws
If the transaction cannot be sent.
#### Source
[providers/provider-jsonrpc.ts:438](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L438)
***
### signMessage()
```ts theme={null}
signMessage(_message): Promise
```
Signs a message.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------- | :------------------- |
| `_message` | `string` \| `Uint8Array` | The message to sign. |
#### Returns
`Promise`\<`string`>
The signed message.
#### Overrides
`AbstractSigner.signMessage`
#### Source
[providers/provider-jsonrpc.ts:551](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L551)
***
### signTransaction()
```ts theme={null}
signTransaction(_tx): Promise
```
Signs a transaction.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------- | :----------------------- |
| `_tx` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction request. |
#### Returns
`Promise`\<`string`>
The signed transaction.
#### Overrides
`AbstractSigner.signTransaction`
#### Throws
If the transaction cannot be signed.
#### Source
[providers/provider-jsonrpc.ts:521](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L521)
***
### signTypedData()
```ts theme={null}
signTypedData(
domain,
types,
_value): Promise
```
Signs typed data.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :---------------------------- |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain of the typed data. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types of the typed data. |
| `_value` | `Record`\<`string`, `any`> | The value of the typed data. |
#### Returns
`Promise`\<`string`>
The signed typed data.
#### Overrides
`AbstractSigner.signTypedData`
#### Source
[providers/provider-jsonrpc.ts:564](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L564)
***
### unlock()
```ts theme={null}
unlock(password): Promise
```
Unlocks the account.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------- | :---------------------------------- |
| `password` | `string` | The password to unlock the account. |
#### Returns
`Promise`\<`boolean`>
True if the account is unlocked, false otherwise.
#### Source
[providers/provider-jsonrpc.ts:583](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L583)
# Log
Source: https://docs.qu.ai/sdk/content/classes/Log
A **Log** in Ethereum represents an event that has been included in a transaction using the `LOG*` opcodes, which are
most commonly used by Solidity's emit for announcing events.
## Extended by
* [`EventLog`](/sdk/content/classes/EventLog)
* [`UndecodedEventLog`](/sdk/content/classes/UndecodedEventLog)
## Implements
* [`LogParams`](/sdk/content/interfaces/LogParams)
## Properties
| Property | Modifier | Type | Description |
| :----------------- | :--------- | :--------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address` | `readonly` | `string` | The address of the contract that emitted this log. |
| `blockHash` | `readonly` | `string` | The block hash of the block this log occurred in. Use the [**Log.getBlock**](/sdk/content/classes/Log#getblock) to get the
[**Block**](/sdk/content/classes/Block). |
| `blockNumber` | `readonly` | `number` | The block number of the block this log occurred in. It is preferred to use the Block.hash \| **Block.hash**
when fetching the related [**Block**](/sdk/content/classes/Block), since in the case of an orphaned block, the block at that
height may have changed. |
| `data` | `readonly` | `string` | The data included in this log when it was emitted. |
| `index` | `readonly` | `number` | The index within the block this log occurred at. This is generally not useful to developers, but can be used with
the various roots to proof inclusion within a block. |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider connected to the log used to fetch additional details if necessary. |
| `removed` | `readonly` | `boolean` | If the **Log** represents a block that was removed due to an orphaned block, this will be true.
This can only happen within an orphan event listener. |
| `topics` | `readonly` | readonly `string`\[] | The indexed topics included in this log when it was emitted.
All topics are included in the bloom filters, so they can be efficiently filtered using the
[**Provider.getLogs**](/sdk/content/interfaces/Provider#getlogs) method. |
| `transactionHash` | `readonly` | `string` | The transaction hash of the transaction this log occurred in. Use the
[**Log.getTransaction**](/sdk/content/classes/Log#gettransaction) to get the
[\*\*TransactionResponse](/sdk/content/type-aliases/TransactionResponse). |
| `transactionIndex` | `readonly` | `number` | The index within the transaction of this log. |
## Methods
### getBlock()
```ts theme={null}
getBlock(shard): Promise
```
Returns the block that this log occurred in.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |
#### Returns
`Promise`\<[`Block`](/sdk/content/classes/Block)>
A promise resolving to the block.
#### Source
[providers/provider.ts:1089](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1089)
***
### getTransaction()
```ts theme={null}
getTransaction(): Promise
```
Returns the transaction that this log occurred in.
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)>
A promise resolving to the transaction.
#### Source
[providers/provider.ts:1100](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1100)
***
### getTransactionReceipt()
```ts theme={null}
getTransactionReceipt(): Promise
```
Returns the transaction receipt fot the transaction that this log occurred in.
#### Returns
`Promise`\<[`TransactionReceipt`](/sdk/content/classes/TransactionReceipt)>
A promise resolving to the transaction receipt.
#### Source
[providers/provider.ts:1111](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1111)
***
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-compatible object.
#### Returns
`any`
#### Source
[providers/provider.ts:1065](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1065)
# Network
Source: https://docs.qu.ai/sdk/content/classes/Network
A **Network** provides access to a chain's properties and allows for plug-ins to extend functionality.
## Constructors
### new Network()
```ts theme={null}
new Network(name, chainId): Network
```
Creates a new **Network** for `name` and `chainId`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------- | :-------------------- |
| `name` | `string` | The network name. |
| `chainId` | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The network chain ID. |
#### Returns
[`Network`](/sdk/content/classes/Network)
#### Source
[providers/network.ts:48](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L48)
## Accessors
### chainId
```ts theme={null}
get chainId(): bigint
```
The network chain ID.
```ts theme={null}
set chainId(value): void
```
Sets the network chain ID.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------- | :------------------------ |
| `value` | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The new network chain ID. |
#### Returns
`bigint`
The network chain ID.
#### Source
[providers/network.ts:87](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L87)
***
### name
```ts theme={null}
get name(): string
```
The network common name.
This is the canonical name, as networks might have multiple names.
```ts theme={null}
set name(value): void
```
Sets the network name.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------- |
| `value` | `string` | The new network name. |
#### Returns
`string`
The network name.
#### Source
[providers/network.ts:69](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L69)
## Methods
### clone()
```ts theme={null}
clone(): Network
```
Create a copy of this Network.
#### Returns
[`Network`](/sdk/content/classes/Network)
A new Network instance.
#### Source
[providers/network.ts:153](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L153)
***
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-compatible representation of a Network.
#### Returns
`any`
The JSON representation of the network.
#### Source
[providers/network.ts:58](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L58)
***
### from()
```ts theme={null}
static from(network?): Network
```
Returns a new Network for the `network` name or chainId.
#### Parameters
| Parameter | Type | Description |
| :--------- | :--------------------------------------------------- | :------------------ |
| `network`? | [`Networkish`](/sdk/content/type-aliases/Networkish) | The network to get. |
#### Returns
[`Network`](/sdk/content/classes/Network)
The Network instance.
#### Throws
If the network is invalid.
#### Source
[providers/network.ts:165](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L165)
***
### register()
```ts theme={null}
static register(nameOrChainId, networkFunc): void
```
Register `nameOrChainId` with a function which returns an instance of a Network representing that chain.
#### Parameters
| Parameter | Type | Description |
| :-------------- | :---------------------------------------------- | :---------------------------------- |
| `nameOrChainId` | `string` \| `number` \| `bigint` | The name or chain ID to register. |
| `networkFunc` | () => [`Network`](/sdk/content/classes/Network) | The function to create the Network. |
#### Returns
`void`
#### Throws
If a network is already registered for `nameOrChainId`.
#### Source
[providers/network.ts:217](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/network.ts#L217)
# QiTransaction
Source: https://docs.qu.ai/sdk/content/classes/QiTransaction
Class representing a QiTransaction.
## Implements
## Extends
* `AbstractTransaction`\<`string`>
## Implements
* `QiTransactionLike`
## Constructors
### new QiTransaction()
```ts theme={null}
new QiTransaction(): QiTransaction
```
Creates a new Transaction with default values.
#### Returns
[`QiTransaction`](/sdk/content/classes/QiTransaction)
#### Overrides
`AbstractTransaction.constructor`
#### Source
[transaction/qi-transaction.ts:185](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L185)
## Accessors
### chainId
```ts theme={null}
get chainId(): bigint
```
The chain ID this transaction is valid on.
#### Returns
`bigint`
#### Source
[transaction/abstract-transaction.ts:275](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L275)
***
### data
```ts theme={null}
get data(): Uint8Array
```
Get transaction data.
```ts theme={null}
set data(value): void
```
Set transaction data.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------- | :-------------------- |
| `value` | `null` \| `Uint8Array` | The transaction data. |
#### Returns
`Uint8Array`
The transaction data.
#### Source
[transaction/qi-transaction.ts:99](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L99)
***
### destZone
```ts theme={null}
get destZone(): undefined | Zone
```
Get the zone of the recipient address.
#### Returns
`undefined` | [`Zone`](/sdk/content/enumerations/Zone)
The destination zone.
#### Source
[transaction/qi-transaction.ts:177](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L177)
***
### digest
```ts theme={null}
get digest(): string
```
The pre-image hash of this transaction.
This is the digest that a [Signer](../interfaces/Signer) must sign to authorize this transaction.
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:310](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L310)
***
### hash
```ts theme={null}
get hash(): null | string
```
Get the permuted hash of the transaction as specified by QIP-0010.
#### Throws
If the transaction has no inputs or outputs, or if cross-zone & cross-ledger transactions are not
supported.
#### See
[QIP0010](https://github.com/quai-network/qips/blob/master/qip-0010.md)
#### Returns
`null` | `string`
The transaction hash.
#### Source
[transaction/qi-transaction.ts:121](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L121)
***
### isExternal
```ts theme={null}
get isExternal(): boolean
```
Check if the transaction is external.
#### Returns
`boolean`
True if the transaction is external.
#### Source
[transaction/abstract-transaction.ts:412](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L412)
***
### originZone
```ts theme={null}
get originZone(): undefined | Zone
```
Get the zone of the sender address.
#### Returns
`undefined` | [`Zone`](/sdk/content/enumerations/Zone)
The origin zone.
#### Source
[transaction/qi-transaction.ts:165](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L165)
***
### serialized
```ts theme={null}
get serialized(): string
```
The serialized transaction.
This throws if the transaction is unsigned. For the pre-image, use
[**unsignedSerialized** ](/sdk/content/classes/QiTransaction#unsignedserialized).
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:336](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L336)
***
### signature
```ts theme={null}
get signature(): S
```
If signed, the signature for this transaction.
#### Returns
`S`
#### Source
[transaction/abstract-transaction.ts:285](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L285)
***
### txInputs
```ts theme={null}
get txInputs(): TxInput[]
```
Get transaction inputs.
```ts theme={null}
set txInputs(value): void
```
Set transaction inputs.
#### Throws
If the value is not an array.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------- | :---------------------- |
| `value` | `null` \| `TxInput`\[] | The transaction inputs. |
#### Returns
`TxInput`\[]
The transaction inputs.
#### Source
[transaction/qi-transaction.ts:55](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L55)
***
### txOutputs
```ts theme={null}
get txOutputs(): TxOutput[]
```
Get transaction outputs.
```ts theme={null}
set txOutputs(value): void
```
Set transaction outputs.
#### Throws
If the value is not an array.
#### Parameters
| Parameter | Type | Description |
| :-------- | :---------------------- | :----------------------- |
| `value` | `null` \| `TxOutput`\[] | The transaction outputs. |
#### Returns
`TxOutput`\[]
The transaction outputs.
#### Source
[transaction/qi-transaction.ts:77](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L77)
***
### type
```ts theme={null}
get type(): null | number
```
The transaction type.
If null, the type will be automatically inferred based on explicit properties.
#### Returns
`null` | `number`
#### Source
[transaction/abstract-transaction.ts:235](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L235)
***
### typeName
```ts theme={null}
get typeName(): null | string
```
The name of the transaction type.
#### Returns
`null` | `string`
#### Source
[transaction/abstract-transaction.ts:259](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L259)
***
### unsignedSerialized
```ts theme={null}
get unsignedSerialized(): string
```
The transaction pre-image.
The hash of this is the digest which needs to be signed to authorize this transaction.
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:351](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L351)
## Methods
### clone()
```ts theme={null}
clone(): QiTransaction
```
Create a copy of this transaction.
#### Returns
[`QiTransaction`](/sdk/content/classes/QiTransaction)
The cloned transaction.
#### Overrides
`AbstractTransaction.clone`
#### Source
[transaction/qi-transaction.ts:217](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L217)
***
### inferType()
```ts theme={null}
inferType(): number
```
Return the most "likely" type; currently the highest supported transaction type.
#### Returns
`number`
The inferred transaction type.
#### Inherited from
`AbstractTransaction.inferType`
#### Source
[transaction/abstract-transaction.ts:360](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L360)
***
### inferTypes()
```ts theme={null}
inferTypes(): number[]
```
Validates the explicit properties and returns a list of compatible transaction types.
#### Returns
`number`\[]
The compatible transaction types.
#### Overrides
`AbstractTransaction.inferTypes`
#### Source
[transaction/qi-transaction.ts:197](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L197)
***
### isSigned()
```ts theme={null}
isSigned(): this is AbstractTransaction & Object
```
Returns true if signed.
This provides a Type Guard that properties requiring a signed transaction are non-null.
#### Returns
`this is AbstractTransaction & Object`
Indicates if the transaction is signed.
#### Inherited from
`AbstractTransaction.isSigned`
#### Source
[transaction/abstract-transaction.ts:321](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L321)
***
### toJSON()
```ts theme={null}
toJSON(): TransactionLike
```
Return a JSON-friendly object.
#### Returns
[`TransactionLike`](/sdk/content/interfaces/TransactionLike)
The JSON-friendly object.
#### Overrides
`AbstractTransaction.toJSON`
#### Source
[transaction/qi-transaction.ts:226](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L226)
***
### toProtobuf()
```ts theme={null}
toProtobuf(includeSignature?): ProtoTransaction
```
Return a protobuf-friendly JSON object.
#### Parameters
| Parameter | Type | Default value | Description |
| :------------------ | :-------- | :------------ | :-------------------------------------------------- |
| `includeSignature`? | `boolean` | `true` | Whether to include the signature. Default is `true` |
#### Returns
`ProtoTransaction`
The protobuf-friendly JSON object.
#### Overrides
`AbstractTransaction.toProtobuf`
#### Source
[transaction/qi-transaction.ts:251](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L251)
***
### from()
```ts theme={null}
static from(tx): QiTransaction
```
Create a Transaction from a serialized transaction or a Transaction-like object.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------ | :------------------------- |
| `tx` | `string` \| `QiTransactionLike` | The transaction to decode. |
#### Returns
[`QiTransaction`](/sdk/content/classes/QiTransaction)
The decoded transaction.
#### Throws
If the transaction is unsigned and defines a hash.
#### Source
[transaction/qi-transaction.ts:287](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L287)
***
### fromProto()
```ts theme={null}
static fromProto(protoTx): QiTransaction
```
Create a Transaction from a ProtoTransaction object.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------- | :------------------------- |
| `protoTx` | `ProtoTransaction` | The transaction to decode. |
#### Returns
[`QiTransaction`](/sdk/content/classes/QiTransaction)
The decoded transaction.
#### Source
[transaction/qi-transaction.ts:326](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/qi-transaction.ts#L326)
# QiTransactionResponse
Source: https://docs.qu.ai/sdk/content/classes/QiTransactionResponse
A **QiTransactionResponse** includes all properties about a Qi transaction that was sent to the network, which may or
may not be included in a block.
The TransactionResponse.isMined | **TransactionResponse.isMined** can be used to check if the transaction has
been mined as well as type guard that the otherwise possibly `null` properties are defined.
## Implements
* `QiTransactionLike`
* `QiTransactionResponseParams`
## Properties
| Property | Modifier | Type | Description |
| :------------ | :--------- | :--------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| `blockHash` | `readonly` | `null` \| `string` | The blockHash of the block that this transaction was included in.
This is `null` for pending transactions. |
| `blockNumber` | `readonly` | `null` \| `number` | The block number of the block that this transaction was included in.
This is `null` for pending transactions. |
| `chainId` | `readonly` | `bigint` | The chain ID. |
| `hash` | `readonly` | `string` | The transaction hash. |
| `index` | `readonly` | `bigint` | The index within the block that this transaction resides at. |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider this is connected to, which will influence how its methods will resolve its async inspection
methods. |
| `signature` | `readonly` | `string` | The signature. |
| `type` | `readonly` | `number` | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction envelope type. This is `0` for legacy
transactions types. |
## Methods
### confirmations()
```ts theme={null}
confirmations(): Promise
```
Resolve to the number of confirmations this transaction has.
#### Returns
`Promise`\<`number`>
A promise resolving to the number of confirmations.
#### Source
[providers/provider.ts:2383](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2383)
***
### getBlock()
```ts theme={null}
getBlock(shard): Promise
```
Resolves to the Block that this transaction was included in.
This will return null if the transaction has not been included yet.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |
#### Returns
`Promise`\<`null` | [`Block`](/sdk/content/classes/Block)>
A promise resolving to the block or null if not found.
#### Source
[providers/provider.ts:2344](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2344)
***
### getTransaction()
```ts theme={null}
getTransaction(): Promise
```
Resolves to this transaction being re-requested from the provider. This can be used if you have an unmined
transaction and wish to get an up-to-date populated instance.
#### Returns
`Promise`\<`null` | [`QiTransactionResponse`](/sdk/content/classes/QiTransactionResponse)>
A promise resolving to the transaction, or null if not found.
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:2369](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2369)
***
### isMined()
```ts theme={null}
isMined(): this is QiMinedTransactionResponse
```
Returns `true` if this transaction has been included.
This is effective only as of the time the TransactionResponse was instantiated. To get up-to-date information,
use [**getTransaction**](/sdk/content/classes/QiTransactionResponse#gettransaction).
This provides a Type Guard that this transaction will have non-null property values for properties that are null
for unmined transactions.
#### Returns
`this is QiMinedTransactionResponse`
True if the transaction has been mined or false otherwise.
#### Source
[providers/provider.ts:2462](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2462)
***
### removedEvent()
```ts theme={null}
removedEvent(): OrphanFilter
```
Returns a filter which can be used to listen for orphan events that evict this transaction.
#### Returns
[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)
The orphan filter.
#### Source
[providers/provider.ts:2471](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2471)
***
### reorderedEvent()
```ts theme={null}
reorderedEvent(other?): OrphanFilter
```
Returns a filter which can be used to listen for orphan events that re-order this event against `other`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------- | :---------------------------------------- |
| `other`? | [`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | The other transaction to compare against. |
#### Returns
[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)
The orphan filter.
#### Source
[providers/provider.ts:2484](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2484)
***
### replaceableTransaction()
```ts theme={null}
replaceableTransaction(startBlock): QiTransactionResponse
```
Returns a new TransactionResponse instance which has the ability to detect (and throw an error) if the
transaction is replaced, which will begin scanning at `startBlock`.
This should generally not be used by developers and is intended primarily for internal use. Setting an incorrect
`startBlock` can have devastating performance consequences if used incorrectly.
#### Parameters
| Parameter | Type | Description |
| :----------- | :------- | :--------------------------------------------------- |
| `startBlock` | `number` | The block number to start scanning for replacements. |
#### Returns
[`QiTransactionResponse`](/sdk/content/classes/QiTransactionResponse)
The replaceable transaction.
#### Source
[providers/provider.ts:2506](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2506)
***
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-compatible representation of this transaction.
#### Returns
`any`
#### Source
[providers/provider.ts:2318](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2318)
# QuaiTransaction
Source: https://docs.qu.ai/sdk/content/classes/QuaiTransaction
Represents a Quai transaction.
## Extends
* `AbstractTransaction`\<[`Signature`](/sdk/content/classes/Signature)>
## Implements
* `QuaiTransactionLike`
## Constructors
### new QuaiTransaction()
```ts theme={null}
new QuaiTransaction(from?): QuaiTransaction
```
Creates a new Transaction with default values.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------ |
| `from`? | `string` | The sender address. |
#### Returns
[`QuaiTransaction`](/sdk/content/classes/QuaiTransaction)
#### Overrides
`AbstractTransaction.constructor`
#### Source
[transaction/quai-transaction.ts:273](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L273)
## Accessors
### accessList
```ts theme={null}
get accessList(): null | AccessList
```
The access list.
An access list permits discounted (but pre-paid) access to bytecode and state variable access within contract
execution.
#### Returns
`null` | [`AccessList`](/sdk/content/type-aliases/AccessList)
#### Source
[transaction/quai-transaction.ts:257](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L257)
***
### chainId
```ts theme={null}
get chainId(): bigint
```
The chain ID this transaction is valid on.
#### Returns
`bigint`
#### Source
[transaction/abstract-transaction.ts:275](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L275)
***
### data
```ts theme={null}
get data(): string
```
The transaction data. For `init` transactions this is the deployment code.
#### Returns
`string`
#### Source
[transaction/quai-transaction.ts:230](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L230)
***
### destZone
```ts theme={null}
get destZone(): undefined | Zone
```
The zone of the recipient address
#### Returns
`undefined` | [`Zone`](/sdk/content/enumerations/Zone)
#### Source
[transaction/quai-transaction.ts:180](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L180)
***
### digest
```ts theme={null}
get digest(): string
```
The pre-image hash of this transaction.
This is the digest that a [Signer](../interfaces/Signer) must sign to authorize this transaction.
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:310](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L310)
***
### gasLimit
```ts theme={null}
get gasLimit(): bigint
```
The gas limit.
#### Returns
`bigint`
#### Source
[transaction/quai-transaction.ts:202](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L202)
***
### gasPrice
```ts theme={null}
get gasPrice(): null | bigint
```
The maximum total fee per unit of gas to pay. On legacy networks this should be `null`.
#### Returns
`null` | `bigint`
#### Source
[transaction/quai-transaction.ts:214](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L214)
***
### hash
```ts theme={null}
get hash(): null | string
```
The permuted hash of the transaction as specified by
[QIP-0010](https://github.com/quai-network/qips/blob/master/qip-0010.md).
#### Throws
If the transaction is not signed.
#### Returns
`null` | `string`
#### Source
[transaction/quai-transaction.ts:135](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L135)
***
### isExternal
```ts theme={null}
get isExternal(): boolean
```
Check if the transaction is external.
#### Returns
`boolean`
True if the transaction is external.
#### Source
[transaction/abstract-transaction.ts:412](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L412)
***
### nonce
```ts theme={null}
get nonce(): number
```
The transaction nonce.
#### Returns
`number`
#### Source
[transaction/quai-transaction.ts:190](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L190)
***
### originZone
```ts theme={null}
get originZone(): undefined | Zone
```
The zone of the sender address
#### Returns
`undefined` | [`Zone`](/sdk/content/enumerations/Zone)
#### Source
[transaction/quai-transaction.ts:170](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L170)
***
### serialized
```ts theme={null}
get serialized(): string
```
The serialized transaction.
This throws if the transaction is unsigned. For the pre-image, use
[**unsignedSerialized** ](/sdk/content/classes/QiTransaction#unsignedserialized).
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:336](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L336)
***
### signature
```ts theme={null}
get signature(): S
```
If signed, the signature for this transaction.
#### Returns
`S`
#### Source
[transaction/abstract-transaction.ts:285](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L285)
***
### to
```ts theme={null}
get to(): null | string
```
The `to` address for the transaction or `null` if the transaction is an `init` transaction.
#### Returns
`null` | `string`
#### Source
[transaction/quai-transaction.ts:120](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L120)
***
### type
```ts theme={null}
get type(): null | number
```
The transaction type.
If null, the type will be automatically inferred based on explicit properties.
#### Returns
`null` | `number`
#### Source
[transaction/abstract-transaction.ts:235](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L235)
***
### typeName
```ts theme={null}
get typeName(): null | string
```
The name of the transaction type.
#### Returns
`null` | `string`
#### Source
[transaction/abstract-transaction.ts:259](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L259)
***
### unsignedSerialized
```ts theme={null}
get unsignedSerialized(): string
```
The transaction pre-image.
The hash of this is the digest which needs to be signed to authorize this transaction.
#### Returns
`string`
#### Source
[transaction/abstract-transaction.ts:351](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L351)
***
### value
```ts theme={null}
get value(): bigint
```
The amount of ether to send in this transactions.
#### Returns
`bigint`
#### Source
[transaction/quai-transaction.ts:242](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L242)
## Methods
### clone()
```ts theme={null}
clone(): QuaiTransaction
```
Create a copy of this transaction.
#### Returns
[`QuaiTransaction`](/sdk/content/classes/QuaiTransaction)
The cloned transaction.
#### Overrides
`AbstractTransaction.clone`
#### Source
[transaction/quai-transaction.ts:317](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L317)
***
### inferType()
```ts theme={null}
inferType(): number
```
Return the most "likely" type; currently the highest supported transaction type.
#### Returns
`number`
The inferred transaction type.
#### Inherited from
`AbstractTransaction.inferType`
#### Source
[transaction/abstract-transaction.ts:360](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L360)
***
### inferTypes()
```ts theme={null}
inferTypes(): number[]
```
Validates the explicit properties and returns a list of compatible transaction types.
#### Returns
`number`\[]
The compatible transaction types.
#### Overrides
`AbstractTransaction.inferTypes`
#### Source
[transaction/quai-transaction.ts:290](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L290)
***
### isSigned()
```ts theme={null}
isSigned(): this is AbstractTransaction & Object
```
Returns true if signed.
This provides a Type Guard that properties requiring a signed transaction are non-null.
#### Returns
`this is AbstractTransaction & Object`
Indicates if the transaction is signed.
#### Inherited from
`AbstractTransaction.isSigned`
#### Source
[transaction/abstract-transaction.ts:321](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/abstract-transaction.ts#L321)
***
### toJSON()
```ts theme={null}
toJSON(): QuaiTransactionLike
```
Return a JSON-friendly object.
#### Returns
`QuaiTransactionLike`
The JSON-friendly object.
#### Overrides
`AbstractTransaction.toJSON`
#### Source
[transaction/quai-transaction.ts:326](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L326)
***
### toProtobuf()
```ts theme={null}
toProtobuf(includeSignature?): ProtoTransaction
```
Return a protobuf-friendly JSON object.
#### Parameters
| Parameter | Type | Default value | Description |
| :------------------ | :-------- | :------------ | :-------------------------------------------------- |
| `includeSignature`? | `boolean` | `true` | Whether to include the signature. Default is `true` |
#### Returns
`ProtoTransaction`
The protobuf-friendly JSON object.
#### Overrides
`AbstractTransaction.toProtobuf`
#### Source
[transaction/quai-transaction.ts:356](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L356)
***
### from()
```ts theme={null}
static from(tx): QuaiTransaction
```
Create a **Transaction** from a serialized transaction or a Transaction-like object.
#### Parameters
| Parameter | Type | Description |
| :-------- | :-------------------------------- | :------------------------- |
| `tx` | `string` \| `QuaiTransactionLike` | The transaction to decode. |
#### Returns
[`QuaiTransaction`](/sdk/content/classes/QuaiTransaction)
The decoded transaction.
#### Source
[transaction/quai-transaction.ts:394](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L394)
***
### fromProto()
```ts theme={null}
static fromProto(protoTx): QuaiTransaction
```
Create a **Transaction** from a ProtoTransaction object.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------- | :------------------------- |
| `protoTx` | `ProtoTransaction` | The transaction to decode. |
#### Returns
[`QuaiTransaction`](/sdk/content/classes/QuaiTransaction)
The decoded transaction.
#### Source
[transaction/quai-transaction.ts:456](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/quai-transaction.ts#L456)
# QuaiTransactionResponse
Source: https://docs.qu.ai/sdk/content/classes/QuaiTransactionResponse
A **QuaiTransactionResponse** includes all properties about a Quai transaction that was sent to the network, which
may or may not be included in a block.
The TransactionResponse.isMined | **TransactionResponse.isMined** can be used to check if the transaction has
been mined as well as type guard that the otherwise possibly `null` properties are defined.
## Extended by
* [`ContractTransactionResponse`](/sdk/content/classes/ContractTransactionResponse)
## Implements
* `QuaiTransactionLike`
* `QuaiTransactionResponseParams`
## Properties
| Property | Modifier | Type | Description |
| :------------ | :--------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accessList` | `readonly` | `null` \| [`AccessList`](/sdk/content/type-aliases/AccessList) | The [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list for transaction types that support it,
otherwise `null`. |
| `blockHash` | `readonly` | `null` \| `string` | The blockHash of the block that this transaction was included in.
This is `null` for pending transactions. |
| `blockNumber` | `readonly` | `null` \| `number` | The block number of the block that this transaction was included in.
This is `null` for pending transactions. |
| `chainId` | `readonly` | `bigint` | The chain ID. |
| `data` | `readonly` | `string` | The data. |
| `from` | `readonly` | `string` | The sender of this transaction. It is implicitly computed from the transaction pre-image hash (as the digest) and
the [**signature** ](/sdk/content/classes/QuaiTransactionResponse) using ecrecover. |
| `gasLimit` | `readonly` | `bigint` | The maximum units of gas this transaction can consume. If execution exceeds this, the entries transaction is
reverted and the sender is charged for the full amount, despite not state changes being made. |
| `gasPrice` | `readonly` | `null` \| `bigint` | The maximum fee (per unit of gas) to allow this transaction to charge the sender. |
| `hash` | `readonly` | `string` | The transaction hash. |
| `index` | `readonly` | `bigint` | The index within the block that this transaction resides at. |
| `nonce` | `readonly` | `number` | The nonce, which is used to prevent replay attacks and offer a method to ensure transactions from a given sender
are explicitly ordered.
When sending a transaction, this must be equal to the number of transactions ever sent by
[**from** ](/sdk/content/classes/QuaiTransactionResponse). |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider this is connected to, which will influence how its methods will resolve its async inspection
methods. |
| `signature` | `readonly` | [`Signature`](/sdk/content/classes/Signature) | The signature. |
| `to` | `readonly` | `null` \| `string` | The receiver of this transaction.
If `null`, then the transaction is an initcode transaction. This means the result of executing the
[**data** ](/sdk/content/classes/QuaiTransactionResponse) will be deployed as a new contract on chain (assuming it does not
revert) and the address may be computed using [getCreateAddress](../functions/getCreateAddress). |
| `type` | `readonly` | `number` | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction envelope type. This is `0` for legacy
transactions types. |
| `value` | `readonly` | `bigint` | The value, in wei. Use [formatEther](../functions/formatEther) to format this value as ether. |
## Methods
### confirmations()
```ts theme={null}
confirmations(): Promise
```
Resolve to the number of confirmations this transaction has.
#### Returns
`Promise`\<`number`>
A promise resolving to the number of confirmations.
#### Throws
If the block is not found.
#### Source
[providers/provider.ts:1921](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1921)
***
### getBlock()
```ts theme={null}
getBlock(shard): Promise
```
Resolves to the Block that this transaction was included in.
This will return null if the transaction has not been included yet.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |
#### Returns
`Promise`\<`null` | [`Block`](/sdk/content/classes/Block)>
A promise resolving to the block.
#### Source
[providers/provider.ts:1882](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1882)
***
### getTransaction()
```ts theme={null}
getTransaction(): Promise
```
Resolves to this transaction being re-requested from the provider. This can be used if you have an unmined
transaction and wish to get an up-to-date populated instance.
#### Returns
`Promise`\<`null` | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse)>
A promise resolving to the transaction, or null if not found.
#### Source
[providers/provider.ts:1906](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1906)
***
### isMined()
```ts theme={null}
isMined(): this is QuaiMinedTransactionResponse
```
Returns `true` if this transaction has been included.
This is effective only as of the time the TransactionResponse was instantiated. To get up-to-date information,
use [**getTransaction**](/sdk/content/classes/QuaiTransactionResponse#gettransaction).
This provides a Type Guard that this transaction will have non-null property values for properties that are null
for unmined transactions.
#### Returns
`this is QuaiMinedTransactionResponse`
True if the transaction has been mined.
#### Throws
If the transaction was replaced, repriced, or cancelled.
#### Source
[providers/provider.ts:2179](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2179)
***
### removedEvent()
```ts theme={null}
removedEvent(): OrphanFilter
```
Returns a filter which can be used to listen for orphan events that evict this transaction.
#### Returns
[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)
The orphan filter.
#### Source
[providers/provider.ts:2188](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2188)
***
### reorderedEvent()
```ts theme={null}
reorderedEvent(other?): OrphanFilter
```
Returns a filter which can be used to listen for orphan events that re-order this event against `other`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------- | :---------------------------------------- |
| `other`? | [`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | The other transaction to compare against. |
#### Returns
[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)
The orphan filter.
#### Source
[providers/provider.ts:2201](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2201)
***
### replaceableTransaction()
```ts theme={null}
replaceableTransaction(startBlock): QuaiTransactionResponse
```
Returns a new TransactionResponse instance which has the ability to detect (and throw an error) if the
transaction is replaced, which will begin scanning at `startBlock`.
This should generally not be used by developers and is intended primarily for internal use. Setting an incorrect
`startBlock` can have devastating performance consequences if used incorrectly.
#### Parameters
| Parameter | Type | Description |
| :----------- | :------- | :--------------------------------------------------- |
| `startBlock` | `number` | The block number to start scanning for replacements. |
#### Returns
[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse)
The replaceable transaction.
#### Source
[providers/provider.ts:2223](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2223)
***
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-compatible representation of this transaction.
#### Returns
`any`
#### Source
[providers/provider.ts:1850](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1850)
***
### wait()
```ts theme={null}
wait(_confirms?, _timeout?): Promise
```
Resolves once this transaction has been mined and has `confirms` blocks including it (default: `1`) with an
optional `timeout`.
This can resolve to `null` only if `confirms` is `0` and the transaction has not been mined, otherwise this will
wait until enough confirmations have completed.
#### Parameters
| Parameter | Type | Description |
| :----------- | :------- | :--------------------------------------------------- |
| `_confirms`? | `number` | The number of confirmations to wait for. |
| `_timeout`? | `number` | The number of milliseconds to wait before rejecting. |
#### Returns
`Promise`\<`null` | [`TransactionReceipt`](/sdk/content/classes/TransactionReceipt)>
A promise resolving to the transaction receipt.
#### Throws
If the transaction was replaced, repriced, or cancelled.
#### Source
[providers/provider.ts:1953](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1953)
# SocketBlockSubscriber
Source: https://docs.qu.ai/sdk/content/classes/SocketBlockSubscriber
A **SocketBlockSubscriber** listens for `newHeads` events and emits `"block"` events.
## Extends
* [`SocketSubscriber`](/sdk/content/classes/SocketSubscriber)
## Accessors
### filter
```ts theme={null}
get filter(): any[]
```
The filter.
#### Returns
`any`\[]
#### Source
[providers/provider-socket.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L46)
## Methods
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the subscriber.
#### Parameters
| Parameter | Type | Description |
| :----------------- | :-------- | :--------------------------------- |
| `dropWhilePaused`? | `boolean` | Whether to drop logs while paused. |
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`pause`](/sdk/content/classes/SocketSubscriber#pause)
#### Source
[providers/provider-socket.ts:98](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L98)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`resume`](/sdk/content/classes/SocketSubscriber#resume)
#### Source
[providers/provider-socket.ts:111](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L111)
***
### start()
```ts theme={null}
start(): void
```
Start the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`start`](/sdk/content/classes/SocketSubscriber#start)
#### Source
[providers/provider-socket.ts:76](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L76)
***
### stop()
```ts theme={null}
stop(): void
```
Stop the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`stop`](/sdk/content/classes/SocketSubscriber#stop)
#### Source
[providers/provider-socket.ts:86](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L86)
# SocketEventSubscriber
Source: https://docs.qu.ai/sdk/content/classes/SocketEventSubscriber
A **SocketEventSubscriber** listens for event logs.
## Extends
* [`SocketSubscriber`](/sdk/content/classes/SocketSubscriber)
## Accessors
### filter
```ts theme={null}
get filter(): any[]
```
The filter.
#### Returns
`any`\[]
#### Source
[providers/provider-socket.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L46)
***
### logFilter
```ts theme={null}
get logFilter(): EventFilter
```
The filter.
#### Returns
[`EventFilter`](/sdk/content/interfaces/EventFilter)
#### Source
[providers/provider-socket.ts:267](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L267)
## Methods
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the subscriber.
#### Parameters
| Parameter | Type | Description |
| :----------------- | :-------- | :--------------------------------- |
| `dropWhilePaused`? | `boolean` | Whether to drop logs while paused. |
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`pause`](/sdk/content/classes/SocketSubscriber#pause)
#### Source
[providers/provider-socket.ts:98](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L98)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`resume`](/sdk/content/classes/SocketSubscriber#resume)
#### Source
[providers/provider-socket.ts:111](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L111)
***
### start()
```ts theme={null}
start(): void
```
Start the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`start`](/sdk/content/classes/SocketSubscriber#start)
#### Source
[providers/provider-socket.ts:76](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L76)
***
### stop()
```ts theme={null}
stop(): void
```
Stop the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`stop`](/sdk/content/classes/SocketSubscriber#stop)
#### Source
[providers/provider-socket.ts:86](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L86)
# SocketPendingSubscriber
Source: https://docs.qu.ai/sdk/content/classes/SocketPendingSubscriber
A **SocketPendingSubscriber** listens for pending transactions and emits `"pending"` events.
## Extends
* [`SocketSubscriber`](/sdk/content/classes/SocketSubscriber)
## Accessors
### filter
```ts theme={null}
get filter(): any[]
```
The filter.
#### Returns
`any`\[]
#### Source
[providers/provider-socket.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L46)
## Methods
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the subscriber.
#### Parameters
| Parameter | Type | Description |
| :----------------- | :-------- | :--------------------------------- |
| `dropWhilePaused`? | `boolean` | Whether to drop logs while paused. |
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`pause`](/sdk/content/classes/SocketSubscriber#pause)
#### Source
[providers/provider-socket.ts:98](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L98)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`resume`](/sdk/content/classes/SocketSubscriber#resume)
#### Source
[providers/provider-socket.ts:111](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L111)
***
### start()
```ts theme={null}
start(): void
```
Start the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`start`](/sdk/content/classes/SocketSubscriber#start)
#### Source
[providers/provider-socket.ts:76](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L76)
***
### stop()
```ts theme={null}
stop(): void
```
Stop the subscriber.
#### Returns
`void`
#### Inherited from
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber).[`stop`](/sdk/content/classes/SocketSubscriber#stop)
#### Source
[providers/provider-socket.ts:86](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L86)
# SocketProvider
Source: https://docs.qu.ai/sdk/content/classes/SocketProvider
A **SocketProvider** is backed by a long-lived connection over a socket, which can subscribe and receive real-time
messages over its communication channel.
## Extends
* [`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider)\<[`WebSocketLike`](/sdk/content/interfaces/WebSocketLike)>
## Extended by
* [`WebSocketProvider`](/sdk/content/classes/WebSocketProvider)
## Constructors
### new SocketProvider()
```ts theme={null}
new SocketProvider(network?, _options?): SocketProvider
```
Creates a new **SocketProvider** connected to `network`.
If unspecified, the network will be discovered.
#### Parameters
| Parameter | Type | Description |
| :---------- | :--------------------------------------------------------------------------------- | :---------------------------- |
| `network`? | [`Networkish`](/sdk/content/type-aliases/Networkish) | The network to connect to. |
| `_options`? | [`JsonRpcApiProviderOptions`](/sdk/content/type-aliases/JsonRpcApiProviderOptions) | The options for the provider. |
#### Returns
[`SocketProvider`](/sdk/content/classes/SocketProvider)
#### Overrides
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`constructor`](/sdk/content/classes/JsonRpcApiProvider#constructors)
#### Source
[providers/provider-socket.ts:320](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L320)
## Accessors
### connect
```ts theme={null}
get connect(): FetchRequest[]
```
Get the list of connected FetchRequests.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)\[]
The list of connected FetchRequests.
#### Source
[providers/abstract-provider.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1026)
***
### destroyed
```ts theme={null}
get destroyed(): boolean
```
If this provider has been destroyed using the [**destroy**](/sdk/content/classes/AbstractProvider#destroy) method.
Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further
requests may be sent to the provider.
#### Returns
`boolean`
#### Source
[providers/abstract-provider.ts:2545](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2545)
***
### paused
```ts theme={null}
get paused(): boolean
```
Whether the provider is currently paused.
A paused provider will not emit any events, and generally should not make any requests to the network, but that
is up to sub-classes to manage.
Setting `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:2577](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2577)
***
### pollingInterval
```ts theme={null}
get pollingInterval(): number
```
Get the polling interval.
#### Returns
`number`
The polling interval.
#### Source
[providers/abstract-provider.ts:1183](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1183)
***
### provider
```ts theme={null}
get provider(): this
```
Returns `this`, to allow an **AbstractProvider** to implement the [Contract Runner](../classes/ContractRunner)
interface.
#### Returns
`this`
The provider instance.
#### Source
[providers/abstract-provider.ts:1193](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1193)
***
### ready
```ts theme={null}
get ready(): boolean
```
Returns true only if the JsonRpcApiProvider.\_start | **\_start** has been called.
#### Returns
`boolean`
True if the provider is ready.
#### Source
[providers/provider-jsonrpc.ts:1117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1117)
## Methods
### \_clearTimeout()
```ts theme={null}
_clearTimeout(timerId): void
```
Clear a timer created using the AbstractProvider.\_setTimeout | **\_setTimeout** method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------- |
| `timerId` | `number` | The ID of the timer to clear. |
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`_clearTimeout`](/sdk/content/classes/JsonRpcApiProvider#_cleartimeout)
#### Source
[providers/abstract-provider.ts:2221](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2221)
***
### destroy()
```ts theme={null}
destroy(): void
```
Destroys the provider, stopping all processing and canceling all pending requests.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`destroy`](/sdk/content/classes/JsonRpcApiProvider#destroy)
#### Source
[providers/provider-jsonrpc.ts:1587](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1587)
***
### getActiveRegions()
```ts theme={null}
getActiveRegions(): Promise
```
Get the active region shards based on the protocol expansion number.
#### Returns
`Promise`\<[`Shard`](/sdk/content/enumerations/Shard)\[]>
A promise that resolves to the active shards.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveRegions`](/sdk/content/classes/JsonRpcApiProvider#getactiveregions)
#### Source
[providers/abstract-provider.ts:1110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1110)
***
### getActiveZones()
```ts theme={null}
getActiveZones(): Promise
```
Get the active zones for a shard based on the protocol expansion number.
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)\[]>
A promise that resolves to the active zones.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getActiveZones`](/sdk/content/classes/JsonRpcApiProvider#getactivezones)
#### Source
[providers/abstract-provider.ts:1127](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1127)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt?): Promise
```
Get the latest Qi rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQiToQuaiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestqitoquairate)
#### Source
[providers/abstract-provider.ts:1149](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1149)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt?): Promise
```
Get the latest Quai rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :------------------------------------------------------ |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getLatestQuaiToQiRate`](/sdk/content/classes/JsonRpcApiProvider#getlatestquaitoqirate)
#### Source
[providers/abstract-provider.ts:1068](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1068)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Get the protocol expansion number.
#### Returns
`Promise`\<`number`>
A promise that resolves to the protocol expansion number.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getProtocolExpansionNumber`](/sdk/content/classes/JsonRpcApiProvider#getprotocolexpansionnumber)
#### Source
[providers/abstract-provider.ts:1101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1101)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Qi rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQiToQuaiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getqitoquairateatblock)
#### Source
[providers/abstract-provider.ts:1162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1162)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Quai rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getQuaiToQiRateAtBlock`](/sdk/content/classes/JsonRpcApiProvider#getquaitoqirateatblock)
#### Source
[providers/abstract-provider.ts:1081](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1081)
***
### getSigner()
```ts theme={null}
getSigner(address?): Promise
```
Returns a JsonRpcSigner for the given address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------- | :----------------------------------- |
| `address`? | `string` \| `number` | The address or index of the account. |
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)>
A promise that resolves to the JsonRpcSigner.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`getSigner`](/sdk/content/classes/JsonRpcApiProvider#getsigner)
#### Throws
If the account is invalid.
#### Source
[providers/provider-jsonrpc.ts:1542](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1542)
***
### initialize()
```ts theme={null}
initialize(urls): Promise
```
Initialize the URL map with the provided URLs.
#### Type parameters
| Type parameter | Value |
| :------------- | :----------------------------------------------------------------- |
| `U` | `string`\[] \| [`FetchRequest`](/sdk/content/classes/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.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`initialize`](/sdk/content/classes/JsonRpcApiProvider#initialize)
#### Source
[providers/abstract-provider.ts:874](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L874)
***
### listAccounts()
```ts theme={null}
listAccounts(): Promise
```
Returns a list of JsonRpcSigners for all accounts.
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)\[]>
A promise that resolves to an array of JsonRpcSigners.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`listAccounts`](/sdk/content/classes/JsonRpcApiProvider#listaccounts)
#### Source
[providers/provider-jsonrpc.ts:1579](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1579)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the provider. If `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`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`pause`](/sdk/content/classes/JsonRpcApiProvider#pause)
#### Source
[providers/abstract-provider.ts:2598](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2598)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the provider.
#### Returns
`void`
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`resume`](/sdk/content/classes/JsonRpcApiProvider#resume)
#### Source
[providers/abstract-provider.ts:2627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2627)
***
### send()
```ts theme={null}
send(
method,
params,
shard?,
now?): Promise
```
Requests the `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
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------------------- |
| `method` | `string` | The method to call. |
| `params` | `any`\[] \| `Record`\<`string`, `any`> | The parameters to pass to the method. |
| `shard`? | [`Shard`](/sdk/content/enumerations/Shard) | The shard to send the request to. |
| `now`? | `boolean` | If true, the request will be sent immediately. |
#### Returns
`Promise`\<`any`>
A promise that resolves to the result of the method call.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`send`](/sdk/content/classes/JsonRpcApiProvider#send)
#### Source
[providers/provider-jsonrpc.ts:1500](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1500)
***
### shardFromHash()
```ts theme={null}
shardFromHash(hash): Shard
```
Get the shard from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------ |
| `hash` | `string` | The hash to get the shard from. |
#### Returns
[`Shard`](/sdk/content/enumerations/Shard)
The shard.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`shardFromHash`](/sdk/content/classes/JsonRpcApiProvider#shardfromhash)
#### Source
[providers/abstract-provider.ts:1047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1047)
***
### zoneFromAddress()
```ts theme={null}
zoneFromAddress(_address): Promise
```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromAddress`](/sdk/content/classes/JsonRpcApiProvider#zonefromaddress)
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Inherited from
[`JsonRpcApiProvider`](/sdk/content/classes/JsonRpcApiProvider).[`zoneFromHash`](/sdk/content/classes/JsonRpcApiProvider#zonefromhash)
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# SocketSubscriber
Source: https://docs.qu.ai/sdk/content/classes/SocketSubscriber
A **SocketSubscriber** uses a socket transport to handle events and should use
[**\_emit**](/sdk/content/classes/SocketSubscriber#_emit) to manage the events.
* A sub-class MUST call the `_start()` method once connected
* A sub-class MUST override the `_write(string)` method
* A sub-class MUST call `_processMessage(string)` for each message
## Extended by
* [`SocketBlockSubscriber`](/sdk/content/classes/SocketBlockSubscriber)
* [`SocketEventSubscriber`](/sdk/content/classes/SocketEventSubscriber)
* [`SocketPendingSubscriber`](/sdk/content/classes/SocketPendingSubscriber)
## Implements
* [`Subscriber`](/sdk/content/interfaces/Subscriber)
## Constructors
### new SocketSubscriber()
```ts theme={null}
new SocketSubscriber(
provider,
filter,
zone): SocketSubscriber
```
Creates a new **SocketSubscriber** attached to `provider` listening to `filter`.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------------------------------------ | :------------------- |
| `provider` | [`SocketProvider`](/sdk/content/classes/SocketProvider) | The socket provider. |
| `filter` | `any`\[] | The filter. |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | - |
#### Returns
[`SocketSubscriber`](/sdk/content/classes/SocketSubscriber)
#### Source
[providers/provider-socket.ts:63](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L63)
## Accessors
### filter
```ts theme={null}
get filter(): any[]
```
The filter.
#### Returns
`any`\[]
#### Source
[providers/provider-socket.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L46)
## Methods
### \_emit()
```ts theme={null}
_emit(provider, message): Promise
```
Sub-classes **must** override this to emit the events on the provider.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------------------------------------ | :------------------- |
| `provider` | [`SocketProvider`](/sdk/content/classes/SocketProvider) | The socket provider. |
| `message` | `any` | The message to emit. |
#### Returns
`Promise`\<`void`>
#### Abstract
#### Source
[providers/provider-socket.ts:151](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L151)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the subscriber.
#### Parameters
| Parameter | Type | Description |
| :----------------- | :-------- | :--------------------------------- |
| `dropWhilePaused`? | `boolean` | Whether to drop logs while paused. |
#### Returns
`void`
#### Implementation of
[`Subscriber`](/sdk/content/interfaces/Subscriber).[`pause`](/sdk/content/interfaces/Subscriber#pause)
#### Source
[providers/provider-socket.ts:98](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L98)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the subscriber.
#### Returns
`void`
#### Implementation of
[`Subscriber`](/sdk/content/interfaces/Subscriber).[`resume`](/sdk/content/interfaces/Subscriber#resume)
#### Source
[providers/provider-socket.ts:111](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L111)
***
### start()
```ts theme={null}
start(): void
```
Start the subscriber.
#### Returns
`void`
#### Implementation of
[`Subscriber`](/sdk/content/interfaces/Subscriber).[`start`](/sdk/content/interfaces/Subscriber#start)
#### Source
[providers/provider-socket.ts:76](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L76)
***
### stop()
```ts theme={null}
stop(): void
```
Stop the subscriber.
#### Returns
`void`
#### Implementation of
[`Subscriber`](/sdk/content/interfaces/Subscriber).[`stop`](/sdk/content/interfaces/Subscriber#stop)
#### Source
[providers/provider-socket.ts:86](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-socket.ts#L86)
# TransactionReceipt
Source: https://docs.qu.ai/sdk/content/classes/TransactionReceipt
A **TransactionReceipt** includes additional information about a transaction that is only available after it has been
mined.
## Extended by
* [`ContractTransactionReceipt`](/sdk/content/classes/ContractTransactionReceipt)
## Implements
* [`TransactionReceiptParams`](/sdk/content/interfaces/TransactionReceiptParams)
* `Iterable`\<[`Log`](/sdk/content/classes/Log)>
## Properties
| Property | Modifier | Type | Description |
| :------------------ | :--------- | :--------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `#logs` | `private` | readonly [`Log`](/sdk/content/classes/Log)\[] | The root hash of this transaction.
This is no present and was only included in pre-byzantium blocks, but could be used to validate certain parts of
the receipt. |
| `blockHash` | `readonly` | `string` | The block hash of the [**Block**](/sdk/content/classes/Block) this transaction was included in. |
| `blockNumber` | `readonly` | `number` | The block number of the [**Block**](/sdk/content/classes/Block) this transaction was included in. |
| `contractAddress` | `readonly` | `null` \| `string` | The address of the contract if the transaction was directly responsible for deploying one.
This is non-null **only** if the `to` is empty and the `data` was successfully executed as initcode. |
| `cumulativeGasUsed` | `readonly` | `bigint` | The amount of gas used by all transactions within the block for this and all transactions with a lower `index`.
This is generally not useful for developers but can be used to validate certain aspects of execution. |
| `from` | `readonly` | `string` | The sender of the transaction. |
| `gasPrice` | `readonly` | `bigint` | The actual gas price used during execution.
Due to the complexity of [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) this value can only be caluclated
after the transaction has been mined, snce the base fee is protocol-enforced. |
| `gasUsed` | `readonly` | `bigint` | The actual amount of gas used by this transaction.
When creating a transaction, the amount of gas that will be used can only be approximated, but the sender must
pay the gas fee for the entire gas limit. After the transaction, the difference is refunded. |
| `hash` | `readonly` | `string` | The transaction hash. |
| `index` | `readonly` | `number` | The index of this transaction within the block transactions. |
| `logsBloom` | `readonly` | `string` | The bloom filter bytes that represent all logs that occurred within this transaction. This is generally not
useful for most developers, but can be used to validate the included logs. |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider connected to the log used to fetch additional details if necessary. |
| `status` | `readonly` | `null` \| `number` | The status of this transaction, indicating success (i.e. `1`) or a revert (i.e. `0`).
This is available in post-byzantium blocks, but some backends may backfill this value. |
| `to` | `readonly` | `null` \| `string` | The address the transaction was sent to. |
| `type` | `readonly` | `number` | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction type. |
## Accessors
### fee
```ts theme={null}
get fee(): bigint
```
The total fee for this transaction, in wei.
#### Returns
`bigint`
#### Source
[providers/provider.ts:1375](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1375)
***
### logs
```ts theme={null}
get logs(): readonly Log[]
```
The logs for this transaction.
#### Returns
readonly [`Log`](/sdk/content/classes/Log)\[]
#### Source
[providers/provider.ts:1312](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1312)
## Methods
### confirmations()
```ts theme={null}
confirmations(): Promise
```
Resolves to the number of confirmations this transaction has.
#### Returns
`Promise`\<`number`>
A promise resolving to the number of confirmations.
#### Throws
If the block is not found.
#### Source
[providers/provider.ts:1426](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1426)
***
### getBlock()
```ts theme={null}
getBlock(shard): Promise
```
Resolves to the block this transaction occurred in.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |
#### Returns
`Promise`\<[`Block`](/sdk/content/classes/Block)>
A promise resolving to the block.
#### Throws
If the block is not found.
#### Source
[providers/provider.ts:1386](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1386)
***
### getResult()
```ts theme={null}
getResult(): Promise
```
Resolves to the return value of the execution of this transaction.
Support for this feature is limited, as it requires an archive node with the `debug_` or `trace_` API enabled.
#### Returns
`Promise`\<`string`>
A promise resolving to the return value of the transaction.
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:1416](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1416)
***
### getTransaction()
```ts theme={null}
getTransaction(): Promise
```
Resolves to the transaction this transaction occurred in.
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | `ExternalTransactionResponse`>
A promise resolving to the transaction.
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:1400](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1400)
***
### toJSON()
```ts theme={null}
toJSON(): any
```
Returns a JSON-compatible representation.
#### Returns
`any`
#### Source
[providers/provider.ts:1319](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1319)
# TypedDataEncoder
Source: https://docs.qu.ai/sdk/content/classes/TypedDataEncoder
A **TypedDataEncode** prepares and encodes [EIP-712](https://eips.ethereum.org/EIPS/eip-712) payloads for signed
typed data.
This is useful for those that wish to compute various components of a typed data hash, primary types, or
sub-components, but generally the higher level [`Signer.signTypedData`](../classes/Signer#signTypedData) is more
useful.
## Constructors
### new TypedDataEncoder()
```ts theme={null}
new TypedDataEncoder(types): TypedDataEncoder
```
Create a new **TypedDataEncoder** for `types`.
This performs all necessary checking that types are valid and do not violate the
[EIP-712](https://eips.ethereum.org/EIPS/eip-712) structural constraints as well as computes the
[**primaryType**](/sdk/content/classes/TypedDataEncoder).
#### Parameters
| Parameter | Type |
| :-------- | :--------------------------------------------------------------------------------- |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> |
#### Returns
[`TypedDataEncoder`](/sdk/content/classes/TypedDataEncoder)
#### Source
[hash/typed-data.ts:259](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L259)
## Properties
| Property | Modifier | Type | Description |
| :------------ | :--------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `primaryType` | `readonly` | `string` | The primary type for the structured [**types**](/sdk/content/classes/TypedDataEncoder#types).
This is derived automatically from the [**types**](/sdk/content/classes/TypedDataEncoder#types), since no recursion is possible, once the DAG for
the types is consturcted internally, the primary type must be the only remaining type with no parent nodes. |
## Accessors
### types
```ts theme={null}
get types(): Record
```
The types.
#### Returns
`Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]>
#### Source
[hash/typed-data.ts:244](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L244)
## Methods
### encode()
```ts theme={null}
encode(value): string
```
Return the fulled encoded `value` for the [**types**](/sdk/content/classes/TypedDataEncoder#types).
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------- | :------------------- |
| `value` | `Record`\<`string`, `any`> | The value to encode. |
#### Returns
`string`
The encoded value.
#### Source
[hash/typed-data.ts:465](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L465)
***
### encodeData()
```ts theme={null}
encodeData(type, value): string
```
Return the encoded `value` for the `type`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `type` | `string` | The type to encode the value for. |
| `value` | `any` | The value to encode. |
#### Returns
`string`
The encoded value.
#### Source
[hash/typed-data.ts:444](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L444)
***
### encodeType()
```ts theme={null}
encodeType(name): string
```
Return the full type for `name`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :--------------------------------- |
| `name` | `string` | The name to get the full type for. |
#### Returns
`string`
The full type.
#### Source
[hash/typed-data.ts:431](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L431)
***
### getEncoder()
```ts theme={null}
getEncoder(type): (value) => string
```
Returnthe encoder for the specific `type`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------- |
| `type` | `string` | The type to get the encoder for. |
#### Returns
`Function`
The encoder for the type.
##### Parameters
| Parameter | Type |
| :-------- | :---- |
| `value` | `any` |
##### Returns
`string`
#### Source
[hash/typed-data.ts:365](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L365)
***
### hash()
```ts theme={null}
hash(value): string
```
Return the hash of the fully encoded `value` for the [**types**](/sdk/content/classes/TypedDataEncoder#types).
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------- | :----------------- |
| `value` | `Record`\<`string`, `any`> | The value to hash. |
#### Returns
`string`
The hash of the value.
#### Source
[hash/typed-data.ts:475](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L475)
***
### hashStruct()
```ts theme={null}
hashStruct(name, value): string
```
Returns the hash of `value` for the type of `name`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------- | :-------------------- |
| `name` | `string` | The name of the type. |
| `value` | `Record`\<`string`, `any`> | The value to hash. |
#### Returns
`string`
The hash of the value.
#### Source
[hash/typed-data.ts:455](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L455)
***
### visit()
```ts theme={null}
visit(value, callback): any
```
Call `calback` for each value in `value`, passing the type and component within `value`.
This is useful for replacing addresses or other transformation that may be desired on each component, based on
its type.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------- | :----------------------------------- |
| `value` | `Record`\<`string`, `any`> | The value to visit. |
| `callback` | (`type`, `data`) => `any` | The callback to call for each value. |
#### Returns
`any`
The result of the callback.
#### Source
[hash/typed-data.ts:528](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L528)
***
### encode()
```ts theme={null}
static encode(
domain,
types,
value): string
```
Return the fully encoded [EIP-712](https://eips.ethereum.org/EIPS/eip-712) `value` for `types` with `domain`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :------------------- |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain to use. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to encode. |
| `value` | `Record`\<`string`, `any`> | The value to encode. |
#### Returns
`string`
The encoded value.
#### Source
[hash/typed-data.ts:599](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L599)
***
### from()
```ts theme={null}
static from(types): TypedDataEncoder
```
Create a new **TypedDataEncoder** for `types`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :------------------- |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to encode. |
#### Returns
[`TypedDataEncoder`](/sdk/content/classes/TypedDataEncoder)
The encoder for the types.
#### Throws
If the types are invalid.
#### Source
[hash/typed-data.ts:539](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L539)
***
### getPayload()
```ts theme={null}
static getPayload(
domain,
types,
value): any
```
Returns the JSON-encoded payload expected by nodes which implement the JSON-RPC
[EIP-712](https://eips.ethereum.org/EIPS/eip-712) method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :------------------- |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain to use. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to encode. |
| `value` | `Record`\<`string`, `any`> | The value to encode. |
#### Returns
`any`
The JSON-encoded payload.
#### Source
[hash/typed-data.ts:633](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L633)
***
### getPrimaryType()
```ts theme={null}
static getPrimaryType(types): string
```
Return the primary type for `types`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :------------------------------------- |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to get the primary type for. |
#### Returns
`string`
The primary type.
#### Throws
If the types are invalid.
#### Source
[hash/typed-data.ts:550](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L550)
***
### hash()
```ts theme={null}
static hash(
domain,
types,
value): string
```
Return the hash of the fully encoded [EIP-712](https://eips.ethereum.org/EIPS/eip-712) `value` for `types` with
`domain`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :----------------- |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain to use. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to hash. |
| `value` | `Record`\<`string`, `any`> | The value to hash. |
#### Returns
`string`
The hash of the value.
#### Source
[hash/typed-data.ts:616](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L616)
***
### hashDomain()
```ts theme={null}
static hashDomain(domain): string
```
Return the domain hash for `domain`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------------------------- | :------------------ |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain to hash. |
#### Returns
`string`
The hash of the domain.
#### Throws
If the domain is invalid.
#### Source
[hash/typed-data.ts:573](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L573)
***
### hashStruct()
```ts theme={null}
static hashStruct(
name,
types,
value): string
```
Return the hashed struct for `value` using `types` and `name`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------------------------------- | :-------------------- |
| `name` | `string` | The name of the type. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types to hash. |
| `value` | `Record`\<`string`, `any`> | The value to hash. |
#### Returns
`string`
The hash of the value.
#### Source
[hash/typed-data.ts:562](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L562)
# UTXO
Source: https://docs.qu.ai/sdk/content/classes/UTXO
Represents a UTXO (Unspent Transaction Output).
## Implements
## Implements
* `UTXOLike`
## Constructors
### new UTXO()
```ts theme={null}
new UTXO(): UTXO
```
Constructs a new UTXO instance with null properties.
#### Returns
[`UTXO`](/sdk/content/classes/UTXO)
#### Source
[transaction/utxo.ts:271](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L271)
## Accessors
### address
```ts theme={null}
get address(): string
```
Gets the address.
```ts theme={null}
set address(value): void
```
Sets the address.
#### Throws
If the address is invalid.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------- |
| `value` | `string` | The address. |
#### Returns
`string`
The address.
#### Source
[transaction/utxo.ts:217](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L217)
***
### denomination
```ts theme={null}
get denomination(): null | number
```
Gets the denomination.
```ts theme={null}
set denomination(value): void
```
Sets the denomination.
#### Throws
If the denomination value is invalid.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------- | :---------------- |
| `value` | `null` \| `number` | The denomination. |
#### Returns
`null` | `number`
The denomination.
#### Source
[transaction/utxo.ts:237](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L237)
***
### index
```ts theme={null}
get index(): null | number
```
Gets the index.
```ts theme={null}
set index(value): void
```
Sets the index.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------- | :---------- |
| `value` | `null` \| `number` | The index. |
#### Returns
`null` | `number`
The index.
#### Source
[transaction/utxo.ts:199](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L199)
***
### txhash
```ts theme={null}
get txhash(): null | string
```
Gets the transaction hash.
```ts theme={null}
set txhash(value): void
```
Sets the transaction hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------- | :-------------------- |
| `value` | `null` \| `string` | The transaction hash. |
#### Returns
`null` | `string`
The transaction hash.
#### Source
[transaction/utxo.ts:181](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L181)
## Methods
### toJSON()
```ts theme={null}
toJSON(): any
```
Converts the UTXO instance to a JSON object.
#### Returns
`any`
A JSON representation of the UTXO instance.
#### Source
[transaction/utxo.ts:284](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L284)
***
### from()
```ts theme={null}
static from(utxo): UTXO
```
Creates a UTXO instance from a UTXOLike object.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------- | :------------------------------ |
| `utxo` | `UTXOLike` | The UTXOLike object to convert. |
#### Returns
[`UTXO`](/sdk/content/classes/UTXO)
The UTXO instance.
#### Source
[transaction/utxo.ts:299](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/utxo.ts#L299)
# UnmanagedSubscriber
Source: https://docs.qu.ai/sdk/content/classes/UnmanagedSubscriber
An **UnmanagedSubscriber** is useful for events which do not require any additional management, such as `"debug"`
which only requires emit in synchronous event loop triggered calls.
## Implements
* [`Subscriber`](/sdk/content/interfaces/Subscriber)
## Constructors
### new UnmanagedSubscriber()
```ts theme={null}
new UnmanagedSubscriber(name): UnmanagedSubscriber
```
Create a new UnmanagedSubscriber with `name`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :--------------------- |
| `name` | `string` | The name of the event. |
#### Returns
[`UnmanagedSubscriber`](/sdk/content/classes/UnmanagedSubscriber)
#### Source
[providers/abstract-provider.ts:265](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L265)
## Properties
| Property | Type | Description |
| :------- | :------- | :--------------------- |
| `name` | `string` | The name of the event. |
# VoidSigner
Source: https://docs.qu.ai/sdk/content/classes/VoidSigner
A **VoidSigner** is a class deisgned to allow an address to be used in any API which accepts a Signer, but for which
there are no credentials available to perform any actual signing.
This for example allow impersonating an account for the purpose of static calls or estimating gas, but does not allow
sending transactions.
## Extends
* [`AbstractSigner`](/sdk/content/classes/AbstractSigner)
## Constructors
### new VoidSigner()
```ts theme={null}
new VoidSigner(address, provider?): VoidSigner
```
Creates a new **VoidSigner** with `address` attached to `provider`.
#### Parameters
| Parameter | Type |
| :---------- | :------------------------------------------------------- |
| `address` | `string` |
| `provider`? | `null` \| [`Provider`](/sdk/content/interfaces/Provider) |
#### Returns
[`VoidSigner`](/sdk/content/classes/VoidSigner)
#### Overrides
[`AbstractSigner`](/sdk/content/classes/AbstractSigner).[`constructor`](/sdk/content/classes/AbstractSigner#constructors)
#### Source
[signers/abstract-signer.ts:220](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/signers/abstract-signer.ts#L220)
## Properties
| Property | Modifier | Type | Description | Inherited from |
| :--------- | :--------- | :------------------------------------------------------- | :---------------------------------------- | :----------------------------------------------------------------- |
| `address` | `readonly` | `string` | The signer address. | - |
| `provider` | `readonly` | `null` \| [`Provider`](/sdk/content/interfaces/Provider) | The provider this signer is connected to. | [`AbstractSigner`](/sdk/content/classes/AbstractSigner).`provider` |
# WebSocketProvider
Source: https://docs.qu.ai/sdk/content/classes/WebSocketProvider
A JSON-RPC provider which is backed by a WebSocket.
WebSockets are often preferred because they retain a live connection to a server, which permits more instant access
to events.
However, this incurs higher server infrastructure costs, so additional resources may be required to host your own
WebSocket nodes and many third-party services charge additional fees for WebSocket endpoints.
## Extends
* [`SocketProvider`](/sdk/content/classes/SocketProvider)
## Constructors
### new WebSocketProvider()
```ts theme={null}
new WebSocketProvider(
url,
network?,
options?): WebSocketProvider
```
Create a new WebSocketProvider.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------- |
| `url` | `string` \| `string`\[] \| [`WebSocketLike`](/sdk/content/interfaces/WebSocketLike) \| [`WebSocketCreator`](/sdk/content/type-aliases/WebSocketCreator) | The URL(s) or WebSocket object or creator. |
| `network`? | [`Networkish`](/sdk/content/type-aliases/Networkish) | The network to connect to. |
| `options`? | [`JsonRpcApiProviderOptions`](/sdk/content/type-aliases/JsonRpcApiProviderOptions) | The options for the JSON-RPC API provider. |
#### Returns
[`WebSocketProvider`](/sdk/content/classes/WebSocketProvider)
#### Overrides
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`constructor`](/sdk/content/classes/SocketProvider#constructors)
#### Source
[providers/provider-websocket.ts:94](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-websocket.ts#L94)
## Properties
| Property | Type | Default value | Description |
| :--------- | :------------------------------------------------------------ | :------------ | :------------------------------------------ |
| `readyMap` | `Map`\<[`Shard`](/sdk/content/enumerations/Shard), `boolean`> | `...` | A map to track the readiness of each shard. |
## Accessors
### connect
```ts theme={null}
get connect(): FetchRequest[]
```
Get the list of connected FetchRequests.
#### Returns
[`FetchRequest`](/sdk/content/classes/FetchRequest)\[]
The list of connected FetchRequests.
#### Source
[providers/abstract-provider.ts:1026](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1026)
***
### destroyed
```ts theme={null}
get destroyed(): boolean
```
If this provider has been destroyed using the [**destroy**](/sdk/content/classes/AbstractProvider#destroy) method.
Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further
requests may be sent to the provider.
#### Returns
`boolean`
#### Source
[providers/abstract-provider.ts:2545](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2545)
***
### paused
```ts theme={null}
get paused(): boolean
```
Whether the provider is currently paused.
A paused provider will not emit any events, and generally should not make any requests to the network, but that
is up to sub-classes to manage.
Setting `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:2577](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2577)
***
### pollingInterval
```ts theme={null}
get pollingInterval(): number
```
Get the polling interval.
#### Returns
`number`
The polling interval.
#### Source
[providers/abstract-provider.ts:1183](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1183)
***
### provider
```ts theme={null}
get provider(): this
```
Returns `this`, to allow an **AbstractProvider** to implement the [Contract Runner](../classes/ContractRunner)
interface.
#### Returns
`this`
The provider instance.
#### Source
[providers/abstract-provider.ts:1193](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1193)
***
### ready
```ts theme={null}
get ready(): boolean
```
Returns true only if the JsonRpcApiProvider.\_start | **\_start** has been called.
#### Returns
`boolean`
True if the provider is ready.
#### Source
[providers/provider-jsonrpc.ts:1117](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1117)
***
### websocket
```ts theme={null}
get websocket(): WebSocketLike[]
```
Get the array of WebSocketLike objects.
#### Throws
If the websocket is closed.
#### Returns
[`WebSocketLike`](/sdk/content/interfaces/WebSocketLike)\[]
The array of WebSocketLike objects.
#### Source
[providers/provider-websocket.ts:80](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-websocket.ts#L80)
## Methods
### \_clearTimeout()
```ts theme={null}
_clearTimeout(timerId): void
```
Clear a timer created using the AbstractProvider.\_setTimeout | **\_setTimeout** method.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :---------------------------- |
| `timerId` | `number` | The ID of the timer to clear. |
#### Returns
`void`
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`_clearTimeout`](/sdk/content/classes/SocketProvider#_cleartimeout)
#### Source
[providers/abstract-provider.ts:2221](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2221)
***
### destroy()
```ts theme={null}
destroy(): Promise
```
Destroy the WebSocket connections and clean up resources.
#### Returns
`Promise`\<`void`>
A promise that resolves when the WebSocket connections are closed.
#### Overrides
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`destroy`](/sdk/content/classes/SocketProvider#destroy)
#### Source
[providers/provider-websocket.ts:399](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-websocket.ts#L399)
***
### getActiveRegions()
```ts theme={null}
getActiveRegions(): Promise
```
Get the active region shards based on the protocol expansion number.
#### Returns
`Promise`\<[`Shard`](/sdk/content/enumerations/Shard)\[]>
A promise that resolves to the active shards.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getActiveRegions`](/sdk/content/classes/SocketProvider#getactiveregions)
#### Source
[providers/abstract-provider.ts:1110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1110)
***
### getActiveZones()
```ts theme={null}
getActiveZones(): Promise
```
Get the active zones for a shard based on the protocol expansion number.
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)\[]>
A promise that resolves to the active zones.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getActiveZones`](/sdk/content/classes/SocketProvider#getactivezones)
#### Source
[providers/abstract-provider.ts:1127](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1127)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt?): Promise
```
Get the latest Qi rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getLatestQiToQuaiRate`](/sdk/content/classes/SocketProvider#getlatestqitoquairate)
#### Source
[providers/abstract-provider.ts:1149](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1149)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt?): Promise
```
Get the latest Quai rate for a zone.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :------------------------------------------------------ |
| `zone` | [`Zone`](/sdk/content/enumerations/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.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getLatestQuaiToQiRate`](/sdk/content/classes/SocketProvider#getlatestquaitoqirate)
#### Source
[providers/abstract-provider.ts:1068](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1068)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Get the protocol expansion number.
#### Returns
`Promise`\<`number`>
A promise that resolves to the protocol expansion number.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getProtocolExpansionNumber`](/sdk/content/classes/SocketProvider#getprotocolexpansionnumber)
#### Source
[providers/abstract-provider.ts:1101](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1101)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Qi rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getQiToQuaiRateAtBlock`](/sdk/content/classes/SocketProvider#getqitoquairateatblock)
#### Source
[providers/abstract-provider.ts:1162](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1162)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt?): Promise
```
Get the Quai rate at a specific block.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to get the rate for. |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/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.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getQuaiToQiRateAtBlock`](/sdk/content/classes/SocketProvider#getquaitoqirateatblock)
#### Source
[providers/abstract-provider.ts:1081](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1081)
***
### getSigner()
```ts theme={null}
getSigner(address?): Promise
```
Returns a JsonRpcSigner for the given address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :------------------- | :----------------------------------- |
| `address`? | `string` \| `number` | The address or index of the account. |
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)>
A promise that resolves to the JsonRpcSigner.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`getSigner`](/sdk/content/classes/SocketProvider#getsigner)
#### Throws
If the account is invalid.
#### Source
[providers/provider-jsonrpc.ts:1542](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1542)
***
### listAccounts()
```ts theme={null}
listAccounts(): Promise
```
Returns a list of JsonRpcSigners for all accounts.
#### Returns
`Promise`\<[`JsonRpcSigner`](/sdk/content/classes/JsonRpcSigner)\[]>
A promise that resolves to an array of JsonRpcSigners.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`listAccounts`](/sdk/content/classes/SocketProvider#listaccounts)
#### Source
[providers/provider-jsonrpc.ts:1579](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1579)
***
### pause()
```ts theme={null}
pause(dropWhilePaused?): void
```
Pause the provider. If `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`
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`pause`](/sdk/content/classes/SocketProvider#pause)
#### Source
[providers/abstract-provider.ts:2598](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2598)
***
### resume()
```ts theme={null}
resume(): void
```
Resume the provider.
#### Returns
`void`
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`resume`](/sdk/content/classes/SocketProvider#resume)
#### Source
[providers/abstract-provider.ts:2627](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L2627)
***
### send()
```ts theme={null}
send(
method,
params,
shard?,
now?): Promise
```
Requests the `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
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :--------------------------------------------- |
| `method` | `string` | The method to call. |
| `params` | `any`\[] \| `Record`\<`string`, `any`> | The parameters to pass to the method. |
| `shard`? | [`Shard`](/sdk/content/enumerations/Shard) | The shard to send the request to. |
| `now`? | `boolean` | If true, the request will be sent immediately. |
#### Returns
`Promise`\<`any`>
A promise that resolves to the result of the method call.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`send`](/sdk/content/classes/SocketProvider#send)
#### Source
[providers/provider-jsonrpc.ts:1500](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L1500)
***
### shardFromHash()
```ts theme={null}
shardFromHash(hash): Shard
```
Get the shard from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------------------ |
| `hash` | `string` | The hash to get the shard from. |
#### Returns
[`Shard`](/sdk/content/enumerations/Shard)
The shard.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`shardFromHash`](/sdk/content/classes/SocketProvider#shardfromhash)
#### Source
[providers/abstract-provider.ts:1047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1047)
***
### waitShardReady()
```ts theme={null}
waitShardReady(shard): Promise
```
Wait until the shard is ready. Max wait time is \~8 seconds.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :-------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard identifier. |
#### 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:166](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-websocket.ts#L166)
***
### zoneFromAddress()
```ts theme={null}
zoneFromAddress(_address): Promise
```
Get the zone from an address.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :-------------------------------- |
| `_address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to get the zone from. |
#### Returns
`Promise`\<[`Zone`](/sdk/content/enumerations/Zone)>
A promise that resolves to the zone.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`zoneFromAddress`](/sdk/content/classes/SocketProvider#zonefromaddress)
#### Source
[providers/abstract-provider.ts:1036](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1036)
***
### zoneFromHash()
```ts theme={null}
zoneFromHash(hash): Zone
```
Get the zone from a hash.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The hash to get the zone from. |
#### Returns
[`Zone`](/sdk/content/enumerations/Zone)
The zone.
#### Inherited from
[`SocketProvider`](/sdk/content/classes/SocketProvider).[`zoneFromHash`](/sdk/content/classes/SocketProvider#zonefromhash)
#### Source
[providers/abstract-provider.ts:1057](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/abstract-provider.ts#L1057)
# AddressStatus
Source: https://docs.qu.ai/sdk/content/enumerations/AddressStatus
Enum representing the status of an address in the wallet.
## Enumeration Members
### ATTEMPTED\_USE
```ts theme={null}
ATTEMPTED_USE: "ATTEMPTED_USE";
```
#### Source
[wallet/qi-hdwallet.ts:53](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/qi-hdwallet.ts#L53)
***
### UNKNOWN
```ts theme={null}
UNKNOWN: "UNKNOWN";
```
#### Source
[wallet/qi-hdwallet.ts:54](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/qi-hdwallet.ts#L54)
***
### UNUSED
```ts theme={null}
UNUSED: "UNUSED";
```
#### Source
[wallet/qi-hdwallet.ts:52](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/qi-hdwallet.ts#L52)
***
### USED
```ts theme={null}
USED: "USED";
```
#### Source
[wallet/qi-hdwallet.ts:51](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/qi-hdwallet.ts#L51)
# accessListify
Source: https://docs.qu.ai/sdk/content/functions/accessListify
```ts theme={null}
function accessListify(value): AccessList
```
Returns an [**AccessList**](/sdk/content/type-aliases/AccessList) from any quasi-supported access-list structure.
## Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------- | :-------------------------------------- |
| `value` | [`AccessListish`](/sdk/content/type-aliases/AccessListish) | The value to convert to an access list. |
## Returns
[`AccessList`](/sdk/content/type-aliases/AccessList)
The access list.
## Throws
If the value is not a valid access list.
## Source
[transaction/accesslist.ts:33](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/transaction/accesslist.ts#L33)
# copyRequest
Source: https://docs.qu.ai/sdk/content/functions/copyRequest
```ts theme={null}
function copyRequest(req): PreparedTransactionRequest
```
Returns a copy of `req` with all properties coerced to their strict types.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------- | :------------------------------- |
| `req` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction request to copy. |
## Returns
[`PreparedTransactionRequest`](/sdk/content/type-aliases/PreparedTransactionRequest)
The prepared transaction request.
## Throws
If the request is invalid.
## Source
[providers/provider.ts:388](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L388)
# encodeBytes32
Source: https://docs.qu.ai/sdk/content/functions/encodeBytes32
```ts theme={null}
function encodeBytes32(text): string
```
Encodes a string as a Bytes32 string. This is used to encode ABI data.
## Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------- |
| `text` | `string` | The string to encode. |
## Returns
`string`
The Bytes32-encoded string.
## Throws
If the string is too long to fit in a Bytes32 format.
## Source
[encoding/bytes32.ts:20](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/encoding/bytes32.ts#L20)
# hashMessage
Source: https://docs.qu.ai/sdk/content/functions/hashMessage
```ts theme={null}
function hashMessage(message): string
```
Computes the Quai Network equivalent of the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) personal-sign message
digest to sign.
This prefixes the message with [**MessagePrefix**](/sdk/content/variables/MessagePrefix) and the decimal length of `message` and
computes the [**keccak256**](/sdk/content/functions/keccak256) digest.
If `message` is a string, it is converted to its UTF-8 bytes first. To compute the digest of a
[**DataHexString**](../types-aliases/DataHex), it must be converted to [**bytes**](../functions/getBytes).
## Parameters
| Parameter | Type | Description |
| :-------- | :----------------------- | :------------------- |
| `message` | `string` \| `Uint8Array` | The message to hash. |
## Returns
`string`
The message digest.
## Example
```ts theme={null}
hashMessage('Hello World');
// Hashes the SIX (6) string characters, i.e.
// [ "0", "x", "4", "2", "4", "3" ]
hashMessage('0x4243');
// Hashes the TWO (2) bytes [ 0x42, 0x43 ]...
hashMessage(getBytes('0x4243'));
// ...which is equal to using data
hashMessage(new Uint8Array([0x42, 0x43]));
```
## Source
[hash/message.ts:39](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/message.ts#L39)
# id
Source: https://docs.qu.ai/sdk/content/functions/id
```ts theme={null}
function id(value): string
```
A simple hashing function which operates on UTF-8 strings to compute an 32-byte identifier.
This simply computes the [**UTF-8 bytes**](/sdk/content/functions/toUtf8Bytes) and computes the [**keccak256**](/sdk/content/functions/keccak256).
## Parameters
| Parameter | Type | Description |
| :-------- | :------- | :------------------ |
| `value` | `string` | The string to hash. |
## Returns
`string`
The 32-byte identifier.
## Example
```ts theme={null}
id('hello world');
```
## Source
[hash/id.ts:19](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/id.ts#L19)
# solidityPacked
Source: https://docs.qu.ai/sdk/content/functions/solidityPacked
```ts theme={null}
function solidityPacked(types, values): string
```
Computes the [Non-Standard Packed
Mode](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#non-standard-packed-mode) representation of `values`
respectively to their `types`.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------- | :----------------------- |
| `types` | readonly `string`\[] | The types of the values. |
| `values` | readonly `any`\[] | The values to pack. |
## Returns
`string`
The packed values.
## Example
```ts theme={null}
addr = '0x8ba1f109551bd432803012645ac136ddd64dba72';
solidityPacked(['address', 'uint'], [addr, 45]);
```
## Source
[hash/solidity.ts:110](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/solidity.ts#L110)
# solidityPackedKeccak256
Source: https://docs.qu.ai/sdk/content/functions/solidityPackedKeccak256
```ts theme={null}
function solidityPackedKeccak256(types, values): string
```
Computes the [Non-Standard Packed
Mode](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#non-standard-packed-mode)
[**keccak256**](../functions/keccak256) hash of `values` respectively to their `types`.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------- | :----------------------- |
| `types` | readonly `string`\[] | The types of the values. |
| `values` | readonly `any`\[] | The values to hash. |
## Returns
`string`
The hash of the packed values.
## Example
```ts theme={null}
addr = '0x8ba1f109551bd432803012645ac136ddd64dba72';
solidityPackedKeccak256(['address', 'uint'], [addr, 45]);
```
## Source
[hash/solidity.ts:142](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/solidity.ts#L142)
# solidityPackedSha256
Source: https://docs.qu.ai/sdk/content/functions/solidityPackedSha256
```ts theme={null}
function solidityPackedSha256(types, values): string
```
Computes the [Non-Standard Packed
Mode](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#non-standard-packed-mode) [sha256](../functions/sha256)
hash of `values` respectively to their `types`.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------- | :----------------------- |
| `types` | readonly `string`\[] | The types of the values. |
| `values` | readonly `any`\[] | The values to hash. |
## Returns
`string`
The hash of the packed values.
## Example
```ts theme={null}
addr = '0x8ba1f109551bd432803012645ac136ddd64dba72';
solidityPackedSha256(['address', 'uint'], [addr, 45]);
```
## Source
[hash/solidity.ts:163](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/solidity.ts#L163)
# toUtf8Bytes
Source: https://docs.qu.ai/sdk/content/functions/toUtf8Bytes
```ts theme={null}
function toUtf8Bytes(str, form?): Uint8Array
```
Returns the UTF-8 byte representation of `str`.
If `form` is specified, the string is normalized.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------------------- | :----------------------------- |
| `str` | `string` | The string to convert. |
| `form`? | [`UnicodeNormalizationForm`](/sdk/content/type-aliases/UnicodeNormalizationForm) | The normalization form to use. |
## Returns
`Uint8Array`
The UTF-8 byte representation.
## Throws
If the UTF-8 conversion fails.
## Source
[encoding/utf8.ts:285](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/encoding/utf8.ts#L285)
# toUtf8CodePoints
Source: https://docs.qu.ai/sdk/content/functions/toUtf8CodePoints
```ts theme={null}
function toUtf8CodePoints(str, form?): number[]
```
Returns the UTF-8 code-points for `str`.
If `form` is specified, the string is normalized.
## Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------------------- | :----------------------------- |
| `str` | `string` | The string to convert. |
| `form`? | [`UnicodeNormalizationForm`](/sdk/content/type-aliases/UnicodeNormalizationForm) | The normalization form to use. |
## Returns
`number`\[]
The UTF-8 code-points.
## Source
[encoding/utf8.ts:362](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/encoding/utf8.ts#L362)
# toUtf8String
Source: https://docs.qu.ai/sdk/content/functions/toUtf8String
```ts theme={null}
function toUtf8String(bytes, onError?): string
```
Returns the string represented by the UTF-8 data `bytes`.
When `onError` function is specified, it is called on UTF-8 errors allowing recovery using the
[**Utf8ErrorFunc**](/sdk/content/type-aliases/Utf8ErrorFunc) API. (default: [error](Utf8ErrorFuncs))
## Parameters
| Parameter | Type | Description |
| :--------- | :--------------------------------------------------------- | :--------------------------- |
| `bytes` | [`BytesLike`](/sdk/content/type-aliases/BytesLike) | The UTF-8 data to convert. |
| `onError`? | [`Utf8ErrorFunc`](/sdk/content/type-aliases/Utf8ErrorFunc) | The error handling function. |
## Returns
`string`
The string.
## Source
[encoding/utf8.ts:348](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/encoding/utf8.ts#L348)
# verifyMessage
Source: https://docs.qu.ai/sdk/content/functions/verifyMessage
```ts theme={null}
function verifyMessage(message, sig): string
```
Return the address of the private key that produced the signature `sig` during signing for `message`.
## Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------------------------- | :--------------------------- |
| `message` | `string` \| `Uint8Array` | The message that was signed. |
| `sig` | [`SignatureLike`](/sdk/content/type-aliases/SignatureLike) | The signature to verify. |
## Returns
`string`
The address of the signer.
## Source
[hash/message.ts:54](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/message.ts#L54)
# verifyTypedData
Source: https://docs.qu.ai/sdk/content/functions/verifyTypedData
```ts theme={null}
function verifyTypedData(
domain,
types,
value,
signature): string
```
Compute the address used to sign the typed data for the `signature`.
## Parameters
| Parameter | Type | Description |
| :---------- | :--------------------------------------------------------------------------------- | :---------------------------- |
| `domain` | [`TypedDataDomain`](/sdk/content/interfaces/TypedDataDomain) | The domain of the typed data. |
| `types` | `Record`\<`string`, [`TypedDataField`](/sdk/content/interfaces/TypedDataField)\[]> | The types of the typed data. |
| `value` | `Record`\<`string`, `any`> | The value of the typed data. |
| `signature` | [`SignatureLike`](/sdk/content/type-aliases/SignatureLike) | The signature to verify. |
## Returns
`string`
The address that signed the typed data.
## Source
[hash/typed-data.ts:710](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/hash/typed-data.ts#L710)
# ActionRejectedError
Source: https://docs.qu.ai/sdk/content/interfaces/ActionRejectedError
This Error indicates a request was rejected by the user.
In most clients (such as MetaMask), when an operation requires user authorization (such as `signer.sendTransaction`),
the client presents a dialog box to the user. If the user denies the request this error is thrown.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"ACTION_REJECTED"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `action` | \| `"unknown"` \| `"sendTransaction"` \| `"signTransaction"` \| `"signMessage"` \| `"signTypedData"` \| `"requestAccess"` | The requested action. | - |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `reason` | `"rejected"` \| `"pending"` \| `"expired"` | The reason the action was rejected.
If there is already a pending request, some clients may indicate there is already a `"pending"` action. This
prevents an app from spamming the user. | - |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
# BadDataError
Source: https://docs.qu.ai/sdk/content/interfaces/BadDataError
This Error indicates that a provided set of data cannot be correctly interpreted.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"BAD_DATA"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
| `value` | `any` | The data. | - |
# BlockParams
Source: https://docs.qu.ai/sdk/content/interfaces/BlockParams
A **BlockParams** encodes the minimal required properties for a formatted block.
# BufferOverrunError
Source: https://docs.qu.ai/sdk/content/interfaces/BufferOverrunError
This Error indicates an attempt was made to read outside the bounds of protected data.
Most operations in quais are protected by bounds checks, to mitigate exploits when parsing data.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"BUFFER_OVERRUN"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `buffer` | `Uint8Array` | The buffer that was overrun. | - |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `length` | `number` | The length of the buffer. | - |
| `offset` | `number` | The offset that was requested. | - |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
# CallExceptionError
Source: https://docs.qu.ai/sdk/content/interfaces/CallExceptionError
This **Error** indicates a transaction reverted.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"CALL_EXCEPTION"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :-------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `action` | [`CallExceptionAction`](/sdk/content/type-aliases/CallExceptionAction) | The action being performed when the revert was encountered. | - |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `data` | `null` \| `string` | The revert data returned. | - |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `invocation` | `null` \| \{ `"args"`: `any`\[]; `"method"`: `string`; `"signature"`: `string`; } | The contract invocation details, if available. | - |
| `reason` | `null` \| `string` | A human-readable representation of data, if possible. | - |
| `receipt?` | [`TransactionReceipt`](/sdk/content/classes/TransactionReceipt) | If the error occurred in a transaction that was mined (with a status of `0`), this is the receipt. | - |
| `revert` | `null` \| \{ `"args"`: `any`\[]; `"name"`: `string`; `"signature"`: `string`; } | The built-in or custom revert error, if available | - |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
| `transaction` | [`CallExceptionTransaction`](/sdk/content/type-aliases/CallExceptionTransaction) | The transaction that triggered the exception. | - |
# CancelledError
Source: https://docs.qu.ai/sdk/content/interfaces/CancelledError
This Error indicates that the operation was cancelled by a programmatic call, for example to `cancel()`.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"CANCELLED"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
# Eip1193Provider
Source: https://docs.qu.ai/sdk/content/interfaces/Eip1193Provider
The interface to an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) provider, which is a standard used by most
injected providers, which the [**BrowserProvider**](/sdk/content/classes/BrowserProvider) accepts and exposes the API of.
## Methods
### request()
```ts theme={null}
request(request): Promise
```
See [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) for details on this method.
#### Parameters
| Parameter | Type | Description |
| :---------------- | :----------------------------------------- | :-------------------------------- |
| `request` | `object` | The request object. |
| `request.method` | `string` | The method name. |
| `request.params`? | `any`\[] \| `Record`\<`string`, `any`> | The parameters for the method. |
| `request.shard`? | [`Shard`](/sdk/content/enumerations/Shard) | The shard to send the request to. |
#### Returns
`Promise`\<`any`>
The result of the request.
#### Source
[providers/provider-browser.ts:25](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-browser.ts#L25)
# EventEmitterable
Source: https://docs.qu.ai/sdk/content/interfaces/EventEmitterable
An **EventEmitterable** behaves similar to an EventEmitter except provides async access to its methods.
An EventEmitter implements the observer pattern.
## Extended by
* [`Provider`](/sdk/content/interfaces/Provider)
## Type parameters
| Type parameter |
| :------------- |
| `T` |
## Methods
### addListener()
```ts theme={null}
addListener(
event,
listener,
zone?): Promise>
```
Alias for [**on**](/sdk/content/interfaces/EventEmitterable#on).
#### Parameters
| Parameter | Type |
| :--------- | :----------------------------------------------- |
| `event` | `T` |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:61](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L61)
***
### emit()
```ts theme={null}
emit(
event,
zone?, ...
args?): Promise
```
Triggers each listener for `event` with the `args`.
#### Parameters
| Parameter | Type |
| :--------- | :--------------------------------------- |
| `event` | `T` |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
| ...`args`? | `any`\[] |
#### Returns
`Promise`\<`boolean`>
#### Source
[utils/events.ts:36](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L36)
***
### listenerCount()
```ts theme={null}
listenerCount(event?): Promise
```
Resolves to the number of listeners for `event`.
#### Parameters
| Parameter | Type |
| :-------- | :--- |
| `event`? | `T` |
#### Returns
`Promise`\<`number`>
#### Source
[utils/events.ts:41](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L41)
***
### listeners()
```ts theme={null}
listeners(event?): Promise
```
Resolves to the listeners for `event`.
#### Parameters
| Parameter | Type |
| :-------- | :--- |
| `event`? | `T` |
#### Returns
`Promise`\<[`Listener`](/sdk/content/type-aliases/Listener)\[]>
#### Source
[utils/events.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L46)
***
### off()
```ts theme={null}
off(
event,
listener?,
zone?): Promise>
```
Unregister the `listener` for `event`. If `listener` is unspecified, all listeners are unregistered.
#### Parameters
| Parameter | Type |
| :---------- | :----------------------------------------------- |
| `event` | `T` |
| `listener`? | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:51](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L51)
***
### on()
```ts theme={null}
on(
event,
listener,
zone?): Promise>
```
Registers a `listener` that is called whenever the `event` occurs until unregistered.
#### Parameters
| Parameter | Type |
| :--------- | :----------------------------------------------- |
| `event` | `T` |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:26](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L26)
***
### once()
```ts theme={null}
once(
event,
listener,
zone?): Promise>
```
Registers a `listener` that is called the next time `event` occurs.
#### Parameters
| Parameter | Type |
| :--------- | :----------------------------------------------- |
| `event` | `T` |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:31](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L31)
***
### removeAllListeners()
```ts theme={null}
removeAllListeners(event?): Promise>
```
Unregister all listeners for `event`.
#### Parameters
| Parameter | Type |
| :-------- | :--- |
| `event`? | `T` |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:56](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L56)
***
### removeListener()
```ts theme={null}
removeListener(
event,
listener,
zone?): Promise>
```
Alias for [**off**](/sdk/content/interfaces/EventEmitterable#off).
#### Parameters
| Parameter | Type |
| :--------- | :----------------------------------------------- |
| `event` | `T` |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<`T`>>
#### Source
[utils/events.ts:66](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L66)
# EventFilter
Source: https://docs.qu.ai/sdk/content/interfaces/EventFilter
An **EventFilter** allows efficiently filtering logs (also known as events) using bloom filters included within
blocks.
## Extended by
* [`Filter`](/sdk/content/interfaces/Filter)
* [`FilterByBlockHash`](/sdk/content/interfaces/FilterByBlockHash)
# Filter
Source: https://docs.qu.ai/sdk/content/interfaces/Filter
A **Filter** allows searching a specific range of blocks for mathcing logs.
## Extends
* [`EventFilter`](/sdk/content/interfaces/EventFilter)
## Properties
| Property | Type | Description |
| :----------- | :----------------------------------------------- | :------------------------------------------ |
| `fromBlock?` | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The start block for the filter (inclusive). |
| `toBlock?` | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The end block for the filter (inclusive). |
# FilterByBlockHash
Source: https://docs.qu.ai/sdk/content/interfaces/FilterByBlockHash
A **FilterByBlockHash** allows searching a specific block for mathcing logs.
## Extends
* [`EventFilter`](/sdk/content/interfaces/EventFilter)
## Properties
| Property | Type | Description |
| :----------- | :------- | :-------------------------------------------------- |
| `blockHash?` | `string` | The blockhash of the specific block for the filter. |
# InsufficientFundsError
Source: https://docs.qu.ai/sdk/content/interfaces/InsufficientFundsError
The sending account has insufficient funds to cover the entire transaction cost.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"INSUFFICIENT_FUNDS"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
| `transaction` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction. | - |
# InvalidArgumentError
Source: https://docs.qu.ai/sdk/content/interfaces/InvalidArgumentError
This Error indicates an incorrect type or value was passed to a function or method.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"INVALID_ARGUMENT"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------- | :--------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `argument` | `string` | The name of the argument. | - |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
| `value` | `any` | The value that was provided. | - |
# LogParams
Source: https://docs.qu.ai/sdk/content/interfaces/LogParams
A **LogParams** encodes the minimal required properties for a formatted log.
## Properties
| Property | Type | Description |
| :----------------- | :------------------- | :------------------------------------------------------------------------------------------------------------- |
| `address` | `string` | The address of the contract that emitted this log. |
| `blockHash` | `string` | The block hash of the block that included the transaction for this log. |
| `blockNumber` | `number` | The block number of the block that included the transaction for this log. |
| `data` | `string` | The data emitted with this log. |
| `index` | `number` | The index of this log. |
| `removed` | `boolean` | Whether this log was removed due to the transaction it was included in being removed dur to an orphaned block. |
| `topics` | readonly `string`\[] | The topics emitted with this log. |
| `transactionHash` | `string` | The transaction hash for the transaxction the log occurred in. |
| `transactionIndex` | `number` | The transaction index of this log. |
# MinedBlock
Source: https://docs.qu.ai/sdk/content/interfaces/MinedBlock
An Interface to indicate a [**Block**](/sdk/content/classes/Block) has been included in the blockchain. This asserts a Type Guard
that necessary properties are non-null.
Before a block is included, it is a pending block.
## Extends
* [`Block`](/sdk/content/classes/Block)
## Properties
| Property | Modifier | Type | Description | Inherited from |
| :--------- | :--------- | :--------------------------------------------- | :--------------------------------------------------------------------------------- | :----------------------------------------------- |
| `provider` | `readonly` | [`Provider`](/sdk/content/interfaces/Provider) | The provider connected to the block used to fetch additional details if necessary. | [`Block`](/sdk/content/classes/Block).`provider` |
## Accessors
### date
```ts theme={null}
get date(): null | Date
```
The [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) this block was
included at.
#### Returns
`null` | `Date`
The date this block was included at, or null if the timestamp is not available.
#### Source
[providers/provider.ts:826](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L826)
***
### length
```ts theme={null}
get length(): number
```
The number of transactions in this block.
#### Returns
`number`
The number of transactions.
#### Source
[providers/provider.ts:816](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L816)
***
### outboundEtxs
```ts theme={null}
get outboundEtxs(): readonly string[]
```
Returns the list of extended transaction hashes, in the order they were executed within the block.
#### Returns
readonly `string`\[]
The list of extended transaction hashes.
#### Source
[providers/provider.ts:689](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L689)
***
### prefetchedExtTransactions
```ts theme={null}
get prefetchedExtTransactions(): ExternalTransactionResponse[]
```
Returns the complete extended transactions, in the order they were executed within the block.
This is only available for blocks which prefetched transactions, by passing `true` to `prefetchTxs` into
[**getBlock**](/sdk/content/interfaces/Provider#getblock).
#### Throws
If the transactions were not prefetched.
#### Returns
`ExternalTransactionResponse`\[]
The list of prefetched extended transactions.
#### Source
[providers/provider.ts:737](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L737)
***
### prefetchedTransactions
```ts theme={null}
get prefetchedTransactions(): TransactionResponse[]
```
Returns the complete transactions, in the order they were executed within the block.
This is only available for blocks which prefetched transactions, by passing `true` to `prefetchTxs` into
[**getBlock**](/sdk/content/interfaces/Provider#getblock).
#### Throws
If the transactions were not prefetched.
#### Returns
[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)\[]
The list of prefetched transactions.
#### Source
[providers/provider.ts:707](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L707)
***
### transactions
```ts theme={null}
get transactions(): readonly string[]
```
Returns the list of transaction hashes, in the order they were executed within the block.
#### Returns
readonly `string`\[]
The list of transaction hashes.
#### Source
[providers/provider.ts:675](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L675)
## Methods
### getExtTransaction()
```ts theme={null}
getExtTransaction(indexOrHash): Promise
```
Get the extended transaction at `index` within this block.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :--------------------------------------------- |
| `indexOrHash` | `string` \| `number` | The index or hash of the extended transaction. |
#### Returns
`Promise`\<`ExternalTransactionResponse`>
A promise resolving to the extended transaction.
#### Inherited from
[`Block`](/sdk/content/classes/Block).[`getExtTransaction`](/sdk/content/classes/Block#getexttransaction)
#### Throws
If the extended transaction is not found.
#### Source
[providers/provider.ts:883](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L883)
***
### getPrefetchedTransaction()
```ts theme={null}
getPrefetchedTransaction(indexOrHash): TransactionResponse
```
If a **Block** was fetched with a request to include the transactions this will allow synchronous access to those
transactions.
If the transactions were not prefetched, this will throw.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :------------------------------------ |
| `indexOrHash` | `string` \| `number` | The index or hash of the transaction. |
#### Returns
[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)
The transaction.
#### Inherited from
[`Block`](/sdk/content/classes/Block).[`getPrefetchedTransaction`](/sdk/content/classes/Block#getprefetchedtransaction)
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:927](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L927)
***
### getTransaction()
```ts theme={null}
getTransaction(indexOrHash): Promise
```
Get the transaction at `index` within this block.
#### Parameters
| Parameter | Type | Description |
| :------------ | :------------------- | :------------------------------------ |
| `indexOrHash` | `string` \| `number` | The index or hash of the transaction. |
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | `ExternalTransactionResponse`>
A promise resolving to the transaction.
#### Inherited from
[`Block`](/sdk/content/classes/Block).[`getTransaction`](/sdk/content/classes/Block#gettransaction)
#### Throws
If the transaction is not found.
#### Source
[providers/provider.ts:842](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L842)
***
### isMined()
```ts theme={null}
isMined(): this is MinedBlock
```
Returns true if this block been mined. This provides a type guard for all properties on a
[**MinedBlock**](/sdk/content/interfaces/MinedBlock).
#### Returns
`this is MinedBlock`
True if the block has been mined.
#### Inherited from
[`Block`](/sdk/content/classes/Block).[`isMined`](/sdk/content/classes/Block#ismined)
#### Source
[providers/provider.ts:949](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L949)
***
### toJSON()
```ts theme={null}
toJSON(): BlockParams
```
Returns a JSON-friendly value.
#### Returns
[`BlockParams`](/sdk/content/interfaces/BlockParams)
The JSON-friendly value.
#### Inherited from
[`Block`](/sdk/content/classes/Block).[`toJSON`](/sdk/content/classes/Block#tojson)
#### Source
[providers/provider.ts:763](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L763)
# MissingArgumentError
Source: https://docs.qu.ai/sdk/content/interfaces/MissingArgumentError
This Error indicates there were too few arguments were provided.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"MISSING_ARGUMENT"`>
## Properties
| Property | Type | Description | Inherited from |
| :-------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `count` | `number` | The number of arguments received. | - |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `expectedCount` | `number` | The number of arguments expected. | - |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
# NetworkError
Source: https://docs.qu.ai/sdk/content/interfaces/NetworkError
This Error indicates a problem connecting to a network.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"NETWORK_ERROR"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `event` | `string` | The network event. | - |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
# NeuteredAddressInfo
Source: https://docs.qu.ai/sdk/content/interfaces/NeuteredAddressInfo
Interface representing information about a neutered address.
## Extended by
* [`QiAddressInfo`](/sdk/content/interfaces/QiAddressInfo)
# NonceExpiredError
Source: https://docs.qu.ai/sdk/content/interfaces/NonceExpiredError
The sending account has already used this nonce in a transaction that has been included.
## Extends
* [`quaisError`](/sdk/content/interfaces/quaisError)\<`"NONCE_EXPIRED"`>
## Properties
| Property | Type | Description | Inherited from |
| :------------- | :------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------- |
| `code` | [`ErrorCode`](/sdk/content/type-aliases/ErrorCode) | The string error code. | [`quaisError`](/sdk/content/interfaces/quaisError).`code` |
| `error?` | `Error` | Any related error. | [`quaisError`](/sdk/content/interfaces/quaisError).`error` |
| `info?` | `Record`\<`string`, `any`> | Additional info regarding the error that may be useful.
This is generally helpful mostly for human-based debugging. | [`quaisError`](/sdk/content/interfaces/quaisError).`info` |
| `shortMessage` | `string` | A short message describing the error, with minimal additional details. | [`quaisError`](/sdk/content/interfaces/quaisError).`shortMessage` |
| `transaction` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction. | - |
# OutpointInfo
Source: https://docs.qu.ai/sdk/content/interfaces/OutpointInfo
# Provider
Source: https://docs.qu.ai/sdk/content/interfaces/Provider
A **Provider** is the primary method to interact with the read-only content on Ethereum.
It allows access to details about accounts, blocks and transactions and the ability to query event logs and simulate
contract execution.
Account data includes the [**balance**](/sdk/content/interfaces/Provider#getbalance),
[**getTransactionCount**](/sdk/content/interfaces/Provider#gettransactioncount), [**code**](/sdk/content/interfaces/Provider#getcode) and
[**state trie storage**](/sdk/content/interfaces/Provider#getstorage).
Simulating execution can be used to [**call**](/sdk/content/interfaces/Provider#call), [**estimateGas**](/sdk/content/interfaces/Provider#estimategas)
and [**get transaction result**](/sdk/content/interfaces/Provider#gettransactionresult).
The [**broadcastTransaction**](/sdk/content/interfaces/Provider#broadcasttransaction) is the only method which allows updating the
blockchain, but it is usually accessed by a [Signer](../interfaces/Signer), since a private key must be used to sign
the transaction before it can be broadcast.
## Extends
* [`ContractRunner`](/sdk/content/interfaces/ContractRunner).[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable)\<[`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent)>
## Properties
| Property | Type | Description | Overrides | Inherited from |
| :----------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :--------------------------------------------------------------------------- |
| `provider` | [`Provider`](/sdk/content/interfaces/Provider) | The provider iteself.
This is part of the necessary API for executing a contract, as it provides a common property on any
[**ContractRunner**](/sdk/content/interfaces/ContractRunner) that can be used to access the read-only portion of the runner. | [`ContractRunner`](/sdk/content/interfaces/ContractRunner).`provider` | [`ContractRunner`](/sdk/content/interfaces/ContractRunner).`provider` |
| `sendTransaction?` | (`tx`: [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest)) => `Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)> | Required for state mutating calls | [`ContractRunner`](/sdk/content/interfaces/ContractRunner).`sendTransaction` | [`ContractRunner`](/sdk/content/interfaces/ContractRunner).`sendTransaction` |
## Methods
### addListener()
```ts theme={null}
addListener(
event,
listener,
zone?): Promise
```
Alias for [**on**](/sdk/content/interfaces/EventEmitterable#on).
#### Parameters
| Parameter | Type |
| :--------- | :--------------------------------------------------------- |
| `event` | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`Provider`](/sdk/content/interfaces/Provider)>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`addListener`](/sdk/content/interfaces/EventEmitterable#addlistener)
#### Source
[utils/events.ts:61](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L61)
***
### broadcastTransaction()
```ts theme={null}
broadcastTransaction(
zone,
signedTx,
from?): Promise
```
Broadcasts the `signedTx` to the network, adding it to the memory pool of any node for which the transaction
meets the rebroadcast requirements.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------------- | :---------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The zone to broadcast the transaction to. |
| `signedTx` | `string` | The signed transaction to broadcast. |
| `from`? | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address that signed the transaction. |
#### Returns
`Promise`\<[`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse)>
A promise resolving to the transaction response.
#### Throws
If the transaction is invalid or the transaction is replaced.
#### Source
[providers/provider.ts:2900](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2900)
***
### calculateConversionAmount()
#### calculateConversionAmount(from, to, value)
```ts theme={null}
calculateConversionAmount(
from,
to,
value): Promise
```
Calculate the conversion amount between two addresses from different ledgers.
##### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------- | :---------------------- |
| `from` | `string` | The source address |
| `to` | `string` | The destination address |
| `value` | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The amount to convert |
##### Returns
`Promise`\<`bigint`>
A promise resolving to the converted amount
##### Source
[providers/provider.ts:3047](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3047)
#### calculateConversionAmount(transactionArgs)
```ts theme={null}
calculateConversionAmount(transactionArgs): Promise
```
Calculate the conversion amount between two addresses from different ledgers.
##### Parameters
| Parameter | Type | Description |
| :---------------- | :----------------------------- | :------------------------------------------------------- |
| `transactionArgs` | `ConversionTransactionRequest` | The transaction arguments containing from, to, and value |
##### Returns
`Promise`\<`bigint`>
A promise resolving to the converted amount
##### Source
[providers/provider.ts:3055](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3055)
***
### call()
```ts theme={null}
call(tx): Promise
```
Simulate the execution of `tx`. If the call reverts, it will throw a
[CallExceptionError](../interfaces/CallExceptionError) which includes the revert data.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------- | :--------------------------- |
| `tx` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction to simulate. |
#### Returns
`Promise`\<`string`>
A promise resolving to the result of the execution.
#### Overrides
`ContractRunner.call`
#### Throws
If the transaction execution reverts.
#### Source
[providers/provider.ts:2888](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2888)
***
### createAccessList()
```ts theme={null}
createAccessList(tx): Promise
```
Required for populating access lists for state mutating calls
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------- | :---------- |
| `tx` | `QuaiTransactionRequest` | |
#### Returns
`Promise`\<[`AccessList`](/sdk/content/type-aliases/AccessList)>
#### Overrides
`ContractRunner.createAccessList`
#### Source
[providers/provider.ts:2878](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2878)
***
### destroy()
```ts theme={null}
destroy(): void
```
Shutdown any resources this provider is using. No additional calls should be made to this provider after calling
this.
#### Returns
`void`
#### Source
[providers/provider.ts:2746](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2746)
***
### emit()
```ts theme={null}
emit(
event,
zone?, ...
args?): Promise
```
Triggers each listener for `event` with the `args`.
#### Parameters
| Parameter | Type |
| :--------- | :--------------------------------------------------------- |
| `event` | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
| ...`args`? | `any`\[] |
#### Returns
`Promise`\<`boolean`>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`emit`](/sdk/content/interfaces/EventEmitterable#emit)
#### Source
[utils/events.ts:36](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L36)
***
### estimateFeeForQi()
```ts theme={null}
estimateFeeForQi(tx): Promise
```
Estimate the fee for a Qi transaction.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------- | :--------------------------------------- |
| `tx` | `QiPerformActionTransaction` | The transaction to estimate the fee for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the estimated fee.
#### Source
[providers/provider.ts:2870](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2870)
***
### estimateGas()
```ts theme={null}
estimateGas(tx): Promise
```
Estimates the amount of gas required to executre `tx`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------- | :--------------------------------------- |
| `tx` | [`TransactionRequest`](/sdk/content/type-aliases/TransactionRequest) | The transaction to estimate the gas for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the estimated gas.
#### Overrides
`ContractRunner.estimateGas`
#### Throws
If the transaction execution reverts.
#### Source
[providers/provider.ts:2862](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2862)
***
### getBalance()
```ts theme={null}
getBalance(address, blockTag?): Promise
```
Get the account balance (in wei) of `address`. If `blockTag` is specified and the node supports archive access
for that `blockTag`, the balance is as of that [**BlockTag**](/sdk/content/type-aliases/BlockTag).
#### Parameters
| Parameter | Type | Description |
| :---------- | :----------------------------------------------------- | :--------------------------------------- |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the balance for. |
| `blockTag`? | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The block tag to fetch the balance from. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the balance.
#### Note
On nodes without archive access enabled, the `blockTag` may be
**silently ignored** by the node, which may cause issues if relied on.
#### Source
[providers/provider.ts:2796](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2796)
***
### getBlock()
```ts theme={null}
getBlock(
shard,
blockHashOrBlockTag,
prefetchTxs?): Promise
```
Resolves to the block for `blockHashOrBlockTag`.
If `prefetchTxs`, and the backend supports including transactions with block requests, all transactions will be
included and the [**Block**](/sdk/content/classes/Block) object will not need to make remote calls for getting transactions.
#### Parameters
| Parameter | Type | Description |
| :-------------------- | :----------------------------------------------- | :------------------------------------ |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |
| `blockHashOrBlockTag` | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The block hash or block tag to fetch. |
| `prefetchTxs`? | `boolean` | If true, prefetch the transactions. |
#### Returns
`Promise`\<`null` | [`Block`](/sdk/content/classes/Block)>
A promise resolving to the block or null if not found.
#### Throws
If the block is not found.
#### Source
[providers/provider.ts:2917](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2917)
***
### getBlockNumber()
```ts theme={null}
getBlockNumber(shard): Promise
```
Get the current block number.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------- | :---------------------------------------- |
| `shard` | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block number from. |
#### Returns
`Promise`\<`number`>
A promise resolving to the block number.
#### Source
[providers/provider.ts:2757](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2757)
***
### getCode()
```ts theme={null}
getCode(address, blockTag?): Promise
```
Get the bytecode for `address`.
#### Parameters
| Parameter | Type | Description |
| :---------- | :----------------------------------------------------- | :------------------------------------ |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the code for. |
| `blockTag`? | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The block tag to fetch the code from. |
#### Returns
`Promise`\<`string`>
A promise resolving to the code stored at the address.
#### Note
On nodes without archive access enabled, the `blockTag` may be
**silently ignored** by the node, which may cause issues if relied on.
#### Source
[providers/provider.ts:2838](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2838)
***
### getFeeData()
```ts theme={null}
getFeeData(zone, txType): Promise
```
Get the best guess at the recommended [**FeeData**](/sdk/content/classes/FeeData).
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | The shard to fetch the fee data from. |
| `txType` | `boolean` | The transaction type to fetch the fee data for (true for Quai, false for Qi) |
#### Returns
`Promise`\<[`FeeData`](/sdk/content/classes/FeeData)>
A promise resolving to the fee data.
#### Source
[providers/provider.ts:2774](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2774)
***
### getLatestQiToQuaiRate()
```ts theme={null}
getLatestQiToQuaiRate(zone, amt): Promise
```
Resolves to the current Quai rate for the given amount.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :--------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | - |
| `amt` | `bigint` | The amount in quais to get the rate for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the latest Quai rate.
#### Source
[providers/provider.ts:3019](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3019)
***
### getLatestQuaiToQiRate()
```ts theme={null}
getLatestQuaiToQiRate(zone, amt): Promise
```
Resolves to the current Quai rate for the given amount.
#### Parameters
| Parameter | Type | Description |
| :-------- | :--------------------------------------- | :-------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | - |
| `amt` | `bigint` | The amount in quai to get the rate for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the latest Quai->Qi rate.
#### Source
[providers/provider.ts:3035](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3035)
***
### getLockedBalance()
```ts theme={null}
getLockedBalance(address): Promise
```
Get the locked balance for `address`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------------------- | :------------------------------------------- |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the locked balance for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the locked balance.
#### Source
[providers/provider.ts:2804](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2804)
***
### getLogs()
```ts theme={null}
getLogs(filter): Promise
```
Resolves to the list of Logs that match `filter`
#### Parameters
| Parameter | Type | Description |
| :-------- | :------------------------------------------------------------------------------------------------------------- | :------------------- |
| `filter` | [`Filter`](/sdk/content/interfaces/Filter) \| [`FilterByBlockHash`](/sdk/content/interfaces/FilterByBlockHash) | The filter to apply. |
#### Returns
`Promise`\<[`Log`](/sdk/content/classes/Log)\[]>
A promise resolving to the logs.
#### Source
[providers/provider.ts:2960](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2960)
***
### getNetwork()
```ts theme={null}
getNetwork(): Promise
```
Get the connected [**Network**](/sdk/content/classes/Network).
#### Returns
`Promise`\<[`Network`](/sdk/content/classes/Network)>
A promise resolving to the network.
#### Source
[providers/provider.ts:2765](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2765)
***
### getOutpointsByAddress()
```ts theme={null}
getOutpointsByAddress(address): Promise
```
Get the UTXO entries for `address`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :----------------------------------------------------- | :----------------------------------------- |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the UTXO entries for. |
#### Returns
`Promise`\<`Outpoint`\[]>
A promise resolving to the UTXO entries.
#### Note
On nodes without archive access enabled, the `blockTag` may be
**silently ignored** by the node, which may cause issues if relied on.
#### Source
[providers/provider.ts:2814](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2814)
***
### getPendingHeader()
```ts theme={null}
getPendingHeader(): Promise
```
Get a work object to package a transaction in.
#### Returns
`Promise`\<`WorkObjectLike`>
A promise resolving to the work object.
#### Source
[providers/provider.ts:2781](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2781)
***
### getProtocolExpansionNumber()
```ts theme={null}
getProtocolExpansionNumber(): Promise
```
Resolves to the number indicating the size of the network
#### Returns
`Promise`\<`number`>
A promise resolving to the current network size.
#### Source
[providers/provider.ts:2989](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2989)
***
### getQiToQuaiRateAtBlock()
```ts theme={null}
getQiToQuaiRateAtBlock(
zone,
blockTag,
amt): Promise
```
Resolves to the current Quai rate for the given amount.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | - |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | - |
| `amt` | `bigint` | The amount in quais to get the rate for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the latest Quai rate.
#### Source
[providers/provider.ts:3011](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3011)
***
### getQuaiToQiRateAtBlock()
```ts theme={null}
getQuaiToQiRateAtBlock(
zone,
blockTag,
amt): Promise
```
Resolves to the current Quai rate for the given amount.
#### Parameters
| Parameter | Type | Description |
| :--------- | :----------------------------------------------- | :--------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) | - |
| `blockTag` | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | - |
| `amt` | `bigint` | The amount in quais to get the rate for. |
#### Returns
`Promise`\<`bigint`>
A promise resolving to the latest Quai rate.
#### Source
[providers/provider.ts:3027](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L3027)
***
### getStorage()
```ts theme={null}
getStorage(
address,
position,
blockTag?): Promise
```
Get the storage slot value for `address` at slot `position`.
#### Parameters
| Parameter | Type | Description |
| :---------- | :------------------------------------------------------- | :--------------------------------------- |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the storage from. |
| `position` | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The position to fetch the storage from. |
| `blockTag`? | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The block tag to fetch the storage from. |
#### Returns
`Promise`\<`string`>
A promise resolving to the storage value.
#### Note
On nodes without archive access enabled, the `blockTag` may be
**silently ignored** by the node, which may cause issues if relied on.
#### Source
[providers/provider.ts:2850](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2850)
***
### getTransaction()
```ts theme={null}
getTransaction(hash): Promise
```
Resolves to the transaction for `hash`.
If the transaction is unknown or on pruning nodes which discard old transactions this resolves to `null`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :----------------------------- |
| `hash` | `string` | The transaction hash to fetch. |
#### Returns
`Promise`\<`null` | [`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | `ExternalTransactionResponse`>
A promise resolving to the transaction or null if not found.
#### Source
[providers/provider.ts:2927](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2927)
***
### getTransactionCount()
```ts theme={null}
getTransactionCount(address, blockTag?): Promise
```
Get the number of transactions ever sent for `address`, which is used as the `nonce` when sending a transaction.
If `blockTag` is specified and the node supports archive access for that `blockTag`, the transaction count is as
of that [**BlockTag**](/sdk/content/type-aliases/BlockTag).
#### Parameters
| Parameter | Type | Description |
| :---------- | :----------------------------------------------------- | :------------------------------------------------- |
| `address` | [`AddressLike`](/sdk/content/type-aliases/AddressLike) | The address to fetch the transaction count for. |
| `blockTag`? | [`BlockTag`](/sdk/content/type-aliases/BlockTag) | The block tag to fetch the transaction count from. |
#### Returns
`Promise`\<`number`>
A promise resolving to the transaction count.
#### Note
On nodes without archive access enabled, the `blockTag` may be
**silently ignored** by the node, which may cause issues if relied on.
#### Source
[providers/provider.ts:2827](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2827)
***
### getTransactionReceipt()
```ts theme={null}
getTransactionReceipt(hash): Promise
```
Resolves to the transaction receipt for `hash`, if mined.
If the transaction has not been mined, is unknown or on pruning nodes which discard old transactions this
resolves to `null`.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :--------------------------------------------- |
| `hash` | `string` | The transaction hash to fetch the receipt for. |
#### Returns
`Promise`\<`null` | [`TransactionReceipt`](/sdk/content/classes/TransactionReceipt)>
A promise resolving to the transaction receipt or null if not
found.
#### Source
[providers/provider.ts:2939](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2939)
***
### getTransactionResult()
```ts theme={null}
getTransactionResult(hash): Promise
```
Resolves to the result returned by the executions of `hash`.
This is only supported on nodes with archive access and with the necessary debug APIs enabled.
#### Parameters
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------------------- |
| `hash` | `string` | The transaction hash to fetch the result for. |
#### Returns
`Promise`\<`null` | `string`>
A promise resolving to the result or null if not found.
#### Source
[providers/provider.ts:2949](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2949)
***
### getTxPoolContent()
```ts theme={null}
getTxPoolContent(zone): Promise
```
Resolves to the current content of the transaction pool.
#### Parameters
| Parameter | Type |
| :-------- | :--------------------------------------- |
| `zone` | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<`txpoolContentResponse`>
A promise resolving to the transaction pool content.
#### Source
[providers/provider.ts:2996](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2996)
***
### listenerCount()
```ts theme={null}
listenerCount(event?): Promise
```
Resolves to the number of listeners for `event`.
#### Parameters
| Parameter | Type |
| :-------- | :--------------------------------------------------------- |
| `event`? | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
#### Returns
`Promise`\<`number`>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`listenerCount`](/sdk/content/interfaces/EventEmitterable#listenercount)
#### Source
[utils/events.ts:41](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L41)
***
### listeners()
```ts theme={null}
listeners(event?): Promise
```
Resolves to the listeners for `event`.
#### Parameters
| Parameter | Type |
| :-------- | :--------------------------------------------------------- |
| `event`? | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
#### Returns
`Promise`\<[`Listener`](/sdk/content/type-aliases/Listener)\[]>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`listeners`](/sdk/content/interfaces/EventEmitterable#listeners)
#### Source
[utils/events.ts:46](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L46)
***
### off()
```ts theme={null}
off(
event,
listener?,
zone?): Promise
```
Unregister the `listener` for `event`. If `listener` is unspecified, all listeners are unregistered.
#### Parameters
| Parameter | Type |
| :---------- | :--------------------------------------------------------- |
| `event` | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
| `listener`? | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`Provider`](/sdk/content/interfaces/Provider)>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`off`](/sdk/content/interfaces/EventEmitterable#off)
#### Source
[utils/events.ts:51](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L51)
***
### on()
```ts theme={null}
on(
event,
listener,
zone?): Promise
```
Registers a `listener` that is called whenever the `event` occurs until unregistered.
#### Parameters
| Parameter | Type |
| :--------- | :--------------------------------------------------------- |
| `event` | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`Provider`](/sdk/content/interfaces/Provider)>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`on`](/sdk/content/interfaces/EventEmitterable#on)
#### Source
[utils/events.ts:26](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L26)
***
### once()
```ts theme={null}
once(
event,
listener,
zone?): Promise
```
Registers a `listener` that is called the next time `event` occurs.
#### Parameters
| Parameter | Type |
| :--------- | :--------------------------------------------------------- |
| `event` | [`ProviderEvent`](/sdk/content/type-aliases/ProviderEvent) |
| `listener` | [`Listener`](/sdk/content/type-aliases/Listener) |
| `zone`? | [`Zone`](/sdk/content/enumerations/Zone) |
#### Returns
`Promise`\<[`Provider`](/sdk/content/interfaces/Provider)>
#### Inherited from
[`EventEmitterable`](/sdk/content/interfaces/EventEmitterable).[`once`](/sdk/content/interfaces/EventEmitterable#once)
#### Source
[utils/events.ts:31](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/events.ts#L31)
***
### removeAllListeners()
```ts theme={null}
removeAllListeners(event?): Promise