@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:23
Only pay these hostnames. Unset means any host.
allowUnshielded?
optional allowUnshielded?: boolean;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:21
Also pay standard EVM exact servers, unshielding into a throwaway address. Default off.
budget
budget: Budget;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:19
Required spend ceiling. Human decimal units, applied per asset.
http?
optional http?: object;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:34
Transport for the wrapped requests, named as connect's http option. fetch defaults to globalThis.fetch, looked up at call time.
fetch?
optional fetch?: (input, init?) => Promise<Response>;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:25
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:27
Passed through to the shielded mechanism.
unshielded?
optional unshielded?: UnshieldedExactOptions;Defined in: @lelantos-org/sdk/dist/x402/fetch.d.ts:29
Passed through to the unshielded mechanism.