@basedone/core 0.0.1 → 0.0.7

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 (52) hide show
  1. package/dist/chunk-4UEJOM6W.mjs +9 -0
  2. package/dist/index.d.mts +488 -0
  3. package/dist/index.d.ts +488 -2
  4. package/dist/index.js +37574 -2
  5. package/dist/index.mjs +1097 -0
  6. package/dist/lib/cloid.d.ts.map +1 -1
  7. package/dist/lib/cloid.js +11 -1
  8. package/dist/lib/cloid.js.map +1 -1
  9. package/dist/meta-52Q5UUQ4.mjs +1474 -0
  10. package/dist/meta-FTWJX4LV.mjs +1445 -0
  11. package/dist/meta-IKWYLG3Q.mjs +1316 -0
  12. package/dist/meta-UUXKK7IB.mjs +1355 -0
  13. package/dist/perpDexs-PSE3LEVV.mjs +9 -0
  14. package/dist/perpDexs-S3TK25EU.mjs +17 -0
  15. package/dist/perpDexs-TZIQ57IW.mjs +537 -0
  16. package/dist/perpDexs-YNEAJ3R5.mjs +7 -0
  17. package/dist/perpDexs-YS3QQSHW.mjs +338 -0
  18. package/dist/spotMeta-7IJT3W6H.mjs +6442 -0
  19. package/dist/spotMeta-LEO5QFNS.mjs +26392 -0
  20. package/dist/spotMeta-MC5UYLQ7.mjs +6335 -0
  21. package/dist/spotMeta-TXJWYTKI.mjs +26403 -0
  22. package/dist/spotMeta-VAANYV77.mjs +6346 -0
  23. package/dist/spotMeta-ZVBZNUUE.mjs +26559 -0
  24. package/dist/staticMeta-HRXST42O.mjs +24 -0
  25. package/dist/staticMeta-QWPQK3MD.mjs +22 -0
  26. package/index.ts +6 -0
  27. package/lib/cloid/README.md +233 -0
  28. package/lib/cloid/cloid.ts +368 -0
  29. package/lib/cloid/encoder.ts +60 -0
  30. package/lib/constants/fee.ts +2 -0
  31. package/lib/constants/tokens.ts +28 -0
  32. package/lib/fee.ts +105 -0
  33. package/lib/hip3/market-info.ts +25 -0
  34. package/lib/hip3/utils.ts +9 -0
  35. package/lib/meta/README.md +471 -0
  36. package/lib/meta/data/mainnet/dexs/xyz.json +26 -0
  37. package/lib/meta/data/mainnet/meta.json +1462 -0
  38. package/lib/meta/data/mainnet/perpDexs.json +11 -0
  39. package/lib/meta/data/mainnet/spotMeta.json +6432 -0
  40. package/lib/meta/data/mainnet/staticMeta.json +14 -0
  41. package/lib/meta/data/testnet/dexs/rrrrr.json +33 -0
  42. package/lib/meta/data/testnet/meta.json +1343 -0
  43. package/lib/meta/data/testnet/perpDexs.json +531 -0
  44. package/lib/meta/data/testnet/spotMeta.json +26547 -0
  45. package/lib/meta/data/testnet/staticMeta.json +12 -0
  46. package/lib/meta/metadata.ts +717 -0
  47. package/lib/pup/calculator.ts +221 -0
  48. package/lib/pup/index.ts +9 -0
  49. package/lib/pup/types.ts +94 -0
  50. package/lib/utils/formatter.ts +97 -0
  51. package/package.json +21 -17
  52. package/readme.md +0 -0
