{"version":3,"file":"client.cjs","sources":["../../../../src/wallet/client.ts"],"sourcesContent":["import type {\n  GetIdentityRequest,\n  GetIdentityResponse,\n  GetBatchIdentityRequest,\n  GetBatchIdentityResponse,\n  GetBalancesRequest,\n  GetBalancesResponse,\n  GetHistoryRequest,\n  GetHistoryResponse,\n  GetTransfersRequest,\n  GetTransfersResponse,\n  GetFundedByRequest,\n  GetFundedByResponse,\n} from \"./types\";\n\n/**\n * Wallet API client interface\n *\n * Provides methods for querying Solana wallet data including identity, balances,\n * transaction history, transfers, and funding sources.\n *\n * @beta The Wallet API is currently in beta. APIs and response formats may change.\n *\n * @example\n * ```ts\n * import { createHelius } from \"helius-sdk\";\n *\n * const helius = createHelius({ apiKey: \"your-api-key\" });\n *\n * // Get wallet identity\n * const identity = await helius.wallet.getIdentity({ wallet: \"...\" });\n *\n * // Get balances\n * const balances = await helius.wallet.getBalances({ wallet: \"...\" });\n *\n * // Get transaction history\n * const history = await helius.wallet.getHistory({ wallet: \"...\", limit: 50 });\n * ```\n */\nexport interface WalletClient {\n  /**\n   * Get wallet identity information for known addresses\n   *\n   * @param params - Request parameters including wallet address\n   * @returns Identity information if available\n   * @throws Error if HTTP error or wallet identity not found (404)\n   */\n  getIdentity(params: GetIdentityRequest): Promise<GetIdentityResponse>;\n\n  /**\n   * Batch identity lookup for multiple wallet addresses (max 100)\n   *\n   * @param params - Request parameters including array of wallet addresses\n   * @returns Array of identity information for requested addresses\n   * @throws Error if HTTP error or invalid request\n   */\n  getBatchIdentity(\n    params: GetBatchIdentityRequest\n  ): Promise<GetBatchIdentityResponse>;\n\n  /**\n   * Get all token and NFT balances for a wallet with pagination\n   *\n   * @param params - Request parameters including wallet address and pagination options\n   * @returns Token and NFT balances with pagination metadata\n   * @throws Error if HTTP error or invalid wallet address\n   */\n  getBalances(params: GetBalancesRequest): Promise<GetBalancesResponse>;\n\n  /**\n   * Get transaction history with balance changes\n   *\n   * @param params - Request parameters including wallet address and pagination options\n   * @returns Transaction history with pagination metadata\n   * @throws Error if HTTP error or invalid wallet address\n   */\n  getHistory(params: GetHistoryRequest): Promise<GetHistoryResponse>;\n\n  /**\n   * Get all token transfer activity for a wallet\n   *\n   * @param params - Request parameters including wallet address and pagination options\n   * @returns Transfer activity with pagination metadata\n   * @throws Error if HTTP error or invalid wallet address\n   */\n  getTransfers(params: GetTransfersRequest): Promise<GetTransfersResponse>;\n\n  /**\n   * Get the original funding source of a wallet\n   *\n   * @param params - Request parameters including wallet address\n   * @returns Funding source information\n   * @throws Error if HTTP error or no funding transaction found (404)\n   */\n  getFundedBy(params: GetFundedByRequest): Promise<GetFundedByResponse>;\n}\n\n/**\n * Create a Wallet API client with lazy loading\n *\n * Methods are dynamically imported on first use to optimize bundle size.\n * This is the default client used by `createHelius()`.\n *\n * @param apiKey - Helius API key\n * @returns WalletClient instance with lazy-loaded methods\n *\n * @example\n * ```ts\n * import { makeWalletClient } from \"helius-sdk/wallet/client\";\n *\n * const walletClient = makeWalletClient(\"your-api-key\");\n * const identity = await walletClient.getIdentity({ wallet: \"...\" });\n * ```\n */\nexport const makeWalletClient = (\n  apiKey: string,\n  userAgent?: string\n): WalletClient => ({\n  getIdentity: async (p) =>\n    (await import(\"./getIdentity.js\")).getIdentity(apiKey, p, userAgent),\n  getBatchIdentity: async (p) =>\n    (await import(\"./getBatchIdentity.js\")).getBatchIdentity(\n      apiKey,\n      p,\n      userAgent\n    ),\n  getBalances: async (p) =>\n    (await import(\"./getBalances.js\")).getBalances(apiKey, p, userAgent),\n  getHistory: async (p) =>\n    (await import(\"./getHistory.js\")).getHistory(apiKey, p, userAgent),\n  getTransfers: async (p) =>\n    (await import(\"./getTransfers.js\")).getTransfers(apiKey, p, userAgent),\n  getFundedBy: async (p) =>\n    (await import(\"./getFundedBy.js\")).getFundedBy(apiKey, p, userAgent),\n});\n"],"names":[],"mappings":";;AAiGA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,gBAAgB,GAAG,CAC9B,MAAc,EACd,SAAkB,MACA;IAClB,WAAW,EAAE,OAAO,CAAC,KACnB,CAAC,MAAM,oDAAO,mBAAkB,KAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;IACtE,gBAAgB,EAAE,OAAO,CAAC,KACxB,CAAC,MAAM,oDAAO,wBAAuB,KAAC,EAAE,gBAAgB,CACtD,MAAM,EACN,CAAC,EACD,SAAS,CACV;IACH,WAAW,EAAE,OAAO,CAAC,KACnB,CAAC,MAAM,oDAAO,mBAAkB,KAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;IACtE,UAAU,EAAE,OAAO,CAAC,KAClB,CAAC,MAAM,oDAAO,kBAAiB,KAAC,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;IACpE,YAAY,EAAE,OAAO,CAAC,KACpB,CAAC,MAAM,oDAAO,oBAAmB,KAAC,EAAE,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;IACxE,WAAW,EAAE,OAAO,CAAC,KACnB,CAAC,MAAM,oDAAO,mBAAkB,KAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;AACvE,CAAA;;;;"}