UNPKG

@uniswap/smart-wallet-sdk

Version:

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

59 lines (58 loc) 1.69 kB
export declare const DELEGATION_MAGIC_PREFIX = "0xef0100"; /** * The target address for self-calls is address(0) */ export declare const SELF_CALL_TARGET = "0x0000000000000000000000000000000000000000"; /** * Call types for smart wallet calls * Follows ERC-7579 */ export declare enum ModeType { BATCHED_CALL = "0x0100000000000000000000000000000000000000000000000000000000000000", BATCHED_CALL_CAN_REVERT = "0x0101000000000000000000000000000000000000000000000000000000000000" } /** * Supported chain ids */ export declare enum SupportedChainIds { MAINNET = 1, UNICHAIN = 130, UNICHAIN_SEPOLIA = 1301, SEPOLIA = 11155111, BASE = 8453, OPTIMISM = 10, BNB = 56 } /** * Supported smart wallet versions * @dev keyed by github release tag */ export declare enum SmartWalletVersion { LATEST = "latest", v1_0_0 = "v1.0.0", v1_0_0_staging = "v1.0.0-staging" } type SmartWalletVersionMap = Partial<{ [version in SmartWalletVersion]: `0x${string}`; }> & { [SmartWalletVersion.LATEST]: `0x${string}`; }; /** * Smart wallet versions for supported chains */ export declare const SMART_WALLET_VERSIONS: { [chainId in SupportedChainIds]: SmartWalletVersionMap; }; /** * Mapping of chainId to Smart Wallet contract addresses * @dev Used to get the latest version of the smart wallet * See README for detailed deployment addresses along with the commit hash */ export declare const SMART_WALLET_ADDRESSES: { [k: string]: `0x${string}`; }; /** * Get all historical smart wallet versions for a given chain id */ export declare const getAllSmartWalletVersions: (chainId: SupportedChainIds) => `0x${string}`[]; export {};