hood-alerts 0.1.0

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 (107) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +369 -0
  3. package/dist/bot/index.cjs +1008 -0
  4. package/dist/bot/index.cjs.map +1 -0
  5. package/dist/bot/index.d.cts +241 -0
  6. package/dist/bot/index.d.ts +241 -0
  7. package/dist/bot/index.js +30 -0
  8. package/dist/bot/index.js.map +1 -0
  9. package/dist/chunk-32GS6XVE.js +732 -0
  10. package/dist/chunk-32GS6XVE.js.map +1 -0
  11. package/dist/chunk-3LHCQA4Z.js +76 -0
  12. package/dist/chunk-3LHCQA4Z.js.map +1 -0
  13. package/dist/chunk-3NHLSKZE.js +1 -0
  14. package/dist/chunk-3NHLSKZE.js.map +1 -0
  15. package/dist/chunk-6JQK5G3Z.js +72 -0
  16. package/dist/chunk-6JQK5G3Z.js.map +1 -0
  17. package/dist/chunk-CBNZ6AZT.js +598 -0
  18. package/dist/chunk-CBNZ6AZT.js.map +1 -0
  19. package/dist/chunk-CIURPPOW.js +1 -0
  20. package/dist/chunk-CIURPPOW.js.map +1 -0
  21. package/dist/chunk-IUOEGBF6.js +49 -0
  22. package/dist/chunk-IUOEGBF6.js.map +1 -0
  23. package/dist/chunk-NBMINJ5E.js +230 -0
  24. package/dist/chunk-NBMINJ5E.js.map +1 -0
  25. package/dist/chunk-O2RY2SWN.js +1 -0
  26. package/dist/chunk-O2RY2SWN.js.map +1 -0
  27. package/dist/chunk-PLMVKTQM.js +1 -0
  28. package/dist/chunk-PLMVKTQM.js.map +1 -0
  29. package/dist/chunk-RSTLW7XH.js +130 -0
  30. package/dist/chunk-RSTLW7XH.js.map +1 -0
  31. package/dist/chunk-SOBZ2FPP.js +355 -0
  32. package/dist/chunk-SOBZ2FPP.js.map +1 -0
  33. package/dist/chunk-VC5MKEY2.js +170 -0
  34. package/dist/chunk-VC5MKEY2.js.map +1 -0
  35. package/dist/chunk-W2GUAWUR.js +147 -0
  36. package/dist/chunk-W2GUAWUR.js.map +1 -0
  37. package/dist/chunk-Y2M3USWZ.js +355 -0
  38. package/dist/chunk-Y2M3USWZ.js.map +1 -0
  39. package/dist/chunk-Z4DJPESQ.js +1216 -0
  40. package/dist/chunk-Z4DJPESQ.js.map +1 -0
  41. package/dist/chunk-ZDM5VNWB.js +1 -0
  42. package/dist/chunk-ZDM5VNWB.js.map +1 -0
  43. package/dist/events/index.cjs +820 -0
  44. package/dist/events/index.cjs.map +1 -0
  45. package/dist/events/index.d.cts +58 -0
  46. package/dist/events/index.d.ts +58 -0
  47. package/dist/events/index.js +69 -0
  48. package/dist/events/index.js.map +1 -0
  49. package/dist/format-6RG4OcyE.d.ts +57 -0
  50. package/dist/format-B7d40f65.d.cts +57 -0
  51. package/dist/index.cjs +4122 -0
  52. package/dist/index.cjs.map +1 -0
  53. package/dist/index.d.cts +21 -0
  54. package/dist/index.d.ts +21 -0
  55. package/dist/index.js +274 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/logger-3phvV_fl.d.cts +185 -0
  58. package/dist/logger-CYza_0eU.d.ts +185 -0
  59. package/dist/logs-D7sYBvSy.d.cts +66 -0
  60. package/dist/logs-D7sYBvSy.d.ts +66 -0
  61. package/dist/notifiers/index.cjs +620 -0
  62. package/dist/notifiers/index.cjs.map +1 -0
  63. package/dist/notifiers/index.d.cts +186 -0
  64. package/dist/notifiers/index.d.ts +186 -0
  65. package/dist/notifiers/index.js +70 -0
  66. package/dist/notifiers/index.js.map +1 -0
  67. package/dist/pricing-BumgLpvB.d.cts +79 -0
  68. package/dist/pricing-BumgLpvB.d.ts +79 -0
  69. package/dist/ratelimit-BKVQG2oY.d.cts +42 -0
  70. package/dist/ratelimit-CGLlXNIS.d.ts +42 -0
  71. package/dist/registry-D3We8Lg6.d.ts +50 -0
  72. package/dist/registry-DePA3IyS.d.cts +50 -0
  73. package/dist/rules/index.cjs +614 -0
  74. package/dist/rules/index.cjs.map +1 -0
  75. package/dist/rules/index.d.cts +166 -0
  76. package/dist/rules/index.d.ts +166 -0
  77. package/dist/rules/index.js +60 -0
  78. package/dist/rules/index.js.map +1 -0
  79. package/dist/schema-DuDMPqpq.d.ts +183 -0
  80. package/dist/schema-NnIdKFl2.d.cts +183 -0
  81. package/dist/service/index.cjs +3774 -0
  82. package/dist/service/index.cjs.map +1 -0
  83. package/dist/service/index.d.cts +262 -0
  84. package/dist/service/index.d.ts +262 -0
  85. package/dist/service/index.js +45 -0
  86. package/dist/service/index.js.map +1 -0
  87. package/dist/service/main.cjs +3759 -0
  88. package/dist/service/main.cjs.map +1 -0
  89. package/dist/service/main.d.cts +1 -0
  90. package/dist/service/main.d.ts +1 -0
  91. package/dist/service/main.js +60 -0
  92. package/dist/service/main.js.map +1 -0
  93. package/dist/sources-CAaQR6-N.d.ts +159 -0
  94. package/dist/sources-CpDOUlzx.d.cts +159 -0
  95. package/dist/telegram-CpodYJrP.d.cts +64 -0
  96. package/dist/telegram-pvphmBwn.d.ts +64 -0
  97. package/dist/tiers/index.cjs +471 -0
  98. package/dist/tiers/index.cjs.map +1 -0
  99. package/dist/tiers/index.d.cts +231 -0
  100. package/dist/tiers/index.d.ts +231 -0
  101. package/dist/tiers/index.js +34 -0
  102. package/dist/tiers/index.js.map +1 -0
  103. package/dist/types-C0ETog04.d.ts +109 -0
  104. package/dist/types-CcoKpStA.d.cts +109 -0
  105. package/dist/types-DFPpTMWo.d.cts +186 -0
  106. package/dist/types-DFPpTMWo.d.ts +186 -0
  107. package/package.json +114 -0
