@funkit/api-base 2.3.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @funkit/api-base
2
2
 
3
+ ## 2.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - c47429b: Remove Hyperbeat customer integration
8
+
9
+ ## 2.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - b67b352: feat(connect): show FOP limits and add sorting logic
14
+ - ae1df7e: refactor: update cambria keys
15
+ - 4551e78: pass countryCode to fops endpoint
16
+ - 2eea062: bump dependencies version
17
+ - d211c37: fix(connect): format saved payment method names + icons
18
+ - Updated dependencies [2eea062]
19
+ - @funkit/utils@1.2.3
20
+
3
21
  ## 2.3.0
4
22
 
5
23
  ### Minor Changes
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ var BENQI_API_KEY = "q8qZWLvviLaOaG4bX3w2v6zLN9uxNPaU6CX8I0Gd";
46
46
  var BENTO_API_KEY = "Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke";
47
47
  var BSX_API_KEY = "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
48
48
  var BULLPEN_API_KEY = "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG";
49
- var CAMBRIA_API_KEY = "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP";
49
+ var CAMBRIA_API_KEY = "C91BQJYq4q63FsUDbYNiK3ZkY86RHODv6Lhl2QFI";
50
50
  var DEGEN_API_KEY = "m4iHIILHcL4gN8EXCMzGe8zIdhuCXxck49mWajzJ";
51
51
  var DEV_API_KEY = "Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk";
52
52
  var ETHEREAL_API_KEY = "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
@@ -56,7 +56,6 @@ var FELIX_API_KEY = "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3";
56
56
  var GINZA_API_KEY = "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0";
57
57
  var GLOBAL_COMPUTE_API_KEY = "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0";
58
58
  var HYENA_API_KEY = "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW";
59
- var HYPERBEAT_API_KEY = "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau";
60
59
  var HYPERDASH_API_KEY = "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
61
60
  var HYPEREDGE_API_KEY = "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz";
62
61
  var HYPERSWAP_API_KEY = "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK";
@@ -969,6 +968,7 @@ var FormOfPaymentType = /* @__PURE__ */ ((FormOfPaymentType2) => {
969
968
  FormOfPaymentType2["PAYSAFECARD"] = "PAYSAFECARD";
970
969
  FormOfPaymentType2["NETELLER"] = "NETELLER";
971
970
  FormOfPaymentType2["SKRILL"] = "SKRILL";
971
+ FormOfPaymentType2["PIX"] = "PIX";
972
972
  return FormOfPaymentType2;
973
973
  })(FormOfPaymentType || {});
974
974
 
