@beeperbot/sdk 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.
- package/dist/index.cjs +3355 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4480 -0
- package/dist/index.d.ts +4480 -0
- package/dist/index.js +3202 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4480 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* API Base URLs for different environments
|
|
5
|
+
*/
|
|
6
|
+
declare const API_BASE_URLS: {
|
|
7
|
+
readonly production: "https://beep.works/api/v1/sdk";
|
|
8
|
+
readonly staging: "https://staging.beep.works/api/v1/sdk";
|
|
9
|
+
readonly development: "http://localhost:3000/api/v1/sdk";
|
|
10
|
+
};
|
|
11
|
+
type Environment = keyof typeof API_BASE_URLS;
|
|
12
|
+
/**
|
|
13
|
+
* Default timeout values in milliseconds
|
|
14
|
+
*/
|
|
15
|
+
declare const TIMEOUTS: {
|
|
16
|
+
/** Default request timeout */
|
|
17
|
+
readonly DEFAULT: 30000;
|
|
18
|
+
/** Timeout for quote requests */
|
|
19
|
+
readonly QUOTE: 10000;
|
|
20
|
+
/** Timeout for execute requests (longer due to blockchain) */
|
|
21
|
+
readonly EXECUTE: 60000;
|
|
22
|
+
/** Timeout for health checks */
|
|
23
|
+
readonly HEALTH: 5000;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* API Endpoints
|
|
27
|
+
*/
|
|
28
|
+
declare const ENDPOINTS: {
|
|
29
|
+
readonly HEALTH: "/send/health";
|
|
30
|
+
readonly QUOTES: "/send/quotes";
|
|
31
|
+
readonly KEYS: "/keys";
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* HTTP Headers
|
|
35
|
+
*/
|
|
36
|
+
declare const HEADERS: {
|
|
37
|
+
readonly IDEMPOTENCY_KEY: "Idempotency-Key";
|
|
38
|
+
readonly AUTHORIZATION: "Authorization";
|
|
39
|
+
readonly REQUEST_ID: "X-Request-Id";
|
|
40
|
+
readonly CONTENT_TYPE: "Content-Type";
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Retry configuration
|
|
44
|
+
*/
|
|
45
|
+
declare const RETRY_CONFIG: {
|
|
46
|
+
/** Maximum number of retry attempts */
|
|
47
|
+
readonly MAX_RETRIES: 3;
|
|
48
|
+
/** Initial delay before first retry (1 second) */
|
|
49
|
+
readonly INITIAL_DELAY_MS: 1000;
|
|
50
|
+
/** Maximum delay between retries (30 seconds) */
|
|
51
|
+
readonly MAX_DELAY_MS: 30000;
|
|
52
|
+
/** Multiplier for exponential backoff */
|
|
53
|
+
readonly BACKOFF_MULTIPLIER: 2;
|
|
54
|
+
/** Jitter factor to add randomness (0-1) */
|
|
55
|
+
readonly JITTER_FACTOR: 0.1;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Quote expiration time in seconds
|
|
59
|
+
*/
|
|
60
|
+
declare const QUOTE_EXPIRATION_SECONDS = 300;
|
|
61
|
+
/**
|
|
62
|
+
* SDK Version
|
|
63
|
+
*/
|
|
64
|
+
declare const SDK_VERSION = "0.1.0";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Filter Schema for LLM/Agent consumption
|
|
68
|
+
*
|
|
69
|
+
* Provides structured descriptions of all available filters
|
|
70
|
+
* that can be used by LLMs to understand and construct filter queries.
|
|
71
|
+
*/
|
|
72
|
+
interface FilterFieldSchema {
|
|
73
|
+
/** Field name */
|
|
74
|
+
name: string;
|
|
75
|
+
/** Human-readable description */
|
|
76
|
+
description: string;
|
|
77
|
+
/** Data type */
|
|
78
|
+
type: 'number' | 'string' | 'boolean' | 'array' | 'object';
|
|
79
|
+
/** Example value */
|
|
80
|
+
example: unknown;
|
|
81
|
+
/** Whether this field is required */
|
|
82
|
+
required?: boolean;
|
|
83
|
+
/** Minimum value (for numbers) */
|
|
84
|
+
min?: number;
|
|
85
|
+
/** Maximum value (for numbers) */
|
|
86
|
+
max?: number;
|
|
87
|
+
/** Allowed values (for enums) */
|
|
88
|
+
enum?: string[];
|
|
89
|
+
/** Item type (for arrays) */
|
|
90
|
+
items?: FilterFieldSchema;
|
|
91
|
+
/** Nested schema (for objects) */
|
|
92
|
+
properties?: Record<string, FilterFieldSchema>;
|
|
93
|
+
}
|
|
94
|
+
interface FilterCategory {
|
|
95
|
+
/** Category name */
|
|
96
|
+
name: string;
|
|
97
|
+
/** Category description */
|
|
98
|
+
description: string;
|
|
99
|
+
/** Filters in this category */
|
|
100
|
+
filters: FilterFieldSchema[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Complete filter schema organized by category
|
|
104
|
+
*/
|
|
105
|
+
declare const FILTER_SCHEMA: FilterCategory[];
|
|
106
|
+
/**
|
|
107
|
+
* Get a flat list of all filter names
|
|
108
|
+
*/
|
|
109
|
+
declare function getAllFilterNames(): string[];
|
|
110
|
+
/**
|
|
111
|
+
* Get schema for a specific filter
|
|
112
|
+
*/
|
|
113
|
+
declare function getFilterSchema(name: string): FilterFieldSchema | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Generate a markdown description of all filters (for LLM prompts)
|
|
116
|
+
*/
|
|
117
|
+
declare function generateFilterDocumentation(): string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* AgentClient - Simplified SDK for AI agents
|
|
121
|
+
*
|
|
122
|
+
* Provides a minimal API surface for agents to:
|
|
123
|
+
* 1. Look up users (username/fid → address)
|
|
124
|
+
* 2. Get attention prices
|
|
125
|
+
* 3. Create payment intents
|
|
126
|
+
*
|
|
127
|
+
* Agents create intents, users execute payments from any wallet.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* import { AgentClient } from '@beeper/sdk';
|
|
132
|
+
*
|
|
133
|
+
* const agent = new AgentClient({
|
|
134
|
+
* apiKey: process.env.BEEPER_API_KEY,
|
|
135
|
+
* });
|
|
136
|
+
*
|
|
137
|
+
* // Look up a user
|
|
138
|
+
* const user = await agent.lookup('dwr.eth');
|
|
139
|
+
*
|
|
140
|
+
* // Create a payment intent
|
|
141
|
+
* const intent = await agent.createIntent({
|
|
142
|
+
* to: 'dwr.eth',
|
|
143
|
+
* amount: '$5',
|
|
144
|
+
* message: 'Thanks for the help!',
|
|
145
|
+
* });
|
|
146
|
+
*
|
|
147
|
+
* // Agent tells user:
|
|
148
|
+
* // "Send 5 USDC to 0x1234... on Base"
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
/** Agent client configuration */
|
|
153
|
+
interface AgentClientConfig {
|
|
154
|
+
/** API key for authentication */
|
|
155
|
+
apiKey: string;
|
|
156
|
+
/** Environment (production, staging, development) */
|
|
157
|
+
environment?: Environment;
|
|
158
|
+
/** Custom base URL (overrides environment) */
|
|
159
|
+
baseUrl?: string;
|
|
160
|
+
/** Request timeout in milliseconds */
|
|
161
|
+
timeoutMs?: number;
|
|
162
|
+
/** Custom fetch implementation */
|
|
163
|
+
fetch?: typeof fetch;
|
|
164
|
+
/** Enable debug logging */
|
|
165
|
+
debug?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** User lookup result */
|
|
168
|
+
interface User {
|
|
169
|
+
/** Internal user ID */
|
|
170
|
+
id: string;
|
|
171
|
+
/** Farcaster ID (if applicable) */
|
|
172
|
+
fid?: number;
|
|
173
|
+
/** Username */
|
|
174
|
+
username: string;
|
|
175
|
+
/** Display name */
|
|
176
|
+
displayName?: string;
|
|
177
|
+
/** Profile picture URL */
|
|
178
|
+
pfpUrl?: string;
|
|
179
|
+
/** Platform (farcaster, twitter, etc.) */
|
|
180
|
+
platform: string;
|
|
181
|
+
/** Verified wallet address for receiving payments */
|
|
182
|
+
walletAddress?: string;
|
|
183
|
+
/** Current attention price in USD */
|
|
184
|
+
attentionPriceUsd: string;
|
|
185
|
+
/** User's follower count */
|
|
186
|
+
followerCount?: number;
|
|
187
|
+
/** User's Neynar score (0-1) */
|
|
188
|
+
neynarScore?: number;
|
|
189
|
+
}
|
|
190
|
+
/** Payment intent - the instruction for the user to execute */
|
|
191
|
+
interface PaymentIntent {
|
|
192
|
+
/** Unique intent ID for tracking */
|
|
193
|
+
intentId: string;
|
|
194
|
+
/** Recipient wallet address */
|
|
195
|
+
recipient: string;
|
|
196
|
+
/** Amount in token's smallest unit (e.g., USDC has 6 decimals) */
|
|
197
|
+
amount: string;
|
|
198
|
+
/** Amount formatted for display (e.g., "5.00 USDC") */
|
|
199
|
+
amountFormatted: string;
|
|
200
|
+
/** Token contract address */
|
|
201
|
+
tokenAddress: string;
|
|
202
|
+
/** Token symbol (e.g., "USDC") */
|
|
203
|
+
tokenSymbol: string;
|
|
204
|
+
/** Token decimals */
|
|
205
|
+
tokenDecimals: number;
|
|
206
|
+
/** Chain ID (e.g., 8453 for Base) */
|
|
207
|
+
chainId: number;
|
|
208
|
+
/** Chain name for display */
|
|
209
|
+
chainName: string;
|
|
210
|
+
/** Optional message/memo */
|
|
211
|
+
message?: string;
|
|
212
|
+
/** Resolved recipient info */
|
|
213
|
+
recipientInfo: {
|
|
214
|
+
username: string;
|
|
215
|
+
displayName?: string;
|
|
216
|
+
fid?: number;
|
|
217
|
+
};
|
|
218
|
+
/** Human-readable instruction */
|
|
219
|
+
instruction: string;
|
|
220
|
+
/** Deep link to beep.works (optional, for convenience) */
|
|
221
|
+
deepLink?: string;
|
|
222
|
+
/** Expiration timestamp */
|
|
223
|
+
expiresAt: string;
|
|
224
|
+
}
|
|
225
|
+
/** Input for creating a payment intent */
|
|
226
|
+
interface CreateIntentInput {
|
|
227
|
+
/** Recipient identifier (username, fid, or address) */
|
|
228
|
+
to: string | number;
|
|
229
|
+
/** Amount in USD (e.g., "$5", "5", or "5.00") */
|
|
230
|
+
amount: string;
|
|
231
|
+
/** Optional message to include */
|
|
232
|
+
message?: string;
|
|
233
|
+
/** Preferred chain (defaults to Base) */
|
|
234
|
+
chainId?: number;
|
|
235
|
+
/** Preferred token (defaults to USDC) */
|
|
236
|
+
tokenSymbol?: string;
|
|
237
|
+
}
|
|
238
|
+
/** Attention price info */
|
|
239
|
+
interface AttentionPrice {
|
|
240
|
+
/** User identifier */
|
|
241
|
+
userId: string;
|
|
242
|
+
/** Username */
|
|
243
|
+
username: string;
|
|
244
|
+
/** Current attention price in USD */
|
|
245
|
+
priceUsd: string;
|
|
246
|
+
/** Price in USDC smallest unit */
|
|
247
|
+
priceUsdc: string;
|
|
248
|
+
/** Minimum price for guaranteed delivery */
|
|
249
|
+
minimumPriceUsd: string;
|
|
250
|
+
}
|
|
251
|
+
/** Simple JSON-based filter input (agent-friendly) */
|
|
252
|
+
interface SimpleFilters {
|
|
253
|
+
platform?: 'all' | 'farcaster' | 'twitter';
|
|
254
|
+
activeInLastDays?: number;
|
|
255
|
+
minCastCount?: number;
|
|
256
|
+
neynarScoreMin?: number;
|
|
257
|
+
neynarScoreMax?: number;
|
|
258
|
+
quotientScoreMin?: number;
|
|
259
|
+
quotientScoreMax?: number;
|
|
260
|
+
spamLabel?: 'not_spam_only' | 'spam_only' | 'all';
|
|
261
|
+
verifiedOnly?: boolean;
|
|
262
|
+
minFollowers?: number;
|
|
263
|
+
maxFollowers?: number;
|
|
264
|
+
followersOf?: number;
|
|
265
|
+
mutualsWith?: number;
|
|
266
|
+
signalTokens?: string[];
|
|
267
|
+
tokenHolders?: Array<{
|
|
268
|
+
tokenAddress: string;
|
|
269
|
+
chainId: number;
|
|
270
|
+
minBalance?: string;
|
|
271
|
+
}>;
|
|
272
|
+
hasBaseWallet?: boolean;
|
|
273
|
+
hasVerifiedWallet?: boolean;
|
|
274
|
+
maxAttentionPriceUsd?: number;
|
|
275
|
+
minBatteryPercentage?: number;
|
|
276
|
+
hasRechargedInLastDays?: number;
|
|
277
|
+
excludePingedToday?: boolean;
|
|
278
|
+
countries?: string[];
|
|
279
|
+
timezones?: Array<{
|
|
280
|
+
offset: number;
|
|
281
|
+
range?: number;
|
|
282
|
+
}>;
|
|
283
|
+
fids?: number[];
|
|
284
|
+
userIds?: string[];
|
|
285
|
+
orderBy?: 'attention_price_asc' | 'attention_price_desc' | 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'recent_activity' | 'battery_desc' | 'random';
|
|
286
|
+
}
|
|
287
|
+
/** Estimate request input */
|
|
288
|
+
interface EstimateInput {
|
|
289
|
+
/** Filter criteria */
|
|
290
|
+
filters: SimpleFilters;
|
|
291
|
+
/** Budget in USD (e.g., "$100" or "100") */
|
|
292
|
+
budget: string;
|
|
293
|
+
/** Optional message to include (affects cost) */
|
|
294
|
+
message?: string;
|
|
295
|
+
}
|
|
296
|
+
/** Estimate result */
|
|
297
|
+
interface EstimateResult {
|
|
298
|
+
/** Number of recipients matching filters within budget */
|
|
299
|
+
recipientCount: number;
|
|
300
|
+
/** Total cost in USD */
|
|
301
|
+
totalCostUsd: string;
|
|
302
|
+
/** Average price per recipient */
|
|
303
|
+
avgPriceUsd: string;
|
|
304
|
+
/** Minimum price in result set */
|
|
305
|
+
minPriceUsd: string;
|
|
306
|
+
/** Maximum price in result set */
|
|
307
|
+
maxPriceUsd: string;
|
|
308
|
+
/** Budget remaining after all recipients */
|
|
309
|
+
remainingBudgetUsd: string;
|
|
310
|
+
/** Whether budget is sufficient for at least one recipient */
|
|
311
|
+
budgetSufficient: boolean;
|
|
312
|
+
}
|
|
313
|
+
/** Preview request input */
|
|
314
|
+
interface PreviewInput {
|
|
315
|
+
/** Filter criteria */
|
|
316
|
+
filters: SimpleFilters;
|
|
317
|
+
/** Number of users to preview (max 20) */
|
|
318
|
+
limit?: number;
|
|
319
|
+
}
|
|
320
|
+
/** Preview user */
|
|
321
|
+
interface PreviewUser {
|
|
322
|
+
/** Username */
|
|
323
|
+
username: string;
|
|
324
|
+
/** Display name */
|
|
325
|
+
displayName?: string;
|
|
326
|
+
/** Farcaster ID */
|
|
327
|
+
fid?: number;
|
|
328
|
+
/** Attention price in USD */
|
|
329
|
+
priceUsd: string;
|
|
330
|
+
/** Follower count */
|
|
331
|
+
followerCount?: number;
|
|
332
|
+
/** Neynar score */
|
|
333
|
+
neynarScore?: number;
|
|
334
|
+
/** Profile picture URL */
|
|
335
|
+
pfpUrl?: string;
|
|
336
|
+
}
|
|
337
|
+
/** Preview result */
|
|
338
|
+
interface PreviewResult {
|
|
339
|
+
/** Sample users matching filters */
|
|
340
|
+
users: PreviewUser[];
|
|
341
|
+
/** Total count of matching users (not just preview) */
|
|
342
|
+
totalCount: number;
|
|
343
|
+
/** Whether there are more users beyond the preview */
|
|
344
|
+
hasMore: boolean;
|
|
345
|
+
}
|
|
346
|
+
/** Bulk intent input */
|
|
347
|
+
interface BulkIntentInput {
|
|
348
|
+
/** Filter criteria (will create intents for all matching users) */
|
|
349
|
+
filters: SimpleFilters;
|
|
350
|
+
/** Budget in USD */
|
|
351
|
+
budget: string;
|
|
352
|
+
/** Message to include */
|
|
353
|
+
message?: string;
|
|
354
|
+
/** Chain ID (default: Base = 8453) */
|
|
355
|
+
chainId?: number;
|
|
356
|
+
}
|
|
357
|
+
/** Bulk intent result */
|
|
358
|
+
interface BulkIntentResult {
|
|
359
|
+
/** Unique bulk intent ID */
|
|
360
|
+
bulkIntentId: string;
|
|
361
|
+
/** Total number of recipients */
|
|
362
|
+
recipientCount: number;
|
|
363
|
+
/** Total amount in USDC smallest unit */
|
|
364
|
+
totalAmount: string;
|
|
365
|
+
/** Total amount formatted */
|
|
366
|
+
totalAmountFormatted: string;
|
|
367
|
+
/** Individual payment instructions */
|
|
368
|
+
payments: Array<{
|
|
369
|
+
recipient: string;
|
|
370
|
+
amount: string;
|
|
371
|
+
username: string;
|
|
372
|
+
}>;
|
|
373
|
+
/** Human-readable summary */
|
|
374
|
+
summary: string;
|
|
375
|
+
/** Chain info */
|
|
376
|
+
chainId: number;
|
|
377
|
+
chainName: string;
|
|
378
|
+
tokenAddress: string;
|
|
379
|
+
tokenSymbol: string;
|
|
380
|
+
/** Expiration */
|
|
381
|
+
expiresAt: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* AgentClient - Simplified client for AI agents
|
|
385
|
+
*
|
|
386
|
+
* Focuses on the core agent workflow:
|
|
387
|
+
* 1. Look up users
|
|
388
|
+
* 2. Check prices
|
|
389
|
+
* 3. Create payment intents
|
|
390
|
+
*/
|
|
391
|
+
declare class AgentClient {
|
|
392
|
+
private readonly http;
|
|
393
|
+
private readonly _debug;
|
|
394
|
+
constructor(config: AgentClientConfig);
|
|
395
|
+
/**
|
|
396
|
+
* Look up a user by username, FID, or wallet address
|
|
397
|
+
*
|
|
398
|
+
* @param identifier - Username (e.g., "dwr.eth"), FID (e.g., 3), or address
|
|
399
|
+
* @returns User information including wallet address and attention price
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```typescript
|
|
403
|
+
* const user = await agent.lookup('dwr.eth');
|
|
404
|
+
* console.log(user.walletAddress); // "0x1234..."
|
|
405
|
+
* console.log(user.attentionPriceUsd); // "0.05"
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
lookup(identifier: string | number): Promise<User>;
|
|
409
|
+
/**
|
|
410
|
+
* Get the attention price for a user
|
|
411
|
+
*
|
|
412
|
+
* @param identifier - Username, FID, or address
|
|
413
|
+
* @returns Current attention price information
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```typescript
|
|
417
|
+
* const price = await agent.getPrice('dwr.eth');
|
|
418
|
+
* console.log(`Attention price: ${price.priceUsd}`);
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
getPrice(identifier: string | number): Promise<AttentionPrice>;
|
|
422
|
+
/**
|
|
423
|
+
* Create a payment intent
|
|
424
|
+
*
|
|
425
|
+
* This does NOT execute the payment. It returns the information
|
|
426
|
+
* needed for the user to execute the payment from any wallet.
|
|
427
|
+
*
|
|
428
|
+
* @param input - Payment intent parameters
|
|
429
|
+
* @returns Payment intent with recipient address and amount
|
|
430
|
+
*
|
|
431
|
+
* @example
|
|
432
|
+
* ```typescript
|
|
433
|
+
* const intent = await agent.createIntent({
|
|
434
|
+
* to: 'dwr.eth',
|
|
435
|
+
* amount: '$5',
|
|
436
|
+
* message: 'Thanks!',
|
|
437
|
+
* });
|
|
438
|
+
*
|
|
439
|
+
* // Tell the user:
|
|
440
|
+
* console.log(intent.instruction);
|
|
441
|
+
* // "Send 5 USDC to 0x1234... on Base"
|
|
442
|
+
* ```
|
|
443
|
+
*/
|
|
444
|
+
createIntent(input: CreateIntentInput): Promise<PaymentIntent>;
|
|
445
|
+
/**
|
|
446
|
+
* Convenience method to create a human-readable payment instruction
|
|
447
|
+
*
|
|
448
|
+
* @param input - Payment intent parameters
|
|
449
|
+
* @returns Human-readable instruction string
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```typescript
|
|
453
|
+
* const instruction = await agent.getPaymentInstruction({
|
|
454
|
+
* to: 'dwr.eth',
|
|
455
|
+
* amount: '$5',
|
|
456
|
+
* });
|
|
457
|
+
* // "Send 5 USDC to 0x1a2b3c... on Base (to @dwr)"
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
getPaymentInstruction(input: CreateIntentInput): Promise<string>;
|
|
461
|
+
/**
|
|
462
|
+
* Estimate how many recipients match filters within a budget
|
|
463
|
+
*
|
|
464
|
+
* @param input - Filters and budget
|
|
465
|
+
* @returns Estimate with recipient count, costs, and budget analysis
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```typescript
|
|
469
|
+
* const estimate = await agent.estimate({
|
|
470
|
+
* filters: {
|
|
471
|
+
* platform: 'farcaster',
|
|
472
|
+
* minFollowers: 1000,
|
|
473
|
+
* signalTokens: ['0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed'],
|
|
474
|
+
* },
|
|
475
|
+
* budget: '$100',
|
|
476
|
+
* });
|
|
477
|
+
* console.log(`Can reach ${estimate.recipientCount} people`);
|
|
478
|
+
* console.log(`Total cost: ${estimate.totalCostUsd}`);
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
estimate(input: EstimateInput): Promise<EstimateResult>;
|
|
482
|
+
/**
|
|
483
|
+
* Preview sample users matching filters
|
|
484
|
+
*
|
|
485
|
+
* @param input - Filters and limit
|
|
486
|
+
* @returns Sample users and total count
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
* ```typescript
|
|
490
|
+
* const preview = await agent.preview({
|
|
491
|
+
* filters: { minFollowers: 1000 },
|
|
492
|
+
* limit: 5,
|
|
493
|
+
* });
|
|
494
|
+
* console.log(`Found ${preview.totalCount} users`);
|
|
495
|
+
* preview.users.forEach(u => {
|
|
496
|
+
* console.log(`@${u.username} - ${u.priceUsd}`);
|
|
497
|
+
* });
|
|
498
|
+
* ```
|
|
499
|
+
*/
|
|
500
|
+
preview(input: PreviewInput): Promise<PreviewResult>;
|
|
501
|
+
/**
|
|
502
|
+
* Create bulk payment intents for multiple recipients
|
|
503
|
+
*
|
|
504
|
+
* @param input - Filters, budget, and message
|
|
505
|
+
* @returns Bulk intent with all payment instructions
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* ```typescript
|
|
509
|
+
* const bulk = await agent.createBulkIntent({
|
|
510
|
+
* filters: { signalTokens: ['0x...'] },
|
|
511
|
+
* budget: '$100',
|
|
512
|
+
* message: 'GM holders!',
|
|
513
|
+
* });
|
|
514
|
+
* console.log(bulk.summary);
|
|
515
|
+
* // "Send to 50 recipients for total 45.00 USDC on Base"
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
createBulkIntent(input: BulkIntentInput): Promise<BulkIntentResult>;
|
|
519
|
+
/**
|
|
520
|
+
* Get filter schema documentation for LLMs
|
|
521
|
+
*
|
|
522
|
+
* Returns structured information about all available filters
|
|
523
|
+
* that can be used in system prompts or tool descriptions.
|
|
524
|
+
*
|
|
525
|
+
* @returns Filter schema categories
|
|
526
|
+
*
|
|
527
|
+
* @example
|
|
528
|
+
* ```typescript
|
|
529
|
+
* const schema = agent.describeFilters();
|
|
530
|
+
* // Use in LLM prompt:
|
|
531
|
+
* // "Available filters: " + JSON.stringify(schema)
|
|
532
|
+
* ```
|
|
533
|
+
*/
|
|
534
|
+
describeFilters(): FilterCategory[];
|
|
535
|
+
/**
|
|
536
|
+
* Get filter documentation as markdown
|
|
537
|
+
*
|
|
538
|
+
* Useful for including in LLM system prompts.
|
|
539
|
+
*
|
|
540
|
+
* @returns Markdown documentation of all filters
|
|
541
|
+
*
|
|
542
|
+
* @example
|
|
543
|
+
* ```typescript
|
|
544
|
+
* const docs = agent.getFilterDocumentation();
|
|
545
|
+
* // Include in system prompt for LLM
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
getFilterDocumentation(): string;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* BeeperClient - Main SDK client for the Beeper API
|
|
553
|
+
*
|
|
554
|
+
* Handles quote creation, deposit confirmation, execution triggering,
|
|
555
|
+
* and receipt polling while keeping all pricing/fee logic server-side.
|
|
556
|
+
*/
|
|
557
|
+
|
|
558
|
+
/** Filter expression for recipient selection */
|
|
559
|
+
type FilterExpression$2 = Record<string, unknown>;
|
|
560
|
+
/** Draft input for creating a send */
|
|
561
|
+
interface DraftInput$1 {
|
|
562
|
+
filter: FilterExpression$2;
|
|
563
|
+
tokenAddress: string;
|
|
564
|
+
chainId: number;
|
|
565
|
+
amountPerRecipient: string;
|
|
566
|
+
budgetCap: string;
|
|
567
|
+
memo?: string | undefined;
|
|
568
|
+
metadata?: Record<string, unknown> | undefined;
|
|
569
|
+
}
|
|
570
|
+
/** Local draft object (not yet quoted) */
|
|
571
|
+
interface Draft$2 {
|
|
572
|
+
id: string;
|
|
573
|
+
input: DraftInput$1;
|
|
574
|
+
createdAt: string;
|
|
575
|
+
}
|
|
576
|
+
/** Quote status values */
|
|
577
|
+
type QuoteStatus$2 = 'pending' | 'deposit_confirmed' | 'executing' | 'completed' | 'expired' | 'failed';
|
|
578
|
+
/** Server-generated quote with pricing */
|
|
579
|
+
interface Quote$1 {
|
|
580
|
+
id: string;
|
|
581
|
+
status: QuoteStatus$2;
|
|
582
|
+
recipientCount: number;
|
|
583
|
+
totalAmount: string;
|
|
584
|
+
protocolFee: string;
|
|
585
|
+
depositAmount: string;
|
|
586
|
+
depositAddress: string;
|
|
587
|
+
depositChainId: number;
|
|
588
|
+
depositTokenAddress: string;
|
|
589
|
+
expiresAt: string;
|
|
590
|
+
input: DraftInput$1;
|
|
591
|
+
createdAt: string;
|
|
592
|
+
updatedAt: string;
|
|
593
|
+
}
|
|
594
|
+
/** Options for creating a quote */
|
|
595
|
+
interface QuoteOptions$1 {
|
|
596
|
+
ttlSeconds?: number;
|
|
597
|
+
}
|
|
598
|
+
/** Reward type for attention marketplace */
|
|
599
|
+
type RewardType$1 = 'guaranteed' | 'lottery' | 'fcfs';
|
|
600
|
+
/** Input for creating an attention marketplace quote */
|
|
601
|
+
interface AttentionQuoteInput {
|
|
602
|
+
/** The message to send (1-1000 chars) */
|
|
603
|
+
message: string;
|
|
604
|
+
/** Target specific FIDs (optional, max 1000) */
|
|
605
|
+
recipientFids?: number[];
|
|
606
|
+
/** Filter expression for targeting (optional, used if recipientFids not provided) */
|
|
607
|
+
filter?: FilterExpression$2;
|
|
608
|
+
/** Budget in USD (e.g., "10.00") */
|
|
609
|
+
budgetUSD: string;
|
|
610
|
+
/** Reward type: guaranteed (default), lottery, or fcfs */
|
|
611
|
+
rewardType?: RewardType$1;
|
|
612
|
+
/** Optional memo (max 256 chars) */
|
|
613
|
+
memo?: string;
|
|
614
|
+
/** Optional metadata (max 4KB JSON) */
|
|
615
|
+
metadata?: Record<string, unknown>;
|
|
616
|
+
}
|
|
617
|
+
/** Attention marketplace quote response */
|
|
618
|
+
interface AttentionQuote {
|
|
619
|
+
id: string;
|
|
620
|
+
status: QuoteStatus$2;
|
|
621
|
+
recipientCount: number;
|
|
622
|
+
/** Total amount in USD (may be undefined for token-based quotes) */
|
|
623
|
+
totalAmountUSD?: string;
|
|
624
|
+
/** Protocol fee in USD */
|
|
625
|
+
protocolFeeUSD?: string;
|
|
626
|
+
/** Deposit amount in USD */
|
|
627
|
+
depositAmountUSD?: string;
|
|
628
|
+
/** Total amount in wei (for token-based quotes) */
|
|
629
|
+
totalAmount?: string;
|
|
630
|
+
/** Protocol fee in wei */
|
|
631
|
+
protocolFee?: string;
|
|
632
|
+
/** Deposit amount in wei */
|
|
633
|
+
depositAmount?: string;
|
|
634
|
+
/** Deposit address */
|
|
635
|
+
depositAddress?: string;
|
|
636
|
+
/** Deposit chain ID */
|
|
637
|
+
depositChainId?: number;
|
|
638
|
+
/** Deposit token address */
|
|
639
|
+
depositTokenAddress?: string;
|
|
640
|
+
expiresAt: string;
|
|
641
|
+
input: Record<string, unknown>;
|
|
642
|
+
createdAt: string;
|
|
643
|
+
updatedAt: string;
|
|
644
|
+
}
|
|
645
|
+
/** Result of deposit confirmation */
|
|
646
|
+
interface ConfirmResult {
|
|
647
|
+
quoteId: string;
|
|
648
|
+
status: 'confirmed' | 'pending_verification';
|
|
649
|
+
detectedAmount: string;
|
|
650
|
+
sufficient: boolean;
|
|
651
|
+
blockNumber: number;
|
|
652
|
+
confirmedAt: string;
|
|
653
|
+
}
|
|
654
|
+
/** Result of execution trigger */
|
|
655
|
+
interface ExecuteResult$1 {
|
|
656
|
+
quoteId: string;
|
|
657
|
+
status: 'executing' | 'queued';
|
|
658
|
+
estimatedCompletionAt: string;
|
|
659
|
+
batchId: string;
|
|
660
|
+
}
|
|
661
|
+
/** Individual transaction in a receipt */
|
|
662
|
+
interface ReceiptTransaction$1 {
|
|
663
|
+
recipient: string;
|
|
664
|
+
amount: string;
|
|
665
|
+
txHash: string | null;
|
|
666
|
+
status: 'success' | 'failed';
|
|
667
|
+
error?: string | undefined;
|
|
668
|
+
}
|
|
669
|
+
/** Final receipt after execution */
|
|
670
|
+
interface Receipt$1 {
|
|
671
|
+
quoteId: string;
|
|
672
|
+
status: 'completed' | 'partial' | 'failed';
|
|
673
|
+
successCount: number;
|
|
674
|
+
failureCount: number;
|
|
675
|
+
totalSent: string;
|
|
676
|
+
refundAmount: string;
|
|
677
|
+
refundTxHash?: string | undefined;
|
|
678
|
+
transactions: ReceiptTransaction$1[];
|
|
679
|
+
completedAt: string;
|
|
680
|
+
}
|
|
681
|
+
/** API health status */
|
|
682
|
+
interface Health$1 {
|
|
683
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
684
|
+
version: string;
|
|
685
|
+
timestamp: string;
|
|
686
|
+
services: {
|
|
687
|
+
database: 'up' | 'down';
|
|
688
|
+
queue: 'up' | 'down';
|
|
689
|
+
oracle: 'up' | 'down';
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
/** Client configuration */
|
|
693
|
+
interface BeeperClientConfig {
|
|
694
|
+
apiKey: string;
|
|
695
|
+
baseUrl?: string;
|
|
696
|
+
environment?: Environment;
|
|
697
|
+
timeoutMs?: number;
|
|
698
|
+
fetch?: typeof fetch;
|
|
699
|
+
debug?: boolean;
|
|
700
|
+
}
|
|
701
|
+
/** Poll options */
|
|
702
|
+
interface PollOptions$1 {
|
|
703
|
+
maxAttempts?: number;
|
|
704
|
+
intervalMs?: number;
|
|
705
|
+
onPoll?: (quote: Quote$1) => void;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* BeeperClient - Main SDK client for the Beeper protocol
|
|
709
|
+
*
|
|
710
|
+
* @example
|
|
711
|
+
* ```typescript
|
|
712
|
+
* const client = new BeeperClient({
|
|
713
|
+
* apiKey: process.env.BEEPER_API_KEY,
|
|
714
|
+
* });
|
|
715
|
+
*
|
|
716
|
+
* // Create a draft
|
|
717
|
+
* const draft = client.createDraft({
|
|
718
|
+
* filter: { hasTag: 'vip' },
|
|
719
|
+
* tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
720
|
+
* chainId: 8453,
|
|
721
|
+
* amountPerRecipient: '1000000',
|
|
722
|
+
* budgetCap: '100000000',
|
|
723
|
+
* });
|
|
724
|
+
*
|
|
725
|
+
* // Get a quote
|
|
726
|
+
* const quote = await client.createQuote(draft);
|
|
727
|
+
* ```
|
|
728
|
+
*/
|
|
729
|
+
declare class BeeperClient {
|
|
730
|
+
private readonly http;
|
|
731
|
+
constructor(config: BeeperClientConfig);
|
|
732
|
+
/**
|
|
733
|
+
* Validates client configuration
|
|
734
|
+
*/
|
|
735
|
+
private validateConfig;
|
|
736
|
+
/**
|
|
737
|
+
* Creates a local draft. Does NOT make a network request.
|
|
738
|
+
* @param input - The draft input parameters
|
|
739
|
+
* @returns A draft object with a generated ID
|
|
740
|
+
*/
|
|
741
|
+
createDraft(input: DraftInput$1): Draft$2;
|
|
742
|
+
/**
|
|
743
|
+
* Validates draft input parameters
|
|
744
|
+
*/
|
|
745
|
+
private validateDraftInput;
|
|
746
|
+
/**
|
|
747
|
+
* Submits draft to server and receives a priced quote
|
|
748
|
+
* @param draft - The draft to quote
|
|
749
|
+
* @param opts - Optional quote options
|
|
750
|
+
* @returns A quote with server-computed pricing
|
|
751
|
+
*/
|
|
752
|
+
createQuote(draft: Draft$2, opts?: QuoteOptions$1): Promise<Quote$1>;
|
|
753
|
+
/**
|
|
754
|
+
* Creates an attention marketplace quote (message-based send)
|
|
755
|
+
* @param input - Attention quote input with message, recipients, and budget
|
|
756
|
+
* @param opts - Optional quote options
|
|
757
|
+
* @returns An attention quote with server-computed pricing
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* ```typescript
|
|
761
|
+
* const quote = await client.createAttentionQuote({
|
|
762
|
+
* message: "Check out our new feature!",
|
|
763
|
+
* filter: FilterBuilder.and([
|
|
764
|
+
* FilterBuilder.platform('farcaster'),
|
|
765
|
+
* FilterBuilder.activeInLastDays(7),
|
|
766
|
+
* ]).toJSON(),
|
|
767
|
+
* budgetUSD: "50.00",
|
|
768
|
+
* rewardType: 'guaranteed',
|
|
769
|
+
* });
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
createAttentionQuote(input: AttentionQuoteInput, opts?: QuoteOptions$1): Promise<AttentionQuote>;
|
|
773
|
+
/**
|
|
774
|
+
* Retrieves an existing quote by ID
|
|
775
|
+
* @param quoteId - The quote ID
|
|
776
|
+
* @returns The quote
|
|
777
|
+
*/
|
|
778
|
+
getQuote(quoteId: string): Promise<Quote$1>;
|
|
779
|
+
/**
|
|
780
|
+
* Confirms that deposit has been made
|
|
781
|
+
* @param quoteId - The quote ID
|
|
782
|
+
* @param params - Confirmation parameters including txHash and idempotencyKey
|
|
783
|
+
* @returns Confirmation result
|
|
784
|
+
*/
|
|
785
|
+
confirmDeposit(quoteId: string, params: {
|
|
786
|
+
txHash: string;
|
|
787
|
+
idempotencyKey: string;
|
|
788
|
+
}): Promise<ConfirmResult>;
|
|
789
|
+
/**
|
|
790
|
+
* Triggers execution of the send
|
|
791
|
+
* @param quoteId - The quote ID
|
|
792
|
+
* @param params - Execution parameters including idempotencyKey
|
|
793
|
+
* @returns Execution result
|
|
794
|
+
*/
|
|
795
|
+
executeSend(quoteId: string, params: {
|
|
796
|
+
idempotencyKey: string;
|
|
797
|
+
}): Promise<ExecuteResult$1>;
|
|
798
|
+
/**
|
|
799
|
+
* Gets the receipt for a completed (or failed) execution
|
|
800
|
+
* @param quoteId - The quote ID
|
|
801
|
+
* @returns The receipt
|
|
802
|
+
*/
|
|
803
|
+
getReceiptByQuoteId(quoteId: string): Promise<Receipt$1>;
|
|
804
|
+
/**
|
|
805
|
+
* Polls until execution completes, then returns receipt
|
|
806
|
+
* @param quoteId - The quote ID
|
|
807
|
+
* @param opts - Polling options
|
|
808
|
+
* @returns The receipt when execution completes
|
|
809
|
+
*/
|
|
810
|
+
pollUntilCompleteByQuoteId(quoteId: string, opts?: PollOptions$1): Promise<Receipt$1>;
|
|
811
|
+
/**
|
|
812
|
+
* Checks API health status
|
|
813
|
+
* @returns Health status
|
|
814
|
+
*/
|
|
815
|
+
health(): Promise<Health$1>;
|
|
816
|
+
/**
|
|
817
|
+
* Sleep helper for polling
|
|
818
|
+
*/
|
|
819
|
+
private sleep;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Supported networks
|
|
824
|
+
*/
|
|
825
|
+
declare const NetworkSchema: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
826
|
+
/**
|
|
827
|
+
* Supported tokens
|
|
828
|
+
*/
|
|
829
|
+
declare const TokenTypeSchema: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
830
|
+
/**
|
|
831
|
+
* Distribution strategies
|
|
832
|
+
*/
|
|
833
|
+
declare const DistributionStrategySchema: z.ZodEnum<["equal", "weighted", "proportional"]>;
|
|
834
|
+
/**
|
|
835
|
+
* Draft status
|
|
836
|
+
*/
|
|
837
|
+
declare const DraftStatusSchema: z.ZodEnum<["draft", "quoted", "executed"]>;
|
|
838
|
+
/**
|
|
839
|
+
* Draft input schema - for creating new drafts
|
|
840
|
+
*/
|
|
841
|
+
declare const DraftInputSchema: z.ZodObject<{
|
|
842
|
+
name: z.ZodString;
|
|
843
|
+
amount: z.ZodString;
|
|
844
|
+
token: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
845
|
+
network: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
846
|
+
filter: z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
847
|
+
strategy: z.ZodEnum<["equal", "weighted", "proportional"]>;
|
|
848
|
+
weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
849
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
850
|
+
}, "strip", z.ZodTypeAny, {
|
|
851
|
+
name: string;
|
|
852
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
853
|
+
amount: string;
|
|
854
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
855
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
856
|
+
filter?: unknown;
|
|
857
|
+
metadata?: Record<string, unknown> | undefined;
|
|
858
|
+
weights?: Record<string, number> | undefined;
|
|
859
|
+
}, {
|
|
860
|
+
name: string;
|
|
861
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
862
|
+
amount: string;
|
|
863
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
864
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
865
|
+
filter?: unknown;
|
|
866
|
+
metadata?: Record<string, unknown> | undefined;
|
|
867
|
+
weights?: Record<string, number> | undefined;
|
|
868
|
+
}>;
|
|
869
|
+
/**
|
|
870
|
+
* Full draft schema - includes server-generated fields
|
|
871
|
+
*/
|
|
872
|
+
declare const DraftSchema: z.ZodObject<{
|
|
873
|
+
id: z.ZodString;
|
|
874
|
+
name: z.ZodString;
|
|
875
|
+
amount: z.ZodString;
|
|
876
|
+
token: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
877
|
+
network: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
878
|
+
filter: z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
879
|
+
strategy: z.ZodEnum<["equal", "weighted", "proportional"]>;
|
|
880
|
+
weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
881
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
882
|
+
createdAt: z.ZodString;
|
|
883
|
+
updatedAt: z.ZodString;
|
|
884
|
+
status: z.ZodEnum<["draft", "quoted", "executed"]>;
|
|
885
|
+
}, "strip", z.ZodTypeAny, {
|
|
886
|
+
name: string;
|
|
887
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
888
|
+
status: "draft" | "quoted" | "executed";
|
|
889
|
+
id: string;
|
|
890
|
+
createdAt: string;
|
|
891
|
+
updatedAt: string;
|
|
892
|
+
amount: string;
|
|
893
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
894
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
895
|
+
filter?: unknown;
|
|
896
|
+
metadata?: Record<string, unknown> | undefined;
|
|
897
|
+
weights?: Record<string, number> | undefined;
|
|
898
|
+
}, {
|
|
899
|
+
name: string;
|
|
900
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
901
|
+
status: "draft" | "quoted" | "executed";
|
|
902
|
+
id: string;
|
|
903
|
+
createdAt: string;
|
|
904
|
+
updatedAt: string;
|
|
905
|
+
amount: string;
|
|
906
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
907
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
908
|
+
filter?: unknown;
|
|
909
|
+
metadata?: Record<string, unknown> | undefined;
|
|
910
|
+
weights?: Record<string, number> | undefined;
|
|
911
|
+
}>;
|
|
912
|
+
/**
|
|
913
|
+
* Draft update schema - partial update
|
|
914
|
+
*/
|
|
915
|
+
declare const DraftUpdateSchema: z.ZodObject<{
|
|
916
|
+
name: z.ZodOptional<z.ZodString>;
|
|
917
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
918
|
+
token: z.ZodOptional<z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>>;
|
|
919
|
+
network: z.ZodOptional<z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>>;
|
|
920
|
+
filter: z.ZodOptional<z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
921
|
+
strategy: z.ZodOptional<z.ZodEnum<["equal", "weighted", "proportional"]>>;
|
|
922
|
+
weights: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
|
|
923
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
924
|
+
}, "strip", z.ZodTypeAny, {
|
|
925
|
+
name?: string | undefined;
|
|
926
|
+
filter?: unknown;
|
|
927
|
+
network?: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism" | undefined;
|
|
928
|
+
metadata?: Record<string, unknown> | undefined;
|
|
929
|
+
amount?: string | undefined;
|
|
930
|
+
token?: "USDC" | "USDT" | "ETH" | "MATIC" | undefined;
|
|
931
|
+
strategy?: "equal" | "weighted" | "proportional" | undefined;
|
|
932
|
+
weights?: Record<string, number> | undefined;
|
|
933
|
+
}, {
|
|
934
|
+
name?: string | undefined;
|
|
935
|
+
filter?: unknown;
|
|
936
|
+
network?: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism" | undefined;
|
|
937
|
+
metadata?: Record<string, unknown> | undefined;
|
|
938
|
+
amount?: string | undefined;
|
|
939
|
+
token?: "USDC" | "USDT" | "ETH" | "MATIC" | undefined;
|
|
940
|
+
strategy?: "equal" | "weighted" | "proportional" | undefined;
|
|
941
|
+
weights?: Record<string, number> | undefined;
|
|
942
|
+
}>;
|
|
943
|
+
/**
|
|
944
|
+
* Validate draft input
|
|
945
|
+
*/
|
|
946
|
+
declare function validateDraftInput$1(input: unknown): z.SafeParseReturnType<{
|
|
947
|
+
name: string;
|
|
948
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
949
|
+
amount: string;
|
|
950
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
951
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
952
|
+
filter?: unknown;
|
|
953
|
+
metadata?: Record<string, unknown> | undefined;
|
|
954
|
+
weights?: Record<string, number> | undefined;
|
|
955
|
+
}, {
|
|
956
|
+
name: string;
|
|
957
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
958
|
+
amount: string;
|
|
959
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
960
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
961
|
+
filter?: unknown;
|
|
962
|
+
metadata?: Record<string, unknown> | undefined;
|
|
963
|
+
weights?: Record<string, number> | undefined;
|
|
964
|
+
}>;
|
|
965
|
+
/**
|
|
966
|
+
* Parse draft input
|
|
967
|
+
*/
|
|
968
|
+
declare function parseDraftInput(input: unknown): {
|
|
969
|
+
name: string;
|
|
970
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
971
|
+
amount: string;
|
|
972
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
973
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
974
|
+
filter?: unknown;
|
|
975
|
+
metadata?: Record<string, unknown> | undefined;
|
|
976
|
+
weights?: Record<string, number> | undefined;
|
|
977
|
+
};
|
|
978
|
+
/**
|
|
979
|
+
* Validate draft response
|
|
980
|
+
*/
|
|
981
|
+
declare function validateDraft(draft: unknown): z.SafeParseReturnType<{
|
|
982
|
+
name: string;
|
|
983
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
984
|
+
status: "draft" | "quoted" | "executed";
|
|
985
|
+
id: string;
|
|
986
|
+
createdAt: string;
|
|
987
|
+
updatedAt: string;
|
|
988
|
+
amount: string;
|
|
989
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
990
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
991
|
+
filter?: unknown;
|
|
992
|
+
metadata?: Record<string, unknown> | undefined;
|
|
993
|
+
weights?: Record<string, number> | undefined;
|
|
994
|
+
}, {
|
|
995
|
+
name: string;
|
|
996
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
997
|
+
status: "draft" | "quoted" | "executed";
|
|
998
|
+
id: string;
|
|
999
|
+
createdAt: string;
|
|
1000
|
+
updatedAt: string;
|
|
1001
|
+
amount: string;
|
|
1002
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1003
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
1004
|
+
filter?: unknown;
|
|
1005
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1006
|
+
weights?: Record<string, number> | undefined;
|
|
1007
|
+
}>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Parse draft response
|
|
1010
|
+
*/
|
|
1011
|
+
declare function parseDraft(draft: unknown): {
|
|
1012
|
+
name: string;
|
|
1013
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1014
|
+
status: "draft" | "quoted" | "executed";
|
|
1015
|
+
id: string;
|
|
1016
|
+
createdAt: string;
|
|
1017
|
+
updatedAt: string;
|
|
1018
|
+
amount: string;
|
|
1019
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1020
|
+
strategy: "equal" | "weighted" | "proportional";
|
|
1021
|
+
filter?: unknown;
|
|
1022
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1023
|
+
weights?: Record<string, number> | undefined;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
type Draft$1 = z.infer<typeof DraftSchema>;
|
|
1027
|
+
type DraftInput = z.infer<typeof DraftInputSchema>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Create a new draft from input (pure function, no API calls)
|
|
1030
|
+
*
|
|
1031
|
+
* @param input - The draft input configuration
|
|
1032
|
+
* @returns A Draft object with generated ID and timestamps
|
|
1033
|
+
* @throws BeeperError if input validation fails
|
|
1034
|
+
*/
|
|
1035
|
+
declare function createDraft(input: DraftInput): Draft$1;
|
|
1036
|
+
/**
|
|
1037
|
+
* Validate draft input using Zod schema
|
|
1038
|
+
*
|
|
1039
|
+
* @param input - Unknown input to validate
|
|
1040
|
+
* @returns Validated DraftInput
|
|
1041
|
+
* @throws BeeperError if validation fails
|
|
1042
|
+
*/
|
|
1043
|
+
declare function validateDraftInput(input: unknown): DraftInput;
|
|
1044
|
+
/**
|
|
1045
|
+
* Update an existing draft with new values
|
|
1046
|
+
*
|
|
1047
|
+
* @param draft - The existing draft to update
|
|
1048
|
+
* @param updates - Partial updates to apply
|
|
1049
|
+
* @returns Updated draft with new updatedAt timestamp
|
|
1050
|
+
*/
|
|
1051
|
+
declare function updateDraft(draft: Draft$1, updates: Partial<DraftInput>): Draft$1;
|
|
1052
|
+
/**
|
|
1053
|
+
* Check if a draft is ready for quoting
|
|
1054
|
+
*
|
|
1055
|
+
* @param draft - The draft to check
|
|
1056
|
+
* @returns true if the draft can be quoted
|
|
1057
|
+
*/
|
|
1058
|
+
declare function isReadyForQuote(draft: Draft$1): boolean;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Retry options for HTTP requests
|
|
1062
|
+
*/
|
|
1063
|
+
interface RetryOptions {
|
|
1064
|
+
/** Maximum number of retry attempts (default: 3) */
|
|
1065
|
+
maxRetries?: number;
|
|
1066
|
+
/** Initial delay in milliseconds before first retry (default: 1000) */
|
|
1067
|
+
initialDelayMs?: number;
|
|
1068
|
+
/** Maximum delay in milliseconds between retries (default: 30000) */
|
|
1069
|
+
maxDelayMs?: number;
|
|
1070
|
+
/** Multiplier for exponential backoff (default: 2) */
|
|
1071
|
+
backoffMultiplier?: number;
|
|
1072
|
+
/** Jitter factor to add randomness (0-1, default: 0.1) */
|
|
1073
|
+
jitterFactor?: number;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* HTTP request options
|
|
1077
|
+
*/
|
|
1078
|
+
interface HttpRequestOptions {
|
|
1079
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1080
|
+
endpoint: string;
|
|
1081
|
+
body?: unknown;
|
|
1082
|
+
headers?: Record<string, string>;
|
|
1083
|
+
timeout?: number;
|
|
1084
|
+
idempotencyKey?: string;
|
|
1085
|
+
signal?: AbortSignal;
|
|
1086
|
+
/** Retry configuration (set to false to disable retries) */
|
|
1087
|
+
retry?: RetryOptions | false;
|
|
1088
|
+
/** Query parameters to append to URL */
|
|
1089
|
+
params?: Record<string, string | number | boolean | undefined>;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* HTTP response wrapper
|
|
1093
|
+
*/
|
|
1094
|
+
interface HttpResponse<T> {
|
|
1095
|
+
data: T;
|
|
1096
|
+
status: number;
|
|
1097
|
+
headers: Headers;
|
|
1098
|
+
requestId?: string | undefined;
|
|
1099
|
+
/** Number of retry attempts made */
|
|
1100
|
+
retryCount: number;
|
|
1101
|
+
/** Total time taken including retries (ms) */
|
|
1102
|
+
totalTimeMs: number;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* HTTP client configuration
|
|
1106
|
+
*/
|
|
1107
|
+
interface HttpClientConfig {
|
|
1108
|
+
apiKey: string;
|
|
1109
|
+
baseUrl: string;
|
|
1110
|
+
timeout: number;
|
|
1111
|
+
fetch: typeof fetch;
|
|
1112
|
+
debug: boolean;
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Create HTTP client configuration from SDK config
|
|
1116
|
+
*/
|
|
1117
|
+
declare function createHttpConfig(options: {
|
|
1118
|
+
apiKey: string;
|
|
1119
|
+
environment?: Environment;
|
|
1120
|
+
baseUrl?: string;
|
|
1121
|
+
timeout?: number;
|
|
1122
|
+
fetch?: typeof fetch;
|
|
1123
|
+
debug?: boolean;
|
|
1124
|
+
}): HttpClientConfig;
|
|
1125
|
+
/**
|
|
1126
|
+
* HTTP client for making API requests
|
|
1127
|
+
*/
|
|
1128
|
+
declare class HttpClient {
|
|
1129
|
+
private readonly config;
|
|
1130
|
+
constructor(config: HttpClientConfig);
|
|
1131
|
+
/**
|
|
1132
|
+
* Check if an HTTP status code is retryable
|
|
1133
|
+
* - 5xx server errors
|
|
1134
|
+
* - 429 rate limit errors
|
|
1135
|
+
* Does NOT retry 4xx errors (except 429)
|
|
1136
|
+
*/
|
|
1137
|
+
private isRetryableStatus;
|
|
1138
|
+
/**
|
|
1139
|
+
* Check if an error is retryable (network errors, timeouts)
|
|
1140
|
+
*/
|
|
1141
|
+
private isRetryableError;
|
|
1142
|
+
/**
|
|
1143
|
+
* Calculate delay with exponential backoff and jitter
|
|
1144
|
+
*/
|
|
1145
|
+
private calculateDelay;
|
|
1146
|
+
/**
|
|
1147
|
+
* Sleep for a given number of milliseconds
|
|
1148
|
+
*/
|
|
1149
|
+
private sleep;
|
|
1150
|
+
/**
|
|
1151
|
+
* Get default retry configuration
|
|
1152
|
+
*/
|
|
1153
|
+
private getRetryConfig;
|
|
1154
|
+
/**
|
|
1155
|
+
* Make an HTTP request with validation and automatic retry
|
|
1156
|
+
*/
|
|
1157
|
+
request<T>(options: HttpRequestOptions, responseSchema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1158
|
+
/**
|
|
1159
|
+
* GET request helper
|
|
1160
|
+
*/
|
|
1161
|
+
get<T>(endpoint: string, options?: Partial<HttpRequestOptions>, schema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1162
|
+
/**
|
|
1163
|
+
* POST request helper
|
|
1164
|
+
*/
|
|
1165
|
+
post<T>(endpoint: string, body?: unknown, options?: Partial<HttpRequestOptions>, schema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1166
|
+
/**
|
|
1167
|
+
* PUT request helper
|
|
1168
|
+
*/
|
|
1169
|
+
put<T>(endpoint: string, body?: unknown, options?: Partial<HttpRequestOptions>, schema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1170
|
+
/**
|
|
1171
|
+
* PATCH request helper
|
|
1172
|
+
*/
|
|
1173
|
+
patch<T>(endpoint: string, body?: unknown, options?: Partial<HttpRequestOptions>, schema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1174
|
+
/**
|
|
1175
|
+
* DELETE request helper
|
|
1176
|
+
*/
|
|
1177
|
+
delete<T>(endpoint: string, options?: Partial<HttpRequestOptions>, schema?: z.ZodType<T>): Promise<HttpResponse<T>>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Build request headers
|
|
1180
|
+
*/
|
|
1181
|
+
private buildHeaders;
|
|
1182
|
+
/**
|
|
1183
|
+
* Sanitize headers for logging (redact sensitive values)
|
|
1184
|
+
*/
|
|
1185
|
+
private sanitizeHeaders;
|
|
1186
|
+
/**
|
|
1187
|
+
* Safely parse JSON response
|
|
1188
|
+
*/
|
|
1189
|
+
private safeParseJson;
|
|
1190
|
+
/**
|
|
1191
|
+
* Merge two abort signals
|
|
1192
|
+
*/
|
|
1193
|
+
private mergeSignals;
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Generate a unique idempotency key
|
|
1197
|
+
*/
|
|
1198
|
+
declare function generateIdempotencyKey(): string;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Gas tier options
|
|
1202
|
+
*/
|
|
1203
|
+
declare const GasTierSchema: z.ZodEnum<["slow", "standard", "fast"]>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Quote options schema
|
|
1206
|
+
*/
|
|
1207
|
+
declare const QuoteOptionsSchema: z.ZodObject<{
|
|
1208
|
+
draftId: z.ZodString;
|
|
1209
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
gasTier: z.ZodOptional<z.ZodEnum<["slow", "standard", "fast"]>>;
|
|
1211
|
+
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
1212
|
+
}, "strip", z.ZodTypeAny, {
|
|
1213
|
+
draftId: string;
|
|
1214
|
+
amount?: string | undefined;
|
|
1215
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
1216
|
+
slippageTolerance?: number | undefined;
|
|
1217
|
+
}, {
|
|
1218
|
+
draftId: string;
|
|
1219
|
+
amount?: string | undefined;
|
|
1220
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
1221
|
+
slippageTolerance?: number | undefined;
|
|
1222
|
+
}>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Quote recipient schema
|
|
1225
|
+
*/
|
|
1226
|
+
declare const QuoteRecipientSchema: z.ZodObject<{
|
|
1227
|
+
address: z.ZodString;
|
|
1228
|
+
amount: z.ZodString;
|
|
1229
|
+
share: z.ZodNumber;
|
|
1230
|
+
}, "strip", z.ZodTypeAny, {
|
|
1231
|
+
amount: string;
|
|
1232
|
+
address: string;
|
|
1233
|
+
share: number;
|
|
1234
|
+
}, {
|
|
1235
|
+
amount: string;
|
|
1236
|
+
address: string;
|
|
1237
|
+
share: number;
|
|
1238
|
+
}>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Quote schema
|
|
1241
|
+
*/
|
|
1242
|
+
declare const QuoteSchema: z.ZodObject<{
|
|
1243
|
+
id: z.ZodString;
|
|
1244
|
+
draftId: z.ZodString;
|
|
1245
|
+
totalAmount: z.ZodString;
|
|
1246
|
+
estimatedGas: z.ZodString;
|
|
1247
|
+
gasPrice: z.ZodString;
|
|
1248
|
+
networkFee: z.ZodString;
|
|
1249
|
+
platformFee: z.ZodString;
|
|
1250
|
+
totalCost: z.ZodString;
|
|
1251
|
+
token: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
1252
|
+
network: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
1253
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
1254
|
+
address: z.ZodString;
|
|
1255
|
+
amount: z.ZodString;
|
|
1256
|
+
share: z.ZodNumber;
|
|
1257
|
+
}, "strip", z.ZodTypeAny, {
|
|
1258
|
+
amount: string;
|
|
1259
|
+
address: string;
|
|
1260
|
+
share: number;
|
|
1261
|
+
}, {
|
|
1262
|
+
amount: string;
|
|
1263
|
+
address: string;
|
|
1264
|
+
share: number;
|
|
1265
|
+
}>, "many">;
|
|
1266
|
+
recipientCount: z.ZodNumber;
|
|
1267
|
+
expiresAt: z.ZodString;
|
|
1268
|
+
createdAt: z.ZodString;
|
|
1269
|
+
isValid: z.ZodBoolean;
|
|
1270
|
+
}, "strip", z.ZodTypeAny, {
|
|
1271
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1272
|
+
id: string;
|
|
1273
|
+
recipientCount: number;
|
|
1274
|
+
totalAmount: string;
|
|
1275
|
+
expiresAt: string;
|
|
1276
|
+
createdAt: string;
|
|
1277
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1278
|
+
draftId: string;
|
|
1279
|
+
estimatedGas: string;
|
|
1280
|
+
gasPrice: string;
|
|
1281
|
+
networkFee: string;
|
|
1282
|
+
platformFee: string;
|
|
1283
|
+
totalCost: string;
|
|
1284
|
+
recipients: {
|
|
1285
|
+
amount: string;
|
|
1286
|
+
address: string;
|
|
1287
|
+
share: number;
|
|
1288
|
+
}[];
|
|
1289
|
+
isValid: boolean;
|
|
1290
|
+
}, {
|
|
1291
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1292
|
+
id: string;
|
|
1293
|
+
recipientCount: number;
|
|
1294
|
+
totalAmount: string;
|
|
1295
|
+
expiresAt: string;
|
|
1296
|
+
createdAt: string;
|
|
1297
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1298
|
+
draftId: string;
|
|
1299
|
+
estimatedGas: string;
|
|
1300
|
+
gasPrice: string;
|
|
1301
|
+
networkFee: string;
|
|
1302
|
+
platformFee: string;
|
|
1303
|
+
totalCost: string;
|
|
1304
|
+
recipients: {
|
|
1305
|
+
amount: string;
|
|
1306
|
+
address: string;
|
|
1307
|
+
share: number;
|
|
1308
|
+
}[];
|
|
1309
|
+
isValid: boolean;
|
|
1310
|
+
}>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Confirm result schema
|
|
1313
|
+
*/
|
|
1314
|
+
declare const ConfirmResultSchema: z.ZodObject<{
|
|
1315
|
+
valid: z.ZodBoolean;
|
|
1316
|
+
invalidReason: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
currentGasEstimate: z.ZodString;
|
|
1318
|
+
priceChange: z.ZodString;
|
|
1319
|
+
canExecute: z.ZodBoolean;
|
|
1320
|
+
}, "strip", z.ZodTypeAny, {
|
|
1321
|
+
valid: boolean;
|
|
1322
|
+
currentGasEstimate: string;
|
|
1323
|
+
priceChange: string;
|
|
1324
|
+
canExecute: boolean;
|
|
1325
|
+
invalidReason?: string | undefined;
|
|
1326
|
+
}, {
|
|
1327
|
+
valid: boolean;
|
|
1328
|
+
currentGasEstimate: string;
|
|
1329
|
+
priceChange: string;
|
|
1330
|
+
canExecute: boolean;
|
|
1331
|
+
invalidReason?: string | undefined;
|
|
1332
|
+
}>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Execute result status
|
|
1335
|
+
*/
|
|
1336
|
+
declare const ExecuteStatusSchema: z.ZodEnum<["pending", "confirmed", "failed"]>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Execute result schema
|
|
1339
|
+
*/
|
|
1340
|
+
declare const ExecuteResultSchema: z.ZodObject<{
|
|
1341
|
+
id: z.ZodString;
|
|
1342
|
+
quoteId: z.ZodString;
|
|
1343
|
+
transactionHash: z.ZodString;
|
|
1344
|
+
status: z.ZodEnum<["pending", "confirmed", "failed"]>;
|
|
1345
|
+
blockNumber: z.ZodOptional<z.ZodNumber>;
|
|
1346
|
+
initiatedAt: z.ZodString;
|
|
1347
|
+
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
1348
|
+
confirmations: z.ZodNumber;
|
|
1349
|
+
receiptId: z.ZodOptional<z.ZodString>;
|
|
1350
|
+
}, "strip", z.ZodTypeAny, {
|
|
1351
|
+
quoteId: string;
|
|
1352
|
+
status: "pending" | "failed" | "confirmed";
|
|
1353
|
+
id: string;
|
|
1354
|
+
transactionHash: string;
|
|
1355
|
+
initiatedAt: string;
|
|
1356
|
+
confirmations: number;
|
|
1357
|
+
blockNumber?: number | undefined;
|
|
1358
|
+
confirmedAt?: string | undefined;
|
|
1359
|
+
receiptId?: string | undefined;
|
|
1360
|
+
}, {
|
|
1361
|
+
quoteId: string;
|
|
1362
|
+
status: "pending" | "failed" | "confirmed";
|
|
1363
|
+
id: string;
|
|
1364
|
+
transactionHash: string;
|
|
1365
|
+
initiatedAt: string;
|
|
1366
|
+
confirmations: number;
|
|
1367
|
+
blockNumber?: number | undefined;
|
|
1368
|
+
confirmedAt?: string | undefined;
|
|
1369
|
+
receiptId?: string | undefined;
|
|
1370
|
+
}>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Validate quote options
|
|
1373
|
+
*/
|
|
1374
|
+
declare function validateQuoteOptions(options: unknown): z.SafeParseReturnType<{
|
|
1375
|
+
draftId: string;
|
|
1376
|
+
amount?: string | undefined;
|
|
1377
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
1378
|
+
slippageTolerance?: number | undefined;
|
|
1379
|
+
}, {
|
|
1380
|
+
draftId: string;
|
|
1381
|
+
amount?: string | undefined;
|
|
1382
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
1383
|
+
slippageTolerance?: number | undefined;
|
|
1384
|
+
}>;
|
|
1385
|
+
/**
|
|
1386
|
+
* Parse quote options
|
|
1387
|
+
*/
|
|
1388
|
+
declare function parseQuoteOptions(options: unknown): {
|
|
1389
|
+
draftId: string;
|
|
1390
|
+
amount?: string | undefined;
|
|
1391
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
1392
|
+
slippageTolerance?: number | undefined;
|
|
1393
|
+
};
|
|
1394
|
+
/**
|
|
1395
|
+
* Validate quote response
|
|
1396
|
+
*/
|
|
1397
|
+
declare function validateQuote(quote: unknown): z.SafeParseReturnType<{
|
|
1398
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1399
|
+
id: string;
|
|
1400
|
+
recipientCount: number;
|
|
1401
|
+
totalAmount: string;
|
|
1402
|
+
expiresAt: string;
|
|
1403
|
+
createdAt: string;
|
|
1404
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1405
|
+
draftId: string;
|
|
1406
|
+
estimatedGas: string;
|
|
1407
|
+
gasPrice: string;
|
|
1408
|
+
networkFee: string;
|
|
1409
|
+
platformFee: string;
|
|
1410
|
+
totalCost: string;
|
|
1411
|
+
recipients: {
|
|
1412
|
+
amount: string;
|
|
1413
|
+
address: string;
|
|
1414
|
+
share: number;
|
|
1415
|
+
}[];
|
|
1416
|
+
isValid: boolean;
|
|
1417
|
+
}, {
|
|
1418
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1419
|
+
id: string;
|
|
1420
|
+
recipientCount: number;
|
|
1421
|
+
totalAmount: string;
|
|
1422
|
+
expiresAt: string;
|
|
1423
|
+
createdAt: string;
|
|
1424
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1425
|
+
draftId: string;
|
|
1426
|
+
estimatedGas: string;
|
|
1427
|
+
gasPrice: string;
|
|
1428
|
+
networkFee: string;
|
|
1429
|
+
platformFee: string;
|
|
1430
|
+
totalCost: string;
|
|
1431
|
+
recipients: {
|
|
1432
|
+
amount: string;
|
|
1433
|
+
address: string;
|
|
1434
|
+
share: number;
|
|
1435
|
+
}[];
|
|
1436
|
+
isValid: boolean;
|
|
1437
|
+
}>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Parse quote response
|
|
1440
|
+
*/
|
|
1441
|
+
declare function parseQuote(quote: unknown): {
|
|
1442
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
1443
|
+
id: string;
|
|
1444
|
+
recipientCount: number;
|
|
1445
|
+
totalAmount: string;
|
|
1446
|
+
expiresAt: string;
|
|
1447
|
+
createdAt: string;
|
|
1448
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1449
|
+
draftId: string;
|
|
1450
|
+
estimatedGas: string;
|
|
1451
|
+
gasPrice: string;
|
|
1452
|
+
networkFee: string;
|
|
1453
|
+
platformFee: string;
|
|
1454
|
+
totalCost: string;
|
|
1455
|
+
recipients: {
|
|
1456
|
+
amount: string;
|
|
1457
|
+
address: string;
|
|
1458
|
+
share: number;
|
|
1459
|
+
}[];
|
|
1460
|
+
isValid: boolean;
|
|
1461
|
+
};
|
|
1462
|
+
/**
|
|
1463
|
+
* Validate execute result
|
|
1464
|
+
*/
|
|
1465
|
+
declare function validateExecuteResult(result: unknown): z.SafeParseReturnType<{
|
|
1466
|
+
quoteId: string;
|
|
1467
|
+
status: "pending" | "failed" | "confirmed";
|
|
1468
|
+
id: string;
|
|
1469
|
+
transactionHash: string;
|
|
1470
|
+
initiatedAt: string;
|
|
1471
|
+
confirmations: number;
|
|
1472
|
+
blockNumber?: number | undefined;
|
|
1473
|
+
confirmedAt?: string | undefined;
|
|
1474
|
+
receiptId?: string | undefined;
|
|
1475
|
+
}, {
|
|
1476
|
+
quoteId: string;
|
|
1477
|
+
status: "pending" | "failed" | "confirmed";
|
|
1478
|
+
id: string;
|
|
1479
|
+
transactionHash: string;
|
|
1480
|
+
initiatedAt: string;
|
|
1481
|
+
confirmations: number;
|
|
1482
|
+
blockNumber?: number | undefined;
|
|
1483
|
+
confirmedAt?: string | undefined;
|
|
1484
|
+
receiptId?: string | undefined;
|
|
1485
|
+
}>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Parse execute result
|
|
1488
|
+
*/
|
|
1489
|
+
declare function parseExecuteResult(result: unknown): {
|
|
1490
|
+
quoteId: string;
|
|
1491
|
+
status: "pending" | "failed" | "confirmed";
|
|
1492
|
+
id: string;
|
|
1493
|
+
transactionHash: string;
|
|
1494
|
+
initiatedAt: string;
|
|
1495
|
+
confirmations: number;
|
|
1496
|
+
blockNumber?: number | undefined;
|
|
1497
|
+
confirmedAt?: string | undefined;
|
|
1498
|
+
receiptId?: string | undefined;
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
type Draft = z.infer<typeof DraftSchema>;
|
|
1502
|
+
type QuoteOptions = z.infer<typeof QuoteOptionsSchema>;
|
|
1503
|
+
/** API Quote response schema (matches HTTP contract) */
|
|
1504
|
+
declare const ApiQuoteResponseSchema: z.ZodObject<{
|
|
1505
|
+
id: z.ZodString;
|
|
1506
|
+
status: z.ZodEnum<["pending", "deposit_confirmed", "executing", "completed", "expired", "failed"]>;
|
|
1507
|
+
recipientCount: z.ZodNumber;
|
|
1508
|
+
totalAmount: z.ZodString;
|
|
1509
|
+
protocolFee: z.ZodString;
|
|
1510
|
+
depositAmount: z.ZodString;
|
|
1511
|
+
depositAddress: z.ZodString;
|
|
1512
|
+
depositChainId: z.ZodNumber;
|
|
1513
|
+
depositTokenAddress: z.ZodString;
|
|
1514
|
+
expiresAt: z.ZodString;
|
|
1515
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1516
|
+
createdAt: z.ZodString;
|
|
1517
|
+
updatedAt: z.ZodString;
|
|
1518
|
+
}, "strip", z.ZodTypeAny, {
|
|
1519
|
+
status: "pending" | "deposit_confirmed" | "executing" | "completed" | "expired" | "failed";
|
|
1520
|
+
id: string;
|
|
1521
|
+
recipientCount: number;
|
|
1522
|
+
totalAmount: string;
|
|
1523
|
+
protocolFee: string;
|
|
1524
|
+
depositAmount: string;
|
|
1525
|
+
depositAddress: string;
|
|
1526
|
+
depositChainId: number;
|
|
1527
|
+
depositTokenAddress: string;
|
|
1528
|
+
expiresAt: string;
|
|
1529
|
+
input: Record<string, unknown>;
|
|
1530
|
+
createdAt: string;
|
|
1531
|
+
updatedAt: string;
|
|
1532
|
+
}, {
|
|
1533
|
+
status: "pending" | "deposit_confirmed" | "executing" | "completed" | "expired" | "failed";
|
|
1534
|
+
id: string;
|
|
1535
|
+
recipientCount: number;
|
|
1536
|
+
totalAmount: string;
|
|
1537
|
+
protocolFee: string;
|
|
1538
|
+
depositAmount: string;
|
|
1539
|
+
depositAddress: string;
|
|
1540
|
+
depositChainId: number;
|
|
1541
|
+
depositTokenAddress: string;
|
|
1542
|
+
expiresAt: string;
|
|
1543
|
+
input: Record<string, unknown>;
|
|
1544
|
+
createdAt: string;
|
|
1545
|
+
updatedAt: string;
|
|
1546
|
+
}>;
|
|
1547
|
+
type ApiQuoteResponse = z.infer<typeof ApiQuoteResponseSchema>;
|
|
1548
|
+
type QuoteStatus$1 = 'pending' | 'deposit_confirmed' | 'executing' | 'completed' | 'expired' | 'failed';
|
|
1549
|
+
/** Create a quote for a draft */
|
|
1550
|
+
declare function createQuote(httpClient: HttpClient, draft: Draft, opts?: Partial<QuoteOptions>): Promise<ApiQuoteResponse>;
|
|
1551
|
+
/** Get an existing quote by ID */
|
|
1552
|
+
declare function getQuote(httpClient: HttpClient, quoteId: string): Promise<ApiQuoteResponse>;
|
|
1553
|
+
/** Check if a quote has expired */
|
|
1554
|
+
declare function isQuoteExpired(quote: ApiQuoteResponse): boolean;
|
|
1555
|
+
/** Check if a quote is ready for deposit confirmation */
|
|
1556
|
+
declare function isReadyForDeposit(quote: ApiQuoteResponse): boolean;
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* Confirm deposit response schema (matches HTTP contract)
|
|
1560
|
+
*/
|
|
1561
|
+
declare const ConfirmDepositResponseSchema: z.ZodObject<{
|
|
1562
|
+
quoteId: z.ZodString;
|
|
1563
|
+
status: z.ZodEnum<["confirmed", "pending_verification"]>;
|
|
1564
|
+
detectedAmount: z.ZodString;
|
|
1565
|
+
sufficient: z.ZodBoolean;
|
|
1566
|
+
blockNumber: z.ZodNumber;
|
|
1567
|
+
confirmedAt: z.ZodString;
|
|
1568
|
+
}, "strip", z.ZodTypeAny, {
|
|
1569
|
+
quoteId: string;
|
|
1570
|
+
status: "confirmed" | "pending_verification";
|
|
1571
|
+
detectedAmount: string;
|
|
1572
|
+
sufficient: boolean;
|
|
1573
|
+
blockNumber: number;
|
|
1574
|
+
confirmedAt: string;
|
|
1575
|
+
}, {
|
|
1576
|
+
quoteId: string;
|
|
1577
|
+
status: "confirmed" | "pending_verification";
|
|
1578
|
+
detectedAmount: string;
|
|
1579
|
+
sufficient: boolean;
|
|
1580
|
+
blockNumber: number;
|
|
1581
|
+
confirmedAt: string;
|
|
1582
|
+
}>;
|
|
1583
|
+
type ConfirmDepositResponse = z.infer<typeof ConfirmDepositResponseSchema>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Parameters for confirming a deposit
|
|
1586
|
+
*/
|
|
1587
|
+
interface ConfirmDepositParams {
|
|
1588
|
+
/** Transaction hash of the deposit (0x + 64 hex chars) */
|
|
1589
|
+
txHash: string;
|
|
1590
|
+
/** Unique idempotency key for safe retries */
|
|
1591
|
+
idempotencyKey: string;
|
|
1592
|
+
}
|
|
1593
|
+
/**
|
|
1594
|
+
* Confirm that a deposit has been made for a quote
|
|
1595
|
+
*
|
|
1596
|
+
* @param httpClient - The HTTP client instance
|
|
1597
|
+
* @param quoteId - The quote ID to confirm deposit for
|
|
1598
|
+
* @param params - Deposit confirmation parameters
|
|
1599
|
+
* @returns The confirmation result
|
|
1600
|
+
* @throws BeeperError if validation fails or API returns error
|
|
1601
|
+
*/
|
|
1602
|
+
declare function confirmDeposit(httpClient: HttpClient, quoteId: string, params: ConfirmDepositParams): Promise<ConfirmDepositResponse>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Check if a deposit confirmation was successful
|
|
1605
|
+
*/
|
|
1606
|
+
declare function isDepositSufficient(result: ConfirmDepositResponse): boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* Generate a recommended idempotency key for deposit confirmation
|
|
1609
|
+
*/
|
|
1610
|
+
declare function generateDepositIdempotencyKey(quoteId: string): string;
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* Execute response schema (matches HTTP contract)
|
|
1614
|
+
*/
|
|
1615
|
+
declare const ExecuteSendResponseSchema: z.ZodObject<{
|
|
1616
|
+
quoteId: z.ZodString;
|
|
1617
|
+
status: z.ZodEnum<["executing", "queued"]>;
|
|
1618
|
+
estimatedCompletionAt: z.ZodString;
|
|
1619
|
+
batchId: z.ZodString;
|
|
1620
|
+
}, "strip", z.ZodTypeAny, {
|
|
1621
|
+
quoteId: string;
|
|
1622
|
+
status: "executing" | "queued";
|
|
1623
|
+
estimatedCompletionAt: string;
|
|
1624
|
+
batchId: string;
|
|
1625
|
+
}, {
|
|
1626
|
+
quoteId: string;
|
|
1627
|
+
status: "executing" | "queued";
|
|
1628
|
+
estimatedCompletionAt: string;
|
|
1629
|
+
batchId: string;
|
|
1630
|
+
}>;
|
|
1631
|
+
type ExecuteSendResponse = z.infer<typeof ExecuteSendResponseSchema>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Parameters for executing a send
|
|
1634
|
+
*/
|
|
1635
|
+
interface ExecuteSendParams {
|
|
1636
|
+
/** Unique idempotency key for safe retries */
|
|
1637
|
+
idempotencyKey: string;
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Trigger execution of a send operation
|
|
1641
|
+
*
|
|
1642
|
+
* @param httpClient - The HTTP client instance
|
|
1643
|
+
* @param quoteId - The quote ID to execute
|
|
1644
|
+
* @param params - Execution parameters
|
|
1645
|
+
* @returns The execution result
|
|
1646
|
+
* @throws BeeperError if validation fails or API returns error
|
|
1647
|
+
*/
|
|
1648
|
+
declare function executeSend(httpClient: HttpClient, quoteId: string, params: ExecuteSendParams): Promise<ExecuteSendResponse>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Check if execution is in progress
|
|
1651
|
+
*/
|
|
1652
|
+
declare function isExecuting(result: ExecuteSendResponse): boolean;
|
|
1653
|
+
/**
|
|
1654
|
+
* Get estimated time remaining for execution
|
|
1655
|
+
*/
|
|
1656
|
+
declare function getEstimatedTimeRemaining(result: ExecuteSendResponse): number;
|
|
1657
|
+
/**
|
|
1658
|
+
* Generate a recommended idempotency key for execution
|
|
1659
|
+
*/
|
|
1660
|
+
declare function generateExecuteIdempotencyKey(quoteId: string): string;
|
|
1661
|
+
|
|
1662
|
+
/** Receipt transaction schema */
|
|
1663
|
+
declare const ReceiptTransactionSchema: z.ZodObject<{
|
|
1664
|
+
recipient: z.ZodString;
|
|
1665
|
+
amount: z.ZodString;
|
|
1666
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
1667
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
1668
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1669
|
+
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
status: "failed" | "success";
|
|
1671
|
+
recipient: string;
|
|
1672
|
+
amount: string;
|
|
1673
|
+
txHash: string | null;
|
|
1674
|
+
error?: string | null | undefined;
|
|
1675
|
+
}, {
|
|
1676
|
+
status: "failed" | "success";
|
|
1677
|
+
recipient: string;
|
|
1678
|
+
amount: string;
|
|
1679
|
+
txHash: string | null;
|
|
1680
|
+
error?: string | null | undefined;
|
|
1681
|
+
}>;
|
|
1682
|
+
/** API Receipt response schema (matches HTTP contract) */
|
|
1683
|
+
declare const ApiReceiptResponseSchema: z.ZodObject<{
|
|
1684
|
+
quoteId: z.ZodString;
|
|
1685
|
+
status: z.ZodEnum<["completed", "partial", "failed"]>;
|
|
1686
|
+
successCount: z.ZodNumber;
|
|
1687
|
+
failureCount: z.ZodNumber;
|
|
1688
|
+
totalSent: z.ZodString;
|
|
1689
|
+
refundAmount: z.ZodString;
|
|
1690
|
+
refundTxHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1691
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
1692
|
+
recipient: z.ZodString;
|
|
1693
|
+
amount: z.ZodString;
|
|
1694
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
1695
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
1696
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1697
|
+
}, "strip", z.ZodTypeAny, {
|
|
1698
|
+
status: "failed" | "success";
|
|
1699
|
+
recipient: string;
|
|
1700
|
+
amount: string;
|
|
1701
|
+
txHash: string | null;
|
|
1702
|
+
error?: string | null | undefined;
|
|
1703
|
+
}, {
|
|
1704
|
+
status: "failed" | "success";
|
|
1705
|
+
recipient: string;
|
|
1706
|
+
amount: string;
|
|
1707
|
+
txHash: string | null;
|
|
1708
|
+
error?: string | null | undefined;
|
|
1709
|
+
}>, "many">;
|
|
1710
|
+
completedAt: z.ZodString;
|
|
1711
|
+
}, "strip", z.ZodTypeAny, {
|
|
1712
|
+
quoteId: string;
|
|
1713
|
+
status: "completed" | "failed" | "partial";
|
|
1714
|
+
successCount: number;
|
|
1715
|
+
failureCount: number;
|
|
1716
|
+
totalSent: string;
|
|
1717
|
+
refundAmount: string;
|
|
1718
|
+
transactions: {
|
|
1719
|
+
status: "failed" | "success";
|
|
1720
|
+
recipient: string;
|
|
1721
|
+
amount: string;
|
|
1722
|
+
txHash: string | null;
|
|
1723
|
+
error?: string | null | undefined;
|
|
1724
|
+
}[];
|
|
1725
|
+
completedAt: string;
|
|
1726
|
+
refundTxHash?: string | null | undefined;
|
|
1727
|
+
}, {
|
|
1728
|
+
quoteId: string;
|
|
1729
|
+
status: "completed" | "failed" | "partial";
|
|
1730
|
+
successCount: number;
|
|
1731
|
+
failureCount: number;
|
|
1732
|
+
totalSent: string;
|
|
1733
|
+
refundAmount: string;
|
|
1734
|
+
transactions: {
|
|
1735
|
+
status: "failed" | "success";
|
|
1736
|
+
recipient: string;
|
|
1737
|
+
amount: string;
|
|
1738
|
+
txHash: string | null;
|
|
1739
|
+
error?: string | null | undefined;
|
|
1740
|
+
}[];
|
|
1741
|
+
completedAt: string;
|
|
1742
|
+
refundTxHash?: string | null | undefined;
|
|
1743
|
+
}>;
|
|
1744
|
+
type ApiReceiptResponse = z.infer<typeof ApiReceiptResponseSchema>;
|
|
1745
|
+
type ReceiptTransaction = z.infer<typeof ReceiptTransactionSchema>;
|
|
1746
|
+
type ReceiptStatus = 'completed' | 'partial' | 'failed';
|
|
1747
|
+
/** Options for polling */
|
|
1748
|
+
interface PollOptions {
|
|
1749
|
+
maxAttempts?: number;
|
|
1750
|
+
intervalMs?: number;
|
|
1751
|
+
signal?: AbortSignal;
|
|
1752
|
+
}
|
|
1753
|
+
/**
|
|
1754
|
+
* Get the receipt for a quote
|
|
1755
|
+
*/
|
|
1756
|
+
declare function getReceipt(httpClient: HttpClient, quoteId: string): Promise<ApiReceiptResponse>;
|
|
1757
|
+
/**
|
|
1758
|
+
* Poll until the execution is complete
|
|
1759
|
+
*/
|
|
1760
|
+
declare function pollUntilComplete(httpClient: HttpClient, quoteId: string, opts?: PollOptions): Promise<ApiReceiptResponse>;
|
|
1761
|
+
/** Check if a receipt indicates completion */
|
|
1762
|
+
declare function isComplete(receipt: ApiReceiptResponse): boolean;
|
|
1763
|
+
/** Check if execution was fully successful */
|
|
1764
|
+
declare function isSuccess(receipt: ApiReceiptResponse): boolean;
|
|
1765
|
+
/** Get the success rate as a percentage */
|
|
1766
|
+
declare function getSuccessRate(receipt: ApiReceiptResponse): number;
|
|
1767
|
+
/** Get failed transactions from a receipt */
|
|
1768
|
+
declare function getFailedTransactions(receipt: ApiReceiptResponse): ReceiptTransaction[];
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* Authentication utilities for the Beeper SDK
|
|
1772
|
+
*/
|
|
1773
|
+
/**
|
|
1774
|
+
* API key prefix patterns
|
|
1775
|
+
*/
|
|
1776
|
+
declare const API_KEY_PREFIXES: {
|
|
1777
|
+
readonly LIVE: "bpk_live_";
|
|
1778
|
+
readonly TEST: "bpk_test_";
|
|
1779
|
+
};
|
|
1780
|
+
/**
|
|
1781
|
+
* Validates that an API key has the correct format
|
|
1782
|
+
* @param apiKey - The API key to validate
|
|
1783
|
+
* @returns true if the key format is valid
|
|
1784
|
+
*/
|
|
1785
|
+
declare function isValidApiKeyFormat(apiKey: string): boolean;
|
|
1786
|
+
/**
|
|
1787
|
+
* Determines if an API key is for production or test environment
|
|
1788
|
+
* @param apiKey - The API key to check
|
|
1789
|
+
* @returns 'production' | 'test' | null if invalid
|
|
1790
|
+
*/
|
|
1791
|
+
declare function getApiKeyEnvironment(apiKey: string): 'production' | 'test' | null;
|
|
1792
|
+
/**
|
|
1793
|
+
* Creates the Authorization header value
|
|
1794
|
+
* @param apiKey - The API key
|
|
1795
|
+
* @returns The Bearer token string
|
|
1796
|
+
*/
|
|
1797
|
+
declare function createAuthorizationHeader(apiKey: string): string;
|
|
1798
|
+
/**
|
|
1799
|
+
* Masks an API key for safe logging
|
|
1800
|
+
* @param apiKey - The API key to mask
|
|
1801
|
+
* @returns Masked key showing only prefix and last 4 characters
|
|
1802
|
+
*/
|
|
1803
|
+
declare function maskApiKey(apiKey: string): string;
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* Core types for the Beeper SDK
|
|
1807
|
+
*
|
|
1808
|
+
* Matches the beep.works server API at /api/v1/sdk/*
|
|
1809
|
+
*/
|
|
1810
|
+
/**
|
|
1811
|
+
* Supported blockchain chains for wallet filters
|
|
1812
|
+
*/
|
|
1813
|
+
type WalletChain$1 = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'optimism';
|
|
1814
|
+
/**
|
|
1815
|
+
* Supported platforms for targeting
|
|
1816
|
+
*/
|
|
1817
|
+
type Platform$1 = 'all' | 'farcaster' | 'twitter';
|
|
1818
|
+
/**
|
|
1819
|
+
* Token standard for token holder filters
|
|
1820
|
+
*/
|
|
1821
|
+
type TokenStandard = 'ERC20' | 'ERC721' | 'ERC1155';
|
|
1822
|
+
/**
|
|
1823
|
+
* Sort order options
|
|
1824
|
+
*/
|
|
1825
|
+
type OrderBy$1 = 'attention_price_asc' | 'attention_price_desc' | 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'recent_activity' | 'battery_desc' | 'random';
|
|
1826
|
+
/**
|
|
1827
|
+
* Spam label options
|
|
1828
|
+
*/
|
|
1829
|
+
type SpamLabel = 'not_spam_only' | 'spam_only' | 'all';
|
|
1830
|
+
/**
|
|
1831
|
+
* Token holder filter config
|
|
1832
|
+
*/
|
|
1833
|
+
interface TokenHolderConfig {
|
|
1834
|
+
chain: 'base' | 'ethereum';
|
|
1835
|
+
contractAddress: string;
|
|
1836
|
+
tokenStandard: TokenStandard;
|
|
1837
|
+
tokenId?: string;
|
|
1838
|
+
minBalance?: string | number;
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Recipient Filter DSL
|
|
1842
|
+
* Supports complex logical expressions for targeting users
|
|
1843
|
+
*/
|
|
1844
|
+
type RecipientFilter$1 = {
|
|
1845
|
+
and: RecipientFilter$1[];
|
|
1846
|
+
} | {
|
|
1847
|
+
or: RecipientFilter$1[];
|
|
1848
|
+
} | {
|
|
1849
|
+
not: RecipientFilter$1;
|
|
1850
|
+
} | {
|
|
1851
|
+
hasTag: string;
|
|
1852
|
+
} | {
|
|
1853
|
+
hasAnyTag: string[];
|
|
1854
|
+
} | {
|
|
1855
|
+
hasAllTags: string[];
|
|
1856
|
+
} | {
|
|
1857
|
+
walletChain: WalletChain$1;
|
|
1858
|
+
} | {
|
|
1859
|
+
walletHasToken: {
|
|
1860
|
+
tokenAddress: string;
|
|
1861
|
+
chainId: number;
|
|
1862
|
+
};
|
|
1863
|
+
} | {
|
|
1864
|
+
walletMinBalance: {
|
|
1865
|
+
tokenAddress: string;
|
|
1866
|
+
chainId: number;
|
|
1867
|
+
minBalance: string;
|
|
1868
|
+
};
|
|
1869
|
+
} | {
|
|
1870
|
+
userId: string;
|
|
1871
|
+
} | {
|
|
1872
|
+
userIds: string[];
|
|
1873
|
+
} | {
|
|
1874
|
+
fid: number;
|
|
1875
|
+
} | {
|
|
1876
|
+
fids: number[];
|
|
1877
|
+
} | {
|
|
1878
|
+
createdAfter: string;
|
|
1879
|
+
} | {
|
|
1880
|
+
createdBefore: string;
|
|
1881
|
+
} | {
|
|
1882
|
+
lastActiveAfter: string;
|
|
1883
|
+
} | {
|
|
1884
|
+
completedReward: string;
|
|
1885
|
+
} | {
|
|
1886
|
+
notCompletedReward: string;
|
|
1887
|
+
} | {
|
|
1888
|
+
completedQuest: string;
|
|
1889
|
+
} | {
|
|
1890
|
+
hasAchievement: string;
|
|
1891
|
+
} | {
|
|
1892
|
+
platform: Platform$1;
|
|
1893
|
+
} | {
|
|
1894
|
+
activeInLastDays: number;
|
|
1895
|
+
} | {
|
|
1896
|
+
neynarScoreMin: number;
|
|
1897
|
+
} | {
|
|
1898
|
+
neynarScoreMax: number;
|
|
1899
|
+
} | {
|
|
1900
|
+
neynarScoreRange: {
|
|
1901
|
+
min?: number;
|
|
1902
|
+
max?: number;
|
|
1903
|
+
};
|
|
1904
|
+
} | {
|
|
1905
|
+
minFollowers: number;
|
|
1906
|
+
} | {
|
|
1907
|
+
maxFollowers: number;
|
|
1908
|
+
} | {
|
|
1909
|
+
followerRange: {
|
|
1910
|
+
min?: number;
|
|
1911
|
+
max?: number;
|
|
1912
|
+
};
|
|
1913
|
+
} | {
|
|
1914
|
+
followersOf: number;
|
|
1915
|
+
} | {
|
|
1916
|
+
mutualsWith: number;
|
|
1917
|
+
} | {
|
|
1918
|
+
maxAttentionPriceUsd: number;
|
|
1919
|
+
} | {
|
|
1920
|
+
tokenHolders: TokenHolderConfig[];
|
|
1921
|
+
} | {
|
|
1922
|
+
cachedTokenHolders: TokenHolderConfig[];
|
|
1923
|
+
} | {
|
|
1924
|
+
spamLabel: SpamLabel;
|
|
1925
|
+
} | {
|
|
1926
|
+
signalTokens: string[];
|
|
1927
|
+
} | {
|
|
1928
|
+
hasBaseWallet: boolean;
|
|
1929
|
+
} | {
|
|
1930
|
+
hasVerifiedWallet: boolean;
|
|
1931
|
+
} | {
|
|
1932
|
+
verifiedOnly: boolean;
|
|
1933
|
+
} | {
|
|
1934
|
+
proSubscriptionRequired: boolean;
|
|
1935
|
+
} | {
|
|
1936
|
+
minTenureDays: number;
|
|
1937
|
+
} | {
|
|
1938
|
+
timezones: Array<{
|
|
1939
|
+
offset: number;
|
|
1940
|
+
range?: number;
|
|
1941
|
+
}>;
|
|
1942
|
+
} | {
|
|
1943
|
+
countries: Array<{
|
|
1944
|
+
code: string;
|
|
1945
|
+
}>;
|
|
1946
|
+
} | {
|
|
1947
|
+
quotientScoreMin: number;
|
|
1948
|
+
} | {
|
|
1949
|
+
quotientScoreMax: number;
|
|
1950
|
+
} | {
|
|
1951
|
+
quotientScoreRange: {
|
|
1952
|
+
min?: number;
|
|
1953
|
+
max?: number;
|
|
1954
|
+
};
|
|
1955
|
+
} | {
|
|
1956
|
+
minBatteryPercentage: number;
|
|
1957
|
+
} | {
|
|
1958
|
+
hasRechargedInLastDays: number;
|
|
1959
|
+
} | {
|
|
1960
|
+
excludePingedToday: boolean;
|
|
1961
|
+
} | {
|
|
1962
|
+
requireLotteryOptIn: boolean;
|
|
1963
|
+
} | {
|
|
1964
|
+
requireQuizOptIn: boolean;
|
|
1965
|
+
} | {
|
|
1966
|
+
minCastCount: number;
|
|
1967
|
+
} | {
|
|
1968
|
+
orderBy: OrderBy$1;
|
|
1969
|
+
};
|
|
1970
|
+
/**
|
|
1971
|
+
* Supported chain IDs
|
|
1972
|
+
*/
|
|
1973
|
+
type SupportedChainId = 1 | 8453 | 42161;
|
|
1974
|
+
/**
|
|
1975
|
+
* Reward types for attention marketplace mode
|
|
1976
|
+
*/
|
|
1977
|
+
type RewardType = 'guaranteed' | 'lottery' | 'fcfs';
|
|
1978
|
+
/**
|
|
1979
|
+
* Quote status
|
|
1980
|
+
*/
|
|
1981
|
+
type QuoteStatus = 'pending' | 'deposit_confirmed' | 'executing' | 'completed' | 'failed' | 'expired' | 'cancelled';
|
|
1982
|
+
/**
|
|
1983
|
+
* Token distribution mode input
|
|
1984
|
+
* Used for direct token airdrops
|
|
1985
|
+
*/
|
|
1986
|
+
interface TokenDistributionInput {
|
|
1987
|
+
/** Recipient filter expression */
|
|
1988
|
+
filter: RecipientFilter$1;
|
|
1989
|
+
/** Token contract address */
|
|
1990
|
+
tokenAddress: string;
|
|
1991
|
+
/** Chain ID (1=Ethereum, 8453=Base, 42161=Arbitrum) */
|
|
1992
|
+
chainId: SupportedChainId;
|
|
1993
|
+
/** Amount per recipient in wei (as string) */
|
|
1994
|
+
amountPerRecipient: string;
|
|
1995
|
+
/** Maximum total budget in wei (as string) */
|
|
1996
|
+
budgetCap: string;
|
|
1997
|
+
/** Optional memo/note */
|
|
1998
|
+
memo?: string;
|
|
1999
|
+
/** Optional metadata (max 4KB JSON) */
|
|
2000
|
+
metadata?: Record<string, unknown>;
|
|
2001
|
+
/** TTL in seconds (60-3600, default 300) */
|
|
2002
|
+
ttlSeconds?: number;
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* Attention marketplace mode input
|
|
2006
|
+
* Used for sending beep messages with rewards
|
|
2007
|
+
*/
|
|
2008
|
+
interface AttentionMarketplaceInput {
|
|
2009
|
+
/** Message content to send */
|
|
2010
|
+
message: string;
|
|
2011
|
+
/** Direct FID targeting (optional) */
|
|
2012
|
+
recipientFids?: number[];
|
|
2013
|
+
/** Filter expression (optional, required if no recipientFids) */
|
|
2014
|
+
filter?: RecipientFilter$1;
|
|
2015
|
+
/** Budget in USD */
|
|
2016
|
+
budgetUSD: string;
|
|
2017
|
+
/** Reward distribution type */
|
|
2018
|
+
rewardType?: RewardType;
|
|
2019
|
+
/** Optional memo/note */
|
|
2020
|
+
memo?: string;
|
|
2021
|
+
/** Optional metadata (max 4KB JSON) */
|
|
2022
|
+
metadata?: Record<string, unknown>;
|
|
2023
|
+
/** TTL in seconds (60-3600, default 300) */
|
|
2024
|
+
ttlSeconds?: number;
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* Create quote input - either token distribution or attention marketplace
|
|
2028
|
+
*/
|
|
2029
|
+
type CreateQuoteInput = TokenDistributionInput | AttentionMarketplaceInput;
|
|
2030
|
+
/**
|
|
2031
|
+
* Quote response from the server
|
|
2032
|
+
*/
|
|
2033
|
+
interface Quote {
|
|
2034
|
+
/** Unique quote ID (prefixed with qt_) */
|
|
2035
|
+
id: string;
|
|
2036
|
+
/** Quote status */
|
|
2037
|
+
status: QuoteStatus;
|
|
2038
|
+
/** Number of recipients matched */
|
|
2039
|
+
recipientCount: number;
|
|
2040
|
+
/** Total amount in wei */
|
|
2041
|
+
totalAmount: string;
|
|
2042
|
+
/** Protocol fee in wei */
|
|
2043
|
+
protocolFee: string;
|
|
2044
|
+
/** Required deposit amount in wei */
|
|
2045
|
+
depositAmount: string;
|
|
2046
|
+
/** Address to deposit to */
|
|
2047
|
+
depositAddress: string;
|
|
2048
|
+
/** Chain ID for deposit */
|
|
2049
|
+
depositChainId: number;
|
|
2050
|
+
/** Token address for deposit */
|
|
2051
|
+
depositTokenAddress: string;
|
|
2052
|
+
/** When the quote expires */
|
|
2053
|
+
expiresAt: string;
|
|
2054
|
+
/** Original input parameters */
|
|
2055
|
+
input: TokenDistributionInput | AttentionMarketplaceInput;
|
|
2056
|
+
/** Creation timestamp */
|
|
2057
|
+
createdAt: string;
|
|
2058
|
+
/** Last update timestamp */
|
|
2059
|
+
updatedAt: string;
|
|
2060
|
+
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Deposit confirmation request
|
|
2063
|
+
*/
|
|
2064
|
+
interface ConfirmDepositInput {
|
|
2065
|
+
/** Transaction hash of the deposit */
|
|
2066
|
+
txHash: string;
|
|
2067
|
+
}
|
|
2068
|
+
/**
|
|
2069
|
+
* Deposit confirmation response
|
|
2070
|
+
*/
|
|
2071
|
+
interface ConfirmDepositResult {
|
|
2072
|
+
/** Quote ID */
|
|
2073
|
+
quoteId: string;
|
|
2074
|
+
/** New status (should be 'confirmed') */
|
|
2075
|
+
status: 'confirmed' | 'insufficient';
|
|
2076
|
+
/** Detected deposit amount */
|
|
2077
|
+
detectedAmount: string;
|
|
2078
|
+
/** Whether the deposit is sufficient */
|
|
2079
|
+
sufficient: boolean;
|
|
2080
|
+
/** When deposit was confirmed */
|
|
2081
|
+
confirmedAt: string;
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Execution response
|
|
2085
|
+
*/
|
|
2086
|
+
interface ExecuteResult {
|
|
2087
|
+
/** Quote ID */
|
|
2088
|
+
quoteId: string;
|
|
2089
|
+
/** Execution status */
|
|
2090
|
+
status: 'executing' | 'completed' | 'failed';
|
|
2091
|
+
/** Estimated completion time */
|
|
2092
|
+
estimatedCompletionAt?: string;
|
|
2093
|
+
/** Batch ID for tracking */
|
|
2094
|
+
batchId?: string;
|
|
2095
|
+
/** Error message if failed */
|
|
2096
|
+
error?: string;
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Receipt for a completed distribution
|
|
2100
|
+
*/
|
|
2101
|
+
interface Receipt {
|
|
2102
|
+
/** Receipt ID */
|
|
2103
|
+
id: string;
|
|
2104
|
+
/** Quote ID */
|
|
2105
|
+
quoteId: string;
|
|
2106
|
+
/** Final status */
|
|
2107
|
+
status: 'completed' | 'partial' | 'failed';
|
|
2108
|
+
/** Total amount distributed */
|
|
2109
|
+
totalDistributed: string;
|
|
2110
|
+
/** Number of successful transfers */
|
|
2111
|
+
successfulTransfers: number;
|
|
2112
|
+
/** Number of failed transfers */
|
|
2113
|
+
failedTransfers: number;
|
|
2114
|
+
/** Transaction hashes */
|
|
2115
|
+
transactionHashes: string[];
|
|
2116
|
+
/** Completion timestamp */
|
|
2117
|
+
completedAt: string;
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2120
|
+
* API Key creation input
|
|
2121
|
+
*/
|
|
2122
|
+
interface CreateApiKeyInput {
|
|
2123
|
+
/** Human-readable name */
|
|
2124
|
+
name: string;
|
|
2125
|
+
/** Optional expiration date */
|
|
2126
|
+
expiresAt?: string;
|
|
2127
|
+
}
|
|
2128
|
+
/**
|
|
2129
|
+
* API Key response
|
|
2130
|
+
*/
|
|
2131
|
+
interface ApiKey {
|
|
2132
|
+
/** Key ID */
|
|
2133
|
+
id: string;
|
|
2134
|
+
/** Human-readable name */
|
|
2135
|
+
name: string;
|
|
2136
|
+
/** The actual key (only returned on creation) */
|
|
2137
|
+
key?: string;
|
|
2138
|
+
/** Masked version of the key */
|
|
2139
|
+
maskedKey: string;
|
|
2140
|
+
/** Whether the key is active */
|
|
2141
|
+
isActive: boolean;
|
|
2142
|
+
/** When the key expires (if set) */
|
|
2143
|
+
expiresAt?: string;
|
|
2144
|
+
/** Last time the key was used */
|
|
2145
|
+
lastUsedAt?: string;
|
|
2146
|
+
/** Usage count */
|
|
2147
|
+
usageCount: number;
|
|
2148
|
+
/** Creation timestamp */
|
|
2149
|
+
createdAt: string;
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* SDK Configuration options
|
|
2153
|
+
*/
|
|
2154
|
+
interface BeeperConfig {
|
|
2155
|
+
/** API key for authentication (Bearer token) */
|
|
2156
|
+
apiKey: string;
|
|
2157
|
+
/** Environment to use */
|
|
2158
|
+
environment?: 'production' | 'staging' | 'development';
|
|
2159
|
+
/** Custom base URL (overrides environment) */
|
|
2160
|
+
baseUrl?: string;
|
|
2161
|
+
/** Request timeout in milliseconds */
|
|
2162
|
+
timeout?: number;
|
|
2163
|
+
/** Enable debug logging */
|
|
2164
|
+
debug?: boolean;
|
|
2165
|
+
/** Custom fetch implementation */
|
|
2166
|
+
fetch?: typeof fetch;
|
|
2167
|
+
/** Maximum retries for failed requests */
|
|
2168
|
+
maxRetries?: number;
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* Health check response
|
|
2172
|
+
*/
|
|
2173
|
+
interface Health {
|
|
2174
|
+
/** Service status */
|
|
2175
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
2176
|
+
/** Service version */
|
|
2177
|
+
version: string;
|
|
2178
|
+
/** Timestamp of check */
|
|
2179
|
+
timestamp: string;
|
|
2180
|
+
/** Status of individual services */
|
|
2181
|
+
services: {
|
|
2182
|
+
database: 'up' | 'down';
|
|
2183
|
+
queue: 'up' | 'down';
|
|
2184
|
+
oracle: 'up' | 'down';
|
|
2185
|
+
};
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* API Error response structure
|
|
2189
|
+
*/
|
|
2190
|
+
interface ApiError {
|
|
2191
|
+
error: {
|
|
2192
|
+
code: string;
|
|
2193
|
+
message: string;
|
|
2194
|
+
details?: Record<string, unknown>;
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* FilterBuilder - Fluent API for building SDK filter expressions
|
|
2200
|
+
*
|
|
2201
|
+
* Used to construct filter objects for the /api/v1/sdk/send/quotes endpoint.
|
|
2202
|
+
* Supports logical combinators (and, or, not) and various filter types.
|
|
2203
|
+
*
|
|
2204
|
+
* @example
|
|
2205
|
+
* ```typescript
|
|
2206
|
+
* import { FilterBuilder } from '@beeper/sdk';
|
|
2207
|
+
*
|
|
2208
|
+
* const filter = FilterBuilder.and([
|
|
2209
|
+
* FilterBuilder.platform('farcaster'),
|
|
2210
|
+
* FilterBuilder.activeInLastDays(30),
|
|
2211
|
+
* FilterBuilder.neynarScoreMin(0.5),
|
|
2212
|
+
* FilterBuilder.or([
|
|
2213
|
+
* FilterBuilder.minFollowers(1000),
|
|
2214
|
+
* FilterBuilder.followersOf(12345),
|
|
2215
|
+
* ]),
|
|
2216
|
+
* ]);
|
|
2217
|
+
*
|
|
2218
|
+
* // Use in API request
|
|
2219
|
+
* const draft = client.createDraft({
|
|
2220
|
+
* filter: filter.toJSON(),
|
|
2221
|
+
* // ... other params
|
|
2222
|
+
* });
|
|
2223
|
+
* ```
|
|
2224
|
+
*/
|
|
2225
|
+
/** Supported blockchain chains */
|
|
2226
|
+
type WalletChain = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'optimism';
|
|
2227
|
+
/** Supported platforms */
|
|
2228
|
+
type Platform = 'all' | 'farcaster' | 'twitter';
|
|
2229
|
+
/** Extended spam label for spamLabel filter */
|
|
2230
|
+
type SpamLabelOption = 'not_spam_only' | 'spam_only' | 'all';
|
|
2231
|
+
/** Timezone filter options */
|
|
2232
|
+
interface TimezoneOptions {
|
|
2233
|
+
/** UTC offset in hours (e.g., -5 for EST, 9 for JST) */
|
|
2234
|
+
offset: number;
|
|
2235
|
+
/** Range in hours (optional, for fuzzy matching) */
|
|
2236
|
+
range?: number;
|
|
2237
|
+
}
|
|
2238
|
+
/** Order by options for result sorting */
|
|
2239
|
+
type OrderByOption = 'attention_price_asc' | 'attention_price_desc' | 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'recent_activity' | 'battery_desc' | 'random';
|
|
2240
|
+
/** Token holder filter options */
|
|
2241
|
+
interface TokenHolderOptions {
|
|
2242
|
+
/** Token contract address (0x prefixed) */
|
|
2243
|
+
tokenAddress: string;
|
|
2244
|
+
/** Chain ID (1 = Ethereum, 8453 = Base, 42161 = Arbitrum) */
|
|
2245
|
+
chainId: number;
|
|
2246
|
+
/** Minimum balance in wei (optional) */
|
|
2247
|
+
minBalance?: string;
|
|
2248
|
+
}
|
|
2249
|
+
/** Base filter expression that all filters extend */
|
|
2250
|
+
type FilterExpressionJSON = {
|
|
2251
|
+
and: FilterExpressionJSON[];
|
|
2252
|
+
} | {
|
|
2253
|
+
or: FilterExpressionJSON[];
|
|
2254
|
+
} | {
|
|
2255
|
+
not: FilterExpressionJSON;
|
|
2256
|
+
} | {
|
|
2257
|
+
hasTag: string;
|
|
2258
|
+
} | {
|
|
2259
|
+
hasAnyTag: string[];
|
|
2260
|
+
} | {
|
|
2261
|
+
hasAllTags: string[];
|
|
2262
|
+
} | {
|
|
2263
|
+
walletChain: WalletChain;
|
|
2264
|
+
} | {
|
|
2265
|
+
walletHasToken: {
|
|
2266
|
+
tokenAddress: string;
|
|
2267
|
+
chainId: number;
|
|
2268
|
+
};
|
|
2269
|
+
} | {
|
|
2270
|
+
walletMinBalance: {
|
|
2271
|
+
tokenAddress: string;
|
|
2272
|
+
chainId: number;
|
|
2273
|
+
minBalance: string;
|
|
2274
|
+
};
|
|
2275
|
+
} | {
|
|
2276
|
+
userId: string;
|
|
2277
|
+
} | {
|
|
2278
|
+
userIds: string[];
|
|
2279
|
+
} | {
|
|
2280
|
+
fid: number;
|
|
2281
|
+
} | {
|
|
2282
|
+
fids: number[];
|
|
2283
|
+
} | {
|
|
2284
|
+
createdAfter: string;
|
|
2285
|
+
} | {
|
|
2286
|
+
createdBefore: string;
|
|
2287
|
+
} | {
|
|
2288
|
+
lastActiveAfter: string;
|
|
2289
|
+
} | {
|
|
2290
|
+
completedReward: string;
|
|
2291
|
+
} | {
|
|
2292
|
+
notCompletedReward: string;
|
|
2293
|
+
} | {
|
|
2294
|
+
completedQuest: string;
|
|
2295
|
+
} | {
|
|
2296
|
+
hasAchievement: string;
|
|
2297
|
+
} | {
|
|
2298
|
+
platform: Platform;
|
|
2299
|
+
} | {
|
|
2300
|
+
activeInLastDays: number;
|
|
2301
|
+
} | {
|
|
2302
|
+
neynarScoreMin: number;
|
|
2303
|
+
} | {
|
|
2304
|
+
neynarScoreMax: number;
|
|
2305
|
+
} | {
|
|
2306
|
+
neynarScoreRange: {
|
|
2307
|
+
min?: number;
|
|
2308
|
+
max?: number;
|
|
2309
|
+
};
|
|
2310
|
+
} | {
|
|
2311
|
+
minFollowers: number;
|
|
2312
|
+
} | {
|
|
2313
|
+
maxFollowers: number;
|
|
2314
|
+
} | {
|
|
2315
|
+
followerRange: {
|
|
2316
|
+
min?: number;
|
|
2317
|
+
max?: number;
|
|
2318
|
+
};
|
|
2319
|
+
} | {
|
|
2320
|
+
followersOf: number;
|
|
2321
|
+
} | {
|
|
2322
|
+
mutualsWith: number;
|
|
2323
|
+
} | {
|
|
2324
|
+
maxAttentionPriceUsd: number;
|
|
2325
|
+
} | {
|
|
2326
|
+
tokenHolders: Array<{
|
|
2327
|
+
tokenAddress: string;
|
|
2328
|
+
chainId: number;
|
|
2329
|
+
minBalance?: string;
|
|
2330
|
+
}>;
|
|
2331
|
+
} | {
|
|
2332
|
+
cachedTokenHolders: Array<{
|
|
2333
|
+
tokenAddress: string;
|
|
2334
|
+
chainId: number;
|
|
2335
|
+
minBalance?: string;
|
|
2336
|
+
}>;
|
|
2337
|
+
} | {
|
|
2338
|
+
spamLabel: SpamLabelOption;
|
|
2339
|
+
} | {
|
|
2340
|
+
signalTokens: string[];
|
|
2341
|
+
} | {
|
|
2342
|
+
hasBaseWallet: boolean;
|
|
2343
|
+
} | {
|
|
2344
|
+
hasVerifiedWallet: boolean;
|
|
2345
|
+
} | {
|
|
2346
|
+
verifiedOnly: boolean;
|
|
2347
|
+
} | {
|
|
2348
|
+
proSubscriptionRequired: boolean;
|
|
2349
|
+
} | {
|
|
2350
|
+
minTenureDays: number;
|
|
2351
|
+
} | {
|
|
2352
|
+
timezones: Array<{
|
|
2353
|
+
offset: number;
|
|
2354
|
+
range?: number;
|
|
2355
|
+
}>;
|
|
2356
|
+
} | {
|
|
2357
|
+
countries: Array<{
|
|
2358
|
+
code: string;
|
|
2359
|
+
}>;
|
|
2360
|
+
} | {
|
|
2361
|
+
quotientScoreMin: number;
|
|
2362
|
+
} | {
|
|
2363
|
+
quotientScoreMax: number;
|
|
2364
|
+
} | {
|
|
2365
|
+
quotientScoreRange: {
|
|
2366
|
+
min?: number;
|
|
2367
|
+
max?: number;
|
|
2368
|
+
};
|
|
2369
|
+
} | {
|
|
2370
|
+
minBatteryPercentage: number;
|
|
2371
|
+
} | {
|
|
2372
|
+
hasRechargedInLastDays: number;
|
|
2373
|
+
} | {
|
|
2374
|
+
excludePingedToday: boolean;
|
|
2375
|
+
} | {
|
|
2376
|
+
requireLotteryOptIn: boolean;
|
|
2377
|
+
} | {
|
|
2378
|
+
requireQuizOptIn: boolean;
|
|
2379
|
+
} | {
|
|
2380
|
+
minCastCount: number;
|
|
2381
|
+
} | {
|
|
2382
|
+
orderBy: OrderByOption;
|
|
2383
|
+
} | {
|
|
2384
|
+
limit: number;
|
|
2385
|
+
};
|
|
2386
|
+
/**
|
|
2387
|
+
* FilterExpression class - wraps a filter JSON object with builder methods
|
|
2388
|
+
*/
|
|
2389
|
+
declare class FilterExpression$1 {
|
|
2390
|
+
private readonly expression;
|
|
2391
|
+
constructor(expression: FilterExpressionJSON);
|
|
2392
|
+
/**
|
|
2393
|
+
* Convert the filter expression to JSON format for API requests
|
|
2394
|
+
*/
|
|
2395
|
+
toJSON(): FilterExpressionJSON;
|
|
2396
|
+
/**
|
|
2397
|
+
* Combine this filter with another using AND logic
|
|
2398
|
+
*/
|
|
2399
|
+
and(other: FilterExpression$1): FilterExpression$1;
|
|
2400
|
+
/**
|
|
2401
|
+
* Combine this filter with another using OR logic
|
|
2402
|
+
*/
|
|
2403
|
+
or(other: FilterExpression$1): FilterExpression$1;
|
|
2404
|
+
/**
|
|
2405
|
+
* Negate this filter
|
|
2406
|
+
*/
|
|
2407
|
+
not(): FilterExpression$1;
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* FilterBuilder - Static factory methods for creating filter expressions
|
|
2411
|
+
*
|
|
2412
|
+
* All methods return FilterExpression objects that can be combined
|
|
2413
|
+
* using and(), or(), and not() methods.
|
|
2414
|
+
*/
|
|
2415
|
+
declare class FilterBuilder {
|
|
2416
|
+
/**
|
|
2417
|
+
* Combine multiple filters with AND logic (all must match)
|
|
2418
|
+
* @param filters - Array of filter expressions to combine
|
|
2419
|
+
*/
|
|
2420
|
+
static and(filters: FilterExpression$1[]): FilterExpression$1;
|
|
2421
|
+
/**
|
|
2422
|
+
* Combine multiple filters with OR logic (any must match)
|
|
2423
|
+
* @param filters - Array of filter expressions to combine
|
|
2424
|
+
*/
|
|
2425
|
+
static or(filters: FilterExpression$1[]): FilterExpression$1;
|
|
2426
|
+
/**
|
|
2427
|
+
* Negate a filter (matches users who do NOT match the filter)
|
|
2428
|
+
* @param filter - Filter expression to negate
|
|
2429
|
+
*/
|
|
2430
|
+
static not(filter: FilterExpression$1): FilterExpression$1;
|
|
2431
|
+
/**
|
|
2432
|
+
* Filter by platform
|
|
2433
|
+
* @param p - Platform to target: 'all', 'farcaster', or 'twitter'
|
|
2434
|
+
*/
|
|
2435
|
+
static platform(p: Platform): FilterExpression$1;
|
|
2436
|
+
/**
|
|
2437
|
+
* Filter users who have been active within the last N days
|
|
2438
|
+
* @param days - Number of days (1-365)
|
|
2439
|
+
*/
|
|
2440
|
+
static activeInLastDays(days: number): FilterExpression$1;
|
|
2441
|
+
/**
|
|
2442
|
+
* Filter users with Neynar score >= minimum
|
|
2443
|
+
* @param score - Minimum score (0-1)
|
|
2444
|
+
*/
|
|
2445
|
+
static neynarScoreMin(score: number): FilterExpression$1;
|
|
2446
|
+
/**
|
|
2447
|
+
* Filter users with Neynar score <= maximum
|
|
2448
|
+
* @param score - Maximum score (0-1)
|
|
2449
|
+
*/
|
|
2450
|
+
static neynarScoreMax(score: number): FilterExpression$1;
|
|
2451
|
+
/**
|
|
2452
|
+
* Filter users with Neynar score in a range
|
|
2453
|
+
* @param min - Minimum score (0-1, optional)
|
|
2454
|
+
* @param max - Maximum score (0-1, optional)
|
|
2455
|
+
*/
|
|
2456
|
+
static neynarScoreRange(min?: number, max?: number): FilterExpression$1;
|
|
2457
|
+
/**
|
|
2458
|
+
* Filter by spam label
|
|
2459
|
+
* @param label - Spam label filter: 'not_spam_only', 'spam_only', or 'all'
|
|
2460
|
+
*/
|
|
2461
|
+
static spamLabel(label: SpamLabelOption): FilterExpression$1;
|
|
2462
|
+
/**
|
|
2463
|
+
* Filter to exclude spam users (convenience method)
|
|
2464
|
+
* @deprecated Use spamLabel('not_spam_only') instead
|
|
2465
|
+
*/
|
|
2466
|
+
static excludeSpam(): FilterExpression$1;
|
|
2467
|
+
/**
|
|
2468
|
+
* Filter users with at least N followers
|
|
2469
|
+
* @param count - Minimum follower count
|
|
2470
|
+
*/
|
|
2471
|
+
static minFollowers(count: number): FilterExpression$1;
|
|
2472
|
+
/**
|
|
2473
|
+
* Filter users with at most N followers
|
|
2474
|
+
* @param count - Maximum follower count
|
|
2475
|
+
*/
|
|
2476
|
+
static maxFollowers(count: number): FilterExpression$1;
|
|
2477
|
+
/**
|
|
2478
|
+
* Filter users with follower count in a range
|
|
2479
|
+
* @param min - Minimum follower count (optional)
|
|
2480
|
+
* @param max - Maximum follower count (optional)
|
|
2481
|
+
*/
|
|
2482
|
+
static followerRange(min?: number, max?: number): FilterExpression$1;
|
|
2483
|
+
/**
|
|
2484
|
+
* Filter users who follow a specific FID
|
|
2485
|
+
* @param fid - Farcaster ID to check followers of
|
|
2486
|
+
*/
|
|
2487
|
+
static followersOf(fid: number): FilterExpression$1;
|
|
2488
|
+
/**
|
|
2489
|
+
* Filter users who have mutual follows with a specific FID
|
|
2490
|
+
* @param fid - Farcaster ID to check mutual follows with
|
|
2491
|
+
*/
|
|
2492
|
+
static mutualsWith(fid: number): FilterExpression$1;
|
|
2493
|
+
/**
|
|
2494
|
+
* Filter users with attention price <= maximum USD
|
|
2495
|
+
* @param usd - Maximum attention price in USD
|
|
2496
|
+
*/
|
|
2497
|
+
static maxAttentionPriceUsd(usd: number): FilterExpression$1;
|
|
2498
|
+
/**
|
|
2499
|
+
* Filter users who hold a specific token
|
|
2500
|
+
* @param opts - Token holder options (tokenAddress, chainId, optional minBalance)
|
|
2501
|
+
*/
|
|
2502
|
+
static tokenHolder(opts: TokenHolderOptions): FilterExpression$1;
|
|
2503
|
+
/**
|
|
2504
|
+
* Filter users who hold any of the specified tokens (multiple token filter)
|
|
2505
|
+
* @param opts - Array of token holder options (max 10)
|
|
2506
|
+
*/
|
|
2507
|
+
static tokenHolders(opts: TokenHolderOptions[]): FilterExpression$1;
|
|
2508
|
+
/**
|
|
2509
|
+
* Filter users who hold any of the specified tokens (uses pre-synced cache for faster queries)
|
|
2510
|
+
* @param opts - Array of token holder options (max 10)
|
|
2511
|
+
*/
|
|
2512
|
+
static cachedTokenHolders(opts: TokenHolderOptions[]): FilterExpression$1;
|
|
2513
|
+
/**
|
|
2514
|
+
* Filter users who have configured specific signal tokens
|
|
2515
|
+
* @param tokenAddresses - Array of token contract addresses (max 20)
|
|
2516
|
+
*/
|
|
2517
|
+
static signalTokens(tokenAddresses: string[]): FilterExpression$1;
|
|
2518
|
+
/**
|
|
2519
|
+
* Filter users with a wallet on a specific chain
|
|
2520
|
+
* @param chain - Blockchain chain
|
|
2521
|
+
*/
|
|
2522
|
+
static walletChain(chain: WalletChain): FilterExpression$1;
|
|
2523
|
+
/**
|
|
2524
|
+
* Filter users who have a Base chain wallet
|
|
2525
|
+
*/
|
|
2526
|
+
static hasBaseWallet(): FilterExpression$1;
|
|
2527
|
+
/**
|
|
2528
|
+
* Filter users who have a verified wallet
|
|
2529
|
+
*/
|
|
2530
|
+
static hasVerifiedWallet(): FilterExpression$1;
|
|
2531
|
+
/**
|
|
2532
|
+
* Filter to only verified users
|
|
2533
|
+
*/
|
|
2534
|
+
static verifiedOnly(): FilterExpression$1;
|
|
2535
|
+
/**
|
|
2536
|
+
* Filter to only users with Pro subscription
|
|
2537
|
+
*/
|
|
2538
|
+
static proSubscriptionRequired(): FilterExpression$1;
|
|
2539
|
+
/**
|
|
2540
|
+
* Filter users with minimum account tenure
|
|
2541
|
+
* @param days - Minimum number of days since account creation
|
|
2542
|
+
*/
|
|
2543
|
+
static minTenureDays(days: number): FilterExpression$1;
|
|
2544
|
+
/**
|
|
2545
|
+
* Filter by specific user ID
|
|
2546
|
+
* @param id - User ID
|
|
2547
|
+
*/
|
|
2548
|
+
static userId(id: string): FilterExpression$1;
|
|
2549
|
+
/**
|
|
2550
|
+
* Filter by multiple user IDs
|
|
2551
|
+
* @param ids - Array of user IDs (max 1000)
|
|
2552
|
+
*/
|
|
2553
|
+
static userIds(ids: string[]): FilterExpression$1;
|
|
2554
|
+
/**
|
|
2555
|
+
* Filter by specific Farcaster ID
|
|
2556
|
+
* @param fid - Farcaster ID
|
|
2557
|
+
*/
|
|
2558
|
+
static fid(fid: number): FilterExpression$1;
|
|
2559
|
+
/**
|
|
2560
|
+
* Filter by multiple Farcaster IDs
|
|
2561
|
+
* @param fids - Array of Farcaster IDs (max 1000)
|
|
2562
|
+
*/
|
|
2563
|
+
static fids(fids: number[]): FilterExpression$1;
|
|
2564
|
+
/**
|
|
2565
|
+
* Filter users with a specific tag
|
|
2566
|
+
* @param tag - Tag name (max 64 chars)
|
|
2567
|
+
*/
|
|
2568
|
+
static hasTag(tag: string): FilterExpression$1;
|
|
2569
|
+
/**
|
|
2570
|
+
* Filter users with any of the specified tags
|
|
2571
|
+
* @param tags - Array of tag names (1-20 tags)
|
|
2572
|
+
*/
|
|
2573
|
+
static hasAnyTag(tags: string[]): FilterExpression$1;
|
|
2574
|
+
/**
|
|
2575
|
+
* Filter users with all of the specified tags
|
|
2576
|
+
* @param tags - Array of tag names (1-20 tags)
|
|
2577
|
+
*/
|
|
2578
|
+
static hasAllTags(tags: string[]): FilterExpression$1;
|
|
2579
|
+
/**
|
|
2580
|
+
* Filter users created after a specific date
|
|
2581
|
+
* @param date - Date or ISO 8601 string
|
|
2582
|
+
*/
|
|
2583
|
+
static createdAfter(date: Date | string): FilterExpression$1;
|
|
2584
|
+
/**
|
|
2585
|
+
* Filter users created before a specific date
|
|
2586
|
+
* @param date - Date or ISO 8601 string
|
|
2587
|
+
*/
|
|
2588
|
+
static createdBefore(date: Date | string): FilterExpression$1;
|
|
2589
|
+
/**
|
|
2590
|
+
* Filter users who were last active after a specific date
|
|
2591
|
+
* @param date - Date or ISO 8601 string
|
|
2592
|
+
*/
|
|
2593
|
+
static lastActiveAfter(date: Date | string): FilterExpression$1;
|
|
2594
|
+
/**
|
|
2595
|
+
* Filter users who completed a specific reward
|
|
2596
|
+
* @param rewardId - Reward ID
|
|
2597
|
+
*/
|
|
2598
|
+
static completedReward(rewardId: string): FilterExpression$1;
|
|
2599
|
+
/**
|
|
2600
|
+
* Filter users who have NOT completed a specific reward
|
|
2601
|
+
* @param rewardId - Reward ID
|
|
2602
|
+
*/
|
|
2603
|
+
static notCompletedReward(rewardId: string): FilterExpression$1;
|
|
2604
|
+
/**
|
|
2605
|
+
* Filter users who completed a specific quest
|
|
2606
|
+
* @param questId - Quest ID
|
|
2607
|
+
*/
|
|
2608
|
+
static completedQuest(questId: string): FilterExpression$1;
|
|
2609
|
+
/**
|
|
2610
|
+
* Filter users who have a specific achievement
|
|
2611
|
+
* @param achievementId - Achievement ID
|
|
2612
|
+
*/
|
|
2613
|
+
static hasAchievement(achievementId: string): FilterExpression$1;
|
|
2614
|
+
/**
|
|
2615
|
+
* Filter users by timezone
|
|
2616
|
+
* @param zones - Array of timezone options with UTC offset and optional range (max 24)
|
|
2617
|
+
*/
|
|
2618
|
+
static timezones(zones: TimezoneOptions[]): FilterExpression$1;
|
|
2619
|
+
/**
|
|
2620
|
+
* Filter users by country (ISO 3166-1 alpha-2 codes)
|
|
2621
|
+
* @param codes - Array of ISO 3166-1 alpha-2 country codes (e.g., ['US', 'CA', 'GB'])
|
|
2622
|
+
*/
|
|
2623
|
+
static countries(codes: string[]): FilterExpression$1;
|
|
2624
|
+
/**
|
|
2625
|
+
* Filter users with quotient score >= minimum
|
|
2626
|
+
* @param score - Minimum quotient score (0-1, where 0.5=Casual, 0.75=Influential, 0.9=Exceptional)
|
|
2627
|
+
*/
|
|
2628
|
+
static quotientScoreMin(score: number): FilterExpression$1;
|
|
2629
|
+
/**
|
|
2630
|
+
* Filter users with quotient score <= maximum
|
|
2631
|
+
* @param score - Maximum quotient score (0-1)
|
|
2632
|
+
*/
|
|
2633
|
+
static quotientScoreMax(score: number): FilterExpression$1;
|
|
2634
|
+
/**
|
|
2635
|
+
* Filter users with quotient score in a range
|
|
2636
|
+
* @param min - Minimum score (0-1, optional)
|
|
2637
|
+
* @param max - Maximum score (0-1, optional)
|
|
2638
|
+
*/
|
|
2639
|
+
static quotientScoreRange(min?: number, max?: number): FilterExpression$1;
|
|
2640
|
+
/**
|
|
2641
|
+
* Filter users with minimum battery percentage
|
|
2642
|
+
* @param pct - Minimum battery percentage (0-100)
|
|
2643
|
+
*/
|
|
2644
|
+
static minBatteryPercentage(pct: number): FilterExpression$1;
|
|
2645
|
+
/**
|
|
2646
|
+
* Filter users who have recharged their battery within the last N days
|
|
2647
|
+
* @param days - Number of days
|
|
2648
|
+
*/
|
|
2649
|
+
static hasRechargedInLastDays(days: number): FilterExpression$1;
|
|
2650
|
+
/**
|
|
2651
|
+
* Exclude users who have already been pinged today
|
|
2652
|
+
*/
|
|
2653
|
+
static excludePingedToday(): FilterExpression$1;
|
|
2654
|
+
/**
|
|
2655
|
+
* Filter to only users who have opted into lottery rewards
|
|
2656
|
+
*/
|
|
2657
|
+
static requireLotteryOptIn(): FilterExpression$1;
|
|
2658
|
+
/**
|
|
2659
|
+
* Filter to only users who have opted into quiz rewards
|
|
2660
|
+
*/
|
|
2661
|
+
static requireQuizOptIn(): FilterExpression$1;
|
|
2662
|
+
/**
|
|
2663
|
+
* Filter users with minimum cast count
|
|
2664
|
+
* @param count - Minimum number of casts
|
|
2665
|
+
*/
|
|
2666
|
+
static minCastCount(count: number): FilterExpression$1;
|
|
2667
|
+
/**
|
|
2668
|
+
* Set the order for results
|
|
2669
|
+
* @param order - Order option for sorting results
|
|
2670
|
+
*/
|
|
2671
|
+
static orderBy(order: OrderByOption): FilterExpression$1;
|
|
2672
|
+
/**
|
|
2673
|
+
* Limit the number of results
|
|
2674
|
+
* @param n - Maximum number of results
|
|
2675
|
+
* @deprecated Limit is controlled by budgetCap, not this filter. This method will be removed.
|
|
2676
|
+
*/
|
|
2677
|
+
static limit(n: number): FilterExpression$1;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* All error codes for the Beeper SDK
|
|
2682
|
+
*/
|
|
2683
|
+
declare const ErrorCodes: {
|
|
2684
|
+
readonly QUOTE_EXPIRED: "QUOTE_EXPIRED";
|
|
2685
|
+
readonly QUOTE_NOT_FOUND: "QUOTE_NOT_FOUND";
|
|
2686
|
+
readonly QUOTE_INVALID: "QUOTE_INVALID";
|
|
2687
|
+
readonly INVALID_RECIPIENT: "INVALID_RECIPIENT";
|
|
2688
|
+
readonly RECIPIENT_NOT_FOUND: "RECIPIENT_NOT_FOUND";
|
|
2689
|
+
readonly INVALID_FILTER: "INVALID_FILTER";
|
|
2690
|
+
readonly FILTER_SYNTAX_ERROR: "FILTER_SYNTAX_ERROR";
|
|
2691
|
+
readonly BUDGET_TOO_LOW: "BUDGET_TOO_LOW";
|
|
2692
|
+
readonly BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
|
|
2693
|
+
readonly PAYMENT_NOT_FOUND: "PAYMENT_NOT_FOUND";
|
|
2694
|
+
readonly PAYMENT_INSUFFICIENT: "PAYMENT_INSUFFICIENT";
|
|
2695
|
+
readonly PAYMENT_FAILED: "PAYMENT_FAILED";
|
|
2696
|
+
readonly EXECUTION_ALREADY_TRIGGERED: "EXECUTION_ALREADY_TRIGGERED";
|
|
2697
|
+
readonly EXECUTION_FAILED: "EXECUTION_FAILED";
|
|
2698
|
+
readonly EXECUTION_PENDING: "EXECUTION_PENDING";
|
|
2699
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
2700
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
2701
|
+
readonly FORBIDDEN: "FORBIDDEN";
|
|
2702
|
+
readonly API_KEY_INVALID: "API_KEY_INVALID";
|
|
2703
|
+
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
2704
|
+
readonly TIMEOUT: "TIMEOUT";
|
|
2705
|
+
readonly CONNECTION_REFUSED: "CONNECTION_REFUSED";
|
|
2706
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
2707
|
+
readonly SCHEMA_VALIDATION_FAILED: "SCHEMA_VALIDATION_FAILED";
|
|
2708
|
+
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
2709
|
+
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
2710
|
+
readonly DRAFT_NOT_FOUND: "DRAFT_NOT_FOUND";
|
|
2711
|
+
readonly DRAFT_INVALID: "DRAFT_INVALID";
|
|
2712
|
+
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
2713
|
+
};
|
|
2714
|
+
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
2715
|
+
/**
|
|
2716
|
+
* Error codes that indicate the operation can be retried
|
|
2717
|
+
*/
|
|
2718
|
+
declare const RETRYABLE_ERROR_CODES: readonly ErrorCode[];
|
|
2719
|
+
/**
|
|
2720
|
+
* Check if an error code is retryable
|
|
2721
|
+
*/
|
|
2722
|
+
declare function isRetryableCode(code: ErrorCode): boolean;
|
|
2723
|
+
/**
|
|
2724
|
+
* HTTP status code to error code mapping
|
|
2725
|
+
*/
|
|
2726
|
+
declare const HTTP_STATUS_TO_ERROR_CODE: Record<number, ErrorCode>;
|
|
2727
|
+
|
|
2728
|
+
/**
|
|
2729
|
+
* Additional context that may be included with errors
|
|
2730
|
+
*/
|
|
2731
|
+
interface ErrorContext {
|
|
2732
|
+
/** The request ID from the server */
|
|
2733
|
+
requestId?: string | undefined;
|
|
2734
|
+
/** HTTP status code if from an HTTP response */
|
|
2735
|
+
statusCode?: number | undefined;
|
|
2736
|
+
/** The endpoint that was called */
|
|
2737
|
+
endpoint?: string | undefined;
|
|
2738
|
+
/** Additional details from the API */
|
|
2739
|
+
details?: Record<string, unknown> | undefined;
|
|
2740
|
+
/** Retry-After header value in seconds */
|
|
2741
|
+
retryAfter?: number | undefined;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* Options for creating a BeeperError
|
|
2745
|
+
*/
|
|
2746
|
+
interface BeeperErrorOptions {
|
|
2747
|
+
code: ErrorCode;
|
|
2748
|
+
message: string;
|
|
2749
|
+
cause?: Error | undefined;
|
|
2750
|
+
context?: ErrorContext | undefined;
|
|
2751
|
+
retryable?: boolean | undefined;
|
|
2752
|
+
}
|
|
2753
|
+
/**
|
|
2754
|
+
* Base error class for all Beeper SDK errors
|
|
2755
|
+
*/
|
|
2756
|
+
declare class BeeperError extends Error {
|
|
2757
|
+
/** Error code identifying the type of error */
|
|
2758
|
+
readonly code: ErrorCode;
|
|
2759
|
+
/** Whether this error can be retried */
|
|
2760
|
+
readonly retryable: boolean;
|
|
2761
|
+
/** Additional context about the error */
|
|
2762
|
+
readonly context: ErrorContext;
|
|
2763
|
+
/** The original error that caused this error */
|
|
2764
|
+
readonly cause?: Error | undefined;
|
|
2765
|
+
constructor(options: BeeperErrorOptions);
|
|
2766
|
+
/**
|
|
2767
|
+
* Create a string representation of the error
|
|
2768
|
+
*/
|
|
2769
|
+
toString(): string;
|
|
2770
|
+
/**
|
|
2771
|
+
* Convert to a plain object for logging/serialization
|
|
2772
|
+
*/
|
|
2773
|
+
toJSON(): Record<string, unknown>;
|
|
2774
|
+
/**
|
|
2775
|
+
* Create a network error
|
|
2776
|
+
*/
|
|
2777
|
+
static networkError(message: string, cause?: Error | undefined): BeeperError;
|
|
2778
|
+
/**
|
|
2779
|
+
* Create a timeout error
|
|
2780
|
+
*/
|
|
2781
|
+
static timeout(endpoint: string, timeoutMs: number): BeeperError;
|
|
2782
|
+
/**
|
|
2783
|
+
* Create an unauthorized error
|
|
2784
|
+
*/
|
|
2785
|
+
static unauthorized(message?: string): BeeperError;
|
|
2786
|
+
/**
|
|
2787
|
+
* Create a rate limited error
|
|
2788
|
+
*/
|
|
2789
|
+
static rateLimited(retryAfter?: number | undefined): BeeperError;
|
|
2790
|
+
/**
|
|
2791
|
+
* Create a validation error
|
|
2792
|
+
*/
|
|
2793
|
+
static validation(message: string, details?: Record<string, unknown> | undefined): BeeperError;
|
|
2794
|
+
/**
|
|
2795
|
+
* Create a quote expired error
|
|
2796
|
+
*/
|
|
2797
|
+
static quoteExpired(quoteId: string): BeeperError;
|
|
2798
|
+
/**
|
|
2799
|
+
* Create from an HTTP response
|
|
2800
|
+
*/
|
|
2801
|
+
static fromHttpResponse(statusCode: number, body: unknown, requestId?: string | undefined): BeeperError;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* Transfer status
|
|
2806
|
+
*/
|
|
2807
|
+
declare const TransferStatusSchema: z.ZodEnum<["success", "failed"]>;
|
|
2808
|
+
/**
|
|
2809
|
+
* Receipt transfer schema
|
|
2810
|
+
*/
|
|
2811
|
+
declare const ReceiptTransferSchema: z.ZodObject<{
|
|
2812
|
+
recipient: z.ZodString;
|
|
2813
|
+
amount: z.ZodString;
|
|
2814
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
2815
|
+
logIndex: z.ZodNumber;
|
|
2816
|
+
}, "strip", z.ZodTypeAny, {
|
|
2817
|
+
status: "failed" | "success";
|
|
2818
|
+
recipient: string;
|
|
2819
|
+
amount: string;
|
|
2820
|
+
logIndex: number;
|
|
2821
|
+
}, {
|
|
2822
|
+
status: "failed" | "success";
|
|
2823
|
+
recipient: string;
|
|
2824
|
+
amount: string;
|
|
2825
|
+
logIndex: number;
|
|
2826
|
+
}>;
|
|
2827
|
+
/**
|
|
2828
|
+
* Receipt schema
|
|
2829
|
+
*/
|
|
2830
|
+
declare const ReceiptSchema: z.ZodObject<{
|
|
2831
|
+
id: z.ZodString;
|
|
2832
|
+
executionId: z.ZodString;
|
|
2833
|
+
quoteId: z.ZodString;
|
|
2834
|
+
draftId: z.ZodString;
|
|
2835
|
+
transactionHash: z.ZodString;
|
|
2836
|
+
blockNumber: z.ZodNumber;
|
|
2837
|
+
blockTimestamp: z.ZodString;
|
|
2838
|
+
network: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
2839
|
+
token: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
2840
|
+
totalAmount: z.ZodString;
|
|
2841
|
+
gasUsed: z.ZodString;
|
|
2842
|
+
gasPrice: z.ZodString;
|
|
2843
|
+
gasCost: z.ZodString;
|
|
2844
|
+
transfers: z.ZodArray<z.ZodObject<{
|
|
2845
|
+
recipient: z.ZodString;
|
|
2846
|
+
amount: z.ZodString;
|
|
2847
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
2848
|
+
logIndex: z.ZodNumber;
|
|
2849
|
+
}, "strip", z.ZodTypeAny, {
|
|
2850
|
+
status: "failed" | "success";
|
|
2851
|
+
recipient: string;
|
|
2852
|
+
amount: string;
|
|
2853
|
+
logIndex: number;
|
|
2854
|
+
}, {
|
|
2855
|
+
status: "failed" | "success";
|
|
2856
|
+
recipient: string;
|
|
2857
|
+
amount: string;
|
|
2858
|
+
logIndex: number;
|
|
2859
|
+
}>, "many">;
|
|
2860
|
+
successfulTransfers: z.ZodNumber;
|
|
2861
|
+
failedTransfers: z.ZodNumber;
|
|
2862
|
+
createdAt: z.ZodString;
|
|
2863
|
+
}, "strip", z.ZodTypeAny, {
|
|
2864
|
+
quoteId: string;
|
|
2865
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2866
|
+
id: string;
|
|
2867
|
+
totalAmount: string;
|
|
2868
|
+
createdAt: string;
|
|
2869
|
+
blockNumber: number;
|
|
2870
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2871
|
+
draftId: string;
|
|
2872
|
+
gasPrice: string;
|
|
2873
|
+
transactionHash: string;
|
|
2874
|
+
executionId: string;
|
|
2875
|
+
blockTimestamp: string;
|
|
2876
|
+
gasUsed: string;
|
|
2877
|
+
gasCost: string;
|
|
2878
|
+
transfers: {
|
|
2879
|
+
status: "failed" | "success";
|
|
2880
|
+
recipient: string;
|
|
2881
|
+
amount: string;
|
|
2882
|
+
logIndex: number;
|
|
2883
|
+
}[];
|
|
2884
|
+
successfulTransfers: number;
|
|
2885
|
+
failedTransfers: number;
|
|
2886
|
+
}, {
|
|
2887
|
+
quoteId: string;
|
|
2888
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2889
|
+
id: string;
|
|
2890
|
+
totalAmount: string;
|
|
2891
|
+
createdAt: string;
|
|
2892
|
+
blockNumber: number;
|
|
2893
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2894
|
+
draftId: string;
|
|
2895
|
+
gasPrice: string;
|
|
2896
|
+
transactionHash: string;
|
|
2897
|
+
executionId: string;
|
|
2898
|
+
blockTimestamp: string;
|
|
2899
|
+
gasUsed: string;
|
|
2900
|
+
gasCost: string;
|
|
2901
|
+
transfers: {
|
|
2902
|
+
status: "failed" | "success";
|
|
2903
|
+
recipient: string;
|
|
2904
|
+
amount: string;
|
|
2905
|
+
logIndex: number;
|
|
2906
|
+
}[];
|
|
2907
|
+
successfulTransfers: number;
|
|
2908
|
+
failedTransfers: number;
|
|
2909
|
+
}>;
|
|
2910
|
+
/**
|
|
2911
|
+
* Validate receipt response
|
|
2912
|
+
*/
|
|
2913
|
+
declare function validateReceipt(receipt: unknown): z.SafeParseReturnType<{
|
|
2914
|
+
quoteId: string;
|
|
2915
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2916
|
+
id: string;
|
|
2917
|
+
totalAmount: string;
|
|
2918
|
+
createdAt: string;
|
|
2919
|
+
blockNumber: number;
|
|
2920
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2921
|
+
draftId: string;
|
|
2922
|
+
gasPrice: string;
|
|
2923
|
+
transactionHash: string;
|
|
2924
|
+
executionId: string;
|
|
2925
|
+
blockTimestamp: string;
|
|
2926
|
+
gasUsed: string;
|
|
2927
|
+
gasCost: string;
|
|
2928
|
+
transfers: {
|
|
2929
|
+
status: "failed" | "success";
|
|
2930
|
+
recipient: string;
|
|
2931
|
+
amount: string;
|
|
2932
|
+
logIndex: number;
|
|
2933
|
+
}[];
|
|
2934
|
+
successfulTransfers: number;
|
|
2935
|
+
failedTransfers: number;
|
|
2936
|
+
}, {
|
|
2937
|
+
quoteId: string;
|
|
2938
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2939
|
+
id: string;
|
|
2940
|
+
totalAmount: string;
|
|
2941
|
+
createdAt: string;
|
|
2942
|
+
blockNumber: number;
|
|
2943
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2944
|
+
draftId: string;
|
|
2945
|
+
gasPrice: string;
|
|
2946
|
+
transactionHash: string;
|
|
2947
|
+
executionId: string;
|
|
2948
|
+
blockTimestamp: string;
|
|
2949
|
+
gasUsed: string;
|
|
2950
|
+
gasCost: string;
|
|
2951
|
+
transfers: {
|
|
2952
|
+
status: "failed" | "success";
|
|
2953
|
+
recipient: string;
|
|
2954
|
+
amount: string;
|
|
2955
|
+
logIndex: number;
|
|
2956
|
+
}[];
|
|
2957
|
+
successfulTransfers: number;
|
|
2958
|
+
failedTransfers: number;
|
|
2959
|
+
}>;
|
|
2960
|
+
/**
|
|
2961
|
+
* Parse receipt response
|
|
2962
|
+
*/
|
|
2963
|
+
declare function parseReceipt(receipt: unknown): {
|
|
2964
|
+
quoteId: string;
|
|
2965
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2966
|
+
id: string;
|
|
2967
|
+
totalAmount: string;
|
|
2968
|
+
createdAt: string;
|
|
2969
|
+
blockNumber: number;
|
|
2970
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2971
|
+
draftId: string;
|
|
2972
|
+
gasPrice: string;
|
|
2973
|
+
transactionHash: string;
|
|
2974
|
+
executionId: string;
|
|
2975
|
+
blockTimestamp: string;
|
|
2976
|
+
gasUsed: string;
|
|
2977
|
+
gasCost: string;
|
|
2978
|
+
transfers: {
|
|
2979
|
+
status: "failed" | "success";
|
|
2980
|
+
recipient: string;
|
|
2981
|
+
amount: string;
|
|
2982
|
+
logIndex: number;
|
|
2983
|
+
}[];
|
|
2984
|
+
successfulTransfers: number;
|
|
2985
|
+
failedTransfers: number;
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* @deprecated Use the new DSL filter schemas instead
|
|
2990
|
+
* Filter operators schema (legacy)
|
|
2991
|
+
*/
|
|
2992
|
+
declare const LegacyFilterOperatorSchema: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
2993
|
+
/**
|
|
2994
|
+
* @deprecated Use the new DSL filter schemas instead
|
|
2995
|
+
* Filter value schema - supports primitives and arrays (legacy)
|
|
2996
|
+
*/
|
|
2997
|
+
declare const LegacyFilterValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
2998
|
+
/**
|
|
2999
|
+
* @deprecated Use the new DSL filter schemas instead
|
|
3000
|
+
* Field comparison schema (legacy)
|
|
3001
|
+
*/
|
|
3002
|
+
declare const LegacyFieldComparisonSchema: z.ZodObject<{
|
|
3003
|
+
field: z.ZodString;
|
|
3004
|
+
op: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
3005
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3006
|
+
}, "strip", z.ZodTypeAny, {
|
|
3007
|
+
value: string | number | boolean | number[] | string[];
|
|
3008
|
+
field: string;
|
|
3009
|
+
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3010
|
+
}, {
|
|
3011
|
+
value: string | number | boolean | number[] | string[];
|
|
3012
|
+
field: string;
|
|
3013
|
+
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3014
|
+
}>;
|
|
3015
|
+
/**
|
|
3016
|
+
* @deprecated Use RecipientFilterSchema instead
|
|
3017
|
+
* Recursive filter DSL schema (legacy)
|
|
3018
|
+
*/
|
|
3019
|
+
declare const LegacyRecipientFilterDSLSchema: z.ZodType<unknown>;
|
|
3020
|
+
declare const FilterOperatorSchema: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
3021
|
+
declare const FilterValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3022
|
+
declare const FieldComparisonSchema: z.ZodObject<{
|
|
3023
|
+
field: z.ZodString;
|
|
3024
|
+
op: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
3025
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3026
|
+
}, "strip", z.ZodTypeAny, {
|
|
3027
|
+
value: string | number | boolean | number[] | string[];
|
|
3028
|
+
field: string;
|
|
3029
|
+
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3030
|
+
}, {
|
|
3031
|
+
value: string | number | boolean | number[] | string[];
|
|
3032
|
+
field: string;
|
|
3033
|
+
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3034
|
+
}>;
|
|
3035
|
+
declare const PlatformFilterSchema: z.ZodObject<{
|
|
3036
|
+
platform: z.ZodEnum<["all", "farcaster", "twitter"]>;
|
|
3037
|
+
}, "strip", z.ZodTypeAny, {
|
|
3038
|
+
platform: "all" | "farcaster" | "twitter";
|
|
3039
|
+
}, {
|
|
3040
|
+
platform: "all" | "farcaster" | "twitter";
|
|
3041
|
+
}>;
|
|
3042
|
+
declare const SpecificUsersFilterSchema: z.ZodObject<{
|
|
3043
|
+
specificIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3044
|
+
specificFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3045
|
+
specificUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3046
|
+
specificUsersMode: z.ZodOptional<z.ZodEnum<["exclusive", "additive"]>>;
|
|
3047
|
+
}, "strip", z.ZodTypeAny, {
|
|
3048
|
+
specificIds?: string[] | undefined;
|
|
3049
|
+
specificFids?: number[] | undefined;
|
|
3050
|
+
specificUsernames?: string[] | undefined;
|
|
3051
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3052
|
+
}, {
|
|
3053
|
+
specificIds?: string[] | undefined;
|
|
3054
|
+
specificFids?: number[] | undefined;
|
|
3055
|
+
specificUsernames?: string[] | undefined;
|
|
3056
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3057
|
+
}>;
|
|
3058
|
+
declare const ExcludeUsersFilterSchema: z.ZodObject<{
|
|
3059
|
+
excludeFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3060
|
+
excludeUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3061
|
+
}, "strip", z.ZodTypeAny, {
|
|
3062
|
+
excludeFids?: number[] | undefined;
|
|
3063
|
+
excludeUsernames?: string[] | undefined;
|
|
3064
|
+
}, {
|
|
3065
|
+
excludeFids?: number[] | undefined;
|
|
3066
|
+
excludeUsernames?: string[] | undefined;
|
|
3067
|
+
}>;
|
|
3068
|
+
declare const MinFollowersFilterSchema: z.ZodObject<{
|
|
3069
|
+
minFollowers: z.ZodNumber;
|
|
3070
|
+
}, "strip", z.ZodTypeAny, {
|
|
3071
|
+
minFollowers: number;
|
|
3072
|
+
}, {
|
|
3073
|
+
minFollowers: number;
|
|
3074
|
+
}>;
|
|
3075
|
+
declare const MaxFollowersFilterSchema: z.ZodObject<{
|
|
3076
|
+
maxFollowers: z.ZodNumber;
|
|
3077
|
+
}, "strip", z.ZodTypeAny, {
|
|
3078
|
+
maxFollowers: number;
|
|
3079
|
+
}, {
|
|
3080
|
+
maxFollowers: number;
|
|
3081
|
+
}>;
|
|
3082
|
+
declare const MinFollowingFilterSchema: z.ZodObject<{
|
|
3083
|
+
minFollowing: z.ZodNumber;
|
|
3084
|
+
}, "strip", z.ZodTypeAny, {
|
|
3085
|
+
minFollowing: number;
|
|
3086
|
+
}, {
|
|
3087
|
+
minFollowing: number;
|
|
3088
|
+
}>;
|
|
3089
|
+
declare const MaxFollowingFilterSchema: z.ZodObject<{
|
|
3090
|
+
maxFollowing: z.ZodNumber;
|
|
3091
|
+
}, "strip", z.ZodTypeAny, {
|
|
3092
|
+
maxFollowing: number;
|
|
3093
|
+
}, {
|
|
3094
|
+
maxFollowing: number;
|
|
3095
|
+
}>;
|
|
3096
|
+
declare const FollowersOfFilterSchema: z.ZodObject<{
|
|
3097
|
+
followersOf: z.ZodNumber;
|
|
3098
|
+
}, "strip", z.ZodTypeAny, {
|
|
3099
|
+
followersOf: number;
|
|
3100
|
+
}, {
|
|
3101
|
+
followersOf: number;
|
|
3102
|
+
}>;
|
|
3103
|
+
declare const FollowingOfFilterSchema: z.ZodObject<{
|
|
3104
|
+
followingOf: z.ZodNumber;
|
|
3105
|
+
}, "strip", z.ZodTypeAny, {
|
|
3106
|
+
followingOf: number;
|
|
3107
|
+
}, {
|
|
3108
|
+
followingOf: number;
|
|
3109
|
+
}>;
|
|
3110
|
+
declare const MutualsWithFilterSchema: z.ZodObject<{
|
|
3111
|
+
mutualsWith: z.ZodNumber;
|
|
3112
|
+
}, "strip", z.ZodTypeAny, {
|
|
3113
|
+
mutualsWith: number;
|
|
3114
|
+
}, {
|
|
3115
|
+
mutualsWith: number;
|
|
3116
|
+
}>;
|
|
3117
|
+
declare const SignalTokenFilterSchema: z.ZodObject<{
|
|
3118
|
+
signalTokens: z.ZodArray<z.ZodObject<{
|
|
3119
|
+
tokenAddress: z.ZodString;
|
|
3120
|
+
}, "strip", z.ZodTypeAny, {
|
|
3121
|
+
tokenAddress: string;
|
|
3122
|
+
}, {
|
|
3123
|
+
tokenAddress: string;
|
|
3124
|
+
}>, "many">;
|
|
3125
|
+
}, "strip", z.ZodTypeAny, {
|
|
3126
|
+
signalTokens: {
|
|
3127
|
+
tokenAddress: string;
|
|
3128
|
+
}[];
|
|
3129
|
+
}, {
|
|
3130
|
+
signalTokens: {
|
|
3131
|
+
tokenAddress: string;
|
|
3132
|
+
}[];
|
|
3133
|
+
}>;
|
|
3134
|
+
declare const TimezoneFilterSchema: z.ZodObject<{
|
|
3135
|
+
timezones: z.ZodArray<z.ZodObject<{
|
|
3136
|
+
offset: z.ZodNumber;
|
|
3137
|
+
range: z.ZodOptional<z.ZodNumber>;
|
|
3138
|
+
}, "strip", z.ZodTypeAny, {
|
|
3139
|
+
offset: number;
|
|
3140
|
+
range?: number | undefined;
|
|
3141
|
+
}, {
|
|
3142
|
+
offset: number;
|
|
3143
|
+
range?: number | undefined;
|
|
3144
|
+
}>, "many">;
|
|
3145
|
+
}, "strip", z.ZodTypeAny, {
|
|
3146
|
+
timezones: {
|
|
3147
|
+
offset: number;
|
|
3148
|
+
range?: number | undefined;
|
|
3149
|
+
}[];
|
|
3150
|
+
}, {
|
|
3151
|
+
timezones: {
|
|
3152
|
+
offset: number;
|
|
3153
|
+
range?: number | undefined;
|
|
3154
|
+
}[];
|
|
3155
|
+
}>;
|
|
3156
|
+
declare const CountryFilterSchema: z.ZodObject<{
|
|
3157
|
+
countries: z.ZodArray<z.ZodObject<{
|
|
3158
|
+
code: z.ZodString;
|
|
3159
|
+
}, "strip", z.ZodTypeAny, {
|
|
3160
|
+
code: string;
|
|
3161
|
+
}, {
|
|
3162
|
+
code: string;
|
|
3163
|
+
}>, "many">;
|
|
3164
|
+
}, "strip", z.ZodTypeAny, {
|
|
3165
|
+
countries: {
|
|
3166
|
+
code: string;
|
|
3167
|
+
}[];
|
|
3168
|
+
}, {
|
|
3169
|
+
countries: {
|
|
3170
|
+
code: string;
|
|
3171
|
+
}[];
|
|
3172
|
+
}>;
|
|
3173
|
+
declare const RolesFilterSchema: z.ZodObject<{
|
|
3174
|
+
roles: z.ZodArray<z.ZodString, "many">;
|
|
3175
|
+
}, "strip", z.ZodTypeAny, {
|
|
3176
|
+
roles: string[];
|
|
3177
|
+
}, {
|
|
3178
|
+
roles: string[];
|
|
3179
|
+
}>;
|
|
3180
|
+
declare const SocialFilterSchema: z.ZodObject<{
|
|
3181
|
+
specificIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3182
|
+
specificFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3183
|
+
specificUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3184
|
+
specificUsersMode: z.ZodOptional<z.ZodEnum<["exclusive", "additive"]>>;
|
|
3185
|
+
excludeFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3186
|
+
excludeUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3187
|
+
followersOf: z.ZodOptional<z.ZodNumber>;
|
|
3188
|
+
followingOf: z.ZodOptional<z.ZodNumber>;
|
|
3189
|
+
mutualsWith: z.ZodOptional<z.ZodNumber>;
|
|
3190
|
+
minFollowers: z.ZodOptional<z.ZodNumber>;
|
|
3191
|
+
maxFollowers: z.ZodOptional<z.ZodNumber>;
|
|
3192
|
+
minFollowing: z.ZodOptional<z.ZodNumber>;
|
|
3193
|
+
maxFollowing: z.ZodOptional<z.ZodNumber>;
|
|
3194
|
+
signalTokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3195
|
+
tokenAddress: z.ZodString;
|
|
3196
|
+
}, "strip", z.ZodTypeAny, {
|
|
3197
|
+
tokenAddress: string;
|
|
3198
|
+
}, {
|
|
3199
|
+
tokenAddress: string;
|
|
3200
|
+
}>, "many">>;
|
|
3201
|
+
timezones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3202
|
+
offset: z.ZodNumber;
|
|
3203
|
+
range: z.ZodOptional<z.ZodNumber>;
|
|
3204
|
+
}, "strip", z.ZodTypeAny, {
|
|
3205
|
+
offset: number;
|
|
3206
|
+
range?: number | undefined;
|
|
3207
|
+
}, {
|
|
3208
|
+
offset: number;
|
|
3209
|
+
range?: number | undefined;
|
|
3210
|
+
}>, "many">>;
|
|
3211
|
+
countries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3212
|
+
code: z.ZodString;
|
|
3213
|
+
}, "strip", z.ZodTypeAny, {
|
|
3214
|
+
code: string;
|
|
3215
|
+
}, {
|
|
3216
|
+
code: string;
|
|
3217
|
+
}>, "many">>;
|
|
3218
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3219
|
+
}, "strip", z.ZodTypeAny, {
|
|
3220
|
+
minFollowers?: number | undefined;
|
|
3221
|
+
maxFollowers?: number | undefined;
|
|
3222
|
+
followersOf?: number | undefined;
|
|
3223
|
+
mutualsWith?: number | undefined;
|
|
3224
|
+
signalTokens?: {
|
|
3225
|
+
tokenAddress: string;
|
|
3226
|
+
}[] | undefined;
|
|
3227
|
+
countries?: {
|
|
3228
|
+
code: string;
|
|
3229
|
+
}[] | undefined;
|
|
3230
|
+
timezones?: {
|
|
3231
|
+
offset: number;
|
|
3232
|
+
range?: number | undefined;
|
|
3233
|
+
}[] | undefined;
|
|
3234
|
+
specificIds?: string[] | undefined;
|
|
3235
|
+
specificFids?: number[] | undefined;
|
|
3236
|
+
specificUsernames?: string[] | undefined;
|
|
3237
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3238
|
+
excludeFids?: number[] | undefined;
|
|
3239
|
+
excludeUsernames?: string[] | undefined;
|
|
3240
|
+
minFollowing?: number | undefined;
|
|
3241
|
+
maxFollowing?: number | undefined;
|
|
3242
|
+
followingOf?: number | undefined;
|
|
3243
|
+
roles?: string[] | undefined;
|
|
3244
|
+
}, {
|
|
3245
|
+
minFollowers?: number | undefined;
|
|
3246
|
+
maxFollowers?: number | undefined;
|
|
3247
|
+
followersOf?: number | undefined;
|
|
3248
|
+
mutualsWith?: number | undefined;
|
|
3249
|
+
signalTokens?: {
|
|
3250
|
+
tokenAddress: string;
|
|
3251
|
+
}[] | undefined;
|
|
3252
|
+
countries?: {
|
|
3253
|
+
code: string;
|
|
3254
|
+
}[] | undefined;
|
|
3255
|
+
timezones?: {
|
|
3256
|
+
offset: number;
|
|
3257
|
+
range?: number | undefined;
|
|
3258
|
+
}[] | undefined;
|
|
3259
|
+
specificIds?: string[] | undefined;
|
|
3260
|
+
specificFids?: number[] | undefined;
|
|
3261
|
+
specificUsernames?: string[] | undefined;
|
|
3262
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3263
|
+
excludeFids?: number[] | undefined;
|
|
3264
|
+
excludeUsernames?: string[] | undefined;
|
|
3265
|
+
minFollowing?: number | undefined;
|
|
3266
|
+
maxFollowing?: number | undefined;
|
|
3267
|
+
followingOf?: number | undefined;
|
|
3268
|
+
roles?: string[] | undefined;
|
|
3269
|
+
}>;
|
|
3270
|
+
declare const ActiveInLastDaysFilterSchema: z.ZodObject<{
|
|
3271
|
+
activeInLastDays: z.ZodNumber;
|
|
3272
|
+
}, "strip", z.ZodTypeAny, {
|
|
3273
|
+
activeInLastDays: number;
|
|
3274
|
+
}, {
|
|
3275
|
+
activeInLastDays: number;
|
|
3276
|
+
}>;
|
|
3277
|
+
declare const NeynarScoreMinFilterSchema: z.ZodObject<{
|
|
3278
|
+
neynarScoreMin: z.ZodNumber;
|
|
3279
|
+
}, "strip", z.ZodTypeAny, {
|
|
3280
|
+
neynarScoreMin: number;
|
|
3281
|
+
}, {
|
|
3282
|
+
neynarScoreMin: number;
|
|
3283
|
+
}>;
|
|
3284
|
+
declare const NeynarScoreMaxFilterSchema: z.ZodObject<{
|
|
3285
|
+
neynarScoreMax: z.ZodNumber;
|
|
3286
|
+
}, "strip", z.ZodTypeAny, {
|
|
3287
|
+
neynarScoreMax: number;
|
|
3288
|
+
}, {
|
|
3289
|
+
neynarScoreMax: number;
|
|
3290
|
+
}>;
|
|
3291
|
+
declare const QuotientScoreMinFilterSchema: z.ZodObject<{
|
|
3292
|
+
quotientScoreMin: z.ZodNumber;
|
|
3293
|
+
}, "strip", z.ZodTypeAny, {
|
|
3294
|
+
quotientScoreMin: number;
|
|
3295
|
+
}, {
|
|
3296
|
+
quotientScoreMin: number;
|
|
3297
|
+
}>;
|
|
3298
|
+
declare const QuotientScoreMaxFilterSchema: z.ZodObject<{
|
|
3299
|
+
quotientScoreMax: z.ZodNumber;
|
|
3300
|
+
}, "strip", z.ZodTypeAny, {
|
|
3301
|
+
quotientScoreMax: number;
|
|
3302
|
+
}, {
|
|
3303
|
+
quotientScoreMax: number;
|
|
3304
|
+
}>;
|
|
3305
|
+
declare const SpamLabelFilterSchema: z.ZodObject<{
|
|
3306
|
+
spamLabel: z.ZodEnum<["not_spam_only", "spam_only", "all"]>;
|
|
3307
|
+
}, "strip", z.ZodTypeAny, {
|
|
3308
|
+
spamLabel: "all" | "not_spam_only" | "spam_only";
|
|
3309
|
+
}, {
|
|
3310
|
+
spamLabel: "all" | "not_spam_only" | "spam_only";
|
|
3311
|
+
}>;
|
|
3312
|
+
declare const ProSubscriptionFilterSchema: z.ZodObject<{
|
|
3313
|
+
proSubscriptionRequired: z.ZodBoolean;
|
|
3314
|
+
}, "strip", z.ZodTypeAny, {
|
|
3315
|
+
proSubscriptionRequired: boolean;
|
|
3316
|
+
}, {
|
|
3317
|
+
proSubscriptionRequired: boolean;
|
|
3318
|
+
}>;
|
|
3319
|
+
declare const MinProTenureDaysFilterSchema: z.ZodObject<{
|
|
3320
|
+
minProTenureDays: z.ZodNumber;
|
|
3321
|
+
}, "strip", z.ZodTypeAny, {
|
|
3322
|
+
minProTenureDays: number;
|
|
3323
|
+
}, {
|
|
3324
|
+
minProTenureDays: number;
|
|
3325
|
+
}>;
|
|
3326
|
+
declare const MinTenureDaysFilterSchema: z.ZodObject<{
|
|
3327
|
+
minTenureDays: z.ZodNumber;
|
|
3328
|
+
}, "strip", z.ZodTypeAny, {
|
|
3329
|
+
minTenureDays: number;
|
|
3330
|
+
}, {
|
|
3331
|
+
minTenureDays: number;
|
|
3332
|
+
}>;
|
|
3333
|
+
declare const VerifiedOnlyFilterSchema: z.ZodObject<{
|
|
3334
|
+
verifiedOnly: z.ZodBoolean;
|
|
3335
|
+
}, "strip", z.ZodTypeAny, {
|
|
3336
|
+
verifiedOnly: boolean;
|
|
3337
|
+
}, {
|
|
3338
|
+
verifiedOnly: boolean;
|
|
3339
|
+
}>;
|
|
3340
|
+
declare const ReputationFilterSchema: z.ZodObject<{
|
|
3341
|
+
neynarScoreMin: z.ZodOptional<z.ZodNumber>;
|
|
3342
|
+
neynarScoreMax: z.ZodOptional<z.ZodNumber>;
|
|
3343
|
+
quotientScoreMin: z.ZodOptional<z.ZodNumber>;
|
|
3344
|
+
quotientScoreMax: z.ZodOptional<z.ZodNumber>;
|
|
3345
|
+
spamLabel: z.ZodOptional<z.ZodEnum<["not_spam_only", "spam_only", "all"]>>;
|
|
3346
|
+
proSubscriptionRequired: z.ZodOptional<z.ZodBoolean>;
|
|
3347
|
+
minProTenureDays: z.ZodOptional<z.ZodNumber>;
|
|
3348
|
+
minTenureDays: z.ZodOptional<z.ZodNumber>;
|
|
3349
|
+
verifiedOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3350
|
+
}, "strip", z.ZodTypeAny, {
|
|
3351
|
+
neynarScoreMin?: number | undefined;
|
|
3352
|
+
neynarScoreMax?: number | undefined;
|
|
3353
|
+
quotientScoreMin?: number | undefined;
|
|
3354
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
3355
|
+
verifiedOnly?: boolean | undefined;
|
|
3356
|
+
quotientScoreMax?: number | undefined;
|
|
3357
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
3358
|
+
minProTenureDays?: number | undefined;
|
|
3359
|
+
minTenureDays?: number | undefined;
|
|
3360
|
+
}, {
|
|
3361
|
+
neynarScoreMin?: number | undefined;
|
|
3362
|
+
neynarScoreMax?: number | undefined;
|
|
3363
|
+
quotientScoreMin?: number | undefined;
|
|
3364
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
3365
|
+
verifiedOnly?: boolean | undefined;
|
|
3366
|
+
quotientScoreMax?: number | undefined;
|
|
3367
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
3368
|
+
minProTenureDays?: number | undefined;
|
|
3369
|
+
minTenureDays?: number | undefined;
|
|
3370
|
+
}>;
|
|
3371
|
+
declare const MaxAttentionPriceFilterSchema: z.ZodObject<{
|
|
3372
|
+
maxAttentionPriceUsd: z.ZodNumber;
|
|
3373
|
+
}, "strip", z.ZodTypeAny, {
|
|
3374
|
+
maxAttentionPriceUsd: number;
|
|
3375
|
+
}, {
|
|
3376
|
+
maxAttentionPriceUsd: number;
|
|
3377
|
+
}>;
|
|
3378
|
+
declare const MinAttentionPriceFilterSchema: z.ZodObject<{
|
|
3379
|
+
minAttentionPriceUsd: z.ZodNumber;
|
|
3380
|
+
}, "strip", z.ZodTypeAny, {
|
|
3381
|
+
minAttentionPriceUsd: number;
|
|
3382
|
+
}, {
|
|
3383
|
+
minAttentionPriceUsd: number;
|
|
3384
|
+
}>;
|
|
3385
|
+
declare const MinFidFilterSchema: z.ZodObject<{
|
|
3386
|
+
minFid: z.ZodNumber;
|
|
3387
|
+
}, "strip", z.ZodTypeAny, {
|
|
3388
|
+
minFid: number;
|
|
3389
|
+
}, {
|
|
3390
|
+
minFid: number;
|
|
3391
|
+
}>;
|
|
3392
|
+
declare const MaxFidFilterSchema: z.ZodObject<{
|
|
3393
|
+
maxFid: z.ZodNumber;
|
|
3394
|
+
}, "strip", z.ZodTypeAny, {
|
|
3395
|
+
maxFid: number;
|
|
3396
|
+
}, {
|
|
3397
|
+
maxFid: number;
|
|
3398
|
+
}>;
|
|
3399
|
+
declare const MinBatteryPercentageFilterSchema: z.ZodObject<{
|
|
3400
|
+
minBatteryPercentage: z.ZodNumber;
|
|
3401
|
+
}, "strip", z.ZodTypeAny, {
|
|
3402
|
+
minBatteryPercentage: number;
|
|
3403
|
+
}, {
|
|
3404
|
+
minBatteryPercentage: number;
|
|
3405
|
+
}>;
|
|
3406
|
+
declare const ExcludePingedTodayFilterSchema: z.ZodObject<{
|
|
3407
|
+
excludePingedToday: z.ZodBoolean;
|
|
3408
|
+
}, "strip", z.ZodTypeAny, {
|
|
3409
|
+
excludePingedToday: boolean;
|
|
3410
|
+
}, {
|
|
3411
|
+
excludePingedToday: boolean;
|
|
3412
|
+
}>;
|
|
3413
|
+
declare const HasRechargedInLastDaysFilterSchema: z.ZodObject<{
|
|
3414
|
+
hasRechargedInLastDays: z.ZodNumber;
|
|
3415
|
+
}, "strip", z.ZodTypeAny, {
|
|
3416
|
+
hasRechargedInLastDays: number;
|
|
3417
|
+
}, {
|
|
3418
|
+
hasRechargedInLastDays: number;
|
|
3419
|
+
}>;
|
|
3420
|
+
declare const RequireLotteryOptInFilterSchema: z.ZodObject<{
|
|
3421
|
+
requireLotteryOptIn: z.ZodBoolean;
|
|
3422
|
+
}, "strip", z.ZodTypeAny, {
|
|
3423
|
+
requireLotteryOptIn: boolean;
|
|
3424
|
+
}, {
|
|
3425
|
+
requireLotteryOptIn: boolean;
|
|
3426
|
+
}>;
|
|
3427
|
+
declare const RequireQuizOptInFilterSchema: z.ZodObject<{
|
|
3428
|
+
requireQuizOptIn: z.ZodBoolean;
|
|
3429
|
+
}, "strip", z.ZodTypeAny, {
|
|
3430
|
+
requireQuizOptIn: boolean;
|
|
3431
|
+
}, {
|
|
3432
|
+
requireQuizOptIn: boolean;
|
|
3433
|
+
}>;
|
|
3434
|
+
declare const MinCastCountFilterSchema: z.ZodObject<{
|
|
3435
|
+
minCastCount: z.ZodNumber;
|
|
3436
|
+
}, "strip", z.ZodTypeAny, {
|
|
3437
|
+
minCastCount: number;
|
|
3438
|
+
}, {
|
|
3439
|
+
minCastCount: number;
|
|
3440
|
+
}>;
|
|
3441
|
+
declare const MinClickThroughRateFilterSchema: z.ZodObject<{
|
|
3442
|
+
minClickThroughRate: z.ZodNumber;
|
|
3443
|
+
}, "strip", z.ZodTypeAny, {
|
|
3444
|
+
minClickThroughRate: number;
|
|
3445
|
+
}, {
|
|
3446
|
+
minClickThroughRate: number;
|
|
3447
|
+
}>;
|
|
3448
|
+
declare const IsWaitlistedFilterSchema: z.ZodObject<{
|
|
3449
|
+
isWaitlisted: z.ZodBoolean;
|
|
3450
|
+
}, "strip", z.ZodTypeAny, {
|
|
3451
|
+
isWaitlisted: boolean;
|
|
3452
|
+
}, {
|
|
3453
|
+
isWaitlisted: boolean;
|
|
3454
|
+
}>;
|
|
3455
|
+
declare const HasTierFilterSchema: z.ZodObject<{
|
|
3456
|
+
hasTier: z.ZodBoolean;
|
|
3457
|
+
}, "strip", z.ZodTypeAny, {
|
|
3458
|
+
hasTier: boolean;
|
|
3459
|
+
}, {
|
|
3460
|
+
hasTier: boolean;
|
|
3461
|
+
}>;
|
|
3462
|
+
declare const BeeperEconomicsFilterSchema: z.ZodObject<{
|
|
3463
|
+
maxAttentionPriceUsd: z.ZodOptional<z.ZodNumber>;
|
|
3464
|
+
minAttentionPriceUsd: z.ZodOptional<z.ZodNumber>;
|
|
3465
|
+
minFid: z.ZodOptional<z.ZodNumber>;
|
|
3466
|
+
maxFid: z.ZodOptional<z.ZodNumber>;
|
|
3467
|
+
minBatteryPercentage: z.ZodOptional<z.ZodNumber>;
|
|
3468
|
+
excludePingedToday: z.ZodOptional<z.ZodBoolean>;
|
|
3469
|
+
hasRechargedInLastDays: z.ZodOptional<z.ZodNumber>;
|
|
3470
|
+
activeInLastDays: z.ZodOptional<z.ZodNumber>;
|
|
3471
|
+
requireLotteryOptIn: z.ZodOptional<z.ZodBoolean>;
|
|
3472
|
+
requireQuizOptIn: z.ZodOptional<z.ZodBoolean>;
|
|
3473
|
+
minCastCount: z.ZodOptional<z.ZodNumber>;
|
|
3474
|
+
minClickThroughRate: z.ZodOptional<z.ZodNumber>;
|
|
3475
|
+
isWaitlisted: z.ZodOptional<z.ZodBoolean>;
|
|
3476
|
+
hasTier: z.ZodOptional<z.ZodBoolean>;
|
|
3477
|
+
}, "strip", z.ZodTypeAny, {
|
|
3478
|
+
activeInLastDays?: number | undefined;
|
|
3479
|
+
minCastCount?: number | undefined;
|
|
3480
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
3481
|
+
minBatteryPercentage?: number | undefined;
|
|
3482
|
+
hasRechargedInLastDays?: number | undefined;
|
|
3483
|
+
excludePingedToday?: boolean | undefined;
|
|
3484
|
+
minAttentionPriceUsd?: number | undefined;
|
|
3485
|
+
minFid?: number | undefined;
|
|
3486
|
+
maxFid?: number | undefined;
|
|
3487
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
3488
|
+
requireQuizOptIn?: boolean | undefined;
|
|
3489
|
+
minClickThroughRate?: number | undefined;
|
|
3490
|
+
isWaitlisted?: boolean | undefined;
|
|
3491
|
+
hasTier?: boolean | undefined;
|
|
3492
|
+
}, {
|
|
3493
|
+
activeInLastDays?: number | undefined;
|
|
3494
|
+
minCastCount?: number | undefined;
|
|
3495
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
3496
|
+
minBatteryPercentage?: number | undefined;
|
|
3497
|
+
hasRechargedInLastDays?: number | undefined;
|
|
3498
|
+
excludePingedToday?: boolean | undefined;
|
|
3499
|
+
minAttentionPriceUsd?: number | undefined;
|
|
3500
|
+
minFid?: number | undefined;
|
|
3501
|
+
maxFid?: number | undefined;
|
|
3502
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
3503
|
+
requireQuizOptIn?: boolean | undefined;
|
|
3504
|
+
minClickThroughRate?: number | undefined;
|
|
3505
|
+
isWaitlisted?: boolean | undefined;
|
|
3506
|
+
hasTier?: boolean | undefined;
|
|
3507
|
+
}>;
|
|
3508
|
+
declare const TokenHolderFilterSchema: z.ZodObject<{
|
|
3509
|
+
tokenHolder: z.ZodObject<{
|
|
3510
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3511
|
+
contractAddress: z.ZodString;
|
|
3512
|
+
tokenStandard: z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>;
|
|
3513
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3514
|
+
minBalance: z.ZodOptional<z.ZodString>;
|
|
3515
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
3516
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3517
|
+
}, "strip", z.ZodTypeAny, {
|
|
3518
|
+
chain: "base" | "ethereum";
|
|
3519
|
+
contractAddress: string;
|
|
3520
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3521
|
+
symbol?: string | undefined;
|
|
3522
|
+
name?: string | undefined;
|
|
3523
|
+
minBalance?: string | undefined;
|
|
3524
|
+
tokenId?: string | undefined;
|
|
3525
|
+
}, {
|
|
3526
|
+
chain: "base" | "ethereum";
|
|
3527
|
+
contractAddress: string;
|
|
3528
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3529
|
+
symbol?: string | undefined;
|
|
3530
|
+
name?: string | undefined;
|
|
3531
|
+
minBalance?: string | undefined;
|
|
3532
|
+
tokenId?: string | undefined;
|
|
3533
|
+
}>;
|
|
3534
|
+
}, "strip", z.ZodTypeAny, {
|
|
3535
|
+
tokenHolder: {
|
|
3536
|
+
chain: "base" | "ethereum";
|
|
3537
|
+
contractAddress: string;
|
|
3538
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3539
|
+
symbol?: string | undefined;
|
|
3540
|
+
name?: string | undefined;
|
|
3541
|
+
minBalance?: string | undefined;
|
|
3542
|
+
tokenId?: string | undefined;
|
|
3543
|
+
};
|
|
3544
|
+
}, {
|
|
3545
|
+
tokenHolder: {
|
|
3546
|
+
chain: "base" | "ethereum";
|
|
3547
|
+
contractAddress: string;
|
|
3548
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3549
|
+
symbol?: string | undefined;
|
|
3550
|
+
name?: string | undefined;
|
|
3551
|
+
minBalance?: string | undefined;
|
|
3552
|
+
tokenId?: string | undefined;
|
|
3553
|
+
};
|
|
3554
|
+
}>;
|
|
3555
|
+
declare const CachedTokenHolderFilterSchema: z.ZodObject<{
|
|
3556
|
+
cachedTokenHolder: z.ZodObject<{
|
|
3557
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3558
|
+
contractAddress: z.ZodString;
|
|
3559
|
+
tokenStandard: z.ZodDefault<z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>>;
|
|
3560
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3561
|
+
tokenSymbol: z.ZodOptional<z.ZodString>;
|
|
3562
|
+
tokenName: z.ZodOptional<z.ZodString>;
|
|
3563
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3564
|
+
}, "strip", z.ZodTypeAny, {
|
|
3565
|
+
chain: "base" | "ethereum";
|
|
3566
|
+
contractAddress: string;
|
|
3567
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3568
|
+
minBalance?: string | number | undefined;
|
|
3569
|
+
tokenId?: string | undefined;
|
|
3570
|
+
tokenSymbol?: string | undefined;
|
|
3571
|
+
tokenName?: string | undefined;
|
|
3572
|
+
}, {
|
|
3573
|
+
chain: "base" | "ethereum";
|
|
3574
|
+
contractAddress: string;
|
|
3575
|
+
minBalance?: string | number | undefined;
|
|
3576
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3577
|
+
tokenId?: string | undefined;
|
|
3578
|
+
tokenSymbol?: string | undefined;
|
|
3579
|
+
tokenName?: string | undefined;
|
|
3580
|
+
}>;
|
|
3581
|
+
}, "strip", z.ZodTypeAny, {
|
|
3582
|
+
cachedTokenHolder: {
|
|
3583
|
+
chain: "base" | "ethereum";
|
|
3584
|
+
contractAddress: string;
|
|
3585
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3586
|
+
minBalance?: string | number | undefined;
|
|
3587
|
+
tokenId?: string | undefined;
|
|
3588
|
+
tokenSymbol?: string | undefined;
|
|
3589
|
+
tokenName?: string | undefined;
|
|
3590
|
+
};
|
|
3591
|
+
}, {
|
|
3592
|
+
cachedTokenHolder: {
|
|
3593
|
+
chain: "base" | "ethereum";
|
|
3594
|
+
contractAddress: string;
|
|
3595
|
+
minBalance?: string | number | undefined;
|
|
3596
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3597
|
+
tokenId?: string | undefined;
|
|
3598
|
+
tokenSymbol?: string | undefined;
|
|
3599
|
+
tokenName?: string | undefined;
|
|
3600
|
+
};
|
|
3601
|
+
}>;
|
|
3602
|
+
declare const HasBaseWalletFilterSchema: z.ZodObject<{
|
|
3603
|
+
hasBaseWallet: z.ZodBoolean;
|
|
3604
|
+
}, "strip", z.ZodTypeAny, {
|
|
3605
|
+
hasBaseWallet: boolean;
|
|
3606
|
+
}, {
|
|
3607
|
+
hasBaseWallet: boolean;
|
|
3608
|
+
}>;
|
|
3609
|
+
declare const HasVerifiedWalletFilterSchema: z.ZodObject<{
|
|
3610
|
+
hasVerifiedWallet: z.ZodBoolean;
|
|
3611
|
+
}, "strip", z.ZodTypeAny, {
|
|
3612
|
+
hasVerifiedWallet: boolean;
|
|
3613
|
+
}, {
|
|
3614
|
+
hasVerifiedWallet: boolean;
|
|
3615
|
+
}>;
|
|
3616
|
+
declare const TokenHolderDiscoverySchema: z.ZodObject<{
|
|
3617
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3618
|
+
contractAddress: z.ZodString;
|
|
3619
|
+
tokenStandard: z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>;
|
|
3620
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3621
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3622
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
3623
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3624
|
+
}, "strip", z.ZodTypeAny, {
|
|
3625
|
+
chain: "base" | "ethereum";
|
|
3626
|
+
contractAddress: string;
|
|
3627
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3628
|
+
symbol?: string | undefined;
|
|
3629
|
+
name?: string | undefined;
|
|
3630
|
+
minBalance?: string | number | undefined;
|
|
3631
|
+
tokenId?: string | undefined;
|
|
3632
|
+
}, {
|
|
3633
|
+
chain: "base" | "ethereum";
|
|
3634
|
+
contractAddress: string;
|
|
3635
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3636
|
+
symbol?: string | undefined;
|
|
3637
|
+
name?: string | undefined;
|
|
3638
|
+
minBalance?: string | number | undefined;
|
|
3639
|
+
tokenId?: string | undefined;
|
|
3640
|
+
}>;
|
|
3641
|
+
declare const CachedTokenHolderSchema: z.ZodObject<{
|
|
3642
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3643
|
+
contractAddress: z.ZodString;
|
|
3644
|
+
tokenStandard: z.ZodDefault<z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>>;
|
|
3645
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3646
|
+
tokenSymbol: z.ZodOptional<z.ZodString>;
|
|
3647
|
+
tokenName: z.ZodOptional<z.ZodString>;
|
|
3648
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3649
|
+
}, "strip", z.ZodTypeAny, {
|
|
3650
|
+
chain: "base" | "ethereum";
|
|
3651
|
+
contractAddress: string;
|
|
3652
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3653
|
+
minBalance?: string | number | undefined;
|
|
3654
|
+
tokenId?: string | undefined;
|
|
3655
|
+
tokenSymbol?: string | undefined;
|
|
3656
|
+
tokenName?: string | undefined;
|
|
3657
|
+
}, {
|
|
3658
|
+
chain: "base" | "ethereum";
|
|
3659
|
+
contractAddress: string;
|
|
3660
|
+
minBalance?: string | number | undefined;
|
|
3661
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3662
|
+
tokenId?: string | undefined;
|
|
3663
|
+
tokenSymbol?: string | undefined;
|
|
3664
|
+
tokenName?: string | undefined;
|
|
3665
|
+
}>;
|
|
3666
|
+
declare const OnchainFilterSchema: z.ZodObject<{
|
|
3667
|
+
hasBaseWallet: z.ZodOptional<z.ZodBoolean>;
|
|
3668
|
+
tokenHolders: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3669
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3670
|
+
contractAddress: z.ZodString;
|
|
3671
|
+
tokenStandard: z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>;
|
|
3672
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3673
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3674
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
3675
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3676
|
+
}, "strip", z.ZodTypeAny, {
|
|
3677
|
+
chain: "base" | "ethereum";
|
|
3678
|
+
contractAddress: string;
|
|
3679
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3680
|
+
symbol?: string | undefined;
|
|
3681
|
+
name?: string | undefined;
|
|
3682
|
+
minBalance?: string | number | undefined;
|
|
3683
|
+
tokenId?: string | undefined;
|
|
3684
|
+
}, {
|
|
3685
|
+
chain: "base" | "ethereum";
|
|
3686
|
+
contractAddress: string;
|
|
3687
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3688
|
+
symbol?: string | undefined;
|
|
3689
|
+
name?: string | undefined;
|
|
3690
|
+
minBalance?: string | number | undefined;
|
|
3691
|
+
tokenId?: string | undefined;
|
|
3692
|
+
}>, "many">>;
|
|
3693
|
+
cachedTokenHolders: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3694
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3695
|
+
contractAddress: z.ZodString;
|
|
3696
|
+
tokenStandard: z.ZodDefault<z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>>;
|
|
3697
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3698
|
+
tokenSymbol: z.ZodOptional<z.ZodString>;
|
|
3699
|
+
tokenName: z.ZodOptional<z.ZodString>;
|
|
3700
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3701
|
+
}, "strip", z.ZodTypeAny, {
|
|
3702
|
+
chain: "base" | "ethereum";
|
|
3703
|
+
contractAddress: string;
|
|
3704
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3705
|
+
minBalance?: string | number | undefined;
|
|
3706
|
+
tokenId?: string | undefined;
|
|
3707
|
+
tokenSymbol?: string | undefined;
|
|
3708
|
+
tokenName?: string | undefined;
|
|
3709
|
+
}, {
|
|
3710
|
+
chain: "base" | "ethereum";
|
|
3711
|
+
contractAddress: string;
|
|
3712
|
+
minBalance?: string | number | undefined;
|
|
3713
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3714
|
+
tokenId?: string | undefined;
|
|
3715
|
+
tokenSymbol?: string | undefined;
|
|
3716
|
+
tokenName?: string | undefined;
|
|
3717
|
+
}>, "many">>;
|
|
3718
|
+
hasVerifiedWallet: z.ZodOptional<z.ZodBoolean>;
|
|
3719
|
+
}, "strip", z.ZodTypeAny, {
|
|
3720
|
+
tokenHolders?: {
|
|
3721
|
+
chain: "base" | "ethereum";
|
|
3722
|
+
contractAddress: string;
|
|
3723
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3724
|
+
symbol?: string | undefined;
|
|
3725
|
+
name?: string | undefined;
|
|
3726
|
+
minBalance?: string | number | undefined;
|
|
3727
|
+
tokenId?: string | undefined;
|
|
3728
|
+
}[] | undefined;
|
|
3729
|
+
hasBaseWallet?: boolean | undefined;
|
|
3730
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
3731
|
+
cachedTokenHolders?: {
|
|
3732
|
+
chain: "base" | "ethereum";
|
|
3733
|
+
contractAddress: string;
|
|
3734
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3735
|
+
minBalance?: string | number | undefined;
|
|
3736
|
+
tokenId?: string | undefined;
|
|
3737
|
+
tokenSymbol?: string | undefined;
|
|
3738
|
+
tokenName?: string | undefined;
|
|
3739
|
+
}[] | undefined;
|
|
3740
|
+
}, {
|
|
3741
|
+
tokenHolders?: {
|
|
3742
|
+
chain: "base" | "ethereum";
|
|
3743
|
+
contractAddress: string;
|
|
3744
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3745
|
+
symbol?: string | undefined;
|
|
3746
|
+
name?: string | undefined;
|
|
3747
|
+
minBalance?: string | number | undefined;
|
|
3748
|
+
tokenId?: string | undefined;
|
|
3749
|
+
}[] | undefined;
|
|
3750
|
+
hasBaseWallet?: boolean | undefined;
|
|
3751
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
3752
|
+
cachedTokenHolders?: {
|
|
3753
|
+
chain: "base" | "ethereum";
|
|
3754
|
+
contractAddress: string;
|
|
3755
|
+
minBalance?: string | number | undefined;
|
|
3756
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3757
|
+
tokenId?: string | undefined;
|
|
3758
|
+
tokenSymbol?: string | undefined;
|
|
3759
|
+
tokenName?: string | undefined;
|
|
3760
|
+
}[] | undefined;
|
|
3761
|
+
}>;
|
|
3762
|
+
declare const OrderBySchema: z.ZodEnum<["attention_price_asc", "attention_price_desc", "neynar_score_desc", "followers_desc", "followers_asc", "recent_activity", "battery_desc", "random"]>;
|
|
3763
|
+
/**
|
|
3764
|
+
* Complete Recipient Filter DSL Schema matching backend
|
|
3765
|
+
*/
|
|
3766
|
+
declare const RecipientFilterSchema: z.ZodObject<{
|
|
3767
|
+
platform: z.ZodOptional<z.ZodEnum<["all", "farcaster", "twitter"]>>;
|
|
3768
|
+
social: z.ZodOptional<z.ZodObject<{
|
|
3769
|
+
specificIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3770
|
+
specificFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3771
|
+
specificUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3772
|
+
specificUsersMode: z.ZodOptional<z.ZodEnum<["exclusive", "additive"]>>;
|
|
3773
|
+
excludeFids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
3774
|
+
excludeUsernames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3775
|
+
followersOf: z.ZodOptional<z.ZodNumber>;
|
|
3776
|
+
followingOf: z.ZodOptional<z.ZodNumber>;
|
|
3777
|
+
mutualsWith: z.ZodOptional<z.ZodNumber>;
|
|
3778
|
+
minFollowers: z.ZodOptional<z.ZodNumber>;
|
|
3779
|
+
maxFollowers: z.ZodOptional<z.ZodNumber>;
|
|
3780
|
+
minFollowing: z.ZodOptional<z.ZodNumber>;
|
|
3781
|
+
maxFollowing: z.ZodOptional<z.ZodNumber>;
|
|
3782
|
+
signalTokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3783
|
+
tokenAddress: z.ZodString;
|
|
3784
|
+
}, "strip", z.ZodTypeAny, {
|
|
3785
|
+
tokenAddress: string;
|
|
3786
|
+
}, {
|
|
3787
|
+
tokenAddress: string;
|
|
3788
|
+
}>, "many">>;
|
|
3789
|
+
timezones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3790
|
+
offset: z.ZodNumber;
|
|
3791
|
+
range: z.ZodOptional<z.ZodNumber>;
|
|
3792
|
+
}, "strip", z.ZodTypeAny, {
|
|
3793
|
+
offset: number;
|
|
3794
|
+
range?: number | undefined;
|
|
3795
|
+
}, {
|
|
3796
|
+
offset: number;
|
|
3797
|
+
range?: number | undefined;
|
|
3798
|
+
}>, "many">>;
|
|
3799
|
+
countries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3800
|
+
code: z.ZodString;
|
|
3801
|
+
}, "strip", z.ZodTypeAny, {
|
|
3802
|
+
code: string;
|
|
3803
|
+
}, {
|
|
3804
|
+
code: string;
|
|
3805
|
+
}>, "many">>;
|
|
3806
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3807
|
+
}, "strip", z.ZodTypeAny, {
|
|
3808
|
+
minFollowers?: number | undefined;
|
|
3809
|
+
maxFollowers?: number | undefined;
|
|
3810
|
+
followersOf?: number | undefined;
|
|
3811
|
+
mutualsWith?: number | undefined;
|
|
3812
|
+
signalTokens?: {
|
|
3813
|
+
tokenAddress: string;
|
|
3814
|
+
}[] | undefined;
|
|
3815
|
+
countries?: {
|
|
3816
|
+
code: string;
|
|
3817
|
+
}[] | undefined;
|
|
3818
|
+
timezones?: {
|
|
3819
|
+
offset: number;
|
|
3820
|
+
range?: number | undefined;
|
|
3821
|
+
}[] | undefined;
|
|
3822
|
+
specificIds?: string[] | undefined;
|
|
3823
|
+
specificFids?: number[] | undefined;
|
|
3824
|
+
specificUsernames?: string[] | undefined;
|
|
3825
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3826
|
+
excludeFids?: number[] | undefined;
|
|
3827
|
+
excludeUsernames?: string[] | undefined;
|
|
3828
|
+
minFollowing?: number | undefined;
|
|
3829
|
+
maxFollowing?: number | undefined;
|
|
3830
|
+
followingOf?: number | undefined;
|
|
3831
|
+
roles?: string[] | undefined;
|
|
3832
|
+
}, {
|
|
3833
|
+
minFollowers?: number | undefined;
|
|
3834
|
+
maxFollowers?: number | undefined;
|
|
3835
|
+
followersOf?: number | undefined;
|
|
3836
|
+
mutualsWith?: number | undefined;
|
|
3837
|
+
signalTokens?: {
|
|
3838
|
+
tokenAddress: string;
|
|
3839
|
+
}[] | undefined;
|
|
3840
|
+
countries?: {
|
|
3841
|
+
code: string;
|
|
3842
|
+
}[] | undefined;
|
|
3843
|
+
timezones?: {
|
|
3844
|
+
offset: number;
|
|
3845
|
+
range?: number | undefined;
|
|
3846
|
+
}[] | undefined;
|
|
3847
|
+
specificIds?: string[] | undefined;
|
|
3848
|
+
specificFids?: number[] | undefined;
|
|
3849
|
+
specificUsernames?: string[] | undefined;
|
|
3850
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
3851
|
+
excludeFids?: number[] | undefined;
|
|
3852
|
+
excludeUsernames?: string[] | undefined;
|
|
3853
|
+
minFollowing?: number | undefined;
|
|
3854
|
+
maxFollowing?: number | undefined;
|
|
3855
|
+
followingOf?: number | undefined;
|
|
3856
|
+
roles?: string[] | undefined;
|
|
3857
|
+
}>>;
|
|
3858
|
+
reputation: z.ZodOptional<z.ZodObject<{
|
|
3859
|
+
neynarScoreMin: z.ZodOptional<z.ZodNumber>;
|
|
3860
|
+
neynarScoreMax: z.ZodOptional<z.ZodNumber>;
|
|
3861
|
+
quotientScoreMin: z.ZodOptional<z.ZodNumber>;
|
|
3862
|
+
quotientScoreMax: z.ZodOptional<z.ZodNumber>;
|
|
3863
|
+
spamLabel: z.ZodOptional<z.ZodEnum<["not_spam_only", "spam_only", "all"]>>;
|
|
3864
|
+
proSubscriptionRequired: z.ZodOptional<z.ZodBoolean>;
|
|
3865
|
+
minProTenureDays: z.ZodOptional<z.ZodNumber>;
|
|
3866
|
+
minTenureDays: z.ZodOptional<z.ZodNumber>;
|
|
3867
|
+
verifiedOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3868
|
+
}, "strip", z.ZodTypeAny, {
|
|
3869
|
+
neynarScoreMin?: number | undefined;
|
|
3870
|
+
neynarScoreMax?: number | undefined;
|
|
3871
|
+
quotientScoreMin?: number | undefined;
|
|
3872
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
3873
|
+
verifiedOnly?: boolean | undefined;
|
|
3874
|
+
quotientScoreMax?: number | undefined;
|
|
3875
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
3876
|
+
minProTenureDays?: number | undefined;
|
|
3877
|
+
minTenureDays?: number | undefined;
|
|
3878
|
+
}, {
|
|
3879
|
+
neynarScoreMin?: number | undefined;
|
|
3880
|
+
neynarScoreMax?: number | undefined;
|
|
3881
|
+
quotientScoreMin?: number | undefined;
|
|
3882
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
3883
|
+
verifiedOnly?: boolean | undefined;
|
|
3884
|
+
quotientScoreMax?: number | undefined;
|
|
3885
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
3886
|
+
minProTenureDays?: number | undefined;
|
|
3887
|
+
minTenureDays?: number | undefined;
|
|
3888
|
+
}>>;
|
|
3889
|
+
onchain: z.ZodOptional<z.ZodObject<{
|
|
3890
|
+
hasBaseWallet: z.ZodOptional<z.ZodBoolean>;
|
|
3891
|
+
tokenHolders: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3892
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3893
|
+
contractAddress: z.ZodString;
|
|
3894
|
+
tokenStandard: z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>;
|
|
3895
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3896
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3897
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
3898
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3899
|
+
}, "strip", z.ZodTypeAny, {
|
|
3900
|
+
chain: "base" | "ethereum";
|
|
3901
|
+
contractAddress: string;
|
|
3902
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3903
|
+
symbol?: string | undefined;
|
|
3904
|
+
name?: string | undefined;
|
|
3905
|
+
minBalance?: string | number | undefined;
|
|
3906
|
+
tokenId?: string | undefined;
|
|
3907
|
+
}, {
|
|
3908
|
+
chain: "base" | "ethereum";
|
|
3909
|
+
contractAddress: string;
|
|
3910
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3911
|
+
symbol?: string | undefined;
|
|
3912
|
+
name?: string | undefined;
|
|
3913
|
+
minBalance?: string | number | undefined;
|
|
3914
|
+
tokenId?: string | undefined;
|
|
3915
|
+
}>, "many">>;
|
|
3916
|
+
cachedTokenHolders: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3917
|
+
chain: z.ZodEnum<["base", "ethereum"]>;
|
|
3918
|
+
contractAddress: z.ZodString;
|
|
3919
|
+
tokenStandard: z.ZodDefault<z.ZodEnum<["ERC20", "ERC721", "ERC1155"]>>;
|
|
3920
|
+
tokenId: z.ZodOptional<z.ZodString>;
|
|
3921
|
+
tokenSymbol: z.ZodOptional<z.ZodString>;
|
|
3922
|
+
tokenName: z.ZodOptional<z.ZodString>;
|
|
3923
|
+
minBalance: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
3924
|
+
}, "strip", z.ZodTypeAny, {
|
|
3925
|
+
chain: "base" | "ethereum";
|
|
3926
|
+
contractAddress: string;
|
|
3927
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3928
|
+
minBalance?: string | number | undefined;
|
|
3929
|
+
tokenId?: string | undefined;
|
|
3930
|
+
tokenSymbol?: string | undefined;
|
|
3931
|
+
tokenName?: string | undefined;
|
|
3932
|
+
}, {
|
|
3933
|
+
chain: "base" | "ethereum";
|
|
3934
|
+
contractAddress: string;
|
|
3935
|
+
minBalance?: string | number | undefined;
|
|
3936
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3937
|
+
tokenId?: string | undefined;
|
|
3938
|
+
tokenSymbol?: string | undefined;
|
|
3939
|
+
tokenName?: string | undefined;
|
|
3940
|
+
}>, "many">>;
|
|
3941
|
+
hasVerifiedWallet: z.ZodOptional<z.ZodBoolean>;
|
|
3942
|
+
}, "strip", z.ZodTypeAny, {
|
|
3943
|
+
tokenHolders?: {
|
|
3944
|
+
chain: "base" | "ethereum";
|
|
3945
|
+
contractAddress: string;
|
|
3946
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3947
|
+
symbol?: string | undefined;
|
|
3948
|
+
name?: string | undefined;
|
|
3949
|
+
minBalance?: string | number | undefined;
|
|
3950
|
+
tokenId?: string | undefined;
|
|
3951
|
+
}[] | undefined;
|
|
3952
|
+
hasBaseWallet?: boolean | undefined;
|
|
3953
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
3954
|
+
cachedTokenHolders?: {
|
|
3955
|
+
chain: "base" | "ethereum";
|
|
3956
|
+
contractAddress: string;
|
|
3957
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3958
|
+
minBalance?: string | number | undefined;
|
|
3959
|
+
tokenId?: string | undefined;
|
|
3960
|
+
tokenSymbol?: string | undefined;
|
|
3961
|
+
tokenName?: string | undefined;
|
|
3962
|
+
}[] | undefined;
|
|
3963
|
+
}, {
|
|
3964
|
+
tokenHolders?: {
|
|
3965
|
+
chain: "base" | "ethereum";
|
|
3966
|
+
contractAddress: string;
|
|
3967
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
3968
|
+
symbol?: string | undefined;
|
|
3969
|
+
name?: string | undefined;
|
|
3970
|
+
minBalance?: string | number | undefined;
|
|
3971
|
+
tokenId?: string | undefined;
|
|
3972
|
+
}[] | undefined;
|
|
3973
|
+
hasBaseWallet?: boolean | undefined;
|
|
3974
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
3975
|
+
cachedTokenHolders?: {
|
|
3976
|
+
chain: "base" | "ethereum";
|
|
3977
|
+
contractAddress: string;
|
|
3978
|
+
minBalance?: string | number | undefined;
|
|
3979
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
3980
|
+
tokenId?: string | undefined;
|
|
3981
|
+
tokenSymbol?: string | undefined;
|
|
3982
|
+
tokenName?: string | undefined;
|
|
3983
|
+
}[] | undefined;
|
|
3984
|
+
}>>;
|
|
3985
|
+
beeperEconomics: z.ZodOptional<z.ZodObject<{
|
|
3986
|
+
maxAttentionPriceUsd: z.ZodOptional<z.ZodNumber>;
|
|
3987
|
+
minAttentionPriceUsd: z.ZodOptional<z.ZodNumber>;
|
|
3988
|
+
minFid: z.ZodOptional<z.ZodNumber>;
|
|
3989
|
+
maxFid: z.ZodOptional<z.ZodNumber>;
|
|
3990
|
+
minBatteryPercentage: z.ZodOptional<z.ZodNumber>;
|
|
3991
|
+
excludePingedToday: z.ZodOptional<z.ZodBoolean>;
|
|
3992
|
+
hasRechargedInLastDays: z.ZodOptional<z.ZodNumber>;
|
|
3993
|
+
activeInLastDays: z.ZodOptional<z.ZodNumber>;
|
|
3994
|
+
requireLotteryOptIn: z.ZodOptional<z.ZodBoolean>;
|
|
3995
|
+
requireQuizOptIn: z.ZodOptional<z.ZodBoolean>;
|
|
3996
|
+
minCastCount: z.ZodOptional<z.ZodNumber>;
|
|
3997
|
+
minClickThroughRate: z.ZodOptional<z.ZodNumber>;
|
|
3998
|
+
isWaitlisted: z.ZodOptional<z.ZodBoolean>;
|
|
3999
|
+
hasTier: z.ZodOptional<z.ZodBoolean>;
|
|
4000
|
+
}, "strip", z.ZodTypeAny, {
|
|
4001
|
+
activeInLastDays?: number | undefined;
|
|
4002
|
+
minCastCount?: number | undefined;
|
|
4003
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4004
|
+
minBatteryPercentage?: number | undefined;
|
|
4005
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4006
|
+
excludePingedToday?: boolean | undefined;
|
|
4007
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4008
|
+
minFid?: number | undefined;
|
|
4009
|
+
maxFid?: number | undefined;
|
|
4010
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4011
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4012
|
+
minClickThroughRate?: number | undefined;
|
|
4013
|
+
isWaitlisted?: boolean | undefined;
|
|
4014
|
+
hasTier?: boolean | undefined;
|
|
4015
|
+
}, {
|
|
4016
|
+
activeInLastDays?: number | undefined;
|
|
4017
|
+
minCastCount?: number | undefined;
|
|
4018
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4019
|
+
minBatteryPercentage?: number | undefined;
|
|
4020
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4021
|
+
excludePingedToday?: boolean | undefined;
|
|
4022
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4023
|
+
minFid?: number | undefined;
|
|
4024
|
+
maxFid?: number | undefined;
|
|
4025
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4026
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4027
|
+
minClickThroughRate?: number | undefined;
|
|
4028
|
+
isWaitlisted?: boolean | undefined;
|
|
4029
|
+
hasTier?: boolean | undefined;
|
|
4030
|
+
}>>;
|
|
4031
|
+
orderBy: z.ZodOptional<z.ZodEnum<["attention_price_asc", "attention_price_desc", "neynar_score_desc", "followers_desc", "followers_asc", "recent_activity", "battery_desc", "random"]>>;
|
|
4032
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4033
|
+
}, "strip", z.ZodTypeAny, {
|
|
4034
|
+
platform?: "all" | "farcaster" | "twitter" | undefined;
|
|
4035
|
+
orderBy?: "attention_price_asc" | "attention_price_desc" | "neynar_score_desc" | "followers_desc" | "followers_asc" | "recent_activity" | "battery_desc" | "random" | undefined;
|
|
4036
|
+
social?: {
|
|
4037
|
+
minFollowers?: number | undefined;
|
|
4038
|
+
maxFollowers?: number | undefined;
|
|
4039
|
+
followersOf?: number | undefined;
|
|
4040
|
+
mutualsWith?: number | undefined;
|
|
4041
|
+
signalTokens?: {
|
|
4042
|
+
tokenAddress: string;
|
|
4043
|
+
}[] | undefined;
|
|
4044
|
+
countries?: {
|
|
4045
|
+
code: string;
|
|
4046
|
+
}[] | undefined;
|
|
4047
|
+
timezones?: {
|
|
4048
|
+
offset: number;
|
|
4049
|
+
range?: number | undefined;
|
|
4050
|
+
}[] | undefined;
|
|
4051
|
+
specificIds?: string[] | undefined;
|
|
4052
|
+
specificFids?: number[] | undefined;
|
|
4053
|
+
specificUsernames?: string[] | undefined;
|
|
4054
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
4055
|
+
excludeFids?: number[] | undefined;
|
|
4056
|
+
excludeUsernames?: string[] | undefined;
|
|
4057
|
+
minFollowing?: number | undefined;
|
|
4058
|
+
maxFollowing?: number | undefined;
|
|
4059
|
+
followingOf?: number | undefined;
|
|
4060
|
+
roles?: string[] | undefined;
|
|
4061
|
+
} | undefined;
|
|
4062
|
+
reputation?: {
|
|
4063
|
+
neynarScoreMin?: number | undefined;
|
|
4064
|
+
neynarScoreMax?: number | undefined;
|
|
4065
|
+
quotientScoreMin?: number | undefined;
|
|
4066
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
4067
|
+
verifiedOnly?: boolean | undefined;
|
|
4068
|
+
quotientScoreMax?: number | undefined;
|
|
4069
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
4070
|
+
minProTenureDays?: number | undefined;
|
|
4071
|
+
minTenureDays?: number | undefined;
|
|
4072
|
+
} | undefined;
|
|
4073
|
+
onchain?: {
|
|
4074
|
+
tokenHolders?: {
|
|
4075
|
+
chain: "base" | "ethereum";
|
|
4076
|
+
contractAddress: string;
|
|
4077
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4078
|
+
symbol?: string | undefined;
|
|
4079
|
+
name?: string | undefined;
|
|
4080
|
+
minBalance?: string | number | undefined;
|
|
4081
|
+
tokenId?: string | undefined;
|
|
4082
|
+
}[] | undefined;
|
|
4083
|
+
hasBaseWallet?: boolean | undefined;
|
|
4084
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
4085
|
+
cachedTokenHolders?: {
|
|
4086
|
+
chain: "base" | "ethereum";
|
|
4087
|
+
contractAddress: string;
|
|
4088
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4089
|
+
minBalance?: string | number | undefined;
|
|
4090
|
+
tokenId?: string | undefined;
|
|
4091
|
+
tokenSymbol?: string | undefined;
|
|
4092
|
+
tokenName?: string | undefined;
|
|
4093
|
+
}[] | undefined;
|
|
4094
|
+
} | undefined;
|
|
4095
|
+
beeperEconomics?: {
|
|
4096
|
+
activeInLastDays?: number | undefined;
|
|
4097
|
+
minCastCount?: number | undefined;
|
|
4098
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4099
|
+
minBatteryPercentage?: number | undefined;
|
|
4100
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4101
|
+
excludePingedToday?: boolean | undefined;
|
|
4102
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4103
|
+
minFid?: number | undefined;
|
|
4104
|
+
maxFid?: number | undefined;
|
|
4105
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4106
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4107
|
+
minClickThroughRate?: number | undefined;
|
|
4108
|
+
isWaitlisted?: boolean | undefined;
|
|
4109
|
+
hasTier?: boolean | undefined;
|
|
4110
|
+
} | undefined;
|
|
4111
|
+
limit?: number | undefined;
|
|
4112
|
+
}, {
|
|
4113
|
+
platform?: "all" | "farcaster" | "twitter" | undefined;
|
|
4114
|
+
orderBy?: "attention_price_asc" | "attention_price_desc" | "neynar_score_desc" | "followers_desc" | "followers_asc" | "recent_activity" | "battery_desc" | "random" | undefined;
|
|
4115
|
+
social?: {
|
|
4116
|
+
minFollowers?: number | undefined;
|
|
4117
|
+
maxFollowers?: number | undefined;
|
|
4118
|
+
followersOf?: number | undefined;
|
|
4119
|
+
mutualsWith?: number | undefined;
|
|
4120
|
+
signalTokens?: {
|
|
4121
|
+
tokenAddress: string;
|
|
4122
|
+
}[] | undefined;
|
|
4123
|
+
countries?: {
|
|
4124
|
+
code: string;
|
|
4125
|
+
}[] | undefined;
|
|
4126
|
+
timezones?: {
|
|
4127
|
+
offset: number;
|
|
4128
|
+
range?: number | undefined;
|
|
4129
|
+
}[] | undefined;
|
|
4130
|
+
specificIds?: string[] | undefined;
|
|
4131
|
+
specificFids?: number[] | undefined;
|
|
4132
|
+
specificUsernames?: string[] | undefined;
|
|
4133
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
4134
|
+
excludeFids?: number[] | undefined;
|
|
4135
|
+
excludeUsernames?: string[] | undefined;
|
|
4136
|
+
minFollowing?: number | undefined;
|
|
4137
|
+
maxFollowing?: number | undefined;
|
|
4138
|
+
followingOf?: number | undefined;
|
|
4139
|
+
roles?: string[] | undefined;
|
|
4140
|
+
} | undefined;
|
|
4141
|
+
reputation?: {
|
|
4142
|
+
neynarScoreMin?: number | undefined;
|
|
4143
|
+
neynarScoreMax?: number | undefined;
|
|
4144
|
+
quotientScoreMin?: number | undefined;
|
|
4145
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
4146
|
+
verifiedOnly?: boolean | undefined;
|
|
4147
|
+
quotientScoreMax?: number | undefined;
|
|
4148
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
4149
|
+
minProTenureDays?: number | undefined;
|
|
4150
|
+
minTenureDays?: number | undefined;
|
|
4151
|
+
} | undefined;
|
|
4152
|
+
onchain?: {
|
|
4153
|
+
tokenHolders?: {
|
|
4154
|
+
chain: "base" | "ethereum";
|
|
4155
|
+
contractAddress: string;
|
|
4156
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4157
|
+
symbol?: string | undefined;
|
|
4158
|
+
name?: string | undefined;
|
|
4159
|
+
minBalance?: string | number | undefined;
|
|
4160
|
+
tokenId?: string | undefined;
|
|
4161
|
+
}[] | undefined;
|
|
4162
|
+
hasBaseWallet?: boolean | undefined;
|
|
4163
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
4164
|
+
cachedTokenHolders?: {
|
|
4165
|
+
chain: "base" | "ethereum";
|
|
4166
|
+
contractAddress: string;
|
|
4167
|
+
minBalance?: string | number | undefined;
|
|
4168
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
4169
|
+
tokenId?: string | undefined;
|
|
4170
|
+
tokenSymbol?: string | undefined;
|
|
4171
|
+
tokenName?: string | undefined;
|
|
4172
|
+
}[] | undefined;
|
|
4173
|
+
} | undefined;
|
|
4174
|
+
beeperEconomics?: {
|
|
4175
|
+
activeInLastDays?: number | undefined;
|
|
4176
|
+
minCastCount?: number | undefined;
|
|
4177
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4178
|
+
minBatteryPercentage?: number | undefined;
|
|
4179
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4180
|
+
excludePingedToday?: boolean | undefined;
|
|
4181
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4182
|
+
minFid?: number | undefined;
|
|
4183
|
+
maxFid?: number | undefined;
|
|
4184
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4185
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4186
|
+
minClickThroughRate?: number | undefined;
|
|
4187
|
+
isWaitlisted?: boolean | undefined;
|
|
4188
|
+
hasTier?: boolean | undefined;
|
|
4189
|
+
} | undefined;
|
|
4190
|
+
limit?: number | undefined;
|
|
4191
|
+
}>;
|
|
4192
|
+
/**
|
|
4193
|
+
* Filter expression supporting logical combinators
|
|
4194
|
+
*/
|
|
4195
|
+
declare const FilterExpressionSchema: z.ZodType<unknown>;
|
|
4196
|
+
declare const RecipientFilterDSLSchema: z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
4197
|
+
type PlatformFilter = z.infer<typeof PlatformFilterSchema>;
|
|
4198
|
+
type SocialFilter = z.infer<typeof SocialFilterSchema>;
|
|
4199
|
+
type ReputationFilter = z.infer<typeof ReputationFilterSchema>;
|
|
4200
|
+
type OnchainFilter = z.infer<typeof OnchainFilterSchema>;
|
|
4201
|
+
type BeeperEconomicsFilter = z.infer<typeof BeeperEconomicsFilterSchema>;
|
|
4202
|
+
type RecipientFilter = z.infer<typeof RecipientFilterSchema>;
|
|
4203
|
+
type FilterExpression = z.infer<typeof FilterExpressionSchema>;
|
|
4204
|
+
type OrderBy = z.infer<typeof OrderBySchema>;
|
|
4205
|
+
type TokenHolderDiscovery = z.infer<typeof TokenHolderDiscoverySchema>;
|
|
4206
|
+
type CachedTokenHolder = z.infer<typeof CachedTokenHolderSchema>;
|
|
4207
|
+
type LegacyFilterOperator = z.infer<typeof LegacyFilterOperatorSchema>;
|
|
4208
|
+
type LegacyFilterValue = z.infer<typeof LegacyFilterValueSchema>;
|
|
4209
|
+
type LegacyFieldComparison = z.infer<typeof LegacyFieldComparisonSchema>;
|
|
4210
|
+
/**
|
|
4211
|
+
* Validate a filter DSL expression
|
|
4212
|
+
*/
|
|
4213
|
+
declare function validateFilter(filter: unknown): boolean;
|
|
4214
|
+
/**
|
|
4215
|
+
* Parse and validate a filter DSL expression
|
|
4216
|
+
*/
|
|
4217
|
+
declare function parseFilter(filter: unknown): unknown;
|
|
4218
|
+
/**
|
|
4219
|
+
* Safely parse a filter DSL expression
|
|
4220
|
+
*/
|
|
4221
|
+
declare function safeParseFilter(filter: unknown): z.SafeParseReturnType<unknown, unknown>;
|
|
4222
|
+
/**
|
|
4223
|
+
* Validate a structured recipient filter
|
|
4224
|
+
*/
|
|
4225
|
+
declare function validateRecipientFilter(filter: unknown): boolean;
|
|
4226
|
+
/**
|
|
4227
|
+
* Parse and validate a structured recipient filter
|
|
4228
|
+
*/
|
|
4229
|
+
declare function parseRecipientFilter(filter: unknown): {
|
|
4230
|
+
platform?: "all" | "farcaster" | "twitter" | undefined;
|
|
4231
|
+
orderBy?: "attention_price_asc" | "attention_price_desc" | "neynar_score_desc" | "followers_desc" | "followers_asc" | "recent_activity" | "battery_desc" | "random" | undefined;
|
|
4232
|
+
social?: {
|
|
4233
|
+
minFollowers?: number | undefined;
|
|
4234
|
+
maxFollowers?: number | undefined;
|
|
4235
|
+
followersOf?: number | undefined;
|
|
4236
|
+
mutualsWith?: number | undefined;
|
|
4237
|
+
signalTokens?: {
|
|
4238
|
+
tokenAddress: string;
|
|
4239
|
+
}[] | undefined;
|
|
4240
|
+
countries?: {
|
|
4241
|
+
code: string;
|
|
4242
|
+
}[] | undefined;
|
|
4243
|
+
timezones?: {
|
|
4244
|
+
offset: number;
|
|
4245
|
+
range?: number | undefined;
|
|
4246
|
+
}[] | undefined;
|
|
4247
|
+
specificIds?: string[] | undefined;
|
|
4248
|
+
specificFids?: number[] | undefined;
|
|
4249
|
+
specificUsernames?: string[] | undefined;
|
|
4250
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
4251
|
+
excludeFids?: number[] | undefined;
|
|
4252
|
+
excludeUsernames?: string[] | undefined;
|
|
4253
|
+
minFollowing?: number | undefined;
|
|
4254
|
+
maxFollowing?: number | undefined;
|
|
4255
|
+
followingOf?: number | undefined;
|
|
4256
|
+
roles?: string[] | undefined;
|
|
4257
|
+
} | undefined;
|
|
4258
|
+
reputation?: {
|
|
4259
|
+
neynarScoreMin?: number | undefined;
|
|
4260
|
+
neynarScoreMax?: number | undefined;
|
|
4261
|
+
quotientScoreMin?: number | undefined;
|
|
4262
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
4263
|
+
verifiedOnly?: boolean | undefined;
|
|
4264
|
+
quotientScoreMax?: number | undefined;
|
|
4265
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
4266
|
+
minProTenureDays?: number | undefined;
|
|
4267
|
+
minTenureDays?: number | undefined;
|
|
4268
|
+
} | undefined;
|
|
4269
|
+
onchain?: {
|
|
4270
|
+
tokenHolders?: {
|
|
4271
|
+
chain: "base" | "ethereum";
|
|
4272
|
+
contractAddress: string;
|
|
4273
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4274
|
+
symbol?: string | undefined;
|
|
4275
|
+
name?: string | undefined;
|
|
4276
|
+
minBalance?: string | number | undefined;
|
|
4277
|
+
tokenId?: string | undefined;
|
|
4278
|
+
}[] | undefined;
|
|
4279
|
+
hasBaseWallet?: boolean | undefined;
|
|
4280
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
4281
|
+
cachedTokenHolders?: {
|
|
4282
|
+
chain: "base" | "ethereum";
|
|
4283
|
+
contractAddress: string;
|
|
4284
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4285
|
+
minBalance?: string | number | undefined;
|
|
4286
|
+
tokenId?: string | undefined;
|
|
4287
|
+
tokenSymbol?: string | undefined;
|
|
4288
|
+
tokenName?: string | undefined;
|
|
4289
|
+
}[] | undefined;
|
|
4290
|
+
} | undefined;
|
|
4291
|
+
beeperEconomics?: {
|
|
4292
|
+
activeInLastDays?: number | undefined;
|
|
4293
|
+
minCastCount?: number | undefined;
|
|
4294
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4295
|
+
minBatteryPercentage?: number | undefined;
|
|
4296
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4297
|
+
excludePingedToday?: boolean | undefined;
|
|
4298
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4299
|
+
minFid?: number | undefined;
|
|
4300
|
+
maxFid?: number | undefined;
|
|
4301
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4302
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4303
|
+
minClickThroughRate?: number | undefined;
|
|
4304
|
+
isWaitlisted?: boolean | undefined;
|
|
4305
|
+
hasTier?: boolean | undefined;
|
|
4306
|
+
} | undefined;
|
|
4307
|
+
limit?: number | undefined;
|
|
4308
|
+
};
|
|
4309
|
+
/**
|
|
4310
|
+
* Safely parse a structured recipient filter
|
|
4311
|
+
*/
|
|
4312
|
+
declare function safeParseRecipientFilter(filter: unknown): z.SafeParseReturnType<{
|
|
4313
|
+
platform?: "all" | "farcaster" | "twitter" | undefined;
|
|
4314
|
+
orderBy?: "attention_price_asc" | "attention_price_desc" | "neynar_score_desc" | "followers_desc" | "followers_asc" | "recent_activity" | "battery_desc" | "random" | undefined;
|
|
4315
|
+
social?: {
|
|
4316
|
+
minFollowers?: number | undefined;
|
|
4317
|
+
maxFollowers?: number | undefined;
|
|
4318
|
+
followersOf?: number | undefined;
|
|
4319
|
+
mutualsWith?: number | undefined;
|
|
4320
|
+
signalTokens?: {
|
|
4321
|
+
tokenAddress: string;
|
|
4322
|
+
}[] | undefined;
|
|
4323
|
+
countries?: {
|
|
4324
|
+
code: string;
|
|
4325
|
+
}[] | undefined;
|
|
4326
|
+
timezones?: {
|
|
4327
|
+
offset: number;
|
|
4328
|
+
range?: number | undefined;
|
|
4329
|
+
}[] | undefined;
|
|
4330
|
+
specificIds?: string[] | undefined;
|
|
4331
|
+
specificFids?: number[] | undefined;
|
|
4332
|
+
specificUsernames?: string[] | undefined;
|
|
4333
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
4334
|
+
excludeFids?: number[] | undefined;
|
|
4335
|
+
excludeUsernames?: string[] | undefined;
|
|
4336
|
+
minFollowing?: number | undefined;
|
|
4337
|
+
maxFollowing?: number | undefined;
|
|
4338
|
+
followingOf?: number | undefined;
|
|
4339
|
+
roles?: string[] | undefined;
|
|
4340
|
+
} | undefined;
|
|
4341
|
+
reputation?: {
|
|
4342
|
+
neynarScoreMin?: number | undefined;
|
|
4343
|
+
neynarScoreMax?: number | undefined;
|
|
4344
|
+
quotientScoreMin?: number | undefined;
|
|
4345
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
4346
|
+
verifiedOnly?: boolean | undefined;
|
|
4347
|
+
quotientScoreMax?: number | undefined;
|
|
4348
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
4349
|
+
minProTenureDays?: number | undefined;
|
|
4350
|
+
minTenureDays?: number | undefined;
|
|
4351
|
+
} | undefined;
|
|
4352
|
+
onchain?: {
|
|
4353
|
+
tokenHolders?: {
|
|
4354
|
+
chain: "base" | "ethereum";
|
|
4355
|
+
contractAddress: string;
|
|
4356
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4357
|
+
symbol?: string | undefined;
|
|
4358
|
+
name?: string | undefined;
|
|
4359
|
+
minBalance?: string | number | undefined;
|
|
4360
|
+
tokenId?: string | undefined;
|
|
4361
|
+
}[] | undefined;
|
|
4362
|
+
hasBaseWallet?: boolean | undefined;
|
|
4363
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
4364
|
+
cachedTokenHolders?: {
|
|
4365
|
+
chain: "base" | "ethereum";
|
|
4366
|
+
contractAddress: string;
|
|
4367
|
+
minBalance?: string | number | undefined;
|
|
4368
|
+
tokenStandard?: "ERC20" | "ERC721" | "ERC1155" | undefined;
|
|
4369
|
+
tokenId?: string | undefined;
|
|
4370
|
+
tokenSymbol?: string | undefined;
|
|
4371
|
+
tokenName?: string | undefined;
|
|
4372
|
+
}[] | undefined;
|
|
4373
|
+
} | undefined;
|
|
4374
|
+
beeperEconomics?: {
|
|
4375
|
+
activeInLastDays?: number | undefined;
|
|
4376
|
+
minCastCount?: number | undefined;
|
|
4377
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4378
|
+
minBatteryPercentage?: number | undefined;
|
|
4379
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4380
|
+
excludePingedToday?: boolean | undefined;
|
|
4381
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4382
|
+
minFid?: number | undefined;
|
|
4383
|
+
maxFid?: number | undefined;
|
|
4384
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4385
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4386
|
+
minClickThroughRate?: number | undefined;
|
|
4387
|
+
isWaitlisted?: boolean | undefined;
|
|
4388
|
+
hasTier?: boolean | undefined;
|
|
4389
|
+
} | undefined;
|
|
4390
|
+
limit?: number | undefined;
|
|
4391
|
+
}, {
|
|
4392
|
+
platform?: "all" | "farcaster" | "twitter" | undefined;
|
|
4393
|
+
orderBy?: "attention_price_asc" | "attention_price_desc" | "neynar_score_desc" | "followers_desc" | "followers_asc" | "recent_activity" | "battery_desc" | "random" | undefined;
|
|
4394
|
+
social?: {
|
|
4395
|
+
minFollowers?: number | undefined;
|
|
4396
|
+
maxFollowers?: number | undefined;
|
|
4397
|
+
followersOf?: number | undefined;
|
|
4398
|
+
mutualsWith?: number | undefined;
|
|
4399
|
+
signalTokens?: {
|
|
4400
|
+
tokenAddress: string;
|
|
4401
|
+
}[] | undefined;
|
|
4402
|
+
countries?: {
|
|
4403
|
+
code: string;
|
|
4404
|
+
}[] | undefined;
|
|
4405
|
+
timezones?: {
|
|
4406
|
+
offset: number;
|
|
4407
|
+
range?: number | undefined;
|
|
4408
|
+
}[] | undefined;
|
|
4409
|
+
specificIds?: string[] | undefined;
|
|
4410
|
+
specificFids?: number[] | undefined;
|
|
4411
|
+
specificUsernames?: string[] | undefined;
|
|
4412
|
+
specificUsersMode?: "exclusive" | "additive" | undefined;
|
|
4413
|
+
excludeFids?: number[] | undefined;
|
|
4414
|
+
excludeUsernames?: string[] | undefined;
|
|
4415
|
+
minFollowing?: number | undefined;
|
|
4416
|
+
maxFollowing?: number | undefined;
|
|
4417
|
+
followingOf?: number | undefined;
|
|
4418
|
+
roles?: string[] | undefined;
|
|
4419
|
+
} | undefined;
|
|
4420
|
+
reputation?: {
|
|
4421
|
+
neynarScoreMin?: number | undefined;
|
|
4422
|
+
neynarScoreMax?: number | undefined;
|
|
4423
|
+
quotientScoreMin?: number | undefined;
|
|
4424
|
+
spamLabel?: "all" | "not_spam_only" | "spam_only" | undefined;
|
|
4425
|
+
verifiedOnly?: boolean | undefined;
|
|
4426
|
+
quotientScoreMax?: number | undefined;
|
|
4427
|
+
proSubscriptionRequired?: boolean | undefined;
|
|
4428
|
+
minProTenureDays?: number | undefined;
|
|
4429
|
+
minTenureDays?: number | undefined;
|
|
4430
|
+
} | undefined;
|
|
4431
|
+
onchain?: {
|
|
4432
|
+
tokenHolders?: {
|
|
4433
|
+
chain: "base" | "ethereum";
|
|
4434
|
+
contractAddress: string;
|
|
4435
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4436
|
+
symbol?: string | undefined;
|
|
4437
|
+
name?: string | undefined;
|
|
4438
|
+
minBalance?: string | number | undefined;
|
|
4439
|
+
tokenId?: string | undefined;
|
|
4440
|
+
}[] | undefined;
|
|
4441
|
+
hasBaseWallet?: boolean | undefined;
|
|
4442
|
+
hasVerifiedWallet?: boolean | undefined;
|
|
4443
|
+
cachedTokenHolders?: {
|
|
4444
|
+
chain: "base" | "ethereum";
|
|
4445
|
+
contractAddress: string;
|
|
4446
|
+
tokenStandard: "ERC20" | "ERC721" | "ERC1155";
|
|
4447
|
+
minBalance?: string | number | undefined;
|
|
4448
|
+
tokenId?: string | undefined;
|
|
4449
|
+
tokenSymbol?: string | undefined;
|
|
4450
|
+
tokenName?: string | undefined;
|
|
4451
|
+
}[] | undefined;
|
|
4452
|
+
} | undefined;
|
|
4453
|
+
beeperEconomics?: {
|
|
4454
|
+
activeInLastDays?: number | undefined;
|
|
4455
|
+
minCastCount?: number | undefined;
|
|
4456
|
+
maxAttentionPriceUsd?: number | undefined;
|
|
4457
|
+
minBatteryPercentage?: number | undefined;
|
|
4458
|
+
hasRechargedInLastDays?: number | undefined;
|
|
4459
|
+
excludePingedToday?: boolean | undefined;
|
|
4460
|
+
minAttentionPriceUsd?: number | undefined;
|
|
4461
|
+
minFid?: number | undefined;
|
|
4462
|
+
maxFid?: number | undefined;
|
|
4463
|
+
requireLotteryOptIn?: boolean | undefined;
|
|
4464
|
+
requireQuizOptIn?: boolean | undefined;
|
|
4465
|
+
minClickThroughRate?: number | undefined;
|
|
4466
|
+
isWaitlisted?: boolean | undefined;
|
|
4467
|
+
hasTier?: boolean | undefined;
|
|
4468
|
+
} | undefined;
|
|
4469
|
+
limit?: number | undefined;
|
|
4470
|
+
}>;
|
|
4471
|
+
/**
|
|
4472
|
+
* Validate that a filter has at least some targeting criteria
|
|
4473
|
+
*/
|
|
4474
|
+
declare function validateFilterHasTargeting(filter: RecipientFilter): boolean;
|
|
4475
|
+
/**
|
|
4476
|
+
* Get human-readable description of filters
|
|
4477
|
+
*/
|
|
4478
|
+
declare function describeFilters(filter: RecipientFilter): string[];
|
|
4479
|
+
|
|
4480
|
+
export { API_BASE_URLS, API_KEY_PREFIXES, ActiveInLastDaysFilterSchema, AgentClient, type AgentClientConfig, type User as AgentUser, type ApiError, type ApiKey, type ApiQuoteResponse, ApiQuoteResponseSchema, type ApiReceiptResponse, ApiReceiptResponseSchema, type AttentionMarketplaceInput, type AttentionPrice, BeeperClient, type BeeperClientConfig, type BeeperConfig, BeeperEconomicsFilterSchema, type BeeperEconomicsFilter as BeeperEconomicsFilterSchemaType, BeeperError, type BeeperErrorOptions, type BulkIntentInput, type BulkIntentResult, CachedTokenHolderFilterSchema, CachedTokenHolderSchema, type CachedTokenHolder as CachedTokenHolderSchemaType, type ConfirmResult as ClientConfirmResult, type Draft$2 as ClientDraft, type DraftInput$1 as ClientDraftInput, type ExecuteResult$1 as ClientExecuteResult, type FilterExpression$2 as ClientFilterExpression, type Health$1 as ClientHealth, type Quote$1 as ClientQuote, type QuoteOptions$1 as ClientQuoteOptions, type Receipt$1 as ClientReceipt, type ReceiptTransaction$1 as ClientReceiptTransaction, type ConfirmDepositInput, type ConfirmDepositParams, type ConfirmDepositResponse, ConfirmDepositResponseSchema, type ConfirmDepositResult, ConfirmResultSchema, CountryFilterSchema, type CreateApiKeyInput, type CreateIntentInput, type CreateQuoteInput, DistributionStrategySchema, DraftInputSchema, DraftSchema, DraftStatusSchema, DraftUpdateSchema, ENDPOINTS, type Environment, type ErrorCode, ErrorCodes, type ErrorContext, type EstimateInput, type EstimateResult, ExcludePingedTodayFilterSchema, ExcludeUsersFilterSchema, type ExecuteResult, ExecuteResultSchema, type ExecuteSendParams, type ExecuteSendResponse, ExecuteSendResponseSchema, ExecuteStatusSchema, FILTER_SCHEMA, FieldComparisonSchema, FilterBuilder, type FilterCategory, FilterExpression$1 as FilterExpression, type FilterExpressionJSON, FilterExpressionSchema, type FilterExpression as FilterExpressionSchemaType, type FilterFieldSchema, FilterOperatorSchema, FilterValueSchema, FollowersOfFilterSchema, FollowingOfFilterSchema, GasTierSchema, HEADERS, HTTP_STATUS_TO_ERROR_CODE, HasBaseWalletFilterSchema, HasRechargedInLastDaysFilterSchema, HasTierFilterSchema, HasVerifiedWalletFilterSchema, type Health, HttpClient, type HttpClientConfig, type HttpRequestOptions, type HttpResponse, IsWaitlistedFilterSchema, type LegacyFieldComparison, LegacyFieldComparisonSchema, type LegacyFilterOperator, LegacyFilterOperatorSchema, type LegacyFilterValue, LegacyFilterValueSchema, LegacyRecipientFilterDSLSchema, MaxAttentionPriceFilterSchema, MaxFidFilterSchema, MaxFollowersFilterSchema, MaxFollowingFilterSchema, MinAttentionPriceFilterSchema, MinBatteryPercentageFilterSchema, MinCastCountFilterSchema, MinClickThroughRateFilterSchema, MinFidFilterSchema, MinFollowersFilterSchema, MinFollowingFilterSchema, MinProTenureDaysFilterSchema, MinTenureDaysFilterSchema, MutualsWithFilterSchema, NetworkSchema, NeynarScoreMaxFilterSchema, NeynarScoreMinFilterSchema, OnchainFilterSchema, type OnchainFilter as OnchainFilterSchemaType, type OrderBy$1 as OrderBy, type OrderByOption, OrderBySchema, type OrderBy as OrderBySchemaType, type PaymentIntent, PlatformFilterSchema, type PlatformFilter as PlatformFilterSchemaType, type PollOptions$1 as PollOptions, type PreviewInput, type PreviewResult, type PreviewUser, ProSubscriptionFilterSchema, QUOTE_EXPIRATION_SECONDS, type Quote, QuoteOptionsSchema, QuoteRecipientSchema, QuoteSchema, type QuoteStatus$2 as QuoteStatus, QuotientScoreMaxFilterSchema, QuotientScoreMinFilterSchema, RETRYABLE_ERROR_CODES, RETRY_CONFIG, type Receipt, ReceiptSchema, type ReceiptStatus, ReceiptTransactionSchema, ReceiptTransferSchema, type RecipientFilter$1 as RecipientFilter, RecipientFilterDSLSchema, RecipientFilterSchema, type RecipientFilter as RecipientFilterSchemaType, ReputationFilterSchema, type ReputationFilter as ReputationFilterSchemaType, RequireLotteryOptInFilterSchema, RequireQuizOptInFilterSchema, type RetryOptions, type RewardType, RolesFilterSchema, SDK_VERSION, type PollOptions as SendPollOptions, type QuoteStatus$1 as SendQuoteStatus, type ReceiptTransaction as SendReceiptTransaction, SignalTokenFilterSchema, type SimpleFilters, SocialFilterSchema, type SocialFilter as SocialFilterSchemaType, SpamLabelFilterSchema, type SpamLabelOption, SpecificUsersFilterSchema, type SupportedChainId, TIMEOUTS, TimezoneFilterSchema, type TimezoneOptions, type TokenDistributionInput, type TokenHolderConfig, TokenHolderDiscoverySchema, type TokenHolderDiscovery as TokenHolderDiscoverySchemaType, TokenHolderFilterSchema, type TokenHolderOptions, type TokenStandard, TokenTypeSchema, TransferStatusSchema, VerifiedOnlyFilterSchema, createAuthorizationHeader, createHttpConfig, BeeperClient as default, describeFilters, generateDepositIdempotencyKey, generateExecuteIdempotencyKey, generateFilterDocumentation, generateIdempotencyKey, getAllFilterNames, getApiKeyEnvironment, getFilterSchema, isRetryableCode, isValidApiKeyFormat, maskApiKey, parseDraft, parseDraftInput, parseExecuteResult, parseFilter, parseQuote, parseQuoteOptions, parseReceipt, parseRecipientFilter, safeParseFilter, safeParseRecipientFilter, confirmDeposit as sendConfirmDeposit, createDraft as sendCreateDraft, createQuote as sendCreateQuote, executeSend as sendExecuteSend, getEstimatedTimeRemaining as sendGetEstimatedTimeRemaining, getFailedTransactions as sendGetFailedTransactions, getQuote as sendGetQuote, getReceipt as sendGetReceipt, getSuccessRate as sendGetSuccessRate, isComplete as sendIsComplete, isDepositSufficient as sendIsDepositSufficient, isExecuting as sendIsExecuting, isQuoteExpired as sendIsQuoteExpired, isReadyForDeposit as sendIsReadyForDeposit, isReadyForQuote as sendIsReadyForQuote, isSuccess as sendIsSuccess, pollUntilComplete as sendPollUntilComplete, updateDraft as sendUpdateDraft, validateDraftInput as sendValidateDraftInput, validateDraft, validateDraftInput$1 as validateDraftInput, validateExecuteResult, validateFilter, validateFilterHasTargeting, validateQuote, validateQuoteOptions, validateReceipt, validateRecipientFilter };
|