Skip to main content
type FetchWithX402Options = {
  address?:   | EvmAddress
     | string;
  fetch?: typeof globalThis.fetch;
  maxValue?: bigint;
  paymentRequirementsSelector?: PaymentRequirementsSelector;
  config?: X402Config;
};
Options for the fetchWithX402 function.

Properties

PropertyTypeDescription
address?| EvmAddress | stringThe address of the account to use for the fetch function.
fetch?typeof globalThis.fetchThe fetch function to use for the fetch function.
maxValue?bigintThe maximum allowed payment amount in base units (defaults to 0.1 USDC)
paymentRequirementsSelector?PaymentRequirementsSelectorA function that selects the payment requirements from the response
config?X402ConfigOptional configuration for X402 operations (e.g., custom RPC URLs)