@@ -0,0 +1,183 @@
1
+ import { z } from 'zod';
2
+ import { e as Launchpad, b as AlertEventKind } from './types-DFPpTMWo.js';
3
+
4
+ /** An EVM address, stored lowercase so comparisons never depend on checksum casing. */
5
+ declare const addressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6
+ /** The four alert kinds. */
7
+ declare const eventKindSchema: z.ZodEnum<{
8
+ launch: "launch";
9
+ curve_trade: "curve_trade";
10
+ graduation: "graduation";
11
+ whale_trade: "whale_trade";
12
+ }>;
13
+ /** The two launchpads. */
14
+ declare const launchpadSchema: z.ZodEnum<{
15
+ noxa: "noxa";
16
+ odyssey: "odyssey";
17
+ }>;
18
+ /** Trade direction filter. `any` disables the filter. */
19
+ declare const sideSchema: z.ZodEnum<{
20
+ buy: "buy";
21
+ sell: "sell";
22
+ any: "any";
23
+ }>;
24
+ /**
25
+ * Deployer reputation filters, all derived from on-chain history (see
26
+ * `hood-alerts/rules` `createRpcReputationProvider`). Every bound is inclusive.
27
+ */
28
+ declare const reputationFilterSchema: z.ZodObject<{
29
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
30
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
31
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
32
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
33
+ }, z.core.$strict>;
34
+ /** Per-rule delivery rate limits. */
35
+ declare const rateLimitSchema: z.ZodObject<{
36
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
37
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
38
+ }, z.core.$strict>;
39
+ /** A single alert rule. */
40
+ declare const ruleSchema: z.ZodObject<{
41
+ id: z.ZodString;
42
+ name: z.ZodOptional<z.ZodString>;
43
+ enabled: z.ZodDefault<z.ZodBoolean>;
44
+ kinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
45
+ launch: "launch";
46
+ curve_trade: "curve_trade";
47
+ graduation: "graduation";
48
+ whale_trade: "whale_trade";
49
+ }>>>;
50
+ launchpads: z.ZodDefault<z.ZodArray<z.ZodEnum<{
51
+ noxa: "noxa";
52
+ odyssey: "odyssey";
53
+ }>>>;
54
+ minUsd: z.ZodOptional<z.ZodNumber>;
55
+ maxUsd: z.ZodOptional<z.ZodNumber>;
56
+ minLiquidityUsd: z.ZodOptional<z.ZodNumber>;
57
+ maxLiquidityUsd: z.ZodOptional<z.ZodNumber>;
58
+ tokens: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
59
+ deployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
60
+ excludeDeployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
61
+ side: z.ZodDefault<z.ZodEnum<{
62
+ buy: "buy";
63
+ sell: "sell";
64
+ any: "any";
65
+ }>>;
66
+ reputation: z.ZodOptional<z.ZodObject<{
67
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
68
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
69
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
70
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
71
+ }, z.core.$strict>>;
72
+ rateLimit: z.ZodOptional<z.ZodObject<{
73
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
74
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strict>>;
76
+ }, z.core.$strict>;
77
+ /** A validated rule. */
78
+ type Rule = z.output<typeof ruleSchema>;
79
+ /** A rule as accepted on input, before defaults are applied. */
80
+ type RuleInput = z.input<typeof ruleSchema>;
81
+ /** Validated reputation filter. */
82
+ type ReputationFilter = z.output<typeof reputationFilterSchema>;
83
+ /** Validated rate limit block. */
84
+ type RateLimitConfig = z.output<typeof rateLimitSchema>;
85
+ /** Delivery platforms a subscription can target. */
86
+ declare const platformSchema: z.ZodEnum<{
87
+ telegram: "telegram";
88
+ discord: "discord";
89
+ }>;
90
+ /** A delivery platform. */
91
+ type Platform = z.output<typeof platformSchema>;
92
+ /** A subscription: one delivery target plus the rules that feed it. */
93
+ declare const subscriptionSchema: z.ZodObject<{
94
+ id: z.ZodString;
95
+ subscriberId: z.ZodString;
96
+ platform: z.ZodEnum<{
97
+ telegram: "telegram";
98
+ discord: "discord";
99
+ }>;
100
+ target: z.ZodString;
101
+ enabled: z.ZodDefault<z.ZodBoolean>;
102
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
103
+ id: z.ZodString;
104
+ name: z.ZodOptional<z.ZodString>;
105
+ enabled: z.ZodDefault<z.ZodBoolean>;
106
+ kinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
107
+ launch: "launch";
108
+ curve_trade: "curve_trade";
109
+ graduation: "graduation";
110
+ whale_trade: "whale_trade";
111
+ }>>>;
112
+ launchpads: z.ZodDefault<z.ZodArray<z.ZodEnum<{
113
+ noxa: "noxa";
114
+ odyssey: "odyssey";
115
+ }>>>;
116
+ minUsd: z.ZodOptional<z.ZodNumber>;
117
+ maxUsd: z.ZodOptional<z.ZodNumber>;
118
+ minLiquidityUsd: z.ZodOptional<z.ZodNumber>;
119
+ maxLiquidityUsd: z.ZodOptional<z.ZodNumber>;
120
+ tokens: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
121
+ deployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
122
+ excludeDeployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
123
+ side: z.ZodDefault<z.ZodEnum<{
124
+ buy: "buy";
125
+ sell: "sell";
126
+ any: "any";
127
+ }>>;
128
+ reputation: z.ZodOptional<z.ZodObject<{
129
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
130
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
131
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
132
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
133
+ }, z.core.$strict>>;
134
+ rateLimit: z.ZodOptional<z.ZodObject<{
135
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
136
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
137
+ }, z.core.$strict>>;
138
+ }, z.core.$strict>>>;
139
+ createdAtMs: z.ZodNumber;
140
+ }, z.core.$strict>;
141
+ /** A validated subscription. */
142
+ type Subscription = z.output<typeof subscriptionSchema>;
143
+ /** A subscription as accepted on input. */
144
+ type SubscriptionInput = z.input<typeof subscriptionSchema>;
145
+ /** Can a launchpad emit this event kind at all? */
146
+ declare function canEmit(launchpad: Launchpad, kind: AlertEventKind): boolean;
147
+ /**
148
+ * How many filters a rule actually uses. The tier policy caps this so free
149
+ * subscribers get real filtering without turning the service into an unpaid
150
+ * on-chain query engine.
151
+ */
152
+ declare function ruleComplexity(rule: Rule): number;
153
+ /** Filters that cost an extra on-chain read per candidate event. */
154
+ declare function usesOnChainLookups(rule: Rule): boolean;
155
+ /**
156
+ * Parse and validate a rule, applying defaults.
157
+ *
158
+ * @throws {@link z.ZodError} with a field-level message the bot renders back
159
+ * to the user verbatim.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const rule = parseRule({ id: 'whales', kinds: ['whale_trade'], minUsd: 5000 })
164
+ * console.log(rule.launchpads) // ['noxa', 'odyssey'] (defaulted)
165
+ * ```
166
+ */
167
+ declare function parseRule(input: unknown): Rule;
168
+ /** Non-throwing {@link parseRule}. */
169
+ declare function safeParseRule(input: unknown): z.ZodSafeParseResult<Rule>;
170
+ /** Parse and validate a subscription. */
171
+ declare function parseSubscription(input: unknown): Subscription;
172
+ /** Non-throwing {@link parseSubscription}. */
173
+ declare function safeParseSubscription(input: unknown): z.ZodSafeParseResult<Subscription>;
174
+ /**
175
+ * Render a Zod error as one line of human-readable text, for bot replies.
176
+ * A user who typed `/threshold abc` gets "minUsd: expected number", not a
177
+ * stack trace and not a silent failure.
178
+ */
179
+ declare function formatValidationError(error: z.ZodError): string;
180
+ /** A ready-to-use starter rule set, used by `/subscribe` before any editing. */
181
+ declare function defaultRules(): Rule[];
182
+
183
+ export { type Platform as P, type RateLimitConfig as R, type Subscription as S, type ReputationFilter as a, type Rule as b, type RuleInput as c, type SubscriptionInput as d, addressSchema as e, canEmit as f, defaultRules as g, eventKindSchema as h, formatValidationError as i, parseSubscription as j, platformSchema as k, launchpadSchema as l, reputationFilterSchema as m, ruleComplexity as n, ruleSchema as o, parseRule as p, safeParseSubscription as q, rateLimitSchema as r, safeParseRule as s, sideSchema as t, subscriptionSchema as u, usesOnChainLookups as v };
@@ -0,0 +1,183 @@
1
+ import { z } from 'zod';
2
+ import { e as Launchpad, b as AlertEventKind } from './types-DFPpTMWo.cjs';
3
+
4
+ /** An EVM address, stored lowercase so comparisons never depend on checksum casing. */
5
+ declare const addressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6
+ /** The four alert kinds. */
7
+ declare const eventKindSchema: z.ZodEnum<{
8
+ launch: "launch";
9
+ curve_trade: "curve_trade";
10
+ graduation: "graduation";
11
+ whale_trade: "whale_trade";
12
+ }>;
13
+ /** The two launchpads. */
14
+ declare const launchpadSchema: z.ZodEnum<{
15
+ noxa: "noxa";
16
+ odyssey: "odyssey";
17
+ }>;
18
+ /** Trade direction filter. `any` disables the filter. */
19
+ declare const sideSchema: z.ZodEnum<{
20
+ buy: "buy";
21
+ sell: "sell";
22
+ any: "any";
23
+ }>;
24
+ /**
25
+ * Deployer reputation filters, all derived from on-chain history (see
26
+ * `hood-alerts/rules` `createRpcReputationProvider`). Every bound is inclusive.
27
+ */
28
+ declare const reputationFilterSchema: z.ZodObject<{
29
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
30
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
31
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
32
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
33
+ }, z.core.$strict>;
34
+ /** Per-rule delivery rate limits. */
35
+ declare const rateLimitSchema: z.ZodObject<{
36
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
37
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
38
+ }, z.core.$strict>;
39
+ /** A single alert rule. */
40
+ declare const ruleSchema: z.ZodObject<{
41
+ id: z.ZodString;
42
+ name: z.ZodOptional<z.ZodString>;
43
+ enabled: z.ZodDefault<z.ZodBoolean>;
44
+ kinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
45
+ launch: "launch";
46
+ curve_trade: "curve_trade";
47
+ graduation: "graduation";
48
+ whale_trade: "whale_trade";
49
+ }>>>;
50
+ launchpads: z.ZodDefault<z.ZodArray<z.ZodEnum<{
51
+ noxa: "noxa";
52
+ odyssey: "odyssey";
53
+ }>>>;
54
+ minUsd: z.ZodOptional<z.ZodNumber>;
55
+ maxUsd: z.ZodOptional<z.ZodNumber>;
56
+ minLiquidityUsd: z.ZodOptional<z.ZodNumber>;
57
+ maxLiquidityUsd: z.ZodOptional<z.ZodNumber>;
58
+ tokens: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
59
+ deployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
60
+ excludeDeployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
61
+ side: z.ZodDefault<z.ZodEnum<{
62
+ buy: "buy";
63
+ sell: "sell";
64
+ any: "any";
65
+ }>>;
66
+ reputation: z.ZodOptional<z.ZodObject<{
67
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
68
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
69
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
70
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
71
+ }, z.core.$strict>>;
72
+ rateLimit: z.ZodOptional<z.ZodObject<{
73
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
74
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strict>>;
76
+ }, z.core.$strict>;
77
+ /** A validated rule. */
78
+ type Rule = z.output<typeof ruleSchema>;
79
+ /** A rule as accepted on input, before defaults are applied. */
80
+ type RuleInput = z.input<typeof ruleSchema>;
81
+ /** Validated reputation filter. */
82
+ type ReputationFilter = z.output<typeof reputationFilterSchema>;
83
+ /** Validated rate limit block. */
84
+ type RateLimitConfig = z.output<typeof rateLimitSchema>;
85
+ /** Delivery platforms a subscription can target. */
86
+ declare const platformSchema: z.ZodEnum<{
87
+ telegram: "telegram";
88
+ discord: "discord";
89
+ }>;
90
+ /** A delivery platform. */
91
+ type Platform = z.output<typeof platformSchema>;
92
+ /** A subscription: one delivery target plus the rules that feed it. */
93
+ declare const subscriptionSchema: z.ZodObject<{
94
+ id: z.ZodString;
95
+ subscriberId: z.ZodString;
96
+ platform: z.ZodEnum<{
97
+ telegram: "telegram";
98
+ discord: "discord";
99
+ }>;
100
+ target: z.ZodString;
101
+ enabled: z.ZodDefault<z.ZodBoolean>;
102
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
103
+ id: z.ZodString;
104
+ name: z.ZodOptional<z.ZodString>;
105
+ enabled: z.ZodDefault<z.ZodBoolean>;
106
+ kinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
107
+ launch: "launch";
108
+ curve_trade: "curve_trade";
109
+ graduation: "graduation";
110
+ whale_trade: "whale_trade";
111
+ }>>>;
112
+ launchpads: z.ZodDefault<z.ZodArray<z.ZodEnum<{
113
+ noxa: "noxa";
114
+ odyssey: "odyssey";
115
+ }>>>;
116
+ minUsd: z.ZodOptional<z.ZodNumber>;
117
+ maxUsd: z.ZodOptional<z.ZodNumber>;
118
+ minLiquidityUsd: z.ZodOptional<z.ZodNumber>;
119
+ maxLiquidityUsd: z.ZodOptional<z.ZodNumber>;
120
+ tokens: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
121
+ deployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
122
+ excludeDeployers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
123
+ side: z.ZodDefault<z.ZodEnum<{
124
+ buy: "buy";
125
+ sell: "sell";
126
+ any: "any";
127
+ }>>;
128
+ reputation: z.ZodOptional<z.ZodObject<{
129
+ minPriorLaunches: z.ZodOptional<z.ZodNumber>;
130
+ maxPriorLaunches: z.ZodOptional<z.ZodNumber>;
131
+ maxRuggedLaunches: z.ZodOptional<z.ZodNumber>;
132
+ requireLpLocked: z.ZodOptional<z.ZodBoolean>;
133
+ }, z.core.$strict>>;
134
+ rateLimit: z.ZodOptional<z.ZodObject<{
135
+ maxPerHour: z.ZodOptional<z.ZodNumber>;
136
+ minIntervalSeconds: z.ZodOptional<z.ZodNumber>;
137
+ }, z.core.$strict>>;
138
+ }, z.core.$strict>>>;
139
+ createdAtMs: z.ZodNumber;
140
+ }, z.core.$strict>;
141
+ /** A validated subscription. */
142
+ type Subscription = z.output<typeof subscriptionSchema>;
143
+ /** A subscription as accepted on input. */
144
+ type SubscriptionInput = z.input<typeof subscriptionSchema>;
145
+ /** Can a launchpad emit this event kind at all? */
146
+ declare function canEmit(launchpad: Launchpad, kind: AlertEventKind): boolean;
147
+ /**
148
+ * How many filters a rule actually uses. The tier policy caps this so free
149
+ * subscribers get real filtering without turning the service into an unpaid
150
+ * on-chain query engine.
151
+ */
152
+ declare function ruleComplexity(rule: Rule): number;
153
+ /** Filters that cost an extra on-chain read per candidate event. */
154
+ declare function usesOnChainLookups(rule: Rule): boolean;
155
+ /**
156
+ * Parse and validate a rule, applying defaults.
157
+ *
158
+ * @throws {@link z.ZodError} with a field-level message the bot renders back
159
+ * to the user verbatim.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const rule = parseRule({ id: 'whales', kinds: ['whale_trade'], minUsd: 5000 })
164
+ * console.log(rule.launchpads) // ['noxa', 'odyssey'] (defaulted)
165
+ * ```
166
+ */
167
+ declare function parseRule(input: unknown): Rule;
168
+ /** Non-throwing {@link parseRule}. */
169
+ declare function safeParseRule(input: unknown): z.ZodSafeParseResult<Rule>;
170
+ /** Parse and validate a subscription. */
171
+ declare function parseSubscription(input: unknown): Subscription;
172
+ /** Non-throwing {@link parseSubscription}. */
173
+ declare function safeParseSubscription(input: unknown): z.ZodSafeParseResult<Subscription>;
174
+ /**
175
+ * Render a Zod error as one line of human-readable text, for bot replies.
176
+ * A user who typed `/threshold abc` gets "minUsd: expected number", not a
177
+ * stack trace and not a silent failure.
178
+ */
179
+ declare function formatValidationError(error: z.ZodError): string;
180
+ /** A ready-to-use starter rule set, used by `/subscribe` before any editing. */
181
+ declare function defaultRules(): Rule[];
182
+
183
+ export { type Platform as P, type RateLimitConfig as R, type Subscription as S, type ReputationFilter as a, type Rule as b, type RuleInput as c, type SubscriptionInput as d, addressSchema as e, canEmit as f, defaultRules as g, eventKindSchema as h, formatValidationError as i, parseSubscription as j, platformSchema as k, launchpadSchema as l, reputationFilterSchema as m, ruleComplexity as n, ruleSchema as o, parseRule as p, safeParseSubscription as q, rateLimitSchema as r, safeParseRule as s, sideSchema as t, subscriptionSchema as u, usesOnChainLookups as v };