@funkit/utils 1.2.3 → 1.2.5

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.
Files changed (75) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/consts/abis.d.ts +519 -0
  4. package/dist/src/consts/abis.d.ts.map +1 -0
  5. package/dist/src/consts/index.d.ts +3 -0
  6. package/dist/src/consts/index.d.ts.map +1 -0
  7. package/dist/src/errors/BaseError.d.ts +11 -0
  8. package/dist/src/errors/BaseError.d.ts.map +1 -0
  9. package/dist/src/errors/ClientError.d.ts +20 -0
  10. package/dist/src/errors/ClientError.d.ts.map +1 -0
  11. package/dist/src/errors/ServerError.d.ts +8 -0
  12. package/dist/src/errors/ServerError.d.ts.map +1 -0
  13. package/dist/src/errors/index.d.ts +5 -0
  14. package/dist/src/errors/index.d.ts.map +1 -0
  15. package/dist/src/errors/types.d.ts +61 -0
  16. package/dist/src/errors/types.d.ts.map +1 -0
  17. package/dist/src/types/checkoutApi.d.ts +40 -0
  18. package/dist/src/types/checkoutApi.d.ts.map +1 -0
  19. package/dist/src/types/checkoutFees.d.ts +24 -0
  20. package/dist/src/types/checkoutFees.d.ts.map +1 -0
  21. package/dist/src/types/clientMetadata.d.ts +69 -0
  22. package/dist/src/types/clientMetadata.d.ts.map +1 -0
  23. package/dist/src/types/flags.d.ts +71 -0
  24. package/dist/src/types/flags.d.ts.map +1 -0
  25. package/dist/src/types/index.d.ts +5 -0
  26. package/dist/src/types/index.d.ts.map +1 -0
  27. package/dist/src/utils/address.d.ts +4 -0
  28. package/dist/src/utils/address.d.ts.map +1 -0
  29. package/dist/src/utils/browsers.d.ts +19 -0
  30. package/dist/src/utils/browsers.d.ts.map +1 -0
  31. package/dist/src/utils/capitalize.d.ts +2 -0
  32. package/dist/src/utils/capitalize.d.ts.map +1 -0
  33. package/dist/src/utils/colors.d.ts +3 -0
  34. package/dist/src/utils/colors.d.ts.map +1 -0
  35. package/dist/src/utils/debounce.d.ts +2 -0
  36. package/dist/src/utils/debounce.d.ts.map +1 -0
  37. package/dist/src/utils/deepMerge.d.ts +6 -0
  38. package/dist/src/utils/deepMerge.d.ts.map +1 -0
  39. package/dist/src/utils/exhaustiveCheck.d.ts +2 -0
  40. package/dist/src/utils/exhaustiveCheck.d.ts.map +1 -0
  41. package/dist/src/utils/flatten.d.ts +3 -0
  42. package/dist/src/utils/flatten.d.ts.map +1 -0
  43. package/dist/src/utils/formatFees.d.ts +18 -0
  44. package/dist/src/utils/formatFees.d.ts.map +1 -0
  45. package/dist/src/utils/formatNumber.d.ts +62 -0
  46. package/dist/src/utils/formatNumber.d.ts.map +1 -0
  47. package/dist/src/utils/formatTimestamp.d.ts +46 -0
  48. package/dist/src/utils/formatTimestamp.d.ts.map +1 -0
  49. package/dist/src/utils/groupBy.d.ts +2 -0
  50. package/dist/src/utils/groupBy.d.ts.map +1 -0
  51. package/dist/src/utils/index.d.ts +23 -0
  52. package/dist/src/utils/index.d.ts.map +1 -0
  53. package/dist/src/utils/indexBy.d.ts +2 -0
  54. package/dist/src/utils/indexBy.d.ts.map +1 -0
  55. package/dist/src/utils/isMobile.d.ts +4 -0
  56. package/dist/src/utils/isMobile.d.ts.map +1 -0
  57. package/dist/src/utils/isNotNullish.d.ts +2 -0
  58. package/dist/src/utils/isNotNullish.d.ts.map +1 -0
  59. package/dist/src/utils/json.d.ts +5 -0
  60. package/dist/src/utils/json.d.ts.map +1 -0
  61. package/dist/src/utils/locale.d.ts +1 -0
  62. package/dist/src/utils/locale.d.ts.map +1 -0
  63. package/dist/src/utils/math.d.ts +9 -0
  64. package/dist/src/utils/math.d.ts.map +1 -0
  65. package/dist/src/utils/mobile.d.ts +2 -0
  66. package/dist/src/utils/mobile.d.ts.map +1 -0
  67. package/dist/src/utils/noop.d.ts +2 -0
  68. package/dist/src/utils/noop.d.ts.map +1 -0
  69. package/dist/src/utils/omitUndefinedValues.d.ts +2 -0
  70. package/dist/src/utils/omitUndefinedValues.d.ts.map +1 -0
  71. package/dist/src/utils/token.d.ts +11 -0
  72. package/dist/src/utils/token.d.ts.map +1 -0
  73. package/dist/src/utils/type.d.ts +3 -0
  74. package/dist/src/utils/type.d.ts.map +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ import type { Address } from 'viem';
