@mobula_labs/types 0.1.0 → 0.1.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.
Files changed (60) hide show
  1. package/README.md +14 -14
  2. package/dist/cjs/index.cjs +3689 -3391
  3. package/dist/cjs/index.cjs.map +27 -20
  4. package/dist/esm/index.js +3689 -3391
  5. package/dist/esm/index.js.map +27 -20
  6. package/dist/index.d.ts +7 -0
  7. package/dist/misc/ApiKeysQueries.d.ts +4 -0
  8. package/dist/utils/schemas/BaseMessage.d.ts +6 -6
  9. package/dist/utils/schemas/CurrencySchema.d.ts +21 -0
  10. package/dist/utils/schemas/EnrichedHoldersData.d.ts +3 -3
  11. package/dist/utils/schemas/EnrichedMarketData.d.ts +453 -1567
  12. package/dist/utils/schemas/LLMSecuritySchemas.d.ts +260 -0
  13. package/dist/utils/schemas/MarketDetailsOutput.d.ts +22 -31
  14. package/dist/utils/schemas/SecuritySchemas.d.ts +3 -11
  15. package/dist/utils/schemas/TokenDetailsOutput.d.ts +9 -15
  16. package/dist/utils/schemas/WalletDeployerSchema.d.ts +30 -36
  17. package/dist/v1/all/BlockchainSchema.d.ts +6 -6
  18. package/dist/v1/market/MarketBlockchainPairsSchema.d.ts +10 -10
  19. package/dist/v1/market/MarketHistoryPairSchema.d.ts +8 -8
  20. package/dist/v1/market/MarketMultiDataSchema.d.ts +4 -4
  21. package/dist/v1/market/MarketMultiPricesSchema.d.ts +4 -4
  22. package/dist/v1/market/MarketPairSchema.d.ts +76 -106
  23. package/dist/v1/market/MarketPairsSchema.d.ts +12 -25
  24. package/dist/v1/market/MarketTradesPairSchema.d.ts +22 -2
  25. package/dist/v1/metadata/MetadataTrendingsSchema.d.ts +2 -2
  26. package/dist/v1/pulse/PulseSchema.d.ts +138 -294
  27. package/dist/v1/search/SearchSchema.d.ts +20 -24
  28. package/dist/v1/wallet/DeployerSchema.d.ts +17 -19
  29. package/dist/v1/wallet/WalletPortfolioSchema.d.ts +8 -24
  30. package/dist/v1/wallet/WalletTradesSchema.d.ts +13 -15
  31. package/dist/v1/wallet/WalletTransactionSchema.d.ts +8 -8
  32. package/dist/v2/asset/AssetDetailsSchema.d.ts +46 -60
  33. package/dist/v2/explorer/BlockQuerySchema.d.ts +23 -0
  34. package/dist/v2/market/MarketDetailsSchema.d.ts +61 -62
  35. package/dist/v2/perp/PerpBlocksSchema.d.ts +183 -0
  36. package/dist/v2/perp/PerpModels.d.ts +10 -10
  37. package/dist/v2/swap/SwapQuotingBatchOutput.d.ts +18 -18
  38. package/dist/v2/swap/SwapQuotingBatchSchema.d.ts +158 -0
  39. package/dist/v2/swap/SwapQuotingInstructionsOutput.d.ts +2044 -0
  40. package/dist/v2/swap/SwapQuotingOutput.d.ts +18 -18
  41. package/dist/v2/swap/SwapQuotingSchema.d.ts +90 -0
  42. package/dist/v2/token/TokenDetailsSchema.d.ts +33 -30
  43. package/dist/v2/token/TokenKlineBsPointSchema.d.ts +2 -6
  44. package/dist/v2/token/TokenMarketsSchema.d.ts +44 -62
  45. package/dist/v2/token/TokenPositionsSchema.d.ts +3 -0
  46. package/dist/v2/token/TokenSecurityOutput.d.ts +122 -0
  47. package/dist/v2/token/TokenSecurityQuery.d.ts +3 -0
  48. package/dist/v2/token/TokenTradesSchema.d.ts +242 -154
  49. package/dist/v2/wallet/WalletActivityV2Schema.d.ts +11 -15
  50. package/dist/v2/wallet/WalletDefiPositionsSchema.d.ts +12 -0
  51. package/dist/v2/wallet/WalletDeployerSchema.d.ts +17 -19
  52. package/dist/v2/wallet/WalletPerpsPositionsSchema.d.ts +6 -6
  53. package/dist/v2/wallet/WalletPositionsSchema.d.ts +3795 -38
  54. package/dist/v2/wallet/WalletTokenBalancesSchema.d.ts +6 -22
  55. package/dist/wss/BalancePayloadSchema.d.ts +6 -6
  56. package/dist/wss/FastTradePayloadSchema.d.ts +5 -0
  57. package/dist/wss/OhlcvPayloadSchema.d.ts +2 -2
  58. package/dist/wss/PairsPayloadSchema.d.ts +2 -2
  59. package/dist/wss/PositionPayloadSchema.d.ts +2 -2
  60. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
