@zkp2p/sdk 0.6.3 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,158 +1,9 @@
1
1
  import * as _zkp2p_indexer_schema from '@zkp2p/indexer-schema';
2
2
  import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, MakerProfitSnapshot, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
3
- import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient } from 'viem';
3
+ import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient, Transport } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  import { IdentityPlatform, IdentityActionTypeByPlatform, IdentityAttestationOutputFor as IdentityAttestationOutputFor$1, IdentityParamsByPlatform } from '@zkp2p/zkp2p-attestation';
6
6
 
7
- /**
8
- * Supported fiat currency codes.
9
- *
10
- * Use these constants when specifying currencies in conversion rates:
11
- *
12
- * @example
13
- * ```typescript
14
- * import { Currency } from '@zkp2p/sdk';
15
- *
16
- * const rates = [
17
- * { currency: Currency.USD, conversionRate: '1020000000000000000' },
18
- * { currency: Currency.EUR, conversionRate: '1100000000000000000' },
19
- * ];
20
- * ```
21
- */
22
- declare const Currency: {
23
- readonly AED: "AED";
24
- readonly ARS: "ARS";
25
- readonly AUD: "AUD";
26
- readonly BRL: "BRL";
27
- readonly CAD: "CAD";
28
- readonly CHF: "CHF";
29
- readonly CNY: "CNY";
30
- readonly CZK: "CZK";
31
- readonly DKK: "DKK";
32
- readonly EUR: "EUR";
33
- readonly GBP: "GBP";
34
- readonly HKD: "HKD";
35
- readonly HUF: "HUF";
36
- readonly IDR: "IDR";
37
- readonly ILS: "ILS";
38
- readonly INR: "INR";
39
- readonly JPY: "JPY";
40
- readonly KES: "KES";
41
- readonly MXN: "MXN";
42
- readonly MYR: "MYR";
43
- readonly NOK: "NOK";
44
- readonly NZD: "NZD";
45
- readonly PHP: "PHP";
46
- readonly PLN: "PLN";
47
- readonly RON: "RON";
48
- readonly SAR: "SAR";
49
- readonly SEK: "SEK";
50
- readonly SGD: "SGD";
51
- readonly THB: "THB";
52
- readonly TRY: "TRY";
53
- readonly UGX: "UGX";
54
- readonly USD: "USD";
55
- readonly VND: "VND";
56
- readonly ZAR: "ZAR";
57
- };
58
- /**
59
- * Union type of all supported currency codes.
60
- */
61
- type CurrencyType = (typeof Currency)[keyof typeof Currency];
62
- /**
63
- * Complete currency information including name, symbol, and hash.
64
- */
65
- type CurrencyData = {
66
- currency: CurrencyType;
67
- currencyCode: string;
68
- currencyName: string;
69
- currencySymbol: string;
70
- currencyCodeHash: string;
71
- countryCode: string;
72
- };
73
- /**
74
- * Lookup table containing metadata for all supported currencies.
75
- *
76
- * Includes currency name, symbol, keccak256 hash (for on-chain use),
77
- * and ISO country code for flag display.
78
- *
79
- * @example
80
- * ```typescript
81
- * import { currencyInfo, Currency } from '@zkp2p/sdk';
82
- *
83
- * const usd = currencyInfo[Currency.USD];
84
- * console.log(usd.currencyName); // "United States Dollar"
85
- * console.log(usd.currencySymbol); // "$"
86
- * console.log(usd.currencyCodeHash); // "0x..."
87
- * ```
88
- */
89
- declare const currencyInfo: Record<CurrencyType, CurrencyData>;
90
- /**
91
- * UI-friendly currency rate structure used in SDK methods.
92
- */
93
- type UICurrencyRate = {
94
- currency: CurrencyType;
95
- conversionRate: string;
96
- };
97
- /**
98
- * On-chain currency structure with minimum conversion rate (V3 escrow format).
99
- */
100
- type OnchainCurrencyMinRate = {
101
- code: `0x${string}`;
102
- minConversionRate: bigint;
103
- };
104
- /**
105
- * Maps UI currency rates to on-chain V3 escrow format with minConversionRate.
106
- *
107
- * @param groups - Nested array of currency rates per payment method
108
- * @param expectedGroups - Expected number of groups (for validation)
109
- * @returns On-chain formatted currency arrays for V3 escrow
110
- * @throws Error if groups structure is invalid or lengths don't match
111
- */
112
- declare function mapConversionRatesToOnchainMinRate(groups: UICurrencyRate[][], expectedGroups?: number): OnchainCurrencyMinRate[][];
113
- /**
114
- * Looks up currency info by its keccak256 hash.
115
- *
116
- * @param hash - The currency code hash (0x-prefixed)
117
- * @returns Currency data if found, undefined otherwise
118
- *
119
- * @example
120
- * ```typescript
121
- * const info = getCurrencyInfoFromHash('0x...');
122
- * if (info) {
123
- * console.log(info.currencyCode); // "USD"
124
- * }
125
- * ```
126
- */
127
- declare function getCurrencyInfoFromHash(hash: string): CurrencyData | undefined;
128
- /**
129
- * Looks up currency info by ISO country code.
130
- *
131
- * @param code - The ISO country code (e.g., 'US', 'GB')
132
- * @returns Currency data if found, undefined otherwise
133
- */
134
- declare function getCurrencyInfoFromCountryCode(code: string): CurrencyData | undefined;
135
- /**
136
- * Converts a currency hash to its ISO currency code.
137
- *
138
- * @param hash - The currency code hash (0x-prefixed)
139
- * @returns Currency code string (e.g., 'USD') or undefined if not found
140
- *
141
- * @example
142
- * ```typescript
143
- * const code = getCurrencyCodeFromHash('0x...');
144
- * console.log(code); // "USD"
145
- * ```
146
- */
147
- declare function getCurrencyCodeFromHash(hash: string): string | undefined;
148
- /**
149
- * Checks if a currency hash is recognized by the SDK.
150
- *
151
- * @param hash - The currency code hash to check
152
- * @returns true if the hash corresponds to a supported currency
153
- */
154
- declare function isSupportedCurrencyHash(hash: string): boolean;
155
-
156
7
  /**
157
8
  * Contract resolution utilities for the SDK.
158
9
  *
@@ -229,7 +80,7 @@ type RuntimeEnv = 'production' | 'preproduction' | 'staging';
229
80
  * Retrieves deployed contract addresses and ABIs for a given chain and environment.
230
81
  *
231
82
  * @param chainId - The chain ID (8453 for Base)
232
- * @param env - Runtime environment ('production' or 'staging')
83
+ * @param env - Runtime environment ('production', 'preproduction', or 'staging')
233
84
  * @returns Object containing addresses and ABIs
234
85
  *
235
86
  * @example
@@ -295,95 +146,6 @@ declare function getRateManagerContracts(chainId: number, env?: RuntimeEnv): {
295
146
  };
296
147
  };
297
148
 
298
- type PV_ReferralFee = {
299
- recipient: `0x${string}`;
300
- fee: bigint;
301
- };
302
- type PV_Deposit = {
303
- depositor: string;
304
- delegate: string;
305
- token: string;
306
- amount: bigint;
307
- intentAmountRange: {
308
- min: bigint;
309
- max: bigint;
310
- };
311
- acceptingIntents: boolean;
312
- remainingDeposits: bigint;
313
- outstandingIntentAmount: bigint;
314
- makerProtocolFee: bigint;
315
- reservedMakerFees: bigint;
316
- accruedMakerFees: bigint;
317
- accruedReferrerFees: bigint;
318
- intentGuardian: string;
319
- retainOnEmpty: boolean;
320
- referrer: string;
321
- referrerFee: bigint;
322
- };
323
- type PV_Currency = {
324
- code: string;
325
- minConversionRate: bigint;
326
- };
327
- type PV_PaymentMethodData = {
328
- paymentMethod: string;
329
- verificationData: {
330
- intentGatingService: string;
331
- payeeDetails: string;
332
- data: string;
333
- };
334
- currencies: PV_Currency[];
335
- };
336
- type PV_DepositView = {
337
- depositId: bigint;
338
- deposit: PV_Deposit;
339
- availableLiquidity: bigint;
340
- paymentMethods: PV_PaymentMethodData[];
341
- intentHashes: string[];
342
- };
343
- type PV_Intent = {
344
- owner: string;
345
- to: string;
346
- escrow: string;
347
- depositId: bigint;
348
- amount: bigint;
349
- timestamp: bigint;
350
- paymentMethod: string;
351
- fiatCurrency: string;
352
- conversionRate: bigint;
353
- referralFees: PV_ReferralFee[];
354
- postIntentHook: string;
355
- data: string;
356
- };
357
- type PV_IntentView = {
358
- intentHash: string;
359
- intent: PV_Intent;
360
- deposit: Omit<PV_DepositView, 'intentHashes'>;
361
- };
362
- declare function parseDepositView(raw: any): PV_DepositView;
363
- declare function parseIntentView(raw: any): PV_IntentView;
364
-
365
- declare function enrichPvDepositView(view: PV_DepositView, chainId: number, env?: RuntimeEnv): {
366
- paymentMethods: {
367
- processorName: string | undefined;
368
- currencies: {
369
- currencyInfo: CurrencyData | undefined;
370
- code: string;
371
- minConversionRate: bigint;
372
- }[];
373
- paymentMethod: string;
374
- verificationData: {
375
- intentGatingService: string;
376
- payeeDetails: string;
377
- data: string;
378
- };
379
- }[];
380
- depositId: bigint;
381
- deposit: PV_Deposit;
382
- availableLiquidity: bigint;
383
- intentHashes: string[];
384
- };
385
- declare function enrichPvIntentView(view: PV_IntentView, chainId: number, env?: RuntimeEnv): any;
386
-
387
149
  /**
388
150
  * Minimal fetch-based GraphQL client for the ZKP2P indexer.
389
151
  * No external GraphQL dependencies; works in Node and browser.
@@ -415,299 +177,12 @@ type DeploymentEnv = 'PRODUCTION' | 'PREPRODUCTION' | 'STAGING' | 'DEV' | 'LOCAL
415
177
  declare function defaultIndexerEndpoint(env?: DeploymentEnv): string;
416
178
 
417
179
  /**
418
- * Indexer entity types sourced from @zkp2p/indexer-schema.
180
+ * Type definitions for the ZKP2P indexer GraphQL schema
419
181
  */
420
-
421
- type WithOverrides<TBase, TOverrides> = Omit<TBase, keyof TOverrides> & TOverrides;
422
- type DepositStatus$1 = `${DepositStatus$2}`;
423
- type IntentStatus = `${IntentStatus$1}`;
424
- type DepositEntity$1 = WithOverrides<Deposit, {
425
- status: DepositStatus$1;
426
- retainOnEmpty?: boolean;
427
- whitelistHookAddress?: string | null;
428
- }>;
429
- type DepositPaymentMethodEntity$1 = DepositPaymentMethod;
430
- type MethodCurrencyEntity$1 = MethodCurrency;
431
- type IntentEntity$1 = WithOverrides<Intent$1, {
432
- status: IntentStatus;
433
- }>;
434
- interface DepositWithRelations extends DepositEntity$1 {
435
- paymentMethods?: DepositPaymentMethodEntity$1[];
436
- currencies?: MethodCurrencyEntity$1[];
437
- intents?: IntentEntity$1[];
438
- }
439
- type DepositFundActivityType$1 = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
440
182
  /**
441
- * Chronological fund-movement log for a deposit.
442
- * One row per on-chain fund event (deposit, add, withdraw, close).
183
+ * Core deposit entity from the indexer
443
184
  */
