The Request Network client.
import { RequestNetwork } from "@requestnetwork/request-client.js";| Name | Type | Required? | Description |
|---|---|---|---|
| nodeConnectionConfig | AxiosRequestConfig | recommended | Axios configurations |
| signatureProvider | ISignatureProvider | recommended | Required to sign and create requests |
| decryptionProvider | IDecryptionProvider | optional | Required to retrieve encrypted requests |
| httpConfig | IHttpDataAccessConfig | optional | Options for HTTP transport (timeout, delay, retry, etc.) |
| paymentOptions | PaymentNetworkOptions | optional | Payment detection options |
| useMockStorage | boolean | optional | Store ephemeral requests in local memory |
| currencies | CurrencyInput[] | optional | Custom currency list |
| currencyManager | ICurrencyManager | optional | Custom currency manager (will override currencies). A Currency manager handles a list of currencies and provides utility to retrieve and change format |
| Name | Type | Required? | Description |
|---|---|---|---|
| baseUrl | string | recommended | Request Node URL |
| Many other properties... | optional |
| Type | Description |
|---|---|
| Web3SignatureProvider | Sign using a private key inside of a wallet |
| EthereumPrivateKeySignatureProvider | Sign using a private key outside of a wallet |
| Type | Description |
|---|---|
| EthereumPrivateKeyDecryptionProvider | Decrypt using a private key outside of a wallet |
| Name | Type | Required? | Description |
|---|---|---|---|
| requestClientVersionHeader | string | false | Name of the header containing the client version |
| httpRequestMaxRetry | number | false | Maximum number of retries to attempt when http requests to the Node fail |
| httpRequestRetryDelay | number | false | Delay between retry in ms |
| httpRequestExponentialBackoffDelay | number | false | Exponential backoff delay in ms when requests to the Node fail |
| httpRequestMaxExponentialBackoffDelay | number | false | Maximum exponential backoff delay in ms when requests to the Node fail |
| getConfirmationMaxRetry | number | false | Maximum number of retries to get the confirmation of a persistTransaction |
| getConfirmationRetryDelay | number | false | Delay between retry in ms to get the confirmation of a persistTransaction |
| getConfirmationExponentialBackoffDelay | number | false | Exponential backoff delay in ms to get the confirmation of a persistTransaction |
| getConfirmationMaxExponentialBackoffDelay | number | false | Maximum exponential backoff delay in ms to get the confirmation of a persistTransaction |
| getConfirmationDeferDelay | number | false | Delay to wait in ms before trying for the first time to get the confirmation of a persistTransaction |
| Name | Type | Required? | Description |
|---|---|---|---|
| bitcoinDetectionProvider | IBitcoinDetectionProvider | false | Override default bitcoin payment detection |
| explorerApiKeys | Map<ChainName, string> | false | Override explorer API keys |
| getSubgraphClient | function(ChainName) | false | Override subgraph payment detection |
| getRpcProvider | function(ChainName) | false | Override RPC node provider |
| Name | Description |
|---|---|
| createRequest() | Create an unencrypted request |
| _createEncryptedRequest() | Create an encrypted request. Docs coming soon... |
| computeRequestId() | Compute a request ID without actually creating a request |
| fromRequestId() | Retrieve a request from a requestId |
| fromIdentity() | Retrieve an array of requests from an Identity |
| fromTopic() | Retrieve an array of requests from a topic |