import { ForeignToken } from "@daimo/contract"; import { Address, Hex } from "viem"; import { z } from "zod"; import { DaimoLinkNote } from "./daimoLink"; import { EAccount } from "./eAccount"; export declare const zAddress: z.ZodEffects; export declare enum AddrLabel { Faucet = "team daimo", PaymentLink = "payment link", RequestLink = "request link", Paymaster = "fee", Coinbase = "coinbase", Relay = "relay.link", LiFi = "li.fi bridge", UniswapETHPool = "swapped ETH", Binance = "binance", FastCCTP = "cross-chain" } /** Subset of EAccount for Daimo accounts, which always have a name. */ export interface DAccount { addr: Address; name: string; } export declare const zHex: z.ZodEffects; export declare const zBigIntStr: z.ZodEffects; export type BigIntStr = `${bigint}`; export declare const zDollarStr: z.ZodEffects; export type DollarStr = `${number}`; export declare const zInviteCodeStr: z.ZodString; export declare const zTrackedRequest: z.ZodObject<{ requestId: z.ZodEffects; amount: z.ZodEffects; }, "strip", z.ZodTypeAny, { requestId: `${bigint}`; amount: `${bigint}`; }, { requestId: string; amount: string; }>; export type TrackedRequest = z.infer; export interface TrackedNote extends DaimoLinkNote { opHash?: Hex; } export declare const zKeyData: z.ZodObject<{ pubKey: z.ZodEffects; addedAt: z.ZodNumber; slot: z.ZodNumber; }, "strip", z.ZodTypeAny, { pubKey: `0x${string}`; addedAt: number; slot: number; }, { pubKey: string; addedAt: number; slot: number; }>; export type KeyData = z.infer; export declare const zUserOpHex: z.ZodObject<{ sender: z.ZodEffects; nonce: z.ZodEffects; initCode: z.ZodEffects; callData: z.ZodEffects; callGasLimit: z.ZodEffects; verificationGasLimit: z.ZodEffects; preVerificationGas: z.ZodEffects; maxFeePerGas: z.ZodEffects; maxPriorityFeePerGas: z.ZodEffects; paymasterAndData: z.ZodEffects; signature: z.ZodEffects; }, "strip", z.ZodTypeAny, { signature: `0x${string}`; sender: `0x${string}`; nonce: `0x${string}`; initCode: `0x${string}`; callData: `0x${string}`; callGasLimit: `0x${string}`; verificationGasLimit: `0x${string}`; preVerificationGas: `0x${string}`; maxFeePerGas: `0x${string}`; maxPriorityFeePerGas: `0x${string}`; paymasterAndData: `0x${string}`; }, { signature: string; sender: string; nonce: string; initCode: string; callData: string; callGasLimit: string; verificationGasLimit: string; preVerificationGas: string; maxFeePerGas: string; maxPriorityFeePerGas: string; paymasterAndData: string; }>; export type UserOpHex = z.infer; export declare const zRecommendedExchange: z.ZodObject<{ title: z.ZodOptional; cta: z.ZodString; logo: z.ZodOptional; url: z.ZodString; sortId: z.ZodOptional; }, "strip", z.ZodTypeAny, { cta: string; url: string; title?: string | undefined; logo?: string | undefined; sortId?: number | undefined; }, { cta: string; url: string; title?: string | undefined; logo?: string | undefined; sortId?: number | undefined; }>; export type RecommendedExchange = z.infer; export declare const zEmailAddress: z.ZodString; export type EmailAddress = z.infer; export declare const zPhoneNumber: z.ZodString; export type PhoneNumber = z.infer; export type TagRedirectEvent = { time: number; tag: string; link: string; }; export declare const zCreateInviteLinkArgs: z.ZodObject<{ code: z.ZodString; bonusDollarsInvitee: z.ZodNumber; bonusDollarsInviter: z.ZodNumber; maxUses: z.ZodNumber; inviter: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; inviter: string; bonusDollarsInvitee: number; bonusDollarsInviter: number; maxUses: number; }, { code: string; inviter: string; bonusDollarsInvitee: number; bonusDollarsInviter: number; maxUses: number; }>; export type CreateInviteLinkArgs = z.infer; export interface SwapQuery { fromCoin: ForeignToken; fromAmount: BigIntStr; fromAcc: EAccount; receivedAt: number; cacheUntil: number; toCoin: Address; execDeadline: number; } export type ProposedSwap = SwapQuery & { routeFound: true; toAmount: number; execRouterAddress: Address; execCallData: Hex; execValue: Hex; }; type SwapNoRoute = SwapQuery & { routeFound: false; }; export type SwapQueryResult = SwapNoRoute | ProposedSwap; export type PlatformType = "ios" | "android" | "other"; export interface SuggestedAction { id: string; icon?: string; title: string; subtitle: string; url: string; } export declare function dateToUnix(d: Date): number; export declare function unixToDate(unix: number): Date; export {};