Skip to content

Commit

Permalink
docs: add documentation on ProviderOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Mar 5, 2024
1 parent d99552f commit a1e6dc4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/account/src/providers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,30 @@ export type CursorPaginationArgs = {
* Provider initialization options
*/
export type ProviderOptions = {
/**
* Custom fetch function to use for making requests.
*/
fetch?: (
url: string,
requestInit?: RequestInit,
providerOptions?: Omit<ProviderOptions, 'fetch'>
) => Promise<Response>;
/**
* Timeout [ms] after which every request will be aborted.
*/
timeout?: number;
/**
* Cache UTXOs for the given time [ms].
*/
cacheUtxo?: number;
/**
* Retry options to use when fetching data from the node.
*/
retryOptions?: RetryOptions;
/**
* Middleware to modify the request before it is sent.
* This can be used to add headers, modify the body, etc.
*/
requestMiddleware?: (request: RequestInit) => RequestInit | Promise<RequestInit>;
};

Expand Down

0 comments on commit a1e6dc4

Please sign in to comment.