2
+ import type { ApiCheckoutFees } from './checkoutFees';
3
+ export type CheckoutApiQuoteResponse = {
4
+ quoteId: string;
5
+ estTotalFromAmountBaseUnit: string;
6
+ estSubtotalFromAmountBaseUnit: string;
7
+ estFeesFromAmountBaseUnit: string;
8
+ fromTokenAddress: Address;
9
+ estFeesUsd: number;
10
+ estSubtotalUsd: number;
11
+ estTotalUsd: number;
12
+ estCheckoutTimeMs: number;
13
+ estMarketMakerGasUsd: number;
14
+ lpFeePercentage: number;
15
+ lpFeeUsd: number;
16
+ };
17
+ export type CheckoutQuoteResponse = CheckoutApiQuoteResponse & {
18
+ estTotalFromAmount: string;
19
+ estSubtotalFromAmount: string;
20
+ estFeesFromAmount: string;
21
+ metadata?: {
22
+ oftEnabled?: boolean;
23
+ across?: {
24
+ enabled?: boolean;
25
+ expectedOutput?: number;
26
+ destinationChainId?: string;
27
+ expectedOutputFormatted?: string;
28
+ } | undefined;
29
+ [x: string]: unknown;
30
+ };
31
+ };
32
+ export type ApiFunkitCheckoutQuoteResult = {
33
+ baseQuote: CheckoutQuoteResponse;
34
+ finalTimeEstimationMs: number;
35
+ finalPaymentTokenAmount: string;
36
+ finalPaymentFeeUsd: string;
37
+ finalTotalUsd: string;
38
+ finalFeesBreakdown: ApiCheckoutFees;
39
+ };
40
+ //# sourceMappingURL=checkoutApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkoutApi.d.ts","sourceRoot":"","sources":["../../../src/types/checkoutApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGrD,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,0BAA0B,EAAE,MAAM,CAAA;IAClC,6BAA6B,EAAE,MAAM,CAAA;IACrC,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAGD,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAAG;IAC7D,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IAGzB,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,MAAM,CAAC,EACH;YACE,OAAO,CAAC,EAAE,OAAO,CAAA;YACjB,cAAc,CAAC,EAAE,MAAM,CAAA;YACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;YAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAA;SACjC,GACD,SAAS,CAAA;QACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KACrB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,EAAE,qBAAqB,CAAA;IAChC,qBAAqB,EAAE,MAAM,CAAA;IAC7B,uBAAuB,EAAE,MAAM,CAAA;IAC/B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,eAAe,CAAA;CACpC,CAAA"}
@@ -0,0 +1,24 @@
1
+ export interface ApiBaseCheckoutFees {
2
+ paymentMethod: string;
3
+ marketMakerFeeUsd: number;
4
+ liquidityProviderFeeUsd: number;
5
+ totalFeesUsd: number;
6
+ totalFeesTokenWithoutGas: number;
7
+ }
8
+ export interface ApiWalletCheckoutFees extends ApiBaseCheckoutFees {
9
+ paymentMethod: 'balance';
10
+ eoaWalletFeeToken: number;
11
+ nativeCurrencySymbol: string;
12
+ eoaWalletFeeUsd: number;
13
+ }
14
+ export interface ApiCardCheckoutFees extends ApiBaseCheckoutFees {
15
+ paymentMethod: 'card';
16
+ cardProcessingFeeUsd: number;
17
+ moonpayCostUsd: number;
18
+ }
19
+ export interface ApiBrokerageCheckoutFees extends ApiBaseCheckoutFees {
20
+ paymentMethod: 'brokerage';
21
+ exchangeFeeUsd: number;
22
+ }
23
+ export type ApiCheckoutFees = ApiWalletCheckoutFees | ApiCardCheckoutFees | ApiBrokerageCheckoutFees;
24
+ //# sourceMappingURL=checkoutFees.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkoutFees.d.ts","sourceRoot":"","sources":["../../../src/types/checkoutFees.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,wBAAwB,EAAE,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,aAAa,EAAE,SAAS,CAAA;IACxB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,aAAa,EAAE,MAAM,CAAA;IACrB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,aAAa,EAAE,WAAW,CAAA;IAC1B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,eAAe,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,wBAAwB,CAAA"}
@@ -0,0 +1,69 @@
1
+ import type { Abi, Address, Hex } from 'viem';
2
+ import type { ApiFunkitCheckoutQuoteResult } from './checkoutApi';
3
+ export interface ApiCheckoutClientMetadata {
4
+ /** Unique identifier for frontend use only. */
5
+ id: string;
6
+ /** Time of creation of the active checkout item. For frontend use only. **/
7
+ startTimestampMs: number;
8
+ /** The final dollar value of the checkout. Derived from latestQuote. **/
9
+ finalDollarValue: null | number;
10
+ latestQuote: ApiFunkitCheckoutQuoteResult | null;
11
+ depositAddress: null | Address;
12
+ initSettings: {
13
+ config: ApiFunkitCheckoutConfig;
14
+ };
15
+ selectedPaymentMethodInfo: ApiSelectedPaymentMethodInfo | null;
16
+ selectedSourceAssetInfo: {
17
+ address: Address | null;
18
+ symbol: string | null;
19
+ chainId: string;
20
+ iconSrc: string | null;
21
+ };
22
+ /** The evaluated result of initSettings.config.generateActionsParams at the point of checkout */
23
+ evaluatedActionsParams?: ApiFunkitCheckoutActionParams[];
24
+ isWithdrawal?: boolean;
25
+ }
26
+ export interface ApiSelectedPaymentMethodInfo {
27
+ paymentMethod: string;
28
+ title: string;
29
+ description: string;
30
+ meta?: object;
31
+ }
32
+ export interface BaseApiFunkitCheckoutActionParams {
33
+ contractAddress: Address;
34
+ value?: bigint;
35
+ }
36
+ interface ApiFunkitCheckoutActionParamsRawCalldata extends BaseApiFunkitCheckoutActionParams {
37
+ rawCalldata: Hex;
38
+ contractAbi?: never;
39
+ functionName?: never;
40
+ functionArgs?: never;
41
+ }
42
+ interface ApiFunkitCheckoutActionParamsContractAbi extends BaseApiFunkitCheckoutActionParams {
43
+ rawCalldata?: never;
44
+ contractAbi: Abi;
45
+ functionName: string;
46
+ functionArgs: unknown[];
47
+ }
48
+ export type ApiFunkitCheckoutActionParams = ApiFunkitCheckoutActionParamsRawCalldata | ApiFunkitCheckoutActionParamsContractAbi;
49
+ export interface ApiFunkitCheckoutConfig {
50
+ /** ****************************
51
+ * Api-related configurations *
52
+ ******************************/
53
+ /** The ID of the chain where the checkout operation is to be performed. **/
54
+ targetChain: string;
55
+ /** The wanted asset for the checkout operation. This can be either a chain native token (by specifying NATIVE_TOKEN) or an ERC-20 token (by specifying actual token address) on the target chain. **/
56
+ targetAsset: Address;
57
+ /** The amount of wanted asset for the checkout operation (defaults to $100 equivalent). **/
58
+ targetAssetAmount?: number;
59
+ /** The ticker information of the wanted asset for the checkout operation. e.g. USDC. **/
60
+ targetAssetTicker: string;
61
+ /** @deprecated Timestamp (in milliseconds) after which the checkout should not be performed, and the funds will become rescuable. Min: 300000 (5 mins), Max: 3600000 (1 hour). **/
62
+ expirationTimestampMs?: number;
63
+ /** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
64
+ customRecipient?: Address | string;
65
+ /** List of contract action params **/
66
+ generateActionsParams?: string;
67
+ }
68
+ export {};
69
+ //# sourceMappingURL=clientMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientMetadata.d.ts","sourceRoot":"","sources":["../../../src/types/clientMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,CAAA;IACxB,yEAAyE;IACzE,gBAAgB,EAAE,IAAI,GAAG,MAAM,CAAA;IAC/B,WAAW,EAAE,4BAA4B,GAAG,IAAI,CAAA;IAChD,cAAc,EAAE,IAAI,GAAG,OAAO,CAAA;IAC9B,YAAY,EAAE;QACZ,MAAM,EAAE,uBAAuB,CAAA;KAChC,CAAA;IACD,yBAAyB,EAAE,4BAA4B,GAAG,IAAI,CAAA;IAC9D,uBAAuB,EAAE;QACvB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;QACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;QACrB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KACvB,CAAA;IACD,iGAAiG;IACjG,sBAAsB,CAAC,EAAE,6BAA6B,EAAE,CAAA;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,UAAU,wCACR,SAAQ,iCAAiC;IACzC,WAAW,EAAE,GAAG,CAAA;IAChB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB;AACD,UAAU,wCACR,SAAQ,iCAAiC;IACzC,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,WAAW,EAAE,GAAG,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,OAAO,EAAE,CAAA;CACxB;AAED,MAAM,MAAM,6BAA6B,GACrC,wCAAwC,GACxC,wCAAwC,CAAA;AAE5C,MAAM,WAAW,uBAAuB;IACtC;;oCAEgC;IAEhC,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAA;IACnB,sMAAsM;IACtM,WAAW,EAAE,OAAO,CAAA;IACpB,4FAA4F;IAC5F,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,yFAAyF;IACzF,iBAAiB,EAAE,MAAM,CAAA;IACzB,mLAAmL;IACnL,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,iLAAiL;IACjL,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAClC,sCAAsC;IACtC,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Remember that these values show up in our logs
3
+ * Make sure the enum values are unique
4
+ * Once we ship a feature flag, we can't change the key.
5
+ */
6
+ export declare enum FlagKey {
7
+ /** @deprecated Moved to Statsig - Which countries should be blocked for Funkit Checkout. Reference Alpha-2 Code format https://www.iban.com/country-codes. */
8
+ BlockedCountries = "blocked_countries",
9
+ /** @deprecated Moved to Statsig - Which users/addresses should be blocked for Funkit Checkout */
10
+ AddressBlacklist = "address_blacklist",
11
+ /** @deprecated Moved to statsig - Whether to show the [Powered by Fun.xyz] tagline at the bottom of the checkout modal. */
12
+ ShowPoweredTagline = "show_powered_tagline",
13
+ /** @deprecated Moved to statsig - Whether to enable Token Transfer as a payment method. */
14
+ EnableTokenTransfer = "enable_token_transfer",
15
+ /** Token Transfer payment method accepted source chain and assets */
16
+ TokenTransferSourceChainsAndAssets = "token_transfer_source_chains_and_assets",
17
+ /** @deprecated Moved to statsig - Token Transfer universal deposit address */
18
+ EnableTokenTransferUniversalDepositAddress = "enable_token_transfer_universal_deposit_address",
19
+ /** @deprecated Moved to statsig - Maximum usd amount that can be checked out. */
20
+ MaxCheckoutUsd = "max_checkout_usd",
21
+ /** @deprecated Moved to statsig - Time estimate overrides */
22
+ CheckoutTimeEstimateOverrides = "checkout_time_estimate_overrides",
23
+ /** Default chain ID used in Token transfer (Direct deposit) screen */
24
+ TokenTransferDefaultChainId = "token_transfer_default_chain_id",
25
+ /** Set default token(s) in dropdown - prioritized in sorted list */
26
+ TokenTransferDefaultTokens = "token_transfer_default_tokens",
27
+ /** @deprecated Moved to Statsig - Controls whether the checkout is activated or totally disabled */
28
+ IsCheckoutActivated = "is_checkout_activated",
29
+ /** @deprecated Moved to statsig */
30
+ ShowInfoBanner = "show_info_banner",
31
+ /** @deprecated - Moved to Statsig - Controls refresh interval to show the checkout notifications */
32
+ CheckoutNotificationsRefreshInterval = "checkout_notifications_refresh_interval",
33
+ /** Tokens for which to show the "New" badge in transfers */
34
+ TokenTransferNewTokens = "token_transfer_new_tokens",
35
+ /** Whether to show the Newly supported deposits banner in asset selection */
36
+ NewTokenAssetSelectionBanner = "new_token_asset_selection_banner",
37
+ /** @deprecated Whether Relay bypass is enabled */
38
+ IsRelayBypassEnabled = "is_relay_bypass_enabled",
39
+ /** @deprecated Relay bypass accepted source chain and assets */
40
+ RelayBypassSourceChainsAndAssets = "relay_bypass_source_chains_and_assets",
41
+ /** @deprecated Relay bypass accepted target chain and assets */
42
+ RelayBypassTargetChainsAndAssets = "relay_bypass_target_chains_and_assets",
43
+ /** @deprecated Moved to Statsig */
44
+ EnableFiatDeposit = "enable_fiat_deposit",
45
+ /** @deprecated */
46
+ EnableCard = "enable_card",
47
+ /** @deprecated */
48
+ EnableBrokerage = "enable_brokerage",
49
+ /** @deprecated Moved to Statsig */
50
+ EnableBluvoBrokerage = "enable_bluvo_brokerage",
51
+ /** @deprecated Moved to Statsig - Whether to use Meld as card payment */
52
+ EnableMeldPayment = "enable_meld_payment",
53
+ /** @deprecated Moved to Statsig */
54
+ MeldQuickOptions = "meld_quick_options",
55
+ /** Specifies the minimum value permitted for a token transfer. */
56
+ MinTokenTransferValue = "min_token_transfer_value",
57
+ /** Exclude certain tokens from withdrawal. */
58
+ WithdrawalExcludeTokens = "withdrawal_exclude_tokens",
59
+ /** Accepted chains and assets for withdrawal */
60
+ WithdrawalChainsAndAssets = "withdrawal_chains_and_assets",
61
+ /** Chain ID sort order */
62
+ ChainIdSortOrder = "chain_id_sort_order",
63
+ /** Whether to enable Bitcoin as a payment method. */
64
+ /** @deprecated enable bitcoin directly instead as everybody now has SDK version that supports it */
65
+ EnableBitcoin = "enable_bitcoin",
66
+ /** @deprecated Moved to Statsig - Renders info banners for the currently selected chain */
67
+ ChainInfoBanners = "chain_info_banners",
68
+ /** @deprecated */
69
+ Permit2Tokens = "permit2_tokens"
70
+ }
71
+ //# sourceMappingURL=flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/types/flags.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,OAAO;IACjB,8JAA8J;IAC9J,gBAAgB,sBAAsB;IACtC,iGAAiG;IACjG,gBAAgB,sBAAsB;IACtC,2HAA2H;IAC3H,kBAAkB,yBAAyB;IAC3C,2FAA2F;IAC3F,mBAAmB,0BAA0B;IAC7C,qEAAqE;IACrE,kCAAkC,4CAA4C;IAC9E,8EAA8E;IAC9E,0CAA0C,oDAAoD;IAC9F,iFAAiF;IACjF,cAAc,qBAAqB;IACnC,6DAA6D;IAC7D,6BAA6B,qCAAqC;IAClE,sEAAsE;IACtE,2BAA2B,oCAAoC;IAC/D,oEAAoE;IACpE,0BAA0B,kCAAkC;IAC5D,oGAAoG;IACpG,mBAAmB,0BAA0B;IAC7C,mCAAmC;IACnC,cAAc,qBAAqB;IACnC,oGAAoG;IACpG,oCAAoC,4CAA4C;IAChF,4DAA4D;IAC5D,sBAAsB,8BAA8B;IACpD,6EAA6E;IAC7E,4BAA4B,qCAAqC;IACjE,kDAAkD;IAClD,oBAAoB,4BAA4B;IAChD,gEAAgE;IAChE,gCAAgC,0CAA0C;IAC1E,gEAAgE;IAChE,gCAAgC,0CAA0C;IAC1E,mCAAmC;IACnC,iBAAiB,wBAAwB;IACzC,kBAAkB;IAClB,UAAU,gBAAgB;IAC1B,kBAAkB;IAClB,eAAe,qBAAqB;IACpC,mCAAmC;IACnC,oBAAoB,2BAA2B;IAC/C,yEAAyE;IACzE,iBAAiB,wBAAwB;IACzC,mCAAmC;IACnC,gBAAgB,uBAAuB;IACvC,kEAAkE;IAClE,qBAAqB,6BAA6B;IAClD,8CAA8C;IAC9C,uBAAuB,8BAA8B;IACrD,gDAAgD;IAChD,yBAAyB,iCAAiC;IAC1D,0BAA0B;IAC1B,gBAAgB,wBAAwB;IACxC,qDAAqD;IACrD,qGAAqG;IACrG,aAAa,mBAAmB;IAChC,2FAA2F;IAC3F,gBAAgB,uBAAuB;IACvC,kBAAkB;IAClB,aAAa,mBAAmB;CACjC"}
@@ -0,0 +1,5 @@
1
+ export * from './checkoutApi';
2
+ export * from './checkoutFees';
3
+ export * from './clientMetadata';
4
+ export * from './flags';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare function formatAddress(address: string): string;
2
+ export declare function formatAddressLastFour(address: string): string;
3
+ export declare const truncateMiddleOfAddress: (value: string, truncateLengthThreshold?: number, leadingCharactersCount?: number, trailingCharactersCount?: number) => string;
4
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASrD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,EACb,gCAA4B,EAC5B,+BAA0B,EAC1B,gCAA2B,WAU5B,CAAA"}
@@ -0,0 +1,19 @@
1
+ export declare function isSafari(): boolean;
2
+ export declare function isArc(): boolean;
3
+ /**
4
+ * Safely checks if a URL is valid.
5
+ * Falls back to new URL() for older browsers that don't support URL.canParse.
6
+ */
7
+ export declare function isValidUrl(url?: string | undefined): boolean;
8
+ export declare enum BrowserType {
9
+ Arc = "Arc",
10
+ Brave = "Brave",
11
+ Browser = "Browser",
12
+ Chrome = "Chrome",
13
+ Edge = "Edge",
14
+ Firefox = "Firefox",
15
+ Opera = "Opera",
16
+ Safari = "Safari"
17
+ }
18
+ export declare function getBrowser(): BrowserType;
19
+ //# sourceMappingURL=browsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browsers.d.ts","sourceRoot":"","sources":["../../../src/utils/browsers.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,IAAI,OAAO,CAMlC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAM/B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAM,GAAG,SAAc,GAAG,OAAO,CAMhE;AAED,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,wBAAgB,UAAU,IAAI,WAAW,CA6BxC"}
@@ -0,0 +1,2 @@
1
+ export declare function capitalizeFirstLetter(val: string): string;
2
+ //# sourceMappingURL=capitalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,UAEhD"}
@@ -0,0 +1,3 @@
1
+ export declare function colorToHex(color: string): string;
2
+ export declare const isHexString: (color: string) => boolean;
3
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBhD;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,OAE3C,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function debounce(fn: () => void, ms: number): () => void;
2
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,cAalD"}
@@ -0,0 +1,6 @@
1
+ export type DeepPartial<T> = T extends number | string | boolean | null | undefined ? T : {
2
+ [P in keyof T]?: DeepPartial<T[P]>;
3
+ };
4
+ /** NOTE: merging arrays is undefined behavior */
5
+ export declare function deepMerge<T extends object>(origin: T, ...objects: DeepPartial<T>[]): T;
6
+ //# sourceMappingURL=deepMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../../src/utils/deepMerge.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAC1B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,CAAC,GACD;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,CAAA;AAYL,iDAAiD;AACjD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EACxC,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAC3B,CAAC,CAsBH"}
@@ -0,0 +1,2 @@
1
+ export declare function exhaustiveCheck(_value: never): void;
2
+ //# sourceMappingURL=exhaustiveCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exhaustiveCheck.d.ts","sourceRoot":"","sources":["../../../src/utils/exhaustiveCheck.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAInD"}
@@ -0,0 +1,3 @@
1
+ declare function flatten<T extends object, R extends Record<string, unknown> = Record<string, unknown>>(obj: T, prefix?: string): R;
2
+ export { flatten };
3
+ //# sourceMappingURL=flatten.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../../src/utils/flatten.ts"],"names":[],"mappings":"AACA,iBAAS,OAAO,CACd,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,GAAG,EAAE,CAAC,EAAE,MAAM,SAAK,GAAG,CAAC,CAgBxB;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,18 @@
1
+ export interface FormatDynamicFeeUsdOptions {
2
+ /**
3
+ * Threshold in USD above which the fee should be displayed in %
4
+ *
5
+ * Defauls to 2.5
6
+ *
7
+ * Pass null to disable % format altogether
8
+ */
9
+ percentThreshold?: number | null;
10
+ }
11
+ /**
12
+ * For any fees, if the total fee amounts to less than $2.50, show the fee as a strict dollar value.
13
+ * If the fee is greater than $2.50, show it as a percent.
14
+ * If the fee is less than $0.01, show <$0.01 instead.
15
+ * If the fee is $0.00, show $0.00.
16
+ */
17
+ export declare function formatDynamicFeeUsd(fee: number, total: number, options?: FormatDynamicFeeUsdOptions): string;
18
+ //# sourceMappingURL=formatFees.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatFees.d.ts","sourceRoot":"","sources":["../../../src/utils/formatFees.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,0BAA0B;IACzC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAMD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,0BAA+B,UAczC"}
@@ -0,0 +1,62 @@
1
+ interface FormatNumberOptions {
2
+ /** Numbers smaller than this will be converted to scientific notation */
3
+ minBeforeUseScientific?: number;
4
+ /** If the number part for suffixed # is >= this, will use sci notation (e.g. 1,000M -> 1E3M) */
5
+ maxNumberPartSizeForSuffix?: number;
6
+ /** The amount of decimal places to truncate to when softly truncating (to specify decimal places for suffix-truncation, e.g. 1.23M, use decimalPrecisionForSuffix) */
7
+ softDecimalPrecision?: number;
8
+ /** Numbers >= this will have their decimals truncated aggressively */
9
+ maxBeforeAggresiveDecimalTruncation?: number;
10
+ /** The amount of decimal places to truncate to when aggressively truncating (to specify decimal places for suffix-truncation, e.g. 1.23M, use decimalPrecisionForSuffix) */
11
+ aggresiveDecimalPrecision?: number;
12
+ /** Numbers >= this will have a suffix added during truncation (e.g. 1.23M) */
13
+ maxBeforeUseSuffix?: number;
14
+ /** The amount of decimal places to truncate suffix-truncated numbers to (e.g. 1.23M vs 1.2312M)*/
15
+ decimalPrecisionForSuffix?: number;
16
+ /** The largest suffix to use (e.g. if 1000000, we will stop at M and not use the B suffix) */
17
+ maxSuffixSize?: 1e3 | 1e6 | 1e9 | 1e12;
18
+ numberFormatOptions?: Intl.NumberFormatOptions;
19
+ /** Adds minimum significant digits value to force numbers to show decimal precision even when there are none 5 -> 5.00 */
20
+ minimumSignificantDigits?: number;
21
+ }
22
+ /**
23
+ * Formats a number with conditional truncation, suffixation, and scientific notation.
24
+ * @param number
25
+ * @param options Customize the formatting conditions/behavior
26
+ * @example Visualization, using default values:
27
+ * ```
28
+ * <--(1.23E-7)---0.00001------(0.12121)-------1-------(123,423.26)---1,000,000---(1.22M)--(100.23M)-->
29
+ * _______<-minBeforeScientific maxBeforeAggressive-> maxBeforeUseSuffix-> ^ w/ maxSuffixSize
30
+ * ```
31
+ */
32
+ export declare function formatNumberAndStringify(number: number, options?: FormatNumberOptions, numberFormatOptions?: Intl.NumberFormatOptions): string;
33
+ /** Formats a number for currency (default $) display */
34
+ export declare function formatCurrencyAndStringify(amount: number,
35
+ /** Options to pass `formatNumberAndStringify */
36
+ options?: FormatNumberOptions,
37
+ /** Options to pass toLocaleString */
38
+ numberFormatOptions?: Intl.NumberFormatOptions): string;
39
+ export declare function formatPercent(percent: number, decimalPlaces?: number): string;
40
+ /**
41
+ * Formats a cryptocurrency amount as a string for display.
42
+ *
43
+ * Can customize with options and whether to display currency abbreviation.
44
+ */
45
+ export declare function formatCryptoAndStringify(
46
+ /** The currency amount **/
47
+ amount: number,
48
+ /** The currency abbreviation e.g. ETH, USDC, ... **/
49
+ abbreviation?: string,
50
+ /** Displays abbreviation after amount, e.g. '1.25 ETH'; default true **/
51
+ displayAbbreviation?: boolean,
52
+ /** Used to format the number, can be used to customize decimal truncation etc. **/
53
+ options?: FormatNumberOptions): string;
54
+ export declare function round(value: number, decimals: number,
55
+ /**
56
+ * Whether to round up ('ceil'), down ('floor'), or nearest ('round')
57
+ *
58
+ * Defauls to 'round'
59
+ **/
60
+ method?: 'ceil' | 'floor' | 'round'): number;
61
+ export {};
62
+ //# sourceMappingURL=formatNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatNumber.d.ts","sourceRoot":"","sources":["../../../src/utils/formatNumber.ts"],"names":[],"mappings":"AAAA,UAAU,mBAAmB;IAC3B,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,gGAAgG;IAChG,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,sKAAsK;IACtK,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,sEAAsE;IACtE,mCAAmC,CAAC,EAAE,MAAM,CAAA;IAC5C,4KAA4K;IAC5K,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kGAAkG;IAClG,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,8FAA8F;IAC9F,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAA;IACtC,mBAAmB,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;IAC9C,2HAA2H;IAC3H,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAcD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAA2C,EACpD,mBAAmB,GAAE,IAAI,CAAC,mBAAwB,UAsDnD;AAED,wDAAwD;AACxD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM;AACd,gDAAgD;AAChD,OAAO,GAAE,mBAAwB;AACjC,qCAAqC;AACrC,mBAAmB,GAAE,IAAI,CAAC,mBAAwB,UA2BnD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,SAAI,UAI/D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB;AACtC,2BAA2B;AAC3B,MAAM,EAAE,MAAM;AACd,qDAAqD;AACrD,YAAY,SAAK;AACjB,yEAAyE;AACzE,mBAAmB,UAAO;AAC1B,mFAAmF;AACnF,OAAO,CAAC,EAAE,mBAAmB,UAmB9B;AAgFD,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM;AAChB;;;;IAII;AACJ,MAAM,GAAE,MAAM,GAAG,OAAO,GAAG,OAAiB,GAC3C,MAAM,CAER"}
@@ -0,0 +1,46 @@
1
+ export declare const fullMonthNames: string[];
2
+ interface FormatDateOption {
3
+ year?: 'full' | 'short' | 'none';
4
+ month?: 'full' | 'short';
5
+ }
6
+ export declare function formatTimestampToDate(date: Date, { year, month }?: FormatDateOption): string;
7
+ interface FormatTimeOption extends FormatDateOption {
8
+ hours?: '24hr' | '12hr';
9
+ seconds?: 'none';
10
+ }
11
+ export declare function formatTimestamp(date: Date, opt?: FormatTimeOption): string;
12
+ interface TimeFormatStrings {
13
+ /** String for "< 1 min" when specifyUnderMinute is true */
14
+ lessThanOneMin?: string;
15
+ /** Function to format seconds: (count: number) => string. Default: "{count} seconds" */
16
+ seconds?: (count: number) => string;
17
+ /** Function to format minutes: (count: number) => string. Default: "{count} min" */
18
+ minutes?: (count: number) => string;
19
+ /** Function to format hours: (count: number) => string. Default: "{count} h" */
20
+ hours?: (count: number) => string;
21
+ /** Function to format short seconds: (count: number) => string. Default: "{count} s" */
22
+ secondsShort?: (count: number) => string;
23
+ }
24
+ /**
25
+ * Formats seconds to mins and seconds string
26
+ * - seconds = 10, output = '10 seconds'
27
+ * - seconds = 20.3, output = '21 seconds'
28
+ * - seconds = 20.3, specifyUnderMinute=true, output = '< 1 min'
29
+ * - seconds = 60, output = '60 seconds'
30
+ * - seconds = 61, output = '1 min 1 s'
31
+ * - seconds = 300, output = '5 min'
32
+ * - seconds = 320, output = '5 min 20 s'
33
+ * - seconds = 320, omitSeconds=true, output = '6 min'
34
+ * - seconds = 3600, output = '60 min'
35
+ * - seconds = 3900, output = '1 h 5 min'
36
+ * - seconds = 3920, output = '1 h 5 min 20 s'
37
+ *
38
+ * @param seconds - Number of seconds to format
39
+ * @param specifyUnderMinute - If true, shows "< 1 min" for values under 60 seconds
40
+ * @param omitSeconds - If true, rounds up to nearest minute
41
+ * @param i18n - Optional translation strings for internationalization
42
+ */
43
+ export declare function formatSecondsToReadableForm(seconds: number, specifyUnderMinute?: boolean, omitSeconds?: boolean, i18n?: TimeFormatStrings): string;
44
+ export declare function formatSecondsToCountdownForm(seconds: number): string;
45
+ export {};
46
+ //# sourceMappingURL=formatTimestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatTimestamp.d.ts","sourceRoot":"","sources":["../../../src/utils/formatTimestamp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAa1B,CAAA;AAkCD,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,EAAE,IAAa,EAAE,KAAc,EAAE,GAAE,gBAAqB,UAezD;AAED,UAAU,gBAAiB,SAAQ,gBAAgB;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,GAAG,GAAE,gBAAqB,GACzB,MAAM,CAYR;AAED,UAAU,iBAAiB;IACzB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,wFAAwF;IACxF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,oFAAoF;IACpF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,gFAAgF;IAChF,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACjC,wFAAwF;IACxF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACzC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,kBAAkB,UAAQ,EAC1B,WAAW,UAAQ,EACnB,IAAI,CAAC,EAAE,iBAAiB,GACvB,MAAM,CAoCR;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,UAO3D"}
@@ -0,0 +1,2 @@
1
+ export declare function groupBy<Item>(items: Item[], getKey: (item: Item) => string): Record<string, Item[]>;
2
+ //# sourceMappingURL=groupBy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../../src/utils/groupBy.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,EAC1B,KAAK,EAAE,IAAI,EAAE,EACb,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAC7B,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAkBxB"}
@@ -0,0 +1,23 @@
1
+ export * from './address';
2
+ export * from './browsers';
3
+ export * from './capitalize';
4
+ export * from './colors';
5
+ export * from './debounce';
6
+ export * from './flatten';
7
+ export * from './deepMerge';
8
+ export * from './exhaustiveCheck';
9
+ export * from './formatFees';
10
+ export * from './formatNumber';
11
+ export * from './formatTimestamp';
12
+ export * from './groupBy';
13
+ export * from './indexBy';
14
+ export * from './isMobile';
15
+ export * from './isNotNullish';
16
+ export * from './json';
17
+ export * from './mobile';
18
+ export * from './noop';
19
+ export * from './omitUndefinedValues';
20
+ export * from './token';
21
+ export * from './type';
22
+ export * from './math';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function indexBy<Item>(items: Item[], getKey: (item: Item) => string): Record<string, Item>;
2
+ //# sourceMappingURL=indexBy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexBy.d.ts","sourceRoot":"","sources":["../../../src/utils/indexBy.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,EAC1B,KAAK,EAAE,IAAI,EAAE,EACb,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAC7B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CActB"}
@@ -0,0 +1,4 @@
1
+ export declare function isAndroid(): boolean;
2
+ export declare function isIOS(): boolean;
3
+ export declare function isMobile(): boolean;
4
+ //# sourceMappingURL=isMobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../../../src/utils/isMobile.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,IAAI,OAAO,CAInC;AAgBD,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC"}
@@ -0,0 +1,2 @@
1
+ export declare function isNotNullish<T>(value: T | null | undefined): value is T;
2
+ //# sourceMappingURL=isNotNullish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNotNullish.d.ts","sourceRoot":"","sources":["../../../src/utils/isNotNullish.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,CAAC,CAEvE"}
@@ -0,0 +1,5 @@
1
+ export declare function safeParseJson<T>(src?: string, onError?: (e: unknown) => void): T | null;
2
+ export declare function safeParseJsonArray<T>(src: string | null): T[];
3
+ export type Serializable = bigint | boolean | null | number | string | Date | object | Serializable[];
4
+ export declare function jsonStringifyWithBigIntSanitization(serializable: Serializable): string;
5
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/utils/json.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,GAC7B,CAAC,GAAG,IAAI,CAWV;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,EAAE,CAO7D;AAED,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,OAAO,GACP,IAAI,GACJ,MAAM,GACN,MAAM,GACN,IAAI,GACJ,MAAM,GACN,YAAY,EAAE,CAAA;AAElB,wBAAgB,mCAAmC,CACjD,YAAY,EAAE,YAAY,GACzB,MAAM,CAMR"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/utils/locale.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Clamps a number between a minimum and maximum value
3
+ * @param val The number to clamp
4
+ * @param min The minimum value
5
+ * @param max The maximum value
6
+ * @returns The clamped value
7
+ */
8
+ export declare const clamp: (val: number, min: number, max: number) => number;
9
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../src/utils/math.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,WACxB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function redirectInMobile(mobileUri: string): void;
2
+ //# sourceMappingURL=mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../../src/utils/mobile.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,QAqBjD"}
@@ -0,0 +1,2 @@
1
+ export declare const noop: () => undefined;
2
+ //# sourceMappingURL=noop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../src/utils/noop.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,iBAAgB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function omitUndefinedValues<T extends object>(obj: T): T;
2
+ //# sourceMappingURL=omitUndefinedValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omitUndefinedValues.d.ts","sourceRoot":"","sources":["../../../src/utils/omitUndefinedValues.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAI/D"}
@@ -0,0 +1,11 @@
1
+ export declare function isTokenAddressEquivalent({ firstTokenAddress, secondTokenAddress, }: {
2
+ firstTokenAddress: string;
3
+ secondTokenAddress: string;
4
+ }): boolean;
5
+ export declare function isTokenEquivalent({ firstTokenChainId, firstTokenAddress, secondTokenChainId, secondTokenAddress, }: {
6
+ firstTokenChainId: string;
7
+ firstTokenAddress: string;
8
+ secondTokenChainId: string;
9
+ secondTokenAddress: string;
10
+ }): boolean;
11
+ //# sourceMappingURL=token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/utils/token.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,EACvC,iBAAiB,EACjB,kBAAkB,GACnB,EAAE;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,WAK3D;AAED,wBAAgB,iBAAiB,CAAC,EAChC,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,EAAE;IACD,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,EAAE,MAAM,CAAA;CAC3B,WAKA"}
@@ -0,0 +1,3 @@
1
+ export declare const isRecord: (x: unknown) => x is Record<string, unknown>;
2
+ export declare function isNumericString(value: string): value is `${number}`;
3
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/utils/type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAEhE,CAAA;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG,MAAM,EAAE,CAEnE"}