@lelantos-org/sdk / x402 / UnshieldedExactOptions
Interface: UnshieldedExactOptions
Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:7
Properties
assetIds?
optional assetIds?: readonly AssetId[];Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:13
MASP asset ids to consider when resolving the server's ERC-20 address. Default: every registered asset over that token (each verified against the pool). Pass ids to restrict which assets may fund a payment.
index?
optional index?: number;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:19
Pin the ephemeral payer slot. Defaults to a slot derived from the resource host, giving each server a distinct payer address (see hostPayerIndex). Set to reuse one address across hosts.
maxPolls?
optional maxPolls?: number;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:30
Give up waiting after this many polls. Default 30.
onPhase?
optional onPhase?: (phase, info) => void;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:26
Forwarded to wallet.withdraw.
Parameters
| Parameter | Type |
|---|---|
phase | SpendPhase |
info | PhaseInfo |
Returns
void
onTopUp?
optional onTopUp?: (info) => void;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:41
Fires when a top-up is about to unshield into the payer address. Must not throw.
The budget caps payments, not the withdrawals that fund them: a top-up moves value to an address the user controls, and counting it would double-count every payment made from it. topUpMultiple withdraws more than one payment costs and a poll timeout leaves no other record, so this hook is how top-ups are observed.
Parameters
| Parameter | Type |
|---|---|
info | { amount: CircuitAmount; asset: AssetId; payer: EvmAddress; } |
info.amount | CircuitAmount |
info.asset | AssetId |
info.payer | EvmAddress |
Returns
void
pollMs?
optional pollMs?: number;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:28
Poll interval while waiting for the withdrawal to land. Default 2000ms.
topUpMultiple?
optional topUpMultiple?: bigint;Defined in: @lelantos-org/sdk/dist/x402/unshielded.d.ts:24
When a top-up is needed, withdraw this many times the payment so one proving run covers several calls. Default 10.