@@ -1657,7 +1657,6 @@ export {
1657
1657
  GINZA_API_KEY,
1658
1658
  GLOBAL_COMPUTE_API_KEY,
1659
1659
  HYENA_API_KEY,
1660
- HYPERBEAT_API_KEY,
1661
1660
  HYPERDASH_API_KEY,
1662
1661
  HYPEREDGE_API_KEY,
1663
1662
  HYPERSWAP_API_KEY,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/consts/api.ts", "../src/utils/error.ts", "../src/consts/retry.ts", "../src/consts/customers.ts", "../src/utils/checkout.ts", "../src/utils/request.ts", "../src/services/assets/endpoints.ts", "../src/services/bridge/endpoints.ts", "../src/services/bridge/types.ts", "../src/services/checkout/endpoints.ts", "../src/services/checkout/types.ts", "../src/services/direct-execution/endpoints.ts", "../src/services/direct-execution/types.ts", "../src/services/faucet/endpoints.ts", "../src/services/fops/endpoints.ts", "../src/services/fops/types.ts", "../src/services/fw-access/endpoints.ts", "../src/services/fw-group/endpoints.ts", "../src/services/fw-info/endpoints.ts", "../src/services/fw-operation/endpoints.ts", "../src/services/fw-operation/types.ts", "../src/services/fw-paymaster/endpoints.ts", "../src/services/fw-paymaster/types.ts", "../src/services/fw-user/endpoints.ts", "../src/services/meld/endpoints.ts", "../src/services/meld/types.ts", "../src/services/swapped/endpoint.ts", "../src/services/organization/endpoints.ts", "../src/services/stripe/endpoints.ts", "../src/services/support/endpoints.ts", "../src/services/exchange-rates/endpoints.ts", "../src/services/bluvo/endpoints.ts", "../src/services/bluvo/types.ts"],
4
- "sourcesContent": ["export const API_BASE_URL = process.env.API_BASE_URL || 'https://api.fun.xyz/v1' // Production\n\nexport const FROG_API_BASE_URL =\n process.env.FROG_API_BASE_URL || 'https://frog.fun.xyz'\n\nexport const FUN_FAUCET_URL = 'https://api.fun.xyz/demo-faucet'\n", "import {\n InvalidParameterError,\n ResourceNotFoundError,\n UserOpFailureError,\n} from '@funkit/utils'\nimport type { AttemptContext } from '@lifeomic/attempt'\n\nexport const errorAbortHandler = (err: Error, context: AttemptContext) => {\n if (\n err instanceof ResourceNotFoundError ||\n err instanceof InvalidParameterError ||\n err instanceof UserOpFailureError\n ) {\n context.abort()\n }\n}\n\nexport const serializeHeaders = (headers: Headers) => {\n const headersObject: Record<string, string> = {}\n headers.forEach((value, key) => {\n headersObject[key] = value\n })\n return headersObject\n}\n", "import type { PartialAttemptOptions } from '@lifeomic/attempt'\n\nimport { errorAbortHandler } from '../utils/error'\n\nexport type BaseResponse = unknown\n\nexport type RetryOptions<T = BaseResponse> = PartialAttemptOptions<T>\n\nexport const DEFAULT_RETRY_OPTIONS = {\n delay: 100,\n initialDelay: 0,\n maxDelay: 3000,\n factor: 2,\n maxAttempts: 2,\n timeout: 0,\n jitter: true,\n minDelay: 0,\n handleError: errorAbortHandler,\n handleTimeout: null,\n beforeAttempt: null,\n calculateDelay: null,\n} as RetryOptions\n", "export const AVANTIS_API_KEY = '6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2'\nexport const BANKR_API_KEY = 'vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ'\nexport const BASED_API_KEY = 'clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e'\nexport const BENQI_API_KEY = 'q8qZWLvviLaOaG4bX3w2v6zLN9uxNPaU6CX8I0Gd'\nexport const BENTO_API_KEY = 'Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke'\nexport const BSX_API_KEY = 'zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1'\nexport const BULLPEN_API_KEY = '57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG'\nexport const CAMBRIA_API_KEY = 'BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP'\nexport const DEGEN_API_KEY = 'm4iHIILHcL4gN8EXCMzGe8zIdhuCXxck49mWajzJ'\nexport const DEV_API_KEY = 'Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk'\nexport const ETHEREAL_API_KEY = 'M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um'\nexport const FANATICS_API_KEY = 'lI7amueGK94QtGa7sGGVf8n0XhIcn4sHFAZRu5Jj'\nexport const EITGHTYEIGHTUPS_API_KEY =\n 'ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8'\nexport const FELIX_API_KEY = 'cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3'\nexport const GINZA_API_KEY = 'USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0'\nexport const GLOBAL_COMPUTE_API_KEY = 'vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0'\nexport const HYENA_API_KEY = 'pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW'\nexport const HYPERBEAT_API_KEY = 'lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau'\nexport const HYPERDASH_API_KEY = 'di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe'\nexport const HYPEREDGE_API_KEY = '53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz'\nexport const HYPERSWAP_API_KEY = 'AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK'\nexport const KURU_API_KEY = 'TY2G63jFfd7H29aHiJIzg5RqdXNdog2Q5jgb8tr7'\nexport const LIGHTERXYZ_API_KEY = 'i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2'\nexport const MEGAPOT_API_KEY = '1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp'\nexport const MONAD_API_KEY = '2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc'\nexport const MONKEY_TILT_API_KEY = '2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX'\nexport const OSTIUM_API_KEY = 'SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN'\nexport const PERPL_API_KEY = 'wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu'\nexport const POLYMARKET_API_KEY = 'Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6'\nexport const QUICKSWAP_API_KEY = 'sdbYyJRkXz7uuCCiA7KDu2SzYknwgwCN5rgBllKR'\nexport const RAREBETSPORTS_API_KEY = 'iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT'\nexport const SUSHI_API_KEY = 'HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc'\nexport const TRADEFOX_API_KEY = 'AiXTqs1RO13a47tS5vjqA1UdRggx0tzJ3xKrrNH6'\nexport const VENTUALS_API_KEY = '5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2'\nexport const OPINION_API_KEY = '0IEOb9q4Kd9akgyPbIdW17HGYLY7MWEB2yRHyMxo'\n", "import { toHex } from 'viem'\n\nexport function randomBytes(length: number) {\n const bytes = new Uint8Array(length)\n for (let i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256)\n }\n return toHex(bytes)\n}\n\nexport function generateRandomCheckoutSalt() {\n return toHex(BigInt(randomBytes(32)))\n}\n\nexport function roundToNearestBottomTenth(n: number) {\n return Math.floor(n / 10) * 10\n}\n", "import { retry } from '@lifeomic/attempt'\nimport type { BaseRequest, Logger } from '../consts/request'\nimport {\n type BaseResponse,\n DEFAULT_RETRY_OPTIONS,\n type RetryOptions,\n} from '../consts/retry'\n\nimport {\n AccessDeniedError,\n ClientError,\n ErrorBaseType,\n ErrorCode,\n InternalFailureError,\n InvalidParameterError,\n ResourceNotFoundError,\n ThrottlingError,\n UserOpFailureError,\n jsonStringifyWithBigIntSanitization,\n} from '@funkit/utils'\nimport type {\n DeleteRequest,\n GetRequest,\n PostRequest,\n PutRequest,\n} from './../consts/request'\nimport { serializeHeaders } from './error'\n\nexport interface RequestError {\n errorCode: string\n errorMsg: string\n relayErrorCode?: string\n}\n\nexport async function sendRequest<T = BaseResponse>({\n uri,\n method,\n apiKey,\n body = {},\n logger,\n retryOptions = {},\n signal,\n}: BaseRequest): Promise<T> {\n const headers = {\n 'Content-Type': 'application/json',\n ...(apiKey ? { 'X-Api-Key': apiKey } : {}),\n }\n\n let latestResponse: Response | undefined\n let latestBody: unknown | undefined\n try {\n const finalRetryOptions = {\n ...DEFAULT_RETRY_OPTIONS,\n ...retryOptions,\n } as RetryOptions<T>\n\n return await retry<T>(async (context) => {\n // reset the latest response and body so we will not log the previous response and body\n latestResponse = undefined\n latestBody = undefined\n\n const startTimeMs = Date.now()\n const fetchParams = {\n method,\n headers,\n redirect: 'follow',\n signal,\n body:\n method !== 'GET'\n ? jsonStringifyWithBigIntSanitization(body)\n : undefined,\n } as RequestInit\n\n logger?.info('api-base:sendRequest_before', {\n uri,\n fetchParams,\n startTimeMs,\n })\n const response = await fetch(uri, fetchParams)\n latestResponse = response\n const responseBody = (await response.text()) as string\n latestBody = responseBody\n const json = JSON.parse(responseBody)\n // if we got there then JSON.parse didn't throw, so we update latestBody with parsed body\n latestBody = json\n\n const endTimeMs = Date.now()\n logger?.info('api-base:sendRequest_after', {\n url: uri,\n fetchParams,\n endTimeMs,\n response: {\n body: json,\n status: response.status,\n },\n durationMs: endTimeMs - startTimeMs,\n retries: context.attemptNum,\n })\n\n if (response.ok) {\n return json\n }\n\n const { errorMsg, errorCode, relayErrorCode } = json as RequestError\n\n if (relayErrorCode) {\n throw new RelayQuoteError(response.status, relayErrorCode, errorMsg)\n }\n\n if (response.status === 400) {\n throw new InvalidParameterError(\n ErrorCode.InvalidParameter,\n `bad request ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'check the api call parameters. its mostly because some call parameters are wrong',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 403) {\n throw new AccessDeniedError(\n ErrorCode.Unauthorized,\n 'Invalid API key or insufficient access.',\n errorMsg,\n { apiKey },\n 'Check your api key at https://app.fun.xyz and check with fun team if you believe something is off',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 404) {\n throw new ResourceNotFoundError(\n ErrorCode.ServerMissingData,\n JSON.stringify(json),\n errorMsg,\n { body },\n 'check the api call parameters. its mostly because some call parameters are wrong',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 429) {\n throw new ThrottlingError(\n ErrorCode.RequestLimitExceeded,\n `too many requests ${JSON.stringify(json)}`,\n 'Too many requests',\n { body },\n 'you are making too many requests. please slow down. Reach out to fun team if you need more quota',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 500) {\n if (errorCode === ErrorCode.UserOpFailureError) {\n throw new UserOpFailureError(\n ErrorCode.UserOpFailureError,\n JSON.stringify(json), // UserOpFailureError may JSON.parse this! Do not modify!\n errorMsg,\n { body },\n 'fix user op failure. Most of the time this is due to invalid parameters',\n 'https://docs.fun.xyz',\n )\n }\n throw new InternalFailureError(\n ErrorCode.ServerFailure,\n `server failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 504) {\n throw new InternalFailureError(\n ErrorCode.ServerTimeout,\n `server timeout failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n if (!response.ok) {\n throw new InternalFailureError(\n ErrorCode.UnknownServerError,\n `unknown server failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n return {}\n }, finalRetryOptions)\n } catch (err) {\n const isClientError =\n err instanceof ClientError && err.baseType === ErrorBaseType.ClientError\n const logType: keyof Logger = isClientError ? 'warn' : 'error'\n\n logger?.[logType]('api-base:fetch_error', {\n url: uri,\n method,\n request: {\n body,\n headers,\n },\n // latestResponse will be undefined if the fetch failed because of a network error.\n response: latestResponse\n ? {\n status: latestResponse.status,\n statusText: latestResponse.statusText,\n headers: serializeHeaders(latestResponse.headers),\n url: latestResponse.url,\n body: latestBody,\n }\n : null,\n error: err,\n })\n\n // Rethrow the error to match existing behavior\n if (err instanceof Error) {\n throw err\n }\n\n throw new InternalFailureError(\n ErrorCode.ServerConnectionError,\n `Cannot connect to Fun API Service ${err}`,\n '',\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n}\n\nexport async function sendGetRequest<T = BaseResponse>(\n options: GetRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'GET' })\n}\n\nexport async function sendPostRequest<T = BaseResponse>(\n options: PostRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'POST' })\n}\n\nexport async function sendPutRequest<T = BaseResponse>(\n options: PutRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'PUT' })\n}\n\nexport async function sendDeleteRequest(options: DeleteRequest): Promise<void> {\n await sendRequest({ ...options, method: 'DELETE' })\n}\n\nexport class RelayQuoteError extends Error {\n constructor(\n public readonly statusCode: number,\n public readonly relayErrorCode: string,\n message: string,\n ) {\n super(message)\n this.name = new.target.name\n Object.setPrototypeOf(this, new.target.prototype)\n }\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type {\n Erc20AssetInfo,\n GetAllWalletTokensByChainIdRequest,\n GetAllWalletTokensByChainIdResponse,\n GetAllWalletTokensRequest,\n GetAllWalletTokensResponse,\n GetAllowedAssetsRequest,\n GetAllowedAssetsResponse,\n GetAssetErc20ByChainAndSymbolRequest,\n GetAssetPriceInfoRequest,\n GetAssetPriceInfoResponse,\n GetWalletLidoWithdrawalsByChainId,\n GetWalletLidoWithdrawalsByChainIdResponse,\n} from './types'\n\n/**\n * Gets the estimated dollar unit price of a tokenAddress for checkout\n * @param chainId https://chainlist.org/ e.g. \"1\" for ethereum\n * @param assetTokenAddress tokenAddress of the asset on the given chain\n * @param apiKey\n * @returns only `unitPrice` is relevant, since amount is not customizable (1 by default)\n */\nexport async function getAssetPriceInfo({\n chainId,\n assetTokenAddress,\n ...options\n}: GetAssetPriceInfoRequest): Promise<GetAssetPriceInfoResponse> {\n const priceInfo: GetAssetPriceInfoResponse = await sendGetRequest({\n uri: `${API_BASE_URL}/asset/erc20/price/${chainId}/${assetTokenAddress}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n return priceInfo\n}\n\n/**\n * Gets the ERC20 asset info by chain and symbol\n * @param chainId https://chainlist.org/ e.g. \"1\" for ethereum\n * @param symbol symbol of the asset\n * @param apiKey\n */\nexport async function getAssetErc20ByChainAndSymbol({\n chainId,\n symbol,\n ...options\n}: GetAssetErc20ByChainAndSymbolRequest): Promise<Erc20AssetInfo> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/asset/erc20/${chainId}/${symbol}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get all tokens for a given wallet address\n * @param walletAddress\n * @param onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)\n * @param apiKey\n * @param signal AbortSignal to cancel the request when no longer needed\n */\nexport async function getAllWalletTokens({\n walletAddress,\n onlyVerifiedTokens,\n ...options\n}: GetAllWalletTokensRequest): Promise<GetAllWalletTokensResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/erc20s/${walletAddress}?onlyVerifiedTokens=${onlyVerifiedTokens}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get all tokens for a given wallet address on a specific chain\n * @param chainId https://chainlist.org/\n * @param walletAddress\n * @param onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)\n * @param apiKey\n */\nexport async function getAllWalletTokensByChainId({\n chainId,\n walletAddress,\n onlyVerifiedTokens,\n ...options\n}: GetAllWalletTokensByChainIdRequest): Promise<GetAllWalletTokensByChainIdResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/erc20s/${walletAddress}/${chainId}?onlyVerifiedTokens=${onlyVerifiedTokens}`,\n\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get list of assets that are allowed to be used for checkout\n * @param apiKey\n */\nexport async function getAllowedAssets(\n options: GetAllowedAssetsRequest,\n): Promise<GetAllowedAssetsResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/allow`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**=======================\n * POTENTIAL DEPRECATION\n *=======================*/\n\n/**\n * Get all lido withdrawal request ids for a wallet address on a specific chain\n * @param {string} chainId https://chainlist.org/ ie \"1\" for ethereum\n * @param {string} holderAddr Address of holder\n * @returns [readyToWithdrawRequestIds, notReadyToWithdrawRequestIds]\n */\nexport async function getWalletLidoWithdrawalsByChainId({\n chainId,\n walletAddress,\n ...options\n}: GetWalletLidoWithdrawalsByChainId): Promise<GetWalletLidoWithdrawalsByChainIdResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/lido-withdrawals/${walletAddress}/${chainId}`,\n ...options,\n })\n}\n", "import { FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateBridgeBankAccountRequest,\n CreateBridgeBankAccountResponse,\n CreateFrogAndBridgeAccountRequest,\n CreateFrogAndBridgeAccountResponse,\n FindBridgeKycLinkRequest,\n FindBridgeKycLinkResponse,\n GetBridgeBankAccountRequest,\n GetBridgeBankAccountResponse,\n GetBridgeCustomerRequest,\n GetBridgeCustomerResponse,\n GetOrCreateFrogAccountRequest,\n GetOrCreateFrogAccountResponse,\n} from './types'\n\nexport async function getFrogAccount({\n subAccountId,\n subAccountType,\n ...options\n}: GetOrCreateFrogAccountRequest): Promise<GetOrCreateFrogAccountResponse> {\n const search = new URLSearchParams({\n subAccountId,\n subAccountType,\n })\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/account?${search}`,\n ...options,\n })\n}\n\nexport async function createFrogAccount({\n subAccountId,\n subAccountType,\n ...options\n}: GetOrCreateFrogAccountRequest): Promise<GetOrCreateFrogAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/account`,\n body: {\n subAccountId,\n subAccountType,\n },\n ...options,\n })\n}\n\nexport async function getBridgeCustomer({\n guid,\n ...options\n}: GetBridgeCustomerRequest): Promise<GetBridgeCustomerResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge?guid=${guid}`,\n ...options,\n })\n}\n\nexport async function createBridgeCustomer({\n guid,\n name,\n email,\n endorsement,\n ...options\n}: CreateFrogAndBridgeAccountRequest): Promise<CreateFrogAndBridgeAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge`,\n body: {\n guid,\n name,\n email,\n endorsement,\n },\n ...options,\n })\n}\n\nexport async function getBridgeBankAccounts({\n subAccountId,\n ...options\n}: GetBridgeBankAccountRequest): Promise<GetBridgeBankAccountResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/bank?subAccountId=${subAccountId}`,\n ...options,\n })\n}\n\nexport async function createBridgeBankAccount({\n tokenName,\n chainName,\n destinationAddress,\n subAccountId,\n sourceCurrency,\n ...options\n}: CreateBridgeBankAccountRequest): Promise<CreateBridgeBankAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/bank`,\n body: {\n subAccountId,\n tokenName,\n chainName,\n destinationAddress,\n sourceCurrency,\n },\n ...options,\n })\n}\n\nexport function getBridgeKycLink({\n guid,\n ...options\n}: FindBridgeKycLinkRequest): Promise<FindBridgeKycLinkResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/kyclink?guid=${guid}`,\n ...options,\n })\n}\n", "import type { Address } from 'viem'\nimport type { BaseApiRequest } from '../../consts'\n\ndeclare const brand: unique symbol\n\nexport type BridgeCustomerId = string & { [brand]: 'BridgeCustomerId' }\nexport type Guid = string & { [brand]: 'Guid' }\n\ntype DateString = `${number}-${number}-${number}T${number}:${number}:${number}Z`\n\nexport enum BridgeCustomerStatus {\n ACTIVE = 'active',\n AWAITING_QUESTIONNAIRE = 'awaiting_questionnaire',\n /** Ultimate Beneficial Owner - only relevant for business customers https://apidocs.bridge.xyz/docs/business-ownership-documents */\n AWAITING_UBO = 'awaiting_ubo',\n INCOMPLETE = 'incomplete',\n NOT_STARTED = 'not_started',\n OFFBOARDED = 'offboarded',\n PAUSED = 'paused',\n REJECTED = 'rejected',\n UNDER_REVIEW = 'under_review',\n}\n\n// https://apidocs.bridge.xyz/docs/rejection-reasons\nexport interface RejectionReason {\n created_at: DateString\n developer_reason: string\n reason: string\n}\n\nexport interface BridgeCustomer {\n id: BridgeCustomerId\n first_name: string\n last_name: string\n rejection_reasons: RejectionReason[]\n status: BridgeCustomerStatus\n}\n\nexport enum BridgeKycStatus {\n APPROVED = 'approved',\n INCOMPLETE = 'incomplete',\n NOT_STARTED = 'not_started',\n REJECTED = 'rejected',\n UNDER_REVIEW = 'under_review',\n}\n\nexport enum BridgeTosStatus {\n APPROVED = 'approved',\n PENDING = 'pending',\n}\n\nexport enum BridgeCustomerType {\n BUSINESS = 'business',\n INDIVIDUAL = 'individual',\n}\n\nexport interface BridgeKYCLinks {\n id: string\n customer_id: BridgeCustomerId\n created_at: DateString\n email: string\n kyc_link: string\n kyc_status: BridgeKycStatus\n tos_link: string\n tos_status: BridgeTosStatus\n type: BridgeCustomerType\n}\n\nexport interface SubAccountBase {\n id: number\n createdAt: DateString\n updatedAt: DateString\n guid: Guid\n subAccountType: string\n subAccountId: string\n isDeleted: boolean\n}\n\nexport interface WalletSubAccount extends SubAccountBase {\n subAccountType: 'wallet'\n subAccountId: string\n}\n\nexport interface BridgeSubAccount extends SubAccountBase {\n subAccountType: 'bridge'\n subAccountId: BridgeCustomerId\n}\n\nexport type SubAccount = WalletSubAccount | BridgeSubAccount\n\nexport interface GetOrCreateFrogAccountRequest extends BaseApiRequest {\n subAccountType: 'wallet'\n subAccountId: string\n}\n\nexport interface GetOrCreateFrogAccountResponse {\n accounts: SubAccount[]\n}\n\nexport interface GetBridgeCustomerRequest extends BaseApiRequest {\n guid: Guid\n}\n\nexport interface GetBridgeCustomerResponse {\n account: SubAccount\n bridgeCustomer: BridgeCustomer\n}\n\nexport enum BridgeEndorsement {\n BASE = 'base',\n SEPA = 'sepa',\n}\n\nexport type BridgeAccount = {\n guid: Guid\n name: string\n email: string\n endorsement: BridgeEndorsement\n}\nexport type CreateFrogAndBridgeAccountRequest = BaseApiRequest & BridgeAccount\n\nexport type CreateFrogAndBridgeAccountResponse =\n | {\n newCreated: true\n /** kyc link info will be present only when create new customer */\n kycLinks: BridgeKYCLinks\n }\n | {\n newCreated: false\n kycLink: string\n }\n\nexport type BridgeVirtualAcountId = string & {\n [brand]: 'BridgeVirtualAcountId'\n}\n\nexport interface BridgeDestination {\n address: `0x${string}`\n currency: 'usdc' | 'usdt' | 'usdb' | 'dai'\n payment_rail: 'ethereum' | 'arbitrum' | 'base' | 'polygon' | 'solana'\n}\n\nexport enum BridgeVirtualBankAccountStatus {\n ACTIVATED = 'activated',\n DEACTIVATED = 'deactivated',\n}\n\nexport interface BridgeVirtualBankAccount {\n id: BridgeVirtualAcountId\n destination: BridgeDestination\n developer_fee_percent: `${number}`\n source_deposit_instructions: {\n payment_rails: string[]\n currency: string\n bank_name: string\n bank_address: string\n bank_beneficiary_name?: string\n bank_beneficiary_address?: string\n // only us bank accounts have routing and account numbers\n bank_routing_number?: string\n bank_account_number?: string\n // https://wise.com/us/iban/ IBAN stands for International Bank Account Number.\n // It\u2019s an internationally-agreed code made up of up to 34 letters and numbers\n // that helps banks to process transfers around the world.\n account_holder_name?: string\n iban?: string\n bic?: string\n }\n status: BridgeVirtualBankAccountStatus\n}\n\nexport interface GetBridgeBankAccountRequest extends BaseApiRequest {\n subAccountId: BridgeCustomerId\n}\n\nexport interface GetBridgeBankAccountResponse {\n bankAccounts: BridgeVirtualBankAccount[]\n}\n\nexport const createBridgeBankAccountRequestChainNames = [\n 'arbitrum',\n 'base',\n 'ethereum',\n 'polygon',\n 'solana',\n] as const\n\nexport interface CreateBridgeBankAccountRequest extends BaseApiRequest {\n subAccountId: BridgeCustomerId\n sourceCurrency: 'usd' | 'eur'\n tokenName: 'usdb' | 'usdc' | 'usdt' | 'dai'\n chainName: (typeof createBridgeBankAccountRequestChainNames)[number]\n destinationAddress: Address\n}\n\nexport interface CreateBridgeBankAccountResponse {\n bankAccount: BridgeVirtualBankAccount\n}\n\nexport interface FindBridgeKycLinkRequest extends BaseApiRequest {\n guid: Guid\n}\n\nexport interface FindBridgeKycLinkResponse {\n kycLink: string\n}\n", "import Big from 'big.js'\nimport type { Address } from 'viem'\n\nimport {\n type CheckoutApiQuoteResponse,\n type CheckoutQuoteResponse,\n ErrorCode,\n ResourceNotFoundError,\n} from '@funkit/utils'\nimport { API_BASE_URL, type BaseApiRequest } from '../../consts'\nimport {\n RelayQuoteError,\n generateRandomCheckoutSalt,\n roundToNearestBottomTenth,\n sendGetRequest,\n sendPostRequest,\n} from '../../utils'\nimport {\n type CheckoutApiInitParams,\n type CheckoutApiQuoteParams,\n type CheckoutDeactivateParams,\n type CheckoutHistoryItem,\n type CheckoutInitParams,\n type CheckoutInitResponse,\n type CheckoutInitTokenTransferAddressParams,\n type CheckoutInitTokenTransferResponse,\n type CheckoutQuoteParams,\n type CheckoutQuoteRequestV2,\n type CheckoutQuoteResponseV2,\n CheckoutState,\n type CheckoutTransferSponsorshipApiParams,\n type CheckoutTransferSponsorshipParams,\n type CheckoutTransferSponsorshipResponse,\n type RiskAssessmentParams,\n type RiskAssessmentResponse,\n} from './types'\n\nconst DEFAULT_EXPIRATION_TIMESTAMP_MS = 15 * 60 * 1000 // 15 minutes\n\n/**\n * Gets a checkout quote (estimation).\n * @param fromChainId The ID of the chain where funds will be provided from.\n * @param fromTokenAddress The asset to fund the checkout. This must be either a chain native token or an ERC-20, on the fromChainId.\n * @param fromTokenDecimals The number of decimals for the fromTokenAddress.\n * @param toChainId The ID of the chain where the checkout operation is to be performed.\n * @param toTokenAddress The wanted asset for the checkout operation. This must be either a chain native token or an ERC-20, on the target chain.\n * @param toTokenAmount The amount of wanted asset for the checkout operation in base units.\n * @param toTokenDecimals The number of decimals for the toTokenAddress.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @return {Promise<CheckoutCoreQuoteResponse>} The formatted quote object\n */\nexport async function getCheckoutQuote({\n fromChainId,\n fromTokenAddress,\n fromTokenDecimals,\n toChainId,\n toTokenAddress,\n toTokenDecimals,\n toTokenAmount,\n sponsorInitialTransferGasLimit,\n recipientAddr,\n userId,\n ...options\n}: CheckoutQuoteParams): Promise<CheckoutQuoteResponse> {\n try {\n const toMultipler = 10 ** toTokenDecimals\n const toAmountBaseUnitBI = BigInt(Math.floor(toTokenAmount * toMultipler))\n const queryParams: CheckoutApiQuoteParams = {\n userId,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n toAmountBaseUnit: toAmountBaseUnitBI.toString(),\n // Only pass in recipientAddr if specified\n ...(recipientAddr ? { recipientAddr } : {}),\n // Rounding nearest tenth second (instead of seconds) to better support backend quote caching feature\n // Reference: https://vintage-heaven-3cd.notion.site/API-Gateway-Caching-and-Pre-Warming-System-Draft-ee7909d9b85f43c793ce7bd2607bec02?pvs=4\n // Note: Rounding *down* instead of a regular round to safeguard against edge case of timing passing frontend range validation but failing backend range validation\n checkoutExpirationTimestampSeconds: roundToNearestBottomTenth(\n Math.round((Date.now() + DEFAULT_EXPIRATION_TIMESTAMP_MS) / 1000),\n ).toString(),\n sponsorInitialTransferGasLimit,\n }\n\n const searchParams = new URLSearchParams(queryParams)\n const quoteRes = (await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/quote?${searchParams}`,\n ...options,\n })) as CheckoutApiQuoteResponse\n\n const fromMultipler = 10 ** fromTokenDecimals\n // Format the response for frontend usage\n return {\n quoteId: quoteRes.quoteId,\n fromTokenAddress: quoteRes.fromTokenAddress,\n estFeesUsd: quoteRes.estFeesUsd,\n estSubtotalUsd: quoteRes.estSubtotalUsd,\n estTotalUsd: quoteRes.estTotalUsd,\n estCheckoutTimeMs: quoteRes.estCheckoutTimeMs,\n estTotalFromAmountBaseUnit: quoteRes.estTotalFromAmountBaseUnit,\n estSubtotalFromAmountBaseUnit: quoteRes.estSubtotalFromAmountBaseUnit,\n estFeesFromAmountBaseUnit: quoteRes.estFeesFromAmountBaseUnit,\n estMarketMakerGasUsd: quoteRes.estMarketMakerGasUsd,\n lpFeePercentage: quoteRes.lpFeePercentage,\n lpFeeUsd: quoteRes.lpFeeUsd,\n // Added fields\n estFeesFromAmount: new Big(quoteRes.estFeesFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n estSubtotalFromAmount: new Big(quoteRes.estSubtotalFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n estTotalFromAmount: new Big(quoteRes.estTotalFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n }\n } catch (err: unknown) {\n throw new Error(\n `An error occurred trying to generate a checkout quote: ${\n err instanceof Error ? err.message : JSON.stringify(err)\n }`,\n )\n }\n}\n\n/**\n * Gets a checkout quote (estimation).\n */\nexport async function getCheckoutQuoteV2({\n actionParams,\n bridgeOverride,\n fromAmountBaseUnit,\n fromChainId,\n fromTokenAddress,\n recipientAddress,\n toAmountBaseUnit,\n toChainId,\n toTokenAddress,\n userAddress,\n ...options\n}: BaseApiRequest & CheckoutQuoteRequestV2): Promise<CheckoutQuoteResponse> {\n try {\n return await sendPostRequest<CheckoutQuoteResponseV2>({\n uri: `${API_BASE_URL}/checkout/quoteV2`,\n body: {\n actionParams,\n bridgeOverride,\n fromAmountBaseUnit,\n fromChainId,\n fromTokenAddress,\n recipientAddress,\n toAmountBaseUnit,\n toChainId,\n toTokenAddress,\n userAddress,\n },\n ...options,\n })\n } catch (err: unknown) {\n if (err instanceof RelayQuoteError) {\n throw err\n }\n\n throw new Error(\n `An error occurred trying to generate a checkout quote: ${\n err instanceof Error ? err.message : JSON.stringify(err)\n }`,\n )\n }\n}\n\n/**\n * Initializes a checkout\n * @param userOp The checkout UserOp, signed.\n * @param quoteId The quoteId specific to the checkout.\n * @param apiKey A valid fun api key.\n * @return {Address} The generated deposit address\n */\nexport async function initializeCheckout({\n userOp,\n quoteId,\n sourceOfFund,\n clientMetadata,\n ...options\n}: CheckoutInitParams): Promise<CheckoutInitResponse> {\n const body = {\n ...(userOp ? { userOp } : {}),\n quoteId,\n sourceOfFund,\n salt: generateRandomCheckoutSalt(),\n clientMetadata,\n } as CheckoutApiInitParams\n const res: { depositAddr?: Address } = await sendPostRequest({\n uri: `${API_BASE_URL}/checkout`,\n body,\n ...options,\n })\n if (!res?.depositAddr) {\n throw new ResourceNotFoundError(\n ErrorCode.CheckoutInitDepositAddrNotFound,\n 'Unable to initialize checkout',\n 'Unable to initialize checkout',\n body,\n '',\n 'https://docs.fun.xyz',\n )\n }\n return { depositAddr: res.depositAddr }\n}\n\nexport async function deactivateCheckout({\n depositAddress,\n ...options\n}: CheckoutDeactivateParams) {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/checkout/update/${depositAddress}`,\n body: {\n // Fixed state to cancel the checkout\n state: CheckoutState.CANCELLED,\n },\n ...options,\n })\n return true\n } catch (_err) {\n throw new Error('Unable to deactivate checkout')\n }\n}\n\n/**\n * Gets a checkout given a depositAddress\n * @param depositAddress A unique deposit address associated with a backend checkout item.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns The checkout object if exists. Otherwise, null.\n */\nexport async function getCheckoutByDepositAddress({\n depositAddress,\n ...options\n}: BaseApiRequest & {\n depositAddress: Address\n}): Promise<CheckoutHistoryItem | null> {\n try {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/${depositAddress}`,\n ...options,\n })\n } catch (err) {\n if (err instanceof ResourceNotFoundError) {\n return null\n }\n throw err\n }\n}\n\n/**\n * Gets all checkouts associated with a funWallet\n * @param funWalletAddress A funWallet address.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByFunWalletAddress({\n funWalletAddress,\n ...options\n}: BaseApiRequest & { funWalletAddress: Address }): Promise<\n CheckoutHistoryItem[]\n> {\n const res: CheckoutHistoryItem[] = await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/fun-wallet/${funWalletAddress}`,\n ...options,\n })\n return res || []\n}\n\n/**\n * Gets all checkouts associated with a recipient address\n * @param recipientAddress A wallet address.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByRecipientAddress({\n recipientAddress,\n ...options\n}: BaseApiRequest & { recipientAddress: Address }): Promise<\n CheckoutHistoryItem[]\n> {\n const res = await sendGetRequest<CheckoutHistoryItem[] | null>({\n uri: `${API_BASE_URL}/checkout/recipient/${recipientAddress}`,\n ...options,\n })\n return res || []\n}\n\nexport interface GetCheckoutsByUserIdParams extends BaseApiRequest {\n userId: string\n limit?: number\n}\n\n/**\n * Gets all checkouts associated with a funkit userId string\n * @param userId A userId string.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByUserId({\n userId,\n limit,\n ...options\n}: GetCheckoutsByUserIdParams): Promise<CheckoutHistoryItem[]> {\n const encodedUserId = encodeURIComponent(userId) // external userId includes \"|\" character\n const query = limit\n ? new URLSearchParams({\n limit: limit.toString(),\n })\n : ''\n const res = await sendGetRequest<CheckoutHistoryItem[] | null>({\n uri: `${API_BASE_URL}/checkout/userId/${encodedUserId}?${query}`,\n ...options,\n })\n return res || []\n}\n\nexport async function getPaymasterDataForCheckoutSponsoredTransfer({\n depositAddress,\n transferUserOp,\n ...options\n}: CheckoutTransferSponsorshipParams): Promise<CheckoutTransferSponsorshipResponse> {\n const body = {\n depositAddress,\n userOp: transferUserOp,\n } as CheckoutTransferSponsorshipApiParams\n const res = await sendPostRequest({\n uri: `${API_BASE_URL}/checkout/sponsor-transfer`,\n body,\n ...options,\n })\n if (!res) {\n // TODO: Better error handling\n throw new Error('Unable to get sponsorship information')\n }\n return res as CheckoutTransferSponsorshipResponse\n}\n\nexport async function getRiskAssessmentForAddress({\n address,\n ...options\n}: RiskAssessmentParams) {\n const response = (await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/risk-assessment?address=${address}`,\n ...options,\n // Protect us against chainalysis ratelimiting\n retryOptions: { maxAttempts: 2 },\n })) as RiskAssessmentResponse\n\n return response\n}\n\nexport async function initializeCheckoutTokenTransferAddress({\n apiKey,\n logger,\n signal,\n ...body\n}: CheckoutInitTokenTransferAddressParams): Promise<CheckoutInitTokenTransferResponse> {\n const res = await sendPostRequest<CheckoutInitTokenTransferResponse | null>({\n uri: `${API_BASE_URL}/eoa`,\n body,\n apiKey,\n logger,\n signal,\n })\n if (!res?.depositAddr) {\n throw new ResourceNotFoundError(\n ErrorCode.CheckoutInitDepositAddrNotFound,\n 'Unable to initialize checkout token transfer address',\n 'Unable to initialize checkout token transfer address',\n body,\n '',\n 'https://docs.fun.xyz',\n )\n }\n return {\n depositAddr: res.depositAddr,\n solanaAddr: res.solanaAddr,\n btcAddrSegwit: res.btcAddrSegwit,\n btcAddrTaproot: res.btcAddrTaproot,\n btcDepositAddr: res.btcDepositAddr,\n tronAddr: res.tronAddr,\n }\n}\n", "import type { Address, Hex } from 'viem'\n\nimport type {\n ApiCheckoutClientMetadata,\n ApiFunkitCheckoutActionParams,\n CheckoutQuoteResponse,\n} from '@funkit/utils'\nimport type { BaseApiRequest } from '../../consts'\nimport type { UserOperation } from '../fw-operation'\n\n// The params required for the actual /checkout/quote api\nexport type CheckoutApiQuoteParams = {\n fromChainId: string\n fromTokenAddress: Address\n toChainId: string\n toTokenAddress: Address\n toAmountBaseUnit: string\n /** @deprecated */\n checkoutExpirationTimestampSeconds: string\n sponsorInitialTransferGasLimit: string\n userId: string\n recipientAddr?: Address\n}\n\nexport type CheckoutQuoteParams = BaseApiRequest &\n Omit<\n CheckoutApiQuoteParams,\n 'toAmountBaseUnit' | 'checkoutExpirationTimestampSeconds'\n > & {\n fromTokenDecimals: number\n toTokenDecimals: number\n toTokenAmount: number\n /** @deprecated */\n expirationTimestampMs?: number\n }\n\nexport type BridgeOverride = 'across' | 'relay'\n\nexport type CheckoutQuoteRequestV2 = {\n actionParams?: ApiFunkitCheckoutActionParams[]\n bridgeOverride?: BridgeOverride\n fromChainId: string\n fromTokenAddress: Address\n recipientAddress?: Address\n toChainId: string\n toTokenAddress: Address\n userAddress: Address\n} & (\n | {\n fromAmountBaseUnit: bigint\n toAmountBaseUnit?: never\n }\n | {\n fromAmountBaseUnit?: never\n toAmountBaseUnit: bigint\n }\n)\n\nexport interface FeeBreakdownV2 {\n gasUsd: number\n fillCostUsd: number\n fillCostPercent: number\n totalImpactUsd: number\n totalImpact: number\n swapImpact: number\n swapImpactUsd: number\n appFeePercent: number\n appFeeUsd: number\n maxSlippage: number\n minReceived: number\n exchangeRate?: number // only available for swapping\n appFeeLabel?: string\n}\n\nexport type CheckoutQuoteResponseV2 = CheckoutQuoteResponse & {\n metadata: {\n feeBreakdown: FeeBreakdownV2\n }\n}\n\n/**===============*\n * CHECKOUT INIT *\n *================*/\n\nexport type CheckoutApiInitParams = {\n userOp?: UserOperation\n quoteId: string\n sourceOfFund: string\n salt: Hex\n // TODO: Proper typing wrt _generateClientMetadata() logic\n clientMetadata: object\n}\n\nexport type CheckoutInitParams = BaseApiRequest &\n Omit<CheckoutApiInitParams, 'salt'>\n\nexport type CheckoutInitResponse = {\n depositAddr: Address\n}\n\nexport type CheckoutInitTokenTransferResponse = CheckoutInitResponse & {\n solanaAddr: SolanaAddress\n btcAddrSegwit: BitcoinAddress\n btcAddrTaproot: BitcoinAddress\n btcDepositAddr: BitcoinAddress\n tronAddr: TronAddress\n}\n\n/**=====================*\n * CHECKOUT DEACTIVATE *\n *======================*/\n\nexport type CheckoutDeactivateParams = BaseApiRequest & {\n depositAddress: Address\n}\n\n// Reference from api server: https://github.com/fun-xyz/fun-api-server/blob/main/src/tables/FunWalletCheckout.ts#L11C1-L21C2\nexport enum CheckoutState {\n // In-progress States\n FROM_UNFUNDED = 'FROM_UNFUNDED',\n FROM_FUNDED = 'FROM_FUNDED',\n FROM_POOLED = 'FROM_POOLED',\n TO_UNFUNDED = 'TO_UNFUNDED',\n TO_FUNDED = 'TO_FUNDED',\n TO_POOLED = 'TO_POOLED',\n TO_READY = 'TO_READY',\n PENDING_RECEIVAL = 'PENDING_RECEIVAL',\n // Terminal States\n COMPLETED = 'COMPLETED',\n CHECKOUT_ERROR = 'CHECKOUT_ERROR',\n EXPIRED = 'EXPIRED',\n CANCELLED = 'CANCELLED',\n}\n\n// Checkout state categorizations\nexport const FROM_PROGRESS_CHECKOUT_STATES = [\n CheckoutState.FROM_UNFUNDED,\n CheckoutState.FROM_FUNDED,\n CheckoutState.FROM_POOLED,\n]\n\nexport const TO_PROGRESS_CHECKOUT_STATES = [\n CheckoutState.TO_UNFUNDED,\n CheckoutState.TO_FUNDED,\n CheckoutState.TO_POOLED,\n CheckoutState.TO_READY,\n CheckoutState.PENDING_RECEIVAL,\n]\n\nexport const IN_PROGRESS_CHECKOUT_STATES = [\n ...TO_PROGRESS_CHECKOUT_STATES,\n ...FROM_PROGRESS_CHECKOUT_STATES,\n]\n\nexport const TERMINAL_CHECKOUT_STATES = [\n CheckoutState.EXPIRED,\n CheckoutState.CHECKOUT_ERROR,\n CheckoutState.COMPLETED,\n CheckoutState.CANCELLED,\n]\n\nexport enum CheckoutRefundState {\n INITIATED = 'INITIATED',\n ERROR = 'ERROR',\n REFUNDED = 'REFUNDED',\n PROCEEDED = 'PROCEEDED',\n WAITING_FOR_FULFILLMENT = 'WAITING_FOR_FULFILLMENT',\n FULFILLED = 'FULFILLED',\n}\n\nexport type CheckoutHistoryItem = {\n createdTimeMs: number\n depositAddr: Address\n currentDepositAddr: Address\n recipientAddr: Address\n expirationTimestampSeconds: number\n fromAmountBaseUnit: string\n fromChainId: string\n fromTokenAddress: Address\n funWalletAddr: Address\n lastUpdatedTimeMs: number\n salt: Hex\n state: CheckoutState\n toAmountBaseUnit: string\n toChainId: string\n toTokenAddress: Address\n userOp?: UserOperation\n version: number\n sourceOfFund: string\n clientMetadata: ApiCheckoutClientMetadata\n refundState?: CheckoutRefundState\n // Note: Optional, because BE does not retroactively update existing CheckoutHistoryItem entries\n stateTimestampMs?: Partial<Record<CheckoutState, number>>\n}\n\n/**===============================*\n * CHECKOUT TRANSFER SPONSORSHIP *\n *================================*/\n\nexport type CheckoutTransferSponsorshipParams = BaseApiRequest & {\n transferUserOp: UserOperation\n depositAddress: Address\n}\n\nexport type CheckoutTransferSponsorshipApiParams = {\n userOp: UserOperation\n depositAddress: Address\n}\n\nexport type CheckoutTransferSponsorshipResponse = {\n signerAddress: Address\n signature: Hex\n deadline: number\n paymasterAndData: Hex\n}\n\n/**===============================*\n * RISK ASSESSMENT *\n *================================*/\n\nexport type RiskAssessmentParams = BaseApiRequest & {\n address: FunAddress\n}\n\ntype AddressIdentification = {\n name: string\n address: FunAddress\n category: string\n description: string\n url: string | null\n createdAt: number\n}\n\ntype Cluster = {\n name: string\n category: string\n}\n\nexport type RiskValues = 'Severe' | 'High' | 'Medium' | 'Low'\n\ntype ExposureType = 'direct' | 'indirect'\n\ntype Exposure = {\n category: string\n value: number\n exposureType: ExposureType\n direction: string\n}\n\ntype RiskTrigger = {\n risk: string\n minThreshold: number\n maxThreshold: number\n exposureType: string\n direction: string\n}\n\ntype Trigger = {\n category: string\n percentage: number\n message: string\n ruleTriggered?: RiskTrigger\n}\n\ntype PoolMetadata = {\n fees?: number\n tokens: string[]\n}\n\ntype Base58 =\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | '8'\n | '9'\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'E'\n | 'F'\n | 'G'\n | 'H'\n | 'J'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'P'\n | 'Q'\n | 'R'\n | 'S'\n | 'T'\n | 'U'\n | 'V'\n | 'W'\n | 'X'\n | 'Y'\n | 'Z'\n | 'a'\n | 'b'\n | 'c'\n | 'd'\n | 'e'\n | 'f'\n | 'g'\n | 'h'\n | 'i'\n | 'j'\n | 'k'\n | 'm'\n | 'n'\n | 'o'\n | 'p'\n | 'q'\n | 'r'\n | 's'\n | 't'\n | 'u'\n | 'v'\n | 'w'\n | 'x'\n | 'y'\n | 'z'\nexport type SolanaAddress = `${Base58}${string}`\nexport type LighterAccountIndex = `${number}`\nexport type BitcoinAddress =\n | `1${string}`\n | `3${string}`\n | `bc1${string}`\n | `bc1p${string}`\nexport type TronTAddress = `T${Base58}${string}`\nexport type Tron41HexAddress = `41${string}`\nexport type TronEvmHexAddress = `0x${string}`\nexport type TronAddress = TronTAddress | TronEvmHexAddress | Tron41HexAddress\nexport type FunAddress =\n | Address\n | SolanaAddress\n | BitcoinAddress\n | LighterAccountIndex\n | TronAddress\n\nexport type RiskAssessmentResponse = {\n address: FunAddress\n risk: RiskValues\n riskReason: string | null\n cluster?: Cluster\n addressType: string\n addressIdentifications: AddressIdentification[]\n exposures: Exposure[]\n triggers: Trigger[]\n status: string\n poolMetadata: PoolMetadata\n}\n\nexport type CheckoutInitTokenTransferAddressParams = BaseApiRequest & {\n toChainId: string\n toTokenAddress: Address\n userId: string\n clientMetadata: NonNullable<object>\n sourceOfFund?: string\n recipientAddr: string\n actionType?: string\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n DirectExecution,\n GetDirectExecutionByTxHashRequest,\n GetDirectExecutionsByUserIdRequest,\n PostDirectExecutionRequest,\n} from './types'\n\nexport async function getDirectExecutionByTxHash({\n txHash,\n apiKey,\n logger,\n signal,\n}: GetDirectExecutionByTxHashRequest): Promise<DirectExecution> {\n return sendGetRequest<DirectExecution>({\n uri: `${API_BASE_URL}/direct-execution/${txHash}`,\n apiKey,\n logger,\n signal,\n })\n}\n\nexport async function getDirectExecutionsByUserId({\n userId,\n apiKey,\n logger,\n limit,\n signal,\n}: GetDirectExecutionsByUserIdRequest): Promise<DirectExecution[]> {\n const encodedUserId = encodeURIComponent(userId) // external userId includes \"|\" character\n const query = limit\n ? new URLSearchParams({\n limit: limit.toString(),\n })\n : ''\n return sendGetRequest<DirectExecution[]>({\n uri: `${API_BASE_URL}/direct-execution/userId/${encodedUserId}?${query}`,\n apiKey,\n logger,\n signal,\n })\n}\n\nexport async function createDirectExecution({\n txHash,\n userId,\n recipientAddr,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n fromAmountBaseUnit,\n toAmountBaseUnit,\n estTotalUsd,\n sourceOfFund,\n clientMetadata,\n apiKey,\n logger,\n signal,\n type,\n}: PostDirectExecutionRequest): Promise<{ txHash: DirectExecution['txHash'] }> {\n const body = {\n txHash,\n sourceOfFund,\n userId,\n recipientAddr,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n fromAmountBaseUnit,\n toAmountBaseUnit,\n estTotalUsd,\n clientMetadata,\n type,\n }\n\n return sendPostRequest<{ txHash: DirectExecution['txHash'] }>({\n uri: `${API_BASE_URL}/direct-execution`,\n body,\n apiKey,\n logger,\n signal,\n })\n}\n", "import type { ApiCheckoutClientMetadata } from '@funkit/utils'\nimport type { Address, Hex } from 'viem'\nimport type { BaseApiRequest } from '../../consts'\n\nexport interface GetDirectExecutionByTxHashRequest extends BaseApiRequest {\n txHash: Hex\n}\n\nexport interface GetDirectExecutionsByUserIdRequest extends BaseApiRequest {\n userId: string\n limit?: number\n}\n\n// Reference: https://github.com/fun-xyz/fun-backend/blob/main/packages/types/src/system/direct-execution.ts#L1\nexport enum DirectExecutionType {\n // For UT purposes only, should never show up in prod table\n TEST_EXECUTION = 'TEST_EXECUTION',\n /** @deprecated All vertex direct exec flows will go to Relay now */\n VERTEX_DEPOSIT_COLLATERAL_WITH_REFERRAL = 'VERTEX_DEPOSIT_COLLATERAL_WITH_REFERRAL', // Vertex deposit collateral with referral\n // Relay execution bypass in SDK\n RELAY = 'RELAY',\n\n // OFT execution\n OFT = 'OFT',\n\n // Across CCTP bridge execution (for HyperCore USDH)\n ACROSS = 'ACROSS',\n\n // Drift deposit execution on Solana\n DRIFT = 'DRIFT',\n}\n\n// Reference: https://github.com/reservoirprotocol/relay-kit/blob/211c645f9702a3b459ff545aa4e2e9d536c38455/packages/sdk/src/types/Execute.ts#L54-L61\nexport enum RelayExecutionStatus {\n DELAYED = 'delayed',\n FAILURE = 'failure',\n PENDING = 'pending',\n REFUND = 'refund',\n SUCCESS = 'success',\n WAITING = 'waiting',\n UNKNOWN = 'unknown',\n}\n\nexport interface RelayExecutionRequestFeeData {\n fees: Fee\n feesUsd: Fee\n metadata: RelayExecutionRequestMetadata\n appFees?: RelayExecutionRequestFeeDataAppFees[]\n}\n\nexport interface RelayExecutionRequestFeeDataAppFees {\n recipient?: Address\n amount?: string\n amountUsd?: string\n}\n\nexport interface RelayExecutionRequestMetadata {\n currencyIn: RelayExecutionRequestMetadataCurrency\n currencyOut: RelayExecutionRequestMetadataCurrency\n rate: string\n recipient: Address\n sender: Address\n}\n\nexport interface RelayExecutionRequestMetadataCurrency {\n amount: string\n amountFormatted: string\n amountUsd: string\n amountUsdCurrent: string\n currency: {\n address: Address\n chainId: number\n decimals: number\n metadata: {\n logoURI: string\n verified: boolean\n }\n name: string\n symbol: string\n }\n minimumAmount: string\n}\n\nexport interface Fee {\n gas: bigint\n fixed: bigint\n price: bigint\n}\n\n// Reference: https://github.com/fun-xyz/fun-backend/blob/main/packages/types/src/system/tables/DirectExecution.ts#L7\nexport interface DirectExecution {\n txHash: Hex // For account abstraction transactions, this will be a userOpHash.\n onChainTxHash?: Hex // For account abstraction transactions, this will be a normal txHash/bundle tx hash.\n customerId: string\n userId: string\n recipientAddr: Address\n type: DirectExecutionType\n\n fromChainId: string\n fromTokenAddress: Address\n toChainId: string\n toTokenAddress: Address\n\n fromAmountBaseUnit: string\n toAmountBaseUnit: string\n estTotalUsd: number\n\n clientMetadata: ApiCheckoutClientMetadata\n isIntermediaryPhase?: boolean\n sourceOfFund: string\n toTxId?: string\n triggeringTxHash?: string\n\n createdTimeMs: number\n updatedTimeMs?: number\n lastKnownDepositTimeMs?: number\n\n listenerInfo?: {\n destinationChainId: number\n inTxHashes: string[]\n originChainId: number\n status: RelayExecutionStatus\n time: number\n txHashes: string[]\n\n relayExecutionRequestDetails?: {\n id: Hex\n status: RelayExecutionStatus\n createdAt: Date\n updatedAt: Date\n data: RelayExecutionRequestFeeData\n }\n\n layerzeroExecutionStatusResponse?: {\n data: {\n pathway: LayerzeroPathway\n source: LayerzeroExecutionSource\n destination: LayerzeroExecutionDestination\n verification: unknown\n guid: string\n config: unknown\n status: LayerzeroOverallStatus\n created: string\n updated: string\n }[]\n }\n\n lighterExecutionStatusResponse?: LighterExecutionStatusResponse\n }\n}\n\nexport interface LighterExecutionStatusResponse {\n code: number\n hash: string\n type: number\n info: string\n event_info: string\n status: number\n transaction_index: number\n l1_address: string\n account_index: number\n nonce: number\n expire_at: bigint\n block_height: number\n queued_at: number\n sequence_index: number\n parent_hash: string\n api_key_index: number\n committed_at: number\n verified_at: number\n executed_at: number\n}\n\nexport interface LayerzeroPathway {\n srcEid: number\n dstEid: number\n sender: LayerzeroEndpointParty\n receiver: LayerzeroEndpointParty\n id: string\n nonce: number\n}\n\nexport interface LayerzeroEndpointParty {\n address: string\n id: string\n name: string\n chain: string\n}\n\nexport interface LayerzeroExecutionSource {\n status: string\n tx: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n from: string\n payload: string\n readinessTimestamp: bigint\n }\n}\n\nexport interface LayerzeroExecutionDestination {\n status: string\n tx: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n }\n lzCompose: {\n txs: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n }[]\n status: string\n }\n}\nexport interface LayerzeroOverallStatus {\n name: string\n message: string\n}\n\nexport interface PostDirectExecutionRequest\n extends BaseApiRequest,\n Omit<DirectExecution, 'customerId' | 'createdTimeMs'> {}\n", "import { FUN_FAUCET_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { GetAssetFromFaucetRequest } from './types'\n\nexport async function getAssetFromFaucet({\n token,\n chain,\n walletAddress,\n ...options\n}: GetAssetFromFaucetRequest) {\n return await sendGetRequest({\n uri: `${FUN_FAUCET_URL}/get-faucet?token=${token}&testnet=${chain}&addr=${walletAddress}`,\n ...options,\n })\n}\n", "import type { BaseApiRequest } from '../../consts'\nimport { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { GetFopsParams, GetFopsResponse } from './types'\n\n/**\n * Fetches available forms of payment from the API.\n *\n * @param params - Request parameters including recipient address, user ID, destination token, etc.\n * @param options - Base API request options including API key\n * @returns Promise resolving to available forms of payment\n */\nexport async function getFops({\n params,\n ...options\n}: BaseApiRequest & {\n params: GetFopsParams\n}): Promise<GetFopsResponse> {\n return sendPostRequest({\n uri: `${API_BASE_URL}/fops`,\n body: params,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n", "/**\n * Request parameters for fetching forms of payment (FOP).\n */\nexport interface GetFopsParams {\n /** The wallet address that will receive the crypto */\n recipientAddress: string\n /** Unique identifier for the user */\n userId: string\n /** The destination token with chain ID and address */\n destinationToken: {\n chainId: string\n address: string\n }\n /** The fiat currency code (e.g., \"USD\", \"EUR\") */\n fiatCurrencyCode?: string\n /** Third-party payment provider configurations */\n thirdPartyPaymentConfigs?: ThirdPartyPaymentConfigs\n}\n\nexport interface ThirdPartyPaymentConfigs {\n swapped?: SwappedConfig\n}\n\nexport interface SwappedConfig {\n email?: string\n /** Theme configuration for the embedded flow iframe (key-value pairs for URL params) */\n themeConfig?: Record<string, string>\n}\n\nexport enum FormOfPaymentType {\n CARDS = 'CARDS',\n BANK_TRANSFER = 'BANK_TRANSFER',\n APPLE_PAY = 'APPLE_PAY',\n GOOGLE_PAY = 'GOOGLE_PAY',\n PAYPAL = 'PAYPAL',\n REVOLUT_PAY = 'REVOLUT_PAY',\n RAPID_TRANSFER = 'RAPID_TRANSFER',\n PAYSAFECARD = 'PAYSAFECARD',\n NETELLER = 'NETELLER',\n SKRILL = 'SKRILL',\n}\n\n/**\n * Represents a single form of payment option.\n */\nexport interface GenericFormOfPayment {\n fopType: FormOfPaymentType\n /** Display name of the payment method (e.g., \"Google Pay\", \"Apple Pay\") */\n name: string\n /** URL to embedded flow for the payment provider */\n embeddedFlowUrl: string\n /** URL to the payment method's icon */\n iconImageUrl: string\n}\n\n/**\n * Represents a saved form of payment with card-specific details.\n */\nexport interface SavedFormOfPayment {\n /** Payment type */\n fopType: FormOfPaymentType\n /** Card brand (e.g., \"Visa\", \"Mastercard\") */\n cardBrand: string\n /** First six digits of the card number */\n cardBin: string\n /** Last four digits of the card number */\n cardLastFour: string\n /** Card expiry (e.g., \"12/26\") */\n cardExpiry: string\n /** Name on the card */\n cardholderName: string\n /** URL to the payment method's icon */\n iconImageUrl: string\n /** URL to embedded flow for the payment provider */\n embeddedFlowUrl: string\n}\n\nexport type SwappedFormOfPayment = GenericFormOfPayment | SavedFormOfPayment\n\n/**\n * Response from the /fops API endpoint.\n */\nexport interface GetFopsResponse {\n /** List of generic/available forms of payment */\n genericFormsOfPayments: GenericFormOfPayment[]\n /** List of saved/previously used forms of payment for the user */\n savedFormsOfPayments: SavedFormOfPayment[]\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CheckWalletAccessInitializationRequest,\n InitializeWalletAccessRequest,\n} from './types'\n\nexport async function initializeWalletAccess({\n walletAddr,\n creatorAddr,\n ...options\n}: InitializeWalletAccessRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/access/wallet`,\n body: { walletAddr, creatorAddr },\n ...options,\n })\n}\n\nexport async function checkWalletAccessInitialization({\n walletAddr,\n ...options\n}: CheckWalletAccessInitializationRequest): Promise<boolean> {\n return (\n await sendGetRequest<{ initialized: boolean }>({\n uri: `${API_BASE_URL}/access/wallet/${walletAddr}`,\n ...options,\n })\n ).initialized\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { GetGroupsRequest, GroupMetadata } from './types'\n\nexport async function getGroups({\n groupIds,\n chainId,\n ...options\n}: GetGroupsRequest): Promise<GroupMetadata[]> {\n return (\n await sendPostRequest<{ groups: GroupMetadata[] }>({\n uri: `${API_BASE_URL}/group/get-groups`,\n body: { groupIds, chainId },\n ...options,\n })\n ).groups\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type {\n GetChainFromIdRequest,\n GetChainFromNameRequest,\n ServerChainInfo,\n} from './types'\n\nexport async function getChainFromId({\n chainId,\n ...options\n}: GetChainFromIdRequest): Promise<ServerChainInfo> {\n const res = await sendGetRequest<ServerChainInfo>({\n uri: `${API_BASE_URL}/chain-info/${chainId}`,\n ...options,\n })\n if (!res) {\n throw new Error(JSON.stringify(res))\n }\n return res\n}\n\nexport async function getChainFromName({\n name,\n ...options\n}: GetChainFromNameRequest): Promise<ServerChainInfo> {\n const res = await sendGetRequest<ServerChainInfo>({\n uri: `${API_BASE_URL}/chain-info?name=${name}`,\n ...options,\n })\n if (!res) {\n throw new Error(JSON.stringify(res))\n }\n return res\n}\n", "import type { Address } from 'viem'\nimport { API_BASE_URL } from '../../consts'\nimport { sendDeleteRequest, sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateOpRequest,\n DeleteOpRequest,\n EstimateOpInput,\n EstimatedGas,\n ExecuteOpInput,\n ExecutionReceipt,\n GetFullReceiptRequest,\n GetOpsOfWalletRequest,\n GetOpsRequest,\n GetUserOpGasPriceRequest,\n OpRequest,\n OperationData,\n ScheduleOpInput,\n SignOpRequest,\n UserOperationGasPrice,\n} from './types'\n\nexport async function createOp({\n op,\n ...options\n}: CreateOpRequest): Promise<string> {\n return (\n await sendPostRequest<{ opId: string }>({\n uri: `${API_BASE_URL}/operation`,\n body: { ...op },\n ...options,\n })\n ).opId\n}\n\ninterface OpsOfWalletResponse {\n operations: OperationData[]\n}\n\nexport async function getOpsOfWallet({\n walletAddr,\n chainId,\n status,\n ...options\n}: GetOpsOfWalletRequest): Promise<OperationData[]> {\n const endpoint = status\n ? `${API_BASE_URL}/operation/wallet/${walletAddr}/chain/${chainId}?status=${status}`\n : `${API_BASE_URL}/operation/wallet/${walletAddr}/chain/${chainId}`\n return (\n await sendGetRequest<OpsOfWalletResponse>({ uri: endpoint, ...options })\n ).operations\n}\n\nexport async function getOps({\n opIds,\n chainId,\n ...options\n}: GetOpsRequest): Promise<OperationData[]> {\n return (\n await sendPostRequest<OpsOfWalletResponse>({\n uri: `${API_BASE_URL}/operation/get-operations`,\n body: {\n opIds,\n chainId,\n },\n ...options,\n })\n ).operations\n}\n\nexport async function deleteOp({\n opId,\n chainId,\n ...options\n}: DeleteOpRequest): Promise<void> {\n await sendDeleteRequest({\n uri: `${API_BASE_URL}/operation/${opId}/chain/${chainId}`,\n ...options,\n })\n}\n\nexport async function signOp({\n opId,\n chainId,\n signature,\n signedBy,\n threshold,\n ...options\n}: SignOpRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/operation/sign`,\n body: {\n opId,\n chainId,\n signature,\n signedBy,\n threshold,\n },\n ...options,\n })\n}\n\nexport async function executeOp({\n input,\n ...options\n}: OpRequest<ExecuteOpInput>): Promise<ExecutionReceipt> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/operation/execute`,\n body: input,\n ...options,\n })\n}\n\nexport async function estimateOp({\n input,\n ...options\n}: OpRequest<EstimateOpInput>): Promise<EstimatedGas> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/operation/estimate`,\n body: input,\n ...options,\n })\n}\n\nexport async function scheduleOp({\n input,\n ...options\n}: OpRequest<ScheduleOpInput>): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/operation/schedule`,\n body: input,\n ...options,\n })\n}\n\nexport const getFullReceipt = async ({\n opId,\n chainId,\n userOpHash,\n ...options\n}: GetFullReceiptRequest): Promise<ExecutionReceipt> => {\n const retries = 20\n let result: { status: string; receipt?: ExecutionReceipt } = {\n status: 'pending',\n }\n for (let i = 0; i < retries; i++) {\n try {\n result = await sendGetRequest({\n uri: `${API_BASE_URL}/operation/${opId}/chain/${chainId}/receipt?userOpHash=${userOpHash}`,\n ...options,\n })\n if (result.status === 'included') {\n break\n }\n } catch (_err) {\n /* empty */\n }\n\n await new Promise((resolve) => setTimeout(resolve, 2500))\n }\n if (!result.receipt) {\n result.receipt = {\n // TODO: this is obviously wrong but it was what we had before\n txId: 'Failed to find.' as Address,\n gasUsed: 'Failed to find.',\n opFeeUSD: 'Failed to find.',\n opFee: 'Failed to find.',\n userOpHash: 'Failed to find.',\n }\n }\n return {\n ...result.receipt,\n }\n}\n\nexport const getUserOpGasPrice = async ({\n chainId,\n ...options\n}: GetUserOpGasPriceRequest): Promise<UserOperationGasPrice> => {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/operation/chain/${chainId}/gas-price`,\n ...options,\n })\n}\n", "import type { Address, Hex } from 'viem'\n\nimport type { BaseApiRequest } from '../../consts'\n\nexport enum OperationStatus {\n ALL = '',\n PENDING_APPROVED = 'PENDING_APPROVED',\n APPROVED = 'APPROVED',\n PENDING = 'PENDING',\n OP_SUCCEED = 'OP_SUCCEED',\n OP_REVERTED = 'OP_REVERTED',\n SCHEDULED = 'SCHEDULED',\n}\n\nexport type OperationMetadata = {\n opId?: Hex\n chainId: string\n opType: OperationType\n authType: AuthType\n groupId?: Hex\n message?: string\n walletAddr: Address\n status?: OperationStatus\n proposer: string // do not use address in case we later use non-address data as the proposer\n proposedTime?: number\n executedBy?: string\n executedTime?: number\n relatedOpIds?: Hex[]\n signatures?: Signature[]\n txid?: string\n gasUsed?: string\n opFeeUSD?: string\n opFee?: string\n executedBlockNumber?: number\n executedBlockTimeStamp?: number\n}\n\nexport interface OperationData extends OperationMetadata {\n userOp: UserOperation\n}\n\nexport enum AuthType {\n ECDSA = 0,\n MULTI_SIG = 1,\n}\n\nexport type Signature = {\n userId: Hex\n signature: Hex\n signedTime: number\n}\n\nexport enum OperationType {\n SINGLE_OPERATION = 'SINGLE_OPERATION',\n GROUP_OPERATION = 'GROUP_OPERATION',\n REJECTION = 'REJECTION',\n}\n\nexport type GroupInfo = {\n threshold: number\n memberIds: Hex[]\n}\n\nexport type UserOperation = {\n sender: string\n nonce: bigint\n initCode?: string\n callData: string\n callGasLimit: bigint\n verificationGasLimit: bigint\n preVerificationGas?: bigint\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n paymasterAndData?: string\n signature?: string\n}\n\nexport interface ExecutionReceipt {\n userOpHash: string\n txId?: Hex\n gasUsed?: string\n opFeeUSD?: string\n opFee?: string\n}\n\nexport type EstimatedGas = {\n preVerificationGas: bigint\n callGasLimit: bigint\n verificationGasLimit: bigint\n}\n\nexport interface CreateOpRequest extends BaseApiRequest {\n op: OperationData\n}\n\nexport interface GetOpsOfWalletRequest extends BaseApiRequest {\n walletAddr: Address\n chainId: string\n status?: OperationStatus\n}\n\nexport interface GetOpsRequest extends BaseApiRequest {\n opIds: Hex[]\n chainId: string\n}\n\nexport interface DeleteOpRequest extends BaseApiRequest {\n opId: Hex\n chainId: string\n}\n\nexport interface SignOpRequest extends BaseApiRequest {\n opId: Hex\n chainId: string\n signature: Hex\n signedBy: Address\n threshold?: number\n}\n\nexport type OpRequest<T> = BaseApiRequest & {\n input: T\n}\n\nexport type ExecuteOpInput = {\n opId: Hex\n chainId: string\n executedBy: string\n entryPointAddress: Address\n signature: Hex\n userOp?: UserOperation\n groupInfo?: GroupInfo\n}\n\nexport type EstimateOpInput = {\n opId?: Hex\n chainId: string\n entryPointAddress?: Address\n signature?: Hex\n userOp?: UserOperation\n}\n\nexport type ScheduleOpInput = {\n opId: Hex\n chainId: string\n scheduledBy: string\n entryPointAddress: Address\n signature: Hex\n userOp?: UserOperation\n groupInfo?: GroupInfo\n}\n\nexport interface GetFullReceiptRequest extends BaseApiRequest {\n opId: string\n chainId: string\n userOpHash: string\n}\n\nexport interface GetUserOpGasPriceRequest extends BaseApiRequest {\n chainId: string\n}\n\nexport type UserOperationGasPrice = {\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { AddPaymasterTransactionRequest } from './types'\n\nexport async function addTransaction({\n chainId,\n timestamp,\n txid,\n transaction,\n paymasterType,\n sponsorAddress,\n ...options\n}: AddPaymasterTransactionRequest): Promise<unknown> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/dashboard/paymasters/add-transaction`,\n body: {\n chain: chainId,\n sponsorAddress,\n type: paymasterType,\n timestamp,\n transaction,\n txid,\n },\n ...options,\n }).catch(() => {\n /* empty */\n })\n}\n", "import type { BaseApiRequest } from '../../consts'\nimport type { ExecutionReceipt } from '../fw-operation'\n\nexport interface PaymasterTransaction {\n action: string\n amount: number\n from: string\n to: string\n token: string\n txid?: string\n}\n\nexport interface AddPaymasterTransactionRequest extends BaseApiRequest {\n chainId: string\n timestamp: number\n txid: ExecutionReceipt['txId'] | string\n transaction: PaymasterTransaction\n paymasterType: PaymasterType\n sponsorAddress: string\n}\n\nexport enum PaymasterType {\n BaseSponsor = 'base',\n GaslessSponsor = 'gasless',\n TokenSponsor = 'token',\n CheckoutSponsor = 'checkout',\n}\n", "import { ResourceNotFoundError } from '@funkit/utils'\nimport { type Hex, InvalidParameterError } from 'viem'\nimport { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n AddUserToWalletRequest,\n CreateUserRequest,\n GetUserUniqueIdRequest,\n GetUserWalletIdentitiesRequest,\n GetUserWalletsByAddrRequest,\n Wallet,\n} from './types'\n\nexport async function createUser({\n authId,\n addr,\n method,\n userUniqueId,\n ...options\n}: CreateUserRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/user`,\n body: {\n authId,\n addr,\n method,\n userUniqueId,\n },\n ...options,\n })\n}\n\nexport async function getUserUniqueId({\n authId,\n ...options\n}: GetUserUniqueIdRequest): Promise<string> {\n try {\n return (\n await sendGetRequest<{ userUniqueId: string }>({\n uri: `${API_BASE_URL}/user/auth/${authId}/unique-id`,\n ...options,\n })\n ).userUniqueId\n } catch (err) {\n if (err instanceof ResourceNotFoundError) {\n return ''\n }\n throw err\n }\n}\n\nexport async function getUserWalletsByAddr({\n addr,\n chainId,\n ...options\n}: GetUserWalletsByAddrRequest): Promise<Wallet[]> {\n const endpoint = chainId\n ? `${API_BASE_URL}/user/addr/${addr}/wallets?chainId=${chainId}`\n : `${API_BASE_URL}/user/addr/${addr}/wallets`\n return (\n await sendGetRequest<{ wallets: Wallet[] }>({ uri: endpoint, ...options })\n ).wallets\n}\n\nexport async function addUserToWallet({\n authId,\n chainId,\n walletAddr,\n userIds,\n walletUniqueId,\n ...options\n}: AddUserToWalletRequest): Promise<void> {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/user/auth/${authId}/chain/${chainId}/wallet`,\n body: { walletAddr, userIds, walletUniqueId },\n ...options,\n })\n } catch (err) {\n if (err instanceof InvalidParameterError) {\n // TODO: What about any other cause of InvalidParameterError???\n // swallow the error if the wallet already exists.\n return\n }\n\n throw err\n }\n}\n\n/**\n * @returns userIds of the specified Wallet.\n */\nexport async function getUserWalletIdentities({\n authId,\n chainId,\n walletAddr,\n ...options\n}: GetUserWalletIdentitiesRequest): Promise<Hex[]> {\n return (\n (\n await sendGetRequest<{ ids: Hex[] }>({\n uri: `${API_BASE_URL}/user/auth/${authId}/chain/${chainId}/wallet/${walletAddr}/identities`,\n ...options,\n })\n ).ids ?? []\n )\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n GetCryptoPurchaseLimitsParams,\n MeldCreateCryptoQuoteParams,\n MeldCreateCryptoQuoteResponse,\n MeldCreateCryptoWidgetParams,\n MeldCreateCryptoWidgetResponse,\n MeldDefaultFiatResponse,\n MeldFiatLimitResponse,\n MeldSupportedFiatResponse,\n SearchDefaultFiatParams,\n} from './types'\n\nexport async function getMeldSupportedFiat({\n ...options\n}: BaseApiRequest): Promise<MeldSupportedFiatResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/fiat`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n\nexport async function getMeldQuotes({\n params,\n ...options\n}: BaseApiRequest & {\n params: MeldCreateCryptoQuoteParams\n}): Promise<MeldCreateCryptoQuoteResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/quote`,\n body: params,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\nexport async function startMeldSession({\n params,\n ...options\n}: BaseApiRequest & {\n params: MeldCreateCryptoWidgetParams['sessionData']\n}): Promise<MeldCreateCryptoWidgetResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/session`,\n body: {\n sessionData: params,\n sessionType: 'BUY',\n },\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\nexport async function getMeldDefaultFiat({\n params,\n ...options\n}: BaseApiRequest & {\n params: SearchDefaultFiatParams\n}): Promise<MeldDefaultFiatResponse> {\n const countries = params.countries?.join(',') ?? ''\n const categories = params.categories?.join(',') ?? ''\n const urlParams = new URLSearchParams({\n ...(countries ? { countries } : {}),\n ...(categories ? { categories } : {}),\n })\n\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/defaultFiat?${urlParams}`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n\nexport async function getMeldFiatLimits({\n params,\n ...options\n}: BaseApiRequest & {\n params: GetCryptoPurchaseLimitsParams\n}): Promise<MeldFiatLimitResponse> {\n const countries = params.countries.join(',')\n const cryptoCurrencies = params.cryptoCurrencies.join(',')\n const fiatCurrencies = params.fiatCurrencies.join(',')\n const categories = params.categories?.join(',') ?? ''\n const urlParams = new URLSearchParams({\n countries,\n cryptoCurrencies,\n fiatCurrencies,\n ...(categories ? { categories } : {}),\n })\n\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/fiatLimit?${urlParams}`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "export enum MeldServiceProvider {\n ALCHEMYPAY = 'ALCHEMYPAY',\n BANXA = 'BANXA',\n BILIRA = 'BILIRA',\n BINANCECONNECT = 'BINANCECONNECT',\n BLOCKCHAINDOTCOM = 'BLOCKCHAINDOTCOM',\n BTCDIRECT = 'BTCDIRECT',\n COINBASEPAY = 'COINBASEPAY',\n MOONPAY = 'MOONPAY',\n FONBNK = 'FONBNK',\n GUARDARIAN = 'GUARDARIAN',\n KOYWE = 'KOYWE',\n MERCURYO = 'MERCURYO',\n MESH = 'MESH',\n MESO = 'MESO',\n ONMETA = 'ONMETA',\n ONRAMPMONEY = 'ONRAMPMONEY',\n PAYBIS = 'PAYBIS',\n PAYPAL = 'PAYPAL',\n RAMP = 'RAMP',\n REVOLUT = 'REVOLUT',\n ROBINHOOD = 'ROBINHOOD',\n SARDINE = 'SARDINE',\n SHIFT4 = 'SHIFT4',\n SIMPLEX = 'SIMPLEX',\n SKRILLCRYPTO = 'SKRILLCRYPTO',\n STRIPE = 'STRIPE',\n TOPPER = 'TOPPER',\n TRANSAK = 'TRANSAK',\n TRANSFI = 'TRANSFI',\n UNLIMIT = 'UNLIMIT',\n YELLOWCARD = 'YELLOWCARD',\n SWAPPED = 'SWAPPED',\n KRYPTONIM = 'KRYPTONIM',\n}\n\nexport const MELD_PROVIDER_CATEGORIES = [\n 'BANK_LINKING',\n 'CRYPTO_ONRAMP',\n 'CRYPTO_OFFRAMP',\n 'CRYPTO_TRANSFER',\n 'FIAT_PAYMENTS',\n] as const\n\nexport type MeldFiatCurrency = {\n /** fiat code. e.g. USD/EUR */\n currencyCode: string\n /** fiat name. e.g. United State Dollar */\n name: string\n /** image URL for the currency symbol provided by meld */\n symbolImageUrl: string\n}\n\nexport type MeldDefaultFiatCurrency = {\n /** Two-letter code (ISO 3166-1 alpha-2) for the Country. */\n countryCode: string\n /** fiat code. e.g. USD/EUR */\n defaultCurrencyCode: string\n /** The identifier for the Payment Method */\n defaultPaymentMethods: MeldQuote['paymentMethodType'][]\n}\n\nexport type MeldCreateCryptoQuoteParams = {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string\n\n /**\n * The cryptocurrency the customer is buying (e.g. BTC, ETH).\n */\n destinationCurrencyCode: string\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string\n\n /**\n * Payment Method Type or SubType\n */\n paymentMethodType?: string\n\n /**\n * An optional list of Strings representing the Service Providers for this Quote\n */\n serviceProviders?: MeldServiceProvider[]\n\n /**\n * The amount of source currency your customer wants tosend in this transaction (e.g., 50.05)\n */\n sourceAmount: `${number}`\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * Subdivision is a optional parameter Only applicable if the country code is US or CA (e.g. US-CA).\n */\n subdivision?: string\n\n /**\n * Your customer's wallet address\n */\n walletAddress?: `0x${string}`\n}\n\nexport type MeldQuote = {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * A numerical score representing the expectation a Customer will convert\n */\n customerScore?: number\n\n /**\n * Destination currency amount to be received for this quote\n */\n destinationAmount: number\n\n /**\n * Code of currency being quoted: BTC, ETH, ...\n */\n destinationCurrencyCode: string\n\n /**\n * The exchange rate at the time the request is sent\n */\n exchangeRate: number\n\n /**\n * The fiat amount exchanged when buying or selling crypto, excluding fees\n */\n fiatAmountWithoutFees: number\n\n /**\n * The name of the institution or broker used for this quote, if present\n */\n institutionName?: string | null\n\n /**\n * LowKYC indicates if the quote amount is below the provider's low KYC threshold, meaning the user may not need to upload documents, which can increase conversion.\n */\n lowKyc?: boolean | null\n\n /**\n * The network fee applied to a crypto transaction\n */\n networkFee?: number | null\n\n /**\n * The fee amount charged by the partner to process your customer's purchase\n */\n partnerFee?: number | null\n\n /**\n * Payment Method Type used for this quote\n */\n paymentMethodType: 'APPLE_PAY' | 'MASTERCARD' | 'SEPA' | 'VISA'\n\n /**\n * The service provider used for this transaction\n */\n serviceProvider: MeldServiceProvider\n\n /**\n * Amount requested + fees\n */\n sourceAmount: number\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * The total amount of fees that will be charged\n */\n totalFee?: number | null\n\n /**\n * The fee amount charged by the service provider to process your customer's purchase\n */\n transactionFee?: number | null\n\n /**\n * The type of crypto transaction\n */\n transactionType: 'CRYPTO_PURCHASE' // | 'CRYPTO_SELL', but only care about buying atm\n}\n\nexport type MeldCreateCryptoQuoteResponse = {\n quotes: MeldQuote[]\n}\n\nexport type MeldCreateCryptoWidgetParams = {\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string\n\n /**\n * Your reference Id for your widget session\n */\n externalSessionId?: string\n\n sessionData: {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * The cryptocurrency the customer is buying (e.g. BTC, ETH).\n */\n destinationCurrencyCode: string\n\n /**\n * If provided, the institution to bypass the institution selection screen in the service provider's widget. Currently this is only supported for MESH widget sessions.\n */\n institutionId?: string\n\n /**\n * Where supported by the Service Provider, Meld can help you lock the cryptocurrency and/or wallet address fields within the widget.\n */\n lockFields?: ('destinationCurrencyCode' | 'walletAddress')[]\n\n /**\n * Payment Method Type or SubType\n */\n paymentMethodType?: string\n\n /**\n * The url to redirect to following completion of the widget flow\n */\n redirectUrl?: string\n\n /**\n * The service provider used for this transaction\n */\n serviceProvider: MeldServiceProvider\n\n /**\n * The amount of source currency your customer wants to send in this transaction (e.g., 50.05)\n */\n sourceAmount: `${number}`\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * Your customer's wallet address\n */\n walletAddress: `0x${string}`\n\n /**\n * Your customer's wallet tag/destination tag/memo. This field is required for certain cryptocurrencies.\n */\n walletTag?: string\n }\n\n sessionType: 'BUY' // | 'SELL' | 'TRANSFER' - We only care about BUY atm\n\n /**\n * For MESH only. Details about a previously authenticated crypto session or bank-linking connection.\n * If provided, the widget will not require the customer to authenticate again as long as the authentication is still valid.\n * The scope of these authentication bypass details are restricted to the same customer, service provider, and institution that were used in the original connection.\n */\n authenticationBypassDetails?: {\n /**\n * The widget type associated with the previously authenticated session/connection.\n */\n category: string\n\n /**\n * The Meld id of the crypto session or bank-linking connection in which the customer has already authenticated with their institution.\n * The auth tied to this session/connection will be used to bypass the authentication process for the current session, if it is still valid.\n * This id may pertain to the initial session/connection in which the customer authenticated, or any subsequent session that used this prior authentication successfully.\n */\n previouslyAuthenticatedId: string\n }\n}\n\nexport type MeldCreateCryptoWidgetResponse = {\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string | null\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string | null\n\n /**\n * Your reference Id for your widget session\n */\n externalSessionId?: string | null\n\n /**\n * Unique identifier for this session\n */\n id: string\n\n /**\n * The session token\n */\n token: string\n\n /**\n * The crypto widget URL\n */\n widgetUrl: string\n}\n\nexport interface MeldError extends Error {\n /**\n * A categorization of the error\n */\n code: string\n\n /**\n * A user-friendly representation of the error code.\n * This may change over time and is not safe for programmatic use.\n */\n errors?: string[] | null\n\n /**\n * A developer-friendly representation of the error code.\n * This may change over time and is not safe for programmatic use.\n */\n message: string\n\n /**\n * The request Id\n */\n requestId: string\n\n /**\n * The date and time when the request was made (ISO)\n */\n timestamp: string | null\n}\n\nexport interface MeldSupportedFiatResponse {\n currencies: MeldFiatCurrency[]\n /** Irrelevant */\n preferred: string[]\n}\n\nexport type SearchDefaultFiatParams = {\n countries: string[]\n categories?: (typeof MELD_PROVIDER_CATEGORIES)[number][]\n}\n\nexport interface MeldDefaultFiatResponse {\n currencies: MeldDefaultFiatCurrency[]\n}\n\nexport interface GetCryptoPurchaseLimitsParams {\n /**\n * The two-letter country code (ISO 3166-1 alpha-2) to search for supported fiat currencies.\n * A comma separated list of countries.\n */\n countries: string[]\n\n /**\n * The crypto currencies to search for limits\n */\n cryptoCurrencies: string[]\n\n /**\n * The fiat currencies to search for limits\n */\n fiatCurrencies: string[]\n\n /**\n * The categories to search for limits\n */\n categories?: (typeof MELD_PROVIDER_CATEGORIES)[number][]\n}\n\nexport interface MeldFiatCurrencyLimit {\n currencyCode: string\n defaultAmount: number | null\n minimumAmount: number\n maximumAmount: number\n}\n\nexport interface MeldFiatLimitResponse {\n limits: MeldFiatCurrencyLimit[]\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { SwappedSupportedCountriesResponse } from './types'\n\nexport async function getSwappedSupportedCountries({\n ...options\n}: BaseApiRequest): Promise<SwappedSupportedCountriesResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/swapped/supportedCountries`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { GetOrganizationIdRequest } from './types'\n\nexport async function getOrganizationIdByApiKey({\n apiKey,\n}: GetOrganizationIdRequest) {\n return await sendGetRequest<{ id: string }>({\n uri: `${API_BASE_URL}/organization`,\n apiKey,\n })\n}\n", "import { API_BASE_URL, type BaseApiRequest } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateStripeBuySessionBody,\n CreateStripeBuySessionResponse,\n GetStripeBuyQuoteRequest,\n GetStripeBuyQuoteResponse,\n} from './types'\n\nexport async function getStripeBuyQuote({\n sourceCurrency,\n destinationAmount,\n destinationCurrency,\n destinationNetwork,\n isSandbox,\n ...options\n}: GetStripeBuyQuoteRequest): Promise<GetStripeBuyQuoteResponse> {\n const params = new URLSearchParams({\n isSandbox: isSandbox.toString(),\n sourceCurrency,\n destinationAmount: destinationAmount.toString(),\n // Only allow one currency in this SDK\n destinationCurrencies: destinationCurrency,\n // Only allow one network in this SDK\n destinationNetworks: destinationNetwork,\n }).toString()\n const buyQuoteResp = await sendGetRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-buy-quote?${params}`,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return buyQuoteResp as GetStripeBuyQuoteResponse\n}\n\nexport async function createStripeBuySession({\n sourceCurrency,\n destinationAmount,\n destinationCurrency,\n destinationNetwork,\n walletAddress,\n customerIpAddress,\n isSandbox,\n ...options\n}: CreateStripeBuySessionBody): Promise<CreateStripeBuySessionResponse> {\n const body = {\n isSandbox: isSandbox.toString(),\n sourceCurrency,\n destinationAmount: destinationAmount.toString(),\n // Only allow one currency in this SDK\n destinationCurrency,\n destinationCurrencies: [destinationCurrency],\n // Only allow one network in this SDK\n destinationNetwork,\n destinationNetworks: [destinationNetwork],\n // Only allow one wallet address in this SDK, and it must correspond to the destination network\n walletAddresses: {\n [destinationNetwork]: walletAddress,\n },\n ...(customerIpAddress ? { customerIpAddress } : {}),\n }\n const newBuySessionResp = await sendPostRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-checkout`,\n body,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return newBuySessionResp as CreateStripeBuySessionResponse\n}\n\nexport async function getStripeBuySession({\n sessionId,\n ...options\n}: BaseApiRequest & {\n sessionId: string\n}): Promise<CreateStripeBuySessionResponse> {\n const buySessionResp = await sendGetRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-checkout-session/${sessionId}`,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return buySessionResp as CreateStripeBuySessionResponse\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { SendSupportMessageRequest } from './types'\n\nexport async function sendSupportMessage({\n title,\n description,\n userEmail,\n ...options\n}: SendSupportMessageRequest): Promise<boolean> {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/support/send-message`,\n body: { title, description, userEmail },\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return true\n } catch (_err) {\n return false\n }\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { ExchangeRates } from './types'\n\n/**\n * Get the exchange rates for all fiat currencies\n * @returns The exchange rates for all fiat currencies\n */\nexport async function getFiatExchangeRates({\n ...options\n}: Omit<BaseApiRequest, 'apiKey'> = {}): Promise<ExchangeRates> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/exchange-rates`,\n apiKey: '', // Just a hack to make typescript happy as we don't require an API Key for this endpoint\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "import { FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n BluvoExecuteWithdrawalRequest,\n BluvoExecuteWithdrawalResponse,\n BluvoGetWalletByIdRequest,\n BluvoGetWalletByIdResponse,\n BluvoGetWithdrawableBalanceByIdRequest,\n BluvoGetWithdrawableBalanceByIdResponse,\n BluvoListExchangesRequest,\n BluvoListExchangesResponse,\n BluvoRequestQuotationRequest,\n BluvoRequestQuotationResponse,\n} from './types'\n\nexport async function bluvoGetWithdrawableBalanceById({\n id,\n logger,\n apiKey,\n}: BluvoGetWithdrawableBalanceByIdRequest): Promise<BluvoGetWithdrawableBalanceByIdResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/balance?id=${id}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoListExchanges({\n status,\n logger,\n apiKey,\n}: BluvoListExchangesRequest): Promise<BluvoListExchangesResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/exchanges?status=${status}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoGetWalletById({\n id,\n logger,\n apiKey,\n}: BluvoGetWalletByIdRequest): Promise<BluvoGetWalletByIdResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/walletId?id=${id}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoRequestQuotation({\n id,\n params,\n logger,\n}: BluvoRequestQuotationRequest): Promise<BluvoRequestQuotationResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/quote`,\n body: { id, params },\n logger,\n apiKey: '',\n })\n}\n\nexport async function bluvoExecuteWithdrawal({\n id,\n idempotencyKey,\n quoteId,\n params,\n logger,\n}: BluvoExecuteWithdrawalRequest): Promise<BluvoExecuteWithdrawalResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/withdrawal`,\n body: { id, idempotencyKey, quoteId, params },\n logger,\n apiKey: '',\n })\n}\n", "import type { BluvoClient, TypeEnum2 } from '@bluvo/sdk-ts'\n\nexport interface BluvoBalanceSchema {\n id: string\n}\n\nexport interface BluvoExchangesSchema {\n status: 'live' | 'offline' | 'maintenance' | 'coming_soon'\n}\n\nexport interface BluvoQuoteSchema {\n id: string\n params: {\n asset: string\n amount: string\n address: string\n tag?: string | undefined\n network?: string | undefined\n includeFee?: boolean | undefined\n }\n}\n\nexport interface BluvoWalletIdSchema {\n id: string\n}\n\nexport interface BluvoWithdrawalSchema {\n id: string\n idempotencyKey: string\n quoteId: string\n params?:\n | {\n twofa?: string | undefined\n }\n | undefined\n}\n\nimport type { BaseApiRequest } from '../../consts'\n\nexport interface BluvoGetWithdrawableBalanceByIdRequest\n extends BaseApiRequest,\n BluvoBalanceSchema {}\nexport type BluvoGetWithdrawableBalanceByIdResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['getWithdrawableBalance']>\n>\n\nexport interface BluvoListExchangesRequest\n extends BaseApiRequest,\n BluvoExchangesSchema {}\nexport type BluvoListExchangesResponse = Awaited<\n ReturnType<BluvoClient['oauth2']['listExchanges']>\n>\n\nexport interface BluvoGetWalletByIdRequest\n extends BaseApiRequest,\n BluvoWalletIdSchema {}\nexport type BluvoGetWalletByIdResponse = Awaited<\n ReturnType<BluvoClient['wallet']['get']>\n>\n\nexport interface BluvoRequestQuotationRequest\n extends BaseApiRequest,\n BluvoQuoteSchema {}\nexport type BluvoRequestQuotationResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['requestQuotation']>\n>\n\nexport interface BluvoExecuteWithdrawalRequest\n extends BaseApiRequest,\n BluvoWithdrawalSchema {}\nexport type BluvoExecuteWithdrawalResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['executeWithdrawal']>\n>\n\nexport class BluvoWithdrawalError extends Error {\n public readonly errorCode?: TypeEnum2\n\n constructor(message?: string, errorCode?: TypeEnum2) {\n super(message || 'An error occurred during withdrawal. Please try again.')\n this.name = 'BluvoWithdrawalError'\n this.errorCode = errorCode\n }\n}\n"],
5
- "mappings": ";AAAO,IAAM,eAA2C;AAEjD,IAAM,oBACsB;AAE5B,IAAM,iBAAiB;;;ACL9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,IAAM,oBAAoB,CAAC,KAAY,YAA4B;AACxE,MACE,eAAe,yBACf,eAAe,yBACf,eAAe,oBACf;AACA,YAAQ,MAAM;AAAA,EAChB;AACF;AAEO,IAAM,mBAAmB,CAAC,YAAqB;AACpD,QAAM,gBAAwC,CAAC;AAC/C,UAAQ,QAAQ,CAAC,OAAO,QAAQ;AAC9B,kBAAc,GAAG,IAAI;AAAA,EACvB,CAAC;AACD,SAAO;AACT;;;ACfO,IAAM,wBAAwB;AAAA,EACnC,OAAO;AAAA,EACP,cAAc;AAAA,EACd,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAClB;;;ACrBO,IAAM,kBAAkB;AACxB,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,gBAAgB;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GAAG,iBAAiB,+BAA+B,MAAM;AAAA,IAC9D;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEA,eAAsB,mBAAmB;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AACF,GAAmE;AACjE,SAAO,eAAe;AAAA,IACpB,KAAK,GAAG,iBAAiB,0BAA0B,EAAE;AAAA,IACrD;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEA,eAAsB,sBAAsB;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AACF,GAAyE;AACvE,SAAO,gBAAgB;AAAA,IACrB,KAAK,GAAG,iBAAiB;AAAA,IACzB,MAAM,EAAE,IAAI,OAAO;AAAA,IACnB;AAAA,IACA,QAAQ;AAAA,EACV,CAAC;AACH;AAEA,eAAsB,uBAAuB;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2E;AACzE,SAAO,gBAAgB;AAAA,IACrB,KAAK,GAAG,iBAAiB;AAAA,IACzB,MAAM,EAAE,IAAI,gBAAgB,SAAS,OAAO;AAAA,IAC5C;AAAA,IACA,QAAQ;AAAA,EACV,CAAC;AACH;;;ACHO,IAAM,uBAAN,cAAmC,MAAM;AAAA,EAG9C,YAAY,SAAkB,WAAuB;AACnD,UAAM,WAAW,wDAAwD;AACzE,SAAK,OAAO;AACZ,SAAK,YAAY;AAAA,EACnB;AACF;",
4
+ "sourcesContent": ["export const API_BASE_URL = process.env.API_BASE_URL || 'https://api.fun.xyz/v1' // Production\n\nexport const FROG_API_BASE_URL =\n process.env.FROG_API_BASE_URL || 'https://frog.fun.xyz'\n\nexport const FUN_FAUCET_URL = 'https://api.fun.xyz/demo-faucet'\n", "import {\n InvalidParameterError,\n ResourceNotFoundError,\n UserOpFailureError,\n} from '@funkit/utils'\nimport type { AttemptContext } from '@lifeomic/attempt'\n\nexport const errorAbortHandler = (err: Error, context: AttemptContext) => {\n if (\n err instanceof ResourceNotFoundError ||\n err instanceof InvalidParameterError ||\n err instanceof UserOpFailureError\n ) {\n context.abort()\n }\n}\n\nexport const serializeHeaders = (headers: Headers) => {\n const headersObject: Record<string, string> = {}\n headers.forEach((value, key) => {\n headersObject[key] = value\n })\n return headersObject\n}\n", "import type { PartialAttemptOptions } from '@lifeomic/attempt'\n\nimport { errorAbortHandler } from '../utils/error'\n\nexport type BaseResponse = unknown\n\nexport type RetryOptions<T = BaseResponse> = PartialAttemptOptions<T>\n\nexport const DEFAULT_RETRY_OPTIONS = {\n delay: 100,\n initialDelay: 0,\n maxDelay: 3000,\n factor: 2,\n maxAttempts: 2,\n timeout: 0,\n jitter: true,\n minDelay: 0,\n handleError: errorAbortHandler,\n handleTimeout: null,\n beforeAttempt: null,\n calculateDelay: null,\n} as RetryOptions\n", "export const AVANTIS_API_KEY = '6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2'\nexport const BANKR_API_KEY = 'vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ'\nexport const BASED_API_KEY = 'clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e'\nexport const BENQI_API_KEY = 'q8qZWLvviLaOaG4bX3w2v6zLN9uxNPaU6CX8I0Gd'\nexport const BENTO_API_KEY = 'Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke'\nexport const BSX_API_KEY = 'zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1'\nexport const BULLPEN_API_KEY = '57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG'\nexport const CAMBRIA_API_KEY = 'C91BQJYq4q63FsUDbYNiK3ZkY86RHODv6Lhl2QFI'\nexport const DEGEN_API_KEY = 'm4iHIILHcL4gN8EXCMzGe8zIdhuCXxck49mWajzJ'\nexport const DEV_API_KEY = 'Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk'\nexport const ETHEREAL_API_KEY = 'M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um'\nexport const FANATICS_API_KEY = 'lI7amueGK94QtGa7sGGVf8n0XhIcn4sHFAZRu5Jj'\nexport const EITGHTYEIGHTUPS_API_KEY =\n 'ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8'\nexport const FELIX_API_KEY = 'cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3'\nexport const GINZA_API_KEY = 'USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0'\nexport const GLOBAL_COMPUTE_API_KEY = 'vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0'\nexport const HYENA_API_KEY = 'pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW'\nexport const HYPERDASH_API_KEY = 'di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe'\nexport const HYPEREDGE_API_KEY = '53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz'\nexport const HYPERSWAP_API_KEY = 'AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK'\nexport const KURU_API_KEY = 'TY2G63jFfd7H29aHiJIzg5RqdXNdog2Q5jgb8tr7'\nexport const LIGHTERXYZ_API_KEY = 'i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2'\nexport const MEGAPOT_API_KEY = '1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp'\nexport const MONAD_API_KEY = '2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc'\nexport const MONKEY_TILT_API_KEY = '2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX'\nexport const OSTIUM_API_KEY = 'SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN'\nexport const PERPL_API_KEY = 'wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu'\nexport const POLYMARKET_API_KEY = 'Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6'\nexport const QUICKSWAP_API_KEY = 'sdbYyJRkXz7uuCCiA7KDu2SzYknwgwCN5rgBllKR'\nexport const RAREBETSPORTS_API_KEY = 'iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT'\nexport const SUSHI_API_KEY = 'HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc'\nexport const TRADEFOX_API_KEY = 'AiXTqs1RO13a47tS5vjqA1UdRggx0tzJ3xKrrNH6'\nexport const VENTUALS_API_KEY = '5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2'\nexport const OPINION_API_KEY = '0IEOb9q4Kd9akgyPbIdW17HGYLY7MWEB2yRHyMxo'\n", "import { toHex } from 'viem'\n\nexport function randomBytes(length: number) {\n const bytes = new Uint8Array(length)\n for (let i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256)\n }\n return toHex(bytes)\n}\n\nexport function generateRandomCheckoutSalt() {\n return toHex(BigInt(randomBytes(32)))\n}\n\nexport function roundToNearestBottomTenth(n: number) {\n return Math.floor(n / 10) * 10\n}\n", "import { retry } from '@lifeomic/attempt'\nimport type { BaseRequest, Logger } from '../consts/request'\nimport {\n type BaseResponse,\n DEFAULT_RETRY_OPTIONS,\n type RetryOptions,\n} from '../consts/retry'\n\nimport {\n AccessDeniedError,\n ClientError,\n ErrorBaseType,\n ErrorCode,\n InternalFailureError,\n InvalidParameterError,\n ResourceNotFoundError,\n ThrottlingError,\n UserOpFailureError,\n jsonStringifyWithBigIntSanitization,\n} from '@funkit/utils'\nimport type {\n DeleteRequest,\n GetRequest,\n PostRequest,\n PutRequest,\n} from './../consts/request'\nimport { serializeHeaders } from './error'\n\nexport interface RequestError {\n errorCode: string\n errorMsg: string\n relayErrorCode?: string\n}\n\nexport async function sendRequest<T = BaseResponse>({\n uri,\n method,\n apiKey,\n body = {},\n logger,\n retryOptions = {},\n signal,\n}: BaseRequest): Promise<T> {\n const headers = {\n 'Content-Type': 'application/json',\n ...(apiKey ? { 'X-Api-Key': apiKey } : {}),\n }\n\n let latestResponse: Response | undefined\n let latestBody: unknown | undefined\n try {\n const finalRetryOptions = {\n ...DEFAULT_RETRY_OPTIONS,\n ...retryOptions,\n } as RetryOptions<T>\n\n return await retry<T>(async (context) => {\n // reset the latest response and body so we will not log the previous response and body\n latestResponse = undefined\n latestBody = undefined\n\n const startTimeMs = Date.now()\n const fetchParams = {\n method,\n headers,\n redirect: 'follow',\n signal,\n body:\n method !== 'GET'\n ? jsonStringifyWithBigIntSanitization(body)\n : undefined,\n } as RequestInit\n\n logger?.info('api-base:sendRequest_before', {\n uri,\n fetchParams,\n startTimeMs,\n })\n const response = await fetch(uri, fetchParams)\n latestResponse = response\n const responseBody = (await response.text()) as string\n latestBody = responseBody\n const json = JSON.parse(responseBody)\n // if we got there then JSON.parse didn't throw, so we update latestBody with parsed body\n latestBody = json\n\n const endTimeMs = Date.now()\n logger?.info('api-base:sendRequest_after', {\n url: uri,\n fetchParams,\n endTimeMs,\n response: {\n body: json,\n status: response.status,\n },\n durationMs: endTimeMs - startTimeMs,\n retries: context.attemptNum,\n })\n\n if (response.ok) {\n return json\n }\n\n const { errorMsg, errorCode, relayErrorCode } = json as RequestError\n\n if (relayErrorCode) {\n throw new RelayQuoteError(response.status, relayErrorCode, errorMsg)\n }\n\n if (response.status === 400) {\n throw new InvalidParameterError(\n ErrorCode.InvalidParameter,\n `bad request ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'check the api call parameters. its mostly because some call parameters are wrong',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 403) {\n throw new AccessDeniedError(\n ErrorCode.Unauthorized,\n 'Invalid API key or insufficient access.',\n errorMsg,\n { apiKey },\n 'Check your api key at https://app.fun.xyz and check with fun team if you believe something is off',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 404) {\n throw new ResourceNotFoundError(\n ErrorCode.ServerMissingData,\n JSON.stringify(json),\n errorMsg,\n { body },\n 'check the api call parameters. its mostly because some call parameters are wrong',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 429) {\n throw new ThrottlingError(\n ErrorCode.RequestLimitExceeded,\n `too many requests ${JSON.stringify(json)}`,\n 'Too many requests',\n { body },\n 'you are making too many requests. please slow down. Reach out to fun team if you need more quota',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 500) {\n if (errorCode === ErrorCode.UserOpFailureError) {\n throw new UserOpFailureError(\n ErrorCode.UserOpFailureError,\n JSON.stringify(json), // UserOpFailureError may JSON.parse this! Do not modify!\n errorMsg,\n { body },\n 'fix user op failure. Most of the time this is due to invalid parameters',\n 'https://docs.fun.xyz',\n )\n }\n throw new InternalFailureError(\n ErrorCode.ServerFailure,\n `server failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n if (response.status === 504) {\n throw new InternalFailureError(\n ErrorCode.ServerTimeout,\n `server timeout failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n if (!response.ok) {\n throw new InternalFailureError(\n ErrorCode.UnknownServerError,\n `unknown server failure ${JSON.stringify(json)}`,\n errorMsg,\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n return {}\n }, finalRetryOptions)\n } catch (err) {\n const isClientError =\n err instanceof ClientError && err.baseType === ErrorBaseType.ClientError\n const logType: keyof Logger = isClientError ? 'warn' : 'error'\n\n logger?.[logType]('api-base:fetch_error', {\n url: uri,\n method,\n request: {\n body,\n headers,\n },\n // latestResponse will be undefined if the fetch failed because of a network error.\n response: latestResponse\n ? {\n status: latestResponse.status,\n statusText: latestResponse.statusText,\n headers: serializeHeaders(latestResponse.headers),\n url: latestResponse.url,\n body: latestBody,\n }\n : null,\n error: err,\n })\n\n // Rethrow the error to match existing behavior\n if (err instanceof Error) {\n throw err\n }\n\n throw new InternalFailureError(\n ErrorCode.ServerConnectionError,\n `Cannot connect to Fun API Service ${err}`,\n '',\n { body },\n 'retry later. if it still fails, please contact us.',\n 'https://docs.fun.xyz',\n )\n }\n}\n\nexport async function sendGetRequest<T = BaseResponse>(\n options: GetRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'GET' })\n}\n\nexport async function sendPostRequest<T = BaseResponse>(\n options: PostRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'POST' })\n}\n\nexport async function sendPutRequest<T = BaseResponse>(\n options: PutRequest,\n): Promise<T> {\n return await sendRequest({ ...options, method: 'PUT' })\n}\n\nexport async function sendDeleteRequest(options: DeleteRequest): Promise<void> {\n await sendRequest({ ...options, method: 'DELETE' })\n}\n\nexport class RelayQuoteError extends Error {\n constructor(\n public readonly statusCode: number,\n public readonly relayErrorCode: string,\n message: string,\n ) {\n super(message)\n this.name = new.target.name\n Object.setPrototypeOf(this, new.target.prototype)\n }\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type {\n Erc20AssetInfo,\n GetAllWalletTokensByChainIdRequest,\n GetAllWalletTokensByChainIdResponse,\n GetAllWalletTokensRequest,\n GetAllWalletTokensResponse,\n GetAllowedAssetsRequest,\n GetAllowedAssetsResponse,\n GetAssetErc20ByChainAndSymbolRequest,\n GetAssetPriceInfoRequest,\n GetAssetPriceInfoResponse,\n GetWalletLidoWithdrawalsByChainId,\n GetWalletLidoWithdrawalsByChainIdResponse,\n} from './types'\n\n/**\n * Gets the estimated dollar unit price of a tokenAddress for checkout\n * @param chainId https://chainlist.org/ e.g. \"1\" for ethereum\n * @param assetTokenAddress tokenAddress of the asset on the given chain\n * @param apiKey\n * @returns only `unitPrice` is relevant, since amount is not customizable (1 by default)\n */\nexport async function getAssetPriceInfo({\n chainId,\n assetTokenAddress,\n ...options\n}: GetAssetPriceInfoRequest): Promise<GetAssetPriceInfoResponse> {\n const priceInfo: GetAssetPriceInfoResponse = await sendGetRequest({\n uri: `${API_BASE_URL}/asset/erc20/price/${chainId}/${assetTokenAddress}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n return priceInfo\n}\n\n/**\n * Gets the ERC20 asset info by chain and symbol\n * @param chainId https://chainlist.org/ e.g. \"1\" for ethereum\n * @param symbol symbol of the asset\n * @param apiKey\n */\nexport async function getAssetErc20ByChainAndSymbol({\n chainId,\n symbol,\n ...options\n}: GetAssetErc20ByChainAndSymbolRequest): Promise<Erc20AssetInfo> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/asset/erc20/${chainId}/${symbol}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get all tokens for a given wallet address\n * @param walletAddress\n * @param onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)\n * @param apiKey\n * @param signal AbortSignal to cancel the request when no longer needed\n */\nexport async function getAllWalletTokens({\n walletAddress,\n onlyVerifiedTokens,\n ...options\n}: GetAllWalletTokensRequest): Promise<GetAllWalletTokensResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/erc20s/${walletAddress}?onlyVerifiedTokens=${onlyVerifiedTokens}`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get all tokens for a given wallet address on a specific chain\n * @param chainId https://chainlist.org/\n * @param walletAddress\n * @param onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)\n * @param apiKey\n */\nexport async function getAllWalletTokensByChainId({\n chainId,\n walletAddress,\n onlyVerifiedTokens,\n ...options\n}: GetAllWalletTokensByChainIdRequest): Promise<GetAllWalletTokensByChainIdResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/erc20s/${walletAddress}/${chainId}?onlyVerifiedTokens=${onlyVerifiedTokens}`,\n\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**\n * Get list of assets that are allowed to be used for checkout\n * @param apiKey\n */\nexport async function getAllowedAssets(\n options: GetAllowedAssetsRequest,\n): Promise<GetAllowedAssetsResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/allow`,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\n/**=======================\n * POTENTIAL DEPRECATION\n *=======================*/\n\n/**\n * Get all lido withdrawal request ids for a wallet address on a specific chain\n * @param {string} chainId https://chainlist.org/ ie \"1\" for ethereum\n * @param {string} holderAddr Address of holder\n * @returns [readyToWithdrawRequestIds, notReadyToWithdrawRequestIds]\n */\nexport async function getWalletLidoWithdrawalsByChainId({\n chainId,\n walletAddress,\n ...options\n}: GetWalletLidoWithdrawalsByChainId): Promise<GetWalletLidoWithdrawalsByChainIdResponse> {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/assets/lido-withdrawals/${walletAddress}/${chainId}`,\n ...options,\n })\n}\n", "import { FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateBridgeBankAccountRequest,\n CreateBridgeBankAccountResponse,\n CreateFrogAndBridgeAccountRequest,\n CreateFrogAndBridgeAccountResponse,\n FindBridgeKycLinkRequest,\n FindBridgeKycLinkResponse,\n GetBridgeBankAccountRequest,\n GetBridgeBankAccountResponse,\n GetBridgeCustomerRequest,\n GetBridgeCustomerResponse,\n GetOrCreateFrogAccountRequest,\n GetOrCreateFrogAccountResponse,\n} from './types'\n\nexport async function getFrogAccount({\n subAccountId,\n subAccountType,\n ...options\n}: GetOrCreateFrogAccountRequest): Promise<GetOrCreateFrogAccountResponse> {\n const search = new URLSearchParams({\n subAccountId,\n subAccountType,\n })\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/account?${search}`,\n ...options,\n })\n}\n\nexport async function createFrogAccount({\n subAccountId,\n subAccountType,\n ...options\n}: GetOrCreateFrogAccountRequest): Promise<GetOrCreateFrogAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/account`,\n body: {\n subAccountId,\n subAccountType,\n },\n ...options,\n })\n}\n\nexport async function getBridgeCustomer({\n guid,\n ...options\n}: GetBridgeCustomerRequest): Promise<GetBridgeCustomerResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge?guid=${guid}`,\n ...options,\n })\n}\n\nexport async function createBridgeCustomer({\n guid,\n name,\n email,\n endorsement,\n ...options\n}: CreateFrogAndBridgeAccountRequest): Promise<CreateFrogAndBridgeAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge`,\n body: {\n guid,\n name,\n email,\n endorsement,\n },\n ...options,\n })\n}\n\nexport async function getBridgeBankAccounts({\n subAccountId,\n ...options\n}: GetBridgeBankAccountRequest): Promise<GetBridgeBankAccountResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/bank?subAccountId=${subAccountId}`,\n ...options,\n })\n}\n\nexport async function createBridgeBankAccount({\n tokenName,\n chainName,\n destinationAddress,\n subAccountId,\n sourceCurrency,\n ...options\n}: CreateBridgeBankAccountRequest): Promise<CreateBridgeBankAccountResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/bank`,\n body: {\n subAccountId,\n tokenName,\n chainName,\n destinationAddress,\n sourceCurrency,\n },\n ...options,\n })\n}\n\nexport function getBridgeKycLink({\n guid,\n ...options\n}: FindBridgeKycLinkRequest): Promise<FindBridgeKycLinkResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bridge/kyclink?guid=${guid}`,\n ...options,\n })\n}\n", "import type { Address } from 'viem'\nimport type { BaseApiRequest } from '../../consts'\n\ndeclare const brand: unique symbol\n\nexport type BridgeCustomerId = string & { [brand]: 'BridgeCustomerId' }\nexport type Guid = string & { [brand]: 'Guid' }\n\ntype DateString = `${number}-${number}-${number}T${number}:${number}:${number}Z`\n\nexport enum BridgeCustomerStatus {\n ACTIVE = 'active',\n AWAITING_QUESTIONNAIRE = 'awaiting_questionnaire',\n /** Ultimate Beneficial Owner - only relevant for business customers https://apidocs.bridge.xyz/docs/business-ownership-documents */\n AWAITING_UBO = 'awaiting_ubo',\n INCOMPLETE = 'incomplete',\n NOT_STARTED = 'not_started',\n OFFBOARDED = 'offboarded',\n PAUSED = 'paused',\n REJECTED = 'rejected',\n UNDER_REVIEW = 'under_review',\n}\n\n// https://apidocs.bridge.xyz/docs/rejection-reasons\nexport interface RejectionReason {\n created_at: DateString\n developer_reason: string\n reason: string\n}\n\nexport interface BridgeCustomer {\n id: BridgeCustomerId\n first_name: string\n last_name: string\n rejection_reasons: RejectionReason[]\n status: BridgeCustomerStatus\n}\n\nexport enum BridgeKycStatus {\n APPROVED = 'approved',\n INCOMPLETE = 'incomplete',\n NOT_STARTED = 'not_started',\n REJECTED = 'rejected',\n UNDER_REVIEW = 'under_review',\n}\n\nexport enum BridgeTosStatus {\n APPROVED = 'approved',\n PENDING = 'pending',\n}\n\nexport enum BridgeCustomerType {\n BUSINESS = 'business',\n INDIVIDUAL = 'individual',\n}\n\nexport interface BridgeKYCLinks {\n id: string\n customer_id: BridgeCustomerId\n created_at: DateString\n email: string\n kyc_link: string\n kyc_status: BridgeKycStatus\n tos_link: string\n tos_status: BridgeTosStatus\n type: BridgeCustomerType\n}\n\nexport interface SubAccountBase {\n id: number\n createdAt: DateString\n updatedAt: DateString\n guid: Guid\n subAccountType: string\n subAccountId: string\n isDeleted: boolean\n}\n\nexport interface WalletSubAccount extends SubAccountBase {\n subAccountType: 'wallet'\n subAccountId: string\n}\n\nexport interface BridgeSubAccount extends SubAccountBase {\n subAccountType: 'bridge'\n subAccountId: BridgeCustomerId\n}\n\nexport type SubAccount = WalletSubAccount | BridgeSubAccount\n\nexport interface GetOrCreateFrogAccountRequest extends BaseApiRequest {\n subAccountType: 'wallet'\n subAccountId: string\n}\n\nexport interface GetOrCreateFrogAccountResponse {\n accounts: SubAccount[]\n}\n\nexport interface GetBridgeCustomerRequest extends BaseApiRequest {\n guid: Guid\n}\n\nexport interface GetBridgeCustomerResponse {\n account: SubAccount\n bridgeCustomer: BridgeCustomer\n}\n\nexport enum BridgeEndorsement {\n BASE = 'base',\n SEPA = 'sepa',\n}\n\nexport type BridgeAccount = {\n guid: Guid\n name: string\n email: string\n endorsement: BridgeEndorsement\n}\nexport type CreateFrogAndBridgeAccountRequest = BaseApiRequest & BridgeAccount\n\nexport type CreateFrogAndBridgeAccountResponse =\n | {\n newCreated: true\n /** kyc link info will be present only when create new customer */\n kycLinks: BridgeKYCLinks\n }\n | {\n newCreated: false\n kycLink: string\n }\n\nexport type BridgeVirtualAcountId = string & {\n [brand]: 'BridgeVirtualAcountId'\n}\n\nexport interface BridgeDestination {\n address: `0x${string}`\n currency: 'usdc' | 'usdt' | 'usdb' | 'dai'\n payment_rail: 'ethereum' | 'arbitrum' | 'base' | 'polygon' | 'solana'\n}\n\nexport enum BridgeVirtualBankAccountStatus {\n ACTIVATED = 'activated',\n DEACTIVATED = 'deactivated',\n}\n\nexport interface BridgeVirtualBankAccount {\n id: BridgeVirtualAcountId\n destination: BridgeDestination\n developer_fee_percent: `${number}`\n source_deposit_instructions: {\n payment_rails: string[]\n currency: string\n bank_name: string\n bank_address: string\n bank_beneficiary_name?: string\n bank_beneficiary_address?: string\n // only us bank accounts have routing and account numbers\n bank_routing_number?: string\n bank_account_number?: string\n // https://wise.com/us/iban/ IBAN stands for International Bank Account Number.\n // It\u2019s an internationally-agreed code made up of up to 34 letters and numbers\n // that helps banks to process transfers around the world.\n account_holder_name?: string\n iban?: string\n bic?: string\n }\n status: BridgeVirtualBankAccountStatus\n}\n\nexport interface GetBridgeBankAccountRequest extends BaseApiRequest {\n subAccountId: BridgeCustomerId\n}\n\nexport interface GetBridgeBankAccountResponse {\n bankAccounts: BridgeVirtualBankAccount[]\n}\n\nexport const createBridgeBankAccountRequestChainNames = [\n 'arbitrum',\n 'base',\n 'ethereum',\n 'polygon',\n 'solana',\n] as const\n\nexport interface CreateBridgeBankAccountRequest extends BaseApiRequest {\n subAccountId: BridgeCustomerId\n sourceCurrency: 'usd' | 'eur'\n tokenName: 'usdb' | 'usdc' | 'usdt' | 'dai'\n chainName: (typeof createBridgeBankAccountRequestChainNames)[number]\n destinationAddress: Address\n}\n\nexport interface CreateBridgeBankAccountResponse {\n bankAccount: BridgeVirtualBankAccount\n}\n\nexport interface FindBridgeKycLinkRequest extends BaseApiRequest {\n guid: Guid\n}\n\nexport interface FindBridgeKycLinkResponse {\n kycLink: string\n}\n", "import Big from 'big.js'\nimport type { Address } from 'viem'\n\nimport {\n type CheckoutApiQuoteResponse,\n type CheckoutQuoteResponse,\n ErrorCode,\n ResourceNotFoundError,\n} from '@funkit/utils'\nimport { API_BASE_URL, type BaseApiRequest } from '../../consts'\nimport {\n RelayQuoteError,\n generateRandomCheckoutSalt,\n roundToNearestBottomTenth,\n sendGetRequest,\n sendPostRequest,\n} from '../../utils'\nimport {\n type CheckoutApiInitParams,\n type CheckoutApiQuoteParams,\n type CheckoutDeactivateParams,\n type CheckoutHistoryItem,\n type CheckoutInitParams,\n type CheckoutInitResponse,\n type CheckoutInitTokenTransferAddressParams,\n type CheckoutInitTokenTransferResponse,\n type CheckoutQuoteParams,\n type CheckoutQuoteRequestV2,\n type CheckoutQuoteResponseV2,\n CheckoutState,\n type CheckoutTransferSponsorshipApiParams,\n type CheckoutTransferSponsorshipParams,\n type CheckoutTransferSponsorshipResponse,\n type RiskAssessmentParams,\n type RiskAssessmentResponse,\n} from './types'\n\nconst DEFAULT_EXPIRATION_TIMESTAMP_MS = 15 * 60 * 1000 // 15 minutes\n\n/**\n * Gets a checkout quote (estimation).\n * @param fromChainId The ID of the chain where funds will be provided from.\n * @param fromTokenAddress The asset to fund the checkout. This must be either a chain native token or an ERC-20, on the fromChainId.\n * @param fromTokenDecimals The number of decimals for the fromTokenAddress.\n * @param toChainId The ID of the chain where the checkout operation is to be performed.\n * @param toTokenAddress The wanted asset for the checkout operation. This must be either a chain native token or an ERC-20, on the target chain.\n * @param toTokenAmount The amount of wanted asset for the checkout operation in base units.\n * @param toTokenDecimals The number of decimals for the toTokenAddress.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @return {Promise<CheckoutCoreQuoteResponse>} The formatted quote object\n */\nexport async function getCheckoutQuote({\n fromChainId,\n fromTokenAddress,\n fromTokenDecimals,\n toChainId,\n toTokenAddress,\n toTokenDecimals,\n toTokenAmount,\n sponsorInitialTransferGasLimit,\n recipientAddr,\n userId,\n ...options\n}: CheckoutQuoteParams): Promise<CheckoutQuoteResponse> {\n try {\n const toMultipler = 10 ** toTokenDecimals\n const toAmountBaseUnitBI = BigInt(Math.floor(toTokenAmount * toMultipler))\n const queryParams: CheckoutApiQuoteParams = {\n userId,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n toAmountBaseUnit: toAmountBaseUnitBI.toString(),\n // Only pass in recipientAddr if specified\n ...(recipientAddr ? { recipientAddr } : {}),\n // Rounding nearest tenth second (instead of seconds) to better support backend quote caching feature\n // Reference: https://vintage-heaven-3cd.notion.site/API-Gateway-Caching-and-Pre-Warming-System-Draft-ee7909d9b85f43c793ce7bd2607bec02?pvs=4\n // Note: Rounding *down* instead of a regular round to safeguard against edge case of timing passing frontend range validation but failing backend range validation\n checkoutExpirationTimestampSeconds: roundToNearestBottomTenth(\n Math.round((Date.now() + DEFAULT_EXPIRATION_TIMESTAMP_MS) / 1000),\n ).toString(),\n sponsorInitialTransferGasLimit,\n }\n\n const searchParams = new URLSearchParams(queryParams)\n const quoteRes = (await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/quote?${searchParams}`,\n ...options,\n })) as CheckoutApiQuoteResponse\n\n const fromMultipler = 10 ** fromTokenDecimals\n // Format the response for frontend usage\n return {\n quoteId: quoteRes.quoteId,\n fromTokenAddress: quoteRes.fromTokenAddress,\n estFeesUsd: quoteRes.estFeesUsd,\n estSubtotalUsd: quoteRes.estSubtotalUsd,\n estTotalUsd: quoteRes.estTotalUsd,\n estCheckoutTimeMs: quoteRes.estCheckoutTimeMs,\n estTotalFromAmountBaseUnit: quoteRes.estTotalFromAmountBaseUnit,\n estSubtotalFromAmountBaseUnit: quoteRes.estSubtotalFromAmountBaseUnit,\n estFeesFromAmountBaseUnit: quoteRes.estFeesFromAmountBaseUnit,\n estMarketMakerGasUsd: quoteRes.estMarketMakerGasUsd,\n lpFeePercentage: quoteRes.lpFeePercentage,\n lpFeeUsd: quoteRes.lpFeeUsd,\n // Added fields\n estFeesFromAmount: new Big(quoteRes.estFeesFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n estSubtotalFromAmount: new Big(quoteRes.estSubtotalFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n estTotalFromAmount: new Big(quoteRes.estTotalFromAmountBaseUnit)\n .div(fromMultipler)\n .toString(),\n }\n } catch (err: unknown) {\n throw new Error(\n `An error occurred trying to generate a checkout quote: ${\n err instanceof Error ? err.message : JSON.stringify(err)\n }`,\n )\n }\n}\n\n/**\n * Gets a checkout quote (estimation).\n */\nexport async function getCheckoutQuoteV2({\n actionParams,\n bridgeOverride,\n fromAmountBaseUnit,\n fromChainId,\n fromTokenAddress,\n recipientAddress,\n toAmountBaseUnit,\n toChainId,\n toTokenAddress,\n userAddress,\n ...options\n}: BaseApiRequest & CheckoutQuoteRequestV2): Promise<CheckoutQuoteResponse> {\n try {\n return await sendPostRequest<CheckoutQuoteResponseV2>({\n uri: `${API_BASE_URL}/checkout/quoteV2`,\n body: {\n actionParams,\n bridgeOverride,\n fromAmountBaseUnit,\n fromChainId,\n fromTokenAddress,\n recipientAddress,\n toAmountBaseUnit,\n toChainId,\n toTokenAddress,\n userAddress,\n },\n ...options,\n })\n } catch (err: unknown) {\n if (err instanceof RelayQuoteError) {\n throw err\n }\n\n throw new Error(\n `An error occurred trying to generate a checkout quote: ${\n err instanceof Error ? err.message : JSON.stringify(err)\n }`,\n )\n }\n}\n\n/**\n * Initializes a checkout\n * @param userOp The checkout UserOp, signed.\n * @param quoteId The quoteId specific to the checkout.\n * @param apiKey A valid fun api key.\n * @return {Address} The generated deposit address\n */\nexport async function initializeCheckout({\n userOp,\n quoteId,\n sourceOfFund,\n clientMetadata,\n ...options\n}: CheckoutInitParams): Promise<CheckoutInitResponse> {\n const body = {\n ...(userOp ? { userOp } : {}),\n quoteId,\n sourceOfFund,\n salt: generateRandomCheckoutSalt(),\n clientMetadata,\n } as CheckoutApiInitParams\n const res: { depositAddr?: Address } = await sendPostRequest({\n uri: `${API_BASE_URL}/checkout`,\n body,\n ...options,\n })\n if (!res?.depositAddr) {\n throw new ResourceNotFoundError(\n ErrorCode.CheckoutInitDepositAddrNotFound,\n 'Unable to initialize checkout',\n 'Unable to initialize checkout',\n body,\n '',\n 'https://docs.fun.xyz',\n )\n }\n return { depositAddr: res.depositAddr }\n}\n\nexport async function deactivateCheckout({\n depositAddress,\n ...options\n}: CheckoutDeactivateParams) {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/checkout/update/${depositAddress}`,\n body: {\n // Fixed state to cancel the checkout\n state: CheckoutState.CANCELLED,\n },\n ...options,\n })\n return true\n } catch (_err) {\n throw new Error('Unable to deactivate checkout')\n }\n}\n\n/**\n * Gets a checkout given a depositAddress\n * @param depositAddress A unique deposit address associated with a backend checkout item.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns The checkout object if exists. Otherwise, null.\n */\nexport async function getCheckoutByDepositAddress({\n depositAddress,\n ...options\n}: BaseApiRequest & {\n depositAddress: Address\n}): Promise<CheckoutHistoryItem | null> {\n try {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/${depositAddress}`,\n ...options,\n })\n } catch (err) {\n if (err instanceof ResourceNotFoundError) {\n return null\n }\n throw err\n }\n}\n\n/**\n * Gets all checkouts associated with a funWallet\n * @param funWalletAddress A funWallet address.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByFunWalletAddress({\n funWalletAddress,\n ...options\n}: BaseApiRequest & { funWalletAddress: Address }): Promise<\n CheckoutHistoryItem[]\n> {\n const res: CheckoutHistoryItem[] = await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/fun-wallet/${funWalletAddress}`,\n ...options,\n })\n return res || []\n}\n\n/**\n * Gets all checkouts associated with a recipient address\n * @param recipientAddress A wallet address.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByRecipientAddress({\n recipientAddress,\n ...options\n}: BaseApiRequest & { recipientAddress: Address }): Promise<\n CheckoutHistoryItem[]\n> {\n const res = await sendGetRequest<CheckoutHistoryItem[] | null>({\n uri: `${API_BASE_URL}/checkout/recipient/${recipientAddress}`,\n ...options,\n })\n return res || []\n}\n\nexport interface GetCheckoutsByUserIdParams extends BaseApiRequest {\n userId: string\n limit?: number\n}\n\n/**\n * Gets all checkouts associated with a funkit userId string\n * @param userId A userId string.\n * @param apiKey A valid fun api key.\n * @param signal AbortSignal to cancel the request when no longer needed\n * @returns A list of checkout objects if exists. Otherwise, an empty array.\n */\nexport async function getCheckoutsByUserId({\n userId,\n limit,\n ...options\n}: GetCheckoutsByUserIdParams): Promise<CheckoutHistoryItem[]> {\n const encodedUserId = encodeURIComponent(userId) // external userId includes \"|\" character\n const query = limit\n ? new URLSearchParams({\n limit: limit.toString(),\n })\n : ''\n const res = await sendGetRequest<CheckoutHistoryItem[] | null>({\n uri: `${API_BASE_URL}/checkout/userId/${encodedUserId}?${query}`,\n ...options,\n })\n return res || []\n}\n\nexport async function getPaymasterDataForCheckoutSponsoredTransfer({\n depositAddress,\n transferUserOp,\n ...options\n}: CheckoutTransferSponsorshipParams): Promise<CheckoutTransferSponsorshipResponse> {\n const body = {\n depositAddress,\n userOp: transferUserOp,\n } as CheckoutTransferSponsorshipApiParams\n const res = await sendPostRequest({\n uri: `${API_BASE_URL}/checkout/sponsor-transfer`,\n body,\n ...options,\n })\n if (!res) {\n // TODO: Better error handling\n throw new Error('Unable to get sponsorship information')\n }\n return res as CheckoutTransferSponsorshipResponse\n}\n\nexport async function getRiskAssessmentForAddress({\n address,\n ...options\n}: RiskAssessmentParams) {\n const response = (await sendGetRequest({\n uri: `${API_BASE_URL}/checkout/risk-assessment?address=${address}`,\n ...options,\n // Protect us against chainalysis ratelimiting\n retryOptions: { maxAttempts: 2 },\n })) as RiskAssessmentResponse\n\n return response\n}\n\nexport async function initializeCheckoutTokenTransferAddress({\n apiKey,\n logger,\n signal,\n ...body\n}: CheckoutInitTokenTransferAddressParams): Promise<CheckoutInitTokenTransferResponse> {\n const res = await sendPostRequest<CheckoutInitTokenTransferResponse | null>({\n uri: `${API_BASE_URL}/eoa`,\n body,\n apiKey,\n logger,\n signal,\n })\n if (!res?.depositAddr) {\n throw new ResourceNotFoundError(\n ErrorCode.CheckoutInitDepositAddrNotFound,\n 'Unable to initialize checkout token transfer address',\n 'Unable to initialize checkout token transfer address',\n body,\n '',\n 'https://docs.fun.xyz',\n )\n }\n return {\n depositAddr: res.depositAddr,\n solanaAddr: res.solanaAddr,\n btcAddrSegwit: res.btcAddrSegwit,\n btcAddrTaproot: res.btcAddrTaproot,\n btcDepositAddr: res.btcDepositAddr,\n tronAddr: res.tronAddr,\n }\n}\n", "import type { Address, Hex } from 'viem'\n\nimport type {\n ApiCheckoutClientMetadata,\n ApiFunkitCheckoutActionParams,\n CheckoutQuoteResponse,\n} from '@funkit/utils'\nimport type { BaseApiRequest } from '../../consts'\nimport type { UserOperation } from '../fw-operation'\n\n// The params required for the actual /checkout/quote api\nexport type CheckoutApiQuoteParams = {\n fromChainId: string\n fromTokenAddress: Address\n toChainId: string\n toTokenAddress: Address\n toAmountBaseUnit: string\n /** @deprecated */\n checkoutExpirationTimestampSeconds: string\n sponsorInitialTransferGasLimit: string\n userId: string\n recipientAddr?: Address\n}\n\nexport type CheckoutQuoteParams = BaseApiRequest &\n Omit<\n CheckoutApiQuoteParams,\n 'toAmountBaseUnit' | 'checkoutExpirationTimestampSeconds'\n > & {\n fromTokenDecimals: number\n toTokenDecimals: number\n toTokenAmount: number\n /** @deprecated */\n expirationTimestampMs?: number\n }\n\nexport type BridgeOverride = 'across' | 'relay'\n\nexport type CheckoutQuoteRequestV2 = {\n actionParams?: ApiFunkitCheckoutActionParams[]\n bridgeOverride?: BridgeOverride\n fromChainId: string\n fromTokenAddress: Address\n recipientAddress?: Address\n toChainId: string\n toTokenAddress: Address\n userAddress: Address\n} & (\n | {\n fromAmountBaseUnit: bigint\n toAmountBaseUnit?: never\n }\n | {\n fromAmountBaseUnit?: never\n toAmountBaseUnit: bigint\n }\n)\n\nexport interface FeeBreakdownV2 {\n gasUsd: number\n fillCostUsd: number\n fillCostPercent: number\n totalImpactUsd: number\n totalImpact: number\n swapImpact: number\n swapImpactUsd: number\n appFeePercent: number\n appFeeUsd: number\n maxSlippage: number\n minReceived: number\n exchangeRate?: number // only available for swapping\n appFeeLabel?: string\n}\n\nexport type CheckoutQuoteResponseV2 = CheckoutQuoteResponse & {\n metadata: {\n feeBreakdown: FeeBreakdownV2\n }\n}\n\n/**===============*\n * CHECKOUT INIT *\n *================*/\n\nexport type CheckoutApiInitParams = {\n userOp?: UserOperation\n quoteId: string\n sourceOfFund: string\n salt: Hex\n // TODO: Proper typing wrt _generateClientMetadata() logic\n clientMetadata: object\n}\n\nexport type CheckoutInitParams = BaseApiRequest &\n Omit<CheckoutApiInitParams, 'salt'>\n\nexport type CheckoutInitResponse = {\n depositAddr: Address\n}\n\nexport type CheckoutInitTokenTransferResponse = CheckoutInitResponse & {\n solanaAddr: SolanaAddress\n btcAddrSegwit: BitcoinAddress\n btcAddrTaproot: BitcoinAddress\n btcDepositAddr: BitcoinAddress\n tronAddr: TronAddress\n}\n\n/**=====================*\n * CHECKOUT DEACTIVATE *\n *======================*/\n\nexport type CheckoutDeactivateParams = BaseApiRequest & {\n depositAddress: Address\n}\n\n// Reference from api server: https://github.com/fun-xyz/fun-api-server/blob/main/src/tables/FunWalletCheckout.ts#L11C1-L21C2\nexport enum CheckoutState {\n // In-progress States\n FROM_UNFUNDED = 'FROM_UNFUNDED',\n FROM_FUNDED = 'FROM_FUNDED',\n FROM_POOLED = 'FROM_POOLED',\n TO_UNFUNDED = 'TO_UNFUNDED',\n TO_FUNDED = 'TO_FUNDED',\n TO_POOLED = 'TO_POOLED',\n TO_READY = 'TO_READY',\n PENDING_RECEIVAL = 'PENDING_RECEIVAL',\n // Terminal States\n COMPLETED = 'COMPLETED',\n CHECKOUT_ERROR = 'CHECKOUT_ERROR',\n EXPIRED = 'EXPIRED',\n CANCELLED = 'CANCELLED',\n}\n\n// Checkout state categorizations\nexport const FROM_PROGRESS_CHECKOUT_STATES = [\n CheckoutState.FROM_UNFUNDED,\n CheckoutState.FROM_FUNDED,\n CheckoutState.FROM_POOLED,\n]\n\nexport const TO_PROGRESS_CHECKOUT_STATES = [\n CheckoutState.TO_UNFUNDED,\n CheckoutState.TO_FUNDED,\n CheckoutState.TO_POOLED,\n CheckoutState.TO_READY,\n CheckoutState.PENDING_RECEIVAL,\n]\n\nexport const IN_PROGRESS_CHECKOUT_STATES = [\n ...TO_PROGRESS_CHECKOUT_STATES,\n ...FROM_PROGRESS_CHECKOUT_STATES,\n]\n\nexport const TERMINAL_CHECKOUT_STATES = [\n CheckoutState.EXPIRED,\n CheckoutState.CHECKOUT_ERROR,\n CheckoutState.COMPLETED,\n CheckoutState.CANCELLED,\n]\n\nexport enum CheckoutRefundState {\n INITIATED = 'INITIATED',\n ERROR = 'ERROR',\n REFUNDED = 'REFUNDED',\n PROCEEDED = 'PROCEEDED',\n WAITING_FOR_FULFILLMENT = 'WAITING_FOR_FULFILLMENT',\n FULFILLED = 'FULFILLED',\n}\n\nexport type CheckoutHistoryItem = {\n createdTimeMs: number\n depositAddr: Address\n currentDepositAddr: Address\n recipientAddr: Address\n expirationTimestampSeconds: number\n fromAmountBaseUnit: string\n fromChainId: string\n fromTokenAddress: Address\n funWalletAddr: Address\n lastUpdatedTimeMs: number\n salt: Hex\n state: CheckoutState\n toAmountBaseUnit: string\n toChainId: string\n toTokenAddress: Address\n userOp?: UserOperation\n version: number\n sourceOfFund: string\n clientMetadata: ApiCheckoutClientMetadata\n refundState?: CheckoutRefundState\n // Note: Optional, because BE does not retroactively update existing CheckoutHistoryItem entries\n stateTimestampMs?: Partial<Record<CheckoutState, number>>\n}\n\n/**===============================*\n * CHECKOUT TRANSFER SPONSORSHIP *\n *================================*/\n\nexport type CheckoutTransferSponsorshipParams = BaseApiRequest & {\n transferUserOp: UserOperation\n depositAddress: Address\n}\n\nexport type CheckoutTransferSponsorshipApiParams = {\n userOp: UserOperation\n depositAddress: Address\n}\n\nexport type CheckoutTransferSponsorshipResponse = {\n signerAddress: Address\n signature: Hex\n deadline: number\n paymasterAndData: Hex\n}\n\n/**===============================*\n * RISK ASSESSMENT *\n *================================*/\n\nexport type RiskAssessmentParams = BaseApiRequest & {\n address: FunAddress\n}\n\ntype AddressIdentification = {\n name: string\n address: FunAddress\n category: string\n description: string\n url: string | null\n createdAt: number\n}\n\ntype Cluster = {\n name: string\n category: string\n}\n\nexport type RiskValues = 'Severe' | 'High' | 'Medium' | 'Low'\n\ntype ExposureType = 'direct' | 'indirect'\n\ntype Exposure = {\n category: string\n value: number\n exposureType: ExposureType\n direction: string\n}\n\ntype RiskTrigger = {\n risk: string\n minThreshold: number\n maxThreshold: number\n exposureType: string\n direction: string\n}\n\ntype Trigger = {\n category: string\n percentage: number\n message: string\n ruleTriggered?: RiskTrigger\n}\n\ntype PoolMetadata = {\n fees?: number\n tokens: string[]\n}\n\ntype Base58 =\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | '8'\n | '9'\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'E'\n | 'F'\n | 'G'\n | 'H'\n | 'J'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'P'\n | 'Q'\n | 'R'\n | 'S'\n | 'T'\n | 'U'\n | 'V'\n | 'W'\n | 'X'\n | 'Y'\n | 'Z'\n | 'a'\n | 'b'\n | 'c'\n | 'd'\n | 'e'\n | 'f'\n | 'g'\n | 'h'\n | 'i'\n | 'j'\n | 'k'\n | 'm'\n | 'n'\n | 'o'\n | 'p'\n | 'q'\n | 'r'\n | 's'\n | 't'\n | 'u'\n | 'v'\n | 'w'\n | 'x'\n | 'y'\n | 'z'\nexport type SolanaAddress = `${Base58}${string}`\nexport type LighterAccountIndex = `${number}`\nexport type BitcoinAddress =\n | `1${string}`\n | `3${string}`\n | `bc1${string}`\n | `bc1p${string}`\nexport type TronTAddress = `T${Base58}${string}`\nexport type Tron41HexAddress = `41${string}`\nexport type TronEvmHexAddress = `0x${string}`\nexport type TronAddress = TronTAddress | TronEvmHexAddress | Tron41HexAddress\nexport type FunAddress =\n | Address\n | SolanaAddress\n | BitcoinAddress\n | LighterAccountIndex\n | TronAddress\n\nexport type RiskAssessmentResponse = {\n address: FunAddress\n risk: RiskValues\n riskReason: string | null\n cluster?: Cluster\n addressType: string\n addressIdentifications: AddressIdentification[]\n exposures: Exposure[]\n triggers: Trigger[]\n status: string\n poolMetadata: PoolMetadata\n}\n\nexport type CheckoutInitTokenTransferAddressParams = BaseApiRequest & {\n toChainId: string\n toTokenAddress: Address\n userId: string\n clientMetadata: NonNullable<object>\n sourceOfFund?: string\n recipientAddr: string\n actionType?: string\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n DirectExecution,\n GetDirectExecutionByTxHashRequest,\n GetDirectExecutionsByUserIdRequest,\n PostDirectExecutionRequest,\n} from './types'\n\nexport async function getDirectExecutionByTxHash({\n txHash,\n apiKey,\n logger,\n signal,\n}: GetDirectExecutionByTxHashRequest): Promise<DirectExecution> {\n return sendGetRequest<DirectExecution>({\n uri: `${API_BASE_URL}/direct-execution/${txHash}`,\n apiKey,\n logger,\n signal,\n })\n}\n\nexport async function getDirectExecutionsByUserId({\n userId,\n apiKey,\n logger,\n limit,\n signal,\n}: GetDirectExecutionsByUserIdRequest): Promise<DirectExecution[]> {\n const encodedUserId = encodeURIComponent(userId) // external userId includes \"|\" character\n const query = limit\n ? new URLSearchParams({\n limit: limit.toString(),\n })\n : ''\n return sendGetRequest<DirectExecution[]>({\n uri: `${API_BASE_URL}/direct-execution/userId/${encodedUserId}?${query}`,\n apiKey,\n logger,\n signal,\n })\n}\n\nexport async function createDirectExecution({\n txHash,\n userId,\n recipientAddr,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n fromAmountBaseUnit,\n toAmountBaseUnit,\n estTotalUsd,\n sourceOfFund,\n clientMetadata,\n apiKey,\n logger,\n signal,\n type,\n}: PostDirectExecutionRequest): Promise<{ txHash: DirectExecution['txHash'] }> {\n const body = {\n txHash,\n sourceOfFund,\n userId,\n recipientAddr,\n fromChainId,\n fromTokenAddress,\n toChainId,\n toTokenAddress,\n fromAmountBaseUnit,\n toAmountBaseUnit,\n estTotalUsd,\n clientMetadata,\n type,\n }\n\n return sendPostRequest<{ txHash: DirectExecution['txHash'] }>({\n uri: `${API_BASE_URL}/direct-execution`,\n body,\n apiKey,\n logger,\n signal,\n })\n}\n", "import type { ApiCheckoutClientMetadata } from '@funkit/utils'\nimport type { Address, Hex } from 'viem'\nimport type { BaseApiRequest } from '../../consts'\n\nexport interface GetDirectExecutionByTxHashRequest extends BaseApiRequest {\n txHash: Hex\n}\n\nexport interface GetDirectExecutionsByUserIdRequest extends BaseApiRequest {\n userId: string\n limit?: number\n}\n\n// Reference: https://github.com/fun-xyz/fun-backend/blob/main/packages/types/src/system/direct-execution.ts#L1\nexport enum DirectExecutionType {\n // For UT purposes only, should never show up in prod table\n TEST_EXECUTION = 'TEST_EXECUTION',\n /** @deprecated All vertex direct exec flows will go to Relay now */\n VERTEX_DEPOSIT_COLLATERAL_WITH_REFERRAL = 'VERTEX_DEPOSIT_COLLATERAL_WITH_REFERRAL', // Vertex deposit collateral with referral\n // Relay execution bypass in SDK\n RELAY = 'RELAY',\n\n // OFT execution\n OFT = 'OFT',\n\n // Across CCTP bridge execution (for HyperCore USDH)\n ACROSS = 'ACROSS',\n\n // Drift deposit execution on Solana\n DRIFT = 'DRIFT',\n}\n\n// Reference: https://github.com/reservoirprotocol/relay-kit/blob/211c645f9702a3b459ff545aa4e2e9d536c38455/packages/sdk/src/types/Execute.ts#L54-L61\nexport enum RelayExecutionStatus {\n DELAYED = 'delayed',\n FAILURE = 'failure',\n PENDING = 'pending',\n REFUND = 'refund',\n SUCCESS = 'success',\n WAITING = 'waiting',\n UNKNOWN = 'unknown',\n}\n\nexport interface RelayExecutionRequestFeeData {\n fees: Fee\n feesUsd: Fee\n metadata: RelayExecutionRequestMetadata\n appFees?: RelayExecutionRequestFeeDataAppFees[]\n}\n\nexport interface RelayExecutionRequestFeeDataAppFees {\n recipient?: Address\n amount?: string\n amountUsd?: string\n}\n\nexport interface RelayExecutionRequestMetadata {\n currencyIn: RelayExecutionRequestMetadataCurrency\n currencyOut: RelayExecutionRequestMetadataCurrency\n rate: string\n recipient: Address\n sender: Address\n}\n\nexport interface RelayExecutionRequestMetadataCurrency {\n amount: string\n amountFormatted: string\n amountUsd: string\n amountUsdCurrent: string\n currency: {\n address: Address\n chainId: number\n decimals: number\n metadata: {\n logoURI: string\n verified: boolean\n }\n name: string\n symbol: string\n }\n minimumAmount: string\n}\n\nexport interface Fee {\n gas: bigint\n fixed: bigint\n price: bigint\n}\n\n// Reference: https://github.com/fun-xyz/fun-backend/blob/main/packages/types/src/system/tables/DirectExecution.ts#L7\nexport interface DirectExecution {\n txHash: Hex // For account abstraction transactions, this will be a userOpHash.\n onChainTxHash?: Hex // For account abstraction transactions, this will be a normal txHash/bundle tx hash.\n customerId: string\n userId: string\n recipientAddr: Address\n type: DirectExecutionType\n\n fromChainId: string\n fromTokenAddress: Address\n toChainId: string\n toTokenAddress: Address\n\n fromAmountBaseUnit: string\n toAmountBaseUnit: string\n estTotalUsd: number\n\n clientMetadata: ApiCheckoutClientMetadata\n isIntermediaryPhase?: boolean\n sourceOfFund: string\n toTxId?: string\n triggeringTxHash?: string\n\n createdTimeMs: number\n updatedTimeMs?: number\n lastKnownDepositTimeMs?: number\n\n listenerInfo?: {\n destinationChainId: number\n inTxHashes: string[]\n originChainId: number\n status: RelayExecutionStatus\n time: number\n txHashes: string[]\n\n relayExecutionRequestDetails?: {\n id: Hex\n status: RelayExecutionStatus\n createdAt: Date\n updatedAt: Date\n data: RelayExecutionRequestFeeData\n }\n\n layerzeroExecutionStatusResponse?: {\n data: {\n pathway: LayerzeroPathway\n source: LayerzeroExecutionSource\n destination: LayerzeroExecutionDestination\n verification: unknown\n guid: string\n config: unknown\n status: LayerzeroOverallStatus\n created: string\n updated: string\n }[]\n }\n\n lighterExecutionStatusResponse?: LighterExecutionStatusResponse\n }\n}\n\nexport interface LighterExecutionStatusResponse {\n code: number\n hash: string\n type: number\n info: string\n event_info: string\n status: number\n transaction_index: number\n l1_address: string\n account_index: number\n nonce: number\n expire_at: bigint\n block_height: number\n queued_at: number\n sequence_index: number\n parent_hash: string\n api_key_index: number\n committed_at: number\n verified_at: number\n executed_at: number\n}\n\nexport interface LayerzeroPathway {\n srcEid: number\n dstEid: number\n sender: LayerzeroEndpointParty\n receiver: LayerzeroEndpointParty\n id: string\n nonce: number\n}\n\nexport interface LayerzeroEndpointParty {\n address: string\n id: string\n name: string\n chain: string\n}\n\nexport interface LayerzeroExecutionSource {\n status: string\n tx: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n from: string\n payload: string\n readinessTimestamp: bigint\n }\n}\n\nexport interface LayerzeroExecutionDestination {\n status: string\n tx: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n }\n lzCompose: {\n txs: {\n txHash: string\n blockHash: string\n blockNumber: string\n blockTimestamp: bigint\n }[]\n status: string\n }\n}\nexport interface LayerzeroOverallStatus {\n name: string\n message: string\n}\n\nexport interface PostDirectExecutionRequest\n extends BaseApiRequest,\n Omit<DirectExecution, 'customerId' | 'createdTimeMs'> {}\n", "import { FUN_FAUCET_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { GetAssetFromFaucetRequest } from './types'\n\nexport async function getAssetFromFaucet({\n token,\n chain,\n walletAddress,\n ...options\n}: GetAssetFromFaucetRequest) {\n return await sendGetRequest({\n uri: `${FUN_FAUCET_URL}/get-faucet?token=${token}&testnet=${chain}&addr=${walletAddress}`,\n ...options,\n })\n}\n", "import type { BaseApiRequest } from '../../consts'\nimport { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { GetFopsParams, GetFopsResponse } from './types'\n\n/**\n * Fetches available forms of payment from the API.\n *\n * @param params - Request parameters including recipient address, user ID, destination token, etc.\n * @param options - Base API request options including API key\n * @returns Promise resolving to available forms of payment\n */\nexport async function getFops({\n params,\n ...options\n}: BaseApiRequest & {\n params: GetFopsParams\n}): Promise<GetFopsResponse> {\n return sendPostRequest({\n uri: `${API_BASE_URL}/fops`,\n body: params,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n", "/**\n * Request parameters for fetching forms of payment (FOP).\n */\nexport interface GetFopsParams {\n /** The wallet address that will receive the crypto */\n recipientAddress: string\n /** Unique identifier for the user */\n userId: string\n /** The destination token with chain ID and address */\n destinationToken: {\n chainId: string\n address: string\n }\n /** The fiat currency code (e.g., \"USD\", \"EUR\") */\n fiatCurrencyCode?: string\n /** The ISO 3166-1 alpha-2 country code (e.g., \"US\", \"GB\") */\n countryCode?: string\n /** Third-party payment provider configurations */\n thirdPartyPaymentConfigs?: ThirdPartyPaymentConfigs\n}\n\nexport interface ThirdPartyPaymentConfigs {\n swapped?: SwappedConfig\n}\n\nexport interface SwappedConfig {\n email?: string\n /** Theme configuration for the embedded flow iframe (key-value pairs for URL params) */\n themeConfig?: Record<string, string>\n}\n\nexport enum FormOfPaymentType {\n CARDS = 'CARDS',\n BANK_TRANSFER = 'BANK_TRANSFER',\n APPLE_PAY = 'APPLE_PAY',\n GOOGLE_PAY = 'GOOGLE_PAY',\n PAYPAL = 'PAYPAL',\n REVOLUT_PAY = 'REVOLUT_PAY',\n RAPID_TRANSFER = 'RAPID_TRANSFER',\n PAYSAFECARD = 'PAYSAFECARD',\n NETELLER = 'NETELLER',\n SKRILL = 'SKRILL',\n PIX = 'PIX',\n}\n\ninterface FormOfPaymentMetadata {\n checkoutLimit: {\n minAmount?: {\n amount: number\n fiatCurrencyCode: string\n }\n maxAmount?: {\n amount: number\n fiatCurrencyCode: string\n }\n }\n}\n\n/**\n * Represents a single form of payment option.\n */\nexport interface GenericFormOfPayment {\n fopType: FormOfPaymentType\n /** Display name of the payment method (e.g., \"Google Pay\", \"Apple Pay\") */\n name: string\n /** URL to embedded flow for the payment provider */\n embeddedFlowUrl: string\n /** URL to the payment method's icon */\n iconImageUrl: string\n metadata: FormOfPaymentMetadata\n}\n\n/**\n * Represents a saved form of payment with card-specific details.\n */\nexport interface SavedFormOfPayment {\n /** Payment type */\n fopType: FormOfPaymentType\n /** Display name of saved payment method \"mastercard \u2022\u2022\u2022\u2022 1897\" */\n name: string\n /** Card brand (e.g., \"Visa\", \"Mastercard\") */\n cardBrand: string\n /** First six digits of the card number */\n cardBin: string\n /** Last four digits of the card number */\n cardLastFour: string\n /** Card expiry (e.g., \"12/26\") */\n cardExpiry: string\n /** Name on the card */\n cardholderName: string\n /** URL to the payment method's icon */\n iconImageUrl: string\n /** URL to embedded flow for the payment provider */\n embeddedFlowUrl: string\n metadata: FormOfPaymentMetadata\n}\n\nexport type SwappedFormOfPayment = GenericFormOfPayment | SavedFormOfPayment\n\n/**\n * Response from the /fops API endpoint.\n */\nexport interface GetFopsResponse {\n /** List of generic/available forms of payment */\n genericFormsOfPayments: GenericFormOfPayment[]\n /** List of saved/previously used forms of payment for the user */\n savedFormsOfPayments: SavedFormOfPayment[]\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CheckWalletAccessInitializationRequest,\n InitializeWalletAccessRequest,\n} from './types'\n\nexport async function initializeWalletAccess({\n walletAddr,\n creatorAddr,\n ...options\n}: InitializeWalletAccessRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/access/wallet`,\n body: { walletAddr, creatorAddr },\n ...options,\n })\n}\n\nexport async function checkWalletAccessInitialization({\n walletAddr,\n ...options\n}: CheckWalletAccessInitializationRequest): Promise<boolean> {\n return (\n await sendGetRequest<{ initialized: boolean }>({\n uri: `${API_BASE_URL}/access/wallet/${walletAddr}`,\n ...options,\n })\n ).initialized\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { GetGroupsRequest, GroupMetadata } from './types'\n\nexport async function getGroups({\n groupIds,\n chainId,\n ...options\n}: GetGroupsRequest): Promise<GroupMetadata[]> {\n return (\n await sendPostRequest<{ groups: GroupMetadata[] }>({\n uri: `${API_BASE_URL}/group/get-groups`,\n body: { groupIds, chainId },\n ...options,\n })\n ).groups\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type {\n GetChainFromIdRequest,\n GetChainFromNameRequest,\n ServerChainInfo,\n} from './types'\n\nexport async function getChainFromId({\n chainId,\n ...options\n}: GetChainFromIdRequest): Promise<ServerChainInfo> {\n const res = await sendGetRequest<ServerChainInfo>({\n uri: `${API_BASE_URL}/chain-info/${chainId}`,\n ...options,\n })\n if (!res) {\n throw new Error(JSON.stringify(res))\n }\n return res\n}\n\nexport async function getChainFromName({\n name,\n ...options\n}: GetChainFromNameRequest): Promise<ServerChainInfo> {\n const res = await sendGetRequest<ServerChainInfo>({\n uri: `${API_BASE_URL}/chain-info?name=${name}`,\n ...options,\n })\n if (!res) {\n throw new Error(JSON.stringify(res))\n }\n return res\n}\n", "import type { Address } from 'viem'\nimport { API_BASE_URL } from '../../consts'\nimport { sendDeleteRequest, sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateOpRequest,\n DeleteOpRequest,\n EstimateOpInput,\n EstimatedGas,\n ExecuteOpInput,\n ExecutionReceipt,\n GetFullReceiptRequest,\n GetOpsOfWalletRequest,\n GetOpsRequest,\n GetUserOpGasPriceRequest,\n OpRequest,\n OperationData,\n ScheduleOpInput,\n SignOpRequest,\n UserOperationGasPrice,\n} from './types'\n\nexport async function createOp({\n op,\n ...options\n}: CreateOpRequest): Promise<string> {\n return (\n await sendPostRequest<{ opId: string }>({\n uri: `${API_BASE_URL}/operation`,\n body: { ...op },\n ...options,\n })\n ).opId\n}\n\ninterface OpsOfWalletResponse {\n operations: OperationData[]\n}\n\nexport async function getOpsOfWallet({\n walletAddr,\n chainId,\n status,\n ...options\n}: GetOpsOfWalletRequest): Promise<OperationData[]> {\n const endpoint = status\n ? `${API_BASE_URL}/operation/wallet/${walletAddr}/chain/${chainId}?status=${status}`\n : `${API_BASE_URL}/operation/wallet/${walletAddr}/chain/${chainId}`\n return (\n await sendGetRequest<OpsOfWalletResponse>({ uri: endpoint, ...options })\n ).operations\n}\n\nexport async function getOps({\n opIds,\n chainId,\n ...options\n}: GetOpsRequest): Promise<OperationData[]> {\n return (\n await sendPostRequest<OpsOfWalletResponse>({\n uri: `${API_BASE_URL}/operation/get-operations`,\n body: {\n opIds,\n chainId,\n },\n ...options,\n })\n ).operations\n}\n\nexport async function deleteOp({\n opId,\n chainId,\n ...options\n}: DeleteOpRequest): Promise<void> {\n await sendDeleteRequest({\n uri: `${API_BASE_URL}/operation/${opId}/chain/${chainId}`,\n ...options,\n })\n}\n\nexport async function signOp({\n opId,\n chainId,\n signature,\n signedBy,\n threshold,\n ...options\n}: SignOpRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/operation/sign`,\n body: {\n opId,\n chainId,\n signature,\n signedBy,\n threshold,\n },\n ...options,\n })\n}\n\nexport async function executeOp({\n input,\n ...options\n}: OpRequest<ExecuteOpInput>): Promise<ExecutionReceipt> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/operation/execute`,\n body: input,\n ...options,\n })\n}\n\nexport async function estimateOp({\n input,\n ...options\n}: OpRequest<EstimateOpInput>): Promise<EstimatedGas> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/operation/estimate`,\n body: input,\n ...options,\n })\n}\n\nexport async function scheduleOp({\n input,\n ...options\n}: OpRequest<ScheduleOpInput>): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/operation/schedule`,\n body: input,\n ...options,\n })\n}\n\nexport const getFullReceipt = async ({\n opId,\n chainId,\n userOpHash,\n ...options\n}: GetFullReceiptRequest): Promise<ExecutionReceipt> => {\n const retries = 20\n let result: { status: string; receipt?: ExecutionReceipt } = {\n status: 'pending',\n }\n for (let i = 0; i < retries; i++) {\n try {\n result = await sendGetRequest({\n uri: `${API_BASE_URL}/operation/${opId}/chain/${chainId}/receipt?userOpHash=${userOpHash}`,\n ...options,\n })\n if (result.status === 'included') {\n break\n }\n } catch (_err) {\n /* empty */\n }\n\n await new Promise((resolve) => setTimeout(resolve, 2500))\n }\n if (!result.receipt) {\n result.receipt = {\n // TODO: this is obviously wrong but it was what we had before\n txId: 'Failed to find.' as Address,\n gasUsed: 'Failed to find.',\n opFeeUSD: 'Failed to find.',\n opFee: 'Failed to find.',\n userOpHash: 'Failed to find.',\n }\n }\n return {\n ...result.receipt,\n }\n}\n\nexport const getUserOpGasPrice = async ({\n chainId,\n ...options\n}: GetUserOpGasPriceRequest): Promise<UserOperationGasPrice> => {\n return await sendGetRequest({\n uri: `${API_BASE_URL}/operation/chain/${chainId}/gas-price`,\n ...options,\n })\n}\n", "import type { Address, Hex } from 'viem'\n\nimport type { BaseApiRequest } from '../../consts'\n\nexport enum OperationStatus {\n ALL = '',\n PENDING_APPROVED = 'PENDING_APPROVED',\n APPROVED = 'APPROVED',\n PENDING = 'PENDING',\n OP_SUCCEED = 'OP_SUCCEED',\n OP_REVERTED = 'OP_REVERTED',\n SCHEDULED = 'SCHEDULED',\n}\n\nexport type OperationMetadata = {\n opId?: Hex\n chainId: string\n opType: OperationType\n authType: AuthType\n groupId?: Hex\n message?: string\n walletAddr: Address\n status?: OperationStatus\n proposer: string // do not use address in case we later use non-address data as the proposer\n proposedTime?: number\n executedBy?: string\n executedTime?: number\n relatedOpIds?: Hex[]\n signatures?: Signature[]\n txid?: string\n gasUsed?: string\n opFeeUSD?: string\n opFee?: string\n executedBlockNumber?: number\n executedBlockTimeStamp?: number\n}\n\nexport interface OperationData extends OperationMetadata {\n userOp: UserOperation\n}\n\nexport enum AuthType {\n ECDSA = 0,\n MULTI_SIG = 1,\n}\n\nexport type Signature = {\n userId: Hex\n signature: Hex\n signedTime: number\n}\n\nexport enum OperationType {\n SINGLE_OPERATION = 'SINGLE_OPERATION',\n GROUP_OPERATION = 'GROUP_OPERATION',\n REJECTION = 'REJECTION',\n}\n\nexport type GroupInfo = {\n threshold: number\n memberIds: Hex[]\n}\n\nexport type UserOperation = {\n sender: string\n nonce: bigint\n initCode?: string\n callData: string\n callGasLimit: bigint\n verificationGasLimit: bigint\n preVerificationGas?: bigint\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n paymasterAndData?: string\n signature?: string\n}\n\nexport interface ExecutionReceipt {\n userOpHash: string\n txId?: Hex\n gasUsed?: string\n opFeeUSD?: string\n opFee?: string\n}\n\nexport type EstimatedGas = {\n preVerificationGas: bigint\n callGasLimit: bigint\n verificationGasLimit: bigint\n}\n\nexport interface CreateOpRequest extends BaseApiRequest {\n op: OperationData\n}\n\nexport interface GetOpsOfWalletRequest extends BaseApiRequest {\n walletAddr: Address\n chainId: string\n status?: OperationStatus\n}\n\nexport interface GetOpsRequest extends BaseApiRequest {\n opIds: Hex[]\n chainId: string\n}\n\nexport interface DeleteOpRequest extends BaseApiRequest {\n opId: Hex\n chainId: string\n}\n\nexport interface SignOpRequest extends BaseApiRequest {\n opId: Hex\n chainId: string\n signature: Hex\n signedBy: Address\n threshold?: number\n}\n\nexport type OpRequest<T> = BaseApiRequest & {\n input: T\n}\n\nexport type ExecuteOpInput = {\n opId: Hex\n chainId: string\n executedBy: string\n entryPointAddress: Address\n signature: Hex\n userOp?: UserOperation\n groupInfo?: GroupInfo\n}\n\nexport type EstimateOpInput = {\n opId?: Hex\n chainId: string\n entryPointAddress?: Address\n signature?: Hex\n userOp?: UserOperation\n}\n\nexport type ScheduleOpInput = {\n opId: Hex\n chainId: string\n scheduledBy: string\n entryPointAddress: Address\n signature: Hex\n userOp?: UserOperation\n groupInfo?: GroupInfo\n}\n\nexport interface GetFullReceiptRequest extends BaseApiRequest {\n opId: string\n chainId: string\n userOpHash: string\n}\n\nexport interface GetUserOpGasPriceRequest extends BaseApiRequest {\n chainId: string\n}\n\nexport type UserOperationGasPrice = {\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { AddPaymasterTransactionRequest } from './types'\n\nexport async function addTransaction({\n chainId,\n timestamp,\n txid,\n transaction,\n paymasterType,\n sponsorAddress,\n ...options\n}: AddPaymasterTransactionRequest): Promise<unknown> {\n return await sendPostRequest({\n uri: `${API_BASE_URL}/dashboard/paymasters/add-transaction`,\n body: {\n chain: chainId,\n sponsorAddress,\n type: paymasterType,\n timestamp,\n transaction,\n txid,\n },\n ...options,\n }).catch(() => {\n /* empty */\n })\n}\n", "import type { BaseApiRequest } from '../../consts'\nimport type { ExecutionReceipt } from '../fw-operation'\n\nexport interface PaymasterTransaction {\n action: string\n amount: number\n from: string\n to: string\n token: string\n txid?: string\n}\n\nexport interface AddPaymasterTransactionRequest extends BaseApiRequest {\n chainId: string\n timestamp: number\n txid: ExecutionReceipt['txId'] | string\n transaction: PaymasterTransaction\n paymasterType: PaymasterType\n sponsorAddress: string\n}\n\nexport enum PaymasterType {\n BaseSponsor = 'base',\n GaslessSponsor = 'gasless',\n TokenSponsor = 'token',\n CheckoutSponsor = 'checkout',\n}\n", "import { ResourceNotFoundError } from '@funkit/utils'\nimport { type Hex, InvalidParameterError } from 'viem'\nimport { API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n AddUserToWalletRequest,\n CreateUserRequest,\n GetUserUniqueIdRequest,\n GetUserWalletIdentitiesRequest,\n GetUserWalletsByAddrRequest,\n Wallet,\n} from './types'\n\nexport async function createUser({\n authId,\n addr,\n method,\n userUniqueId,\n ...options\n}: CreateUserRequest): Promise<void> {\n await sendPostRequest({\n uri: `${API_BASE_URL}/user`,\n body: {\n authId,\n addr,\n method,\n userUniqueId,\n },\n ...options,\n })\n}\n\nexport async function getUserUniqueId({\n authId,\n ...options\n}: GetUserUniqueIdRequest): Promise<string> {\n try {\n return (\n await sendGetRequest<{ userUniqueId: string }>({\n uri: `${API_BASE_URL}/user/auth/${authId}/unique-id`,\n ...options,\n })\n ).userUniqueId\n } catch (err) {\n if (err instanceof ResourceNotFoundError) {\n return ''\n }\n throw err\n }\n}\n\nexport async function getUserWalletsByAddr({\n addr,\n chainId,\n ...options\n}: GetUserWalletsByAddrRequest): Promise<Wallet[]> {\n const endpoint = chainId\n ? `${API_BASE_URL}/user/addr/${addr}/wallets?chainId=${chainId}`\n : `${API_BASE_URL}/user/addr/${addr}/wallets`\n return (\n await sendGetRequest<{ wallets: Wallet[] }>({ uri: endpoint, ...options })\n ).wallets\n}\n\nexport async function addUserToWallet({\n authId,\n chainId,\n walletAddr,\n userIds,\n walletUniqueId,\n ...options\n}: AddUserToWalletRequest): Promise<void> {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/user/auth/${authId}/chain/${chainId}/wallet`,\n body: { walletAddr, userIds, walletUniqueId },\n ...options,\n })\n } catch (err) {\n if (err instanceof InvalidParameterError) {\n // TODO: What about any other cause of InvalidParameterError???\n // swallow the error if the wallet already exists.\n return\n }\n\n throw err\n }\n}\n\n/**\n * @returns userIds of the specified Wallet.\n */\nexport async function getUserWalletIdentities({\n authId,\n chainId,\n walletAddr,\n ...options\n}: GetUserWalletIdentitiesRequest): Promise<Hex[]> {\n return (\n (\n await sendGetRequest<{ ids: Hex[] }>({\n uri: `${API_BASE_URL}/user/auth/${authId}/chain/${chainId}/wallet/${walletAddr}/identities`,\n ...options,\n })\n ).ids ?? []\n )\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n GetCryptoPurchaseLimitsParams,\n MeldCreateCryptoQuoteParams,\n MeldCreateCryptoQuoteResponse,\n MeldCreateCryptoWidgetParams,\n MeldCreateCryptoWidgetResponse,\n MeldDefaultFiatResponse,\n MeldFiatLimitResponse,\n MeldSupportedFiatResponse,\n SearchDefaultFiatParams,\n} from './types'\n\nexport async function getMeldSupportedFiat({\n ...options\n}: BaseApiRequest): Promise<MeldSupportedFiatResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/fiat`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n\nexport async function getMeldQuotes({\n params,\n ...options\n}: BaseApiRequest & {\n params: MeldCreateCryptoQuoteParams\n}): Promise<MeldCreateCryptoQuoteResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/quote`,\n body: params,\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\nexport async function startMeldSession({\n params,\n ...options\n}: BaseApiRequest & {\n params: MeldCreateCryptoWidgetParams['sessionData']\n}): Promise<MeldCreateCryptoWidgetResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/session`,\n body: {\n sessionData: params,\n sessionType: 'BUY',\n },\n retryOptions: { maxAttempts: 2 },\n ...options,\n })\n}\n\nexport async function getMeldDefaultFiat({\n params,\n ...options\n}: BaseApiRequest & {\n params: SearchDefaultFiatParams\n}): Promise<MeldDefaultFiatResponse> {\n const countries = params.countries?.join(',') ?? ''\n const categories = params.categories?.join(',') ?? ''\n const urlParams = new URLSearchParams({\n ...(countries ? { countries } : {}),\n ...(categories ? { categories } : {}),\n })\n\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/defaultFiat?${urlParams}`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n\nexport async function getMeldFiatLimits({\n params,\n ...options\n}: BaseApiRequest & {\n params: GetCryptoPurchaseLimitsParams\n}): Promise<MeldFiatLimitResponse> {\n const countries = params.countries.join(',')\n const cryptoCurrencies = params.cryptoCurrencies.join(',')\n const fiatCurrencies = params.fiatCurrencies.join(',')\n const categories = params.categories?.join(',') ?? ''\n const urlParams = new URLSearchParams({\n countries,\n cryptoCurrencies,\n fiatCurrencies,\n ...(categories ? { categories } : {}),\n })\n\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/meld/fiatLimit?${urlParams}`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "export enum MeldServiceProvider {\n ALCHEMYPAY = 'ALCHEMYPAY',\n BANXA = 'BANXA',\n BILIRA = 'BILIRA',\n BINANCECONNECT = 'BINANCECONNECT',\n BLOCKCHAINDOTCOM = 'BLOCKCHAINDOTCOM',\n BTCDIRECT = 'BTCDIRECT',\n COINBASEPAY = 'COINBASEPAY',\n MOONPAY = 'MOONPAY',\n FONBNK = 'FONBNK',\n GUARDARIAN = 'GUARDARIAN',\n KOYWE = 'KOYWE',\n MERCURYO = 'MERCURYO',\n MESH = 'MESH',\n MESO = 'MESO',\n ONMETA = 'ONMETA',\n ONRAMPMONEY = 'ONRAMPMONEY',\n PAYBIS = 'PAYBIS',\n PAYPAL = 'PAYPAL',\n RAMP = 'RAMP',\n REVOLUT = 'REVOLUT',\n ROBINHOOD = 'ROBINHOOD',\n SARDINE = 'SARDINE',\n SHIFT4 = 'SHIFT4',\n SIMPLEX = 'SIMPLEX',\n SKRILLCRYPTO = 'SKRILLCRYPTO',\n STRIPE = 'STRIPE',\n TOPPER = 'TOPPER',\n TRANSAK = 'TRANSAK',\n TRANSFI = 'TRANSFI',\n UNLIMIT = 'UNLIMIT',\n YELLOWCARD = 'YELLOWCARD',\n SWAPPED = 'SWAPPED',\n KRYPTONIM = 'KRYPTONIM',\n}\n\nexport const MELD_PROVIDER_CATEGORIES = [\n 'BANK_LINKING',\n 'CRYPTO_ONRAMP',\n 'CRYPTO_OFFRAMP',\n 'CRYPTO_TRANSFER',\n 'FIAT_PAYMENTS',\n] as const\n\nexport type MeldFiatCurrency = {\n /** fiat code. e.g. USD/EUR */\n currencyCode: string\n /** fiat name. e.g. United State Dollar */\n name: string\n /** image URL for the currency symbol provided by meld */\n symbolImageUrl: string\n}\n\nexport type MeldDefaultFiatCurrency = {\n /** Two-letter code (ISO 3166-1 alpha-2) for the Country. */\n countryCode: string\n /** fiat code. e.g. USD/EUR */\n defaultCurrencyCode: string\n /** The identifier for the Payment Method */\n defaultPaymentMethods: MeldQuote['paymentMethodType'][]\n}\n\nexport type MeldCreateCryptoQuoteParams = {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string\n\n /**\n * The cryptocurrency the customer is buying (e.g. BTC, ETH).\n */\n destinationCurrencyCode: string\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string\n\n /**\n * Payment Method Type or SubType\n */\n paymentMethodType?: string\n\n /**\n * An optional list of Strings representing the Service Providers for this Quote\n */\n serviceProviders?: MeldServiceProvider[]\n\n /**\n * The amount of source currency your customer wants tosend in this transaction (e.g., 50.05)\n */\n sourceAmount: `${number}`\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * Subdivision is a optional parameter Only applicable if the country code is US or CA (e.g. US-CA).\n */\n subdivision?: string\n\n /**\n * Your customer's wallet address\n */\n walletAddress?: `0x${string}`\n}\n\nexport type MeldQuote = {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * A numerical score representing the expectation a Customer will convert\n */\n customerScore?: number\n\n /**\n * Destination currency amount to be received for this quote\n */\n destinationAmount: number\n\n /**\n * Code of currency being quoted: BTC, ETH, ...\n */\n destinationCurrencyCode: string\n\n /**\n * The exchange rate at the time the request is sent\n */\n exchangeRate: number\n\n /**\n * The fiat amount exchanged when buying or selling crypto, excluding fees\n */\n fiatAmountWithoutFees: number\n\n /**\n * The name of the institution or broker used for this quote, if present\n */\n institutionName?: string | null\n\n /**\n * LowKYC indicates if the quote amount is below the provider's low KYC threshold, meaning the user may not need to upload documents, which can increase conversion.\n */\n lowKyc?: boolean | null\n\n /**\n * The network fee applied to a crypto transaction\n */\n networkFee?: number | null\n\n /**\n * The fee amount charged by the partner to process your customer's purchase\n */\n partnerFee?: number | null\n\n /**\n * Payment Method Type used for this quote\n */\n paymentMethodType: 'APPLE_PAY' | 'MASTERCARD' | 'SEPA' | 'VISA'\n\n /**\n * The service provider used for this transaction\n */\n serviceProvider: MeldServiceProvider\n\n /**\n * Amount requested + fees\n */\n sourceAmount: number\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * The total amount of fees that will be charged\n */\n totalFee?: number | null\n\n /**\n * The fee amount charged by the service provider to process your customer's purchase\n */\n transactionFee?: number | null\n\n /**\n * The type of crypto transaction\n */\n transactionType: 'CRYPTO_PURCHASE' // | 'CRYPTO_SELL', but only care about buying atm\n}\n\nexport type MeldCreateCryptoQuoteResponse = {\n quotes: MeldQuote[]\n}\n\nexport type MeldCreateCryptoWidgetParams = {\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string\n\n /**\n * Your reference Id for your widget session\n */\n externalSessionId?: string\n\n sessionData: {\n /**\n * Two-letter country code (ISO 3166-1 alpha-2)\n */\n countryCode: string\n\n /**\n * The cryptocurrency the customer is buying (e.g. BTC, ETH).\n */\n destinationCurrencyCode: string\n\n /**\n * If provided, the institution to bypass the institution selection screen in the service provider's widget. Currently this is only supported for MESH widget sessions.\n */\n institutionId?: string\n\n /**\n * Where supported by the Service Provider, Meld can help you lock the cryptocurrency and/or wallet address fields within the widget.\n */\n lockFields?: ('destinationCurrencyCode' | 'walletAddress')[]\n\n /**\n * Payment Method Type or SubType\n */\n paymentMethodType?: string\n\n /**\n * The url to redirect to following completion of the widget flow\n */\n redirectUrl?: string\n\n /**\n * The service provider used for this transaction\n */\n serviceProvider: MeldServiceProvider\n\n /**\n * The amount of source currency your customer wants to send in this transaction (e.g., 50.05)\n */\n sourceAmount: `${number}`\n\n /**\n * The fiat currency the user is buying crypto with (e.g. USD, EUR)\n */\n sourceCurrencyCode: string\n\n /**\n * Your customer's wallet address\n */\n walletAddress: `0x${string}`\n\n /**\n * Your customer's wallet tag/destination tag/memo. This field is required for certain cryptocurrencies.\n */\n walletTag?: string\n }\n\n sessionType: 'BUY' // | 'SELL' | 'TRANSFER' - We only care about BUY atm\n\n /**\n * For MESH only. Details about a previously authenticated crypto session or bank-linking connection.\n * If provided, the widget will not require the customer to authenticate again as long as the authentication is still valid.\n * The scope of these authentication bypass details are restricted to the same customer, service provider, and institution that were used in the original connection.\n */\n authenticationBypassDetails?: {\n /**\n * The widget type associated with the previously authenticated session/connection.\n */\n category: string\n\n /**\n * The Meld id of the crypto session or bank-linking connection in which the customer has already authenticated with their institution.\n * The auth tied to this session/connection will be used to bypass the authentication process for the current session, if it is still valid.\n * This id may pertain to the initial session/connection in which the customer authenticated, or any subsequent session that used this prior authentication successfully.\n */\n previouslyAuthenticatedId: string\n }\n}\n\nexport type MeldCreateCryptoWidgetResponse = {\n /**\n * Meld generated unique identifier for your customer. This should be used to track customer activity.\n */\n customerId?: string | null\n\n /**\n * Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.\n */\n externalCustomerId?: string | null\n\n /**\n * Your reference Id for your widget session\n */\n externalSessionId?: string | null\n\n /**\n * Unique identifier for this session\n */\n id: string\n\n /**\n * The session token\n */\n token: string\n\n /**\n * The crypto widget URL\n */\n widgetUrl: string\n}\n\nexport interface MeldError extends Error {\n /**\n * A categorization of the error\n */\n code: string\n\n /**\n * A user-friendly representation of the error code.\n * This may change over time and is not safe for programmatic use.\n */\n errors?: string[] | null\n\n /**\n * A developer-friendly representation of the error code.\n * This may change over time and is not safe for programmatic use.\n */\n message: string\n\n /**\n * The request Id\n */\n requestId: string\n\n /**\n * The date and time when the request was made (ISO)\n */\n timestamp: string | null\n}\n\nexport interface MeldSupportedFiatResponse {\n currencies: MeldFiatCurrency[]\n /** Irrelevant */\n preferred: string[]\n}\n\nexport type SearchDefaultFiatParams = {\n countries: string[]\n categories?: (typeof MELD_PROVIDER_CATEGORIES)[number][]\n}\n\nexport interface MeldDefaultFiatResponse {\n currencies: MeldDefaultFiatCurrency[]\n}\n\nexport interface GetCryptoPurchaseLimitsParams {\n /**\n * The two-letter country code (ISO 3166-1 alpha-2) to search for supported fiat currencies.\n * A comma separated list of countries.\n */\n countries: string[]\n\n /**\n * The crypto currencies to search for limits\n */\n cryptoCurrencies: string[]\n\n /**\n * The fiat currencies to search for limits\n */\n fiatCurrencies: string[]\n\n /**\n * The categories to search for limits\n */\n categories?: (typeof MELD_PROVIDER_CATEGORIES)[number][]\n}\n\nexport interface MeldFiatCurrencyLimit {\n currencyCode: string\n defaultAmount: number | null\n minimumAmount: number\n maximumAmount: number\n}\n\nexport interface MeldFiatLimitResponse {\n limits: MeldFiatCurrencyLimit[]\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { SwappedSupportedCountriesResponse } from './types'\n\nexport async function getSwappedSupportedCountries({\n ...options\n}: BaseApiRequest): Promise<SwappedSupportedCountriesResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/swapped/supportedCountries`,\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { GetOrganizationIdRequest } from './types'\n\nexport async function getOrganizationIdByApiKey({\n apiKey,\n}: GetOrganizationIdRequest) {\n return await sendGetRequest<{ id: string }>({\n uri: `${API_BASE_URL}/organization`,\n apiKey,\n })\n}\n", "import { API_BASE_URL, type BaseApiRequest } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n CreateStripeBuySessionBody,\n CreateStripeBuySessionResponse,\n GetStripeBuyQuoteRequest,\n GetStripeBuyQuoteResponse,\n} from './types'\n\nexport async function getStripeBuyQuote({\n sourceCurrency,\n destinationAmount,\n destinationCurrency,\n destinationNetwork,\n isSandbox,\n ...options\n}: GetStripeBuyQuoteRequest): Promise<GetStripeBuyQuoteResponse> {\n const params = new URLSearchParams({\n isSandbox: isSandbox.toString(),\n sourceCurrency,\n destinationAmount: destinationAmount.toString(),\n // Only allow one currency in this SDK\n destinationCurrencies: destinationCurrency,\n // Only allow one network in this SDK\n destinationNetworks: destinationNetwork,\n }).toString()\n const buyQuoteResp = await sendGetRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-buy-quote?${params}`,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return buyQuoteResp as GetStripeBuyQuoteResponse\n}\n\nexport async function createStripeBuySession({\n sourceCurrency,\n destinationAmount,\n destinationCurrency,\n destinationNetwork,\n walletAddress,\n customerIpAddress,\n isSandbox,\n ...options\n}: CreateStripeBuySessionBody): Promise<CreateStripeBuySessionResponse> {\n const body = {\n isSandbox: isSandbox.toString(),\n sourceCurrency,\n destinationAmount: destinationAmount.toString(),\n // Only allow one currency in this SDK\n destinationCurrency,\n destinationCurrencies: [destinationCurrency],\n // Only allow one network in this SDK\n destinationNetwork,\n destinationNetworks: [destinationNetwork],\n // Only allow one wallet address in this SDK, and it must correspond to the destination network\n walletAddresses: {\n [destinationNetwork]: walletAddress,\n },\n ...(customerIpAddress ? { customerIpAddress } : {}),\n }\n const newBuySessionResp = await sendPostRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-checkout`,\n body,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return newBuySessionResp as CreateStripeBuySessionResponse\n}\n\nexport async function getStripeBuySession({\n sessionId,\n ...options\n}: BaseApiRequest & {\n sessionId: string\n}): Promise<CreateStripeBuySessionResponse> {\n const buySessionResp = await sendGetRequest({\n uri: `${API_BASE_URL}/on-ramp/stripe-checkout-session/${sessionId}`,\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return buySessionResp as CreateStripeBuySessionResponse\n}\n", "import { API_BASE_URL } from '../../consts'\nimport { sendPostRequest } from '../../utils'\nimport type { SendSupportMessageRequest } from './types'\n\nexport async function sendSupportMessage({\n title,\n description,\n userEmail,\n ...options\n}: SendSupportMessageRequest): Promise<boolean> {\n try {\n await sendPostRequest({\n uri: `${API_BASE_URL}/support/send-message`,\n body: { title, description, userEmail },\n retryOptions: { maxAttempts: 1 },\n ...options,\n })\n return true\n } catch (_err) {\n return false\n }\n}\n", "import { type BaseApiRequest, FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest } from '../../utils'\nimport type { ExchangeRates } from './types'\n\n/**\n * Get the exchange rates for all fiat currencies\n * @returns The exchange rates for all fiat currencies\n */\nexport async function getFiatExchangeRates({\n ...options\n}: Omit<BaseApiRequest, 'apiKey'> = {}): Promise<ExchangeRates> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/exchange-rates`,\n apiKey: '', // Just a hack to make typescript happy as we don't require an API Key for this endpoint\n ...options,\n retryOptions: { maxAttempts: 2 },\n })\n}\n", "import { FROG_API_BASE_URL } from '../../consts'\nimport { sendGetRequest, sendPostRequest } from '../../utils'\nimport type {\n BluvoExecuteWithdrawalRequest,\n BluvoExecuteWithdrawalResponse,\n BluvoGetWalletByIdRequest,\n BluvoGetWalletByIdResponse,\n BluvoGetWithdrawableBalanceByIdRequest,\n BluvoGetWithdrawableBalanceByIdResponse,\n BluvoListExchangesRequest,\n BluvoListExchangesResponse,\n BluvoRequestQuotationRequest,\n BluvoRequestQuotationResponse,\n} from './types'\n\nexport async function bluvoGetWithdrawableBalanceById({\n id,\n logger,\n apiKey,\n}: BluvoGetWithdrawableBalanceByIdRequest): Promise<BluvoGetWithdrawableBalanceByIdResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/balance?id=${id}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoListExchanges({\n status,\n logger,\n apiKey,\n}: BluvoListExchangesRequest): Promise<BluvoListExchangesResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/exchanges?status=${status}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoGetWalletById({\n id,\n logger,\n apiKey,\n}: BluvoGetWalletByIdRequest): Promise<BluvoGetWalletByIdResponse> {\n return sendGetRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/walletId?id=${id}`,\n logger,\n apiKey,\n })\n}\n\nexport async function bluvoRequestQuotation({\n id,\n params,\n logger,\n}: BluvoRequestQuotationRequest): Promise<BluvoRequestQuotationResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/quote`,\n body: { id, params },\n logger,\n apiKey: '',\n })\n}\n\nexport async function bluvoExecuteWithdrawal({\n id,\n idempotencyKey,\n quoteId,\n params,\n logger,\n}: BluvoExecuteWithdrawalRequest): Promise<BluvoExecuteWithdrawalResponse> {\n return sendPostRequest({\n uri: `${FROG_API_BASE_URL}/api/bluvo/withdrawal`,\n body: { id, idempotencyKey, quoteId, params },\n logger,\n apiKey: '',\n })\n}\n", "import type { BluvoClient, TypeEnum2 } from '@bluvo/sdk-ts'\n\nexport interface BluvoBalanceSchema {\n id: string\n}\n\nexport interface BluvoExchangesSchema {\n status: 'live' | 'offline' | 'maintenance' | 'coming_soon'\n}\n\nexport interface BluvoQuoteSchema {\n id: string\n params: {\n asset: string\n amount: string\n address: string\n tag?: string | undefined\n network?: string | undefined\n includeFee?: boolean | undefined\n }\n}\n\nexport interface BluvoWalletIdSchema {\n id: string\n}\n\nexport interface BluvoWithdrawalSchema {\n id: string\n idempotencyKey: string\n quoteId: string\n params?:\n | {\n twofa?: string | undefined\n }\n | undefined\n}\n\nimport type { BaseApiRequest } from '../../consts'\n\nexport interface BluvoGetWithdrawableBalanceByIdRequest\n extends BaseApiRequest,\n BluvoBalanceSchema {}\nexport type BluvoGetWithdrawableBalanceByIdResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['getWithdrawableBalance']>\n>\n\nexport interface BluvoListExchangesRequest\n extends BaseApiRequest,\n BluvoExchangesSchema {}\nexport type BluvoListExchangesResponse = Awaited<\n ReturnType<BluvoClient['oauth2']['listExchanges']>\n>\n\nexport interface BluvoGetWalletByIdRequest\n extends BaseApiRequest,\n BluvoWalletIdSchema {}\nexport type BluvoGetWalletByIdResponse = Awaited<\n ReturnType<BluvoClient['wallet']['get']>\n>\n\nexport interface BluvoRequestQuotationRequest\n extends BaseApiRequest,\n BluvoQuoteSchema {}\nexport type BluvoRequestQuotationResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['requestQuotation']>\n>\n\nexport interface BluvoExecuteWithdrawalRequest\n extends BaseApiRequest,\n BluvoWithdrawalSchema {}\nexport type BluvoExecuteWithdrawalResponse = Awaited<\n ReturnType<BluvoClient['wallet']['withdrawals']['executeWithdrawal']>\n>\n\nexport class BluvoWithdrawalError extends Error {\n public readonly errorCode?: TypeEnum2\n\n constructor(message?: string, errorCode?: TypeEnum2) {\n super(message || 'An error occurred during withdrawal. Please try again.')\n this.name = 'BluvoWithdrawalError'\n this.errorCode = errorCode\n }\n}\n"],
5
+ "mappings": ";AAAO,IAAM,eAA2C;AAEjD,IAAM,oBACsB;AAE5B,IAAM,iBAAiB;;;ACL9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,IAAM,oBAAoB,CAAC,KAAY,YAA4B;AACxE,MACE,eAAe,yBACf,eAAe,yBACf,eAAe,oBACf;AACA,YAAQ,MAAM;AAAA,EAChB;AACF;AAEO,IAAM,mBAAmB,CAAC,YAAqB;AACpD,QAAM,gBAAwC,C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;AACH;;;ACHO,IAAM,uBAAN,cAAmC,MAAM;AAAA,EAG9C,YAAY,SAAkB,WAAuB;AACnD,UAAM,WAAW,wDAAwD;AACzE,SAAK,OAAO;AACZ,SAAK,YAAY;AAAA,EACnB;AACF;",
6
6
  "names": ["InvalidParameterError", "ResourceNotFoundError", "UserOpFailureError", "InvalidParameterError", "ResourceNotFoundError", "UserOpFailureError", "BridgeCustomerStatus", "BridgeKycStatus", "BridgeTosStatus", "BridgeCustomerType", "BridgeEndorsement", "BridgeVirtualBankAccountStatus", "ErrorCode", "ResourceNotFoundError", "CheckoutState", "CheckoutRefundState", "ResourceNotFoundError", "ErrorCode", "DirectExecutionType", "RelayExecutionStatus", "FormOfPaymentType", "OperationStatus", "AuthType", "OperationType", "PaymasterType", "ResourceNotFoundError", "InvalidParameterError", "ResourceNotFoundError", "InvalidParameterError", "MeldServiceProvider"]
7
7
  }
@@ -5,7 +5,7 @@ export declare const BENQI_API_KEY = "q8qZWLvviLaOaG4bX3w2v6zLN9uxNPaU6CX8I0Gd";
5
5
  export declare const BENTO_API_KEY = "Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke";
6
6
  export declare const BSX_API_KEY = "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
7
7
  export declare const BULLPEN_API_KEY = "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG";
8
- export declare const CAMBRIA_API_KEY = "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP";
8
+ export declare const CAMBRIA_API_KEY = "C91BQJYq4q63FsUDbYNiK3ZkY86RHODv6Lhl2QFI";
9
9
  export declare const DEGEN_API_KEY = "m4iHIILHcL4gN8EXCMzGe8zIdhuCXxck49mWajzJ";
10
10
  export declare const DEV_API_KEY = "Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk";
11
11
  export declare const ETHEREAL_API_KEY = "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
@@ -15,7 +15,6 @@ export declare const FELIX_API_KEY = "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3";
15
15
  export declare const GINZA_API_KEY = "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0";
16
16
  export declare const GLOBAL_COMPUTE_API_KEY = "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0";
17
17
  export declare const HYENA_API_KEY = "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW";
18
- export declare const HYPERBEAT_API_KEY = "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau";
19
18
  export declare const HYPERDASH_API_KEY = "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
20
19
  export declare const HYPEREDGE_API_KEY = "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz";
21
20
  export declare const HYPERSWAP_API_KEY = "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK";
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../src/consts/customers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,6CAA6C,CAAA;AACzE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,WAAW,6CAA6C,CAAA;AACrE,eAAO,MAAM,eAAe,6CAA6C,CAAA;AACzE,eAAO,MAAM,eAAe,6CAA6C,CAAA;AACzE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,WAAW,6CAA6C,CAAA;AACrE,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,uBAAuB,6CACQ,CAAA;AAC5C,eAA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AAO,MAAM,eAAe,6CAA6C,CAAA;AACzE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,WAAW,6CAA6C,CAAA;AACrE,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,uBAAuB,6CACQ,CAAA;AAC5C,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,sBAAsB,6CAA6C,CAAA;AAChF,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAC3E,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAC3E,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAC3E,eAAO,MAAM,YAAY,6CAA6C,CAAA;AACtE,eAAO,MAAM,kBAAkB,6CAA6C,CAAA;AAC5E,eAAO,MAAM,eAAe,6CAA6C,CAAA;AACzE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,mBAAmB,6CAA6C,CAAA;AAC7E,eAAO,MAAM,cAAc,6CAA6C,CAAA;AACxE,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,kBAAkB,6CAA6C,CAAA;AAC5E,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAC3E,eAAO,MAAM,qBAAqB,6CAA6C,CAAA;AAC/E,eAAO,MAAM,aAAa,6CAA6C,CAAA;AACvE,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAC1E,eAAO,MAAM,eAAe,6CAA6C,CAAA"}
@@ -13,6 +13,8 @@ export interface GetFopsParams {
13
13
  };
14
14
  /** The fiat currency code (e.g., "USD", "EUR") */
15
15
  fiatCurrencyCode?: string;
16
+ /** The ISO 3166-1 alpha-2 country code (e.g., "US", "GB") */
17
+ countryCode?: string;
16
18
  /** Third-party payment provider configurations */
17
19
  thirdPartyPaymentConfigs?: ThirdPartyPaymentConfigs;
18
20
  }
@@ -34,7 +36,20 @@ export declare enum FormOfPaymentType {
34
36
  RAPID_TRANSFER = "RAPID_TRANSFER",
35
37
  PAYSAFECARD = "PAYSAFECARD",
36
38
  NETELLER = "NETELLER",
37
- SKRILL = "SKRILL"
39
+ SKRILL = "SKRILL",
40
+ PIX = "PIX"
41
+ }
42
+ interface FormOfPaymentMetadata {
43
+ checkoutLimit: {
44
+ minAmount?: {
45
+ amount: number;
46
+ fiatCurrencyCode: string;
47
+ };
48
+ maxAmount?: {
49
+ amount: number;
50
+ fiatCurrencyCode: string;
51
+ };
52
+ };
38
53
  }
39
54
  /**
40
55
  * Represents a single form of payment option.
@@ -47,6 +62,7 @@ export interface GenericFormOfPayment {
47
62
  embeddedFlowUrl: string;
48
63
  /** URL to the payment method's icon */
49
64
  iconImageUrl: string;
65
+ metadata: FormOfPaymentMetadata;
50
66
  }
51
67
  /**
52
68
  * Represents a saved form of payment with card-specific details.
@@ -54,6 +70,8 @@ export interface GenericFormOfPayment {
54
70
  export interface SavedFormOfPayment {
55
71
  /** Payment type */
56
72
  fopType: FormOfPaymentType;
73
+ /** Display name of saved payment method "mastercard •••• 1897" */
74
+ name: string;
57
75
  /** Card brand (e.g., "Visa", "Mastercard") */
58
76
  cardBrand: string;
59
77
  /** First six digits of the card number */
@@ -68,6 +86,7 @@ export interface SavedFormOfPayment {
68
86
  iconImageUrl: string;
69
87
  /** URL to embedded flow for the payment provider */
70
88
  embeddedFlowUrl: string;
89
+ metadata: FormOfPaymentMetadata;
71
90
  }
72
91
  export type SwappedFormOfPayment = GenericFormOfPayment | SavedFormOfPayment;
73
92
  /**
@@ -79,4 +98,5 @@ export interface GetFopsResponse {
79
98
  /** List of saved/previously used forms of payment for the user */
80
99
  savedFormsOfPayments: SavedFormOfPayment[];
81
100
  }
101
+ export {};
82
102
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/services/fops/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,gBAAgB,EAAE;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kDAAkD;IAClD,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACpD;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC;AAED,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,iBAAiB,CAAA;IAC1B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAA;IACvB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,OAAO,EAAE,iBAAiB,CAAA;IAC1B,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAA;IACjB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,uBAAuB;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,kBAAkB,CAAA;AAE5E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,sBAAsB,EAAE,oBAAoB,EAAE,CAAA;IAC9C,kEAAkE;IAClE,oBAAoB,EAAE,kBAAkB,EAAE,CAAA;CAC3C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/services/fops/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,gBAAgB,EAAE;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACpD;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC;AAED,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,SA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AAW,eAAe;IAC9B,iDAAiD;IACjD,sBAAsB,EAAE,oBAAoB,EAAE,CAAA;IAC9C,kEAAkE;IAClE,oBAAoB,EAAE,kBAAkB,EAAE,CAAA;CAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/api-base",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "Base API for Funkit",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@lifeomic/attempt": "^3.1.0",
13
13
  "big.js": "^6.2.1",
14
- "@funkit/utils": "1.2.2"
14
+ "@funkit/utils": "1.2.3"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "viem": "2.x"
@@ -20,7 +20,7 @@
20
20
  "@bluvo/sdk-ts": "2.1.3",
21
21
  "@types/big.js": "^6.2.2",
22
22
  "typescript": "^5.8.2",
23
- "vitest": "^3.0.9"
23
+ "vitest": "^4.0.18"
24
24
  },
25
25
  "author": "https://fun.xyz/",
26
26
  "license": "MIT",