UNPKG

@uniswap/smart-wallet-sdk

Version:

⚒️ An SDK for building applications with smart wallets on Uniswap

52 lines (51 loc) 1.63 kB
import { BatchedCall } from '../types'; import { CallPlanner } from './callPlanner'; export declare const BATCHED_CALL_ABI_PARAMS: readonly [{ readonly type: "tuple"; readonly components: readonly [{ readonly type: "tuple[]"; readonly components: readonly [{ readonly type: "address"; readonly name: "to"; }, { readonly type: "uint256"; readonly name: "value"; }, { readonly type: "bytes"; readonly name: "data"; }]; readonly name: "calls"; }, { readonly type: "bool"; readonly name: "revertOnFailure"; }]; }]; /** * BatchedCallPlanner is used to encode a BatchedCall, which are `calls` and `revertOnFailure` */ export declare class BatchedCallPlanner { callPlanner: CallPlanner; revertOnFailure: boolean; /** * Create a new BatchedCallPlanner * @param callPlanner optionally initialize with a CallPlanner * @param revertOnFailure optionally initialize with a boolean for revertOnFailure */ constructor(callPlanner: CallPlanner, revertOnFailure?: boolean); /** * Get the total value of the calls */ get value(): bigint; /** * Add a command to execute a call * @param to The target address of the call * @param value The ETH value to send with the call * @param data The calldata for the call */ add(to: `0x${string}`, value: bigint, data: `0x${string}`): BatchedCallPlanner; /** * Encode the BatchedCall */ encode(): `0x${string}`; toBatchedCall(): BatchedCall; }