@beeperbot/sdk 0.1.0 → 0.2.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/README.md +317 -0
- package/dist/index.cjs +217 -182
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +665 -798
- package/dist/index.d.ts +665 -798
- package/dist/index.js +218 -181
- package/dist/index.js.map +1 -1
- package/package.json +71 -57
package/dist/index.d.cts
CHANGED
|
@@ -15,27 +15,12 @@ type Environment = keyof typeof API_BASE_URLS;
|
|
|
15
15
|
declare const TIMEOUTS: {
|
|
16
16
|
/** Default request timeout */
|
|
17
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
18
|
};
|
|
33
19
|
/**
|
|
34
20
|
* HTTP Headers
|
|
35
21
|
*/
|
|
36
22
|
declare const HEADERS: {
|
|
37
23
|
readonly IDEMPOTENCY_KEY: "Idempotency-Key";
|
|
38
|
-
readonly AUTHORIZATION: "Authorization";
|
|
39
24
|
readonly REQUEST_ID: "X-Request-Id";
|
|
40
25
|
readonly CONTENT_TYPE: "Content-Type";
|
|
41
26
|
};
|
|
@@ -390,7 +375,6 @@ interface BulkIntentResult {
|
|
|
390
375
|
*/
|
|
391
376
|
declare class AgentClient {
|
|
392
377
|
private readonly http;
|
|
393
|
-
private readonly _debug;
|
|
394
378
|
constructor(config: AgentClientConfig);
|
|
395
379
|
/**
|
|
396
380
|
* Look up a user by username, FID, or wallet address
|
|
@@ -558,7 +542,7 @@ declare class AgentClient {
|
|
|
558
542
|
/** Filter expression for recipient selection */
|
|
559
543
|
type FilterExpression$2 = Record<string, unknown>;
|
|
560
544
|
/** Draft input for creating a send */
|
|
561
|
-
interface DraftInput$
|
|
545
|
+
interface DraftInput$2 {
|
|
562
546
|
filter: FilterExpression$2;
|
|
563
547
|
tokenAddress: string;
|
|
564
548
|
chainId: number;
|
|
@@ -568,9 +552,9 @@ interface DraftInput$1 {
|
|
|
568
552
|
metadata?: Record<string, unknown> | undefined;
|
|
569
553
|
}
|
|
570
554
|
/** Local draft object (not yet quoted) */
|
|
571
|
-
interface Draft$
|
|
555
|
+
interface Draft$3 {
|
|
572
556
|
id: string;
|
|
573
|
-
input: DraftInput$
|
|
557
|
+
input: DraftInput$2;
|
|
574
558
|
createdAt: string;
|
|
575
559
|
}
|
|
576
560
|
/** Quote status values */
|
|
@@ -587,16 +571,16 @@ interface Quote$1 {
|
|
|
587
571
|
depositChainId: number;
|
|
588
572
|
depositTokenAddress: string;
|
|
589
573
|
expiresAt: string;
|
|
590
|
-
input:
|
|
574
|
+
input: Record<string, unknown>;
|
|
591
575
|
createdAt: string;
|
|
592
576
|
updatedAt: string;
|
|
593
577
|
}
|
|
594
578
|
/** Options for creating a quote */
|
|
595
|
-
interface QuoteOptions$
|
|
579
|
+
interface QuoteOptions$2 {
|
|
596
580
|
ttlSeconds?: number;
|
|
597
581
|
}
|
|
598
582
|
/** Reward type for attention marketplace */
|
|
599
|
-
type RewardType
|
|
583
|
+
type RewardType = 'guaranteed' | 'lottery' | 'fcfs';
|
|
600
584
|
/** Input for creating an attention marketplace quote */
|
|
601
585
|
interface AttentionQuoteInput {
|
|
602
586
|
/** The message to send (1-1000 chars) */
|
|
@@ -608,7 +592,7 @@ interface AttentionQuoteInput {
|
|
|
608
592
|
/** Budget in USD (e.g., "10.00") */
|
|
609
593
|
budgetUSD: string;
|
|
610
594
|
/** Reward type: guaranteed (default), lottery, or fcfs */
|
|
611
|
-
rewardType?: RewardType
|
|
595
|
+
rewardType?: RewardType;
|
|
612
596
|
/** Optional memo (max 256 chars) */
|
|
613
597
|
memo?: string;
|
|
614
598
|
/** Optional metadata (max 4KB JSON) */
|
|
@@ -643,23 +627,29 @@ interface AttentionQuote {
|
|
|
643
627
|
updatedAt: string;
|
|
644
628
|
}
|
|
645
629
|
/** Result of deposit confirmation */
|
|
646
|
-
interface ConfirmResult {
|
|
630
|
+
interface ConfirmResult$1 {
|
|
647
631
|
quoteId: string;
|
|
648
632
|
status: 'confirmed' | 'pending_verification';
|
|
649
633
|
detectedAmount: string;
|
|
650
634
|
sufficient: boolean;
|
|
651
|
-
blockNumber
|
|
652
|
-
confirmedAt
|
|
635
|
+
blockNumber?: number;
|
|
636
|
+
confirmedAt?: string;
|
|
653
637
|
}
|
|
654
638
|
/** Result of execution trigger */
|
|
655
639
|
interface ExecuteResult$1 {
|
|
656
640
|
quoteId: string;
|
|
657
|
-
status: 'executing' | 'queued';
|
|
658
|
-
estimatedCompletionAt
|
|
659
|
-
batchId
|
|
641
|
+
status: 'executing' | 'queued' | 'pending_deployment';
|
|
642
|
+
estimatedCompletionAt?: string;
|
|
643
|
+
batchId?: string;
|
|
644
|
+
deployment?: {
|
|
645
|
+
to: string;
|
|
646
|
+
data: string;
|
|
647
|
+
value: string;
|
|
648
|
+
chainId: number;
|
|
649
|
+
};
|
|
660
650
|
}
|
|
661
651
|
/** Individual transaction in a receipt */
|
|
662
|
-
interface ReceiptTransaction$
|
|
652
|
+
interface ReceiptTransaction$2 {
|
|
663
653
|
recipient: string;
|
|
664
654
|
amount: string;
|
|
665
655
|
txHash: string | null;
|
|
@@ -669,14 +659,14 @@ interface ReceiptTransaction$1 {
|
|
|
669
659
|
/** Final receipt after execution */
|
|
670
660
|
interface Receipt$1 {
|
|
671
661
|
quoteId: string;
|
|
672
|
-
status: 'completed' | 'partial' | 'failed';
|
|
662
|
+
status: 'completed' | 'partial' | 'failed' | 'executing';
|
|
673
663
|
successCount: number;
|
|
674
664
|
failureCount: number;
|
|
675
665
|
totalSent: string;
|
|
676
666
|
refundAmount: string;
|
|
677
667
|
refundTxHash?: string | undefined;
|
|
678
|
-
transactions: ReceiptTransaction$
|
|
679
|
-
completedAt
|
|
668
|
+
transactions: ReceiptTransaction$2[];
|
|
669
|
+
completedAt?: string;
|
|
680
670
|
}
|
|
681
671
|
/** API health status */
|
|
682
672
|
interface Health$1 {
|
|
@@ -689,6 +679,16 @@ interface Health$1 {
|
|
|
689
679
|
oracle: 'up' | 'down';
|
|
690
680
|
};
|
|
691
681
|
}
|
|
682
|
+
/** Input for confirming a client-side deployment */
|
|
683
|
+
interface ConfirmDeploymentInput {
|
|
684
|
+
txHash: string;
|
|
685
|
+
}
|
|
686
|
+
/** Result of deployment confirmation */
|
|
687
|
+
interface ConfirmDeploymentResult {
|
|
688
|
+
quoteId: string;
|
|
689
|
+
status: string;
|
|
690
|
+
escrowId?: string;
|
|
691
|
+
}
|
|
692
692
|
/** Client configuration */
|
|
693
693
|
interface BeeperClientConfig {
|
|
694
694
|
apiKey: string;
|
|
@@ -738,7 +738,7 @@ declare class BeeperClient {
|
|
|
738
738
|
* @param input - The draft input parameters
|
|
739
739
|
* @returns A draft object with a generated ID
|
|
740
740
|
*/
|
|
741
|
-
createDraft(input: DraftInput$
|
|
741
|
+
createDraft(input: DraftInput$2): Draft$3;
|
|
742
742
|
/**
|
|
743
743
|
* Validates draft input parameters
|
|
744
744
|
*/
|
|
@@ -749,7 +749,7 @@ declare class BeeperClient {
|
|
|
749
749
|
* @param opts - Optional quote options
|
|
750
750
|
* @returns A quote with server-computed pricing
|
|
751
751
|
*/
|
|
752
|
-
createQuote(draft: Draft$
|
|
752
|
+
createQuote(draft: Draft$3, opts?: QuoteOptions$2): Promise<Quote$1>;
|
|
753
753
|
/**
|
|
754
754
|
* Creates an attention marketplace quote (message-based send)
|
|
755
755
|
* @param input - Attention quote input with message, recipients, and budget
|
|
@@ -769,7 +769,7 @@ declare class BeeperClient {
|
|
|
769
769
|
* });
|
|
770
770
|
* ```
|
|
771
771
|
*/
|
|
772
|
-
createAttentionQuote(input: AttentionQuoteInput, opts?: QuoteOptions$
|
|
772
|
+
createAttentionQuote(input: AttentionQuoteInput, opts?: QuoteOptions$2): Promise<AttentionQuote>;
|
|
773
773
|
/**
|
|
774
774
|
* Retrieves an existing quote by ID
|
|
775
775
|
* @param quoteId - The quote ID
|
|
@@ -785,16 +785,24 @@ declare class BeeperClient {
|
|
|
785
785
|
confirmDeposit(quoteId: string, params: {
|
|
786
786
|
txHash: string;
|
|
787
787
|
idempotencyKey: string;
|
|
788
|
-
}): Promise<ConfirmResult>;
|
|
788
|
+
}): Promise<ConfirmResult$1>;
|
|
789
789
|
/**
|
|
790
790
|
* Triggers execution of the send
|
|
791
791
|
* @param quoteId - The quote ID
|
|
792
|
-
* @param params - Execution parameters including idempotencyKey
|
|
792
|
+
* @param params - Execution parameters including idempotencyKey and optional deploymentMode
|
|
793
793
|
* @returns Execution result
|
|
794
794
|
*/
|
|
795
795
|
executeSend(quoteId: string, params: {
|
|
796
796
|
idempotencyKey: string;
|
|
797
|
+
deploymentMode?: 'server' | 'client';
|
|
797
798
|
}): Promise<ExecuteResult$1>;
|
|
799
|
+
/**
|
|
800
|
+
* Confirms a client-side deployment transaction
|
|
801
|
+
* @param quoteId - The quote ID
|
|
802
|
+
* @param input - Deployment confirmation parameters including txHash
|
|
803
|
+
* @returns Deployment confirmation result
|
|
804
|
+
*/
|
|
805
|
+
confirmDeployment(quoteId: string, input: ConfirmDeploymentInput): Promise<ConfirmDeploymentResult>;
|
|
798
806
|
/**
|
|
799
807
|
* Gets the receipt for a completed (or failed) execution
|
|
800
808
|
* @param quoteId - The quote ID
|
|
@@ -854,8 +862,8 @@ declare const DraftInputSchema: z.ZodObject<{
|
|
|
854
862
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
855
863
|
strategy: "equal" | "weighted" | "proportional";
|
|
856
864
|
filter?: unknown;
|
|
857
|
-
metadata?: Record<string, unknown> | undefined;
|
|
858
865
|
weights?: Record<string, number> | undefined;
|
|
866
|
+
metadata?: Record<string, unknown> | undefined;
|
|
859
867
|
}, {
|
|
860
868
|
name: string;
|
|
861
869
|
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
@@ -863,8 +871,8 @@ declare const DraftInputSchema: z.ZodObject<{
|
|
|
863
871
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
864
872
|
strategy: "equal" | "weighted" | "proportional";
|
|
865
873
|
filter?: unknown;
|
|
866
|
-
metadata?: Record<string, unknown> | undefined;
|
|
867
874
|
weights?: Record<string, number> | undefined;
|
|
875
|
+
metadata?: Record<string, unknown> | undefined;
|
|
868
876
|
}>;
|
|
869
877
|
/**
|
|
870
878
|
* Full draft schema - includes server-generated fields
|
|
@@ -893,8 +901,8 @@ declare const DraftSchema: z.ZodObject<{
|
|
|
893
901
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
894
902
|
strategy: "equal" | "weighted" | "proportional";
|
|
895
903
|
filter?: unknown;
|
|
896
|
-
metadata?: Record<string, unknown> | undefined;
|
|
897
904
|
weights?: Record<string, number> | undefined;
|
|
905
|
+
metadata?: Record<string, unknown> | undefined;
|
|
898
906
|
}, {
|
|
899
907
|
name: string;
|
|
900
908
|
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
@@ -906,8 +914,8 @@ declare const DraftSchema: z.ZodObject<{
|
|
|
906
914
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
907
915
|
strategy: "equal" | "weighted" | "proportional";
|
|
908
916
|
filter?: unknown;
|
|
909
|
-
metadata?: Record<string, unknown> | undefined;
|
|
910
917
|
weights?: Record<string, number> | undefined;
|
|
918
|
+
metadata?: Record<string, unknown> | undefined;
|
|
911
919
|
}>;
|
|
912
920
|
/**
|
|
913
921
|
* Draft update schema - partial update
|
|
@@ -925,20 +933,20 @@ declare const DraftUpdateSchema: z.ZodObject<{
|
|
|
925
933
|
name?: string | undefined;
|
|
926
934
|
filter?: unknown;
|
|
927
935
|
network?: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism" | undefined;
|
|
928
|
-
metadata?: Record<string, unknown> | undefined;
|
|
929
936
|
amount?: string | undefined;
|
|
930
937
|
token?: "USDC" | "USDT" | "ETH" | "MATIC" | undefined;
|
|
931
938
|
strategy?: "equal" | "weighted" | "proportional" | undefined;
|
|
932
939
|
weights?: Record<string, number> | undefined;
|
|
940
|
+
metadata?: Record<string, unknown> | undefined;
|
|
933
941
|
}, {
|
|
934
942
|
name?: string | undefined;
|
|
935
943
|
filter?: unknown;
|
|
936
944
|
network?: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism" | undefined;
|
|
937
|
-
metadata?: Record<string, unknown> | undefined;
|
|
938
945
|
amount?: string | undefined;
|
|
939
946
|
token?: "USDC" | "USDT" | "ETH" | "MATIC" | undefined;
|
|
940
947
|
strategy?: "equal" | "weighted" | "proportional" | undefined;
|
|
941
948
|
weights?: Record<string, number> | undefined;
|
|
949
|
+
metadata?: Record<string, unknown> | undefined;
|
|
942
950
|
}>;
|
|
943
951
|
/**
|
|
944
952
|
* Validate draft input
|
|
@@ -950,8 +958,8 @@ declare function validateDraftInput$1(input: unknown): z.SafeParseReturnType<{
|
|
|
950
958
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
951
959
|
strategy: "equal" | "weighted" | "proportional";
|
|
952
960
|
filter?: unknown;
|
|
953
|
-
metadata?: Record<string, unknown> | undefined;
|
|
954
961
|
weights?: Record<string, number> | undefined;
|
|
962
|
+
metadata?: Record<string, unknown> | undefined;
|
|
955
963
|
}, {
|
|
956
964
|
name: string;
|
|
957
965
|
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
@@ -959,8 +967,8 @@ declare function validateDraftInput$1(input: unknown): z.SafeParseReturnType<{
|
|
|
959
967
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
960
968
|
strategy: "equal" | "weighted" | "proportional";
|
|
961
969
|
filter?: unknown;
|
|
962
|
-
metadata?: Record<string, unknown> | undefined;
|
|
963
970
|
weights?: Record<string, number> | undefined;
|
|
971
|
+
metadata?: Record<string, unknown> | undefined;
|
|
964
972
|
}>;
|
|
965
973
|
/**
|
|
966
974
|
* Parse draft input
|
|
@@ -972,8 +980,8 @@ declare function parseDraftInput(input: unknown): {
|
|
|
972
980
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
973
981
|
strategy: "equal" | "weighted" | "proportional";
|
|
974
982
|
filter?: unknown;
|
|
975
|
-
metadata?: Record<string, unknown> | undefined;
|
|
976
983
|
weights?: Record<string, number> | undefined;
|
|
984
|
+
metadata?: Record<string, unknown> | undefined;
|
|
977
985
|
};
|
|
978
986
|
/**
|
|
979
987
|
* Validate draft response
|
|
@@ -989,8 +997,8 @@ declare function validateDraft(draft: unknown): z.SafeParseReturnType<{
|
|
|
989
997
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
990
998
|
strategy: "equal" | "weighted" | "proportional";
|
|
991
999
|
filter?: unknown;
|
|
992
|
-
metadata?: Record<string, unknown> | undefined;
|
|
993
1000
|
weights?: Record<string, number> | undefined;
|
|
1001
|
+
metadata?: Record<string, unknown> | undefined;
|
|
994
1002
|
}, {
|
|
995
1003
|
name: string;
|
|
996
1004
|
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
@@ -1002,8 +1010,8 @@ declare function validateDraft(draft: unknown): z.SafeParseReturnType<{
|
|
|
1002
1010
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1003
1011
|
strategy: "equal" | "weighted" | "proportional";
|
|
1004
1012
|
filter?: unknown;
|
|
1005
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1006
1013
|
weights?: Record<string, number> | undefined;
|
|
1014
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1007
1015
|
}>;
|
|
1008
1016
|
/**
|
|
1009
1017
|
* Parse draft response
|
|
@@ -1019,12 +1027,16 @@ declare function parseDraft(draft: unknown): {
|
|
|
1019
1027
|
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
1020
1028
|
strategy: "equal" | "weighted" | "proportional";
|
|
1021
1029
|
filter?: unknown;
|
|
1022
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1023
1030
|
weights?: Record<string, number> | undefined;
|
|
1031
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1024
1032
|
};
|
|
1033
|
+
type DraftInputSchemaType = z.infer<typeof DraftInputSchema>;
|
|
1034
|
+
type DraftSchemaType = z.infer<typeof DraftSchema>;
|
|
1025
1035
|
|
|
1026
|
-
|
|
1027
|
-
type
|
|
1036
|
+
/** Legacy Draft type used by the functional send API */
|
|
1037
|
+
type Draft$2 = DraftSchemaType;
|
|
1038
|
+
/** Legacy DraftInput type used by the functional send API */
|
|
1039
|
+
type DraftInput$1 = DraftInputSchemaType;
|
|
1028
1040
|
/**
|
|
1029
1041
|
* Create a new draft from input (pure function, no API calls)
|
|
1030
1042
|
*
|
|
@@ -1032,7 +1044,7 @@ type DraftInput = z.infer<typeof DraftInputSchema>;
|
|
|
1032
1044
|
* @returns A Draft object with generated ID and timestamps
|
|
1033
1045
|
* @throws BeeperError if input validation fails
|
|
1034
1046
|
*/
|
|
1035
|
-
declare function createDraft(input: DraftInput): Draft$
|
|
1047
|
+
declare function createDraft(input: DraftInput$1): Draft$2;
|
|
1036
1048
|
/**
|
|
1037
1049
|
* Validate draft input using Zod schema
|
|
1038
1050
|
*
|
|
@@ -1040,7 +1052,7 @@ declare function createDraft(input: DraftInput): Draft$1;
|
|
|
1040
1052
|
* @returns Validated DraftInput
|
|
1041
1053
|
* @throws BeeperError if validation fails
|
|
1042
1054
|
*/
|
|
1043
|
-
declare function validateDraftInput(input: unknown): DraftInput;
|
|
1055
|
+
declare function validateDraftInput(input: unknown): DraftInput$1;
|
|
1044
1056
|
/**
|
|
1045
1057
|
* Update an existing draft with new values
|
|
1046
1058
|
*
|
|
@@ -1048,14 +1060,14 @@ declare function validateDraftInput(input: unknown): DraftInput;
|
|
|
1048
1060
|
* @param updates - Partial updates to apply
|
|
1049
1061
|
* @returns Updated draft with new updatedAt timestamp
|
|
1050
1062
|
*/
|
|
1051
|
-
declare function updateDraft(draft: Draft$
|
|
1063
|
+
declare function updateDraft(draft: Draft$2, updates: Partial<DraftInput$1>): Draft$2;
|
|
1052
1064
|
/**
|
|
1053
1065
|
* Check if a draft is ready for quoting
|
|
1054
1066
|
*
|
|
1055
1067
|
* @param draft - The draft to check
|
|
1056
1068
|
* @returns true if the draft can be quoted
|
|
1057
1069
|
*/
|
|
1058
|
-
declare function isReadyForQuote(draft: Draft$
|
|
1070
|
+
declare function isReadyForQuote(draft: Draft$2): boolean;
|
|
1059
1071
|
|
|
1060
1072
|
/**
|
|
1061
1073
|
* Retry options for HTTP requests
|
|
@@ -1197,399 +1209,105 @@ declare class HttpClient {
|
|
|
1197
1209
|
*/
|
|
1198
1210
|
declare function generateIdempotencyKey(): string;
|
|
1199
1211
|
|
|
1200
|
-
/**
|
|
1201
|
-
|
|
1202
|
-
*/
|
|
1203
|
-
|
|
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
|
-
}, {
|
|
1212
|
+
/** Legacy Draft type used by the functional send API */
|
|
1213
|
+
type Draft$1 = DraftSchemaType;
|
|
1214
|
+
/** Legacy QuoteOptions for the functional send API */
|
|
1215
|
+
interface QuoteOptions$1 {
|
|
1218
1216
|
draftId: string;
|
|
1219
|
-
amount?: string
|
|
1220
|
-
gasTier?:
|
|
1221
|
-
slippageTolerance?: number
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
|
|
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<{
|
|
1217
|
+
amount?: string;
|
|
1218
|
+
gasTier?: 'slow' | 'standard' | 'fast';
|
|
1219
|
+
slippageTolerance?: number;
|
|
1220
|
+
}
|
|
1221
|
+
/** API Quote response schema (matches HTTP contract) */
|
|
1222
|
+
declare const ApiQuoteResponseSchema: z.ZodObject<{
|
|
1243
1223
|
id: z.ZodString;
|
|
1244
|
-
|
|
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">;
|
|
1224
|
+
status: z.ZodEnum<["pending", "deposit_confirmed", "executing", "completed", "expired", "failed"]>;
|
|
1266
1225
|
recipientCount: z.ZodNumber;
|
|
1226
|
+
totalAmount: z.ZodString;
|
|
1227
|
+
protocolFee: z.ZodString;
|
|
1228
|
+
depositAmount: z.ZodString;
|
|
1229
|
+
depositAddress: z.ZodString;
|
|
1230
|
+
depositChainId: z.ZodNumber;
|
|
1231
|
+
depositTokenAddress: z.ZodString;
|
|
1267
1232
|
expiresAt: z.ZodString;
|
|
1233
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1268
1234
|
createdAt: z.ZodString;
|
|
1269
|
-
|
|
1235
|
+
updatedAt: z.ZodString;
|
|
1270
1236
|
}, "strip", z.ZodTypeAny, {
|
|
1271
|
-
|
|
1237
|
+
status: "pending" | "deposit_confirmed" | "executing" | "completed" | "expired" | "failed";
|
|
1272
1238
|
id: string;
|
|
1273
1239
|
recipientCount: number;
|
|
1274
1240
|
totalAmount: string;
|
|
1241
|
+
protocolFee: string;
|
|
1242
|
+
depositAmount: string;
|
|
1243
|
+
depositAddress: string;
|
|
1244
|
+
depositChainId: number;
|
|
1245
|
+
depositTokenAddress: string;
|
|
1275
1246
|
expiresAt: string;
|
|
1247
|
+
input: Record<string, unknown>;
|
|
1276
1248
|
createdAt: string;
|
|
1277
|
-
|
|
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;
|
|
1249
|
+
updatedAt: string;
|
|
1290
1250
|
}, {
|
|
1291
|
-
|
|
1251
|
+
status: "pending" | "deposit_confirmed" | "executing" | "completed" | "expired" | "failed";
|
|
1292
1252
|
id: string;
|
|
1293
1253
|
recipientCount: number;
|
|
1294
1254
|
totalAmount: string;
|
|
1255
|
+
protocolFee: string;
|
|
1256
|
+
depositAmount: string;
|
|
1257
|
+
depositAddress: string;
|
|
1258
|
+
depositChainId: number;
|
|
1259
|
+
depositTokenAddress: string;
|
|
1295
1260
|
expiresAt: string;
|
|
1261
|
+
input: Record<string, unknown>;
|
|
1296
1262
|
createdAt: string;
|
|
1297
|
-
|
|
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;
|
|
1263
|
+
updatedAt: string;
|
|
1332
1264
|
}>;
|
|
1265
|
+
type ApiQuoteResponse = z.infer<typeof ApiQuoteResponseSchema>;
|
|
1266
|
+
type QuoteStatus$1 = 'pending' | 'deposit_confirmed' | 'executing' | 'completed' | 'expired' | 'failed';
|
|
1267
|
+
/** Create a quote for a draft */
|
|
1268
|
+
declare function createQuote(httpClient: HttpClient, draft: Draft$1, opts?: Partial<QuoteOptions$1>): Promise<ApiQuoteResponse>;
|
|
1269
|
+
/** Get an existing quote by ID */
|
|
1270
|
+
declare function getQuote(httpClient: HttpClient, quoteId: string): Promise<ApiQuoteResponse>;
|
|
1271
|
+
/** Check if a quote has expired */
|
|
1272
|
+
declare function isQuoteExpired(quote: ApiQuoteResponse): boolean;
|
|
1273
|
+
/** Check if a quote is ready for deposit confirmation */
|
|
1274
|
+
declare function isReadyForDeposit(quote: ApiQuoteResponse): boolean;
|
|
1275
|
+
|
|
1333
1276
|
/**
|
|
1334
|
-
*
|
|
1335
|
-
*/
|
|
1336
|
-
declare const ExecuteStatusSchema: z.ZodEnum<["pending", "confirmed", "failed"]>;
|
|
1337
|
-
/**
|
|
1338
|
-
* Execute result schema
|
|
1277
|
+
* Confirm deposit response schema (matches HTTP contract)
|
|
1339
1278
|
*/
|
|
1340
|
-
declare const
|
|
1341
|
-
id: z.ZodString;
|
|
1279
|
+
declare const ConfirmDepositResponseSchema: z.ZodObject<{
|
|
1342
1280
|
quoteId: z.ZodString;
|
|
1343
|
-
|
|
1344
|
-
|
|
1281
|
+
status: z.ZodEnum<["confirmed", "pending_verification"]>;
|
|
1282
|
+
detectedAmount: z.ZodString;
|
|
1283
|
+
sufficient: z.ZodBoolean;
|
|
1345
1284
|
blockNumber: z.ZodOptional<z.ZodNumber>;
|
|
1346
|
-
initiatedAt: z.ZodString;
|
|
1347
1285
|
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
1348
|
-
confirmations: z.ZodNumber;
|
|
1349
|
-
receiptId: z.ZodOptional<z.ZodString>;
|
|
1350
1286
|
}, "strip", z.ZodTypeAny, {
|
|
1351
1287
|
quoteId: string;
|
|
1352
|
-
status: "
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
initiatedAt: string;
|
|
1356
|
-
confirmations: number;
|
|
1288
|
+
status: "confirmed" | "pending_verification";
|
|
1289
|
+
detectedAmount: string;
|
|
1290
|
+
sufficient: boolean;
|
|
1357
1291
|
blockNumber?: number | undefined;
|
|
1358
1292
|
confirmedAt?: string | undefined;
|
|
1359
|
-
receiptId?: string | undefined;
|
|
1360
1293
|
}, {
|
|
1361
1294
|
quoteId: string;
|
|
1362
|
-
status: "
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
initiatedAt: string;
|
|
1366
|
-
confirmations: number;
|
|
1295
|
+
status: "confirmed" | "pending_verification";
|
|
1296
|
+
detectedAmount: string;
|
|
1297
|
+
sufficient: boolean;
|
|
1367
1298
|
blockNumber?: number | undefined;
|
|
1368
1299
|
confirmedAt?: string | undefined;
|
|
1369
|
-
receiptId?: string | undefined;
|
|
1370
1300
|
}>;
|
|
1301
|
+
type ConfirmDepositResponse = z.infer<typeof ConfirmDepositResponseSchema>;
|
|
1371
1302
|
/**
|
|
1372
|
-
*
|
|
1303
|
+
* Parameters for confirming a deposit
|
|
1373
1304
|
*/
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
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
|
-
}
|
|
1305
|
+
interface ConfirmDepositParams {
|
|
1306
|
+
/** Transaction hash of the deposit (0x + 64 hex chars) */
|
|
1307
|
+
txHash: string;
|
|
1308
|
+
/** Unique idempotency key for safe retries */
|
|
1309
|
+
idempotencyKey: string;
|
|
1310
|
+
}
|
|
1593
1311
|
/**
|
|
1594
1312
|
* Confirm that a deposit has been made for a quote
|
|
1595
1313
|
*
|
|
@@ -1614,19 +1332,47 @@ declare function generateDepositIdempotencyKey(quoteId: string): string;
|
|
|
1614
1332
|
*/
|
|
1615
1333
|
declare const ExecuteSendResponseSchema: z.ZodObject<{
|
|
1616
1334
|
quoteId: z.ZodString;
|
|
1617
|
-
status: z.ZodEnum<["executing", "queued"]>;
|
|
1618
|
-
estimatedCompletionAt: z.ZodString
|
|
1619
|
-
batchId: z.ZodString
|
|
1335
|
+
status: z.ZodEnum<["executing", "queued", "pending_deployment"]>;
|
|
1336
|
+
estimatedCompletionAt: z.ZodOptional<z.ZodString>;
|
|
1337
|
+
batchId: z.ZodOptional<z.ZodString>;
|
|
1338
|
+
deployment: z.ZodOptional<z.ZodObject<{
|
|
1339
|
+
to: z.ZodString;
|
|
1340
|
+
data: z.ZodString;
|
|
1341
|
+
value: z.ZodString;
|
|
1342
|
+
chainId: z.ZodNumber;
|
|
1343
|
+
}, "strip", z.ZodTypeAny, {
|
|
1344
|
+
value: string;
|
|
1345
|
+
data: string;
|
|
1346
|
+
chainId: number;
|
|
1347
|
+
to: string;
|
|
1348
|
+
}, {
|
|
1349
|
+
value: string;
|
|
1350
|
+
data: string;
|
|
1351
|
+
chainId: number;
|
|
1352
|
+
to: string;
|
|
1353
|
+
}>>;
|
|
1620
1354
|
}, "strip", z.ZodTypeAny, {
|
|
1621
1355
|
quoteId: string;
|
|
1622
|
-
status: "executing" | "queued";
|
|
1623
|
-
estimatedCompletionAt
|
|
1624
|
-
batchId
|
|
1356
|
+
status: "executing" | "queued" | "pending_deployment";
|
|
1357
|
+
estimatedCompletionAt?: string | undefined;
|
|
1358
|
+
batchId?: string | undefined;
|
|
1359
|
+
deployment?: {
|
|
1360
|
+
value: string;
|
|
1361
|
+
data: string;
|
|
1362
|
+
chainId: number;
|
|
1363
|
+
to: string;
|
|
1364
|
+
} | undefined;
|
|
1625
1365
|
}, {
|
|
1626
1366
|
quoteId: string;
|
|
1627
|
-
status: "executing" | "queued";
|
|
1628
|
-
estimatedCompletionAt
|
|
1629
|
-
batchId
|
|
1367
|
+
status: "executing" | "queued" | "pending_deployment";
|
|
1368
|
+
estimatedCompletionAt?: string | undefined;
|
|
1369
|
+
batchId?: string | undefined;
|
|
1370
|
+
deployment?: {
|
|
1371
|
+
value: string;
|
|
1372
|
+
data: string;
|
|
1373
|
+
chainId: number;
|
|
1374
|
+
to: string;
|
|
1375
|
+
} | undefined;
|
|
1630
1376
|
}>;
|
|
1631
1377
|
type ExecuteSendResponse = z.infer<typeof ExecuteSendResponseSchema>;
|
|
1632
1378
|
/**
|
|
@@ -1642,10 +1388,13 @@ interface ExecuteSendParams {
|
|
|
1642
1388
|
* @param httpClient - The HTTP client instance
|
|
1643
1389
|
* @param quoteId - The quote ID to execute
|
|
1644
1390
|
* @param params - Execution parameters
|
|
1391
|
+
* @param options - Optional execution options
|
|
1645
1392
|
* @returns The execution result
|
|
1646
1393
|
* @throws BeeperError if validation fails or API returns error
|
|
1647
1394
|
*/
|
|
1648
|
-
declare function executeSend(httpClient: HttpClient, quoteId: string, params: ExecuteSendParams
|
|
1395
|
+
declare function executeSend(httpClient: HttpClient, quoteId: string, params: ExecuteSendParams, options?: {
|
|
1396
|
+
deploymentMode?: 'server' | 'client';
|
|
1397
|
+
}): Promise<ExecuteSendResponse>;
|
|
1649
1398
|
/**
|
|
1650
1399
|
* Check if execution is in progress
|
|
1651
1400
|
*/
|
|
@@ -1682,7 +1431,7 @@ declare const ReceiptTransactionSchema: z.ZodObject<{
|
|
|
1682
1431
|
/** API Receipt response schema (matches HTTP contract) */
|
|
1683
1432
|
declare const ApiReceiptResponseSchema: z.ZodObject<{
|
|
1684
1433
|
quoteId: z.ZodString;
|
|
1685
|
-
status: z.ZodEnum<["completed", "partial", "failed"]>;
|
|
1434
|
+
status: z.ZodEnum<["completed", "partial", "failed", "executing"]>;
|
|
1686
1435
|
successCount: z.ZodNumber;
|
|
1687
1436
|
failureCount: z.ZodNumber;
|
|
1688
1437
|
totalSent: z.ZodString;
|
|
@@ -1707,10 +1456,10 @@ declare const ApiReceiptResponseSchema: z.ZodObject<{
|
|
|
1707
1456
|
txHash: string | null;
|
|
1708
1457
|
error?: string | null | undefined;
|
|
1709
1458
|
}>, "many">;
|
|
1710
|
-
completedAt: z.ZodString
|
|
1459
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
1711
1460
|
}, "strip", z.ZodTypeAny, {
|
|
1712
1461
|
quoteId: string;
|
|
1713
|
-
status: "completed" | "failed" | "partial";
|
|
1462
|
+
status: "executing" | "completed" | "failed" | "partial";
|
|
1714
1463
|
successCount: number;
|
|
1715
1464
|
failureCount: number;
|
|
1716
1465
|
totalSent: string;
|
|
@@ -1722,11 +1471,11 @@ declare const ApiReceiptResponseSchema: z.ZodObject<{
|
|
|
1722
1471
|
txHash: string | null;
|
|
1723
1472
|
error?: string | null | undefined;
|
|
1724
1473
|
}[];
|
|
1725
|
-
completedAt: string;
|
|
1726
1474
|
refundTxHash?: string | null | undefined;
|
|
1475
|
+
completedAt?: string | undefined;
|
|
1727
1476
|
}, {
|
|
1728
1477
|
quoteId: string;
|
|
1729
|
-
status: "completed" | "failed" | "partial";
|
|
1478
|
+
status: "executing" | "completed" | "failed" | "partial";
|
|
1730
1479
|
successCount: number;
|
|
1731
1480
|
failureCount: number;
|
|
1732
1481
|
totalSent: string;
|
|
@@ -1738,12 +1487,12 @@ declare const ApiReceiptResponseSchema: z.ZodObject<{
|
|
|
1738
1487
|
txHash: string | null;
|
|
1739
1488
|
error?: string | null | undefined;
|
|
1740
1489
|
}[];
|
|
1741
|
-
completedAt: string;
|
|
1742
1490
|
refundTxHash?: string | null | undefined;
|
|
1491
|
+
completedAt?: string | undefined;
|
|
1743
1492
|
}>;
|
|
1744
1493
|
type ApiReceiptResponse = z.infer<typeof ApiReceiptResponseSchema>;
|
|
1745
|
-
type ReceiptTransaction = z.infer<typeof ReceiptTransactionSchema>;
|
|
1746
|
-
type ReceiptStatus = 'completed' | 'partial' | 'failed';
|
|
1494
|
+
type ReceiptTransaction$1 = z.infer<typeof ReceiptTransactionSchema>;
|
|
1495
|
+
type ReceiptStatus = 'completed' | 'partial' | 'failed' | 'executing';
|
|
1747
1496
|
/** Options for polling */
|
|
1748
1497
|
interface PollOptions {
|
|
1749
1498
|
maxAttempts?: number;
|
|
@@ -1765,7 +1514,7 @@ declare function isSuccess(receipt: ApiReceiptResponse): boolean;
|
|
|
1765
1514
|
/** Get the success rate as a percentage */
|
|
1766
1515
|
declare function getSuccessRate(receipt: ApiReceiptResponse): number;
|
|
1767
1516
|
/** Get failed transactions from a receipt */
|
|
1768
|
-
declare function getFailedTransactions(receipt: ApiReceiptResponse): ReceiptTransaction[];
|
|
1517
|
+
declare function getFailedTransactions(receipt: ApiReceiptResponse): ReceiptTransaction$1[];
|
|
1769
1518
|
|
|
1770
1519
|
/**
|
|
1771
1520
|
* Authentication utilities for the Beeper SDK
|
|
@@ -1789,12 +1538,6 @@ declare function isValidApiKeyFormat(apiKey: string): boolean;
|
|
|
1789
1538
|
* @returns 'production' | 'test' | null if invalid
|
|
1790
1539
|
*/
|
|
1791
1540
|
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
1541
|
/**
|
|
1799
1542
|
* Masks an API key for safe logging
|
|
1800
1543
|
* @param apiKey - The API key to mask
|
|
@@ -1803,356 +1546,174 @@ declare function createAuthorizationHeader(apiKey: string): string;
|
|
|
1803
1546
|
declare function maskApiKey(apiKey: string): string;
|
|
1804
1547
|
|
|
1805
1548
|
/**
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
1808
|
-
* Matches the beep.works server API at /api/v1/sdk/*
|
|
1809
|
-
*/
|
|
1810
|
-
/**
|
|
1811
|
-
* Supported blockchain chains for wallet filters
|
|
1549
|
+
* Draft input - what the user provides to create a draft
|
|
1812
1550
|
*/
|
|
1813
|
-
|
|
1551
|
+
interface DraftInput {
|
|
1552
|
+
/** Recipient filter expression */
|
|
1553
|
+
filter: Record<string, unknown>;
|
|
1554
|
+
/** Token contract address (0x prefixed) */
|
|
1555
|
+
tokenAddress: string;
|
|
1556
|
+
/** Chain ID (e.g., 8453 for Base) */
|
|
1557
|
+
chainId: number;
|
|
1558
|
+
/** Amount per recipient in token smallest unit */
|
|
1559
|
+
amountPerRecipient: string;
|
|
1560
|
+
/** Total budget cap in token smallest unit */
|
|
1561
|
+
budgetCap: string;
|
|
1562
|
+
/** Optional memo for the distribution */
|
|
1563
|
+
memo?: string;
|
|
1564
|
+
/** Optional metadata */
|
|
1565
|
+
metadata?: Record<string, unknown>;
|
|
1566
|
+
}
|
|
1814
1567
|
/**
|
|
1815
|
-
*
|
|
1568
|
+
* A saved draft ready for quoting
|
|
1816
1569
|
*/
|
|
1817
|
-
|
|
1570
|
+
interface Draft {
|
|
1571
|
+
/** Unique identifier */
|
|
1572
|
+
id: string;
|
|
1573
|
+
/** Draft input parameters */
|
|
1574
|
+
input: DraftInput;
|
|
1575
|
+
/** When the draft was created */
|
|
1576
|
+
createdAt: string;
|
|
1577
|
+
}
|
|
1818
1578
|
/**
|
|
1819
|
-
*
|
|
1579
|
+
* Quote status values
|
|
1820
1580
|
*/
|
|
1821
|
-
type
|
|
1581
|
+
type QuoteStatus = 'pending' | 'deposit_confirmed' | 'executing' | 'completed' | 'expired' | 'failed' | 'cancelled';
|
|
1822
1582
|
/**
|
|
1823
|
-
*
|
|
1583
|
+
* Options for requesting a quote
|
|
1824
1584
|
*/
|
|
1825
|
-
|
|
1585
|
+
interface QuoteOptions {
|
|
1586
|
+
/** TTL in seconds for the quote (default: 300) */
|
|
1587
|
+
ttlSeconds?: number;
|
|
1588
|
+
}
|
|
1826
1589
|
/**
|
|
1827
|
-
*
|
|
1590
|
+
* A quote for distribution (server-generated with pricing)
|
|
1828
1591
|
*/
|
|
1829
|
-
|
|
1592
|
+
interface Quote {
|
|
1593
|
+
/** Unique quote ID */
|
|
1594
|
+
id: string;
|
|
1595
|
+
/** Current quote status */
|
|
1596
|
+
status: QuoteStatus;
|
|
1597
|
+
/** Number of recipients */
|
|
1598
|
+
recipientCount: number;
|
|
1599
|
+
/** Total amount to be distributed */
|
|
1600
|
+
totalAmount: string;
|
|
1601
|
+
/** Protocol fee amount */
|
|
1602
|
+
protocolFee: string;
|
|
1603
|
+
/** Required deposit amount */
|
|
1604
|
+
depositAmount: string;
|
|
1605
|
+
/** Address to send deposit to */
|
|
1606
|
+
depositAddress: string;
|
|
1607
|
+
/** Chain ID for the deposit */
|
|
1608
|
+
depositChainId: number;
|
|
1609
|
+
/** Token address for the deposit */
|
|
1610
|
+
depositTokenAddress: string;
|
|
1611
|
+
/** When the quote expires (ISO string) */
|
|
1612
|
+
expiresAt: string;
|
|
1613
|
+
/** Original input parameters */
|
|
1614
|
+
input: Record<string, unknown>;
|
|
1615
|
+
/** When the quote was created */
|
|
1616
|
+
createdAt: string;
|
|
1617
|
+
/** When the quote was last updated */
|
|
1618
|
+
updatedAt: string;
|
|
1619
|
+
}
|
|
1830
1620
|
/**
|
|
1831
|
-
*
|
|
1621
|
+
* Result of confirming a deposit
|
|
1832
1622
|
*/
|
|
1833
|
-
interface
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1623
|
+
interface ConfirmResult {
|
|
1624
|
+
/** The quote ID this confirmation is for */
|
|
1625
|
+
quoteId: string;
|
|
1626
|
+
/** Confirmation status */
|
|
1627
|
+
status: 'confirmed' | 'pending_verification';
|
|
1628
|
+
/** Amount detected on-chain */
|
|
1629
|
+
detectedAmount: string;
|
|
1630
|
+
/** Whether the detected amount is sufficient */
|
|
1631
|
+
sufficient: boolean;
|
|
1632
|
+
/** Block number where deposit was found */
|
|
1633
|
+
blockNumber?: number;
|
|
1634
|
+
/** When the deposit was confirmed */
|
|
1635
|
+
confirmedAt?: string;
|
|
1839
1636
|
}
|
|
1840
1637
|
/**
|
|
1841
|
-
*
|
|
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
|
|
1638
|
+
* Result of executing a distribution
|
|
2085
1639
|
*/
|
|
2086
1640
|
interface ExecuteResult {
|
|
2087
|
-
/**
|
|
1641
|
+
/** The quote ID being executed */
|
|
2088
1642
|
quoteId: string;
|
|
2089
1643
|
/** Execution status */
|
|
2090
|
-
status: 'executing' | '
|
|
2091
|
-
/** Estimated completion
|
|
1644
|
+
status: 'executing' | 'queued' | 'pending_deployment';
|
|
1645
|
+
/** Estimated time of completion */
|
|
2092
1646
|
estimatedCompletionAt?: string;
|
|
2093
|
-
/** Batch ID for
|
|
1647
|
+
/** Batch ID for grouped executions */
|
|
2094
1648
|
batchId?: string;
|
|
2095
|
-
/**
|
|
2096
|
-
|
|
1649
|
+
/** Client-side deployment data (when deploymentMode is 'client') */
|
|
1650
|
+
deployment?: {
|
|
1651
|
+
to: string;
|
|
1652
|
+
data: string;
|
|
1653
|
+
value: string;
|
|
1654
|
+
chainId: number;
|
|
1655
|
+
};
|
|
2097
1656
|
}
|
|
2098
1657
|
/**
|
|
2099
|
-
*
|
|
1658
|
+
* A receipt for a completed distribution
|
|
2100
1659
|
*/
|
|
2101
1660
|
interface Receipt {
|
|
2102
|
-
/**
|
|
2103
|
-
id: string;
|
|
2104
|
-
/** Quote ID */
|
|
1661
|
+
/** The quote ID this receipt is for */
|
|
2105
1662
|
quoteId: string;
|
|
2106
|
-
/**
|
|
2107
|
-
status: 'completed' | 'partial' | 'failed';
|
|
2108
|
-
/**
|
|
2109
|
-
|
|
2110
|
-
/** Number of
|
|
2111
|
-
|
|
2112
|
-
/**
|
|
2113
|
-
|
|
2114
|
-
/**
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
|
|
1663
|
+
/** Receipt status */
|
|
1664
|
+
status: 'completed' | 'partial' | 'failed' | 'executing';
|
|
1665
|
+
/** Number of successful sends */
|
|
1666
|
+
successCount: number;
|
|
1667
|
+
/** Number of failed sends */
|
|
1668
|
+
failureCount: number;
|
|
1669
|
+
/** Total amount sent */
|
|
1670
|
+
totalSent: string;
|
|
1671
|
+
/** Amount refunded */
|
|
1672
|
+
refundAmount: string;
|
|
1673
|
+
/** Transaction hash of the refund */
|
|
1674
|
+
refundTxHash?: string;
|
|
1675
|
+
/** Individual transaction results */
|
|
1676
|
+
transactions: ReceiptTransaction[];
|
|
1677
|
+
/** When execution completed */
|
|
1678
|
+
completedAt?: string;
|
|
2118
1679
|
}
|
|
2119
1680
|
/**
|
|
2120
|
-
*
|
|
1681
|
+
* An individual transaction in a receipt
|
|
2121
1682
|
*/
|
|
2122
|
-
interface
|
|
2123
|
-
/**
|
|
2124
|
-
|
|
2125
|
-
/**
|
|
2126
|
-
|
|
1683
|
+
interface ReceiptTransaction {
|
|
1684
|
+
/** Recipient address */
|
|
1685
|
+
recipient: string;
|
|
1686
|
+
/** Amount transferred */
|
|
1687
|
+
amount: string;
|
|
1688
|
+
/** Transaction hash (null if not yet submitted) */
|
|
1689
|
+
txHash: string | null;
|
|
1690
|
+
/** Transfer status */
|
|
1691
|
+
status: 'success' | 'failed';
|
|
1692
|
+
/** Error message if failed */
|
|
1693
|
+
error?: string;
|
|
2127
1694
|
}
|
|
2128
1695
|
/**
|
|
2129
|
-
*
|
|
1696
|
+
* Health check response
|
|
2130
1697
|
*/
|
|
2131
|
-
interface
|
|
2132
|
-
/**
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
|
|
2138
|
-
/**
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
/** Last time the key was used */
|
|
2145
|
-
lastUsedAt?: string;
|
|
2146
|
-
/** Usage count */
|
|
2147
|
-
usageCount: number;
|
|
2148
|
-
/** Creation timestamp */
|
|
2149
|
-
createdAt: string;
|
|
1698
|
+
interface Health {
|
|
1699
|
+
/** Service status */
|
|
1700
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
1701
|
+
/** Service version */
|
|
1702
|
+
version: string;
|
|
1703
|
+
/** Timestamp of check */
|
|
1704
|
+
timestamp: string;
|
|
1705
|
+
/** Status of individual services */
|
|
1706
|
+
services: {
|
|
1707
|
+
database: 'up' | 'down';
|
|
1708
|
+
queue: 'up' | 'down';
|
|
1709
|
+
oracle: 'up' | 'down';
|
|
1710
|
+
};
|
|
2150
1711
|
}
|
|
2151
1712
|
/**
|
|
2152
|
-
* SDK Configuration
|
|
1713
|
+
* SDK Configuration
|
|
2153
1714
|
*/
|
|
2154
1715
|
interface BeeperConfig {
|
|
2155
|
-
/** API key for authentication
|
|
1716
|
+
/** API key for authentication */
|
|
2156
1717
|
apiKey: string;
|
|
2157
1718
|
/** Environment to use */
|
|
2158
1719
|
environment?: 'production' | 'staging' | 'development';
|
|
@@ -2168,31 +1729,34 @@ interface BeeperConfig {
|
|
|
2168
1729
|
maxRetries?: number;
|
|
2169
1730
|
}
|
|
2170
1731
|
/**
|
|
2171
|
-
*
|
|
1732
|
+
* Pagination options
|
|
2172
1733
|
*/
|
|
2173
|
-
interface
|
|
2174
|
-
/**
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
|
|
2178
|
-
/**
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
|
|
2182
|
-
database: 'up' | 'down';
|
|
2183
|
-
queue: 'up' | 'down';
|
|
2184
|
-
oracle: 'up' | 'down';
|
|
2185
|
-
};
|
|
1734
|
+
interface PaginationOptions {
|
|
1735
|
+
/** Page number (1-indexed) */
|
|
1736
|
+
page?: number;
|
|
1737
|
+
/** Items per page */
|
|
1738
|
+
limit?: number;
|
|
1739
|
+
/** Sort field */
|
|
1740
|
+
sortBy?: string;
|
|
1741
|
+
/** Sort direction */
|
|
1742
|
+
sortOrder?: 'asc' | 'desc';
|
|
2186
1743
|
}
|
|
2187
1744
|
/**
|
|
2188
|
-
*
|
|
1745
|
+
* Paginated response
|
|
2189
1746
|
*/
|
|
2190
|
-
interface
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
1747
|
+
interface PaginatedResponse<T> {
|
|
1748
|
+
/** Items on this page */
|
|
1749
|
+
items: T[];
|
|
1750
|
+
/** Total number of items */
|
|
1751
|
+
total: number;
|
|
1752
|
+
/** Current page */
|
|
1753
|
+
page: number;
|
|
1754
|
+
/** Items per page */
|
|
1755
|
+
limit: number;
|
|
1756
|
+
/** Total number of pages */
|
|
1757
|
+
totalPages: number;
|
|
1758
|
+
/** Whether there are more pages */
|
|
1759
|
+
hasMore: boolean;
|
|
2196
1760
|
}
|
|
2197
1761
|
|
|
2198
1762
|
/**
|
|
@@ -2226,6 +1790,8 @@ interface ApiError {
|
|
|
2226
1790
|
type WalletChain = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'optimism';
|
|
2227
1791
|
/** Supported platforms */
|
|
2228
1792
|
type Platform = 'all' | 'farcaster' | 'twitter';
|
|
1793
|
+
/** Spam label filter values */
|
|
1794
|
+
type SpamLabel = 'spam_only' | 'not_spam_only';
|
|
2229
1795
|
/** Extended spam label for spamLabel filter */
|
|
2230
1796
|
type SpamLabelOption = 'not_spam_only' | 'spam_only' | 'all';
|
|
2231
1797
|
/** Timezone filter options */
|
|
@@ -2236,7 +1802,7 @@ interface TimezoneOptions {
|
|
|
2236
1802
|
range?: number;
|
|
2237
1803
|
}
|
|
2238
1804
|
/** Order by options for result sorting */
|
|
2239
|
-
type OrderByOption = '
|
|
1805
|
+
type OrderByOption = 'neynar_score_desc' | 'followers_desc' | 'followers_asc' | 'attention_price_asc' | 'attention_price_desc' | 'recent_activity' | 'battery_desc' | 'random';
|
|
2240
1806
|
/** Token holder filter options */
|
|
2241
1807
|
interface TokenHolderOptions {
|
|
2242
1808
|
/** Token contract address (0x prefixed) */
|
|
@@ -2245,6 +1811,10 @@ interface TokenHolderOptions {
|
|
|
2245
1811
|
chainId: number;
|
|
2246
1812
|
/** Minimum balance in wei (optional) */
|
|
2247
1813
|
minBalance?: string;
|
|
1814
|
+
/** Token standard (optional, defaults to ERC20) */
|
|
1815
|
+
tokenStandard?: 'ERC20' | 'ERC721' | 'ERC1155';
|
|
1816
|
+
/** Token ID for ERC721/ERC1155 (optional) */
|
|
1817
|
+
tokenId?: string;
|
|
2248
1818
|
}
|
|
2249
1819
|
/** Base filter expression that all filters extend */
|
|
2250
1820
|
type FilterExpressionJSON = {
|
|
@@ -2324,15 +1894,19 @@ type FilterExpressionJSON = {
|
|
|
2324
1894
|
maxAttentionPriceUsd: number;
|
|
2325
1895
|
} | {
|
|
2326
1896
|
tokenHolders: Array<{
|
|
2327
|
-
|
|
2328
|
-
|
|
1897
|
+
contractAddress: string;
|
|
1898
|
+
chain: string;
|
|
1899
|
+
tokenStandard: string;
|
|
2329
1900
|
minBalance?: string;
|
|
1901
|
+
tokenId?: string;
|
|
2330
1902
|
}>;
|
|
2331
1903
|
} | {
|
|
2332
1904
|
cachedTokenHolders: Array<{
|
|
2333
|
-
|
|
2334
|
-
|
|
1905
|
+
contractAddress: string;
|
|
1906
|
+
chain: string;
|
|
1907
|
+
tokenStandard: string;
|
|
2335
1908
|
minBalance?: string;
|
|
1909
|
+
tokenId?: string;
|
|
2336
1910
|
}>;
|
|
2337
1911
|
} | {
|
|
2338
1912
|
spamLabel: SpamLabelOption;
|
|
@@ -2380,8 +1954,6 @@ type FilterExpressionJSON = {
|
|
|
2380
1954
|
minCastCount: number;
|
|
2381
1955
|
} | {
|
|
2382
1956
|
orderBy: OrderByOption;
|
|
2383
|
-
} | {
|
|
2384
|
-
limit: number;
|
|
2385
1957
|
};
|
|
2386
1958
|
/**
|
|
2387
1959
|
* FilterExpression class - wraps a filter JSON object with builder methods
|
|
@@ -2460,8 +2032,7 @@ declare class FilterBuilder {
|
|
|
2460
2032
|
*/
|
|
2461
2033
|
static spamLabel(label: SpamLabelOption): FilterExpression$1;
|
|
2462
2034
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
* @deprecated Use spamLabel('not_spam_only') instead
|
|
2035
|
+
* Convenience method: exclude spam users (shorthand for spamLabel('not_spam_only'))
|
|
2465
2036
|
*/
|
|
2466
2037
|
static excludeSpam(): FilterExpression$1;
|
|
2467
2038
|
/**
|
|
@@ -2623,7 +2194,7 @@ declare class FilterBuilder {
|
|
|
2623
2194
|
static countries(codes: string[]): FilterExpression$1;
|
|
2624
2195
|
/**
|
|
2625
2196
|
* Filter users with quotient score >= minimum
|
|
2626
|
-
* @param score - Minimum quotient score (0-1
|
|
2197
|
+
* @param score - Minimum quotient score (0-1)
|
|
2627
2198
|
*/
|
|
2628
2199
|
static quotientScoreMin(score: number): FilterExpression$1;
|
|
2629
2200
|
/**
|
|
@@ -2669,12 +2240,6 @@ declare class FilterBuilder {
|
|
|
2669
2240
|
* @param order - Order option for sorting results
|
|
2670
2241
|
*/
|
|
2671
2242
|
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
2243
|
}
|
|
2679
2244
|
|
|
2680
2245
|
/**
|
|
@@ -2709,6 +2274,7 @@ declare const ErrorCodes: {
|
|
|
2709
2274
|
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
2710
2275
|
readonly DRAFT_NOT_FOUND: "DRAFT_NOT_FOUND";
|
|
2711
2276
|
readonly DRAFT_INVALID: "DRAFT_INVALID";
|
|
2277
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
2712
2278
|
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
2713
2279
|
};
|
|
2714
2280
|
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
@@ -2801,6 +2367,307 @@ declare class BeeperError extends Error {
|
|
|
2801
2367
|
static fromHttpResponse(statusCode: number, body: unknown, requestId?: string | undefined): BeeperError;
|
|
2802
2368
|
}
|
|
2803
2369
|
|
|
2370
|
+
/**
|
|
2371
|
+
* Gas tier options
|
|
2372
|
+
*/
|
|
2373
|
+
declare const GasTierSchema: z.ZodEnum<["slow", "standard", "fast"]>;
|
|
2374
|
+
/**
|
|
2375
|
+
* Quote options schema
|
|
2376
|
+
*/
|
|
2377
|
+
declare const QuoteOptionsSchema: z.ZodObject<{
|
|
2378
|
+
draftId: z.ZodString;
|
|
2379
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
2380
|
+
gasTier: z.ZodOptional<z.ZodEnum<["slow", "standard", "fast"]>>;
|
|
2381
|
+
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
2382
|
+
}, "strip", z.ZodTypeAny, {
|
|
2383
|
+
draftId: string;
|
|
2384
|
+
amount?: string | undefined;
|
|
2385
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
2386
|
+
slippageTolerance?: number | undefined;
|
|
2387
|
+
}, {
|
|
2388
|
+
draftId: string;
|
|
2389
|
+
amount?: string | undefined;
|
|
2390
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
2391
|
+
slippageTolerance?: number | undefined;
|
|
2392
|
+
}>;
|
|
2393
|
+
/**
|
|
2394
|
+
* Quote recipient schema
|
|
2395
|
+
*/
|
|
2396
|
+
declare const QuoteRecipientSchema: z.ZodObject<{
|
|
2397
|
+
address: z.ZodString;
|
|
2398
|
+
amount: z.ZodString;
|
|
2399
|
+
share: z.ZodNumber;
|
|
2400
|
+
}, "strip", z.ZodTypeAny, {
|
|
2401
|
+
amount: string;
|
|
2402
|
+
address: string;
|
|
2403
|
+
share: number;
|
|
2404
|
+
}, {
|
|
2405
|
+
amount: string;
|
|
2406
|
+
address: string;
|
|
2407
|
+
share: number;
|
|
2408
|
+
}>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Quote schema
|
|
2411
|
+
*/
|
|
2412
|
+
declare const QuoteSchema: z.ZodObject<{
|
|
2413
|
+
id: z.ZodString;
|
|
2414
|
+
draftId: z.ZodString;
|
|
2415
|
+
totalAmount: z.ZodString;
|
|
2416
|
+
estimatedGas: z.ZodString;
|
|
2417
|
+
gasPrice: z.ZodString;
|
|
2418
|
+
networkFee: z.ZodString;
|
|
2419
|
+
platformFee: z.ZodString;
|
|
2420
|
+
totalCost: z.ZodString;
|
|
2421
|
+
token: z.ZodEnum<["USDC", "USDT", "ETH", "MATIC"]>;
|
|
2422
|
+
network: z.ZodEnum<["ethereum", "polygon", "base", "arbitrum", "optimism"]>;
|
|
2423
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
2424
|
+
address: z.ZodString;
|
|
2425
|
+
amount: z.ZodString;
|
|
2426
|
+
share: z.ZodNumber;
|
|
2427
|
+
}, "strip", z.ZodTypeAny, {
|
|
2428
|
+
amount: string;
|
|
2429
|
+
address: string;
|
|
2430
|
+
share: number;
|
|
2431
|
+
}, {
|
|
2432
|
+
amount: string;
|
|
2433
|
+
address: string;
|
|
2434
|
+
share: number;
|
|
2435
|
+
}>, "many">;
|
|
2436
|
+
recipientCount: z.ZodNumber;
|
|
2437
|
+
expiresAt: z.ZodString;
|
|
2438
|
+
createdAt: z.ZodString;
|
|
2439
|
+
isValid: z.ZodBoolean;
|
|
2440
|
+
}, "strip", z.ZodTypeAny, {
|
|
2441
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2442
|
+
id: string;
|
|
2443
|
+
recipientCount: number;
|
|
2444
|
+
totalAmount: string;
|
|
2445
|
+
expiresAt: string;
|
|
2446
|
+
createdAt: string;
|
|
2447
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2448
|
+
draftId: string;
|
|
2449
|
+
estimatedGas: string;
|
|
2450
|
+
gasPrice: string;
|
|
2451
|
+
networkFee: string;
|
|
2452
|
+
platformFee: string;
|
|
2453
|
+
totalCost: string;
|
|
2454
|
+
recipients: {
|
|
2455
|
+
amount: string;
|
|
2456
|
+
address: string;
|
|
2457
|
+
share: number;
|
|
2458
|
+
}[];
|
|
2459
|
+
isValid: boolean;
|
|
2460
|
+
}, {
|
|
2461
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2462
|
+
id: string;
|
|
2463
|
+
recipientCount: number;
|
|
2464
|
+
totalAmount: string;
|
|
2465
|
+
expiresAt: string;
|
|
2466
|
+
createdAt: string;
|
|
2467
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2468
|
+
draftId: string;
|
|
2469
|
+
estimatedGas: string;
|
|
2470
|
+
gasPrice: string;
|
|
2471
|
+
networkFee: string;
|
|
2472
|
+
platformFee: string;
|
|
2473
|
+
totalCost: string;
|
|
2474
|
+
recipients: {
|
|
2475
|
+
amount: string;
|
|
2476
|
+
address: string;
|
|
2477
|
+
share: number;
|
|
2478
|
+
}[];
|
|
2479
|
+
isValid: boolean;
|
|
2480
|
+
}>;
|
|
2481
|
+
/**
|
|
2482
|
+
* Confirm result schema
|
|
2483
|
+
*/
|
|
2484
|
+
declare const ConfirmResultSchema: z.ZodObject<{
|
|
2485
|
+
valid: z.ZodBoolean;
|
|
2486
|
+
invalidReason: z.ZodOptional<z.ZodString>;
|
|
2487
|
+
currentGasEstimate: z.ZodString;
|
|
2488
|
+
priceChange: z.ZodString;
|
|
2489
|
+
canExecute: z.ZodBoolean;
|
|
2490
|
+
}, "strip", z.ZodTypeAny, {
|
|
2491
|
+
valid: boolean;
|
|
2492
|
+
currentGasEstimate: string;
|
|
2493
|
+
priceChange: string;
|
|
2494
|
+
canExecute: boolean;
|
|
2495
|
+
invalidReason?: string | undefined;
|
|
2496
|
+
}, {
|
|
2497
|
+
valid: boolean;
|
|
2498
|
+
currentGasEstimate: string;
|
|
2499
|
+
priceChange: string;
|
|
2500
|
+
canExecute: boolean;
|
|
2501
|
+
invalidReason?: string | undefined;
|
|
2502
|
+
}>;
|
|
2503
|
+
/**
|
|
2504
|
+
* Execute result status
|
|
2505
|
+
*/
|
|
2506
|
+
declare const ExecuteStatusSchema: z.ZodEnum<["pending", "confirmed", "failed"]>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Execute result schema
|
|
2509
|
+
*/
|
|
2510
|
+
declare const ExecuteResultSchema: z.ZodObject<{
|
|
2511
|
+
id: z.ZodString;
|
|
2512
|
+
quoteId: z.ZodString;
|
|
2513
|
+
transactionHash: z.ZodString;
|
|
2514
|
+
status: z.ZodEnum<["pending", "confirmed", "failed"]>;
|
|
2515
|
+
blockNumber: z.ZodOptional<z.ZodNumber>;
|
|
2516
|
+
initiatedAt: z.ZodString;
|
|
2517
|
+
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
2518
|
+
confirmations: z.ZodNumber;
|
|
2519
|
+
receiptId: z.ZodOptional<z.ZodString>;
|
|
2520
|
+
}, "strip", z.ZodTypeAny, {
|
|
2521
|
+
quoteId: string;
|
|
2522
|
+
status: "pending" | "failed" | "confirmed";
|
|
2523
|
+
id: string;
|
|
2524
|
+
transactionHash: string;
|
|
2525
|
+
initiatedAt: string;
|
|
2526
|
+
confirmations: number;
|
|
2527
|
+
blockNumber?: number | undefined;
|
|
2528
|
+
confirmedAt?: string | undefined;
|
|
2529
|
+
receiptId?: string | undefined;
|
|
2530
|
+
}, {
|
|
2531
|
+
quoteId: string;
|
|
2532
|
+
status: "pending" | "failed" | "confirmed";
|
|
2533
|
+
id: string;
|
|
2534
|
+
transactionHash: string;
|
|
2535
|
+
initiatedAt: string;
|
|
2536
|
+
confirmations: number;
|
|
2537
|
+
blockNumber?: number | undefined;
|
|
2538
|
+
confirmedAt?: string | undefined;
|
|
2539
|
+
receiptId?: string | undefined;
|
|
2540
|
+
}>;
|
|
2541
|
+
/**
|
|
2542
|
+
* Validate quote options
|
|
2543
|
+
*/
|
|
2544
|
+
declare function validateQuoteOptions(options: unknown): z.SafeParseReturnType<{
|
|
2545
|
+
draftId: string;
|
|
2546
|
+
amount?: string | undefined;
|
|
2547
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
2548
|
+
slippageTolerance?: number | undefined;
|
|
2549
|
+
}, {
|
|
2550
|
+
draftId: string;
|
|
2551
|
+
amount?: string | undefined;
|
|
2552
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
2553
|
+
slippageTolerance?: number | undefined;
|
|
2554
|
+
}>;
|
|
2555
|
+
/**
|
|
2556
|
+
* Parse quote options
|
|
2557
|
+
*/
|
|
2558
|
+
declare function parseQuoteOptions(options: unknown): {
|
|
2559
|
+
draftId: string;
|
|
2560
|
+
amount?: string | undefined;
|
|
2561
|
+
gasTier?: "slow" | "standard" | "fast" | undefined;
|
|
2562
|
+
slippageTolerance?: number | undefined;
|
|
2563
|
+
};
|
|
2564
|
+
/**
|
|
2565
|
+
* Validate quote response
|
|
2566
|
+
*/
|
|
2567
|
+
declare function validateQuote(quote: unknown): z.SafeParseReturnType<{
|
|
2568
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2569
|
+
id: string;
|
|
2570
|
+
recipientCount: number;
|
|
2571
|
+
totalAmount: string;
|
|
2572
|
+
expiresAt: string;
|
|
2573
|
+
createdAt: string;
|
|
2574
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2575
|
+
draftId: string;
|
|
2576
|
+
estimatedGas: string;
|
|
2577
|
+
gasPrice: string;
|
|
2578
|
+
networkFee: string;
|
|
2579
|
+
platformFee: string;
|
|
2580
|
+
totalCost: string;
|
|
2581
|
+
recipients: {
|
|
2582
|
+
amount: string;
|
|
2583
|
+
address: string;
|
|
2584
|
+
share: number;
|
|
2585
|
+
}[];
|
|
2586
|
+
isValid: boolean;
|
|
2587
|
+
}, {
|
|
2588
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2589
|
+
id: string;
|
|
2590
|
+
recipientCount: number;
|
|
2591
|
+
totalAmount: string;
|
|
2592
|
+
expiresAt: string;
|
|
2593
|
+
createdAt: string;
|
|
2594
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2595
|
+
draftId: string;
|
|
2596
|
+
estimatedGas: string;
|
|
2597
|
+
gasPrice: string;
|
|
2598
|
+
networkFee: string;
|
|
2599
|
+
platformFee: string;
|
|
2600
|
+
totalCost: string;
|
|
2601
|
+
recipients: {
|
|
2602
|
+
amount: string;
|
|
2603
|
+
address: string;
|
|
2604
|
+
share: number;
|
|
2605
|
+
}[];
|
|
2606
|
+
isValid: boolean;
|
|
2607
|
+
}>;
|
|
2608
|
+
/**
|
|
2609
|
+
* Parse quote response
|
|
2610
|
+
*/
|
|
2611
|
+
declare function parseQuote(quote: unknown): {
|
|
2612
|
+
network: "base" | "ethereum" | "polygon" | "arbitrum" | "optimism";
|
|
2613
|
+
id: string;
|
|
2614
|
+
recipientCount: number;
|
|
2615
|
+
totalAmount: string;
|
|
2616
|
+
expiresAt: string;
|
|
2617
|
+
createdAt: string;
|
|
2618
|
+
token: "USDC" | "USDT" | "ETH" | "MATIC";
|
|
2619
|
+
draftId: string;
|
|
2620
|
+
estimatedGas: string;
|
|
2621
|
+
gasPrice: string;
|
|
2622
|
+
networkFee: string;
|
|
2623
|
+
platformFee: string;
|
|
2624
|
+
totalCost: string;
|
|
2625
|
+
recipients: {
|
|
2626
|
+
amount: string;
|
|
2627
|
+
address: string;
|
|
2628
|
+
share: number;
|
|
2629
|
+
}[];
|
|
2630
|
+
isValid: boolean;
|
|
2631
|
+
};
|
|
2632
|
+
/**
|
|
2633
|
+
* Validate execute result
|
|
2634
|
+
*/
|
|
2635
|
+
declare function validateExecuteResult(result: unknown): z.SafeParseReturnType<{
|
|
2636
|
+
quoteId: string;
|
|
2637
|
+
status: "pending" | "failed" | "confirmed";
|
|
2638
|
+
id: string;
|
|
2639
|
+
transactionHash: string;
|
|
2640
|
+
initiatedAt: string;
|
|
2641
|
+
confirmations: number;
|
|
2642
|
+
blockNumber?: number | undefined;
|
|
2643
|
+
confirmedAt?: string | undefined;
|
|
2644
|
+
receiptId?: string | undefined;
|
|
2645
|
+
}, {
|
|
2646
|
+
quoteId: string;
|
|
2647
|
+
status: "pending" | "failed" | "confirmed";
|
|
2648
|
+
id: string;
|
|
2649
|
+
transactionHash: string;
|
|
2650
|
+
initiatedAt: string;
|
|
2651
|
+
confirmations: number;
|
|
2652
|
+
blockNumber?: number | undefined;
|
|
2653
|
+
confirmedAt?: string | undefined;
|
|
2654
|
+
receiptId?: string | undefined;
|
|
2655
|
+
}>;
|
|
2656
|
+
/**
|
|
2657
|
+
* Parse execute result
|
|
2658
|
+
*/
|
|
2659
|
+
declare function parseExecuteResult(result: unknown): {
|
|
2660
|
+
quoteId: string;
|
|
2661
|
+
status: "pending" | "failed" | "confirmed";
|
|
2662
|
+
id: string;
|
|
2663
|
+
transactionHash: string;
|
|
2664
|
+
initiatedAt: string;
|
|
2665
|
+
confirmations: number;
|
|
2666
|
+
blockNumber?: number | undefined;
|
|
2667
|
+
confirmedAt?: string | undefined;
|
|
2668
|
+
receiptId?: string | undefined;
|
|
2669
|
+
};
|
|
2670
|
+
|
|
2804
2671
|
/**
|
|
2805
2672
|
* Transfer status
|
|
2806
2673
|
*/
|
|
@@ -3004,11 +2871,11 @@ declare const LegacyFieldComparisonSchema: z.ZodObject<{
|
|
|
3004
2871
|
op: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
3005
2872
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3006
2873
|
}, "strip", z.ZodTypeAny, {
|
|
3007
|
-
value: string | number | boolean |
|
|
2874
|
+
value: string | number | boolean | string[] | number[];
|
|
3008
2875
|
field: string;
|
|
3009
2876
|
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3010
2877
|
}, {
|
|
3011
|
-
value: string | number | boolean |
|
|
2878
|
+
value: string | number | boolean | string[] | number[];
|
|
3012
2879
|
field: string;
|
|
3013
2880
|
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3014
2881
|
}>;
|
|
@@ -3024,11 +2891,11 @@ declare const FieldComparisonSchema: z.ZodObject<{
|
|
|
3024
2891
|
op: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>;
|
|
3025
2892
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3026
2893
|
}, "strip", z.ZodTypeAny, {
|
|
3027
|
-
value: string | number | boolean |
|
|
2894
|
+
value: string | number | boolean | string[] | number[];
|
|
3028
2895
|
field: string;
|
|
3029
2896
|
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3030
2897
|
}, {
|
|
3031
|
-
value: string | number | boolean |
|
|
2898
|
+
value: string | number | boolean | string[] | number[];
|
|
3032
2899
|
field: string;
|
|
3033
2900
|
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
|
|
3034
2901
|
}>;
|
|
@@ -4477,4 +4344,4 @@ declare function validateFilterHasTargeting(filter: RecipientFilter): boolean;
|
|
|
4477
4344
|
*/
|
|
4478
4345
|
declare function describeFilters(filter: RecipientFilter): string[];
|
|
4479
4346
|
|
|
4480
|
-
export { API_BASE_URLS, API_KEY_PREFIXES, ActiveInLastDaysFilterSchema, AgentClient, type AgentClientConfig, type User as AgentUser, type
|
|
4347
|
+
export { API_BASE_URLS, API_KEY_PREFIXES, ActiveInLastDaysFilterSchema, AgentClient, type AgentClientConfig, type User as AgentUser, type ApiQuoteResponse, ApiQuoteResponseSchema, type ApiReceiptResponse, ApiReceiptResponseSchema, type AttentionPrice, type AttentionQuoteInput, BeeperClient, type BeeperClientConfig, type BeeperConfig, BeeperEconomicsFilterSchema, type BeeperEconomicsFilter as BeeperEconomicsFilterSchemaType, BeeperError, type BeeperErrorOptions, type BulkIntentInput, type BulkIntentResult, CachedTokenHolderFilterSchema, CachedTokenHolderSchema, type CachedTokenHolder as CachedTokenHolderSchemaType, type ConfirmDeploymentInput, type ConfirmDeploymentResult, type ConfirmDepositParams, type ConfirmDepositResponse, ConfirmDepositResponseSchema, type ConfirmResult, ConfirmResultSchema, CountryFilterSchema, type CreateIntentInput, DistributionStrategySchema, type Draft, type DraftInput, DraftInputSchema, DraftSchema, DraftStatusSchema, DraftUpdateSchema, 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 OrderByOption, OrderBySchema, type OrderBy as OrderBySchemaType, type PaginatedResponse, type PaginationOptions, type PaymentIntent, type Platform, PlatformFilterSchema, type PlatformFilter as PlatformFilterSchemaType, type PollOptions$1 as PollOptions, type PreviewInput, type PreviewResult, type PreviewUser, ProSubscriptionFilterSchema, QUOTE_EXPIRATION_SECONDS, type Quote, type QuoteOptions, QuoteOptionsSchema, QuoteRecipientSchema, QuoteSchema, type QuoteStatus$2 as QuoteStatus, QuotientScoreMaxFilterSchema, QuotientScoreMinFilterSchema, RETRYABLE_ERROR_CODES, RETRY_CONFIG, type Receipt, ReceiptSchema, type ReceiptStatus, type ReceiptTransaction, ReceiptTransactionSchema, ReceiptTransferSchema, RecipientFilterDSLSchema, RecipientFilterSchema, type RecipientFilter as RecipientFilterSchemaType, ReputationFilterSchema, type ReputationFilter as ReputationFilterSchemaType, RequireLotteryOptInFilterSchema, RequireQuizOptInFilterSchema, type RetryOptions, RolesFilterSchema, SDK_VERSION, type PollOptions as SendPollOptions, type QuoteStatus$1 as SendQuoteStatus, type ReceiptTransaction$1 as SendReceiptTransaction, SignalTokenFilterSchema, type SimpleFilters, SocialFilterSchema, type SocialFilter as SocialFilterSchemaType, type SpamLabel, SpamLabelFilterSchema, type SpamLabelOption, SpecificUsersFilterSchema, TIMEOUTS, TimezoneFilterSchema, type TimezoneOptions, TokenHolderDiscoverySchema, type TokenHolderDiscovery as TokenHolderDiscoverySchemaType, TokenHolderFilterSchema, type TokenHolderOptions, TokenTypeSchema, TransferStatusSchema, type QuoteStatus as TypesQuoteStatus, VerifiedOnlyFilterSchema, type WalletChain, 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 };
|