import { ResultAsync } from 'neverthrow'; import { Address } from 'viem'; import { z } from 'zod'; declare class SdkError extends Error { readonly code: TCode; readonly cause?: unknown; readonly context?: Record; constructor(message: string, options: { code: TCode; cause?: unknown; context?: Record; }); } type ProfileErrorCode = "VALIDATION_ERROR" | "CONTRACT_READ_ERROR"; declare class ProfileError extends SdkError { constructor(message: string, options: { code: ProfileErrorCode; cause?: unknown; context?: Record; }); } declare const ZodUsdcBalanceParamsSchema: z.ZodObject<{ address: z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>; }, z.core.$strip>; type UsdcBalanceParams = z.infer; declare const ZodUsdcAllowanceParamsSchema: z.ZodObject<{ owner: z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>; }, z.core.$strip>; type UsdcAllowanceParams = z.infer; declare const ZodGetBalancesParamsSchema: z.ZodObject<{ address: z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>; currency: z.ZodEnum<{ IDR: "IDR"; INR: "INR"; BRL: "BRL"; ARS: "ARS"; MEX: "MEX"; VEN: "VEN"; BOB: "BOB"; EUR: "EUR"; NGN: "NGN"; USD: "USD"; COP: "COP"; CUP: "CUP"; ECU: "ECU"; PEN: "PEN"; PHP: "PHP"; }>; }, z.core.$strip>; type GetBalancesParams = z.infer; declare const ZodTxLimitsParamsSchema: z.ZodObject<{ address: z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>; currency: z.ZodEnum<{ IDR: "IDR"; INR: "INR"; BRL: "BRL"; ARS: "ARS"; MEX: "MEX"; VEN: "VEN"; BOB: "BOB"; EUR: "EUR"; NGN: "NGN"; USD: "USD"; COP: "COP"; CUP: "CUP"; ECU: "ECU"; PEN: "PEN"; PHP: "PHP"; }>; }, z.core.$strip>; type TxLimitsParams = z.infer; /** * Minimal viem PublicClient interface — consumers pass their own client. * The SDK uses `readContract` for single reads and `multicall` where available * to batch multiple reads into one RPC round-trip. */ interface PublicClientLike { readContract(args: { address: Address; abi: readonly unknown[]; functionName: string; args: readonly unknown[]; }): Promise; multicall?(args: { contracts: readonly { address: Address; abi: readonly unknown[]; functionName: string; args?: readonly unknown[]; }[]; allowFailure?: boolean; }): Promise; } interface TxLimits { readonly buyLimit: number; readonly sellLimit: number; } interface ProfileConfig { readonly publicClient: PublicClientLike; readonly diamondAddress: Address; readonly usdcAddress: Address; } interface Balances { /** USDC balance formatted to a number. */ readonly usdc: number; /** Fiat equivalent: usdc * sellPrice. */ readonly fiat: number; /** The sell price used for conversion. */ readonly sellPrice: number; } interface Profile { /** Reads the USDC balance for a given address (raw bigint, 6 decimals). */ getUsdcBalance(params: UsdcBalanceParams): ResultAsync; /** Reads the USDC allowance `owner → diamond` (raw bigint, 6 decimals). */ getUsdcAllowance(params: UsdcAllowanceParams): ResultAsync; /** Fetches USDC and fiat balance in parallel for a given address and currency. */ getBalances(params: GetBalancesParams): ResultAsync; /** Reads buy and sell transaction limits for a given address and currency. */ getTxLimits(params: TxLimitsParams): ResultAsync; } /** Creates a Profile SDK instance for reading user-scoped balance and limit data. */ declare function createProfile(config: ProfileConfig): Profile; export { type Balances, type GetBalancesParams, type Profile, type ProfileConfig, ProfileError, type ProfileErrorCode, type PublicClientLike, type TxLimits, type TxLimitsParams, type UsdcAllowanceParams, type UsdcBalanceParams, createProfile };