@lelantos-org/sdk / x402 / X402Options
Interface: X402Options โ
Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:17
Properties โ
allowHosts? โ
optional allowHosts?: string[];Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:29
Only pay these hostnames. Unset means any host.
allowUnshielded? โ
optional allowUnshielded?: boolean;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:27
Also pay servers that only speak standard EVM exact. Unshields into a throwaway address, so it is off by default.
budget โ
budget: Budget;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:22
Required, so an autonomous payer always has a ceiling. Human decimal units, applied per asset.
fetchImpl? โ
optional fetchImpl?: (input, init?) => Promise<Response>;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:37
Defaults to bound globalThis.fetch.
Parameters โ
| Parameter | Type |
|---|---|
input | RequestInfo | URL |
init? | RequestInit |
Returns โ
Promise<Response>
onPayment? โ
optional onPayment?: (record) => void;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:31
Fired after each successful payment. Errors from it are swallowed.
Parameters โ
| Parameter | Type |
|---|---|
record | PaymentRecord |
Returns โ
void
shielded? โ
optional shielded?: ShieldedExactOptions;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:33
Passed through to the shielded mechanism.
unshielded? โ
optional unshielded?: UnshieldedExactOptions;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:35
Passed through to the unshielded mechanism.