444
- type DepositFundActivityEntity$1 = WithOverrides<DepositFundActivity, {
445
- activityType: DepositFundActivityType$1;
446
- }>;
447
- /**
448
- * Per-deposit daily rollup snapshot.
449
- * One row per deposit per day (UTC-aligned, 86400s buckets).
450
- */
451
- type DepositDailySnapshotEntity$1 = DepositDailySnapshot;
452
- interface DepositEventEntity$1 {
453
- id: string;
454
- depositId: string;
455
- depositor: string;
456
- amount: string;
457
- }
458
- interface DepositEventsResponse$1 {
459
- deposits: DepositEventEntity$1[];
460
- fundsAdded: DepositEventEntity$1[];
461
- withdrawals: DepositEventEntity$1[];
462
- }
463
- interface IntentFulfilledEntity {
464
- intentHash: string;
465
- amount: string;
466
- isManualRelease: boolean;
467
- fundsTransferredTo?: string | null;
468
- }
469
- interface IntentFulfillmentAmountsEntity {
470
- intentHash: string;
471
- releasedAmount?: string | null;
472
- takerAmountNetFees?: string | null;
473
- }
474
- type RateManagerEntity = RateManager;
475
- type RateManagerRateEntity = RateManagerRate;
476
- interface RateManagerDelegationEntity {
477
- id: string;
478
- chainId: number;
479
- rateManagerId: string;
480
- rateManagerAddress?: string | null;
481
- depositId: string;
482
- delegatedAt?: string | null;
483
- createdAt: string;
484
- updatedAt: string;
485
- }
486
- type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
487
- rateManagerAddress?: string | null;
488
- }>;
489
- type ManagerStatsEntity = ManagerStats;
490
- type ManagerDailySnapshotEntity = ManagerDailySnapshot;
491
- type MakerProfitSnapshotEntity$1 = MakerProfitSnapshot;
492
- interface ManualRateUpdateEntity {
493
- id: string;
494
- rateManagerId: string;
495
- paymentMethod: string;
496
- /** Canonical V2.2 field. */
497
- currencyCode?: string;
498
- currency: string;
499
- /** Canonical V2.2 field. */
500
- rate?: string;
501
- minRate: string;
502
- }
503
- interface OracleConfigUpdateEntity {
504
- id: string;
505
- rateManagerId: string;
506
- escrow?: string;
507
- depositIdOnContract?: string;
508
- paymentMethod: string;
509
- /** Canonical V2.2 field. */
510
- currencyCode?: string;
511
- currency: string;
512
- /** Canonical V2.2 floor field. */
513
- floorFixed?: string;
514
- /** Canonical V2.2 floor field. */
515
- floorSpreadBps?: number;
516
- /** Canonical V2.2 floor field. */
517
- oracleAdapter?: string;
518
- adapter?: string;
519
- spreadBps?: number;
520
- maxStaleness?: string;
521
- adapterConfig?: string;
522
- enabled?: boolean;
523
- }
524
- interface RateManagerListItem {
525
- manager: RateManagerEntity;
526
- aggregate?: ManagerAggregateStatsEntity | null;
527
- }
528
- interface RateManagerDetail {
529
- manager: RateManagerEntity;
530
- rates: RateManagerRateEntity[];
531
- aggregate?: ManagerAggregateStatsEntity | null;
532
- recentStats: ManagerStatsEntity[];
533
- delegations: RateManagerDelegationEntity[];
534
- }
535
-
536
- type DepositOrderField = 'remainingDeposits' | 'outstandingIntentAmount' | 'totalAmountTaken' | 'totalWithdrawn' | 'updatedAt' | 'timestamp';
537
- type OrderDirection$1 = 'asc' | 'desc';
538
- type DepositFilter = Partial<{
539
- status: 'ACTIVE' | 'CLOSED';
540
- depositor: string;
541
- delegate: string;
542
- /** True to only include deposits with a non-zero delegate, false for zero delegate. */
543
- delegateIsSet: boolean;
544
- chainId: number;
545
- escrowAddress: string;
546
- escrowAddresses: string[];
547
- minLiquidity: string;
548
- acceptingIntents: boolean;
549
- }>;
550
- type PaginationOptions = Partial<{
551
- limit: number;
552
- offset: number;
553
- orderBy: DepositOrderField;
554
- orderDirection: OrderDirection$1;
555
- }>;
556
- declare class IndexerDepositService {
557
- private client;
558
- constructor(client: IndexerClient);
559
- private queryWithLegacyFallback;
560
- private buildDepositWhere;
561
- private buildOrderBy;
562
- private fetchRelations;
563
- private fetchIntents;
564
- private attachRelations;
565
- fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity$1[]>;
566
- fetchDepositsWithRelations(filter?: DepositFilter, pagination?: PaginationOptions, options?: {
567
- includeIntents?: boolean;
568
- intentStatuses?: IntentStatus[];
569
- }): Promise<DepositWithRelations[]>;
570
- fetchDepositsByIds(ids: string[]): Promise<DepositEntity$1[]>;
571
- fetchDepositsByIdsWithRelations(ids: string[], options?: {
572
- includeIntents?: boolean;
573
- intentStatuses?: IntentStatus[];
574
- }): Promise<DepositWithRelations[]>;
575
- fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
576
- fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
577
- fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity$1[]>;
578
- fetchIntentByHash(intentHash: string): Promise<IntentEntity$1 | null>;
579
- fetchDepositWithRelations(id: string, options?: {
580
- includeIntents?: boolean;
581
- intentStatuses?: IntentStatus[];
582
- }): Promise<DepositWithRelations | null>;
583
- fetchExpiredIntents(params: {
584
- now: bigint | string;
585
- depositIds: string[];
586
- limit?: number;
587
- }): Promise<IntentEntity$1[]>;
588
- fetchFulfilledIntentEvents(intentHashes: string[]): Promise<IntentFulfilledEntity[]>;
589
- fetchIntentFulfillmentAmounts(intentHash: string): Promise<IntentFulfillmentAmountsEntity | null>;
590
- resolvePayeeHash(params: {
591
- escrowAddress?: string | null;
592
- depositId?: string | number | bigint | null;
593
- paymentMethodHash?: string | null;
594
- }): Promise<string | null>;
595
- fetchDepositEvents(depositIdOnContract: string, options?: {
596
- escrowAddress?: string | null;
597
- depositor?: string | null;
598
- }): Promise<DepositEventsResponse$1>;
599
- fetchDepositsByPayeeHash(payeeHash: string, options?: {
600
- paymentMethodHash?: string;
601
- limit?: number;
602
- includeIntents?: boolean;
603
- intentStatuses?: IntentStatus[];
604
- }): Promise<DepositWithRelations[]>;
605
- /**
606
- * Fetch chronological fund activities for a deposit.
607
- */
608
- fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity$1[]>;
609
- /**
610
- * Fetch fund activities across all deposits for a maker address.
611
- */
612
- fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity$1[]>;
613
- /**
614
- * Fetch daily snapshots for a deposit, ordered by day ascending.
615
- */
616
- fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity$1[]>;
617
- fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity$1[]>;
618
- }
619
-
620
- type OrderDirection = 'asc' | 'desc';
621
- type RateManagerOrderField = 'createdAt' | 'updatedAt' | 'fee' | 'maxFee' | 'rateManagerId' | 'currentDelegatedBalance' | 'totalFilledVolume';
622
- type RateManagerFilter = Partial<{
623
- manager: string;
624
- name: string;
625
- hasHook: boolean;
626
- maxFee: string;
627
- rateManagerIds: string[];
628
- }>;
629
- type RateManagerPaginationOptions = Partial<{
630
- limit: number;
631
- offset: number;
632
- orderBy: RateManagerOrderField;
633
- orderDirection: OrderDirection;
634
- }>;
635
- type RateManagerDelegationPaginationOptions = Partial<{
636
- limit: number;
637
- offset: number;
638
- orderBy: 'createdAt' | 'updatedAt' | 'depositId' | 'delegatedAt';
639
- orderDirection: OrderDirection;
640
- rateManagerAddress: string;
641
- }>;
642
- declare function compareEventCursorIdsByRecency(leftId?: string | null, rightId?: string | null): number;
643
- declare class IndexerRateManagerService {
644
- private client;
645
- constructor(client: IndexerClient);
646
- private buildRateManagerScopeWhere;
647
- private buildWhere;
648
- private buildAggregateWhere;
649
- private buildLegacyAggregateWhere;
650
- private buildOrderBy;
651
- private toRateManagerListItems;
652
- private applyHookFilter;
653
- private queryRateManagerList;
654
- private buildDelegationOrderBy;
655
- private buildLegacyDelegationOrderBy;
656
- private fetchCurrentRateManagerDepositScopes;
657
- private fetchHistoricalRateManagerDepositScopes;
658
- fetchRateManagers(pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter): Promise<RateManagerListItem[]>;
659
- fetchRateManagerDetail(rateManagerId: string, options?: {
660
- statsLimit?: number;
661
- rateManagerAddress?: string | null;
662
- }): Promise<RateManagerDetail | null>;
663
- fetchRateManagerDelegations(rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions): Promise<RateManagerDelegationEntity[]>;
664
- fetchManagerDailySnapshots(rateManagerId: string, options?: {
665
- limit?: number;
666
- rateManagerAddress?: string | null;
667
- }): Promise<ManagerDailySnapshotEntity[]>;
668
- fetchDelegationForDeposit(depositId: string, options?: {
669
- escrowAddress?: string | null;
670
- }): Promise<RateManagerDelegationEntity | null>;
671
- fetchManualRateUpdates(rateManagerId: string, options?: {
672
- limit?: number;
673
- rateManagerAddress?: string | null;
674
- }): Promise<ManualRateUpdateEntity[]>;
675
- fetchOracleConfigUpdates(rateManagerId: string, options?: {
676
- limit?: number;
677
- rateManagerAddress?: string | null;
678
- }): Promise<OracleConfigUpdateEntity[]>;
679
- }
680
-
681
- type FulfillmentRecord = {
682
- id: string;
683
- intentHash: string;
684
- amount: string;
685
- isManualRelease: boolean;
686
- fundsTransferredTo: string | null;
687
- };
688
- type PaymentVerifiedRecord = {
689
- id: string;
690
- intentHash: string;
691
- method: string;
692
- currency: string;
693
- amount: string;
694
- timestamp: string;
695
- paymentId: string | null;
696
- payeeId: string | null;
697
- };
698
- type FulfillmentAndPaymentResponse = {
699
- Orchestrator_V21_IntentFulfilled: FulfillmentRecord[];
700
- UnifiedVerifier_V21_PaymentVerified: PaymentVerifiedRecord[];
701
- };
702
- declare function fetchFulfillmentAndPayment(client: IndexerClient, intentHash: string): Promise<FulfillmentAndPaymentResponse>;
703
-
704
- /**
705
- * Type definitions for the ZKP2P indexer GraphQL schema
706
- */
707
- /**
708
- * Core deposit entity from the indexer
709
- */
710
- interface DepositEntity {
185
+ interface DepositEntity$1 {
711
186
  id: string;
712
187
  chainId: number;
713
188
  escrowAddress: string;
@@ -742,7 +217,7 @@ interface DepositEntity {
742
217
  /**
743
218
  * Payment method configuration for a deposit
744
219
  */
745
- interface DepositPaymentMethodEntity {
220
+ interface DepositPaymentMethodEntity$1 {
746
221
  id: string;
747
222
  chainId: number;
748
223
  depositIdOnContract: string;
@@ -755,7 +230,7 @@ interface DepositPaymentMethodEntity {
755
230
  /**
756
231
  * Currency configuration for a payment method
757
232
  */
758
- interface MethodCurrencyEntity {
233
+ interface MethodCurrencyEntity$1 {
759
234
  id: string;
760
235
  chainId: number;
761
236
  depositIdOnContract: string;
@@ -784,7 +259,7 @@ interface MethodCurrencyEntity {
784
259
  /**
785
260
  * Intent/swap entity
786
261
  */
787
- interface IntentEntity {
262
+ interface IntentEntity$1 {
788
263
  id: string;
789
264
  intentHash: string;
790
265
  depositId: string;
@@ -817,17 +292,17 @@ interface IntentEntity {
817
292
  releasedAmount?: string | null;
818
293
  takerAmountNetFees?: string | null;
819
294
  }
820
- type DepositFundActivityType = "DEPOSIT_RECEIVED" | "FUNDS_ADDED" | "WITHDRAWN" | "CLOSED";
295
+ type DepositFundActivityType$1 = "DEPOSIT_RECEIVED" | "FUNDS_ADDED" | "WITHDRAWN" | "CLOSED";
821
296
  /**
822
297
  * Chronological fund-movement log for a deposit.
823
298
  * One row per on-chain fund event (deposit, add, withdraw, close).
824
299
  */
825
- interface DepositFundActivityEntity {
300
+ interface DepositFundActivityEntity$1 {
826
301
  id: string;
827
302
  chainId: number;
828
303
  depositId: string;
829
304
  depositor: string;
830
- activityType: DepositFundActivityType;
305
+ activityType: DepositFundActivityType$1;
831
306
  amount: string;
832
307
  blockNumber: string;
833
308
  timestamp: string;
@@ -837,7 +312,7 @@ interface DepositFundActivityEntity {
837
312
  * Per-deposit daily rollup snapshot.
838
313
  * One row per deposit per day (UTC-aligned, 86400s buckets).
839
314
  */
840
- interface DepositDailySnapshotEntity {
315
+ interface DepositDailySnapshotEntity$1 {
841
316
  id: string;
842
317
  chainId: number;
843
318
  depositId: string;
@@ -857,18 +332,18 @@ interface DepositDailySnapshotEntity {
857
332
  cumulativePnlUsdCents: string;
858
333
  updatedAt: string;
859
334
  }
860
- interface DepositEventEntity {
335
+ interface DepositEventEntity$1 {
861
336
  id: string;
862
337
  depositId: string;
863
338
  depositor: string;
864
339
  amount: string;
865
340
  }
866
- interface DepositEventsResponse {
867
- deposits: DepositEventEntity[];
868
- fundsAdded: DepositEventEntity[];
869
- withdrawals: DepositEventEntity[];
870
- }
871
- interface MakerProfitSnapshotEntity {
341
+ interface DepositEventsResponse$1 {
342
+ deposits: DepositEventEntity$1[];
343
+ fundsAdded: DepositEventEntity$1[];
344
+ withdrawals: DepositEventEntity$1[];
345
+ }
346
+ interface MakerProfitSnapshotEntity$1 {
872
347
  id: string;
873
348
  chainId: number;
874
349
  maker: string;
@@ -893,18 +368,167 @@ type DepositBundleRequest = {
893
368
  escrowAddress: string;
894
369
  dailySnapshotLimit?: number;
895
370
  };
896
- type DepositBundleDeposit = DepositEntity & {
897
- paymentMethods: DepositPaymentMethodEntity[];
898
- currencies: MethodCurrencyEntity[];
371
+ type DepositBundleDeposit = DepositEntity$1 & {
372
+ paymentMethods: DepositPaymentMethodEntity$1[];
373
+ currencies: MethodCurrencyEntity$1[];
899
374
  };
900
375
  type DepositBundleResponse = {
901
376
  deposit: DepositBundleDeposit;
902
- intents: IntentEntity[];
903
- events: DepositEventsResponse;
904
- profitSnapshots: MakerProfitSnapshotEntity[];
905
- fundActivities: DepositFundActivityEntity[];
906
- dailySnapshots: DepositDailySnapshotEntity[];
377
+ intents: IntentEntity$1[];
378
+ events: DepositEventsResponse$1;
379
+ profitSnapshots: MakerProfitSnapshotEntity$1[];
380
+ fundActivities: DepositFundActivityEntity$1[];
381
+ dailySnapshots: DepositDailySnapshotEntity$1[];
382
+ };
383
+
384
+ /**
385
+ * Supported fiat currency codes.
386
+ *
387
+ * Use these constants when specifying currencies in conversion rates:
388
+ *
389
+ * @example
390
+ * ```typescript
391
+ * import { Currency } from '@zkp2p/sdk';
392
+ *
393
+ * const rates = [
394
+ * { currency: Currency.USD, conversionRate: '1020000000000000000' },
395
+ * { currency: Currency.EUR, conversionRate: '1100000000000000000' },
396
+ * ];
397
+ * ```
398
+ */
399
+ declare const Currency: {
400
+ readonly AED: "AED";
401
+ readonly ARS: "ARS";
402
+ readonly AUD: "AUD";
403
+ readonly BRL: "BRL";
404
+ readonly CAD: "CAD";
405
+ readonly CHF: "CHF";
406
+ readonly CNY: "CNY";
407
+ readonly CZK: "CZK";
408
+ readonly DKK: "DKK";
409
+ readonly EUR: "EUR";
410
+ readonly GBP: "GBP";
411
+ readonly HKD: "HKD";
412
+ readonly HUF: "HUF";
413
+ readonly IDR: "IDR";
414
+ readonly ILS: "ILS";
415
+ readonly INR: "INR";
416
+ readonly JPY: "JPY";
417
+ readonly KES: "KES";
418
+ readonly MXN: "MXN";
419
+ readonly MYR: "MYR";
420
+ readonly NOK: "NOK";
421
+ readonly NZD: "NZD";
422
+ readonly PHP: "PHP";
423
+ readonly PLN: "PLN";
424
+ readonly RON: "RON";
425
+ readonly SAR: "SAR";
426
+ readonly SEK: "SEK";
427
+ readonly SGD: "SGD";
428
+ readonly THB: "THB";
429
+ readonly TRY: "TRY";
430
+ readonly UGX: "UGX";
431
+ readonly USD: "USD";
432
+ readonly VND: "VND";
433
+ readonly ZAR: "ZAR";
434
+ };
435
+ /**
436
+ * Union type of all supported currency codes.
437
+ */
438
+ type CurrencyType = (typeof Currency)[keyof typeof Currency];
439
+ /**
440
+ * Complete currency information including name, symbol, and hash.
441
+ */
442
+ type CurrencyData = {
443
+ currency: CurrencyType;
444
+ currencyCode: string;
445
+ currencyName: string;
446
+ currencySymbol: string;
447
+ currencyCodeHash: string;
448
+ countryCode: string;
907
449
  };
450
+ /**
451
+ * Lookup table containing metadata for all supported currencies.
452
+ *
453
+ * Includes currency name, symbol, keccak256 hash (for on-chain use),
454
+ * and ISO country code for flag display.
455
+ *
456
+ * @example
457
+ * ```typescript
458
+ * import { currencyInfo, Currency } from '@zkp2p/sdk';
459
+ *
460
+ * const usd = currencyInfo[Currency.USD];
461
+ * console.log(usd.currencyName); // "United States Dollar"
462
+ * console.log(usd.currencySymbol); // "$"
463
+ * console.log(usd.currencyCodeHash); // "0x..."
464
+ * ```
465
+ */
466
+ declare const currencyInfo: Record<CurrencyType, CurrencyData>;
467
+ /**
468
+ * UI-friendly currency rate structure used in SDK methods.
469
+ */
470
+ type UICurrencyRate = {
471
+ currency: CurrencyType;
472
+ conversionRate: string;
473
+ };
474
+ /**
475
+ * On-chain currency structure with minimum conversion rate (V3 escrow format).
476
+ */
477
+ type OnchainCurrencyMinRate = {
478
+ code: `0x${string}`;
479
+ minConversionRate: bigint;
480
+ };
481
+ /**
482
+ * Maps UI currency rates to on-chain V3 escrow format with minConversionRate.
483
+ *
484
+ * @param groups - Nested array of currency rates per payment method
485
+ * @param expectedGroups - Expected number of groups (for validation)
486
+ * @returns On-chain formatted currency arrays for V3 escrow
487
+ * @throws Error if groups structure is invalid or lengths don't match
488
+ */
489
+ declare function mapConversionRatesToOnchainMinRate(groups: UICurrencyRate[][], expectedGroups?: number): OnchainCurrencyMinRate[][];
490
+ /**
491
+ * Looks up currency info by its keccak256 hash.
492
+ *
493
+ * @param hash - The currency code hash (0x-prefixed)
494
+ * @returns Currency data if found, undefined otherwise
495
+ *
496
+ * @example
497
+ * ```typescript
498
+ * const info = getCurrencyInfoFromHash('0x...');
499
+ * if (info) {
500
+ * console.log(info.currencyCode); // "USD"
501
+ * }
502
+ * ```
503
+ */
504
+ declare function getCurrencyInfoFromHash(hash: string): CurrencyData | undefined;
505
+ /**
506
+ * Looks up currency info by ISO country code.
507
+ *
508
+ * @param code - The ISO country code (e.g., 'US', 'GB')
509
+ * @returns Currency data if found, undefined otherwise
510
+ */
511
+ declare function getCurrencyInfoFromCountryCode(code: string): CurrencyData | undefined;
512
+ /**
513
+ * Converts a currency hash to its ISO currency code.
514
+ *
515
+ * @param hash - The currency code hash (0x-prefixed)
516
+ * @returns Currency code string (e.g., 'USD') or undefined if not found
517
+ *
518
+ * @example
519
+ * ```typescript
520
+ * const code = getCurrencyCodeFromHash('0x...');
521
+ * console.log(code); // "USD"
522
+ * ```
523
+ */
524
+ declare function getCurrencyCodeFromHash(hash: string): string | undefined;
525
+ /**
526
+ * Checks if a currency hash is recognized by the SDK.
527
+ *
528
+ * @param hash - The currency code hash to check
529
+ * @returns true if the hash corresponds to a supported currency
530
+ */
531
+ declare function isSupportedCurrencyHash(hash: string): boolean;
908
532
 
909
533
  /**
910
534
  * A prepared transaction ready for submission.
@@ -949,9 +573,10 @@ type IdentityAttestationOutput = {
949
573
  }[IdentityPlatform];
950
574
  /**
951
575
  * Timeout configuration for different operation types
576
+ * @deprecated Legacy shape from the pre-0.6 API; use `Zkp2pNextOptions['timeouts']`. Will be removed in 0.8.
952
577
  */
953
578
  type TimeoutConfig = {
954
- /** API call timeout in milliseconds (default: 30000) */
579
+ /** API call timeout in milliseconds (default: 15000) */
955
580
  api?: number;
956
581
  /** Transaction timeout in milliseconds (default: 60000) */
957
582
  transaction?: number;
@@ -959,6 +584,8 @@ type TimeoutConfig = {
959
584
  type ApiAdapterOptions = {
960
585
  baseApiUrl: string;
961
586
  timeoutMs?: number;
587
+ /** Optional bearer token for authenticated curator endpoints. */
588
+ authorizationToken?: string;
962
589
  };
963
590
  type AuthorizationTokenProvider = () => string | null | undefined | Promise<string | null | undefined>;
964
591
  /**
@@ -966,6 +593,7 @@ type AuthorizationTokenProvider = () => string | null | undefined | Promise<stri
966
593
  * @param params - Transaction callback parameters
967
594
  * @param params.hash - Transaction hash
968
595
  * @param params.data - Optional additional data from the transaction
596
+ * @deprecated Legacy shape from the pre-0.6 API; use the per-method callbacks on `<X>MethodParams`. Will be removed in 0.8.
969
597
  */
970
598
  type ActionCallback = (params: {
971
599
  hash: Hash;
@@ -994,6 +622,71 @@ type ReferrerFeeConfig = {
994
622
  recipient: `0x${string}`;
995
623
  feeBps: number;
996
624
  };
625
+ type ReferralRedemption = {
626
+ code: string;
627
+ referrerWalletAddress: string;
628
+ redeemedAt: string;
629
+ };
630
+ type ReferralDashboardResponse = {
631
+ code: string;
632
+ redemption: ReferralRedemption | null;
633
+ l1FeeBps: number;
634
+ l2FeeBps: number;
635
+ l1RefereeCount: number;
636
+ l2RefereeCount: number;
637
+ totalFeesWei: string | null;
638
+ l1FeesWei: string | null;
639
+ l2FeesWei: string | null;
640
+ distributionCount: number;
641
+ lastEarnedAt: string | null;
642
+ };
643
+ type ReferralEarningsResponse = {
644
+ totalWei: string | null;
645
+ l1Wei: string | null;
646
+ l2Wei: string | null;
647
+ unattributedWei: string | null;
648
+ distributionCount: number;
649
+ lastEarnedAt: string | null;
650
+ };
651
+ type ReferralSignatureBody = {
652
+ walletAddress: Address;
653
+ signature: `0x${string}`;
654
+ issuedAt: number;
655
+ audience: string;
656
+ referrer?: Address;
657
+ oldCode?: string;
658
+ };
659
+ type ReferralReadRequest = {
660
+ /** Public wallet-address read target. Omit to use bearer-authenticated caller mode. */
661
+ address?: Address;
662
+ };
663
+ type ReferralCodeLookupResponse = {
664
+ code: string;
665
+ referrerWalletAddress: Address;
666
+ isActive: boolean;
667
+ };
668
+ type CreateReferralCodeRequest = {
669
+ signature?: ReferralSignatureBody;
670
+ };
671
+ type CreateReferralCodeResponse = {
672
+ code: string;
673
+ };
674
+ type RedeemReferralCodeRequest = {
675
+ code: string;
676
+ signature?: ReferralSignatureBody;
677
+ };
678
+ type RedeemReferralCodeResponse = {
679
+ redeemedAt: string;
680
+ referrerWalletAddress: Address;
681
+ };
682
+ type UpdateReferralCodeRequest = {
683
+ code: string;
684
+ signature?: ReferralSignatureBody;
685
+ };
686
+ type UpdateReferralCodeResponse = {
687
+ code: string;
688
+ };
689
+ /** @deprecated any-typed; becomes Record<string, unknown> in 0.8. */
997
690
  type CuratorMetadata = Record<string, any>;
998
691
  type CuratorPayeeData = {
999
692
  offchainId: string;
@@ -1007,6 +700,7 @@ type CuratorPayeeDataInput = {
1007
700
  };
1008
701
  /**
1009
702
  * Parameters for fulfilling an intent with payment attestation
703
+ * @deprecated Legacy shape from the pre-0.6 API; use FulfillIntentMethodParams. Will be removed in 0.8.
1010
704
  */
1011
705
  type FulfillIntentParams = {
1012
706
  /** Hash of the intent to fulfill */
@@ -1036,6 +730,7 @@ type FulfillIntentParams = {
1036
730
  };
1037
731
  /**
1038
732
  * Parameters for releasing funds back to the payer
733
+ * @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.releaseFundsToPayer`. Will be removed in 0.8.
1039
734
  */
1040
735
  type ReleaseFundsToPayerParams = {
1041
736
  /** Hash of the intent to release funds for */
@@ -1049,6 +744,7 @@ type ReleaseFundsToPayerParams = {
1049
744
  };
1050
745
  /**
1051
746
  * Parameters for signaling an intent to use a deposit
747
+ * @deprecated Legacy shape from the pre-0.6 API; use SignalIntentMethodParams. Will be removed in 0.8.
1052
748
  */
1053
749
  type SignalIntentParams = {
1054
750
  /** Payment processor name (e.g., 'wise', 'revolut') */
@@ -1659,6 +1355,7 @@ type CreateDepositConversionRate = {
1659
1355
  currency: CurrencyType;
1660
1356
  conversionRate: string;
1661
1357
  };
1358
+ /** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.createDeposit`. Will be removed in 0.8. */
1662
1359
  type CreateDepositParams = {
1663
1360
  token: Address;
1664
1361
  amount: bigint;
@@ -1680,20 +1377,24 @@ type CreateDepositParams = {
1680
1377
  onError?: (error: Error) => void;
1681
1378
  onMined?: ActionCallback;
1682
1379
  };
1380
+ /** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.withdrawDeposit`. Will be removed in 0.8. */
1683
1381
  type WithdrawDepositParams = {
1684
1382
  depositId: string | number | bigint;
1685
1383
  onSuccess?: ActionCallback;
1686
1384
  onError?: (error: Error) => void;
1687
1385
  onMined?: ActionCallback;
1688
1386
  };
1387
+ /** @deprecated Legacy shape from the pre-0.6 API; use CancelIntentMethodParams. Will be removed in 0.8. */
1689
1388
  type CancelIntentParams = {
1690
1389
  intentHash: Hash;
1691
1390
  onSuccess?: ActionCallback;
1692
1391
  onError?: (error: Error) => void;
1693
1392
  onMined?: ActionCallback;
1694
1393
  };
1695
- type DepositStatus = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
1394
+ type DepositStatus$1 = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
1395
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1696
1396
  type ApiIntentStatus = 'SIGNALED' | 'FULFILLED' | 'PRUNED' | 'MANUALLY_RELEASED';
1397
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1697
1398
  type Intent = {
1698
1399
  id: number;
1699
1400
  intentHash: string;
@@ -1716,6 +1417,7 @@ type Intent = {
1716
1417
  createdAt: Date;
1717
1418
  updatedAt: Date;
1718
1419
  };
1420
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1719
1421
  type GetOwnerIntentsRequest = {
1720
1422
  ownerAddress: string;
1721
1423
  escrowAddress: string;
@@ -1723,12 +1425,14 @@ type GetOwnerIntentsRequest = {
1723
1425
  orchestratorAddresses?: string[];
1724
1426
  status?: ApiIntentStatus | ApiIntentStatus[];
1725
1427
  };
1428
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1726
1429
  type GetOwnerIntentsResponse = {
1727
1430
  success: boolean;
1728
1431
  message: string;
1729
1432
  responseObject: Intent[];
1730
1433
  statusCode: number;
1731
1434
  };
1435
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1732
1436
  type GetIntentsByDepositRequest = {
1733
1437
  depositId: string;
1734
1438
  escrowAddress: string;
@@ -1736,18 +1440,21 @@ type GetIntentsByDepositRequest = {
1736
1440
  orchestratorAddresses?: string[];
1737
1441
  status?: ApiIntentStatus | ApiIntentStatus[];
1738
1442
  };
1443
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1739
1444
  type GetIntentsByDepositResponse = {
1740
1445
  success: boolean;
1741
1446
  message: string;
1742
1447
  responseObject: Intent[];
1743
1448
  statusCode: number;
1744
1449
  };
1450
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1745
1451
  type GetIntentByHashRequest = {
1746
1452
  intentHash: string;
1747
1453
  escrowAddress?: string;
1748
1454
  escrowAddresses?: string[];
1749
1455
  orchestratorAddresses?: string[];
1750
1456
  };
1457
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1751
1458
  type GetIntentByHashResponse = {
1752
1459
  success: boolean;
1753
1460
  message: string;
@@ -1808,7 +1515,7 @@ type GetOwnerDepositsRequest = {
1808
1515
  escrowAddress: string;
1809
1516
  escrowAddresses?: string[];
1810
1517
  /** Optional status filter: 'ACTIVE' | 'WITHDRAWN' | 'CLOSED' */
1811
- status?: DepositStatus;
1518
+ status?: DepositStatus$1;
1812
1519
  };
1813
1520
  type GetOwnerDepositsResponse = {
1814
1521
  success: boolean;
@@ -1816,17 +1523,20 @@ type GetOwnerDepositsResponse = {
1816
1523
  responseObject: ApiDeposit[];
1817
1524
  statusCode: number;
1818
1525
  };
1526
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1819
1527
  type GetDepositByIdRequest = {
1820
1528
  depositId: string;
1821
1529
  escrowAddress: string;
1822
1530
  escrowAddresses?: string[];
1823
1531
  };
1532
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1824
1533
  type GetDepositByIdResponse = {
1825
1534
  success: boolean;
1826
1535
  message: string;
1827
1536
  responseObject: ApiDeposit;
1828
1537
  statusCode: number;
1829
1538
  };
1539
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1830
1540
  type OrderStats = {
1831
1541
  id: number;
1832
1542
  totalIntents: number;
@@ -1834,6 +1544,7 @@ type OrderStats = {
1834
1544
  fulfilledIntents: number;
1835
1545
  prunedIntents: number;
1836
1546
  };
1547
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1837
1548
  type DepositIntentStatistics = OrderStats;
1838
1549
  type TakerTierStats = {
1839
1550
  lifetimeSignaledCount: number;
@@ -1885,110 +1596,523 @@ type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist' | 'pee
1885
1596
  type TakerTier = {
1886
1597
  owner: string;
1887
1598
  chainId: number;
1888
- tier: TakerTierLevel;
1889
- /** Legacy base cap. Current curator responses expose enforced caps in platformLimits. */
1890
- perIntentCapBaseUnits?: string;
1891
- /** Legacy formatted base cap. */
1892
- perIntentCapDisplay?: string;
1893
- lastUpdated: string;
1894
- source: TakerTierSource;
1895
- stats: TakerTierStats | null;
1896
- cooldownHours: number;
1897
- cooldownSeconds: number;
1898
- cooldownActive: boolean;
1899
- cooldownRemainingSeconds: number;
1900
- nextIntentAvailableAt: string | null;
1599
+ tier: TakerTierLevel;
1600
+ /** Legacy base cap. Current curator responses expose enforced caps in platformLimits. */
1601
+ perIntentCapBaseUnits?: string;
1602
+ /** Legacy formatted base cap. */
1603
+ perIntentCapDisplay?: string;
1604
+ lastUpdated: string;
1605
+ source: TakerTierSource;
1606
+ stats: TakerTierStats | null;
1607
+ cooldownHours: number;
1608
+ cooldownSeconds: number;
1609
+ cooldownActive: boolean;
1610
+ cooldownRemainingSeconds: number;
1611
+ nextIntentAvailableAt: string | null;
1612
+ /**
1613
+ * Server-authoritative platform cap grid. Use this for enforced caps; do not
1614
+ * derive platform caps from top-level tier caps or risk multipliers.
1615
+ */
1616
+ platformLimits?: PlatformLimit[];
1617
+ /**
1618
+ * Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
1619
+ * optional because the current production deployment still serves the older
1620
+ * payload that omits them — read them when present and fall back gracefully.
1621
+ * Amounts are USDC base-unit strings (6 decimals).
1622
+ */
1623
+ /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1624
+ maxOrderSize?: string;
1625
+ maxOrderSizeDisplay?: string;
1626
+ /** Peer Pay volume floor that qualifies the current tier. */
1627
+ minVolumeForTier?: string;
1628
+ minVolumeForTierDisplay?: string;
1629
+ /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1630
+ nextTier?: TakerTierLevel | null;
1631
+ /** Remaining Peer Pay volume to reach `nextTier`. */
1632
+ volumeToNextTier?: string | null;
1633
+ volumeToNextTierDisplay?: string | null;
1634
+ nextTierMaxOrderSize?: string | null;
1635
+ nextTierMaxOrderSizeDisplay?: string | null;
1636
+ /**
1637
+ * Compatibility name retained by curator. Current semantics preserve
1638
+ * historical maker tiers through July 1, 2026 UTC, then add forward Peer Pay
1639
+ * volume only. Present on deployments with the PR #461/#463 progression
1640
+ * contract.
1641
+ */
1642
+ peerPayVolume?: string;
1643
+ /** Auditable tier progression inputs. Current curator may return a synthetic Peer Pay row. */
1644
+ volumeBreakdown?: TakerTierVolumeBreakdown[];
1645
+ };
1646
+ type GetTakerTierRequest = {
1647
+ owner: string;
1648
+ chainId: number;
1649
+ };
1650
+ type GetTakerTierResponse = {
1651
+ success: boolean;
1652
+ message: string;
1653
+ responseObject: TakerTier;
1654
+ statusCode?: number;
1655
+ };
1656
+ type GetDepositBundleParams = DepositBundleRequest;
1657
+ type GetDepositBundleResponse = DepositBundleResponse;
1658
+ type GetOrderbookParams = {
1659
+ currency: string;
1660
+ paymentPlatform?: string;
1661
+ publicOnly?: boolean;
1662
+ sortBy?: 'price' | 'available' | 'limits';
1663
+ sortDirection?: 'asc' | 'desc';
1664
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1665
+ limit?: number;
1666
+ chainId?: number;
1667
+ token?: string;
1668
+ };
1669
+ type OrderbookEntry = {
1670
+ depositIdOnContract?: string;
1671
+ depositId: string;
1672
+ depositor: string;
1673
+ price: string;
1674
+ availableTokenAmount: string;
1675
+ availableFiatAmount: string;
1676
+ intentAmountMin: string;
1677
+ intentAmountMax: string;
1678
+ paymentPlatform: string;
1679
+ currency: string;
1680
+ paymentMethodHash: string;
1681
+ payeeDetailsHash: string;
1682
+ sellerAutomatedReleaseAvailable?: boolean;
1683
+ escrowAddress: string;
1684
+ chainId: number;
1685
+ offchainId?: string;
1686
+ telegramUsername?: string;
1687
+ };
1688
+ type GetOrderbookResponse = {
1689
+ chainId: number;
1690
+ token: string;
1691
+ currency: string;
1692
+ paymentPlatform: string | null;
1693
+ sortBy: string;
1694
+ sortDirection: string;
1695
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1696
+ internalDetailsIncluded: boolean;
1697
+ generatedAt: string;
1698
+ entries: OrderbookEntry[];
1699
+ };
1700
+
1701
+ declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
1702
+ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1703
+
1704
+ type ReferralReadOptions$1 = {
1705
+ baseApiUrl?: string;
1706
+ timeoutMs?: number;
1707
+ /** Public wallet-address read target. Omit to use bearer-authenticated caller mode. */
1708
+ address?: Address;
1709
+ authorizationToken?: string;
1710
+ getAuthorizationToken?: IndexerAuthTokenProvider;
1711
+ };
1712
+ type ReferralBearerWriteOptions$1 = {
1713
+ baseApiUrl?: string;
1714
+ timeoutMs?: number;
1715
+ authorizationToken?: string;
1716
+ getAuthorizationToken?: IndexerAuthTokenProvider;
1717
+ };
1718
+ type ReferralSignatureOptions$1 = {
1719
+ baseApiUrl?: string;
1720
+ timeoutMs?: number;
1721
+ /** Defaults to base_production for production/preproduction, base_staging for staging. */
1722
+ audience?: string;
1723
+ /** Unix timestamp in seconds. Defaults to now. */
1724
+ issuedAt?: number;
1725
+ };
1726
+ type RedeemReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
1727
+ /** Expected owner wallet for the code. If omitted, the SDK looks it up before signing. */
1728
+ referrerWalletAddress?: Address;
1729
+ };
1730
+ type UpdateReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
1731
+ /** Current code, signed to prevent stale rename replay. */
1732
+ oldCode: string;
1733
+ };
1734
+
1735
+ type PV_ReferralFee = {
1736
+ recipient: `0x${string}`;
1737
+ fee: bigint;
1738
+ };
1739
+ type PV_Deposit = {
1740
+ depositor: string;
1741
+ delegate: string;
1742
+ token: string;
1743
+ amount: bigint;
1744
+ intentAmountRange: {
1745
+ min: bigint;
1746
+ max: bigint;
1747
+ };
1748
+ acceptingIntents: boolean;
1749
+ remainingDeposits: bigint;
1750
+ outstandingIntentAmount: bigint;
1751
+ makerProtocolFee: bigint;
1752
+ reservedMakerFees: bigint;
1753
+ accruedMakerFees: bigint;
1754
+ accruedReferrerFees: bigint;
1755
+ intentGuardian: string;
1756
+ retainOnEmpty: boolean;
1757
+ referrer: string;
1758
+ referrerFee: bigint;
1759
+ };
1760
+ type PV_Currency = {
1761
+ code: string;
1762
+ minConversionRate: bigint;
1763
+ };
1764
+ type PV_PaymentMethodData = {
1765
+ paymentMethod: string;
1766
+ verificationData: {
1767
+ intentGatingService: string;
1768
+ payeeDetails: string;
1769
+ data: string;
1770
+ };
1771
+ currencies: PV_Currency[];
1772
+ };
1773
+ type PV_DepositView = {
1774
+ depositId: bigint;
1775
+ deposit: PV_Deposit;
1776
+ availableLiquidity: bigint;
1777
+ paymentMethods: PV_PaymentMethodData[];
1778
+ intentHashes: string[];
1779
+ };
1780
+ type PV_Intent = {
1781
+ owner: string;
1782
+ to: string;
1783
+ escrow: string;
1784
+ depositId: bigint;
1785
+ amount: bigint;
1786
+ timestamp: bigint;
1787
+ paymentMethod: string;
1788
+ fiatCurrency: string;
1789
+ conversionRate: bigint;
1790
+ referralFees: PV_ReferralFee[];
1791
+ postIntentHook: string;
1792
+ data: string;
1793
+ };
1794
+ type PV_IntentView = {
1795
+ intentHash: string;
1796
+ intent: PV_Intent;
1797
+ deposit: Omit<PV_DepositView, 'intentHashes'>;
1798
+ };
1799
+ declare function parseDepositView(raw: any): PV_DepositView;
1800
+ declare function parseIntentView(raw: any): PV_IntentView;
1801
+
1802
+ declare function enrichPvDepositView(view: PV_DepositView, chainId: number, env?: RuntimeEnv): {
1803
+ paymentMethods: {
1804
+ processorName: string | undefined;
1805
+ currencies: {
1806
+ currencyInfo: CurrencyData | undefined;
1807
+ code: string;
1808
+ minConversionRate: bigint;
1809
+ }[];
1810
+ paymentMethod: string;
1811
+ verificationData: {
1812
+ intentGatingService: string;
1813
+ payeeDetails: string;
1814
+ data: string;
1815
+ };
1816
+ }[];
1817
+ depositId: bigint;
1818
+ deposit: PV_Deposit;
1819
+ availableLiquidity: bigint;
1820
+ intentHashes: string[];
1821
+ };
1822
+ declare function enrichPvIntentView(view: PV_IntentView, chainId: number, env?: RuntimeEnv): any;
1823
+
1824
+ /**
1825
+ * Indexer entity types sourced from @zkp2p/indexer-schema.
1826
+ */
1827
+
1828
+ type WithOverrides<TBase, TOverrides> = Omit<TBase, keyof TOverrides> & TOverrides;
1829
+ type DepositStatus = `${DepositStatus$2}`;
1830
+ type IntentStatus = `${IntentStatus$1}`;
1831
+ type DepositEntity = WithOverrides<Deposit, {
1832
+ status: DepositStatus;
1833
+ retainOnEmpty?: boolean;
1834
+ whitelistHookAddress?: string | null;
1835
+ }>;
1836
+ type DepositPaymentMethodEntity = DepositPaymentMethod;
1837
+ type MethodCurrencyEntity = MethodCurrency;
1838
+ type IntentEntity = WithOverrides<Intent$1, {
1839
+ status: IntentStatus;
1840
+ }>;
1841
+ interface DepositWithRelations extends DepositEntity {
1842
+ paymentMethods?: DepositPaymentMethodEntity[];
1843
+ currencies?: MethodCurrencyEntity[];
1844
+ intents?: IntentEntity[];
1845
+ }
1846
+ type DepositFundActivityType = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
1847
+ /**
1848
+ * Chronological fund-movement log for a deposit.
1849
+ * One row per on-chain fund event (deposit, add, withdraw, close).
1850
+ */
1851
+ type DepositFundActivityEntity = WithOverrides<DepositFundActivity, {
1852
+ activityType: DepositFundActivityType;
1853
+ }>;
1854
+ /**
1855
+ * Per-deposit daily rollup snapshot.
1856
+ * One row per deposit per day (UTC-aligned, 86400s buckets).
1857
+ */
1858
+ type DepositDailySnapshotEntity = DepositDailySnapshot;
1859
+ interface DepositEventEntity {
1860
+ id: string;
1861
+ depositId: string;
1862
+ depositor: string;
1863
+ amount: string;
1864
+ }
1865
+ interface DepositEventsResponse {
1866
+ deposits: DepositEventEntity[];
1867
+ fundsAdded: DepositEventEntity[];
1868
+ withdrawals: DepositEventEntity[];
1869
+ }
1870
+ interface IntentFulfilledEntity {
1871
+ intentHash: string;
1872
+ amount: string;
1873
+ isManualRelease: boolean;
1874
+ fundsTransferredTo?: string | null;
1875
+ }
1876
+ interface IntentFulfillmentAmountsEntity {
1877
+ intentHash: string;
1878
+ releasedAmount?: string | null;
1879
+ takerAmountNetFees?: string | null;
1880
+ }
1881
+ type RateManagerEntity = RateManager;
1882
+ type RateManagerRateEntity = RateManagerRate;
1883
+ interface RateManagerDelegationEntity {
1884
+ id: string;
1885
+ chainId: number;
1886
+ rateManagerId: string;
1887
+ rateManagerAddress?: string | null;
1888
+ depositId: string;
1889
+ delegatedAt?: string | null;
1890
+ createdAt: string;
1891
+ updatedAt: string;
1892
+ }
1893
+ type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
1894
+ rateManagerAddress?: string | null;
1895
+ }>;
1896
+ type ManagerStatsEntity = ManagerStats;
1897
+ type ManagerDailySnapshotEntity = ManagerDailySnapshot;
1898
+ type MakerProfitSnapshotEntity = MakerProfitSnapshot;
1899
+ interface ManualRateUpdateEntity {
1900
+ id: string;
1901
+ rateManagerId: string;
1902
+ paymentMethod: string;
1903
+ /** Canonical V2.2 field. */
1904
+ currencyCode?: string;
1905
+ currency: string;
1906
+ /** Canonical V2.2 field. */
1907
+ rate?: string;
1908
+ minRate: string;
1909
+ }
1910
+ interface OracleConfigUpdateEntity {
1911
+ id: string;
1912
+ rateManagerId: string;
1913
+ escrow?: string;
1914
+ depositIdOnContract?: string;
1915
+ paymentMethod: string;
1916
+ /** Canonical V2.2 field. */
1917
+ currencyCode?: string;
1918
+ currency: string;
1919
+ /** Canonical V2.2 floor field. */
1920
+ floorFixed?: string;
1921
+ /** Canonical V2.2 floor field. */
1922
+ floorSpreadBps?: number;
1923
+ /** Canonical V2.2 floor field. */
1924
+ oracleAdapter?: string;
1925
+ adapter?: string;
1926
+ spreadBps?: number;
1927
+ maxStaleness?: string;
1928
+ adapterConfig?: string;
1929
+ enabled?: boolean;
1930
+ }
1931
+ interface RateManagerListItem {
1932
+ manager: RateManagerEntity;
1933
+ aggregate?: ManagerAggregateStatsEntity | null;
1934
+ }
1935
+ interface RateManagerDetail {
1936
+ manager: RateManagerEntity;
1937
+ rates: RateManagerRateEntity[];
1938
+ aggregate?: ManagerAggregateStatsEntity | null;
1939
+ recentStats: ManagerStatsEntity[];
1940
+ delegations: RateManagerDelegationEntity[];
1941
+ }
1942
+
1943
+ type DepositOrderField = 'remainingDeposits' | 'outstandingIntentAmount' | 'totalAmountTaken' | 'totalWithdrawn' | 'updatedAt' | 'timestamp';
1944
+ type OrderDirection$1 = 'asc' | 'desc';
1945
+ type DepositFilter = Partial<{
1946
+ status: 'ACTIVE' | 'CLOSED';
1947
+ depositor: string;
1948
+ delegate: string;
1949
+ /** True to only include deposits with a non-zero delegate, false for zero delegate. */
1950
+ delegateIsSet: boolean;
1951
+ chainId: number;
1952
+ escrowAddress: string;
1953
+ escrowAddresses: string[];
1954
+ minLiquidity: string;
1955
+ acceptingIntents: boolean;
1956
+ }>;
1957
+ type PaginationOptions = Partial<{
1958
+ limit: number;
1959
+ offset: number;
1960
+ orderBy: DepositOrderField;
1961
+ orderDirection: OrderDirection$1;
1962
+ }>;
1963
+ declare class IndexerDepositService {
1964
+ private client;
1965
+ constructor(client: IndexerClient);
1966
+ private queryWithLegacyFallback;
1967
+ private buildDepositWhere;
1968
+ private buildOrderBy;
1969
+ private fetchRelations;
1970
+ private fetchIntents;
1971
+ private attachRelations;
1972
+ fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity[]>;
1973
+ fetchDepositsWithRelations(filter?: DepositFilter, pagination?: PaginationOptions, options?: {
1974
+ includeIntents?: boolean;
1975
+ intentStatuses?: IntentStatus[];
1976
+ }): Promise<DepositWithRelations[]>;
1977
+ fetchDepositsByIds(ids: string[]): Promise<DepositEntity[]>;
1978
+ fetchDepositsByIdsWithRelations(ids: string[], options?: {
1979
+ includeIntents?: boolean;
1980
+ intentStatuses?: IntentStatus[];
1981
+ }): Promise<DepositWithRelations[]>;
1982
+ fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1983
+ fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1984
+ fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1985
+ fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
1986
+ fetchDepositWithRelations(id: string, options?: {
1987
+ includeIntents?: boolean;
1988
+ intentStatuses?: IntentStatus[];
1989
+ }): Promise<DepositWithRelations | null>;
1990
+ fetchExpiredIntents(params: {
1991
+ now: bigint | string;
1992
+ depositIds: string[];
1993
+ limit?: number;
1994
+ }): Promise<IntentEntity[]>;
1995
+ fetchFulfilledIntentEvents(intentHashes: string[]): Promise<IntentFulfilledEntity[]>;
1996
+ fetchIntentFulfillmentAmounts(intentHash: string): Promise<IntentFulfillmentAmountsEntity | null>;
1997
+ resolvePayeeHash(params: {
1998
+ escrowAddress?: string | null;
1999
+ depositId?: string | number | bigint | null;
2000
+ paymentMethodHash?: string | null;
2001
+ }): Promise<string | null>;
2002
+ fetchDepositEvents(depositIdOnContract: string, options?: {
2003
+ escrowAddress?: string | null;
2004
+ depositor?: string | null;
2005
+ }): Promise<DepositEventsResponse>;
2006
+ fetchDepositsByPayeeHash(payeeHash: string, options?: {
2007
+ paymentMethodHash?: string;
2008
+ limit?: number;
2009
+ includeIntents?: boolean;
2010
+ intentStatuses?: IntentStatus[];
2011
+ }): Promise<DepositWithRelations[]>;
1901
2012
  /**
1902
- * Server-authoritative platform cap grid. Use this for enforced caps; do not
1903
- * derive platform caps from top-level tier caps or risk multipliers.
2013
+ * Fetch chronological fund activities for a deposit.
1904
2014
  */
1905
- platformLimits?: PlatformLimit[];
2015
+ fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity[]>;
1906
2016
  /**
1907
- * Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
1908
- * optional because the current production deployment still serves the older
1909
- * payload that omits them — read them when present and fall back gracefully.
1910
- * Amounts are USDC base-unit strings (6 decimals).
2017
+ * Fetch fund activities across all deposits for a maker address.
1911
2018
  */
1912
- /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1913
- maxOrderSize?: string;
1914
- maxOrderSizeDisplay?: string;
1915
- /** Weighted maker-volume floor that qualifies the current tier. */
1916
- minVolumeForTier?: string;
1917
- minVolumeForTierDisplay?: string;
1918
- /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1919
- nextTier?: TakerTierLevel | null;
1920
- /** Remaining weighted maker volume to reach `nextTier`. */
1921
- volumeToNextTier?: string | null;
1922
- volumeToNextTierDisplay?: string | null;
1923
- nextTierMaxOrderSize?: string | null;
1924
- nextTierMaxOrderSizeDisplay?: string | null;
2019
+ fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity[]>;
1925
2020
  /**
1926
- * Compatibility name retained by curator: now contains weighted all-maker
1927
- * volume driving tier qualification. Present on deployments with the
1928
- * PR #461/#463 progression contract; PR #478 changes its source semantics.
2021
+ * Fetch daily snapshots for a deposit, ordered by day ascending.
1929
2022
  */
1930
- peerPayVolume?: string;
1931
- /** Auditable per-platform weighted-volume inputs. Present on PR #478+ deployments. */
1932
- volumeBreakdown?: TakerTierVolumeBreakdown[];
1933
- };
1934
- type GetTakerTierRequest = {
1935
- owner: string;
1936
- chainId: number;
1937
- };
1938
- type GetTakerTierResponse = {
1939
- success: boolean;
1940
- message: string;
1941
- responseObject: TakerTier;
1942
- statusCode?: number;
1943
- };
1944
- type GetDepositBundleParams = DepositBundleRequest;
1945
- type GetDepositBundleResponse = DepositBundleResponse;
1946
- type GetOrderbookParams = {
1947
- currency: string;
1948
- paymentPlatform?: string;
1949
- publicOnly?: boolean;
1950
- sortBy?: 'price' | 'available' | 'limits';
1951
- sortDirection?: 'asc' | 'desc';
1952
- sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1953
- limit?: number;
1954
- chainId?: number;
1955
- token?: string;
2023
+ fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
2024
+ fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
2025
+ }
2026
+
2027
+ type OrderDirection = 'asc' | 'desc';
2028
+ type RateManagerOrderField = 'createdAt' | 'updatedAt' | 'fee' | 'maxFee' | 'rateManagerId' | 'currentDelegatedBalance' | 'totalFilledVolume';
2029
+ type RateManagerFilter = Partial<{
2030
+ manager: string;
2031
+ name: string;
2032
+ hasHook: boolean;
2033
+ maxFee: string;
2034
+ rateManagerIds: string[];
2035
+ }>;
2036
+ type RateManagerPaginationOptions = Partial<{
2037
+ limit: number;
2038
+ offset: number;
2039
+ orderBy: RateManagerOrderField;
2040
+ orderDirection: OrderDirection;
2041
+ }>;
2042
+ type RateManagerDelegationPaginationOptions = Partial<{
2043
+ limit: number;
2044
+ offset: number;
2045
+ orderBy: 'createdAt' | 'updatedAt' | 'depositId' | 'delegatedAt';
2046
+ orderDirection: OrderDirection;
2047
+ rateManagerAddress: string;
2048
+ }>;
2049
+ declare function compareEventCursorIdsByRecency(leftId?: string | null, rightId?: string | null): number;
2050
+ declare class IndexerRateManagerService {
2051
+ private client;
2052
+ constructor(client: IndexerClient);
2053
+ private buildRateManagerScopeWhere;
2054
+ private buildWhere;
2055
+ private buildAggregateWhere;
2056
+ private buildLegacyAggregateWhere;
2057
+ private buildOrderBy;
2058
+ private toRateManagerListItems;
2059
+ private applyHookFilter;
2060
+ private queryRateManagerList;
2061
+ private buildDelegationOrderBy;
2062
+ private buildLegacyDelegationOrderBy;
2063
+ private fetchCurrentRateManagerDepositScopes;
2064
+ private fetchHistoricalRateManagerDepositScopes;
2065
+ fetchRateManagers(pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter): Promise<RateManagerListItem[]>;
2066
+ fetchRateManagerDetail(rateManagerId: string, options?: {
2067
+ statsLimit?: number;
2068
+ rateManagerAddress?: string | null;
2069
+ }): Promise<RateManagerDetail | null>;
2070
+ fetchRateManagerDelegations(rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions): Promise<RateManagerDelegationEntity[]>;
2071
+ fetchManagerDailySnapshots(rateManagerId: string, options?: {
2072
+ limit?: number;
2073
+ rateManagerAddress?: string | null;
2074
+ }): Promise<ManagerDailySnapshotEntity[]>;
2075
+ fetchDelegationForDeposit(depositId: string, options?: {
2076
+ escrowAddress?: string | null;
2077
+ }): Promise<RateManagerDelegationEntity | null>;
2078
+ fetchManualRateUpdates(rateManagerId: string, options?: {
2079
+ limit?: number;
2080
+ rateManagerAddress?: string | null;
2081
+ }): Promise<ManualRateUpdateEntity[]>;
2082
+ fetchOracleConfigUpdates(rateManagerId: string, options?: {
2083
+ limit?: number;
2084
+ rateManagerAddress?: string | null;
2085
+ }): Promise<OracleConfigUpdateEntity[]>;
2086
+ }
2087
+
2088
+ type FulfillmentRecord = {
2089
+ id: string;
2090
+ intentHash: string;
2091
+ amount: string;
2092
+ isManualRelease: boolean;
2093
+ fundsTransferredTo: string | null;
1956
2094
  };
1957
- type OrderbookEntry = {
1958
- depositIdOnContract?: string;
1959
- depositId: string;
1960
- depositor: string;
1961
- price: string;
1962
- availableTokenAmount: string;
1963
- availableFiatAmount: string;
1964
- intentAmountMin: string;
1965
- intentAmountMax: string;
1966
- paymentPlatform: string;
2095
+ type PaymentVerifiedRecord = {
2096
+ id: string;
2097
+ intentHash: string;
2098
+ method: string;
1967
2099
  currency: string;
1968
- paymentMethodHash: string;
1969
- payeeDetailsHash: string;
1970
- sellerAutomatedReleaseAvailable?: boolean;
1971
- escrowAddress: string;
1972
- chainId: number;
1973
- offchainId?: string;
1974
- telegramUsername?: string;
2100
+ amount: string;
2101
+ timestamp: string;
2102
+ paymentId: string | null;
2103
+ payeeId: string | null;
1975
2104
  };
1976
- type GetOrderbookResponse = {
1977
- chainId: number;
1978
- token: string;
1979
- currency: string;
1980
- paymentPlatform: string | null;
1981
- sortBy: string;
1982
- sortDirection: string;
1983
- sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1984
- internalDetailsIncluded: boolean;
1985
- generatedAt: string;
1986
- entries: OrderbookEntry[];
2105
+ type FulfillmentAndPaymentResponse = {
2106
+ Orchestrator_V21_IntentFulfilled: FulfillmentRecord[];
2107
+ UnifiedVerifier_V21_PaymentVerified: PaymentVerifiedRecord[];
1987
2108
  };
2109
+ declare function fetchFulfillmentAndPayment(client: IndexerClient, intentHash: string): Promise<FulfillmentAndPaymentResponse>;
1988
2110
 
1989
- declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
1990
- type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1991
-
2111
+ type RedeemReferralCodeSignatureOptions = RedeemReferralCodeSignatureOptions$1;
2112
+ type ReferralBearerWriteOptions = ReferralBearerWriteOptions$1;
2113
+ type ReferralReadOptions = ReferralReadOptions$1;
2114
+ type ReferralSignatureOptions = ReferralSignatureOptions$1;
2115
+ type UpdateReferralCodeSignatureOptions = UpdateReferralCodeSignatureOptions$1;
1992
2116
  /**
1993
2117
  * Configuration options for creating a Zkp2pClient instance.
1994
2118
  *
@@ -2010,6 +2134,8 @@ type Zkp2pNextOptions = {
2010
2134
  chainId: number;
2011
2135
  /** Optional RPC URL override (defaults to wallet's chain RPC) */
2012
2136
  rpcUrl?: string;
2137
+ /** Optional viem transport override for RPC reads */
2138
+ rpcTransport?: Transport;
2013
2139
  /** Runtime environment: 'production', 'preproduction', or 'staging' (defaults to 'production') */
2014
2140
  runtimeEnv?: RuntimeEnv;
2015
2141
  /** Optional indexer URL override */
@@ -2021,9 +2147,9 @@ type Zkp2pNextOptions = {
2021
2147
  * Not used by public curator endpoints such as quotes, maker reads, or intent signing.
2022
2148
  */
2023
2149
  apiKey?: string;
2024
- /** Optional bearer token for indexer authentication */
2150
+ /** Optional bearer token for indexer authentication and authenticated curator account APIs */
2025
2151
  authorizationToken?: string;
2026
- /** Optional async token provider for indexer auth in long-lived clients */
2152
+ /** Optional async token provider for indexer auth and authenticated curator account APIs */
2027
2153
  getAuthorizationToken?: IndexerAuthTokenProvider;
2028
2154
  /** Optional API key for indexer proxy authentication (sent as x-api-key header) */
2029
2155
  indexerApiKey?: string;
@@ -2140,11 +2266,7 @@ type CurrencyOracleRateConfig = {
2140
2266
  maxStaleness: number;
2141
2267
  };
2142
2268
  /** On-chain currency tuple shape passed to EscrowV2 contract methods. */
2143
- type OnchainCurrencyEntry = {
2144
- code: `0x${string}`;
2145
- minConversionRate: bigint;
2146
- oracleRateConfig?: CurrencyOracleRateConfig;
2147
- };
2269
+ type OnchainCurrencyEntry = OnchainCurrency;
2148
2270
  /**
2149
2271
  * SDK client for ZKP2P liquidity providers (offramp peers).
2150
2272
  *
@@ -2191,7 +2313,7 @@ type OnchainCurrencyEntry = {
2191
2313
  * transport: http(),
2192
2314
  * });
2193
2315
  *
2194
- * const client = new OfframpClient({
2316
+ * const client = new Zkp2pClient({
2195
2317
  * walletClient,
2196
2318
  * chainId: base.id,
2197
2319
  * });
@@ -2227,7 +2349,7 @@ declare class Zkp2pClient {
2227
2349
  readonly publicClient: PublicClient;
2228
2350
  /** The chain ID this client is configured for */
2229
2351
  readonly chainId: number;
2230
- /** Runtime environment ('production' or 'staging') */
2352
+ /** Runtime environment ('production', 'preproduction', or 'staging') */
2231
2353
  readonly runtimeEnv: RuntimeEnv;
2232
2354
  /** Escrow contract address */
2233
2355
  readonly escrowAddress: Address;
@@ -2277,8 +2399,10 @@ declare class Zkp2pClient {
2277
2399
  readonly baseApiUrl?: string;
2278
2400
  /** Optional internal curator API key (`x-api-key`) for internal seller verification */
2279
2401
  readonly apiKey?: string;
2280
- /** Bearer token for indexer authentication */
2402
+ /** Bearer token for indexer authentication and authenticated curator account APIs */
2281
2403
  readonly authorizationToken?: string;
2404
+ /** Optional bearer token provider for indexer and authenticated curator account APIs */
2405
+ readonly getAuthorizationToken?: IndexerAuthTokenProvider;
2282
2406
  /** API timeout in milliseconds */
2283
2407
  readonly apiTimeoutMs: number;
2284
2408
  private _usdcAddress?;
@@ -2289,6 +2413,7 @@ declare class Zkp2pClient {
2289
2413
  private readonly _pvReader;
2290
2414
  private readonly _vaultOps;
2291
2415
  private readonly _intentOps;
2416
+ private readonly _referralOps;
2292
2417
  private _rateManagerInitError?;
2293
2418
  /**
2294
2419
  * Creates a new Zkp2pClient instance.
@@ -2303,8 +2428,6 @@ declare class Zkp2pClient {
2303
2428
  private parseRawDepositId;
2304
2429
  private stripTrailingSlash;
2305
2430
  private defaultAttestationServiceForBaseApiUrl;
2306
- private normalizeOracleRateConfig;
2307
- private escrowCurrencyHasOracleConfig;
2308
2431
  /**
2309
2432
  * Normalizes currency tuples by appending an empty `oracleRateConfig` when the ABI
2310
2433
  * requires it and the caller hasn't provided one.
@@ -2313,11 +2436,7 @@ declare class Zkp2pClient {
2313
2436
  supportsInlineOracleRateConfig(params?: {
2314
2437
  escrowAddress?: Address;
2315
2438
  }): boolean;
2316
- private parseManagerFeeFromRead;
2317
- private getAbiFunction;
2318
2439
  private resolveAbiFunctionName;
2319
- private abiTupleHasComponent;
2320
- private abiFunctionHasInput;
2321
2440
  private resolveEscrowAddressOrThrow;
2322
2441
  private prepareCreateRateManagerTransaction;
2323
2442
  private prepareSetVaultRateTransaction;
@@ -2338,6 +2457,12 @@ declare class Zkp2pClient {
2338
2457
  private lookupIntentEscrowOnchain;
2339
2458
  private warnOrchestratorFallback;
2340
2459
  private resolveOrchestratorContext;
2460
+ /**
2461
+ * Spread helper for viem requests.
2462
+ * justified: TxOverrides mixes legacy gasPrice with EIP-1559 fee fields, which
2463
+ * viem's discriminated request unions reject; keep the suppression in one place.
2464
+ */
2465
+ private applyTxOverrides;
2341
2466
  /**
2342
2467
  * Simulate a contract call (validation only) and send with ERC-8021 attribution.
2343
2468
  * Referrer codes are stripped from overrides for simulation and appended to calldata.
@@ -2479,7 +2604,7 @@ declare class Zkp2pClient {
2479
2604
  * Fetches deposits from the indexer with optional filtering and pagination.
2480
2605
  * Use for advanced queries across all deposits, not just by owner.
2481
2606
  */
2482
- getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity$1[]>;
2607
+ getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity[]>;
2483
2608
  /**
2484
2609
  * Fetches deposits with their related payment methods and optionally intents.
2485
2610
  */
@@ -2498,19 +2623,19 @@ declare class Zkp2pClient {
2498
2623
  /**
2499
2624
  * Fetches intents for multiple deposits.
2500
2625
  */
2501
- getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2626
+ getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2502
2627
  /**
2503
2628
  * Fetches all intents created by a specific owner address.
2504
2629
  */
2505
- getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2630
+ getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2506
2631
  /**
2507
2632
  * Fetches fulfilled intents for a vault by rate manager ID.
2508
2633
  */
2509
- getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2634
+ getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2510
2635
  /**
2511
2636
  * Fetches a single intent by hash.
2512
2637
  */
2513
- getIntentByHash: (intentHash: string) => Promise<IntentEntity$1 | null>;
2638
+ getIntentByHash: (intentHash: string) => Promise<IntentEntity | null>;
2514
2639
  /**
2515
2640
  * Fetches intents that have expired.
2516
2641
  */
@@ -2518,7 +2643,7 @@ declare class Zkp2pClient {
2518
2643
  now: bigint | string;
2519
2644
  depositIds: string[];
2520
2645
  limit?: number;
2521
- }) => Promise<IntentEntity$1[]>;
2646
+ }) => Promise<IntentEntity[]>;
2522
2647
  /**
2523
2648
  * Fetches fulfillment events for completed intents. `amount` is the net
2524
2649
  * USDC transferred to the taker after protocol/referrer fees.
@@ -2546,7 +2671,7 @@ declare class Zkp2pClient {
2546
2671
  * Fetches deposits by their composite IDs.
2547
2672
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
2548
2673
  */
2549
- getDepositsByIds: (ids: string[]) => Promise<DepositEntity$1[]>;
2674
+ getDepositsByIds: (ids: string[]) => Promise<DepositEntity[]>;
2550
2675
  /**
2551
2676
  * Fetches deposits by their composite IDs with all related data.
2552
2677
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
@@ -2558,7 +2683,7 @@ declare class Zkp2pClient {
2558
2683
  /**
2559
2684
  * Fetches maker profit snapshots for the provided deposits.
2560
2685
  */
2561
- getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity$1[]>;
2686
+ getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
2562
2687
  /**
2563
2688
  * Fetches rate managers (vaults) with aggregate stats.
2564
2689
  */
@@ -2598,15 +2723,15 @@ declare class Zkp2pClient {
2598
2723
  /**
2599
2724
  * Fetches chronological fund activities for a specific deposit.
2600
2725
  */
2601
- getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity$1[]>;
2726
+ getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity[]>;
2602
2727
  /**
2603
2728
  * Fetches fund activities across all deposits for a maker address.
2604
2729
  */
2605
- getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity$1[]>;
2730
+ getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity[]>;
2606
2731
  /**
2607
2732
  * Fetches daily snapshots for a deposit, ordered by day ascending.
2608
2733
  */
2609
- getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity$1[]>;
2734
+ getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity[]>;
2610
2735
  /**
2611
2736
  * Performs a raw GraphQL query against the indexer.
2612
2737
  */
@@ -2851,12 +2976,7 @@ declare class Zkp2pClient {
2851
2976
  depositId: bigint | number | string;
2852
2977
  paymentMethodHash: `0x${string}`;
2853
2978
  currencyHash: `0x${string}`;
2854
- config: {
2855
- adapter: Address;
2856
- adapterConfig: `0x${string}`;
2857
- spreadBps: number;
2858
- maxStaleness: number;
2859
- };
2979
+ config: CurrencyOracleRateConfig;
2860
2980
  escrowAddress?: Address;
2861
2981
  txOverrides?: TxOverrides;
2862
2982
  }, Hash>;
@@ -2879,12 +2999,7 @@ declare class Zkp2pClient {
2879
2999
  depositId: bigint | number | string;
2880
3000
  paymentMethods: `0x${string}`[];
2881
3001
  currencies: `0x${string}`[][];
2882
- configs: Array<Array<{
2883
- adapter: Address;
2884
- adapterConfig: `0x${string}`;
2885
- spreadBps: number;
2886
- maxStaleness: number;
2887
- }>>;
3002
+ configs: CurrencyOracleRateConfig[][];
2888
3003
  escrowAddress?: Address;
2889
3004
  txOverrides?: TxOverrides;
2890
3005
  }, Hash>;
@@ -2898,12 +3013,7 @@ declare class Zkp2pClient {
2898
3013
  code: `0x${string}`;
2899
3014
  minConversionRate: bigint | string;
2900
3015
  updateOracle: boolean;
2901
- oracleRateConfig: {
2902
- adapter: Address;
2903
- adapterConfig: `0x${string}`;
2904
- spreadBps: number;
2905
- maxStaleness: number;
2906
- };
3016
+ oracleRateConfig: CurrencyOracleRateConfig;
2907
3017
  }>>;
2908
3018
  escrowAddress?: Address;
2909
3019
  txOverrides?: TxOverrides;
@@ -3443,7 +3553,6 @@ declare class Zkp2pClient {
3443
3553
  * Includes fetching intent inputs and calling attestation service.
3444
3554
  */
3445
3555
  private prepareFulfillIntent;
3446
- private defaultAttestationService;
3447
3556
  /**
3448
3557
  * **Supporting Method** - Fetches quotes for available liquidity.
3449
3558
  *
@@ -3516,6 +3625,49 @@ declare class Zkp2pClient {
3516
3625
  baseApiUrl?: string;
3517
3626
  timeoutMs?: number;
3518
3627
  }): Promise<GetTakerTierResponse>;
3628
+ /**
3629
+ * Fetch a referral dashboard. Pass `address` for a public wallet-keyed read;
3630
+ * omit it to use the authenticated caller mode.
3631
+ */
3632
+ getReferralDashboard(opts?: ReferralReadOptions): Promise<ReferralDashboardResponse>;
3633
+ /**
3634
+ * Fetch referral earnings. Pass `address` for a public wallet-keyed read;
3635
+ * omit it to use the authenticated caller mode.
3636
+ */
3637
+ getReferralEarnings(opts?: ReferralReadOptions): Promise<ReferralEarningsResponse>;
3638
+ /**
3639
+ * Publicly look up a referral code's owner wallet and active status.
3640
+ */
3641
+ lookupReferralCode(code: string, opts?: {
3642
+ baseApiUrl?: string;
3643
+ timeoutMs?: number;
3644
+ }): Promise<ReferralCodeLookupResponse>;
3645
+ /**
3646
+ * Create or fetch the authenticated caller's referral code with bearer auth.
3647
+ */
3648
+ createReferralCode(opts?: ReferralBearerWriteOptions): Promise<CreateReferralCodeResponse>;
3649
+ /**
3650
+ * Create or fetch the wallet's referral code with EIP-712 signature auth.
3651
+ */
3652
+ createReferralCodeWithSignature(opts?: ReferralSignatureOptions): Promise<CreateReferralCodeResponse>;
3653
+ /**
3654
+ * Apply another user's referral code with bearer auth.
3655
+ */
3656
+ redeemReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<RedeemReferralCodeResponse>;
3657
+ /**
3658
+ * Apply another user's referral code with EIP-712 signature auth. If
3659
+ * `referrerWalletAddress` is omitted, the SDK looks up the code first and signs
3660
+ * the current owner wallet into the redeem payload.
3661
+ */
3662
+ redeemReferralCodeWithSignature(code: string, opts?: RedeemReferralCodeSignatureOptions): Promise<RedeemReferralCodeResponse>;
3663
+ /**
3664
+ * Customize the authenticated caller's referral code with bearer auth.
3665
+ */
3666
+ updateReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<UpdateReferralCodeResponse>;
3667
+ /**
3668
+ * Customize the wallet's referral code with EIP-712 signature auth.
3669
+ */
3670
+ updateReferralCodeWithSignature(code: string, opts: UpdateReferralCodeSignatureOptions): Promise<UpdateReferralCodeResponse>;
3519
3671
  /**
3520
3672
  * The signed `credentialValidatedAt` field is an upload-time freshness witness minted by
3521
3673
  * attestation-service. `credentialExpiresAt` carries an upstream session expiry hint when one
@@ -3572,18 +3724,10 @@ declare class Zkp2pClient {
3572
3724
  }): Promise<CuratorSellerVerifyResponse>;
3573
3725
  private requireProtocolViewer;
3574
3726
  private protocolViewerFunctionInputCount;
3575
- /**
3576
- * Returns the input count for a function on a specific PV entry's ABI.
3577
- * Used to branch between 1-input (V1) and 2-input (V2) PV call signatures.
3578
- */
3579
- private pvEntryFunctionInputCount;
3580
- private isZeroAddressValue;
3581
- private toBigIntOrZero;
3582
3727
  private buildProtocolViewerContexts;
3583
3728
  private isProtocolViewerDepositPopulated;
3584
3729
  private isProtocolViewerIntentPopulated;
3585
3730
  private buildDepositViewFromEscrowDeposit;
3586
- private convertIndexerDepositToPvView;
3587
3731
  private getPvAccountDepositsFromIndexer;
3588
3732
  /**
3589
3733
  * Fetches a deposit directly from on-chain ProtocolViewer contract.
@@ -3733,4 +3877,4 @@ type SendBatchFn = (txs: Array<{
3733
3877
  value?: bigint;
3734
3878
  }>) => Promise<string>;
3735
3879
 
3736
- export { type ReleaseFundsToPayerParams as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type SignalIntentMethodParams as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type CancelIntentMethodParams as H, type IntentEntity$1 as I, type Zkp2pNextOptions as J, type AuthorizationTokenProvider as K, type TimeoutConfig as L, type ActionCallback as M, type CreateDepositParams as N, type CreateDepositConversionRate as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type Range as W, type WithdrawDepositParams as X, type SignalIntentParams as Y, Zkp2pClient as Z, type FulfillIntentParams as _, type IdentityAttestationRequestBody as a, type SellerCredentialProbeResponse as a$, type CancelIntentParams as a0, type BestByPlatformResponseObject as a1, type GetBestByPlatformResponse as a2, type GetBestByPlatformResponseObject as a3, type GetPlatformQuote as a4, type PlatformQuote as a5, type QuoteRequest as a6, type GetNearbyQuote as a7, type GetNearbySuggestions as a8, type GetQuoteResponse as a9, type RegisterPayeeDetailsResponse as aA, type SellerPlatform as aB, type VenmoSessionMaterial as aC, type CashAppSessionMaterial as aD, type WiseSessionMaterial as aE, type WiseProfileInfo as aF, type WiseProfileSelectionRequired as aG, type WiseProfileNotFound as aH, type PayPalGoogleOAuthSellerCredentialUploadBody as aI, type VenmoGoogleOAuthSellerCredentialUploadBody as aJ, type VenmoCredentialUploadInput as aK, type CashAppCredentialUploadInput as aL, type WiseCredentialUploadInput as aM, type SellerCredentialUploadInputByPlatform as aN, type SellerCiphertextBundle as aO, type SellerSignedCiphertextBundle as aP, type SellerVerifyIntentDetails as aQ, type SellerVerifyInput as aR, type SellerProbeInput as aS, type SellerCredentialBundleUpload as aT, type SellerCredentialStatusValue as aU, type SellerCredentialStatus as aV, type SellerVerifyProxyBody as aW, type SellerTypedDataField as aX, type SellerTypedDataSpec as aY, type SellerPaymentTypedDataValue as aZ, type SellerAttestationOutput as a_, type GetQuoteResponseObject as aa, type GetQuoteSingleResponse as ab, type QuoteResponse as ac, type QuoteResponseObject as ad, type QuoteSingleResponse as ae, type QuoteIntentResponse as af, type QuoteFeesResponse as ag, type FiatResponse as ah, type TokenResponse as ai, type NearbyQuote as aj, type NearbySuggestions as ak, type ApiDeposit as al, type DepositVerifier as am, type DepositVerifierCurrency as an, type DepositStatus as ao, type GetDepositByIdRequest as ap, type GetDepositByIdResponse as aq, type Intent as ar, type ApiIntentStatus as as, type GetOwnerIntentsRequest as at, type GetOwnerIntentsResponse as au, type GetIntentsByDepositRequest as av, type GetIntentsByDepositResponse as aw, type GetIntentByHashRequest as ax, type GetIntentByHashResponse as ay, type RegisterPayeeDetailsRequest as az, type AttestationServiceSellerVerifyResponse as b, type RateManagerFilter as b$, type FulfillIntentAttestationResponse as b0, type AttestationServiceSellerCredentialProbeResponse as b1, type BuyerTeePaymentParams as b2, type BuyerTeePaymentProofInput as b3, type BuyerTeeSessionMaterial as b4, type CuratorSellerCredentialStatusResponse as b5, type CuratorSellerVerifyResponse as b6, type RegisteredSellerCredentialPlatform as b7, type UploadSellerCredentialParams as b8, type RegisteredUploadSellerCredentialParams as b9, IndexerDepositService as bA, IndexerRateManagerService as bB, compareEventCursorIdsByRecency as bC, fetchFulfillmentAndPayment as bD, type DepositEntity$1 as bE, type IntentFulfilledEntity as bF, type IntentFulfillmentAmountsEntity as bG, type DepositPaymentMethodEntity$1 as bH, type MethodCurrencyEntity$1 as bI, type IntentStatus as bJ, type RateManagerEntity as bK, type RateManagerRateEntity as bL, type RateManagerDelegationEntity as bM, type ManagerAggregateStatsEntity as bN, type ManagerStatsEntity as bO, type ManagerDailySnapshotEntity as bP, type RateManagerListItem as bQ, type RateManagerDetail as bR, type ManualRateUpdateEntity as bS, type OracleConfigUpdateEntity as bT, type DepositFundActivityEntity$1 as bU, type DepositDailySnapshotEntity$1 as bV, type DepositFundActivityType$1 as bW, type DepositFilter as bX, type PaginationOptions as bY, type DepositOrderField as bZ, type OrderDirection$1 as b_, type UploadSellerCredentialOptions as ba, type GetSellerCredentialStatusParams as bb, type UploadPayPalGoogleOAuthSellerCredentialParams as bc, type UploadVenmoGoogleOAuthSellerCredentialParams as bd, type UploadGoogleOAuthSellerCredentialParams as be, type VerifySellerPaymentParams as bf, type IdentityAttestationActionType as bg, type IdentityAttestationOutput as bh, type IdentityAttestationOutputFor as bi, type IdentityAttestationParams as bj, type MakerIdentityAttestationRequestBody as bk, type MakerIdentityPlatform as bl, type OnchainCurrency as bm, type DepositVerifierData as bn, type PreparedTransaction as bo, type OrderStats as bp, type DepositIntentStatistics as bq, type TakerTier as br, type TakerTierVolumeBreakdown as bs, type TakerTierStats as bt, type TakerTierSource as bu, type PlatformLimit as bv, type PlatformRiskLevel as bw, type OrderbookEntry as bx, IndexerClient as by, defaultIndexerEndpoint as bz, type SellerCredentialUploadInput as c, type RateManagerPaginationOptions as c0, type RateManagerDelegationPaginationOptions as c1, type RateManagerOrderField as c2, type OrderDirection as c3, type DeploymentEnv as c4, type FulfillmentRecord as c5, type PaymentVerifiedRecord as c6, type FulfillmentAndPaymentResponse as c7, PAYMENT_PLATFORMS as c8, type PaymentPlatformType as c9, normalizeRateManagerId as cA, normalizeRegistry as cB, getDelegationRoute as cC, classifyDelegationState as cD, type DelegationRoute as cE, type DelegationState as cF, type DelegationDepositTarget as cG, type BatchResult as cH, type SendTransactionFn as cI, type SendBatchFn as cJ, ZERO_ADDRESS as cK, asErrorMessage as cL, assertDelegationMethodSupport as cM, Currency as ca, currencyInfo as cb, getCurrencyInfoFromHash as cc, getCurrencyInfoFromCountryCode as cd, getCurrencyCodeFromHash as ce, isSupportedCurrencyHash as cf, mapConversionRatesToOnchainMinRate as cg, type CurrencyData as ch, getContracts as ci, getRateManagerContracts as cj, getPaymentMethodsCatalog as ck, getGatingServiceAddress as cl, type RuntimeEnv as cm, parseDepositView as cn, parseIntentView as co, enrichPvDepositView as cp, enrichPvIntentView as cq, type PV_DepositView as cr, type PV_Deposit as cs, type PV_PaymentMethodData as ct, type PV_Currency as cu, type PV_ReferralFee as cv, type PV_IntentView as cw, type PV_Intent as cx, ZERO_RATE_MANAGER_ID as cy, isZeroRateManagerId as cz, type SellerCredentialUploadPlatform as d, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type GoogleOAuthSellerCredentialUploadBodyByPlatform as h, type BestByPlatformResponse as i, type ValidatePayeeDetailsResponse as j, type PostDepositDetailsResponse as k, type GetPayeeDetailsRequest as l, type GetPayeeDetailsResponse as m, type GetOwnerDepositsRequest as n, type GetOwnerDepositsResponse as o, type GetTakerTierRequest as p, type GetTakerTierResponse as q, type GetDepositBundleParams as r, type ApiAdapterOptions as s, type GetDepositBundleResponse as t, type GetOrderbookParams as u, type GetOrderbookResponse as v, type CurrencyType as w, type PaymentMethodCatalog as x, type TxOverrides as y, type SignalIntentReferralFee as z };
3880
+ export { type SignalIntentReferralFee as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type GetTakerTierRequest as E, type GetTakerTierResponse as F, type GoogleOAuthSellerCredentialPlatform as G, type GetDepositBundleParams as H, type IntentEntity as I, type GetDepositBundleResponse as J, type GetOrderbookParams as K, type GetOrderbookResponse as L, type CurrencyType as M, type PaymentMethodCatalog as N, type TxOverrides as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type ReferralBearerWriteOptions as W, type ReferralReadOptions as X, type ReferralSignatureOptions as Y, Zkp2pClient as Z, type RedeemReferralCodeSignatureOptions as _, type IdentityAttestationRequestBody as a, type VenmoCredentialUploadInput as a$, type SignalIntentMethodParams as a0, type FulfillIntentMethodParams as a1, type CancelIntentMethodParams as a2, type UpdateReferralCodeSignatureOptions as a3, type Zkp2pNextOptions as a4, type AuthorizationTokenProvider as a5, type TimeoutConfig as a6, type ActionCallback as a7, type ReferralRedemption as a8, type ReferralSignatureBody as a9, type NearbyQuote as aA, type NearbySuggestions as aB, type ApiDeposit as aC, type DepositVerifier as aD, type DepositVerifierCurrency as aE, type DepositStatus$1 as aF, type GetDepositByIdRequest as aG, type GetDepositByIdResponse as aH, type Intent as aI, type ApiIntentStatus as aJ, type GetOwnerIntentsRequest as aK, type GetOwnerIntentsResponse as aL, type GetIntentsByDepositRequest as aM, type GetIntentsByDepositResponse as aN, type GetIntentByHashRequest as aO, type GetIntentByHashResponse as aP, type RegisterPayeeDetailsRequest as aQ, type RegisterPayeeDetailsResponse as aR, type SellerPlatform as aS, type VenmoSessionMaterial as aT, type CashAppSessionMaterial as aU, type WiseSessionMaterial as aV, type WiseProfileInfo as aW, type WiseProfileSelectionRequired as aX, type WiseProfileNotFound as aY, type PayPalGoogleOAuthSellerCredentialUploadBody as aZ, type VenmoGoogleOAuthSellerCredentialUploadBody as a_, type CreateDepositParams as aa, type CreateDepositConversionRate as ab, type Range as ac, type WithdrawDepositParams as ad, type SignalIntentParams as ae, type FulfillIntentParams as af, type ReleaseFundsToPayerParams as ag, type CancelIntentParams as ah, type BestByPlatformResponseObject as ai, type GetBestByPlatformResponse as aj, type GetBestByPlatformResponseObject as ak, type GetPlatformQuote as al, type PlatformQuote as am, type QuoteRequest as an, type GetNearbyQuote as ao, type GetNearbySuggestions as ap, type GetQuoteResponse as aq, type GetQuoteResponseObject as ar, type GetQuoteSingleResponse as as, type QuoteResponse as at, type QuoteResponseObject as au, type QuoteSingleResponse as av, type QuoteIntentResponse as aw, type QuoteFeesResponse as ax, type FiatResponse as ay, type TokenResponse as az, type AttestationServiceSellerVerifyResponse as b, type RateManagerEntity as b$, type CashAppCredentialUploadInput as b0, type WiseCredentialUploadInput as b1, type SellerCredentialUploadInputByPlatform as b2, type SellerCiphertextBundle as b3, type SellerSignedCiphertextBundle as b4, type SellerVerifyIntentDetails as b5, type SellerVerifyInput as b6, type SellerProbeInput as b7, type SellerCredentialBundleUpload as b8, type SellerCredentialStatusValue as b9, type IdentityAttestationParams as bA, type MakerIdentityAttestationRequestBody as bB, type MakerIdentityPlatform as bC, type OnchainCurrency as bD, type DepositVerifierData as bE, type PreparedTransaction as bF, type OrderStats as bG, type DepositIntentStatistics as bH, type TakerTier as bI, type TakerTierVolumeBreakdown as bJ, type TakerTierStats as bK, type TakerTierSource as bL, type PlatformLimit as bM, type PlatformRiskLevel as bN, type OrderbookEntry as bO, IndexerClient as bP, defaultIndexerEndpoint as bQ, IndexerDepositService as bR, IndexerRateManagerService as bS, compareEventCursorIdsByRecency as bT, fetchFulfillmentAndPayment as bU, type DepositEntity as bV, type IntentFulfilledEntity as bW, type IntentFulfillmentAmountsEntity as bX, type DepositPaymentMethodEntity as bY, type MethodCurrencyEntity as bZ, type IntentStatus as b_, type SellerCredentialStatus as ba, type SellerVerifyProxyBody as bb, type SellerTypedDataField as bc, type SellerTypedDataSpec as bd, type SellerPaymentTypedDataValue as be, type SellerAttestationOutput as bf, type SellerCredentialProbeResponse as bg, type FulfillIntentAttestationResponse as bh, type AttestationServiceSellerCredentialProbeResponse as bi, type BuyerTeePaymentParams as bj, type BuyerTeePaymentProofInput as bk, type BuyerTeeSessionMaterial as bl, type CuratorSellerCredentialStatusResponse as bm, type CuratorSellerVerifyResponse as bn, type RegisteredSellerCredentialPlatform as bo, type UploadSellerCredentialParams as bp, type RegisteredUploadSellerCredentialParams as bq, type UploadSellerCredentialOptions as br, type GetSellerCredentialStatusParams as bs, type UploadPayPalGoogleOAuthSellerCredentialParams as bt, type UploadVenmoGoogleOAuthSellerCredentialParams as bu, type UploadGoogleOAuthSellerCredentialParams as bv, type VerifySellerPaymentParams as bw, type IdentityAttestationActionType as bx, type IdentityAttestationOutput as by, type IdentityAttestationOutputFor as bz, type SellerCredentialUploadInput as c, ZERO_ADDRESS as c$, type RateManagerRateEntity as c0, type RateManagerDelegationEntity as c1, type ManagerAggregateStatsEntity as c2, type ManagerStatsEntity as c3, type ManagerDailySnapshotEntity as c4, type RateManagerListItem as c5, type RateManagerDetail as c6, type ManualRateUpdateEntity as c7, type OracleConfigUpdateEntity as c8, type DepositFundActivityEntity as c9, getRateManagerContracts as cA, getPaymentMethodsCatalog as cB, getGatingServiceAddress as cC, type RuntimeEnv as cD, parseDepositView as cE, parseIntentView as cF, enrichPvDepositView as cG, enrichPvIntentView as cH, type PV_DepositView as cI, type PV_Deposit as cJ, type PV_PaymentMethodData as cK, type PV_Currency as cL, type PV_ReferralFee as cM, type PV_IntentView as cN, type PV_Intent as cO, ZERO_RATE_MANAGER_ID as cP, isZeroRateManagerId as cQ, normalizeRateManagerId as cR, normalizeRegistry as cS, getDelegationRoute as cT, classifyDelegationState as cU, type DelegationRoute as cV, type DelegationState as cW, type DelegationDepositTarget as cX, type BatchResult as cY, type SendTransactionFn as cZ, type SendBatchFn as c_, type DepositDailySnapshotEntity as ca, type DepositFundActivityType as cb, type DepositFilter as cc, type PaginationOptions as cd, type DepositOrderField as ce, type OrderDirection$1 as cf, type RateManagerFilter as cg, type RateManagerPaginationOptions as ch, type RateManagerDelegationPaginationOptions as ci, type RateManagerOrderField as cj, type OrderDirection as ck, type DeploymentEnv as cl, type FulfillmentRecord as cm, type PaymentVerifiedRecord as cn, type FulfillmentAndPaymentResponse as co, PAYMENT_PLATFORMS as cp, type PaymentPlatformType as cq, Currency as cr, currencyInfo as cs, getCurrencyInfoFromHash as ct, getCurrencyInfoFromCountryCode as cu, getCurrencyCodeFromHash as cv, isSupportedCurrencyHash as cw, mapConversionRatesToOnchainMinRate as cx, type CurrencyData as cy, getContracts as cz, type SellerCredentialUploadPlatform as d, asErrorMessage as d0, assertDelegationMethodSupport as d1, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type CreateReferralCodeRequest as h, type ApiAdapterOptions as i, type CreateReferralCodeResponse as j, type ReferralReadRequest as k, type ReferralDashboardResponse as l, type ReferralEarningsResponse as m, type ReferralCodeLookupResponse as n, type RedeemReferralCodeRequest as o, type RedeemReferralCodeResponse as p, type UpdateReferralCodeRequest as q, type UpdateReferralCodeResponse as r, type GoogleOAuthSellerCredentialUploadBodyByPlatform as s, type BestByPlatformResponse as t, type ValidatePayeeDetailsResponse as u, type PostDepositDetailsResponse as v, type GetPayeeDetailsRequest as w, type GetPayeeDetailsResponse as x, type GetOwnerDepositsRequest as y, type GetOwnerDepositsResponse as z };