package/dist/index.d.ts CHANGED
@@ -1,2 +1,488 @@
1
- export * from "./lib/cloid";
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { SpotToken, PerpsMeta, PerpsAssetCtx, SpotMeta } from '@nktkas/hyperliquid';
2
+ import { Hex } from '@nktkas/hyperliquid/script/src/types/mod';
3
+
4
+ declare function encodeSlug(slug: string): bigint;
5
+ declare function decodeSlug(value: bigint): string;
6
+ declare function buildCloid(version: number, slug: string, clientId: number, oid: bigint | string, // bitint for oid, string for encoded string slug (12 characters max)
7
+ options?: {
8
+ isMiniApp?: boolean;
9
+ miniAppTriggered?: boolean;
10
+ widgetType?: WidgetType | number;
11
+ }): `0x${string}`;
12
+ declare function parseCloid(cloidHex: `0x${string}`): {
13
+ prefix: string;
14
+ version: number;
15
+ slug: string;
16
+ clientId: number;
17
+ isMiniApp: boolean;
18
+ miniAppTriggered: boolean;
19
+ widgetTypeId: number;
20
+ oid: bigint;
21
+ decodedOid: string;
22
+ clientName: string;
23
+ widgetTypeName: string;
24
+ } | null;
25
+ type CloidData = ReturnType<typeof parseCloid>;
26
+ declare function isBasedCloid(cloidHex?: `0x${string}` | null): boolean;
27
+ declare function isTenantCloid(tenantTrackingSlug: string, cloidHex?: `0x${string}` | null): boolean;
28
+ declare function isTrackingIdCloid(trackingId: bigint | string, cloidHex?: `0x${string}` | null): boolean;
29
+ declare function normaliseSlug(slug: string): string;
30
+ /**
31
+ * Normalise a tracking id to 12 characters
32
+ * @param trackingId - The tracking id to normalise
33
+ * @returns The normalised tracking id
34
+ */
35
+ declare function normaliseTrackingId(trackingId: string): string;
36
+ type ClientCode = string;
37
+ declare const CloidClientCode: {
38
+ readonly Unset: 0;
39
+ readonly Web: 1;
40
+ readonly App: 2;
41
+ readonly TgBot: 3;
42
+ readonly TSL: 4;
43
+ readonly Grid: 5;
44
+ readonly Chase: 6;
45
+ readonly Desktop: 7;
46
+ readonly API: 8;
47
+ };
48
+ type ClientCodeType = keyof typeof CloidClientCode;
49
+ type CloidClientCodeId = (typeof CloidClientCode)[ClientCodeType];
50
+ declare const CloidClientCodeNameById: Record<number, ClientCodeType>;
51
+ declare function getClientCodeNameById(id: number): string;
52
+ declare const WidgetType: {
53
+ readonly Unset: 0;
54
+ readonly SidePanel: 1;
55
+ readonly Widget: 2;
56
+ readonly FloatingWidget: 3;
57
+ };
58
+ type WidgetType = keyof typeof WidgetType;
59
+ type WidgetTypeId = (typeof WidgetType)[WidgetType];
60
+ declare const WidgetTypeById: Record<number, WidgetType>;
61
+ declare function getWidgetTypeById(id: number): string;
62
+ /**
63
+ * @param tenantCode - The tenant code (max 5 characters, truncated if longer) default: "BASED"
64
+ * @param clientCode CloidClientCode - The client code (max 5 characters, truncated if longer) default: "Unset"
65
+ * @param oid - The oid (64 bits) used for identifying unique orders, default: 0xBA5ED10000BA5ED1 or string for encoded string slug (12 characters max)
66
+ * @param attribution - Mini-app and component options
67
+ * @returns The cloid
68
+ */
69
+ declare function getCloid(tenantCode?: ClientCode | null, clientCode?: ClientCodeType | number, oid?: bigint | string, attribution?: {
70
+ isMiniApp?: boolean;
71
+ miniAppTriggered?: boolean;
72
+ widgetType?: WidgetType | number;
73
+ }): `0x${string}`;
74
+ declare function isClientCode(clientCode: ClientCodeType | number, cloidHex: `0x${string}`): boolean;
75
+ declare function isWidgetType(widgetType: WidgetType | number, cloidHex: `0x${string}`): boolean;
76
+ declare function isMiniAppCloid(cloidHex: `0x${string}`): boolean;
77
+ declare function isMiniAppTriggeredCloid(cloidHex: `0x${string}`): boolean;
78
+
79
+ declare const TARGET_APPROVED_MAX_BUILDER_FEE: number;
80
+ declare const TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT = "0.1%";
81
+ /**
82
+ * Get the amount of builder fee to approve for
83
+ * @param perpetualTradingFee - Perp fee in percentage
84
+ * @param spotTradingFee - Spot fee in percentage
85
+ * @returns {
86
+ * amount: number; - The amount of builder fee to approve in 1/10 of a basis point
87
+ * percent: string; - eg. String input to approve fee, "0.1%"
88
+ * }
89
+ */
90
+ declare const getApprovalAmount: ({ customFeeEnabled, perpetualTradingFee, spotTradingFee, }: {
91
+ customFeeEnabled: boolean;
92
+ perpetualTradingFee?: number;
93
+ spotTradingFee?: number;
94
+ }) => {
95
+ approvalAmount: number;
96
+ approvalPercent: `${string}%`;
97
+ perpFee: number;
98
+ spotFee: number;
99
+ builder: `0x${string}`;
100
+ referralCode: string;
101
+ };
102
+
103
+ /**
104
+ * PUP Token Eligibility Types and Constants
105
+ */
106
+ interface V3LPTokenInfo {
107
+ token0: {
108
+ price: number;
109
+ value: number;
110
+ amount: number;
111
+ symbol: string;
112
+ address: string;
113
+ };
114
+ token1: {
115
+ price: number;
116
+ value: number;
117
+ amount: number;
118
+ symbol: string;
119
+ address: string;
120
+ };
121
+ }
122
+ interface UpheavalPosition {
123
+ pair: string;
124
+ pool: string;
125
+ value: number;
126
+ amount: string;
127
+ version: 'erc20' | 'v3' | 'v2';
128
+ v3LPTokenInfo?: V3LPTokenInfo;
129
+ }
130
+ interface UpheavalSnapshot {
131
+ id: string;
132
+ user_address: string;
133
+ total_lp_value: number;
134
+ position_count: number;
135
+ metadata: {
136
+ positions: UpheavalPosition[];
137
+ snapshot_date: string;
138
+ };
139
+ created_at: string;
140
+ userId: string | null;
141
+ }
142
+ interface UpheavalApiResponse {
143
+ success: boolean;
144
+ snapshot: {
145
+ timestamp: string;
146
+ user_count: number;
147
+ };
148
+ data: UpheavalSnapshot[];
149
+ cached_at: string;
150
+ filtered_by: string;
151
+ }
152
+ interface PupEligibilityResult {
153
+ isEligible: boolean;
154
+ boostPct: number;
155
+ isAirdropRecipient: boolean;
156
+ pupTokenAmount?: number;
157
+ totalLpValue?: number;
158
+ currentTier?: number;
159
+ currentBoost?: number;
160
+ nextTier?: number | null;
161
+ nextBoost?: number | null;
162
+ amountToNextTier?: number | null;
163
+ nextTierThreshold?: number | null;
164
+ progressPercentage?: number;
165
+ }
166
+ interface AirdropAllocationData {
167
+ amount: bigint | {
168
+ div: (divisor: number) => {
169
+ toNumber: () => number;
170
+ };
171
+ };
172
+ walletAddress: string;
173
+ }
174
+ declare const PUP_TOKEN_ADDRESS = "0x876e7f2f30935118a654fc0e1f807afc49efe500";
175
+ declare const PUP_TOKEN_THRESHOLDS: {
176
+ readonly AIRDROP_70_PERCENT: 0.7;
177
+ readonly AIRDROP_35_PERCENT: 0.35;
178
+ readonly AIRDROP_110_PERCENT: 1.1;
179
+ readonly NON_AIRDROP_TOKENS: 2000000;
180
+ };
181
+ declare const XP_BOOST_PERCENTAGES: {
182
+ readonly NO_BOOST: 0;
183
+ readonly TIER_1: 25;
184
+ readonly TIER_2: 50;
185
+ readonly TIER_3: 60;
186
+ };
187
+
188
+ /**
189
+ * PUP Token Calculation Logic
190
+ * Pure functions for calculating PUP amounts and boost percentages
191
+ */
192
+
193
+ /**
194
+ * Calculate total PUP amount from all positions
195
+ * @param positions Array of Upheaval positions
196
+ * @returns Total PUP token amount
197
+ */
198
+ declare function calculateTotalPupAmount(positions: UpheavalPosition[]): number;
199
+ /**
200
+ * Calculate XP boost percentage based on PUP holdings
201
+ * @param pupTokenAmount Current PUP token holdings
202
+ * @param normalizedAirDropAmount Normalized airdrop amount (divided by 1e18)
203
+ * @param isAirdropRecipient Whether user received an airdrop
204
+ * @returns Boost percentage (0, 25, 50, or 60)
205
+ */
206
+ declare function calculateBoostPercentage(pupTokenAmount: number, normalizedAirDropAmount: number, isAirdropRecipient: boolean): number;
207
+ /**
208
+ * Normalize airdrop amount from BigInt or Prisma Decimal
209
+ * @param amount Airdrop amount from database
210
+ * @returns Normalized amount as number
211
+ */
212
+ declare function normalizeAirdropAmount(amount: bigint | {
213
+ div: (divisor: number) => {
214
+ toNumber: () => number;
215
+ };
216
+ } | null | undefined): number;
217
+ /**
218
+ * Get information about the next tier and amount needed to reach it
219
+ * @param pupTokenAmount Current PUP token holdings
220
+ * @param normalizedAirDropAmount Normalized airdrop amount (divided by 1e18)
221
+ * @param isAirdropRecipient Whether user received an airdrop
222
+ * @returns Information about current tier and progression to next tier
223
+ */
224
+ declare function getNextTierInfo(pupTokenAmount: number, normalizedAirDropAmount: number, isAirdropRecipient: boolean): {
225
+ currentTier: number;
226
+ currentBoost: number;
227
+ nextTier: number | null;
228
+ nextBoost: number | null;
229
+ amountToNextTier: number | null;
230
+ nextTierThreshold: number | null;
231
+ progressPercentage: number;
232
+ };
233
+
234
+ declare const USDC_SPOT_TOKEN: SpotToken;
235
+ declare const TESTNET_USDC_SPOT_TOKEN: SpotToken;
236
+
237
+ interface PerpDex {
238
+ /** Short name of the perpetual dex. */
239
+ name: string;
240
+ /** Complete name of the perpetual dex. */
241
+ fullName: string;
242
+ /** Hex address of the dex deployer. */
243
+ deployer: Hex;
244
+ /** Hex address of the oracle updater, or null if not available. */
245
+ oracleUpdater: Hex | null;
246
+ feeRecipient: Hex | null;
247
+ assetToStreamingOiCap: [string, string][];
248
+ }
249
+ /**
250
+ * Market information for trading operations
251
+ */
252
+ interface MarketInfo {
253
+ symbol: string;
254
+ assetId: number;
255
+ szDecimals: number;
256
+ type: "perps" | "spot" | "hip3";
257
+ coin: string;
258
+ displayName?: string;
259
+ imageUrl?: string;
260
+ maxLeverage?: number;
261
+ baseToken?: SpotToken;
262
+ quoteToken?: SpotToken;
263
+ dexName?: string;
264
+ dexIndex?: number;
265
+ dexDisplayName?: string;
266
+ dexImageUrl?: string;
267
+ }
268
+ interface DexInfo {
269
+ meta: PerpsMeta;
270
+ assetContext: PerpsAssetCtx[];
271
+ dexFullName: string;
272
+ dexName: string;
273
+ dexIndex: number;
274
+ collateralTokenSymbol: string;
275
+ displayName?: string;
276
+ imageUrl?: string;
277
+ }
278
+ type ExtendedPerpsMeta = PerpsMeta & {
279
+ collateralToken?: number;
280
+ };
281
+ /**
282
+ * Spot token information
283
+ */
284
+ interface TokenInfo {
285
+ name: string;
286
+ index: number;
287
+ szDecimals: number;
288
+ weiDecimals: number;
289
+ tokenId: string;
290
+ }
291
+ /**
292
+ * Configuration for MetadataClient
293
+ */
294
+ interface MetadataClientConfig {
295
+ /** List of HIP-3 DEX names to load metadata for */
296
+ hip3Dexs?: string[];
297
+ /** Whether to lazily initialize (fetch metadata on first use) */
298
+ lazyInit?: boolean;
299
+ /** Whether to use testnet (default: false for mainnet) */
300
+ isTestnet?: boolean;
301
+ /** Use static fallback data only, no API fetch */
302
+ onlyUseStaticFallback?: boolean;
303
+ /** Whether to use static fallback data if API fetch fails (default: true) */
304
+ useStaticFallback?: boolean;
305
+ }
306
+ /**
307
+ * MetadataClient - Handles Hyperliquid metadata for trading operations
308
+ *
309
+ * Provides a clean interface to:
310
+ * - Convert symbols to asset IDs and decimals
311
+ * - Handle spot markets with multiple quote assets (USDC, USDT0, USDH)
312
+ * - Support perpetuals and HIP-3 deployed DEXs
313
+ * - Calculate correct asset IDs per Hyperliquid spec
314
+ *
315
+ * Asset ID Calculation:
316
+ * - Perps: index in meta universe
317
+ * - Spot: 10000 + index
318
+ * - HIP-3: 100000 + perp_dex_index * 10000 + index_in_meta
319
+ */
320
+ declare const ROOT_DEX = "hyperliquid";
321
+ declare class MetadataClient {
322
+ private infoClient;
323
+ private config;
324
+ private isTestnet;
325
+ private spotMeta;
326
+ private perpsMeta;
327
+ private perpDexs;
328
+ private staticMeta;
329
+ private hip3DexsMeta;
330
+ private perpsSymbolToIndex;
331
+ private spotTokenNameToIndex;
332
+ private spotPairToMarket;
333
+ private baseTokenToMarkets;
334
+ private quoteAssets;
335
+ private coinToMarket;
336
+ private hip3SymbolToMarket;
337
+ private dexNameToIndex;
338
+ private initialized;
339
+ constructor(config?: MetadataClientConfig);
340
+ /**
341
+ * Initialize metadata by fetching from Hyperliquid
342
+ */
343
+ initialize(): Promise<void>;
344
+ /**
345
+ * Load staticMeta.json for display overrides
346
+ * This is always loaded regardless of config.useStaticFallback
347
+ */
348
+ private loadStaticMetaOverrides;
349
+ /**
350
+ * Load static metadata from bundled JSON files
351
+ */
352
+ private loadStaticMetadata;
353
+ /**
354
+ * Build optimized lookup maps from raw metadata
355
+ * Called after metadata is loaded (from API or static files)
356
+ */
357
+ private buildLookupMaps;
358
+ /**
359
+ * Load metadata for a specific HIP-3 DEX
360
+ * Also builds optimized lookups for this DEX's markets
361
+ */
362
+ loadHip3Metadata(dexName: string): Promise<DexInfo>;
363
+ /**
364
+ * Build optimized lookups for HIP-3 markets of a specific DEX
365
+ */
366
+ private buildHip3MarketsForDex;
367
+ /**
368
+ * Ensure metadata is loaded (for lazy init)
369
+ */
370
+ private ensureInitialized;
371
+ /**
372
+ * Get market information by symbol
373
+ * Optimized: O(1) direct map lookup for most cases
374
+ * Lazily initialize hip-3 metadata if not already initialized
375
+ *
376
+ * @param symbol - Market symbol (e.g., "BTC", "PURR/USDC", "vntls:ABC")
377
+ * @param quoteAsset - Quote asset for spot markets (default: "USDC")
378
+ * @returns Market information or null if not found
379
+ */
380
+ getMarketBySymbolAsync(symbol: string, quoteAsset?: string): Promise<MarketInfo | null>;
381
+ getMarketByCoin(coin: string): MarketInfo | null;
382
+ /**
383
+ * Get perpetuals market information
384
+ * Optimized: O(1) map lookup instead of O(n) array search
385
+ */
386
+ getPerpsMarket(symbol: string): MarketInfo | null;
387
+ /**
388
+ * Get spot market information
389
+ * Optimized: O(1) map lookup instead of O(n) array searches
390
+ *
391
+ * @param baseSymbol - Base token symbol (e.g., "PURR", "UHYPE")
392
+ * @param quoteSymbol - Quote token symbol (default: "USDC")
393
+ */
394
+ getSpotMarket(baseSymbol: string, quoteSymbol?: string): MarketInfo | null;
395
+ /**
396
+ * Get HIP-3 market information
397
+ * Optimized: O(1) map lookup after DEX metadata is loaded
398
+ *
399
+ * @param symbol - HIP-3 market symbol (format: "dex:coin")
400
+ */
401
+ getHip3Market(symbol: string): Promise<MarketInfo | null>;
402
+ getHip3Dex(dexName: string): Promise<DexInfo | null>;
403
+ /**
404
+ * Get all available markets for a base token
405
+ * Optimized: O(1) map lookup instead of O(n) filter + map
406
+ * Useful for showing all quote asset options
407
+ */
408
+ getAllMarketsForBase(baseSymbol: string): MarketInfo[];
409
+ /**
410
+ * Get spot token information
411
+ * Optimized: O(1) map lookup instead of O(n) array search
412
+ */
413
+ getSpotTokenInfo(tokenSymbol: string): TokenInfo | null;
414
+ /**
415
+ * Get all available quote assets
416
+ * Optimized: O(1) pre-computed array instead of O(n) computation
417
+ */
418
+ getAvailableQuoteAssets(): string[];
419
+ /**
420
+ * Get raw metadata (for advanced use cases)
421
+ */
422
+ getRawMetadata(): {
423
+ spotMeta: SpotMeta | null;
424
+ perpsMeta: PerpsMeta | null;
425
+ perpDexs: (PerpDex | null)[];
426
+ hip3DexsMeta: {
427
+ [k: string]: DexInfo;
428
+ };
429
+ };
430
+ /**
431
+ * Get network configuration
432
+ */
433
+ getNetworkInfo(): {
434
+ isTestnet: boolean;
435
+ useStaticFallback: boolean | undefined;
436
+ initialized: boolean;
437
+ };
438
+ }
439
+
440
+ declare const formatPriceAndSize: ({ px, sz, szDecimals, isSpot, }: {
441
+ px: number;
442
+ sz: number;
443
+ szDecimals: number;
444
+ isSpot: boolean;
445
+ }) => {
446
+ price: number;
447
+ size: number;
448
+ };
449
+ /**
450
+ * Formats price for order placement following Hyperliquid rules
451
+ * - Rounded to priceDecimals of the asset
452
+ * @param px - The price to format
453
+ * @param priceDecimals - Price decimals for the asset
454
+ * @returns Formatted price as number (rounded to priceDecimals if exceeds)
455
+ */
456
+ declare const formatPriceForOrder: ({ px, szDecimals, isSpot, }: {
457
+ px: number;
458
+ szDecimals: number;
459
+ isSpot: boolean;
460
+ }) => number;
461
+ /**
462
+ * Formats size for order placement following Hyperliquid rules
463
+ * - Rounded to szDecimals of the asset
464
+ * @param sz - The size to format
465
+ * @param szDecimals - Size decimals for the asset
466
+ * @returns Formatted size as number (rounded down to szDecimals if exceeds)
467
+ */
468
+ declare const formatSizeForOrder: ({ sz, szDecimals, }: {
469
+ sz: number;
470
+ szDecimals: number;
471
+ }) => number;
472
+ /**
473
+ * Get minimum price decimals for tick size calculations
474
+ * Uses the same logic as internal price formatting
475
+ *
476
+ * @param price - The current price
477
+ * @param szDecimals - Size decimals for the asset
478
+ * @param isSpot - Whether this is a spot market (true) or perp market (false)
479
+ * @returns Minimum decimal places for price display
480
+ *
481
+ * @example
482
+ * getPriceDecimals(1234.5, 0, false) // 1 (PERP market)
483
+ * getPriceDecimals(0.00123, 0, true) // 6 (SPOT market)
484
+ * getPriceDecimals(100000, 0, false) // 0 (large prices)
485
+ */
486
+ declare function getPriceDecimals(price: number, szDecimals: number, isSpot: boolean): number;
487
+
488
+ export { type AirdropAllocationData, CloidClientCode, type CloidClientCodeId, CloidClientCodeNameById, type CloidData, type DexInfo, type ExtendedPerpsMeta, type MarketInfo, MetadataClient, PUP_TOKEN_ADDRESS, PUP_TOKEN_THRESHOLDS, type PerpDex, type PupEligibilityResult, ROOT_DEX, TARGET_APPROVED_MAX_BUILDER_FEE, TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT, TESTNET_USDC_SPOT_TOKEN, type TokenInfo, USDC_SPOT_TOKEN, type UpheavalApiResponse, type UpheavalPosition, type UpheavalSnapshot, type V3LPTokenInfo, WidgetType, WidgetTypeById, type WidgetTypeId, XP_BOOST_PERCENTAGES, buildCloid, calculateBoostPercentage, calculateTotalPupAmount, decodeSlug, encodeSlug, formatPriceAndSize, formatPriceForOrder, formatSizeForOrder, getApprovalAmount, getClientCodeNameById, getCloid, getNextTierInfo, getPriceDecimals, getWidgetTypeById, isBasedCloid, isClientCode, isMiniAppCloid, isMiniAppTriggeredCloid, isTenantCloid, isTrackingIdCloid, isWidgetType, normaliseSlug, normaliseTrackingId, normalizeAirdropAmount, parseCloid };