export type Address = `0x${string}`; export type Hex = `0x${string}`; export type Hash = `0x${string}`; export type EmptyHex = `0x`; export type PromiseOrValue = T | Promise; export type BigNumberish = string | bigint | number; export type BytesLike = Uint8Array | string; export interface SendUserOpResponse { userOpHash: Hash; transactionHash?: Hash; } export interface ClientOptions { chainId: number; privateKey?: string; rpcUrl?: string; isSponsoredTrx?: boolean; noAccountCreateSponsorship?: boolean; paymasterEndpoint?: string; paymaster?: "PIMLICO" | "STACKUP" | "0xGasless"; paymasterId?: string; erc20token?: string; bundlerEndpoint?: string; } export interface TelegramClientOptions { chainId: number; telegramUserId: string; walletAddress: Address; rpcUrl?: string; isSponsoredTrx?: boolean; paymasterEndpoint?: string; paymaster?: "PIMLICO" | "STACKUP"; bundlerEndpoint?: string; } export interface UserOperationCallData { target: Address; data: Hex; value?: bigint; } export type BatchUserOperationCallData = UserOperationCallData[]; export interface UserOperationRequest { sender: Address; nonce: Hex; initCode: Hex | EmptyHex; callData: Hex; callGasLimit: Hex; verificationGasLimit: Hex; preVerificationGas: Hex; maxFeePerGas: Hex; maxPriorityFeePerGas: Hex; paymasterAndData: Hex | EmptyHex; signature: Hex; } export interface UserOperationResponse extends UserOperationRequest { entryPoint: Address; blockNumber: BigNumberish; blockHash: Hash; transactionHash: Hash; } export interface UserOperationReceipt { userOpHash: Hash; entryPoint: Address; sender: Address; nonce: BigNumberish; paymaster?: Address; actualGasCost: BigNumberish; actualGasUsed: BigNumberish; success: boolean; reason?: string; logs: string[]; receipt: UserOperationReceiptObject; } export interface UserOperationReceiptObject { blockHash: Hash; blockNumber: BigNumberish; transactionIndex: BigNumberish; transactionHash: Hash; from: Address; to: Address; cumulativeGasUsed: BigNumberish; gasUsed: BigNumberish; contractAddress: Address; logs: UserOperationReceiptLog[]; logsBloom: Hex; root: Hex; status: number; effectiveGasPrice: BigNumberish; type: string; } export interface UserOperationReceiptLog { blockHash: Hash; blockNumber: BigNumberish; transactionIndex: BigNumberish; address: Address; logIndex: BigNumberish; data: Hex; removed: boolean; topics: string[]; transactionHash: Hash; } export interface UserOperationStruct { sender: PromiseOrValue; nonce: PromiseOrValue; initCode: PromiseOrValue; callData: PromiseOrValue; callGasLimit?: PromiseOrValue; verificationGasLimit?: PromiseOrValue; preVerificationGas?: PromiseOrValue; maxFeePerGas?: PromiseOrValue; maxPriorityFeePerGas?: PromiseOrValue; paymasterAndData: PromiseOrValue; signature: PromiseOrValue; }