+ export * from './misc/ApiKeysQueries.ts';
1
2
  export * from './utils/constants/constants.ts';
2
3
  export * from './utils/functions/bigintAbs.ts';
3
4
  export * from './utils/functions/period.ts';
4
5
  export * from './utils/functions/zodUtils.ts';
5
6
  export * from './utils/schemas/BaseMessage.ts';
6
7
  export * from './utils/schemas/BigIntLax.ts';
8
+ export * from './utils/schemas/CurrencySchema.ts';
7
9
  export * from './utils/schemas/EnrichedHoldersData.ts';
8
10
  export * from './utils/schemas/EnrichedMarketData.ts';
11
+ export * from './utils/schemas/LLMSecuritySchemas.ts';
9
12
  export * from './v1/all/AllAssetSchema.ts';
10
13
  export * from './v1/all/BlockchainSchema.ts';
11
14
  export * from './v1/market/CreateFeedSchema.ts';
@@ -49,11 +52,14 @@ export * from './v1/wallet/WalletTradesSchema.ts';
49
52
  export * from './v1/wallet/WalletTransactionSchema.ts';
50
53
  export * from './v2/asset/AssetDetailsSchema.ts';
51
54
  export * from './v2/asset/AssetPriceHistorySchema.ts';
55
+ export * from './v2/explorer/BlockQuerySchema.ts';
52
56
  export * from './v2/market/MarketDetailsSchema.ts';
53
57
  export * from './v2/market/MarketOHLCVHistorySchema.ts';
58
+ export * from './v2/perp/PerpBlocksSchema.ts';
54
59
  export * from './v2/perp/PerpOrderQuotingSchema.ts';
55
60
  export * from './v2/swap/SwapQuotingBatchOutput.ts';
56
61
  export * from './v2/swap/SwapQuotingBatchSchema.ts';
62
+ export * from './v2/swap/SwapQuotingInstructionsOutput.ts';
57
63
  export * from './v2/swap/SwapQuotingOutput.ts';
58
64
  export * from './v2/swap/SwapQuotingSchema.ts';
59
65
  export * from './v2/swap/SwapSendOutput.ts';
@@ -70,6 +76,7 @@ export * from './v2/token/TokenTradesSchema.ts';
70
76
  export * from './v2/wallet/WalleAnalysisQuerySchema.ts';
71
77
  export * from './v2/wallet/WalleFundingQuerySchema.ts';
72
78
  export * from './v2/wallet/WalletActivityV2Schema.ts';
79
+ export * from './v2/wallet/WalletDefiPositionsSchema.ts';
73
80
  export * from './v2/wallet/WalletDeployerSchema.ts';
74
81
  export * from './v2/wallet/WalletPerpsPositionsSchema.ts';
75
82
  export * from './v2/wallet/WalletPositionsSchema.ts';
