{"version":3,"file":"getIdentity.cjs","sources":["../../../../src/wallet/getIdentity.ts"],"sourcesContent":["import {\n  BASE_URL,\n  buildQueryString,\n  handleResponse,\n  getHeaders,\n} from \"./utils\";\nimport type { GetIdentityRequest, GetIdentityResponse } from \"./types\";\n\n/**\n * Get wallet identity information for known addresses\n *\n * Retrieves identity information for a wallet address if it's a known entity\n * such as an exchange, protocol, or other identified address.\n *\n * @beta The Wallet API is currently in beta. APIs and response formats may change.\n *\n * @param apiKey - Helius API key\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 * @example\n * ```ts\n * const identity = await helius.wallet.getIdentity({\n *   wallet: \"HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664\"\n * });\n * console.log(identity.name); // \"Binance 1\"\n * console.log(identity.category); // \"Centralized Exchange\"\n * ```\n */\nexport const getIdentity = async (\n  apiKey: string,\n  params: GetIdentityRequest,\n  userAgent?: string\n): Promise<GetIdentityResponse> => {\n  const { wallet } = params;\n\n  const queryParams = {\n    \"api-key\": apiKey,\n  };\n\n  const url = `${BASE_URL}/${wallet}/identity${buildQueryString(queryParams)}`;\n\n  const response = await fetch(url, {\n    method: \"GET\",\n    headers: getHeaders(false, userAgent),\n  });\n\n  return handleResponse<GetIdentityResponse>(response);\n};\n"],"names":["BASE_URL","buildQueryString","getHeaders","handleResponse"],"mappings":";;;;AAQA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACI,MAAM,WAAW,GAAG,OACzB,MAAc,EACd,MAA0B,EAC1B,SAAkB,KACc;AAChC,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;AAEzB,IAAA,MAAM,WAAW,GAAG;AAClB,QAAA,SAAS,EAAE,MAAM;KAClB;AAED,IAAA,MAAM,GAAG,GAAG,CAAA,EAAGA,cAAQ,CAAA,CAAA,EAAI,MAAM,CAAA,SAAA,EAAYC,sBAAgB,CAAC,WAAW,CAAC,CAAA,CAAE;AAE5E,IAAA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;AAChC,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,OAAO,EAAEC,gBAAU,CAAC,KAAK,EAAE,SAAS,CAAC;AACtC,KAAA,CAAC;AAEF,IAAA,OAAOC,oBAAc,CAAsB,QAAQ,CAAC;AACtD;;;;"}