@zkp2p/sdk 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,157 +1,8 @@
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
- import { IdentityPlatform, IdentityActionTypeByPlatform, IdentityAttestationOutputFor as IdentityAttestationOutputFor$1, IdentityParamsByPlatform } from '@zkp2p/zkp2p-attestation';
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;
5
+ import { IdentityPlatform, IdentityAttestationOutputFor as IdentityAttestationOutputFor$1, IdentityActionTypeByPlatform, IdentityParamsByPlatform } from '@zkp2p/zkp2p-attestation';
155
6
 
156
7
  /**
157
8
  * Contract resolution utilities for the SDK.
@@ -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,19 +368,168 @@ 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[];
907
382
  };
908
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;
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;
532
+
909
533
  /**
910
534
  * A prepared transaction ready for submission.
911
535
  * Contains all data needed to submit via wallet or relayer.
@@ -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;
@@ -968,6 +593,7 @@ type AuthorizationTokenProvider = () => string | null | undefined | Promise<stri
968
593
  * @param params - Transaction callback parameters
969
594
  * @param params.hash - Transaction hash
970
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.
971
597
  */
972
598
  type ActionCallback = (params: {
973
599
  hash: Hash;
@@ -996,8 +622,14 @@ type ReferrerFeeConfig = {
996
622
  recipient: `0x${string}`;
997
623
  feeBps: number;
998
624
  };
625
+ type ReferralRedemption = {
626
+ code: string;
627
+ referrerWalletAddress: string;
628
+ redeemedAt: string;
629
+ };
999
630
  type ReferralDashboardResponse = {
1000
631
  code: string;
632
+ redemption: ReferralRedemption | null;
1001
633
  l1FeeBps: number;
1002
634
  l2FeeBps: number;
1003
635
  l1RefereeCount: number;
@@ -1016,19 +648,45 @@ type ReferralEarningsResponse = {
1016
648
  distributionCount: number;
1017
649
  lastEarnedAt: string | null;
1018
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
+ };
1019
674
  type RedeemReferralCodeRequest = {
1020
675
  code: string;
676
+ signature?: ReferralSignatureBody;
1021
677
  };
1022
678
  type RedeemReferralCodeResponse = {
1023
679
  redeemedAt: string;
1024
- referrerWalletAddress: string;
680
+ referrerWalletAddress: Address;
1025
681
  };
1026
682
  type UpdateReferralCodeRequest = {
1027
683
  code: string;
684
+ signature?: ReferralSignatureBody;
1028
685
  };
1029
686
  type UpdateReferralCodeResponse = {
1030
687
  code: string;
1031
688
  };
689
+ /** @deprecated any-typed; becomes Record<string, unknown> in 0.8. */
1032
690
  type CuratorMetadata = Record<string, any>;
1033
691
  type CuratorPayeeData = {
1034
692
  offchainId: string;
@@ -1039,9 +697,15 @@ type CuratorPayeeDataInput = {
1039
697
  offchainId: string;
1040
698
  telegramUsername?: string | null;
1041
699
  metadata?: CuratorMetadata | null;
700
+ /**
701
+ * Maker identity attestation for platforms that require verified payee
702
+ * registration, such as Wise. Forwarded as `metadata.identityAttestation`.
703
+ */
704
+ identityAttestation?: IdentityAttestationOutput | null;
1042
705
  };
1043
706
  /**
1044
707
  * Parameters for fulfilling an intent with payment attestation
708
+ * @deprecated Legacy shape from the pre-0.6 API; use FulfillIntentMethodParams. Will be removed in 0.8.
1045
709
  */
1046
710
  type FulfillIntentParams = {
1047
711
  /** Hash of the intent to fulfill */
@@ -1071,6 +735,7 @@ type FulfillIntentParams = {
1071
735
  };
1072
736
  /**
1073
737
  * Parameters for releasing funds back to the payer
738
+ * @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.releaseFundsToPayer`. Will be removed in 0.8.
1074
739
  */
1075
740
  type ReleaseFundsToPayerParams = {
1076
741
  /** Hash of the intent to release funds for */
@@ -1084,6 +749,7 @@ type ReleaseFundsToPayerParams = {
1084
749
  };
1085
750
  /**
1086
751
  * Parameters for signaling an intent to use a deposit
752
+ * @deprecated Legacy shape from the pre-0.6 API; use SignalIntentMethodParams. Will be removed in 0.8.
1087
753
  */
1088
754
  type SignalIntentParams = {
1089
755
  /** Payment processor name (e.g., 'wise', 'revolut') */
@@ -1190,14 +856,17 @@ type GoogleOAuthSellerCredentialUploadBodyByPlatform = {
1190
856
  venmo: VenmoGoogleOAuthSellerCredentialUploadBody;
1191
857
  };
1192
858
  type VenmoCredentialUploadInput = {
859
+ callerAddress?: string;
1193
860
  payeeId: string;
1194
861
  sessionMaterial: VenmoSessionMaterial;
1195
862
  };
1196
863
  type CashAppCredentialUploadInput = {
864
+ callerAddress?: string;
1197
865
  payeeId: string;
1198
866
  sessionMaterial: CashAppSessionMaterial;
1199
867
  };
1200
868
  type WiseCredentialUploadInput = {
869
+ callerAddress?: string;
1201
870
  sessionMaterial: WiseSessionMaterial;
1202
871
  };
1203
872
  type SellerCredentialUploadInputByPlatform = {
@@ -1237,6 +906,7 @@ type SellerProbeInput = SellerSignedCiphertextBundle;
1237
906
  type SellerCredentialBundle = SellerSignedCiphertextBundle & {
1238
907
  platform: SellerPlatform;
1239
908
  credentialType: string;
909
+ identityAttestation?: IdentityAttestationOutput;
1240
910
  };
1241
911
  type SellerCredentialBundleUpload = SellerCredentialBundle;
1242
912
  type SellerCredentialStatusValue = 'active' | 'inactive' | 'missing';
@@ -1694,6 +1364,7 @@ type CreateDepositConversionRate = {
1694
1364
  currency: CurrencyType;
1695
1365
  conversionRate: string;
1696
1366
  };
1367
+ /** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.createDeposit`. Will be removed in 0.8. */
1697
1368
  type CreateDepositParams = {
1698
1369
  token: Address;
1699
1370
  amount: bigint;
@@ -1715,20 +1386,24 @@ type CreateDepositParams = {
1715
1386
  onError?: (error: Error) => void;
1716
1387
  onMined?: ActionCallback;
1717
1388
  };
1389
+ /** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.withdrawDeposit`. Will be removed in 0.8. */
1718
1390
  type WithdrawDepositParams = {
1719
1391
  depositId: string | number | bigint;
1720
1392
  onSuccess?: ActionCallback;
1721
1393
  onError?: (error: Error) => void;
1722
1394
  onMined?: ActionCallback;
1723
1395
  };
1396
+ /** @deprecated Legacy shape from the pre-0.6 API; use CancelIntentMethodParams. Will be removed in 0.8. */
1724
1397
  type CancelIntentParams = {
1725
1398
  intentHash: Hash;
1726
1399
  onSuccess?: ActionCallback;
1727
1400
  onError?: (error: Error) => void;
1728
1401
  onMined?: ActionCallback;
1729
1402
  };
1730
- type DepositStatus = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
1403
+ type DepositStatus$1 = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
1404
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1731
1405
  type ApiIntentStatus = 'SIGNALED' | 'FULFILLED' | 'PRUNED' | 'MANUALLY_RELEASED';
1406
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1732
1407
  type Intent = {
1733
1408
  id: number;
1734
1409
  intentHash: string;
@@ -1751,6 +1426,7 @@ type Intent = {
1751
1426
  createdAt: Date;
1752
1427
  updatedAt: Date;
1753
1428
  };
1429
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1754
1430
  type GetOwnerIntentsRequest = {
1755
1431
  ownerAddress: string;
1756
1432
  escrowAddress: string;
@@ -1758,12 +1434,14 @@ type GetOwnerIntentsRequest = {
1758
1434
  orchestratorAddresses?: string[];
1759
1435
  status?: ApiIntentStatus | ApiIntentStatus[];
1760
1436
  };
1437
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1761
1438
  type GetOwnerIntentsResponse = {
1762
1439
  success: boolean;
1763
1440
  message: string;
1764
1441
  responseObject: Intent[];
1765
1442
  statusCode: number;
1766
1443
  };
1444
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1767
1445
  type GetIntentsByDepositRequest = {
1768
1446
  depositId: string;
1769
1447
  escrowAddress: string;
@@ -1771,18 +1449,21 @@ type GetIntentsByDepositRequest = {
1771
1449
  orchestratorAddresses?: string[];
1772
1450
  status?: ApiIntentStatus | ApiIntentStatus[];
1773
1451
  };
1452
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1774
1453
  type GetIntentsByDepositResponse = {
1775
1454
  success: boolean;
1776
1455
  message: string;
1777
1456
  responseObject: Intent[];
1778
1457
  statusCode: number;
1779
1458
  };
1459
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1780
1460
  type GetIntentByHashRequest = {
1781
1461
  intentHash: string;
1782
1462
  escrowAddress?: string;
1783
1463
  escrowAddresses?: string[];
1784
1464
  orchestratorAddresses?: string[];
1785
1465
  };
1466
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1786
1467
  type GetIntentByHashResponse = {
1787
1468
  success: boolean;
1788
1469
  message: string;
@@ -1843,7 +1524,7 @@ type GetOwnerDepositsRequest = {
1843
1524
  escrowAddress: string;
1844
1525
  escrowAddresses?: string[];
1845
1526
  /** Optional status filter: 'ACTIVE' | 'WITHDRAWN' | 'CLOSED' */
1846
- status?: DepositStatus;
1527
+ status?: DepositStatus$1;
1847
1528
  };
1848
1529
  type GetOwnerDepositsResponse = {
1849
1530
  success: boolean;
@@ -1851,17 +1532,20 @@ type GetOwnerDepositsResponse = {
1851
1532
  responseObject: ApiDeposit[];
1852
1533
  statusCode: number;
1853
1534
  };
1535
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1854
1536
  type GetDepositByIdRequest = {
1855
1537
  depositId: string;
1856
1538
  escrowAddress: string;
1857
1539
  escrowAddresses?: string[];
1858
1540
  };
1541
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1859
1542
  type GetDepositByIdResponse = {
1860
1543
  success: boolean;
1861
1544
  message: string;
1862
1545
  responseObject: ApiDeposit;
1863
1546
  statusCode: number;
1864
1547
  };
1548
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1865
1549
  type OrderStats = {
1866
1550
  id: number;
1867
1551
  totalIntents: number;
@@ -1869,6 +1553,7 @@ type OrderStats = {
1869
1553
  fulfilledIntents: number;
1870
1554
  prunedIntents: number;
1871
1555
  };
1556
+ /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1872
1557
  type DepositIntentStatistics = OrderStats;
1873
1558
  type TakerTierStats = {
1874
1559
  lifetimeSignaledCount: number;
@@ -1883,7 +1568,7 @@ type TakerTierStats = {
1883
1568
  lastIntentAt: string;
1884
1569
  updatedAt: string;
1885
1570
  };
1886
- type TakerTierLevel = 'PEASANT' | 'PEER' | 'PLUS' | 'PRO' | 'PLATINUM' | 'PEER_PRESIDENT';
1571
+ type TakerTierLevel = 'PEASANT' | 'PEER' | 'PLUS' | 'PRO' | 'PLATINUM';
1887
1572
  type PlatformRiskLevel = 'LOW' | 'MEDIUM_HIGH' | 'HIGH' | 'HIGHEST';
1888
1573
  type PlatformLimit = {
1889
1574
  paymentMethodHash: string;
@@ -1916,115 +1601,527 @@ type TakerTierVolumeBreakdown = {
1916
1601
  weightedVolumeDisplay: string;
1917
1602
  };
1918
1603
  /** How the curator resolved the taker tier (see curator tier engine). */
1919
- type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist' | 'peer_president';
1604
+ type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist';
1920
1605
  type TakerTier = {
1921
1606
  owner: string;
1922
1607
  chainId: number;
1923
- tier: TakerTierLevel;
1924
- /** Legacy base cap. Current curator responses expose enforced caps in platformLimits. */
1925
- perIntentCapBaseUnits?: string;
1926
- /** Legacy formatted base cap. */
1927
- perIntentCapDisplay?: string;
1928
- lastUpdated: string;
1929
- source: TakerTierSource;
1930
- stats: TakerTierStats | null;
1931
- cooldownHours: number;
1932
- cooldownSeconds: number;
1933
- cooldownActive: boolean;
1934
- cooldownRemainingSeconds: number;
1935
- nextIntentAvailableAt: string | null;
1608
+ tier: TakerTierLevel;
1609
+ /** Legacy base cap. Current curator responses expose enforced caps in platformLimits. */
1610
+ perIntentCapBaseUnits?: string;
1611
+ /** Legacy formatted base cap. */
1612
+ perIntentCapDisplay?: string;
1613
+ lastUpdated: string;
1614
+ source: TakerTierSource;
1615
+ stats: TakerTierStats | null;
1616
+ cooldownHours: number;
1617
+ cooldownSeconds: number;
1618
+ cooldownActive: boolean;
1619
+ cooldownRemainingSeconds: number;
1620
+ nextIntentAvailableAt: string | null;
1621
+ /**
1622
+ * Server-authoritative platform cap grid. Use this for enforced caps; do not
1623
+ * derive platform caps from top-level tier caps or risk multipliers.
1624
+ */
1625
+ platformLimits?: PlatformLimit[];
1626
+ /**
1627
+ * Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
1628
+ * optional because the current production deployment still serves the older
1629
+ * payload that omits them — read them when present and fall back gracefully.
1630
+ * Amounts are USDC base-unit strings (6 decimals).
1631
+ */
1632
+ /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1633
+ maxOrderSize?: string;
1634
+ maxOrderSizeDisplay?: string;
1635
+ /** Peer Pay volume floor that qualifies the current tier. */
1636
+ minVolumeForTier?: string;
1637
+ minVolumeForTierDisplay?: string;
1638
+ /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1639
+ nextTier?: TakerTierLevel | null;
1640
+ /** Remaining Peer Pay volume to reach `nextTier`. */
1641
+ volumeToNextTier?: string | null;
1642
+ volumeToNextTierDisplay?: string | null;
1643
+ nextTierMaxOrderSize?: string | null;
1644
+ nextTierMaxOrderSizeDisplay?: string | null;
1645
+ /**
1646
+ * Compatibility name retained by curator. Current semantics preserve
1647
+ * historical maker tiers through July 1, 2026 UTC, then add forward Peer Pay
1648
+ * volume only. Present on deployments with the PR #461/#463 progression
1649
+ * contract.
1650
+ */
1651
+ peerPayVolume?: string;
1652
+ /** Auditable tier progression inputs. Current curator may return a synthetic Peer Pay row. */
1653
+ volumeBreakdown?: TakerTierVolumeBreakdown[];
1654
+ };
1655
+ type GetTakerTierRequest = {
1656
+ owner: string;
1657
+ chainId: number;
1658
+ };
1659
+ type GetTakerTierResponse = {
1660
+ success: boolean;
1661
+ message: string;
1662
+ responseObject: TakerTier;
1663
+ statusCode?: number;
1664
+ };
1665
+ type GetDepositBundleParams = DepositBundleRequest;
1666
+ type GetDepositBundleResponse = DepositBundleResponse;
1667
+ type GetOrderbookParams = {
1668
+ currency: string;
1669
+ paymentPlatform?: string;
1670
+ publicOnly?: boolean;
1671
+ sortBy?: 'price' | 'available' | 'limits';
1672
+ sortDirection?: 'asc' | 'desc';
1673
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1674
+ limit?: number;
1675
+ chainId?: number;
1676
+ token?: string;
1677
+ };
1678
+ type OrderbookEntry = {
1679
+ depositIdOnContract?: string;
1680
+ depositId: string;
1681
+ depositor: string;
1682
+ price: string;
1683
+ availableTokenAmount: string;
1684
+ availableFiatAmount: string;
1685
+ intentAmountMin: string;
1686
+ intentAmountMax: string;
1687
+ paymentPlatform: string;
1688
+ currency: string;
1689
+ paymentMethodHash: string;
1690
+ payeeDetailsHash: string;
1691
+ sellerAutomatedReleaseAvailable?: boolean;
1692
+ escrowAddress: string;
1693
+ chainId: number;
1694
+ offchainId?: string;
1695
+ telegramUsername?: string;
1696
+ };
1697
+ type GetOrderbookResponse = {
1698
+ chainId: number;
1699
+ token: string;
1700
+ currency: string;
1701
+ paymentPlatform: string | null;
1702
+ sortBy: string;
1703
+ sortDirection: string;
1704
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1705
+ internalDetailsIncluded: boolean;
1706
+ generatedAt: string;
1707
+ entries: OrderbookEntry[];
1708
+ };
1709
+
1710
+ declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
1711
+ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1712
+
1713
+ type ReferralReadOptions$1 = {
1714
+ baseApiUrl?: string;
1715
+ timeoutMs?: number;
1716
+ /** Public wallet-address read target. Omit to use bearer-authenticated caller mode. */
1717
+ address?: Address;
1718
+ authorizationToken?: string;
1719
+ getAuthorizationToken?: IndexerAuthTokenProvider;
1720
+ };
1721
+ type ReferralBearerWriteOptions$1 = {
1722
+ baseApiUrl?: string;
1723
+ timeoutMs?: number;
1724
+ authorizationToken?: string;
1725
+ getAuthorizationToken?: IndexerAuthTokenProvider;
1726
+ };
1727
+ type ReferralSignatureOptions$1 = {
1728
+ baseApiUrl?: string;
1729
+ timeoutMs?: number;
1730
+ /** Defaults to base_production for production/preproduction, base_staging for staging. */
1731
+ audience?: string;
1732
+ /** Unix timestamp in seconds. Defaults to now. */
1733
+ issuedAt?: number;
1734
+ };
1735
+ type RedeemReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
1736
+ /** Expected owner wallet for the code. If omitted, the SDK looks it up before signing. */
1737
+ referrerWalletAddress?: Address;
1738
+ };
1739
+ type UpdateReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
1740
+ /** Current code, signed to prevent stale rename replay. */
1741
+ oldCode: string;
1742
+ };
1743
+
1744
+ type PV_ReferralFee = {
1745
+ recipient: `0x${string}`;
1746
+ fee: bigint;
1747
+ };
1748
+ type PV_Deposit = {
1749
+ depositor: string;
1750
+ delegate: string;
1751
+ token: string;
1752
+ amount: bigint;
1753
+ intentAmountRange: {
1754
+ min: bigint;
1755
+ max: bigint;
1756
+ };
1757
+ acceptingIntents: boolean;
1758
+ remainingDeposits: bigint;
1759
+ outstandingIntentAmount: bigint;
1760
+ makerProtocolFee: bigint;
1761
+ reservedMakerFees: bigint;
1762
+ accruedMakerFees: bigint;
1763
+ accruedReferrerFees: bigint;
1764
+ intentGuardian: string;
1765
+ retainOnEmpty: boolean;
1766
+ referrer: string;
1767
+ referrerFee: bigint;
1768
+ };
1769
+ type PV_Currency = {
1770
+ code: string;
1771
+ minConversionRate: bigint;
1772
+ };
1773
+ type PV_PaymentMethodData = {
1774
+ paymentMethod: string;
1775
+ verificationData: {
1776
+ intentGatingService: string;
1777
+ payeeDetails: string;
1778
+ data: string;
1779
+ };
1780
+ currencies: PV_Currency[];
1781
+ };
1782
+ type PV_DepositView = {
1783
+ depositId: bigint;
1784
+ deposit: PV_Deposit;
1785
+ availableLiquidity: bigint;
1786
+ paymentMethods: PV_PaymentMethodData[];
1787
+ intentHashes: string[];
1788
+ };
1789
+ type PV_Intent = {
1790
+ owner: string;
1791
+ to: string;
1792
+ escrow: string;
1793
+ depositId: bigint;
1794
+ amount: bigint;
1795
+ timestamp: bigint;
1796
+ paymentMethod: string;
1797
+ fiatCurrency: string;
1798
+ conversionRate: bigint;
1799
+ referralFees: PV_ReferralFee[];
1800
+ postIntentHook: string;
1801
+ data: string;
1802
+ };
1803
+ type PV_IntentView = {
1804
+ intentHash: string;
1805
+ intent: PV_Intent;
1806
+ deposit: Omit<PV_DepositView, 'intentHashes'>;
1807
+ };
1808
+ declare function parseDepositView(raw: any): PV_DepositView;
1809
+ declare function parseIntentView(raw: any): PV_IntentView;
1810
+
1811
+ declare function enrichPvDepositView(view: PV_DepositView, chainId: number, env?: RuntimeEnv): {
1812
+ paymentMethods: {
1813
+ processorName: string | undefined;
1814
+ currencies: {
1815
+ currencyInfo: CurrencyData | undefined;
1816
+ code: string;
1817
+ minConversionRate: bigint;
1818
+ }[];
1819
+ paymentMethod: string;
1820
+ verificationData: {
1821
+ intentGatingService: string;
1822
+ payeeDetails: string;
1823
+ data: string;
1824
+ };
1825
+ }[];
1826
+ depositId: bigint;
1827
+ deposit: PV_Deposit;
1828
+ availableLiquidity: bigint;
1829
+ intentHashes: string[];
1830
+ };
1831
+ declare function enrichPvIntentView(view: PV_IntentView, chainId: number, env?: RuntimeEnv): any;
1832
+
1833
+ /**
1834
+ * Indexer entity types sourced from @zkp2p/indexer-schema.
1835
+ */
1836
+
1837
+ type WithOverrides<TBase, TOverrides> = Omit<TBase, keyof TOverrides> & TOverrides;
1838
+ type DepositStatus = `${DepositStatus$2}`;
1839
+ type IntentStatus = `${IntentStatus$1}`;
1840
+ type DepositEntity = WithOverrides<Deposit, {
1841
+ status: DepositStatus;
1842
+ retainOnEmpty?: boolean;
1843
+ whitelistHookAddress?: string | null;
1844
+ }>;
1845
+ type DepositPaymentMethodEntity = DepositPaymentMethod;
1846
+ type MethodCurrencyEntity = MethodCurrency;
1847
+ type IntentEntity = WithOverrides<Intent$1, {
1848
+ status: IntentStatus;
1849
+ }>;
1850
+ interface DepositWithRelations extends DepositEntity {
1851
+ paymentMethods?: DepositPaymentMethodEntity[];
1852
+ currencies?: MethodCurrencyEntity[];
1853
+ intents?: IntentEntity[];
1854
+ }
1855
+ type DepositFundActivityType = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
1856
+ /**
1857
+ * Chronological fund-movement log for a deposit.
1858
+ * One row per on-chain fund event (deposit, add, withdraw, close).
1859
+ */
1860
+ type DepositFundActivityEntity = WithOverrides<DepositFundActivity, {
1861
+ activityType: DepositFundActivityType;
1862
+ }>;
1863
+ /**
1864
+ * Per-deposit daily rollup snapshot.
1865
+ * One row per deposit per day (UTC-aligned, 86400s buckets).
1866
+ */
1867
+ type DepositDailySnapshotEntity = DepositDailySnapshot;
1868
+ interface DepositEventEntity {
1869
+ id: string;
1870
+ depositId: string;
1871
+ depositor: string;
1872
+ amount: string;
1873
+ }
1874
+ interface DepositEventsResponse {
1875
+ deposits: DepositEventEntity[];
1876
+ fundsAdded: DepositEventEntity[];
1877
+ withdrawals: DepositEventEntity[];
1878
+ }
1879
+ interface IntentFulfilledEntity {
1880
+ intentHash: string;
1881
+ amount: string;
1882
+ isManualRelease: boolean;
1883
+ fundsTransferredTo?: string | null;
1884
+ }
1885
+ interface IntentFulfillmentAmountsEntity {
1886
+ intentHash: string;
1887
+ releasedAmount?: string | null;
1888
+ takerAmountNetFees?: string | null;
1889
+ }
1890
+ type RateManagerEntity = RateManager;
1891
+ type RateManagerRateEntity = RateManagerRate;
1892
+ interface RateManagerDelegationEntity {
1893
+ id: string;
1894
+ chainId: number;
1895
+ rateManagerId: string;
1896
+ rateManagerAddress?: string | null;
1897
+ depositId: string;
1898
+ delegatedAt?: string | null;
1899
+ createdAt: string;
1900
+ updatedAt: string;
1901
+ }
1902
+ type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
1903
+ rateManagerAddress?: string | null;
1904
+ }>;
1905
+ type ManagerStatsEntity = ManagerStats;
1906
+ type ManagerDailySnapshotEntity = ManagerDailySnapshot;
1907
+ type MakerProfitSnapshotEntity = MakerProfitSnapshot;
1908
+ interface ManualRateUpdateEntity {
1909
+ id: string;
1910
+ rateManagerId: string;
1911
+ paymentMethod: string;
1912
+ /** Canonical V2.2 field. */
1913
+ currencyCode?: string;
1914
+ currency: string;
1915
+ /** Canonical V2.2 field. */
1916
+ rate?: string;
1917
+ minRate: string;
1918
+ }
1919
+ interface OracleConfigUpdateEntity {
1920
+ id: string;
1921
+ rateManagerId: string;
1922
+ escrow?: string;
1923
+ depositIdOnContract?: string;
1924
+ paymentMethod: string;
1925
+ /** Canonical V2.2 field. */
1926
+ currencyCode?: string;
1927
+ currency: string;
1928
+ /** Canonical V2.2 floor field. */
1929
+ floorFixed?: string;
1930
+ /** Canonical V2.2 floor field. */
1931
+ floorSpreadBps?: number;
1932
+ /** Canonical V2.2 floor field. */
1933
+ oracleAdapter?: string;
1934
+ adapter?: string;
1935
+ spreadBps?: number;
1936
+ maxStaleness?: string;
1937
+ adapterConfig?: string;
1938
+ enabled?: boolean;
1939
+ }
1940
+ interface RateManagerListItem {
1941
+ manager: RateManagerEntity;
1942
+ aggregate?: ManagerAggregateStatsEntity | null;
1943
+ }
1944
+ interface RateManagerDetail {
1945
+ manager: RateManagerEntity;
1946
+ rates: RateManagerRateEntity[];
1947
+ aggregate?: ManagerAggregateStatsEntity | null;
1948
+ recentStats: ManagerStatsEntity[];
1949
+ delegations: RateManagerDelegationEntity[];
1950
+ }
1951
+
1952
+ type DepositOrderField = 'remainingDeposits' | 'outstandingIntentAmount' | 'totalAmountTaken' | 'totalWithdrawn' | 'updatedAt' | 'timestamp';
1953
+ type OrderDirection$1 = 'asc' | 'desc';
1954
+ type DepositFilter = Partial<{
1955
+ status: 'ACTIVE' | 'CLOSED';
1956
+ depositor: string;
1957
+ delegate: string;
1958
+ /** True to only include deposits with a non-zero delegate, false for zero delegate. */
1959
+ delegateIsSet: boolean;
1960
+ chainId: number;
1961
+ escrowAddress: string;
1962
+ escrowAddresses: string[];
1963
+ minLiquidity: string;
1964
+ acceptingIntents: boolean;
1965
+ }>;
1966
+ type PaginationOptions = Partial<{
1967
+ limit: number;
1968
+ offset: number;
1969
+ orderBy: DepositOrderField;
1970
+ orderDirection: OrderDirection$1;
1971
+ }>;
1972
+ declare class IndexerDepositService {
1973
+ private client;
1974
+ constructor(client: IndexerClient);
1975
+ private queryWithLegacyFallback;
1976
+ private buildDepositWhere;
1977
+ private buildOrderBy;
1978
+ private fetchRelations;
1979
+ private fetchIntents;
1980
+ private attachRelations;
1981
+ fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity[]>;
1982
+ fetchDepositsWithRelations(filter?: DepositFilter, pagination?: PaginationOptions, options?: {
1983
+ includeIntents?: boolean;
1984
+ intentStatuses?: IntentStatus[];
1985
+ }): Promise<DepositWithRelations[]>;
1986
+ fetchDepositsByIds(ids: string[]): Promise<DepositEntity[]>;
1987
+ fetchDepositsByIdsWithRelations(ids: string[], options?: {
1988
+ includeIntents?: boolean;
1989
+ intentStatuses?: IntentStatus[];
1990
+ }): Promise<DepositWithRelations[]>;
1991
+ fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1992
+ fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1993
+ fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
1994
+ fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
1995
+ fetchDepositWithRelations(id: string, options?: {
1996
+ includeIntents?: boolean;
1997
+ intentStatuses?: IntentStatus[];
1998
+ }): Promise<DepositWithRelations | null>;
1999
+ fetchExpiredIntents(params: {
2000
+ now: bigint | string;
2001
+ depositIds: string[];
2002
+ limit?: number;
2003
+ }): Promise<IntentEntity[]>;
2004
+ fetchFulfilledIntentEvents(intentHashes: string[]): Promise<IntentFulfilledEntity[]>;
2005
+ fetchIntentFulfillmentAmounts(intentHash: string): Promise<IntentFulfillmentAmountsEntity | null>;
2006
+ resolvePayeeHash(params: {
2007
+ escrowAddress?: string | null;
2008
+ depositId?: string | number | bigint | null;
2009
+ paymentMethodHash?: string | null;
2010
+ }): Promise<string | null>;
2011
+ fetchDepositEvents(depositIdOnContract: string, options?: {
2012
+ escrowAddress?: string | null;
2013
+ depositor?: string | null;
2014
+ }): Promise<DepositEventsResponse>;
2015
+ fetchDepositsByPayeeHash(payeeHash: string, options?: {
2016
+ paymentMethodHash?: string;
2017
+ limit?: number;
2018
+ includeIntents?: boolean;
2019
+ intentStatuses?: IntentStatus[];
2020
+ }): Promise<DepositWithRelations[]>;
1936
2021
  /**
1937
- * Server-authoritative platform cap grid. Use this for enforced caps; do not
1938
- * derive platform caps from top-level tier caps or risk multipliers.
2022
+ * Fetch chronological fund activities for a deposit.
1939
2023
  */
1940
- platformLimits?: PlatformLimit[];
2024
+ fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity[]>;
1941
2025
  /**
1942
- * Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
1943
- * optional because the current production deployment still serves the older
1944
- * payload that omits them — read them when present and fall back gracefully.
1945
- * Amounts are USDC base-unit strings (6 decimals).
2026
+ * Fetch fund activities across all deposits for a maker address.
1946
2027
  */
1947
- /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1948
- maxOrderSize?: string;
1949
- maxOrderSizeDisplay?: string;
1950
- /** Peer Pay volume floor that qualifies the current tier. */
1951
- minVolumeForTier?: string;
1952
- minVolumeForTierDisplay?: string;
1953
- /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1954
- nextTier?: TakerTierLevel | null;
1955
- /** Remaining Peer Pay volume to reach `nextTier`. */
1956
- volumeToNextTier?: string | null;
1957
- volumeToNextTierDisplay?: string | null;
1958
- nextTierMaxOrderSize?: string | null;
1959
- nextTierMaxOrderSizeDisplay?: string | null;
2028
+ fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity[]>;
1960
2029
  /**
1961
- * Compatibility name retained by curator. Current semantics preserve
1962
- * historical maker tiers through July 1, 2026 UTC, then add forward Peer Pay
1963
- * volume only. Present on deployments with the PR #461/#463 progression
1964
- * contract.
2030
+ * Fetch daily snapshots for a deposit, ordered by day ascending.
1965
2031
  */
1966
- peerPayVolume?: string;
1967
- /** Auditable tier progression inputs. Current curator may return a synthetic Peer Pay row. */
1968
- volumeBreakdown?: TakerTierVolumeBreakdown[];
1969
- };
1970
- type GetTakerTierRequest = {
1971
- owner: string;
1972
- chainId: number;
1973
- };
1974
- type GetTakerTierResponse = {
1975
- success: boolean;
1976
- message: string;
1977
- responseObject: TakerTier;
1978
- statusCode?: number;
1979
- };
1980
- type GetDepositBundleParams = DepositBundleRequest;
1981
- type GetDepositBundleResponse = DepositBundleResponse;
1982
- type GetOrderbookParams = {
1983
- currency: string;
1984
- paymentPlatform?: string;
1985
- publicOnly?: boolean;
1986
- sortBy?: 'price' | 'available' | 'limits';
1987
- sortDirection?: 'asc' | 'desc';
1988
- sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1989
- limit?: number;
1990
- chainId?: number;
1991
- token?: string;
2032
+ fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
2033
+ fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
2034
+ }
2035
+
2036
+ type OrderDirection = 'asc' | 'desc';
2037
+ type RateManagerOrderField = 'createdAt' | 'updatedAt' | 'fee' | 'maxFee' | 'rateManagerId' | 'currentDelegatedBalance' | 'totalFilledVolume';
2038
+ type RateManagerFilter = Partial<{
2039
+ manager: string;
2040
+ name: string;
2041
+ hasHook: boolean;
2042
+ maxFee: string;
2043
+ rateManagerIds: string[];
2044
+ }>;
2045
+ type RateManagerPaginationOptions = Partial<{
2046
+ limit: number;
2047
+ offset: number;
2048
+ orderBy: RateManagerOrderField;
2049
+ orderDirection: OrderDirection;
2050
+ }>;
2051
+ type RateManagerDelegationPaginationOptions = Partial<{
2052
+ limit: number;
2053
+ offset: number;
2054
+ orderBy: 'createdAt' | 'updatedAt' | 'depositId' | 'delegatedAt';
2055
+ orderDirection: OrderDirection;
2056
+ rateManagerAddress: string;
2057
+ }>;
2058
+ declare function compareEventCursorIdsByRecency(leftId?: string | null, rightId?: string | null): number;
2059
+ declare class IndexerRateManagerService {
2060
+ private client;
2061
+ constructor(client: IndexerClient);
2062
+ private buildRateManagerScopeWhere;
2063
+ private buildWhere;
2064
+ private buildAggregateWhere;
2065
+ private buildLegacyAggregateWhere;
2066
+ private buildOrderBy;
2067
+ private toRateManagerListItems;
2068
+ private applyHookFilter;
2069
+ private queryRateManagerList;
2070
+ private buildDelegationOrderBy;
2071
+ private buildLegacyDelegationOrderBy;
2072
+ private fetchCurrentRateManagerDepositScopes;
2073
+ private fetchHistoricalRateManagerDepositScopes;
2074
+ fetchRateManagers(pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter): Promise<RateManagerListItem[]>;
2075
+ fetchRateManagerDetail(rateManagerId: string, options?: {
2076
+ statsLimit?: number;
2077
+ rateManagerAddress?: string | null;
2078
+ }): Promise<RateManagerDetail | null>;
2079
+ fetchRateManagerDelegations(rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions): Promise<RateManagerDelegationEntity[]>;
2080
+ fetchManagerDailySnapshots(rateManagerId: string, options?: {
2081
+ limit?: number;
2082
+ rateManagerAddress?: string | null;
2083
+ }): Promise<ManagerDailySnapshotEntity[]>;
2084
+ fetchDelegationForDeposit(depositId: string, options?: {
2085
+ escrowAddress?: string | null;
2086
+ }): Promise<RateManagerDelegationEntity | null>;
2087
+ fetchManualRateUpdates(rateManagerId: string, options?: {
2088
+ limit?: number;
2089
+ rateManagerAddress?: string | null;
2090
+ }): Promise<ManualRateUpdateEntity[]>;
2091
+ fetchOracleConfigUpdates(rateManagerId: string, options?: {
2092
+ limit?: number;
2093
+ rateManagerAddress?: string | null;
2094
+ }): Promise<OracleConfigUpdateEntity[]>;
2095
+ }
2096
+
2097
+ type FulfillmentRecord = {
2098
+ id: string;
2099
+ intentHash: string;
2100
+ amount: string;
2101
+ isManualRelease: boolean;
2102
+ fundsTransferredTo: string | null;
1992
2103
  };
1993
- type OrderbookEntry = {
1994
- depositIdOnContract?: string;
1995
- depositId: string;
1996
- depositor: string;
1997
- price: string;
1998
- availableTokenAmount: string;
1999
- availableFiatAmount: string;
2000
- intentAmountMin: string;
2001
- intentAmountMax: string;
2002
- paymentPlatform: string;
2104
+ type PaymentVerifiedRecord = {
2105
+ id: string;
2106
+ intentHash: string;
2107
+ method: string;
2003
2108
  currency: string;
2004
- paymentMethodHash: string;
2005
- payeeDetailsHash: string;
2006
- sellerAutomatedReleaseAvailable?: boolean;
2007
- escrowAddress: string;
2008
- chainId: number;
2009
- offchainId?: string;
2010
- telegramUsername?: string;
2109
+ amount: string;
2110
+ timestamp: string;
2111
+ paymentId: string | null;
2112
+ payeeId: string | null;
2011
2113
  };
2012
- type GetOrderbookResponse = {
2013
- chainId: number;
2014
- token: string;
2015
- currency: string;
2016
- paymentPlatform: string | null;
2017
- sortBy: string;
2018
- sortDirection: string;
2019
- sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
2020
- internalDetailsIncluded: boolean;
2021
- generatedAt: string;
2022
- entries: OrderbookEntry[];
2114
+ type FulfillmentAndPaymentResponse = {
2115
+ Orchestrator_V21_IntentFulfilled: FulfillmentRecord[];
2116
+ UnifiedVerifier_V21_PaymentVerified: PaymentVerifiedRecord[];
2023
2117
  };
2118
+ declare function fetchFulfillmentAndPayment(client: IndexerClient, intentHash: string): Promise<FulfillmentAndPaymentResponse>;
2024
2119
 
2025
- declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
2026
- type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
2027
-
2120
+ type RedeemReferralCodeSignatureOptions = RedeemReferralCodeSignatureOptions$1;
2121
+ type ReferralBearerWriteOptions = ReferralBearerWriteOptions$1;
2122
+ type ReferralReadOptions = ReferralReadOptions$1;
2123
+ type ReferralSignatureOptions = ReferralSignatureOptions$1;
2124
+ type UpdateReferralCodeSignatureOptions = UpdateReferralCodeSignatureOptions$1;
2028
2125
  /**
2029
2126
  * Configuration options for creating a Zkp2pClient instance.
2030
2127
  *
@@ -2046,6 +2143,8 @@ type Zkp2pNextOptions = {
2046
2143
  chainId: number;
2047
2144
  /** Optional RPC URL override (defaults to wallet's chain RPC) */
2048
2145
  rpcUrl?: string;
2146
+ /** Optional viem transport override for RPC reads */
2147
+ rpcTransport?: Transport;
2049
2148
  /** Runtime environment: 'production', 'preproduction', or 'staging' (defaults to 'production') */
2050
2149
  runtimeEnv?: RuntimeEnv;
2051
2150
  /** Optional indexer URL override */
@@ -2176,11 +2275,7 @@ type CurrencyOracleRateConfig = {
2176
2275
  maxStaleness: number;
2177
2276
  };
2178
2277
  /** On-chain currency tuple shape passed to EscrowV2 contract methods. */
2179
- type OnchainCurrencyEntry = {
2180
- code: `0x${string}`;
2181
- minConversionRate: bigint;
2182
- oracleRateConfig?: CurrencyOracleRateConfig;
2183
- };
2278
+ type OnchainCurrencyEntry = OnchainCurrency;
2184
2279
  /**
2185
2280
  * SDK client for ZKP2P liquidity providers (offramp peers).
2186
2281
  *
@@ -2227,7 +2322,7 @@ type OnchainCurrencyEntry = {
2227
2322
  * transport: http(),
2228
2323
  * });
2229
2324
  *
2230
- * const client = new OfframpClient({
2325
+ * const client = new Zkp2pClient({
2231
2326
  * walletClient,
2232
2327
  * chainId: base.id,
2233
2328
  * });
@@ -2263,7 +2358,7 @@ declare class Zkp2pClient {
2263
2358
  readonly publicClient: PublicClient;
2264
2359
  /** The chain ID this client is configured for */
2265
2360
  readonly chainId: number;
2266
- /** Runtime environment ('production' or 'staging') */
2361
+ /** Runtime environment ('production', 'preproduction', or 'staging') */
2267
2362
  readonly runtimeEnv: RuntimeEnv;
2268
2363
  /** Escrow contract address */
2269
2364
  readonly escrowAddress: Address;
@@ -2327,6 +2422,7 @@ declare class Zkp2pClient {
2327
2422
  private readonly _pvReader;
2328
2423
  private readonly _vaultOps;
2329
2424
  private readonly _intentOps;
2425
+ private readonly _referralOps;
2330
2426
  private _rateManagerInitError?;
2331
2427
  /**
2332
2428
  * Creates a new Zkp2pClient instance.
@@ -2342,8 +2438,6 @@ declare class Zkp2pClient {
2342
2438
  private stripTrailingSlash;
2343
2439
  private defaultAttestationServiceForBaseApiUrl;
2344
2440
  private resolveAuthorizationToken;
2345
- private normalizeOracleRateConfig;
2346
- private escrowCurrencyHasOracleConfig;
2347
2441
  /**
2348
2442
  * Normalizes currency tuples by appending an empty `oracleRateConfig` when the ABI
2349
2443
  * requires it and the caller hasn't provided one.
@@ -2352,11 +2446,7 @@ declare class Zkp2pClient {
2352
2446
  supportsInlineOracleRateConfig(params?: {
2353
2447
  escrowAddress?: Address;
2354
2448
  }): boolean;
2355
- private parseManagerFeeFromRead;
2356
- private getAbiFunction;
2357
2449
  private resolveAbiFunctionName;
2358
- private abiTupleHasComponent;
2359
- private abiFunctionHasInput;
2360
2450
  private resolveEscrowAddressOrThrow;
2361
2451
  private prepareCreateRateManagerTransaction;
2362
2452
  private prepareSetVaultRateTransaction;
@@ -2377,6 +2467,12 @@ declare class Zkp2pClient {
2377
2467
  private lookupIntentEscrowOnchain;
2378
2468
  private warnOrchestratorFallback;
2379
2469
  private resolveOrchestratorContext;
2470
+ /**
2471
+ * Spread helper for viem requests.
2472
+ * justified: TxOverrides mixes legacy gasPrice with EIP-1559 fee fields, which
2473
+ * viem's discriminated request unions reject; keep the suppression in one place.
2474
+ */
2475
+ private applyTxOverrides;
2380
2476
  /**
2381
2477
  * Simulate a contract call (validation only) and send with ERC-8021 attribution.
2382
2478
  * Referrer codes are stripped from overrides for simulation and appended to calldata.
@@ -2518,7 +2614,7 @@ declare class Zkp2pClient {
2518
2614
  * Fetches deposits from the indexer with optional filtering and pagination.
2519
2615
  * Use for advanced queries across all deposits, not just by owner.
2520
2616
  */
2521
- getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity$1[]>;
2617
+ getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity[]>;
2522
2618
  /**
2523
2619
  * Fetches deposits with their related payment methods and optionally intents.
2524
2620
  */
@@ -2537,19 +2633,19 @@ declare class Zkp2pClient {
2537
2633
  /**
2538
2634
  * Fetches intents for multiple deposits.
2539
2635
  */
2540
- getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2636
+ getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2541
2637
  /**
2542
2638
  * Fetches all intents created by a specific owner address.
2543
2639
  */
2544
- getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2640
+ getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2545
2641
  /**
2546
2642
  * Fetches fulfilled intents for a vault by rate manager ID.
2547
2643
  */
2548
- getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity$1[]>;
2644
+ getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
2549
2645
  /**
2550
2646
  * Fetches a single intent by hash.
2551
2647
  */
2552
- getIntentByHash: (intentHash: string) => Promise<IntentEntity$1 | null>;
2648
+ getIntentByHash: (intentHash: string) => Promise<IntentEntity | null>;
2553
2649
  /**
2554
2650
  * Fetches intents that have expired.
2555
2651
  */
@@ -2557,7 +2653,7 @@ declare class Zkp2pClient {
2557
2653
  now: bigint | string;
2558
2654
  depositIds: string[];
2559
2655
  limit?: number;
2560
- }) => Promise<IntentEntity$1[]>;
2656
+ }) => Promise<IntentEntity[]>;
2561
2657
  /**
2562
2658
  * Fetches fulfillment events for completed intents. `amount` is the net
2563
2659
  * USDC transferred to the taker after protocol/referrer fees.
@@ -2585,7 +2681,7 @@ declare class Zkp2pClient {
2585
2681
  * Fetches deposits by their composite IDs.
2586
2682
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
2587
2683
  */
2588
- getDepositsByIds: (ids: string[]) => Promise<DepositEntity$1[]>;
2684
+ getDepositsByIds: (ids: string[]) => Promise<DepositEntity[]>;
2589
2685
  /**
2590
2686
  * Fetches deposits by their composite IDs with all related data.
2591
2687
  * @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
@@ -2597,7 +2693,7 @@ declare class Zkp2pClient {
2597
2693
  /**
2598
2694
  * Fetches maker profit snapshots for the provided deposits.
2599
2695
  */
2600
- getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity$1[]>;
2696
+ getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
2601
2697
  /**
2602
2698
  * Fetches rate managers (vaults) with aggregate stats.
2603
2699
  */
@@ -2637,15 +2733,15 @@ declare class Zkp2pClient {
2637
2733
  /**
2638
2734
  * Fetches chronological fund activities for a specific deposit.
2639
2735
  */
2640
- getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity$1[]>;
2736
+ getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity[]>;
2641
2737
  /**
2642
2738
  * Fetches fund activities across all deposits for a maker address.
2643
2739
  */
2644
- getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity$1[]>;
2740
+ getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity[]>;
2645
2741
  /**
2646
2742
  * Fetches daily snapshots for a deposit, ordered by day ascending.
2647
2743
  */
2648
- getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity$1[]>;
2744
+ getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity[]>;
2649
2745
  /**
2650
2746
  * Performs a raw GraphQL query against the indexer.
2651
2747
  */
@@ -2890,12 +2986,7 @@ declare class Zkp2pClient {
2890
2986
  depositId: bigint | number | string;
2891
2987
  paymentMethodHash: `0x${string}`;
2892
2988
  currencyHash: `0x${string}`;
2893
- config: {
2894
- adapter: Address;
2895
- adapterConfig: `0x${string}`;
2896
- spreadBps: number;
2897
- maxStaleness: number;
2898
- };
2989
+ config: CurrencyOracleRateConfig;
2899
2990
  escrowAddress?: Address;
2900
2991
  txOverrides?: TxOverrides;
2901
2992
  }, Hash>;
@@ -2918,12 +3009,7 @@ declare class Zkp2pClient {
2918
3009
  depositId: bigint | number | string;
2919
3010
  paymentMethods: `0x${string}`[];
2920
3011
  currencies: `0x${string}`[][];
2921
- configs: Array<Array<{
2922
- adapter: Address;
2923
- adapterConfig: `0x${string}`;
2924
- spreadBps: number;
2925
- maxStaleness: number;
2926
- }>>;
3012
+ configs: CurrencyOracleRateConfig[][];
2927
3013
  escrowAddress?: Address;
2928
3014
  txOverrides?: TxOverrides;
2929
3015
  }, Hash>;
@@ -2937,12 +3023,7 @@ declare class Zkp2pClient {
2937
3023
  code: `0x${string}`;
2938
3024
  minConversionRate: bigint | string;
2939
3025
  updateOracle: boolean;
2940
- oracleRateConfig: {
2941
- adapter: Address;
2942
- adapterConfig: `0x${string}`;
2943
- spreadBps: number;
2944
- maxStaleness: number;
2945
- };
3026
+ oracleRateConfig: CurrencyOracleRateConfig;
2946
3027
  }>>;
2947
3028
  escrowAddress?: Address;
2948
3029
  txOverrides?: TxOverrides;
@@ -3482,7 +3563,6 @@ declare class Zkp2pClient {
3482
3563
  * Includes fetching intent inputs and calling attestation service.
3483
3564
  */
3484
3565
  private prepareFulfillIntent;
3485
- private defaultAttestationService;
3486
3566
  /**
3487
3567
  * **Supporting Method** - Fetches quotes for available liquidity.
3488
3568
  *
@@ -3556,42 +3636,48 @@ declare class Zkp2pClient {
3556
3636
  timeoutMs?: number;
3557
3637
  }): Promise<GetTakerTierResponse>;
3558
3638
  /**
3559
- * Fetch the authenticated user's referral dashboard, including their generated
3560
- * code, reward rates, referee counts, and lifetime referral fees.
3639
+ * Fetch a referral dashboard. Pass `address` for a public wallet-keyed read;
3640
+ * omit it to use the authenticated caller mode.
3561
3641
  */
3562
- getReferralDashboard(opts?: {
3563
- baseApiUrl?: string;
3564
- timeoutMs?: number;
3565
- authorizationToken?: string;
3566
- getAuthorizationToken?: IndexerAuthTokenProvider;
3567
- }): Promise<ReferralDashboardResponse>;
3642
+ getReferralDashboard(opts?: ReferralReadOptions): Promise<ReferralDashboardResponse>;
3568
3643
  /**
3569
- * Fetch the authenticated user's referral earnings totals.
3644
+ * Fetch referral earnings. Pass `address` for a public wallet-keyed read;
3645
+ * omit it to use the authenticated caller mode.
3570
3646
  */
3571
- getReferralEarnings(opts?: {
3572
- baseApiUrl?: string;
3573
- timeoutMs?: number;
3574
- authorizationToken?: string;
3575
- getAuthorizationToken?: IndexerAuthTokenProvider;
3576
- }): Promise<ReferralEarningsResponse>;
3647
+ getReferralEarnings(opts?: ReferralReadOptions): Promise<ReferralEarningsResponse>;
3577
3648
  /**
3578
- * Apply another user's referral code to the authenticated account.
3649
+ * Publicly look up a referral code's owner wallet and active status.
3579
3650
  */
3580
- redeemReferralCode(code: string, opts?: {
3651
+ lookupReferralCode(code: string, opts?: {
3581
3652
  baseApiUrl?: string;
3582
3653
  timeoutMs?: number;
3583
- authorizationToken?: string;
3584
- getAuthorizationToken?: IndexerAuthTokenProvider;
3585
- }): Promise<RedeemReferralCodeResponse>;
3654
+ }): Promise<ReferralCodeLookupResponse>;
3586
3655
  /**
3587
- * Customize the authenticated user's own referral code.
3656
+ * Create or fetch the authenticated caller's referral code with bearer auth.
3588
3657
  */
3589
- updateReferralCode(code: string, opts?: {
3590
- baseApiUrl?: string;
3591
- timeoutMs?: number;
3592
- authorizationToken?: string;
3593
- getAuthorizationToken?: IndexerAuthTokenProvider;
3594
- }): Promise<UpdateReferralCodeResponse>;
3658
+ createReferralCode(opts?: ReferralBearerWriteOptions): Promise<CreateReferralCodeResponse>;
3659
+ /**
3660
+ * Create or fetch the wallet's referral code with EIP-712 signature auth.
3661
+ */
3662
+ createReferralCodeWithSignature(opts?: ReferralSignatureOptions): Promise<CreateReferralCodeResponse>;
3663
+ /**
3664
+ * Apply another user's referral code with bearer auth.
3665
+ */
3666
+ redeemReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<RedeemReferralCodeResponse>;
3667
+ /**
3668
+ * Apply another user's referral code with EIP-712 signature auth. If
3669
+ * `referrerWalletAddress` is omitted, the SDK looks up the code first and signs
3670
+ * the current owner wallet into the redeem payload.
3671
+ */
3672
+ redeemReferralCodeWithSignature(code: string, opts?: RedeemReferralCodeSignatureOptions): Promise<RedeemReferralCodeResponse>;
3673
+ /**
3674
+ * Customize the authenticated caller's referral code with bearer auth.
3675
+ */
3676
+ updateReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<UpdateReferralCodeResponse>;
3677
+ /**
3678
+ * Customize the wallet's referral code with EIP-712 signature auth.
3679
+ */
3680
+ updateReferralCodeWithSignature(code: string, opts: UpdateReferralCodeSignatureOptions): Promise<UpdateReferralCodeResponse>;
3595
3681
  /**
3596
3682
  * The signed `credentialValidatedAt` field is an upload-time freshness witness minted by
3597
3683
  * attestation-service. `credentialExpiresAt` carries an upstream session expiry hint when one
@@ -3648,18 +3734,10 @@ declare class Zkp2pClient {
3648
3734
  }): Promise<CuratorSellerVerifyResponse>;
3649
3735
  private requireProtocolViewer;
3650
3736
  private protocolViewerFunctionInputCount;
3651
- /**
3652
- * Returns the input count for a function on a specific PV entry's ABI.
3653
- * Used to branch between 1-input (V1) and 2-input (V2) PV call signatures.
3654
- */
3655
- private pvEntryFunctionInputCount;
3656
- private isZeroAddressValue;
3657
- private toBigIntOrZero;
3658
3737
  private buildProtocolViewerContexts;
3659
3738
  private isProtocolViewerDepositPopulated;
3660
3739
  private isProtocolViewerIntentPopulated;
3661
3740
  private buildDepositViewFromEscrowDeposit;
3662
- private convertIndexerDepositToPvView;
3663
3741
  private getPvAccountDepositsFromIndexer;
3664
3742
  /**
3665
3743
  * Fetches a deposit directly from on-chain ProtocolViewer contract.
@@ -3809,4 +3887,4 @@ type SendBatchFn = (txs: Array<{
3809
3887
  value?: bigint;
3810
3888
  }>) => Promise<string>;
3811
3889
 
3812
- export { type CreateDepositParams as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type GetOrderbookParams as E, type GetOrderbookResponse as F, type GoogleOAuthSellerCredentialPlatform as G, type CurrencyType as H, type IntentEntity$1 as I, type PaymentMethodCatalog as J, type TxOverrides as K, type SignalIntentReferralFee as L, type SignalIntentMethodParams as M, type FulfillIntentMethodParams as N, type CancelIntentMethodParams 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 Zkp2pNextOptions as W, type AuthorizationTokenProvider as X, type TimeoutConfig as Y, Zkp2pClient as Z, type ActionCallback as _, type IdentityAttestationRequestBody as a, type SellerCredentialStatus as a$, type CreateDepositConversionRate as a0, type Range as a1, type WithdrawDepositParams as a2, type SignalIntentParams as a3, type FulfillIntentParams as a4, type ReleaseFundsToPayerParams as a5, type CancelIntentParams as a6, type BestByPlatformResponseObject as a7, type GetBestByPlatformResponse as a8, type GetBestByPlatformResponseObject as a9, type GetOwnerIntentsResponse as aA, type GetIntentsByDepositRequest as aB, type GetIntentsByDepositResponse as aC, type GetIntentByHashRequest as aD, type GetIntentByHashResponse as aE, type RegisterPayeeDetailsRequest as aF, type RegisterPayeeDetailsResponse as aG, type SellerPlatform as aH, type VenmoSessionMaterial as aI, type CashAppSessionMaterial as aJ, type WiseSessionMaterial as aK, type WiseProfileInfo as aL, type WiseProfileSelectionRequired as aM, type WiseProfileNotFound as aN, type PayPalGoogleOAuthSellerCredentialUploadBody as aO, type VenmoGoogleOAuthSellerCredentialUploadBody as aP, type VenmoCredentialUploadInput as aQ, type CashAppCredentialUploadInput as aR, type WiseCredentialUploadInput as aS, type SellerCredentialUploadInputByPlatform as aT, type SellerCiphertextBundle as aU, type SellerSignedCiphertextBundle as aV, type SellerVerifyIntentDetails as aW, type SellerVerifyInput as aX, type SellerProbeInput as aY, type SellerCredentialBundleUpload as aZ, type SellerCredentialStatusValue as a_, type GetPlatformQuote as aa, type PlatformQuote as ab, type QuoteRequest as ac, type GetNearbyQuote as ad, type GetNearbySuggestions as ae, type GetQuoteResponse as af, type GetQuoteResponseObject as ag, type GetQuoteSingleResponse as ah, type QuoteResponse as ai, type QuoteResponseObject as aj, type QuoteSingleResponse as ak, type QuoteIntentResponse as al, type QuoteFeesResponse as am, type FiatResponse as an, type TokenResponse as ao, type NearbyQuote as ap, type NearbySuggestions as aq, type ApiDeposit as ar, type DepositVerifier as as, type DepositVerifierCurrency as at, type DepositStatus as au, type GetDepositByIdRequest as av, type GetDepositByIdResponse as aw, type Intent as ax, type ApiIntentStatus as ay, type GetOwnerIntentsRequest as az, type AttestationServiceSellerVerifyResponse as b, type DepositDailySnapshotEntity$1 as b$, type SellerVerifyProxyBody as b0, type SellerTypedDataField as b1, type SellerTypedDataSpec as b2, type SellerPaymentTypedDataValue as b3, type SellerAttestationOutput as b4, type SellerCredentialProbeResponse as b5, type FulfillIntentAttestationResponse as b6, type AttestationServiceSellerCredentialProbeResponse as b7, type BuyerTeePaymentParams as b8, type BuyerTeePaymentProofInput as b9, type TakerTierSource as bA, type PlatformLimit as bB, type PlatformRiskLevel as bC, type OrderbookEntry as bD, IndexerClient as bE, defaultIndexerEndpoint as bF, IndexerDepositService as bG, IndexerRateManagerService as bH, compareEventCursorIdsByRecency as bI, fetchFulfillmentAndPayment as bJ, type DepositEntity$1 as bK, type IntentFulfilledEntity as bL, type IntentFulfillmentAmountsEntity as bM, type DepositPaymentMethodEntity$1 as bN, type MethodCurrencyEntity$1 as bO, type IntentStatus as bP, type RateManagerEntity as bQ, type RateManagerRateEntity as bR, type RateManagerDelegationEntity as bS, type ManagerAggregateStatsEntity as bT, type ManagerStatsEntity as bU, type ManagerDailySnapshotEntity as bV, type RateManagerListItem as bW, type RateManagerDetail as bX, type ManualRateUpdateEntity as bY, type OracleConfigUpdateEntity as bZ, type DepositFundActivityEntity$1 as b_, type BuyerTeeSessionMaterial as ba, type CuratorSellerCredentialStatusResponse as bb, type CuratorSellerVerifyResponse as bc, type RegisteredSellerCredentialPlatform as bd, type UploadSellerCredentialParams as be, type RegisteredUploadSellerCredentialParams as bf, type UploadSellerCredentialOptions as bg, type GetSellerCredentialStatusParams as bh, type UploadPayPalGoogleOAuthSellerCredentialParams as bi, type UploadVenmoGoogleOAuthSellerCredentialParams as bj, type UploadGoogleOAuthSellerCredentialParams as bk, type VerifySellerPaymentParams as bl, type IdentityAttestationActionType as bm, type IdentityAttestationOutput as bn, type IdentityAttestationOutputFor as bo, type IdentityAttestationParams as bp, type MakerIdentityAttestationRequestBody as bq, type MakerIdentityPlatform as br, type OnchainCurrency as bs, type DepositVerifierData as bt, type PreparedTransaction as bu, type OrderStats as bv, type DepositIntentStatistics as bw, type TakerTier as bx, type TakerTierVolumeBreakdown as by, type TakerTierStats as bz, type SellerCredentialUploadInput as c, type DepositFundActivityType$1 as c0, type DepositFilter as c1, type PaginationOptions as c2, type DepositOrderField as c3, type OrderDirection$1 as c4, type RateManagerFilter as c5, type RateManagerPaginationOptions as c6, type RateManagerDelegationPaginationOptions as c7, type RateManagerOrderField as c8, type OrderDirection as c9, type PV_Currency as cA, type PV_ReferralFee as cB, type PV_IntentView as cC, type PV_Intent as cD, ZERO_RATE_MANAGER_ID as cE, isZeroRateManagerId as cF, normalizeRateManagerId as cG, normalizeRegistry as cH, getDelegationRoute as cI, classifyDelegationState as cJ, type DelegationRoute as cK, type DelegationState as cL, type DelegationDepositTarget as cM, type BatchResult as cN, type SendTransactionFn as cO, type SendBatchFn as cP, ZERO_ADDRESS as cQ, asErrorMessage as cR, assertDelegationMethodSupport as cS, type DeploymentEnv as ca, type FulfillmentRecord as cb, type PaymentVerifiedRecord as cc, type FulfillmentAndPaymentResponse as cd, PAYMENT_PLATFORMS as ce, type PaymentPlatformType as cf, Currency as cg, currencyInfo as ch, getCurrencyInfoFromHash as ci, getCurrencyInfoFromCountryCode as cj, getCurrencyCodeFromHash as ck, isSupportedCurrencyHash as cl, mapConversionRatesToOnchainMinRate as cm, type CurrencyData as cn, getContracts as co, getRateManagerContracts as cp, getPaymentMethodsCatalog as cq, getGatingServiceAddress as cr, type RuntimeEnv as cs, parseDepositView as ct, parseIntentView as cu, enrichPvDepositView as cv, enrichPvIntentView as cw, type PV_DepositView as cx, type PV_Deposit as cy, type PV_PaymentMethodData as cz, type SellerCredentialUploadPlatform as d, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type ApiAdapterOptions as h, type ReferralDashboardResponse as i, type ReferralEarningsResponse as j, type RedeemReferralCodeRequest as k, type RedeemReferralCodeResponse as l, type UpdateReferralCodeRequest as m, type UpdateReferralCodeResponse as n, type GoogleOAuthSellerCredentialUploadBodyByPlatform as o, type BestByPlatformResponse as p, type ValidatePayeeDetailsResponse as q, type PostDepositDetailsResponse as r, type GetPayeeDetailsRequest as s, type GetPayeeDetailsResponse as t, type GetOwnerDepositsRequest as u, type GetOwnerDepositsResponse as v, type GetTakerTierRequest as w, type GetTakerTierResponse as x, type GetDepositBundleParams as y, type GetDepositBundleResponse as z };
3890
+ 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 };