Skip to main content

FeeProxy refund preparation

Version: V2
View Markdown

API for @0xintuition/sdk@4.1.0. Compatibility · Source.

Import from @0xintuition/sdk/actions.

Signatures show the exact accepted inputs and return types. Named input/output structures and dependency-injection types are listed below; viem and protocol types come from their respective packages. Preparation and quote functions can perform RPC reads. Envelope builders on the action-envelope pages use caller-supplied read context and perform no RPC reads or signing. feeProxyExecutePlan sends transactions; the other SDK actions on these pages prepare transactions or read data.

feeProxyClaimRefundIfAny​

Checks the pull-fallback refund ledger and builds a claimRefundTo transaction only when the user is owed something. FeeProxy pushes excess msg.value back first and only credits the ledger when that push fails, so for most callers this returns null; it never builds a claim that would revert FeeProxy_NoRefundOwed.

Source

function feeProxyClaimRefundIfAny(
config: ReadConfig,
inputs: {
user: Address;
recipient?: Address;
},
): Promise<FeeProxyRefundClaim | null>;
  • config: FeeProxy address and public client.
  • inputs: The ledger owner, and where to send the refund (defaults to the owner). Pass a different recipient when the owner is a contract whose receive reverts.
  • returns: The claim transaction and amount, or null when nothing is owed.

Imported type provenance​

Public import locations and the definitions used by these signatures and helper types. Value imports appear where a dependency hook uses typeof.

Name in this modulePublic importDefinition
ReadConfigimport type { ReadConfig } from '@0xintuition/periphery'Source definition
Addressimport type { Address } from 'viem'Owned by the external package.
Heximport type { Hex } from 'viem'Owned by the external package.

Supporting input and result structures​

These declarations retain their owning source links. Internal supporting types describe accepted shapes but are not standalone public imports.

ReadConfig​

Source definition

export type ReadConfig = {
address: Address;
publicClient: PublicClient;
};

Input and result types​

Exported declarations are public imports from the SDK subpath above. Module-local helper aliases describe accepted shapes but are not public exports.

FeeProxyRefundClaim​

Public export.

export type FeeProxyRefundClaim = {
amount: bigint;
tx: {
/** The ledger owner. Only this account can claim its refund. */
from: Address;
to: Address;
data: Hex;
value: bigint;
};
};

Applies to V2 · @0xintuition/sdk 4.1.0