@zkp2p/sdk 0.3.1 → 0.3.2-rc.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.
@@ -169,13 +169,13 @@ type V2ContractAddresses = {
169
169
  escrow: `0x${string}`;
170
170
  /** EscrowV2 contract (supports native rate-manager delegation) */
171
171
  escrowV2?: `0x${string}`;
172
- /** All supported upgraded escrow addresses (current first, then historical) */
172
+ /** All supported escrow addresses for the current deployment */
173
173
  escrowAddresses?: `0x${string}`[];
174
174
  /** Orchestrator contract (handles intent signaling and fulfillment) */
175
175
  orchestrator?: `0x${string}`;
176
176
  /** OrchestratorV2 contract (queries EscrowV2 effective rates) */
177
177
  orchestratorV2?: `0x${string}`;
178
- /** All supported upgraded orchestrator addresses (current first, then historical) */
178
+ /** All supported orchestrator addresses for the current deployment */
179
179
  orchestratorAddresses?: `0x${string}`[];
180
180
  /** UnifiedPaymentVerifier contract (verifies payment proofs) */
181
181
  unifiedPaymentVerifier?: `0x${string}`;
@@ -183,7 +183,7 @@ type V2ContractAddresses = {
183
183
  unifiedPaymentVerifierV2?: `0x${string}`;
184
184
  /** ProtocolViewer contract (batch read operations) */
185
185
  protocolViewer?: `0x${string}`;
186
- /** Ordered list of all ProtocolViewer instances (primary first, legacy fallback after) */
186
+ /** Ordered list of supported ProtocolViewer instances for the current deployment */
187
187
  protocolViewerEntries?: Array<{
188
188
  address: `0x${string}`;
189
189
  abi: Abi;
@@ -420,44 +420,44 @@ declare function defaultIndexerEndpoint(env?: DeploymentEnv): string;
420
420
  type WithOverrides<TBase, TOverrides> = Omit<TBase, keyof TOverrides> & TOverrides;
421
421
  type DepositStatus$1 = `${DepositStatus$2}`;
422
422
  type IntentStatus = `${IntentStatus$1}`;
423
- type DepositEntity = WithOverrides<Deposit, {
423
+ type DepositEntity$1 = WithOverrides<Deposit, {
424
424
  status: DepositStatus$1;
425
425
  retainOnEmpty?: boolean;
426
426
  whitelistHookAddress?: string | null;
427
427
  }>;
428
- type DepositPaymentMethodEntity = DepositPaymentMethod;
429
- type MethodCurrencyEntity = MethodCurrency;
430
- type IntentEntity = WithOverrides<Intent$1, {
428
+ type DepositPaymentMethodEntity$1 = DepositPaymentMethod;
429
+ type MethodCurrencyEntity$1 = MethodCurrency;
430
+ type IntentEntity$1 = WithOverrides<Intent$1, {
431
431
  status: IntentStatus;
432
432
  }>;
433
- interface DepositWithRelations extends DepositEntity {
434
- paymentMethods?: DepositPaymentMethodEntity[];
435
- currencies?: MethodCurrencyEntity[];
436
- intents?: IntentEntity[];
433
+ interface DepositWithRelations extends DepositEntity$1 {
434
+ paymentMethods?: DepositPaymentMethodEntity$1[];
435
+ currencies?: MethodCurrencyEntity$1[];
436
+ intents?: IntentEntity$1[];
437
437
  }
438
- type DepositFundActivityType = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
438
+ type DepositFundActivityType$1 = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
439
439
  /**
440
440
  * Chronological fund-movement log for a deposit.
441
441
  * One row per on-chain fund event (deposit, add, withdraw, close).
442
442
  */
443
- type DepositFundActivityEntity = WithOverrides<DepositFundActivity, {
444
- activityType: DepositFundActivityType;
443
+ type DepositFundActivityEntity$1 = WithOverrides<DepositFundActivity, {
444
+ activityType: DepositFundActivityType$1;
445
445
  }>;
446
446
  /**
447
447
  * Per-deposit daily rollup snapshot.
448
448
  * One row per deposit per day (UTC-aligned, 86400s buckets).
449
449
  */
450
- type DepositDailySnapshotEntity = DepositDailySnapshot;
451
- interface DepositEventEntity {
450
+ type DepositDailySnapshotEntity$1 = DepositDailySnapshot;
451
+ interface DepositEventEntity$1 {
452
452
  id: string;
453
453
  depositId: string;
454
454
  depositor: string;
455
455
  amount: string;
456
456
  }
457
- interface DepositEventsResponse {
458
- deposits: DepositEventEntity[];
459
- fundsAdded: DepositEventEntity[];
460
- withdrawals: DepositEventEntity[];
457
+ interface DepositEventsResponse$1 {
458
+ deposits: DepositEventEntity$1[];
459
+ fundsAdded: DepositEventEntity$1[];
460
+ withdrawals: DepositEventEntity$1[];
461
461
  }
462
462
  interface IntentFulfilledEntity {
463
463
  intentHash: string;
@@ -486,7 +486,7 @@ type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
486
486
  }>;
487
487
  type ManagerStatsEntity = ManagerStats;
488
488
  type ManagerDailySnapshotEntity = ManagerDailySnapshot;
489
- type MakerProfitSnapshotEntity = MakerProfitSnapshot;
489
+ type MakerProfitSnapshotEntity$1 = MakerProfitSnapshot;
490
490
  interface ManualRateUpdateEntity {
491
491
  id: string;
492
492
  rateManagerId: string;
@@ -560,20 +560,20 @@ declare class IndexerDepositService {
560
560
  private fetchRelations;
561
561
  private fetchIntents;
562
562
  private attachRelations;
563
- fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity[]>;
563
+ fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity$1[]>;
564
564
  fetchDepositsWithRelations(filter?: DepositFilter, pagination?: PaginationOptions, options?: {
565
565
  includeIntents?: boolean;
566
566
  intentStatuses?: IntentStatus[];
567
567
  }): Promise<DepositWithRelations[]>;
568
- fetchDepositsByIds(ids: string[]): Promise<DepositEntity[]>;
568
+ fetchDepositsByIds(ids: string[]): Promise<DepositEntity$1[]>;
569
569
  fetchDepositsByIdsWithRelations(ids: string[], options?: {
570
570
  includeIntents?: boolean;
571
571
  intentStatuses?: IntentStatus[];
572
572
  }): Promise<DepositWithRelations[]>;
573
- fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
574
- fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
575
- fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
576
- fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
573
+ fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
574
+ fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
575
+ fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
576
+ fetchIntentByHash(intentHash: string): Promise<IntentEntity$1 | null>;
577
577
  fetchDepositWithRelations(id: string, options?: {
578
578
  includeIntents?: boolean;
579
579
  intentStatuses?: IntentStatus[];
@@ -582,7 +582,7 @@ declare class IndexerDepositService {
582
582
  now: bigint | string;
583
583
  depositIds: string[];
584
584
  limit?: number;
585
- }): Promise<IntentEntity[]>;
585
+ }): Promise<IntentEntity$1[]>;
586
586
  fetchFulfilledIntentEvents(intentHashes: string[]): Promise<IntentFulfilledEntity[]>;
587
587
  fetchIntentFulfillmentAmounts(intentHash: string): Promise<IntentFulfillmentAmountsEntity | null>;
588
588
  resolvePayeeHash(params: {
@@ -593,7 +593,7 @@ declare class IndexerDepositService {
593
593
  fetchDepositEvents(depositIdOnContract: string, options?: {
594
594
  escrowAddress?: string | null;
595
595
  depositor?: string | null;
596
- }): Promise<DepositEventsResponse>;
596
+ }): Promise<DepositEventsResponse$1>;
597
597
  fetchDepositsByPayeeHash(payeeHash: string, options?: {
598
598
  paymentMethodHash?: string;
599
599
  limit?: number;
@@ -603,16 +603,16 @@ declare class IndexerDepositService {
603
603
  /**
604
604
  * Fetch chronological fund activities for a deposit.
605
605
  */
606
- fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity[]>;
606
+ fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity$1[]>;
607
607
  /**
608
608
  * Fetch fund activities across all deposits for a maker address.
609
609
  */
610
- fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity[]>;
610
+ fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity$1[]>;
611
611
  /**
612
612
  * Fetch daily snapshots for a deposit, ordered by day ascending.
613
613
  */
614
- fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
615
- fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
614
+ fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity$1[]>;
615
+ fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity$1[]>;
616
616
  }
617
617
 
618
618
  type OrderDirection = 'asc' | 'desc';
@@ -699,6 +699,211 @@ type FulfillmentAndPaymentResponse = {
699
699
  };
700
700
  declare function fetchFulfillmentAndPayment(client: IndexerClient, intentHash: string): Promise<FulfillmentAndPaymentResponse>;
701
701
 
702
+ /**
703
+ * Type definitions for the ZKP2P indexer GraphQL schema
704
+ */
705
+ /**
706
+ * Core deposit entity from the indexer
707
+ */
708
+ interface DepositEntity {
709
+ id: string;
710
+ chainId: number;
711
+ escrowAddress: string;
712
+ depositId: string;
713
+ depositor: string;
714
+ delegate?: string | null;
715
+ rateManagerId?: string | null;
716
+ rateManagerAddress?: string | null;
717
+ delegatedAt?: string | null;
718
+ token: string;
719
+ remainingDeposits: string;
720
+ intentAmountMin: string;
721
+ intentAmountMax: string;
722
+ acceptingIntents: boolean;
723
+ retainOnEmpty?: boolean;
724
+ status: "ACTIVE" | "CLOSED";
725
+ outstandingIntentAmount: string;
726
+ totalAmountTaken: string;
727
+ totalWithdrawn: string;
728
+ successRateBps?: number;
729
+ whitelistHookAddress?: string | null;
730
+ preIntentHookAddress?: string | null;
731
+ totalIntents: number;
732
+ signaledIntents: number;
733
+ fulfilledIntents: number;
734
+ prunedIntents: number;
735
+ blockNumber: string;
736
+ timestamp: string;
737
+ txHash: string;
738
+ updatedAt: string;
739
+ }
740
+ /**
741
+ * Payment method configuration for a deposit
742
+ */
743
+ interface DepositPaymentMethodEntity {
744
+ id: string;
745
+ chainId: number;
746
+ depositIdOnContract: string;
747
+ depositId: string;
748
+ paymentMethodHash: string;
749
+ intentGatingService: string;
750
+ payeeDetailsHash: string;
751
+ active: boolean;
752
+ }
753
+ /**
754
+ * Currency configuration for a payment method
755
+ */
756
+ interface MethodCurrencyEntity {
757
+ id: string;
758
+ chainId: number;
759
+ depositIdOnContract: string;
760
+ depositId: string;
761
+ paymentMethodHash: string;
762
+ currencyCode: string;
763
+ minConversionRate: string;
764
+ conversionRate?: string | null;
765
+ takerConversionRate?: string | null;
766
+ managerFee?: string | null;
767
+ rateSource?: string | null;
768
+ oracleRate?: string | null;
769
+ effectiveOracleRate?: string | null;
770
+ lastOracleUpdatedAt?: string | null;
771
+ adapter?: string | null;
772
+ adapterConfig?: string | null;
773
+ feed?: string | null;
774
+ feedDecimals?: number | null;
775
+ spreadBps?: number | null;
776
+ maxStaleness?: string | null;
777
+ invert?: boolean | null;
778
+ kind?: string | null;
779
+ managerRate?: string | null;
780
+ rateManagerId?: string | null;
781
+ }
782
+ /**
783
+ * Intent/swap entity
784
+ */
785
+ interface IntentEntity {
786
+ id: string;
787
+ intentHash: string;
788
+ depositId: string;
789
+ orchestratorAddress: string;
790
+ verifier: string;
791
+ owner: string;
792
+ toAddress: string;
793
+ amount: string;
794
+ fiatCurrency: string;
795
+ conversionRate: string;
796
+ status: "SIGNALED" | "FULFILLED" | "PRUNED" | "MANUALLY_RELEASED";
797
+ signalTimestamp: string;
798
+ expiryTime?: string;
799
+ fulfillTimestamp?: string;
800
+ pruneTimestamp?: string;
801
+ updatedAt?: string;
802
+ signalTxHash: string;
803
+ fulfillTxHash?: string | null;
804
+ pruneTxHash?: string | null;
805
+ paymentMethodHash?: string | null;
806
+ rateManagerId?: string | null;
807
+ managerFee?: string | null;
808
+ managerFeeRecipient?: string | null;
809
+ managerFeeAmount?: string | null;
810
+ isExpired: boolean;
811
+ paymentAmount?: string | null;
812
+ paymentCurrency?: string | null;
813
+ paymentTimestamp?: string | null;
814
+ paymentId?: string | null;
815
+ releasedAmount?: string | null;
816
+ takerAmountNetFees?: string | null;
817
+ }
818
+ type DepositFundActivityType = "DEPOSIT_RECEIVED" | "FUNDS_ADDED" | "WITHDRAWN" | "CLOSED";
819
+ /**
820
+ * Chronological fund-movement log for a deposit.
821
+ * One row per on-chain fund event (deposit, add, withdraw, close).
822
+ */
823
+ interface DepositFundActivityEntity {
824
+ id: string;
825
+ chainId: number;
826
+ depositId: string;
827
+ depositor: string;
828
+ activityType: DepositFundActivityType;
829
+ amount: string;
830
+ blockNumber: string;
831
+ timestamp: string;
832
+ txHash: string;
833
+ }
834
+ /**
835
+ * Per-deposit daily rollup snapshot.
836
+ * One row per deposit per day (UTC-aligned, 86400s buckets).
837
+ */
838
+ interface DepositDailySnapshotEntity {
839
+ id: string;
840
+ chainId: number;
841
+ depositId: string;
842
+ depositor: string;
843
+ dayTimestamp: string;
844
+ remainingDeposits: string;
845
+ outstandingIntentAmount: string;
846
+ totalAmountTaken: string;
847
+ totalWithdrawn: string;
848
+ signaledIntents: number;
849
+ fulfilledIntents: number;
850
+ prunedIntents: number;
851
+ successRateBps: number;
852
+ dailyVolume: string;
853
+ dailyPnlUsdCents: string;
854
+ cumulativeVolume: string;
855
+ cumulativePnlUsdCents: string;
856
+ updatedAt: string;
857
+ }
858
+ interface DepositEventEntity {
859
+ id: string;
860
+ depositId: string;
861
+ depositor: string;
862
+ amount: string;
863
+ }
864
+ interface DepositEventsResponse {
865
+ deposits: DepositEventEntity[];
866
+ fundsAdded: DepositEventEntity[];
867
+ withdrawals: DepositEventEntity[];
868
+ }
869
+ interface MakerProfitSnapshotEntity {
870
+ id: string;
871
+ chainId: number;
872
+ maker: string;
873
+ intentId: string;
874
+ depositId: string;
875
+ fiatCurrency: string;
876
+ quoteConversionRate: string;
877
+ oracleRate?: string | null;
878
+ spreadBps?: number | null;
879
+ amount: string;
880
+ notionalFiatUsdCents?: string | null;
881
+ feeUsd?: string | null;
882
+ realizedProfitUsdCents?: string | null;
883
+ priceSnapshotId?: string | null;
884
+ status: "COMPUTED" | "PENDING";
885
+ createdAt: string;
886
+ updatedAt: string;
887
+ }
888
+
889
+ type DepositBundleRequest = {
890
+ depositId: string;
891
+ escrowAddress: string;
892
+ dailySnapshotLimit?: number;
893
+ };
894
+ type DepositBundleDeposit = DepositEntity & {
895
+ paymentMethods: DepositPaymentMethodEntity[];
896
+ currencies: MethodCurrencyEntity[];
897
+ };
898
+ type DepositBundleResponse = {
899
+ deposit: DepositBundleDeposit;
900
+ intents: IntentEntity[];
901
+ events: DepositEventsResponse;
902
+ profitSnapshots: MakerProfitSnapshotEntity[];
903
+ fundActivities: DepositFundActivityEntity[];
904
+ dailySnapshots: DepositDailySnapshotEntity[];
905
+ };
906
+
702
907
  /**
703
908
  * A prepared transaction ready for submission.
704
909
  * Contains all data needed to submit via wallet or relayer.
@@ -740,6 +945,12 @@ type TimeoutConfig = {
740
945
  /** Transaction timeout in milliseconds (default: 60000) */
741
946
  transaction?: number;
742
947
  };
948
+ type ApiAdapterOptions = {
949
+ baseApiUrl: string;
950
+ timeoutMs?: number;
951
+ apiKey?: string;
952
+ authToken?: string;
953
+ };
743
954
  type AuthorizationTokenProvider = () => string | null | undefined | Promise<string | null | undefined>;
744
955
  /**
745
956
  * Callback function for transaction actions
@@ -879,6 +1090,166 @@ type PostDepositDetailsResponse = {
879
1090
  */
880
1091
  type RegisterPayeeDetailsRequest = PostDepositDetailsRequest;
881
1092
  type RegisterPayeeDetailsResponse = PostDepositDetailsResponse;
1093
+ type SellerPlatform = 'venmo' | 'cashapp' | 'wise';
1094
+ type VenmoSessionMaterial = {
1095
+ recipientUsername: string;
1096
+ accountId: string;
1097
+ sessionCookie: string;
1098
+ requestHeaders?: Record<string, string>;
1099
+ };
1100
+ type CashAppSessionMaterial = {
1101
+ recipientCashtag: string;
1102
+ customerId: string;
1103
+ sessionCookie: string;
1104
+ requestHeaders?: Record<string, string>;
1105
+ requestPayload: string;
1106
+ };
1107
+ type WiseSessionMaterial = {
1108
+ apiToken: string;
1109
+ profileId: string;
1110
+ balanceId: string;
1111
+ currency: string;
1112
+ };
1113
+ type VenmoCredentialUploadInput = {
1114
+ payeeId: string;
1115
+ sessionMaterial: VenmoSessionMaterial;
1116
+ };
1117
+ type CashAppCredentialUploadInput = {
1118
+ payeeId: string;
1119
+ sessionMaterial: CashAppSessionMaterial;
1120
+ };
1121
+ type WiseCredentialUploadInput = {
1122
+ payeeId: string;
1123
+ sessionMaterial: WiseSessionMaterial;
1124
+ };
1125
+ type SellerCredentialUploadInputByPlatform = {
1126
+ venmo: VenmoCredentialUploadInput;
1127
+ cashapp: CashAppCredentialUploadInput;
1128
+ wise: WiseCredentialUploadInput;
1129
+ };
1130
+ type SellerCredentialUploadInput = SellerCredentialUploadInputByPlatform[SellerPlatform];
1131
+ type SellerCiphertextBundle = {
1132
+ encryptedBlob: string;
1133
+ encryptedDataKey: string;
1134
+ nonce: string;
1135
+ payeeIdHash: Hash;
1136
+ };
1137
+ type SellerSignedCiphertextBundle = SellerCiphertextBundle & {
1138
+ expiresAtMs: string;
1139
+ bundleSignature: string;
1140
+ };
1141
+ type SellerVerifyIntentDetails = {
1142
+ intentHash: Hash;
1143
+ amount: string;
1144
+ timestampMs: string;
1145
+ paymentMethod: Hash;
1146
+ fiatCurrency: Hash;
1147
+ conversionRate: string;
1148
+ payeeDetails: Hash;
1149
+ timestampBufferMs?: string;
1150
+ };
1151
+ type SellerVerifyInput = SellerSignedCiphertextBundle & {
1152
+ txId: string;
1153
+ chainId: number;
1154
+ intent: SellerVerifyIntentDetails;
1155
+ };
1156
+ type SellerProbeInput = SellerSignedCiphertextBundle;
1157
+ type SellerCredentialBundle = SellerSignedCiphertextBundle & {
1158
+ platform: SellerPlatform;
1159
+ credentialType: string;
1160
+ };
1161
+ type SellerCredentialBundleUpload = SellerCredentialBundle;
1162
+ type SellerCredentialStatusValue = 'active' | 'inactive' | 'missing';
1163
+ type SellerCredentialStatus = {
1164
+ makerId: number;
1165
+ platform: string;
1166
+ payeeIdHash: Hash;
1167
+ status: SellerCredentialStatusValue;
1168
+ credentialType: string | null;
1169
+ };
1170
+ type SellerVerifyProxyBody = {
1171
+ txId: string;
1172
+ chainId: number;
1173
+ intent: SellerVerifyIntentDetails;
1174
+ };
1175
+ type SellerTypedDataField = {
1176
+ name: string;
1177
+ type: string;
1178
+ };
1179
+ type SellerTypedDataSpec = {
1180
+ primaryType: string;
1181
+ types: Record<string, SellerTypedDataField[]>;
1182
+ };
1183
+ type SellerPaymentTypedDataValue = {
1184
+ intentHash: Hash;
1185
+ releaseAmount: string;
1186
+ dataHash: Hash;
1187
+ };
1188
+ type SellerAttestationOutput = {
1189
+ platform: string;
1190
+ actionType: string;
1191
+ signature: string;
1192
+ signer: Address;
1193
+ domainSeparator: Hash;
1194
+ typeHash: Hash;
1195
+ typedDataSpec: SellerTypedDataSpec;
1196
+ typedDataValue: SellerPaymentTypedDataValue;
1197
+ proofInput: string;
1198
+ encodedPaymentDetails: string;
1199
+ metadata: string;
1200
+ };
1201
+ type SellerCredentialProbeResponse = {
1202
+ alive: boolean;
1203
+ reason?: string | null;
1204
+ };
1205
+ type AttestationServiceSellerCredentialUploadResponse = {
1206
+ success: boolean;
1207
+ message: string;
1208
+ responseObject: SellerCredentialBundle;
1209
+ statusCode: number;
1210
+ };
1211
+ type AttestationServiceSellerVerifyResponse = {
1212
+ success: boolean;
1213
+ message: string;
1214
+ responseObject: SellerAttestationOutput;
1215
+ statusCode: number;
1216
+ };
1217
+ type AttestationServiceSellerCredentialProbeResponse = {
1218
+ success: boolean;
1219
+ message: string;
1220
+ responseObject: SellerCredentialProbeResponse;
1221
+ statusCode: number;
1222
+ };
1223
+ type CuratorSellerCredentialUploadResponse = {
1224
+ success: boolean;
1225
+ message: string;
1226
+ responseObject: SellerCredentialStatus;
1227
+ statusCode: number;
1228
+ };
1229
+ type CuratorSellerCredentialStatusResponse = {
1230
+ success: boolean;
1231
+ message: string;
1232
+ responseObject: SellerCredentialStatus;
1233
+ statusCode: number;
1234
+ };
1235
+ type CuratorSellerVerifyResponse = {
1236
+ success: boolean;
1237
+ message: string;
1238
+ responseObject: SellerAttestationOutput;
1239
+ statusCode: number;
1240
+ };
1241
+ type UploadSellerCredentialParams = {
1242
+ [P in SellerPlatform]: {
1243
+ makerId: number;
1244
+ platform: P;
1245
+ } & SellerCredentialUploadInputByPlatform[P];
1246
+ }[SellerPlatform];
1247
+ type GetSellerCredentialStatusParams = {
1248
+ makerId: number;
1249
+ };
1250
+ type VerifySellerPaymentParams = {
1251
+ platform: SellerPlatform;
1252
+ } & SellerVerifyProxyBody;
882
1253
  type QuoteRequest = {
883
1254
  paymentPlatforms: string[];
884
1255
  fiatCurrency: string;
@@ -1363,6 +1734,45 @@ type GetTakerTierResponse = {
1363
1734
  responseObject: TakerTier;
1364
1735
  statusCode?: number;
1365
1736
  };
1737
+ type GetDepositBundleParams = DepositBundleRequest;
1738
+ type GetDepositBundleResponse = DepositBundleResponse;
1739
+ type GetOrderbookParams = {
1740
+ currency: string;
1741
+ paymentPlatform?: string;
1742
+ sortBy?: 'price' | 'available' | 'limits';
1743
+ sortDirection?: 'asc' | 'desc';
1744
+ limit?: number;
1745
+ chainId?: number;
1746
+ token?: string;
1747
+ };
1748
+ type OrderbookEntry = {
1749
+ depositId: string;
1750
+ depositor: string;
1751
+ price: string;
1752
+ availableTokenAmount: string;
1753
+ availableFiatAmount: string;
1754
+ intentAmountMin: string;
1755
+ intentAmountMax: string;
1756
+ paymentPlatform: string;
1757
+ currency: string;
1758
+ paymentMethodHash: string;
1759
+ payeeDetailsHash: string;
1760
+ escrowAddress: string;
1761
+ chainId: number;
1762
+ offchainId?: string;
1763
+ telegramUsername?: string;
1764
+ };
1765
+ type GetOrderbookResponse = {
1766
+ chainId: number;
1767
+ token: string;
1768
+ currency: string;
1769
+ paymentPlatform: string | null;
1770
+ sortBy: string;
1771
+ sortDirection: string;
1772
+ internalDetailsIncluded: boolean;
1773
+ generatedAt: string;
1774
+ entries: OrderbookEntry[];
1775
+ };
1366
1776
 
1367
1777
  declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
1368
1778
  type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
@@ -1674,6 +2084,8 @@ declare class Zkp2pClient {
1674
2084
  private normalizeAddress;
1675
2085
  private parseEscrowAddressFromCompositeDepositId;
1676
2086
  private parseRawDepositId;
2087
+ private stripTrailingSlash;
2088
+ private defaultAttestationServiceForBaseApiUrl;
1677
2089
  private normalizeOracleRateConfig;
1678
2090
  private escrowCurrencyHasOracleConfig;
1679
2091
  /**
@@ -1848,7 +2260,7 @@ declare class Zkp2pClient {
1848
2260
  * Fetches deposits from the indexer with optional filtering and pagination.
1849
2261
  * Use for advanced queries across all deposits, not just by owner.
1850
2262
  */
1851
- getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity[]>;
2263
+ getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity$1[]>;
1852
2264
  /**
1853
2265
  * Fetches deposits with their related payment methods and optionally intents.
1854
2266
  */
@@ -1867,19 +2279,19 @@ declare class Zkp2pClient {
1867
2279
  /**
1868
2280
  * Fetches intents for multiple deposits.
1869
2281
  */
1870
- getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2282
+ getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
1871
2283
  /**
1872
2284
  * Fetches all intents created by a specific owner address.
1873
2285
  */
1874
- getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2286
+ getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
1875
2287
  /**
1876
2288
  * Fetches fulfilled intents for a vault by rate manager ID.
1877
2289
  */
1878
- getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2290
+ getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
1879
2291
  /**
1880
2292
  * Fetches a single intent by hash.
1881
2293
  */
1882
- getIntentByHash: (intentHash: string) => Promise<IntentEntity | null>;
2294
+ getIntentByHash: (intentHash: string) => Promise<IntentEntity$1 | null>;
1883
2295
  /**
1884
2296
  * Fetches intents that have expired.
1885
2297
  */
@@ -1887,7 +2299,7 @@ declare class Zkp2pClient {
1887
2299
  now: bigint | string;
1888
2300
  depositIds: string[];
1889
2301
  limit?: number;
1890
- }) => Promise<IntentEntity[]>;
2302
+ }) => Promise<IntentEntity$1[]>;
1891
2303
  /**
1892
2304
  * Fetches fulfillment events for completed intents.
1893
2305
  */
@@ -1913,7 +2325,7 @@ declare class Zkp2pClient {
1913
2325
  * Fetches deposits by their composite IDs.
1914
2326
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
1915
2327
  */
1916
- getDepositsByIds: (ids: string[]) => Promise<DepositEntity[]>;
2328
+ getDepositsByIds: (ids: string[]) => Promise<DepositEntity$1[]>;
1917
2329
  /**
1918
2330
  * Fetches deposits by their composite IDs with all related data.
1919
2331
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
@@ -1925,7 +2337,7 @@ declare class Zkp2pClient {
1925
2337
  /**
1926
2338
  * Fetches maker profit snapshots for the provided deposits.
1927
2339
  */
1928
- getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
2340
+ getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity$1[]>;
1929
2341
  /**
1930
2342
  * Fetches rate managers (vaults) with aggregate stats.
1931
2343
  */
@@ -1965,15 +2377,15 @@ declare class Zkp2pClient {
1965
2377
  /**
1966
2378
  * Fetches chronological fund activities for a specific deposit.
1967
2379
  */
1968
- getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity[]>;
2380
+ getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity$1[]>;
1969
2381
  /**
1970
2382
  * Fetches fund activities across all deposits for a maker address.
1971
2383
  */
1972
- getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity[]>;
2384
+ getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity$1[]>;
1973
2385
  /**
1974
2386
  * Fetches daily snapshots for a deposit, ordered by day ascending.
1975
2387
  */
1976
- getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity[]>;
2388
+ getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity$1[]>;
1977
2389
  /**
1978
2390
  * Performs a raw GraphQL query against the indexer.
1979
2391
  */
@@ -2883,6 +3295,44 @@ declare class Zkp2pClient {
2883
3295
  baseApiUrl?: string;
2884
3296
  timeoutMs?: number;
2885
3297
  }): Promise<GetTakerTierResponse>;
3298
+ /**
3299
+ * The signed `expiresAtMs` field is an upload-time freshness token minted by attestation-service.
3300
+ * Once curator persists the bundle, seller-automated-release availability is governed by curator's
3301
+ * probe/revalidation state rather than this timestamp.
3302
+ *
3303
+ * Curator accepts either a configured API key or bearer token for this endpoint.
3304
+ *
3305
+ * Create a signed seller credential bundle with attestation-service and store it on the maker via curator.
3306
+ */
3307
+ uploadSellerCredential(params: UploadSellerCredentialParams, opts?: {
3308
+ baseApiUrl?: string;
3309
+ attestationServiceUrl?: string;
3310
+ timeoutMs?: number;
3311
+ }): Promise<CuratorSellerCredentialUploadResponse>;
3312
+ /**
3313
+ * Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
3314
+ * omits low-level diagnostics. Curator may still re-probe stale credentials during verify, so callers
3315
+ * should continue to handle a 410 from `verifySellerPayment`.
3316
+ *
3317
+ * Curator accepts either a configured API key or bearer token for this endpoint.
3318
+ *
3319
+ * Fetch seller credential status for a maker from curator.
3320
+ */
3321
+ getSellerCredentialStatus(params: GetSellerCredentialStatusParams, opts?: {
3322
+ baseApiUrl?: string;
3323
+ timeoutMs?: number;
3324
+ }): Promise<CuratorSellerCredentialStatusResponse>;
3325
+ /**
3326
+ * Internal-use endpoint. The curator route requires an internal `x-api-key`; standard SDK consumer
3327
+ * API keys will be rejected with 401. Returns 410 GONE when curator has marked the credential inactive
3328
+ * or a stale credential fails its synchronous re-probe.
3329
+ *
3330
+ * Verify a seller payment via curator's seller-credential proxy.
3331
+ */
3332
+ verifySellerPayment(params: VerifySellerPaymentParams, opts?: {
3333
+ baseApiUrl?: string;
3334
+ timeoutMs?: number;
3335
+ }): Promise<CuratorSellerVerifyResponse>;
2886
3336
  private requireProtocolViewer;
2887
3337
  private protocolViewerFunctionInputCount;
2888
3338
  /**
@@ -3045,4 +3495,4 @@ type SendBatchFn = (txs: Array<{
3045
3495
  value?: bigint;
3046
3496
  }>) => Promise<string>;
3047
3497
 
3048
- export { type NearbyQuote as $, type AuthorizationTokenProvider as A, type BestByPlatformResponse as B, type CurrencyType as C, type DepositWithRelations as D, type GetNearbyQuote as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type GetNearbySuggestions as H, type IntentEntity as I, type GetQuoteResponse as J, type GetQuoteResponseObject as K, type GetQuoteSingleResponse as L, type QuoteResponse as M, type QuoteResponseObject as N, type QuoteSingleResponse as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SignalIntentReferralFee as S, type TxOverrides as T, type QuoteIntentResponse as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type QuoteFeesResponse as X, type FiatResponse as Y, Zkp2pClient as Z, type TokenResponse as _, type ValidatePayeeDetailsResponse as a, type PaymentVerifiedRecord as a$, type NearbySuggestions as a0, type ApiDeposit as a1, type DepositVerifier as a2, type DepositVerifierCurrency as a3, type DepositStatus as a4, type GetDepositByIdRequest as a5, type GetDepositByIdResponse as a6, type Intent as a7, type ApiIntentStatus as a8, type GetOwnerIntentsRequest as a9, type DepositPaymentMethodEntity as aA, type MethodCurrencyEntity as aB, type IntentStatus as aC, type RateManagerEntity as aD, type RateManagerRateEntity as aE, type RateManagerDelegationEntity as aF, type ManagerAggregateStatsEntity as aG, type ManagerStatsEntity as aH, type ManagerDailySnapshotEntity as aI, type RateManagerListItem as aJ, type RateManagerDetail as aK, type ManualRateUpdateEntity as aL, type OracleConfigUpdateEntity as aM, type DepositFundActivityEntity as aN, type DepositDailySnapshotEntity as aO, type DepositFundActivityType as aP, type DepositFilter as aQ, type PaginationOptions as aR, type DepositOrderField as aS, type OrderDirection$1 as aT, type RateManagerFilter as aU, type RateManagerPaginationOptions as aV, type RateManagerDelegationPaginationOptions as aW, type RateManagerOrderField as aX, type OrderDirection as aY, type DeploymentEnv as aZ, type FulfillmentRecord as a_, type GetOwnerIntentsResponse as aa, type GetIntentsByDepositRequest as ab, type GetIntentsByDepositResponse as ac, type GetIntentByHashRequest as ad, type GetIntentByHashResponse as ae, type RegisterPayeeDetailsRequest as af, type RegisterPayeeDetailsResponse as ag, type OnchainCurrency as ah, type DepositVerifierData as ai, type PreparedTransaction as aj, type OrderStats as ak, type DepositIntentStatistics as al, type TakerTier as am, type TakerTierStats as an, type TakerTierLevel as ao, type PlatformLimit as ap, type PlatformRiskLevel as aq, IndexerClient as ar, defaultIndexerEndpoint as as, IndexerDepositService as at, IndexerRateManagerService as au, compareEventCursorIdsByRecency as av, fetchFulfillmentAndPayment as aw, type DepositEntity as ax, type IntentFulfilledEntity as ay, type IntentFulfillmentAmountsEntity as az, type PostDepositDetailsResponse as b, type FulfillmentAndPaymentResponse as b0, PAYMENT_PLATFORMS as b1, type PaymentPlatformType as b2, Currency as b3, currencyInfo as b4, getCurrencyInfoFromHash as b5, getCurrencyInfoFromCountryCode as b6, getCurrencyCodeFromHash as b7, isSupportedCurrencyHash as b8, mapConversionRatesToOnchainMinRate as b9, type BatchResult as bA, type SendTransactionFn as bB, type SendBatchFn as bC, ZERO_ADDRESS as bD, asErrorMessage as bE, assertDelegationMethodSupport as bF, type CurrencyData as ba, getContracts as bb, getRateManagerContracts as bc, getPaymentMethodsCatalog as bd, getGatingServiceAddress as be, type RuntimeEnv as bf, parseDepositView as bg, parseIntentView as bh, enrichPvDepositView as bi, enrichPvIntentView as bj, type PV_DepositView as bk, type PV_Deposit as bl, type PV_PaymentMethodData as bm, type PV_Currency as bn, type PV_ReferralFee as bo, type PV_IntentView as bp, type PV_Intent as bq, ZERO_RATE_MANAGER_ID as br, isZeroRateManagerId as bs, normalizeRateManagerId as bt, normalizeRegistry as bu, getDelegationRoute as bv, classifyDelegationState as bw, type DelegationRoute as bx, type DelegationState as by, type DelegationDepositTarget as bz, type GetPayeeDetailsResponse as c, type GetOwnerDepositsRequest as d, type GetOwnerDepositsResponse as e, type GetTakerTierRequest as f, type GetTakerTierResponse as g, type PaymentMethodCatalog as h, type SignalIntentMethodParams as i, type CancelIntentMethodParams as j, type Zkp2pNextOptions as k, type TimeoutConfig as l, type ActionCallback as m, type CreateDepositParams as n, type CreateDepositConversionRate as o, type Range as p, type SignalIntentParams as q, type FulfillIntentParams as r, type ReleaseFundsToPayerParams as s, type CancelIntentParams as t, type BestByPlatformResponseObject as u, type GetBestByPlatformResponse as v, type GetBestByPlatformResponseObject as w, type GetPlatformQuote as x, type PlatformQuote as y, type QuoteRequest as z };
3498
+ export { type QuoteSingleResponse as $, type ApiAdapterOptions as A, type BestByPlatformResponse as B, type CurrencyType as C, type DepositWithRelations as D, type GetBestByPlatformResponse as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type GetBestByPlatformResponseObject as H, type IntentEntity$1 as I, type GetPlatformQuote as J, type PlatformQuote as K, type QuoteRequest as L, type GetNearbyQuote as M, type GetNearbySuggestions as N, type GetQuoteResponse as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SignalIntentReferralFee as S, type TxOverrides as T, type GetQuoteResponseObject as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type GetQuoteSingleResponse as X, type QuoteResponse as Y, Zkp2pClient as Z, type QuoteResponseObject as _, type ValidatePayeeDetailsResponse as a, type PlatformLimit as a$, type QuoteIntentResponse as a0, type QuoteFeesResponse as a1, type FiatResponse as a2, type TokenResponse as a3, type NearbyQuote as a4, type NearbySuggestions as a5, type ApiDeposit as a6, type DepositVerifier as a7, type DepositVerifierCurrency as a8, type DepositStatus as a9, type SellerCredentialBundle as aA, type SellerCredentialBundleUpload as aB, type SellerCredentialStatusValue as aC, type SellerCredentialStatus as aD, type SellerVerifyProxyBody as aE, type SellerTypedDataField as aF, type SellerTypedDataSpec as aG, type SellerPaymentTypedDataValue as aH, type SellerAttestationOutput as aI, type SellerCredentialProbeResponse as aJ, type AttestationServiceSellerCredentialUploadResponse as aK, type AttestationServiceSellerVerifyResponse as aL, type AttestationServiceSellerCredentialProbeResponse as aM, type CuratorSellerCredentialUploadResponse as aN, type CuratorSellerCredentialStatusResponse as aO, type CuratorSellerVerifyResponse as aP, type UploadSellerCredentialParams as aQ, type GetSellerCredentialStatusParams as aR, type VerifySellerPaymentParams as aS, type OnchainCurrency as aT, type DepositVerifierData as aU, type PreparedTransaction as aV, type OrderStats as aW, type DepositIntentStatistics as aX, type TakerTier as aY, type TakerTierStats as aZ, type TakerTierLevel as a_, type GetDepositByIdRequest as aa, type GetDepositByIdResponse as ab, type Intent as ac, type ApiIntentStatus as ad, type GetOwnerIntentsRequest as ae, type GetOwnerIntentsResponse as af, type GetIntentsByDepositRequest as ag, type GetIntentsByDepositResponse as ah, type GetIntentByHashRequest as ai, type GetIntentByHashResponse as aj, type RegisterPayeeDetailsRequest as ak, type RegisterPayeeDetailsResponse as al, type SellerPlatform as am, type VenmoSessionMaterial as an, type CashAppSessionMaterial as ao, type WiseSessionMaterial as ap, type VenmoCredentialUploadInput as aq, type CashAppCredentialUploadInput as ar, type WiseCredentialUploadInput as as, type SellerCredentialUploadInputByPlatform as at, type SellerCredentialUploadInput as au, type SellerCiphertextBundle as av, type SellerSignedCiphertextBundle as aw, type SellerVerifyIntentDetails as ax, type SellerVerifyInput as ay, type SellerProbeInput as az, type PostDepositDetailsResponse as b, type PV_ReferralFee as b$, type PlatformRiskLevel as b0, type OrderbookEntry as b1, IndexerClient as b2, defaultIndexerEndpoint as b3, IndexerDepositService as b4, IndexerRateManagerService as b5, compareEventCursorIdsByRecency as b6, fetchFulfillmentAndPayment as b7, type DepositEntity$1 as b8, type IntentFulfilledEntity as b9, type DeploymentEnv as bA, type FulfillmentRecord as bB, type PaymentVerifiedRecord as bC, type FulfillmentAndPaymentResponse as bD, PAYMENT_PLATFORMS as bE, type PaymentPlatformType as bF, Currency as bG, currencyInfo as bH, getCurrencyInfoFromHash as bI, getCurrencyInfoFromCountryCode as bJ, getCurrencyCodeFromHash as bK, isSupportedCurrencyHash as bL, mapConversionRatesToOnchainMinRate as bM, type CurrencyData as bN, getContracts as bO, getRateManagerContracts as bP, getPaymentMethodsCatalog as bQ, getGatingServiceAddress as bR, type RuntimeEnv as bS, parseDepositView as bT, parseIntentView as bU, enrichPvDepositView as bV, enrichPvIntentView as bW, type PV_DepositView as bX, type PV_Deposit as bY, type PV_PaymentMethodData as bZ, type PV_Currency as b_, type IntentFulfillmentAmountsEntity as ba, type DepositPaymentMethodEntity$1 as bb, type MethodCurrencyEntity$1 as bc, type IntentStatus as bd, type RateManagerEntity as be, type RateManagerRateEntity as bf, type RateManagerDelegationEntity as bg, type ManagerAggregateStatsEntity as bh, type ManagerStatsEntity as bi, type ManagerDailySnapshotEntity as bj, type RateManagerListItem as bk, type RateManagerDetail as bl, type ManualRateUpdateEntity as bm, type OracleConfigUpdateEntity as bn, type DepositFundActivityEntity$1 as bo, type DepositDailySnapshotEntity$1 as bp, type DepositFundActivityType$1 as bq, type DepositFilter as br, type PaginationOptions as bs, type DepositOrderField as bt, type OrderDirection$1 as bu, type RateManagerFilter as bv, type RateManagerPaginationOptions as bw, type RateManagerDelegationPaginationOptions as bx, type RateManagerOrderField as by, type OrderDirection as bz, type GetPayeeDetailsResponse as c, type PV_IntentView as c0, type PV_Intent as c1, ZERO_RATE_MANAGER_ID as c2, isZeroRateManagerId as c3, normalizeRateManagerId as c4, normalizeRegistry as c5, getDelegationRoute as c6, classifyDelegationState as c7, type DelegationRoute as c8, type DelegationState as c9, type DelegationDepositTarget as ca, type BatchResult as cb, type SendTransactionFn as cc, type SendBatchFn as cd, ZERO_ADDRESS as ce, asErrorMessage as cf, assertDelegationMethodSupport as cg, type GetOwnerDepositsRequest as d, type GetOwnerDepositsResponse as e, type GetTakerTierRequest as f, type GetTakerTierResponse as g, type GetDepositBundleParams as h, type GetDepositBundleResponse as i, type GetOrderbookParams as j, type GetOrderbookResponse as k, type PaymentMethodCatalog as l, type SignalIntentMethodParams as m, type CancelIntentMethodParams as n, type Zkp2pNextOptions as o, type AuthorizationTokenProvider as p, type TimeoutConfig as q, type ActionCallback as r, type CreateDepositParams as s, type CreateDepositConversionRate as t, type Range as u, type SignalIntentParams as v, type FulfillIntentParams as w, type ReleaseFundsToPayerParams as x, type CancelIntentParams as y, type BestByPlatformResponseObject as z };