RequestNetwork
Description
The Request Network client.
Usage
Constructor Paramters
Name | Type | Required? | Description |
---|---|---|---|
nodeConnectionConfig | recommended | Axios configurations | |
signatureProvider | recommended | Required to sign and create requests | |
decryptionProvider | optional | Required to retrieve encrypted requests | |
httpConfig | optional | Options for HTTP transport (timeout, delay, retry, etc.) | |
paymentOptions | 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 |
Types and Interfaces
AxiosRequestConfig Properties
Name | Type | Required? | Description |
---|---|---|---|
baseUrl | string | recommended | Request Node URL |
Many other properties... | optional |
ISignatureProvider Implementations
Type | Description |
---|---|
Sign using a private key inside of a wallet | |
Sign using a private key outside of a wallet |
IDecryptionProvider Implementations
Type | Description |
---|---|
Decrypt using a private key outside of a wallet |
IHttpDataAccessConfig Properties
Name | Type | Required? | Description |
---|---|---|---|
requestClientVersionHeader | string | Name of the header containing the client version | |
httpRequestMaxRetry | number | Maximum number of retries to attempt when http requests to the Node fail | |
httpRequestRetryDelay | number | Delay between retry in ms | |
httpRequestExponentialBackoffDelay | number | Exponential backoff delay in ms when requests to the Node fail | |
httpRequestMaxExponentialBackoffDelay | number | Maximum exponential backoff delay in ms when requests to the Node fail | |
getConfirmationMaxRetry | number | Maximum number of retries to get the confirmation of a persistTransaction | |
getConfirmationRetryDelay | number | Delay between retry in ms to get the confirmation of a persistTransaction | |
getConfirmationExponentialBackoffDelay | number | Exponential backoff delay in ms to get the confirmation of a persistTransaction | |
getConfirmationMaxExponentialBackoffDelay | number | Maximum exponential backoff delay in ms to get the confirmation of a persistTransaction | |
getConfirmationDeferDelay | number | Delay to wait in ms before trying for the first time to get the confirmation of a persistTransaction |
PaymentNetworkOptions Properties
Name | Type | Required? | Description |
---|---|---|---|
bitcoinDetectionProvider | IBitcoinDetectionProvider | Override default bitcoin payment detection | |
explorerApiKeys | Map<ChainName, string> | Override explorer API keys | |
getSubgraphClient | function(ChainName) | Override subgraph payment detection | |
getRpcProvider | function(ChainName) | Override RPC node provider |
Instance Methods
Name | Description |
---|---|
Create an unencrypted request | |
_createEncryptedRequest() | Create an encrypted request. Docs coming soon... |
Compute a request ID without actually creating a request | |
Retrieve a request from a requestId | |
Retrieve an array of requests from an Identity | |
Retrieve an array of requests from a topic |
Last updated