@@ -0,0 +1,4 @@
1
+ export declare const API_KEYS_QUERIES: {
2
+ readonly SELECT_BY_NAME_AND_OWNER: "\n SELECT key FROM misc.api_keys\n WHERE name = $1\n AND (\n ($2::text IS NULL AND organization_id IS NULL AND customer_id = $3)\n OR\n (organization_id = $2)\n )\n LIMIT 1\n ";
3
+ readonly INSERT: "\n INSERT INTO misc.api_keys\n (key, customer_id, organization_id, name, total_calls, metrics)\n VALUES\n ($1, $2, $3, $4, 0, $5)\n ";
4
+ };
@@ -13,15 +13,15 @@ export interface BaseMessageType {
13
13
  blockchain: string;
14
14
  hash: string;
15
15
  sender: string;
16
- token_amount_raw: string | bigint;
17
- token_amount_raw_vs: string | bigint;
16
+ token_amount_raw: string;
17
+ token_amount_raw_vs: string;
18
18
  labels?: string[];
19
19
  pairData?: MarketDetailsOutputType;
20
20
  tokenData?: TokenDetailsOutputType;
21
- preBalanceBaseToken: string | bigint | null;
22
- preBalanceQuoteToken: string | bigint | null;
23
- postBalanceBaseToken: string | bigint | null;
24
- postBalanceQuoteToken: string | bigint | null;
21
+ preBalanceBaseToken: string | null;
22
+ preBalanceQuoteToken: string | null;
23
+ postBalanceBaseToken: string | null;
24
+ postBalanceQuoteToken: string | null;
25
25
  platform?: string | null;
26
26
  swapRecipient?: string | null;
27
27
  }
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Supported fiat currencies for multi-currency price display
4
+ */
5
+ export declare const SupportedCurrency: z.ZodEnum<["USD", "EUR", "GBP", "JPY", "CHF", "CAD", "AUD", "CNY", "KRW", "INR", "BRL"]>;
6
+ export type SupportedCurrencyType = z.infer<typeof SupportedCurrency>;
7
+ /**
8
+ * Default currency when none is specified
9
+ */
10
+ export declare const DEFAULT_CURRENCY: SupportedCurrencyType;
11
+ /**
12
+ * Schema for currencies query parameter
13
+ * Accepts comma-separated list of currencies, defaults to USD
14
+ * Example: currencies=EUR,USD
15
+ */
16
+ export declare const CurrenciesParamSchema: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, ("USD" | "EUR" | "GBP" | "JPY" | "CHF" | "CAD" | "AUD" | "CNY" | "KRW" | "INR" | "BRL")[], string | undefined>;
17
+ export type CurrenciesParam = z.infer<typeof CurrenciesParamSchema>;
18
+ /**
19
+ * All currencies except USD (currencies that need conversion)
20
+ */
21
+ export declare const NON_USD_CURRENCIES: ("EUR" | "GBP" | "JPY" | "CHF" | "CAD" | "AUD" | "CNY" | "KRW" | "INR" | "BRL")[];
@@ -123,7 +123,7 @@ export declare const HoldersStatsSchema: z.ZodObject<{
123
123
  smartTradersBuys?: number | null | undefined;
124
124
  }>;
125
125
  export type HoldersStatsSchema = z.infer<typeof HoldersStatsSchema>;
126
- export declare const HoldersStreamNewTokenPayload: z.ZodObject<z.objectUtil.extendShape<{
126
+ export declare const HoldersStreamNewTokenPayload: z.ZodObject<{
127
127
  holdersCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
128
128
  top10HoldingsPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
129
129
  top50HoldingsPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -145,7 +145,7 @@ export declare const HoldersStreamNewTokenPayload: z.ZodObject<z.objectUtil.exte
145
145
  freshTradersBuys: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
146
146
  proTradersBuys: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
147
147
  smartTradersBuys: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
148
- }, {
148
+ } & {
149
149
  holders: z.ZodArray<z.ZodObject<{
150
150
  address: z.ZodString;
151
151
  balanceRaw: z.ZodUnion<[z.ZodEffects<z.ZodString, bigint, string>, z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodBigInt, z.ZodEffects<z.ZodNull, bigint, null>]>;
@@ -201,7 +201,7 @@ export declare const HoldersStreamNewTokenPayload: z.ZodObject<z.objectUtil.exte
201
201
  createdAt: Date | null;
202
202
  updatedAt: Date | null;
203
203
  }>, "many">;
204
- }>, "strip", z.ZodTypeAny, {
204
+ }, "strip", z.ZodTypeAny, {
205
205
  holders: {
206
206
  address: string;
207
207
  balanceRaw: bigint;