import { Address, Hex, Chain, Hash, Abi, Narrow, AbiStateMutability, AbiFunction, AbiParameter, AbiParameterKind, AbiParameterToPrimitiveType } from 'viem'; import { ExtractAbiFunctionNames, ExtractAbiFunction } from 'abitype'; type SPECIFIC_TOKENS = "USDC" | "WRAPPED_NATIVE" | "USDT" | "DAI" | "WBTC"; type TOKEN_TYPE = "ERC20" | "NATIVE" | SPECIFIC_TOKENS; declare enum CallType { CALL = 0, DELEGATE_CALL = 1 } type CALL = { target: Address; value: bigint; data: Hex; callType: CallType; tokenAddressOffset: bigint; tokenAmountOffset: bigint; }; type CreateMagicAddressParams = { owner: string; destChain: Chain; slippage?: number; srcTokens?: { tokenType: TOKEN_TYPE; chain: Chain; minAmount?: bigint; }[]; config?: { baseUrl?: string; }; actions: { [key in TOKEN_TYPE]?: { action: CALL[]; fallBack: CALL[]; }; }; }; declare const createMagicAddress: ({ destChain, owner, slippage, actions, srcTokens, config }: CreateMagicAddressParams) => Promise; type GetMagicAddressFeeEstimatesParams = { magicAddress: Address; config?: { baseUrl?: string; }; }; type EstimatedFeeData = { token: Address; name: string; decimal: number; fee: Hex; minDeposit: Hex; }; type EstimatedFee = { chainId: number; data: EstimatedFeeData[]; }; type GetMagicAddressFeeEstimatesReturns = { estimatedFees: EstimatedFee[]; }; declare const getMagicAddressFeeEstimates: (params: GetMagicAddressFeeEstimatesParams) => Promise; type GetMagicAddressInfoParams = { magicAddress: Address; config?: { baseUrl?: string; }; }; type Call = { target: Address; data: Hex; value: string; actionType: number; tokenAddressOffset: string; tokenAmountOffset: string; }; type Action = { asset: Address; isNative: boolean; calls: Call[]; fallBack: Call[]; }; type SrcToken = { token: Address; chainId: number; minAmount: string; }; type GetMagicAddressInfoReturns = { executionChainId: number; owner: Address; magicAddress: Hex; slippage: number; srcTokens: SrcToken[]; actions: Action[]; createdAt: string; updatedAt: string; }; declare const getMagicAddressInfo: (params: GetMagicAddressInfoParams) => Promise; type GetMagicAddressStatusParams = { magicAddress: Address; page?: number; pageSize?: number; config?: { baseUrl?: string; }; }; type DepositInfo = { chainId: number; token: Address; amount: string; blockNumber: string; transactionHash: Hash; }; type BridgeInfo = { blockNumber: string; transactionHash: Hash; }; type ExecutionInfo = { blockNumber: string; chainId: number | null; outputToken: Address; transactionHash: Hash; outputAmount: string; }; type DepositedToken = { deposit: DepositInfo; bridge: BridgeInfo | null; execution: ExecutionInfo | null; }; type GetMagicAddressStatusReturns = { deposits: DepositedToken[]; totalCount: number; nextPage: number | null; totalPages: number; }; declare const getMagicAddressStatus: (params: GetMagicAddressStatusParams) => Promise; declare enum FLEX { TOKEN_ADDRESS = "TOKEN_ADDRESS", AMOUNT = "AMOUNT", NATIVE_AMOUNT = "NATIVE_AMOUNT" } declare enum AMOUNT { MAX = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", BRIDGED = "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" } declare const MAGIC_ADDRESS_SERVER_URL = "https://magic-address-server.onrender.com"; declare const TOKEN_ADDRESSES: { [chainId in number]: { [key in SPECIFIC_TOKENS]?: Address; }; }; declare const getWrappedNativeAddress: (chainId: number) => `0x${string}` | undefined; type InferFunctionName = TAbi extends Abi ? ExtractAbiFunctionNames extends infer AbiFunctionNames ? AbiFunctionNames | (TFunctionName extends AbiFunctionNames ? TFunctionName : never) | (Abi extends TAbi ? string : never) : never : TFunctionName; type GetFunctionArgs : AbiFunction, TArgs = CombinedArgs, FailedToParseArgs = ([TArgs] extends [never] ? true : false) | (readonly unknown[] extends TArgs ? true : false)> = true extends FailedToParseArgs ? readonly unknown[] : TArgs; type CombinedArgs = { [K in keyof TAbiParameters]: AbiParameterToPrimitiveType | FLEX; }; type CreateActionFromArgsParameters : never> = { target: Address | FLEX.TOKEN_ADDRESS; value?: bigint | AMOUNT | FLEX.NATIVE_AMOUNT; actionType?: CallType; tokenAddressOffset?: bigint; tokenAmountOffset?: bigint; } & ({ functionName: _FunctionName; abi: TFunctionName extends string ? Narrow : [Narrow]; args: GetFunctionArgs; } | { functionName?: undefined; abi?: never; args?: never; }); declare const createCall: ({ target, value, actionType, abi, functionName, args }: CreateActionFromArgsParameters) => CALL; export { AMOUNT, type BridgeInfo, type CALL, CallType, type CreateMagicAddressParams, type DepositInfo, type DepositedToken, type ExecutionInfo, FLEX, type GetMagicAddressFeeEstimatesParams, type GetMagicAddressFeeEstimatesReturns, type GetMagicAddressInfoParams, type GetMagicAddressInfoReturns, type GetMagicAddressStatusParams, type GetMagicAddressStatusReturns, MAGIC_ADDRESS_SERVER_URL, type SPECIFIC_TOKENS, TOKEN_ADDRESSES, type TOKEN_TYPE, createCall, createMagicAddress, getMagicAddressFeeEstimates, getMagicAddressInfo, getMagicAddressStatus, getWrappedNativeAddress };