@zkp2p/sdk 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -9
- package/dist/{chunk-NMIFJSZ3.mjs → chunk-ZM4ZP5GQ.mjs} +2 -2
- package/dist/{chunk-NMIFJSZ3.mjs.map → chunk-ZM4ZP5GQ.mjs.map} +1 -1
- package/dist/index.cjs +1981 -1732
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +55 -5
- package/dist/index.d.ts +55 -5
- package/dist/index.mjs +1982 -1738
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-GG6UQKLO.mjs +5 -0
- package/dist/{protocolViewerParsers-N5SJ4KHJ.mjs.map → protocolViewerParsers-GG6UQKLO.mjs.map} +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/{vaultUtils-DI-r1LAg.d.mts → vaultUtils-CdYaZr3f.d.mts} +785 -717
- package/dist/{vaultUtils-DI-r1LAg.d.ts → vaultUtils-CdYaZr3f.d.ts} +785 -717
- package/package.json +1 -1
- package/dist/protocolViewerParsers-N5SJ4KHJ.mjs +0 -5
|
@@ -1,158 +1,9 @@
|
|
|
1
1
|
import * as _zkp2p_indexer_schema from '@zkp2p/indexer-schema';
|
|
2
2
|
import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, MakerProfitSnapshot, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
|
|
3
|
-
import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient } from 'viem';
|
|
3
|
+
import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient, Transport } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
import { IdentityPlatform, IdentityActionTypeByPlatform, IdentityAttestationOutputFor as IdentityAttestationOutputFor$1, IdentityParamsByPlatform } from '@zkp2p/zkp2p-attestation';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Supported fiat currency codes.
|
|
9
|
-
*
|
|
10
|
-
* Use these constants when specifying currencies in conversion rates:
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { Currency } from '@zkp2p/sdk';
|
|
15
|
-
*
|
|
16
|
-
* const rates = [
|
|
17
|
-
* { currency: Currency.USD, conversionRate: '1020000000000000000' },
|
|
18
|
-
* { currency: Currency.EUR, conversionRate: '1100000000000000000' },
|
|
19
|
-
* ];
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
declare const Currency: {
|
|
23
|
-
readonly AED: "AED";
|
|
24
|
-
readonly ARS: "ARS";
|
|
25
|
-
readonly AUD: "AUD";
|
|
26
|
-
readonly BRL: "BRL";
|
|
27
|
-
readonly CAD: "CAD";
|
|
28
|
-
readonly CHF: "CHF";
|
|
29
|
-
readonly CNY: "CNY";
|
|
30
|
-
readonly CZK: "CZK";
|
|
31
|
-
readonly DKK: "DKK";
|
|
32
|
-
readonly EUR: "EUR";
|
|
33
|
-
readonly GBP: "GBP";
|
|
34
|
-
readonly HKD: "HKD";
|
|
35
|
-
readonly HUF: "HUF";
|
|
36
|
-
readonly IDR: "IDR";
|
|
37
|
-
readonly ILS: "ILS";
|
|
38
|
-
readonly INR: "INR";
|
|
39
|
-
readonly JPY: "JPY";
|
|
40
|
-
readonly KES: "KES";
|
|
41
|
-
readonly MXN: "MXN";
|
|
42
|
-
readonly MYR: "MYR";
|
|
43
|
-
readonly NOK: "NOK";
|
|
44
|
-
readonly NZD: "NZD";
|
|
45
|
-
readonly PHP: "PHP";
|
|
46
|
-
readonly PLN: "PLN";
|
|
47
|
-
readonly RON: "RON";
|
|
48
|
-
readonly SAR: "SAR";
|
|
49
|
-
readonly SEK: "SEK";
|
|
50
|
-
readonly SGD: "SGD";
|
|
51
|
-
readonly THB: "THB";
|
|
52
|
-
readonly TRY: "TRY";
|
|
53
|
-
readonly UGX: "UGX";
|
|
54
|
-
readonly USD: "USD";
|
|
55
|
-
readonly VND: "VND";
|
|
56
|
-
readonly ZAR: "ZAR";
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Union type of all supported currency codes.
|
|
60
|
-
*/
|
|
61
|
-
type CurrencyType = (typeof Currency)[keyof typeof Currency];
|
|
62
|
-
/**
|
|
63
|
-
* Complete currency information including name, symbol, and hash.
|
|
64
|
-
*/
|
|
65
|
-
type CurrencyData = {
|
|
66
|
-
currency: CurrencyType;
|
|
67
|
-
currencyCode: string;
|
|
68
|
-
currencyName: string;
|
|
69
|
-
currencySymbol: string;
|
|
70
|
-
currencyCodeHash: string;
|
|
71
|
-
countryCode: string;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Lookup table containing metadata for all supported currencies.
|
|
75
|
-
*
|
|
76
|
-
* Includes currency name, symbol, keccak256 hash (for on-chain use),
|
|
77
|
-
* and ISO country code for flag display.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* import { currencyInfo, Currency } from '@zkp2p/sdk';
|
|
82
|
-
*
|
|
83
|
-
* const usd = currencyInfo[Currency.USD];
|
|
84
|
-
* console.log(usd.currencyName); // "United States Dollar"
|
|
85
|
-
* console.log(usd.currencySymbol); // "$"
|
|
86
|
-
* console.log(usd.currencyCodeHash); // "0x..."
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
declare const currencyInfo: Record<CurrencyType, CurrencyData>;
|
|
90
|
-
/**
|
|
91
|
-
* UI-friendly currency rate structure used in SDK methods.
|
|
92
|
-
*/
|
|
93
|
-
type UICurrencyRate = {
|
|
94
|
-
currency: CurrencyType;
|
|
95
|
-
conversionRate: string;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* On-chain currency structure with minimum conversion rate (V3 escrow format).
|
|
99
|
-
*/
|
|
100
|
-
type OnchainCurrencyMinRate = {
|
|
101
|
-
code: `0x${string}`;
|
|
102
|
-
minConversionRate: bigint;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Maps UI currency rates to on-chain V3 escrow format with minConversionRate.
|
|
106
|
-
*
|
|
107
|
-
* @param groups - Nested array of currency rates per payment method
|
|
108
|
-
* @param expectedGroups - Expected number of groups (for validation)
|
|
109
|
-
* @returns On-chain formatted currency arrays for V3 escrow
|
|
110
|
-
* @throws Error if groups structure is invalid or lengths don't match
|
|
111
|
-
*/
|
|
112
|
-
declare function mapConversionRatesToOnchainMinRate(groups: UICurrencyRate[][], expectedGroups?: number): OnchainCurrencyMinRate[][];
|
|
113
|
-
/**
|
|
114
|
-
* Looks up currency info by its keccak256 hash.
|
|
115
|
-
*
|
|
116
|
-
* @param hash - The currency code hash (0x-prefixed)
|
|
117
|
-
* @returns Currency data if found, undefined otherwise
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```typescript
|
|
121
|
-
* const info = getCurrencyInfoFromHash('0x...');
|
|
122
|
-
* if (info) {
|
|
123
|
-
* console.log(info.currencyCode); // "USD"
|
|
124
|
-
* }
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
declare function getCurrencyInfoFromHash(hash: string): CurrencyData | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* Looks up currency info by ISO country code.
|
|
130
|
-
*
|
|
131
|
-
* @param code - The ISO country code (e.g., 'US', 'GB')
|
|
132
|
-
* @returns Currency data if found, undefined otherwise
|
|
133
|
-
*/
|
|
134
|
-
declare function getCurrencyInfoFromCountryCode(code: string): CurrencyData | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Converts a currency hash to its ISO currency code.
|
|
137
|
-
*
|
|
138
|
-
* @param hash - The currency code hash (0x-prefixed)
|
|
139
|
-
* @returns Currency code string (e.g., 'USD') or undefined if not found
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* const code = getCurrencyCodeFromHash('0x...');
|
|
144
|
-
* console.log(code); // "USD"
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
declare function getCurrencyCodeFromHash(hash: string): string | undefined;
|
|
148
|
-
/**
|
|
149
|
-
* Checks if a currency hash is recognized by the SDK.
|
|
150
|
-
*
|
|
151
|
-
* @param hash - The currency code hash to check
|
|
152
|
-
* @returns true if the hash corresponds to a supported currency
|
|
153
|
-
*/
|
|
154
|
-
declare function isSupportedCurrencyHash(hash: string): boolean;
|
|
155
|
-
|
|
156
7
|
/**
|
|
157
8
|
* Contract resolution utilities for the SDK.
|
|
158
9
|
*
|
|
@@ -229,7 +80,7 @@ type RuntimeEnv = 'production' | 'preproduction' | 'staging';
|
|
|
229
80
|
* Retrieves deployed contract addresses and ABIs for a given chain and environment.
|
|
230
81
|
*
|
|
231
82
|
* @param chainId - The chain ID (8453 for Base)
|
|
232
|
-
* @param env - Runtime environment ('production' or 'staging')
|
|
83
|
+
* @param env - Runtime environment ('production', 'preproduction', or 'staging')
|
|
233
84
|
* @returns Object containing addresses and ABIs
|
|
234
85
|
*
|
|
235
86
|
* @example
|
|
@@ -295,95 +146,6 @@ declare function getRateManagerContracts(chainId: number, env?: RuntimeEnv): {
|
|
|
295
146
|
};
|
|
296
147
|
};
|
|
297
148
|
|
|
298
|
-
type PV_ReferralFee = {
|
|
299
|
-
recipient: `0x${string}`;
|
|
300
|
-
fee: bigint;
|
|
301
|
-
};
|
|
302
|
-
type PV_Deposit = {
|
|
303
|
-
depositor: string;
|
|
304
|
-
delegate: string;
|
|
305
|
-
token: string;
|
|
306
|
-
amount: bigint;
|
|
307
|
-
intentAmountRange: {
|
|
308
|
-
min: bigint;
|
|
309
|
-
max: bigint;
|
|
310
|
-
};
|
|
311
|
-
acceptingIntents: boolean;
|
|
312
|
-
remainingDeposits: bigint;
|
|
313
|
-
outstandingIntentAmount: bigint;
|
|
314
|
-
makerProtocolFee: bigint;
|
|
315
|
-
reservedMakerFees: bigint;
|
|
316
|
-
accruedMakerFees: bigint;
|
|
317
|
-
accruedReferrerFees: bigint;
|
|
318
|
-
intentGuardian: string;
|
|
319
|
-
retainOnEmpty: boolean;
|
|
320
|
-
referrer: string;
|
|
321
|
-
referrerFee: bigint;
|
|
322
|
-
};
|
|
323
|
-
type PV_Currency = {
|
|
324
|
-
code: string;
|
|
325
|
-
minConversionRate: bigint;
|
|
326
|
-
};
|
|
327
|
-
type PV_PaymentMethodData = {
|
|
328
|
-
paymentMethod: string;
|
|
329
|
-
verificationData: {
|
|
330
|
-
intentGatingService: string;
|
|
331
|
-
payeeDetails: string;
|
|
332
|
-
data: string;
|
|
333
|
-
};
|
|
334
|
-
currencies: PV_Currency[];
|
|
335
|
-
};
|
|
336
|
-
type PV_DepositView = {
|
|
337
|
-
depositId: bigint;
|
|
338
|
-
deposit: PV_Deposit;
|
|
339
|
-
availableLiquidity: bigint;
|
|
340
|
-
paymentMethods: PV_PaymentMethodData[];
|
|
341
|
-
intentHashes: string[];
|
|
342
|
-
};
|
|
343
|
-
type PV_Intent = {
|
|
344
|
-
owner: string;
|
|
345
|
-
to: string;
|
|
346
|
-
escrow: string;
|
|
347
|
-
depositId: bigint;
|
|
348
|
-
amount: bigint;
|
|
349
|
-
timestamp: bigint;
|
|
350
|
-
paymentMethod: string;
|
|
351
|
-
fiatCurrency: string;
|
|
352
|
-
conversionRate: bigint;
|
|
353
|
-
referralFees: PV_ReferralFee[];
|
|
354
|
-
postIntentHook: string;
|
|
355
|
-
data: string;
|
|
356
|
-
};
|
|
357
|
-
type PV_IntentView = {
|
|
358
|
-
intentHash: string;
|
|
359
|
-
intent: PV_Intent;
|
|
360
|
-
deposit: Omit<PV_DepositView, 'intentHashes'>;
|
|
361
|
-
};
|
|
362
|
-
declare function parseDepositView(raw: any): PV_DepositView;
|
|
363
|
-
declare function parseIntentView(raw: any): PV_IntentView;
|
|
364
|
-
|
|
365
|
-
declare function enrichPvDepositView(view: PV_DepositView, chainId: number, env?: RuntimeEnv): {
|
|
366
|
-
paymentMethods: {
|
|
367
|
-
processorName: string | undefined;
|
|
368
|
-
currencies: {
|
|
369
|
-
currencyInfo: CurrencyData | undefined;
|
|
370
|
-
code: string;
|
|
371
|
-
minConversionRate: bigint;
|
|
372
|
-
}[];
|
|
373
|
-
paymentMethod: string;
|
|
374
|
-
verificationData: {
|
|
375
|
-
intentGatingService: string;
|
|
376
|
-
payeeDetails: string;
|
|
377
|
-
data: string;
|
|
378
|
-
};
|
|
379
|
-
}[];
|
|
380
|
-
depositId: bigint;
|
|
381
|
-
deposit: PV_Deposit;
|
|
382
|
-
availableLiquidity: bigint;
|
|
383
|
-
intentHashes: string[];
|
|
384
|
-
};
|
|
385
|
-
declare function enrichPvIntentView(view: PV_IntentView, chainId: number, env?: RuntimeEnv): any;
|
|
386
|
-
|
|
387
149
|
/**
|
|
388
150
|
* Minimal fetch-based GraphQL client for the ZKP2P indexer.
|
|
389
151
|
* No external GraphQL dependencies; works in Node and browser.
|
|
@@ -415,299 +177,12 @@ type DeploymentEnv = 'PRODUCTION' | 'PREPRODUCTION' | 'STAGING' | 'DEV' | 'LOCAL
|
|
|
415
177
|
declare function defaultIndexerEndpoint(env?: DeploymentEnv): string;
|
|
416
178
|
|
|
417
179
|
/**
|
|
418
|
-
*
|
|
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
|
-
*
|
|
442
|
-
* One row per on-chain fund event (deposit, add, withdraw, close).
|
|
183
|
+
* Core deposit entity from the indexer
|
|
443
184
|
*/
|
|
444
|
-
|
|
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:
|
|
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:
|
|
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;
|
|
@@ -1042,6 +700,7 @@ type CuratorPayeeDataInput = {
|
|
|
1042
700
|
};
|
|
1043
701
|
/**
|
|
1044
702
|
* Parameters for fulfilling an intent with payment attestation
|
|
703
|
+
* @deprecated Legacy shape from the pre-0.6 API; use FulfillIntentMethodParams. Will be removed in 0.8.
|
|
1045
704
|
*/
|
|
1046
705
|
type FulfillIntentParams = {
|
|
1047
706
|
/** Hash of the intent to fulfill */
|
|
@@ -1071,6 +730,7 @@ type FulfillIntentParams = {
|
|
|
1071
730
|
};
|
|
1072
731
|
/**
|
|
1073
732
|
* Parameters for releasing funds back to the payer
|
|
733
|
+
* @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.releaseFundsToPayer`. Will be removed in 0.8.
|
|
1074
734
|
*/
|
|
1075
735
|
type ReleaseFundsToPayerParams = {
|
|
1076
736
|
/** Hash of the intent to release funds for */
|
|
@@ -1084,6 +744,7 @@ type ReleaseFundsToPayerParams = {
|
|
|
1084
744
|
};
|
|
1085
745
|
/**
|
|
1086
746
|
* Parameters for signaling an intent to use a deposit
|
|
747
|
+
* @deprecated Legacy shape from the pre-0.6 API; use SignalIntentMethodParams. Will be removed in 0.8.
|
|
1087
748
|
*/
|
|
1088
749
|
type SignalIntentParams = {
|
|
1089
750
|
/** Payment processor name (e.g., 'wise', 'revolut') */
|
|
@@ -1694,6 +1355,7 @@ type CreateDepositConversionRate = {
|
|
|
1694
1355
|
currency: CurrencyType;
|
|
1695
1356
|
conversionRate: string;
|
|
1696
1357
|
};
|
|
1358
|
+
/** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.createDeposit`. Will be removed in 0.8. */
|
|
1697
1359
|
type CreateDepositParams = {
|
|
1698
1360
|
token: Address;
|
|
1699
1361
|
amount: bigint;
|
|
@@ -1715,20 +1377,24 @@ type CreateDepositParams = {
|
|
|
1715
1377
|
onError?: (error: Error) => void;
|
|
1716
1378
|
onMined?: ActionCallback;
|
|
1717
1379
|
};
|
|
1380
|
+
/** @deprecated Legacy shape from the pre-0.6 API; use the params of `Zkp2pClient.withdrawDeposit`. Will be removed in 0.8. */
|
|
1718
1381
|
type WithdrawDepositParams = {
|
|
1719
1382
|
depositId: string | number | bigint;
|
|
1720
1383
|
onSuccess?: ActionCallback;
|
|
1721
1384
|
onError?: (error: Error) => void;
|
|
1722
1385
|
onMined?: ActionCallback;
|
|
1723
1386
|
};
|
|
1387
|
+
/** @deprecated Legacy shape from the pre-0.6 API; use CancelIntentMethodParams. Will be removed in 0.8. */
|
|
1724
1388
|
type CancelIntentParams = {
|
|
1725
1389
|
intentHash: Hash;
|
|
1726
1390
|
onSuccess?: ActionCallback;
|
|
1727
1391
|
onError?: (error: Error) => void;
|
|
1728
1392
|
onMined?: ActionCallback;
|
|
1729
1393
|
};
|
|
1730
|
-
type DepositStatus = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
|
|
1394
|
+
type DepositStatus$1 = 'ACTIVE' | 'WITHDRAWN' | 'CLOSED';
|
|
1395
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1731
1396
|
type ApiIntentStatus = 'SIGNALED' | 'FULFILLED' | 'PRUNED' | 'MANUALLY_RELEASED';
|
|
1397
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1732
1398
|
type Intent = {
|
|
1733
1399
|
id: number;
|
|
1734
1400
|
intentHash: string;
|
|
@@ -1751,6 +1417,7 @@ type Intent = {
|
|
|
1751
1417
|
createdAt: Date;
|
|
1752
1418
|
updatedAt: Date;
|
|
1753
1419
|
};
|
|
1420
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1754
1421
|
type GetOwnerIntentsRequest = {
|
|
1755
1422
|
ownerAddress: string;
|
|
1756
1423
|
escrowAddress: string;
|
|
@@ -1758,12 +1425,14 @@ type GetOwnerIntentsRequest = {
|
|
|
1758
1425
|
orchestratorAddresses?: string[];
|
|
1759
1426
|
status?: ApiIntentStatus | ApiIntentStatus[];
|
|
1760
1427
|
};
|
|
1428
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1761
1429
|
type GetOwnerIntentsResponse = {
|
|
1762
1430
|
success: boolean;
|
|
1763
1431
|
message: string;
|
|
1764
1432
|
responseObject: Intent[];
|
|
1765
1433
|
statusCode: number;
|
|
1766
1434
|
};
|
|
1435
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1767
1436
|
type GetIntentsByDepositRequest = {
|
|
1768
1437
|
depositId: string;
|
|
1769
1438
|
escrowAddress: string;
|
|
@@ -1771,18 +1440,21 @@ type GetIntentsByDepositRequest = {
|
|
|
1771
1440
|
orchestratorAddresses?: string[];
|
|
1772
1441
|
status?: ApiIntentStatus | ApiIntentStatus[];
|
|
1773
1442
|
};
|
|
1443
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1774
1444
|
type GetIntentsByDepositResponse = {
|
|
1775
1445
|
success: boolean;
|
|
1776
1446
|
message: string;
|
|
1777
1447
|
responseObject: Intent[];
|
|
1778
1448
|
statusCode: number;
|
|
1779
1449
|
};
|
|
1450
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1780
1451
|
type GetIntentByHashRequest = {
|
|
1781
1452
|
intentHash: string;
|
|
1782
1453
|
escrowAddress?: string;
|
|
1783
1454
|
escrowAddresses?: string[];
|
|
1784
1455
|
orchestratorAddresses?: string[];
|
|
1785
1456
|
};
|
|
1457
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1786
1458
|
type GetIntentByHashResponse = {
|
|
1787
1459
|
success: boolean;
|
|
1788
1460
|
message: string;
|
|
@@ -1843,7 +1515,7 @@ type GetOwnerDepositsRequest = {
|
|
|
1843
1515
|
escrowAddress: string;
|
|
1844
1516
|
escrowAddresses?: string[];
|
|
1845
1517
|
/** Optional status filter: 'ACTIVE' | 'WITHDRAWN' | 'CLOSED' */
|
|
1846
|
-
status?: DepositStatus;
|
|
1518
|
+
status?: DepositStatus$1;
|
|
1847
1519
|
};
|
|
1848
1520
|
type GetOwnerDepositsResponse = {
|
|
1849
1521
|
success: boolean;
|
|
@@ -1851,17 +1523,20 @@ type GetOwnerDepositsResponse = {
|
|
|
1851
1523
|
responseObject: ApiDeposit[];
|
|
1852
1524
|
statusCode: number;
|
|
1853
1525
|
};
|
|
1526
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1854
1527
|
type GetDepositByIdRequest = {
|
|
1855
1528
|
depositId: string;
|
|
1856
1529
|
escrowAddress: string;
|
|
1857
1530
|
escrowAddresses?: string[];
|
|
1858
1531
|
};
|
|
1532
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1859
1533
|
type GetDepositByIdResponse = {
|
|
1860
1534
|
success: boolean;
|
|
1861
1535
|
message: string;
|
|
1862
1536
|
responseObject: ApiDeposit;
|
|
1863
1537
|
statusCode: number;
|
|
1864
1538
|
};
|
|
1539
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1865
1540
|
type OrderStats = {
|
|
1866
1541
|
id: number;
|
|
1867
1542
|
totalIntents: number;
|
|
@@ -1869,6 +1544,7 @@ type OrderStats = {
|
|
|
1869
1544
|
fulfilledIntents: number;
|
|
1870
1545
|
prunedIntents: number;
|
|
1871
1546
|
};
|
|
1547
|
+
/** @deprecated No corresponding SDK method; will be removed in 0.8. */
|
|
1872
1548
|
type DepositIntentStatistics = OrderStats;
|
|
1873
1549
|
type TakerTierStats = {
|
|
1874
1550
|
lifetimeSignaledCount: number;
|
|
@@ -1934,97 +1610,509 @@ type TakerTier = {
|
|
|
1934
1610
|
cooldownRemainingSeconds: number;
|
|
1935
1611
|
nextIntentAvailableAt: string | null;
|
|
1936
1612
|
/**
|
|
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.
|
|
1613
|
+
* Server-authoritative platform cap grid. Use this for enforced caps; do not
|
|
1614
|
+
* derive platform caps from top-level tier caps or risk multipliers.
|
|
1615
|
+
*/
|
|
1616
|
+
platformLimits?: PlatformLimit[];
|
|
1617
|
+
/**
|
|
1618
|
+
* Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
|
|
1619
|
+
* optional because the current production deployment still serves the older
|
|
1620
|
+
* payload that omits them — read them when present and fall back gracefully.
|
|
1621
|
+
* Amounts are USDC base-unit strings (6 decimals).
|
|
1622
|
+
*/
|
|
1623
|
+
/** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
|
|
1624
|
+
maxOrderSize?: string;
|
|
1625
|
+
maxOrderSizeDisplay?: string;
|
|
1626
|
+
/** Peer Pay volume floor that qualifies the current tier. */
|
|
1627
|
+
minVolumeForTier?: string;
|
|
1628
|
+
minVolumeForTierDisplay?: string;
|
|
1629
|
+
/** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
|
|
1630
|
+
nextTier?: TakerTierLevel | null;
|
|
1631
|
+
/** Remaining Peer Pay volume to reach `nextTier`. */
|
|
1632
|
+
volumeToNextTier?: string | null;
|
|
1633
|
+
volumeToNextTierDisplay?: string | null;
|
|
1634
|
+
nextTierMaxOrderSize?: string | null;
|
|
1635
|
+
nextTierMaxOrderSizeDisplay?: string | null;
|
|
1636
|
+
/**
|
|
1637
|
+
* Compatibility name retained by curator. Current semantics preserve
|
|
1638
|
+
* historical maker tiers through July 1, 2026 UTC, then add forward Peer Pay
|
|
1639
|
+
* volume only. Present on deployments with the PR #461/#463 progression
|
|
1640
|
+
* contract.
|
|
1641
|
+
*/
|
|
1642
|
+
peerPayVolume?: string;
|
|
1643
|
+
/** Auditable tier progression inputs. Current curator may return a synthetic Peer Pay row. */
|
|
1644
|
+
volumeBreakdown?: TakerTierVolumeBreakdown[];
|
|
1645
|
+
};
|
|
1646
|
+
type GetTakerTierRequest = {
|
|
1647
|
+
owner: string;
|
|
1648
|
+
chainId: number;
|
|
1649
|
+
};
|
|
1650
|
+
type GetTakerTierResponse = {
|
|
1651
|
+
success: boolean;
|
|
1652
|
+
message: string;
|
|
1653
|
+
responseObject: TakerTier;
|
|
1654
|
+
statusCode?: number;
|
|
1655
|
+
};
|
|
1656
|
+
type GetDepositBundleParams = DepositBundleRequest;
|
|
1657
|
+
type GetDepositBundleResponse = DepositBundleResponse;
|
|
1658
|
+
type GetOrderbookParams = {
|
|
1659
|
+
currency: string;
|
|
1660
|
+
paymentPlatform?: string;
|
|
1661
|
+
publicOnly?: boolean;
|
|
1662
|
+
sortBy?: 'price' | 'available' | 'limits';
|
|
1663
|
+
sortDirection?: 'asc' | 'desc';
|
|
1664
|
+
sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
|
|
1665
|
+
limit?: number;
|
|
1666
|
+
chainId?: number;
|
|
1667
|
+
token?: string;
|
|
1668
|
+
};
|
|
1669
|
+
type OrderbookEntry = {
|
|
1670
|
+
depositIdOnContract?: string;
|
|
1671
|
+
depositId: string;
|
|
1672
|
+
depositor: string;
|
|
1673
|
+
price: string;
|
|
1674
|
+
availableTokenAmount: string;
|
|
1675
|
+
availableFiatAmount: string;
|
|
1676
|
+
intentAmountMin: string;
|
|
1677
|
+
intentAmountMax: string;
|
|
1678
|
+
paymentPlatform: string;
|
|
1679
|
+
currency: string;
|
|
1680
|
+
paymentMethodHash: string;
|
|
1681
|
+
payeeDetailsHash: string;
|
|
1682
|
+
sellerAutomatedReleaseAvailable?: boolean;
|
|
1683
|
+
escrowAddress: string;
|
|
1684
|
+
chainId: number;
|
|
1685
|
+
offchainId?: string;
|
|
1686
|
+
telegramUsername?: string;
|
|
1687
|
+
};
|
|
1688
|
+
type GetOrderbookResponse = {
|
|
1689
|
+
chainId: number;
|
|
1690
|
+
token: string;
|
|
1691
|
+
currency: string;
|
|
1692
|
+
paymentPlatform: string | null;
|
|
1693
|
+
sortBy: string;
|
|
1694
|
+
sortDirection: string;
|
|
1695
|
+
sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
|
|
1696
|
+
internalDetailsIncluded: boolean;
|
|
1697
|
+
generatedAt: string;
|
|
1698
|
+
entries: OrderbookEntry[];
|
|
1699
|
+
};
|
|
1700
|
+
|
|
1701
|
+
declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26"];
|
|
1702
|
+
type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
|
|
1703
|
+
|
|
1704
|
+
type ReferralReadOptions$1 = {
|
|
1705
|
+
baseApiUrl?: string;
|
|
1706
|
+
timeoutMs?: number;
|
|
1707
|
+
/** Public wallet-address read target. Omit to use bearer-authenticated caller mode. */
|
|
1708
|
+
address?: Address;
|
|
1709
|
+
authorizationToken?: string;
|
|
1710
|
+
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
1711
|
+
};
|
|
1712
|
+
type ReferralBearerWriteOptions$1 = {
|
|
1713
|
+
baseApiUrl?: string;
|
|
1714
|
+
timeoutMs?: number;
|
|
1715
|
+
authorizationToken?: string;
|
|
1716
|
+
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
1717
|
+
};
|
|
1718
|
+
type ReferralSignatureOptions$1 = {
|
|
1719
|
+
baseApiUrl?: string;
|
|
1720
|
+
timeoutMs?: number;
|
|
1721
|
+
/** Defaults to base_production for production/preproduction, base_staging for staging. */
|
|
1722
|
+
audience?: string;
|
|
1723
|
+
/** Unix timestamp in seconds. Defaults to now. */
|
|
1724
|
+
issuedAt?: number;
|
|
1725
|
+
};
|
|
1726
|
+
type RedeemReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
|
|
1727
|
+
/** Expected owner wallet for the code. If omitted, the SDK looks it up before signing. */
|
|
1728
|
+
referrerWalletAddress?: Address;
|
|
1729
|
+
};
|
|
1730
|
+
type UpdateReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
|
|
1731
|
+
/** Current code, signed to prevent stale rename replay. */
|
|
1732
|
+
oldCode: string;
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1735
|
+
type PV_ReferralFee = {
|
|
1736
|
+
recipient: `0x${string}`;
|
|
1737
|
+
fee: bigint;
|
|
1738
|
+
};
|
|
1739
|
+
type PV_Deposit = {
|
|
1740
|
+
depositor: string;
|
|
1741
|
+
delegate: string;
|
|
1742
|
+
token: string;
|
|
1743
|
+
amount: bigint;
|
|
1744
|
+
intentAmountRange: {
|
|
1745
|
+
min: bigint;
|
|
1746
|
+
max: bigint;
|
|
1747
|
+
};
|
|
1748
|
+
acceptingIntents: boolean;
|
|
1749
|
+
remainingDeposits: bigint;
|
|
1750
|
+
outstandingIntentAmount: bigint;
|
|
1751
|
+
makerProtocolFee: bigint;
|
|
1752
|
+
reservedMakerFees: bigint;
|
|
1753
|
+
accruedMakerFees: bigint;
|
|
1754
|
+
accruedReferrerFees: bigint;
|
|
1755
|
+
intentGuardian: string;
|
|
1756
|
+
retainOnEmpty: boolean;
|
|
1757
|
+
referrer: string;
|
|
1758
|
+
referrerFee: bigint;
|
|
1759
|
+
};
|
|
1760
|
+
type PV_Currency = {
|
|
1761
|
+
code: string;
|
|
1762
|
+
minConversionRate: bigint;
|
|
1763
|
+
};
|
|
1764
|
+
type PV_PaymentMethodData = {
|
|
1765
|
+
paymentMethod: string;
|
|
1766
|
+
verificationData: {
|
|
1767
|
+
intentGatingService: string;
|
|
1768
|
+
payeeDetails: string;
|
|
1769
|
+
data: string;
|
|
1770
|
+
};
|
|
1771
|
+
currencies: PV_Currency[];
|
|
1772
|
+
};
|
|
1773
|
+
type PV_DepositView = {
|
|
1774
|
+
depositId: bigint;
|
|
1775
|
+
deposit: PV_Deposit;
|
|
1776
|
+
availableLiquidity: bigint;
|
|
1777
|
+
paymentMethods: PV_PaymentMethodData[];
|
|
1778
|
+
intentHashes: string[];
|
|
1779
|
+
};
|
|
1780
|
+
type PV_Intent = {
|
|
1781
|
+
owner: string;
|
|
1782
|
+
to: string;
|
|
1783
|
+
escrow: string;
|
|
1784
|
+
depositId: bigint;
|
|
1785
|
+
amount: bigint;
|
|
1786
|
+
timestamp: bigint;
|
|
1787
|
+
paymentMethod: string;
|
|
1788
|
+
fiatCurrency: string;
|
|
1789
|
+
conversionRate: bigint;
|
|
1790
|
+
referralFees: PV_ReferralFee[];
|
|
1791
|
+
postIntentHook: string;
|
|
1792
|
+
data: string;
|
|
1793
|
+
};
|
|
1794
|
+
type PV_IntentView = {
|
|
1795
|
+
intentHash: string;
|
|
1796
|
+
intent: PV_Intent;
|
|
1797
|
+
deposit: Omit<PV_DepositView, 'intentHashes'>;
|
|
1798
|
+
};
|
|
1799
|
+
declare function parseDepositView(raw: any): PV_DepositView;
|
|
1800
|
+
declare function parseIntentView(raw: any): PV_IntentView;
|
|
1801
|
+
|
|
1802
|
+
declare function enrichPvDepositView(view: PV_DepositView, chainId: number, env?: RuntimeEnv): {
|
|
1803
|
+
paymentMethods: {
|
|
1804
|
+
processorName: string | undefined;
|
|
1805
|
+
currencies: {
|
|
1806
|
+
currencyInfo: CurrencyData | undefined;
|
|
1807
|
+
code: string;
|
|
1808
|
+
minConversionRate: bigint;
|
|
1809
|
+
}[];
|
|
1810
|
+
paymentMethod: string;
|
|
1811
|
+
verificationData: {
|
|
1812
|
+
intentGatingService: string;
|
|
1813
|
+
payeeDetails: string;
|
|
1814
|
+
data: string;
|
|
1815
|
+
};
|
|
1816
|
+
}[];
|
|
1817
|
+
depositId: bigint;
|
|
1818
|
+
deposit: PV_Deposit;
|
|
1819
|
+
availableLiquidity: bigint;
|
|
1820
|
+
intentHashes: string[];
|
|
1821
|
+
};
|
|
1822
|
+
declare function enrichPvIntentView(view: PV_IntentView, chainId: number, env?: RuntimeEnv): any;
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Indexer entity types sourced from @zkp2p/indexer-schema.
|
|
1826
|
+
*/
|
|
1827
|
+
|
|
1828
|
+
type WithOverrides<TBase, TOverrides> = Omit<TBase, keyof TOverrides> & TOverrides;
|
|
1829
|
+
type DepositStatus = `${DepositStatus$2}`;
|
|
1830
|
+
type IntentStatus = `${IntentStatus$1}`;
|
|
1831
|
+
type DepositEntity = WithOverrides<Deposit, {
|
|
1832
|
+
status: DepositStatus;
|
|
1833
|
+
retainOnEmpty?: boolean;
|
|
1834
|
+
whitelistHookAddress?: string | null;
|
|
1835
|
+
}>;
|
|
1836
|
+
type DepositPaymentMethodEntity = DepositPaymentMethod;
|
|
1837
|
+
type MethodCurrencyEntity = MethodCurrency;
|
|
1838
|
+
type IntentEntity = WithOverrides<Intent$1, {
|
|
1839
|
+
status: IntentStatus;
|
|
1840
|
+
}>;
|
|
1841
|
+
interface DepositWithRelations extends DepositEntity {
|
|
1842
|
+
paymentMethods?: DepositPaymentMethodEntity[];
|
|
1843
|
+
currencies?: MethodCurrencyEntity[];
|
|
1844
|
+
intents?: IntentEntity[];
|
|
1845
|
+
}
|
|
1846
|
+
type DepositFundActivityType = 'DEPOSIT_RECEIVED' | 'FUNDS_ADDED' | 'WITHDRAWN' | 'CLOSED';
|
|
1847
|
+
/**
|
|
1848
|
+
* Chronological fund-movement log for a deposit.
|
|
1849
|
+
* One row per on-chain fund event (deposit, add, withdraw, close).
|
|
1850
|
+
*/
|
|
1851
|
+
type DepositFundActivityEntity = WithOverrides<DepositFundActivity, {
|
|
1852
|
+
activityType: DepositFundActivityType;
|
|
1853
|
+
}>;
|
|
1854
|
+
/**
|
|
1855
|
+
* Per-deposit daily rollup snapshot.
|
|
1856
|
+
* One row per deposit per day (UTC-aligned, 86400s buckets).
|
|
1857
|
+
*/
|
|
1858
|
+
type DepositDailySnapshotEntity = DepositDailySnapshot;
|
|
1859
|
+
interface DepositEventEntity {
|
|
1860
|
+
id: string;
|
|
1861
|
+
depositId: string;
|
|
1862
|
+
depositor: string;
|
|
1863
|
+
amount: string;
|
|
1864
|
+
}
|
|
1865
|
+
interface DepositEventsResponse {
|
|
1866
|
+
deposits: DepositEventEntity[];
|
|
1867
|
+
fundsAdded: DepositEventEntity[];
|
|
1868
|
+
withdrawals: DepositEventEntity[];
|
|
1869
|
+
}
|
|
1870
|
+
interface IntentFulfilledEntity {
|
|
1871
|
+
intentHash: string;
|
|
1872
|
+
amount: string;
|
|
1873
|
+
isManualRelease: boolean;
|
|
1874
|
+
fundsTransferredTo?: string | null;
|
|
1875
|
+
}
|
|
1876
|
+
interface IntentFulfillmentAmountsEntity {
|
|
1877
|
+
intentHash: string;
|
|
1878
|
+
releasedAmount?: string | null;
|
|
1879
|
+
takerAmountNetFees?: string | null;
|
|
1880
|
+
}
|
|
1881
|
+
type RateManagerEntity = RateManager;
|
|
1882
|
+
type RateManagerRateEntity = RateManagerRate;
|
|
1883
|
+
interface RateManagerDelegationEntity {
|
|
1884
|
+
id: string;
|
|
1885
|
+
chainId: number;
|
|
1886
|
+
rateManagerId: string;
|
|
1887
|
+
rateManagerAddress?: string | null;
|
|
1888
|
+
depositId: string;
|
|
1889
|
+
delegatedAt?: string | null;
|
|
1890
|
+
createdAt: string;
|
|
1891
|
+
updatedAt: string;
|
|
1892
|
+
}
|
|
1893
|
+
type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
|
|
1894
|
+
rateManagerAddress?: string | null;
|
|
1895
|
+
}>;
|
|
1896
|
+
type ManagerStatsEntity = ManagerStats;
|
|
1897
|
+
type ManagerDailySnapshotEntity = ManagerDailySnapshot;
|
|
1898
|
+
type MakerProfitSnapshotEntity = MakerProfitSnapshot;
|
|
1899
|
+
interface ManualRateUpdateEntity {
|
|
1900
|
+
id: string;
|
|
1901
|
+
rateManagerId: string;
|
|
1902
|
+
paymentMethod: string;
|
|
1903
|
+
/** Canonical V2.2 field. */
|
|
1904
|
+
currencyCode?: string;
|
|
1905
|
+
currency: string;
|
|
1906
|
+
/** Canonical V2.2 field. */
|
|
1907
|
+
rate?: string;
|
|
1908
|
+
minRate: string;
|
|
1909
|
+
}
|
|
1910
|
+
interface OracleConfigUpdateEntity {
|
|
1911
|
+
id: string;
|
|
1912
|
+
rateManagerId: string;
|
|
1913
|
+
escrow?: string;
|
|
1914
|
+
depositIdOnContract?: string;
|
|
1915
|
+
paymentMethod: string;
|
|
1916
|
+
/** Canonical V2.2 field. */
|
|
1917
|
+
currencyCode?: string;
|
|
1918
|
+
currency: string;
|
|
1919
|
+
/** Canonical V2.2 floor field. */
|
|
1920
|
+
floorFixed?: string;
|
|
1921
|
+
/** Canonical V2.2 floor field. */
|
|
1922
|
+
floorSpreadBps?: number;
|
|
1923
|
+
/** Canonical V2.2 floor field. */
|
|
1924
|
+
oracleAdapter?: string;
|
|
1925
|
+
adapter?: string;
|
|
1926
|
+
spreadBps?: number;
|
|
1927
|
+
maxStaleness?: string;
|
|
1928
|
+
adapterConfig?: string;
|
|
1929
|
+
enabled?: boolean;
|
|
1930
|
+
}
|
|
1931
|
+
interface RateManagerListItem {
|
|
1932
|
+
manager: RateManagerEntity;
|
|
1933
|
+
aggregate?: ManagerAggregateStatsEntity | null;
|
|
1934
|
+
}
|
|
1935
|
+
interface RateManagerDetail {
|
|
1936
|
+
manager: RateManagerEntity;
|
|
1937
|
+
rates: RateManagerRateEntity[];
|
|
1938
|
+
aggregate?: ManagerAggregateStatsEntity | null;
|
|
1939
|
+
recentStats: ManagerStatsEntity[];
|
|
1940
|
+
delegations: RateManagerDelegationEntity[];
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
type DepositOrderField = 'remainingDeposits' | 'outstandingIntentAmount' | 'totalAmountTaken' | 'totalWithdrawn' | 'updatedAt' | 'timestamp';
|
|
1944
|
+
type OrderDirection$1 = 'asc' | 'desc';
|
|
1945
|
+
type DepositFilter = Partial<{
|
|
1946
|
+
status: 'ACTIVE' | 'CLOSED';
|
|
1947
|
+
depositor: string;
|
|
1948
|
+
delegate: string;
|
|
1949
|
+
/** True to only include deposits with a non-zero delegate, false for zero delegate. */
|
|
1950
|
+
delegateIsSet: boolean;
|
|
1951
|
+
chainId: number;
|
|
1952
|
+
escrowAddress: string;
|
|
1953
|
+
escrowAddresses: string[];
|
|
1954
|
+
minLiquidity: string;
|
|
1955
|
+
acceptingIntents: boolean;
|
|
1956
|
+
}>;
|
|
1957
|
+
type PaginationOptions = Partial<{
|
|
1958
|
+
limit: number;
|
|
1959
|
+
offset: number;
|
|
1960
|
+
orderBy: DepositOrderField;
|
|
1961
|
+
orderDirection: OrderDirection$1;
|
|
1962
|
+
}>;
|
|
1963
|
+
declare class IndexerDepositService {
|
|
1964
|
+
private client;
|
|
1965
|
+
constructor(client: IndexerClient);
|
|
1966
|
+
private queryWithLegacyFallback;
|
|
1967
|
+
private buildDepositWhere;
|
|
1968
|
+
private buildOrderBy;
|
|
1969
|
+
private fetchRelations;
|
|
1970
|
+
private fetchIntents;
|
|
1971
|
+
private attachRelations;
|
|
1972
|
+
fetchDeposits(filter?: DepositFilter, pagination?: PaginationOptions): Promise<DepositEntity[]>;
|
|
1973
|
+
fetchDepositsWithRelations(filter?: DepositFilter, pagination?: PaginationOptions, options?: {
|
|
1974
|
+
includeIntents?: boolean;
|
|
1975
|
+
intentStatuses?: IntentStatus[];
|
|
1976
|
+
}): Promise<DepositWithRelations[]>;
|
|
1977
|
+
fetchDepositsByIds(ids: string[]): Promise<DepositEntity[]>;
|
|
1978
|
+
fetchDepositsByIdsWithRelations(ids: string[], options?: {
|
|
1979
|
+
includeIntents?: boolean;
|
|
1980
|
+
intentStatuses?: IntentStatus[];
|
|
1981
|
+
}): Promise<DepositWithRelations[]>;
|
|
1982
|
+
fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
|
|
1983
|
+
fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
|
|
1984
|
+
fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
|
|
1985
|
+
fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
|
|
1986
|
+
fetchDepositWithRelations(id: string, options?: {
|
|
1987
|
+
includeIntents?: boolean;
|
|
1988
|
+
intentStatuses?: IntentStatus[];
|
|
1989
|
+
}): Promise<DepositWithRelations | null>;
|
|
1990
|
+
fetchExpiredIntents(params: {
|
|
1991
|
+
now: bigint | string;
|
|
1992
|
+
depositIds: string[];
|
|
1993
|
+
limit?: number;
|
|
1994
|
+
}): Promise<IntentEntity[]>;
|
|
1995
|
+
fetchFulfilledIntentEvents(intentHashes: string[]): Promise<IntentFulfilledEntity[]>;
|
|
1996
|
+
fetchIntentFulfillmentAmounts(intentHash: string): Promise<IntentFulfillmentAmountsEntity | null>;
|
|
1997
|
+
resolvePayeeHash(params: {
|
|
1998
|
+
escrowAddress?: string | null;
|
|
1999
|
+
depositId?: string | number | bigint | null;
|
|
2000
|
+
paymentMethodHash?: string | null;
|
|
2001
|
+
}): Promise<string | null>;
|
|
2002
|
+
fetchDepositEvents(depositIdOnContract: string, options?: {
|
|
2003
|
+
escrowAddress?: string | null;
|
|
2004
|
+
depositor?: string | null;
|
|
2005
|
+
}): Promise<DepositEventsResponse>;
|
|
2006
|
+
fetchDepositsByPayeeHash(payeeHash: string, options?: {
|
|
2007
|
+
paymentMethodHash?: string;
|
|
2008
|
+
limit?: number;
|
|
2009
|
+
includeIntents?: boolean;
|
|
2010
|
+
intentStatuses?: IntentStatus[];
|
|
2011
|
+
}): Promise<DepositWithRelations[]>;
|
|
2012
|
+
/**
|
|
2013
|
+
* Fetch chronological fund activities for a deposit.
|
|
1939
2014
|
*/
|
|
1940
|
-
|
|
2015
|
+
fetchDepositFundActivities(compositeDepositId: string): Promise<DepositFundActivityEntity[]>;
|
|
1941
2016
|
/**
|
|
1942
|
-
*
|
|
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).
|
|
2017
|
+
* Fetch fund activities across all deposits for a maker address.
|
|
1946
2018
|
*/
|
|
1947
|
-
|
|
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;
|
|
2019
|
+
fetchMakerFundActivities(depositor: string, limit?: number): Promise<DepositFundActivityEntity[]>;
|
|
1960
2020
|
/**
|
|
1961
|
-
*
|
|
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.
|
|
2021
|
+
* Fetch daily snapshots for a deposit, ordered by day ascending.
|
|
1965
2022
|
*/
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
type
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2023
|
+
fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
|
|
2024
|
+
fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
type OrderDirection = 'asc' | 'desc';
|
|
2028
|
+
type RateManagerOrderField = 'createdAt' | 'updatedAt' | 'fee' | 'maxFee' | 'rateManagerId' | 'currentDelegatedBalance' | 'totalFilledVolume';
|
|
2029
|
+
type RateManagerFilter = Partial<{
|
|
2030
|
+
manager: string;
|
|
2031
|
+
name: string;
|
|
2032
|
+
hasHook: boolean;
|
|
2033
|
+
maxFee: string;
|
|
2034
|
+
rateManagerIds: string[];
|
|
2035
|
+
}>;
|
|
2036
|
+
type RateManagerPaginationOptions = Partial<{
|
|
2037
|
+
limit: number;
|
|
2038
|
+
offset: number;
|
|
2039
|
+
orderBy: RateManagerOrderField;
|
|
2040
|
+
orderDirection: OrderDirection;
|
|
2041
|
+
}>;
|
|
2042
|
+
type RateManagerDelegationPaginationOptions = Partial<{
|
|
2043
|
+
limit: number;
|
|
2044
|
+
offset: number;
|
|
2045
|
+
orderBy: 'createdAt' | 'updatedAt' | 'depositId' | 'delegatedAt';
|
|
2046
|
+
orderDirection: OrderDirection;
|
|
2047
|
+
rateManagerAddress: string;
|
|
2048
|
+
}>;
|
|
2049
|
+
declare function compareEventCursorIdsByRecency(leftId?: string | null, rightId?: string | null): number;
|
|
2050
|
+
declare class IndexerRateManagerService {
|
|
2051
|
+
private client;
|
|
2052
|
+
constructor(client: IndexerClient);
|
|
2053
|
+
private buildRateManagerScopeWhere;
|
|
2054
|
+
private buildWhere;
|
|
2055
|
+
private buildAggregateWhere;
|
|
2056
|
+
private buildLegacyAggregateWhere;
|
|
2057
|
+
private buildOrderBy;
|
|
2058
|
+
private toRateManagerListItems;
|
|
2059
|
+
private applyHookFilter;
|
|
2060
|
+
private queryRateManagerList;
|
|
2061
|
+
private buildDelegationOrderBy;
|
|
2062
|
+
private buildLegacyDelegationOrderBy;
|
|
2063
|
+
private fetchCurrentRateManagerDepositScopes;
|
|
2064
|
+
private fetchHistoricalRateManagerDepositScopes;
|
|
2065
|
+
fetchRateManagers(pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter): Promise<RateManagerListItem[]>;
|
|
2066
|
+
fetchRateManagerDetail(rateManagerId: string, options?: {
|
|
2067
|
+
statsLimit?: number;
|
|
2068
|
+
rateManagerAddress?: string | null;
|
|
2069
|
+
}): Promise<RateManagerDetail | null>;
|
|
2070
|
+
fetchRateManagerDelegations(rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions): Promise<RateManagerDelegationEntity[]>;
|
|
2071
|
+
fetchManagerDailySnapshots(rateManagerId: string, options?: {
|
|
2072
|
+
limit?: number;
|
|
2073
|
+
rateManagerAddress?: string | null;
|
|
2074
|
+
}): Promise<ManagerDailySnapshotEntity[]>;
|
|
2075
|
+
fetchDelegationForDeposit(depositId: string, options?: {
|
|
2076
|
+
escrowAddress?: string | null;
|
|
2077
|
+
}): Promise<RateManagerDelegationEntity | null>;
|
|
2078
|
+
fetchManualRateUpdates(rateManagerId: string, options?: {
|
|
2079
|
+
limit?: number;
|
|
2080
|
+
rateManagerAddress?: string | null;
|
|
2081
|
+
}): Promise<ManualRateUpdateEntity[]>;
|
|
2082
|
+
fetchOracleConfigUpdates(rateManagerId: string, options?: {
|
|
2083
|
+
limit?: number;
|
|
2084
|
+
rateManagerAddress?: string | null;
|
|
2085
|
+
}): Promise<OracleConfigUpdateEntity[]>;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
type FulfillmentRecord = {
|
|
2089
|
+
id: string;
|
|
2090
|
+
intentHash: string;
|
|
2091
|
+
amount: string;
|
|
2092
|
+
isManualRelease: boolean;
|
|
2093
|
+
fundsTransferredTo: string | null;
|
|
1992
2094
|
};
|
|
1993
|
-
type
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
price: string;
|
|
1998
|
-
availableTokenAmount: string;
|
|
1999
|
-
availableFiatAmount: string;
|
|
2000
|
-
intentAmountMin: string;
|
|
2001
|
-
intentAmountMax: string;
|
|
2002
|
-
paymentPlatform: string;
|
|
2095
|
+
type PaymentVerifiedRecord = {
|
|
2096
|
+
id: string;
|
|
2097
|
+
intentHash: string;
|
|
2098
|
+
method: string;
|
|
2003
2099
|
currency: string;
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
chainId: number;
|
|
2009
|
-
offchainId?: string;
|
|
2010
|
-
telegramUsername?: string;
|
|
2100
|
+
amount: string;
|
|
2101
|
+
timestamp: string;
|
|
2102
|
+
paymentId: string | null;
|
|
2103
|
+
payeeId: string | null;
|
|
2011
2104
|
};
|
|
2012
|
-
type
|
|
2013
|
-
|
|
2014
|
-
|
|
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[];
|
|
2105
|
+
type FulfillmentAndPaymentResponse = {
|
|
2106
|
+
Orchestrator_V21_IntentFulfilled: FulfillmentRecord[];
|
|
2107
|
+
UnifiedVerifier_V21_PaymentVerified: PaymentVerifiedRecord[];
|
|
2023
2108
|
};
|
|
2109
|
+
declare function fetchFulfillmentAndPayment(client: IndexerClient, intentHash: string): Promise<FulfillmentAndPaymentResponse>;
|
|
2024
2110
|
|
|
2025
|
-
|
|
2026
|
-
type
|
|
2027
|
-
|
|
2111
|
+
type RedeemReferralCodeSignatureOptions = RedeemReferralCodeSignatureOptions$1;
|
|
2112
|
+
type ReferralBearerWriteOptions = ReferralBearerWriteOptions$1;
|
|
2113
|
+
type ReferralReadOptions = ReferralReadOptions$1;
|
|
2114
|
+
type ReferralSignatureOptions = ReferralSignatureOptions$1;
|
|
2115
|
+
type UpdateReferralCodeSignatureOptions = UpdateReferralCodeSignatureOptions$1;
|
|
2028
2116
|
/**
|
|
2029
2117
|
* Configuration options for creating a Zkp2pClient instance.
|
|
2030
2118
|
*
|
|
@@ -2046,6 +2134,8 @@ type Zkp2pNextOptions = {
|
|
|
2046
2134
|
chainId: number;
|
|
2047
2135
|
/** Optional RPC URL override (defaults to wallet's chain RPC) */
|
|
2048
2136
|
rpcUrl?: string;
|
|
2137
|
+
/** Optional viem transport override for RPC reads */
|
|
2138
|
+
rpcTransport?: Transport;
|
|
2049
2139
|
/** Runtime environment: 'production', 'preproduction', or 'staging' (defaults to 'production') */
|
|
2050
2140
|
runtimeEnv?: RuntimeEnv;
|
|
2051
2141
|
/** Optional indexer URL override */
|
|
@@ -2176,11 +2266,7 @@ type CurrencyOracleRateConfig = {
|
|
|
2176
2266
|
maxStaleness: number;
|
|
2177
2267
|
};
|
|
2178
2268
|
/** On-chain currency tuple shape passed to EscrowV2 contract methods. */
|
|
2179
|
-
type OnchainCurrencyEntry =
|
|
2180
|
-
code: `0x${string}`;
|
|
2181
|
-
minConversionRate: bigint;
|
|
2182
|
-
oracleRateConfig?: CurrencyOracleRateConfig;
|
|
2183
|
-
};
|
|
2269
|
+
type OnchainCurrencyEntry = OnchainCurrency;
|
|
2184
2270
|
/**
|
|
2185
2271
|
* SDK client for ZKP2P liquidity providers (offramp peers).
|
|
2186
2272
|
*
|
|
@@ -2227,7 +2313,7 @@ type OnchainCurrencyEntry = {
|
|
|
2227
2313
|
* transport: http(),
|
|
2228
2314
|
* });
|
|
2229
2315
|
*
|
|
2230
|
-
* const client = new
|
|
2316
|
+
* const client = new Zkp2pClient({
|
|
2231
2317
|
* walletClient,
|
|
2232
2318
|
* chainId: base.id,
|
|
2233
2319
|
* });
|
|
@@ -2263,7 +2349,7 @@ declare class Zkp2pClient {
|
|
|
2263
2349
|
readonly publicClient: PublicClient;
|
|
2264
2350
|
/** The chain ID this client is configured for */
|
|
2265
2351
|
readonly chainId: number;
|
|
2266
|
-
/** Runtime environment ('production' or 'staging') */
|
|
2352
|
+
/** Runtime environment ('production', 'preproduction', or 'staging') */
|
|
2267
2353
|
readonly runtimeEnv: RuntimeEnv;
|
|
2268
2354
|
/** Escrow contract address */
|
|
2269
2355
|
readonly escrowAddress: Address;
|
|
@@ -2327,6 +2413,7 @@ declare class Zkp2pClient {
|
|
|
2327
2413
|
private readonly _pvReader;
|
|
2328
2414
|
private readonly _vaultOps;
|
|
2329
2415
|
private readonly _intentOps;
|
|
2416
|
+
private readonly _referralOps;
|
|
2330
2417
|
private _rateManagerInitError?;
|
|
2331
2418
|
/**
|
|
2332
2419
|
* Creates a new Zkp2pClient instance.
|
|
@@ -2341,9 +2428,6 @@ declare class Zkp2pClient {
|
|
|
2341
2428
|
private parseRawDepositId;
|
|
2342
2429
|
private stripTrailingSlash;
|
|
2343
2430
|
private defaultAttestationServiceForBaseApiUrl;
|
|
2344
|
-
private resolveAuthorizationToken;
|
|
2345
|
-
private normalizeOracleRateConfig;
|
|
2346
|
-
private escrowCurrencyHasOracleConfig;
|
|
2347
2431
|
/**
|
|
2348
2432
|
* Normalizes currency tuples by appending an empty `oracleRateConfig` when the ABI
|
|
2349
2433
|
* requires it and the caller hasn't provided one.
|
|
@@ -2352,11 +2436,7 @@ declare class Zkp2pClient {
|
|
|
2352
2436
|
supportsInlineOracleRateConfig(params?: {
|
|
2353
2437
|
escrowAddress?: Address;
|
|
2354
2438
|
}): boolean;
|
|
2355
|
-
private parseManagerFeeFromRead;
|
|
2356
|
-
private getAbiFunction;
|
|
2357
2439
|
private resolveAbiFunctionName;
|
|
2358
|
-
private abiTupleHasComponent;
|
|
2359
|
-
private abiFunctionHasInput;
|
|
2360
2440
|
private resolveEscrowAddressOrThrow;
|
|
2361
2441
|
private prepareCreateRateManagerTransaction;
|
|
2362
2442
|
private prepareSetVaultRateTransaction;
|
|
@@ -2377,6 +2457,12 @@ declare class Zkp2pClient {
|
|
|
2377
2457
|
private lookupIntentEscrowOnchain;
|
|
2378
2458
|
private warnOrchestratorFallback;
|
|
2379
2459
|
private resolveOrchestratorContext;
|
|
2460
|
+
/**
|
|
2461
|
+
* Spread helper for viem requests.
|
|
2462
|
+
* justified: TxOverrides mixes legacy gasPrice with EIP-1559 fee fields, which
|
|
2463
|
+
* viem's discriminated request unions reject; keep the suppression in one place.
|
|
2464
|
+
*/
|
|
2465
|
+
private applyTxOverrides;
|
|
2380
2466
|
/**
|
|
2381
2467
|
* Simulate a contract call (validation only) and send with ERC-8021 attribution.
|
|
2382
2468
|
* Referrer codes are stripped from overrides for simulation and appended to calldata.
|
|
@@ -2518,7 +2604,7 @@ declare class Zkp2pClient {
|
|
|
2518
2604
|
* Fetches deposits from the indexer with optional filtering and pagination.
|
|
2519
2605
|
* Use for advanced queries across all deposits, not just by owner.
|
|
2520
2606
|
*/
|
|
2521
|
-
getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity
|
|
2607
|
+
getDeposits: (filter?: DepositFilter, pagination?: PaginationOptions) => Promise<DepositEntity[]>;
|
|
2522
2608
|
/**
|
|
2523
2609
|
* Fetches deposits with their related payment methods and optionally intents.
|
|
2524
2610
|
*/
|
|
@@ -2537,19 +2623,19 @@ declare class Zkp2pClient {
|
|
|
2537
2623
|
/**
|
|
2538
2624
|
* Fetches intents for multiple deposits.
|
|
2539
2625
|
*/
|
|
2540
|
-
getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity
|
|
2626
|
+
getIntentsForDeposits: (depositIds: string[], statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
|
|
2541
2627
|
/**
|
|
2542
2628
|
* Fetches all intents created by a specific owner address.
|
|
2543
2629
|
*/
|
|
2544
|
-
getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity
|
|
2630
|
+
getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
|
|
2545
2631
|
/**
|
|
2546
2632
|
* Fetches fulfilled intents for a vault by rate manager ID.
|
|
2547
2633
|
*/
|
|
2548
|
-
getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity
|
|
2634
|
+
getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
|
|
2549
2635
|
/**
|
|
2550
2636
|
* Fetches a single intent by hash.
|
|
2551
2637
|
*/
|
|
2552
|
-
getIntentByHash: (intentHash: string) => Promise<IntentEntity
|
|
2638
|
+
getIntentByHash: (intentHash: string) => Promise<IntentEntity | null>;
|
|
2553
2639
|
/**
|
|
2554
2640
|
* Fetches intents that have expired.
|
|
2555
2641
|
*/
|
|
@@ -2557,7 +2643,7 @@ declare class Zkp2pClient {
|
|
|
2557
2643
|
now: bigint | string;
|
|
2558
2644
|
depositIds: string[];
|
|
2559
2645
|
limit?: number;
|
|
2560
|
-
}) => Promise<IntentEntity
|
|
2646
|
+
}) => Promise<IntentEntity[]>;
|
|
2561
2647
|
/**
|
|
2562
2648
|
* Fetches fulfillment events for completed intents. `amount` is the net
|
|
2563
2649
|
* USDC transferred to the taker after protocol/referrer fees.
|
|
@@ -2585,7 +2671,7 @@ declare class Zkp2pClient {
|
|
|
2585
2671
|
* Fetches deposits by their composite IDs.
|
|
2586
2672
|
* @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
|
|
2587
2673
|
*/
|
|
2588
|
-
getDepositsByIds: (ids: string[]) => Promise<DepositEntity
|
|
2674
|
+
getDepositsByIds: (ids: string[]) => Promise<DepositEntity[]>;
|
|
2589
2675
|
/**
|
|
2590
2676
|
* Fetches deposits by their composite IDs with all related data.
|
|
2591
2677
|
* @param ids - Array of composite IDs in format "chainId_escrowAddress_depositId"
|
|
@@ -2597,7 +2683,7 @@ declare class Zkp2pClient {
|
|
|
2597
2683
|
/**
|
|
2598
2684
|
* Fetches maker profit snapshots for the provided deposits.
|
|
2599
2685
|
*/
|
|
2600
|
-
getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity
|
|
2686
|
+
getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
|
|
2601
2687
|
/**
|
|
2602
2688
|
* Fetches rate managers (vaults) with aggregate stats.
|
|
2603
2689
|
*/
|
|
@@ -2637,15 +2723,15 @@ declare class Zkp2pClient {
|
|
|
2637
2723
|
/**
|
|
2638
2724
|
* Fetches chronological fund activities for a specific deposit.
|
|
2639
2725
|
*/
|
|
2640
|
-
getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity
|
|
2726
|
+
getDepositFundActivities: (depositId: string) => Promise<DepositFundActivityEntity[]>;
|
|
2641
2727
|
/**
|
|
2642
2728
|
* Fetches fund activities across all deposits for a maker address.
|
|
2643
2729
|
*/
|
|
2644
|
-
getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity
|
|
2730
|
+
getMakerFundActivities: (depositor: string, limit?: number) => Promise<DepositFundActivityEntity[]>;
|
|
2645
2731
|
/**
|
|
2646
2732
|
* Fetches daily snapshots for a deposit, ordered by day ascending.
|
|
2647
2733
|
*/
|
|
2648
|
-
getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity
|
|
2734
|
+
getDepositDailySnapshots: (depositId: string, limit?: number) => Promise<DepositDailySnapshotEntity[]>;
|
|
2649
2735
|
/**
|
|
2650
2736
|
* Performs a raw GraphQL query against the indexer.
|
|
2651
2737
|
*/
|
|
@@ -2890,12 +2976,7 @@ declare class Zkp2pClient {
|
|
|
2890
2976
|
depositId: bigint | number | string;
|
|
2891
2977
|
paymentMethodHash: `0x${string}`;
|
|
2892
2978
|
currencyHash: `0x${string}`;
|
|
2893
|
-
config:
|
|
2894
|
-
adapter: Address;
|
|
2895
|
-
adapterConfig: `0x${string}`;
|
|
2896
|
-
spreadBps: number;
|
|
2897
|
-
maxStaleness: number;
|
|
2898
|
-
};
|
|
2979
|
+
config: CurrencyOracleRateConfig;
|
|
2899
2980
|
escrowAddress?: Address;
|
|
2900
2981
|
txOverrides?: TxOverrides;
|
|
2901
2982
|
}, Hash>;
|
|
@@ -2918,12 +2999,7 @@ declare class Zkp2pClient {
|
|
|
2918
2999
|
depositId: bigint | number | string;
|
|
2919
3000
|
paymentMethods: `0x${string}`[];
|
|
2920
3001
|
currencies: `0x${string}`[][];
|
|
2921
|
-
configs:
|
|
2922
|
-
adapter: Address;
|
|
2923
|
-
adapterConfig: `0x${string}`;
|
|
2924
|
-
spreadBps: number;
|
|
2925
|
-
maxStaleness: number;
|
|
2926
|
-
}>>;
|
|
3002
|
+
configs: CurrencyOracleRateConfig[][];
|
|
2927
3003
|
escrowAddress?: Address;
|
|
2928
3004
|
txOverrides?: TxOverrides;
|
|
2929
3005
|
}, Hash>;
|
|
@@ -2937,12 +3013,7 @@ declare class Zkp2pClient {
|
|
|
2937
3013
|
code: `0x${string}`;
|
|
2938
3014
|
minConversionRate: bigint | string;
|
|
2939
3015
|
updateOracle: boolean;
|
|
2940
|
-
oracleRateConfig:
|
|
2941
|
-
adapter: Address;
|
|
2942
|
-
adapterConfig: `0x${string}`;
|
|
2943
|
-
spreadBps: number;
|
|
2944
|
-
maxStaleness: number;
|
|
2945
|
-
};
|
|
3016
|
+
oracleRateConfig: CurrencyOracleRateConfig;
|
|
2946
3017
|
}>>;
|
|
2947
3018
|
escrowAddress?: Address;
|
|
2948
3019
|
txOverrides?: TxOverrides;
|
|
@@ -3482,7 +3553,6 @@ declare class Zkp2pClient {
|
|
|
3482
3553
|
* Includes fetching intent inputs and calling attestation service.
|
|
3483
3554
|
*/
|
|
3484
3555
|
private prepareFulfillIntent;
|
|
3485
|
-
private defaultAttestationService;
|
|
3486
3556
|
/**
|
|
3487
3557
|
* **Supporting Method** - Fetches quotes for available liquidity.
|
|
3488
3558
|
*
|
|
@@ -3556,42 +3626,48 @@ declare class Zkp2pClient {
|
|
|
3556
3626
|
timeoutMs?: number;
|
|
3557
3627
|
}): Promise<GetTakerTierResponse>;
|
|
3558
3628
|
/**
|
|
3559
|
-
* Fetch
|
|
3560
|
-
*
|
|
3629
|
+
* Fetch a referral dashboard. Pass `address` for a public wallet-keyed read;
|
|
3630
|
+
* omit it to use the authenticated caller mode.
|
|
3561
3631
|
*/
|
|
3562
|
-
getReferralDashboard(opts?:
|
|
3563
|
-
baseApiUrl?: string;
|
|
3564
|
-
timeoutMs?: number;
|
|
3565
|
-
authorizationToken?: string;
|
|
3566
|
-
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
3567
|
-
}): Promise<ReferralDashboardResponse>;
|
|
3632
|
+
getReferralDashboard(opts?: ReferralReadOptions): Promise<ReferralDashboardResponse>;
|
|
3568
3633
|
/**
|
|
3569
|
-
* Fetch
|
|
3634
|
+
* Fetch referral earnings. Pass `address` for a public wallet-keyed read;
|
|
3635
|
+
* omit it to use the authenticated caller mode.
|
|
3570
3636
|
*/
|
|
3571
|
-
getReferralEarnings(opts?:
|
|
3572
|
-
baseApiUrl?: string;
|
|
3573
|
-
timeoutMs?: number;
|
|
3574
|
-
authorizationToken?: string;
|
|
3575
|
-
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
3576
|
-
}): Promise<ReferralEarningsResponse>;
|
|
3637
|
+
getReferralEarnings(opts?: ReferralReadOptions): Promise<ReferralEarningsResponse>;
|
|
3577
3638
|
/**
|
|
3578
|
-
*
|
|
3639
|
+
* Publicly look up a referral code's owner wallet and active status.
|
|
3579
3640
|
*/
|
|
3580
|
-
|
|
3641
|
+
lookupReferralCode(code: string, opts?: {
|
|
3581
3642
|
baseApiUrl?: string;
|
|
3582
3643
|
timeoutMs?: number;
|
|
3583
|
-
|
|
3584
|
-
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
3585
|
-
}): Promise<RedeemReferralCodeResponse>;
|
|
3644
|
+
}): Promise<ReferralCodeLookupResponse>;
|
|
3586
3645
|
/**
|
|
3587
|
-
*
|
|
3646
|
+
* Create or fetch the authenticated caller's referral code with bearer auth.
|
|
3588
3647
|
*/
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3648
|
+
createReferralCode(opts?: ReferralBearerWriteOptions): Promise<CreateReferralCodeResponse>;
|
|
3649
|
+
/**
|
|
3650
|
+
* Create or fetch the wallet's referral code with EIP-712 signature auth.
|
|
3651
|
+
*/
|
|
3652
|
+
createReferralCodeWithSignature(opts?: ReferralSignatureOptions): Promise<CreateReferralCodeResponse>;
|
|
3653
|
+
/**
|
|
3654
|
+
* Apply another user's referral code with bearer auth.
|
|
3655
|
+
*/
|
|
3656
|
+
redeemReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<RedeemReferralCodeResponse>;
|
|
3657
|
+
/**
|
|
3658
|
+
* Apply another user's referral code with EIP-712 signature auth. If
|
|
3659
|
+
* `referrerWalletAddress` is omitted, the SDK looks up the code first and signs
|
|
3660
|
+
* the current owner wallet into the redeem payload.
|
|
3661
|
+
*/
|
|
3662
|
+
redeemReferralCodeWithSignature(code: string, opts?: RedeemReferralCodeSignatureOptions): Promise<RedeemReferralCodeResponse>;
|
|
3663
|
+
/**
|
|
3664
|
+
* Customize the authenticated caller's referral code with bearer auth.
|
|
3665
|
+
*/
|
|
3666
|
+
updateReferralCode(code: string, opts?: ReferralBearerWriteOptions): Promise<UpdateReferralCodeResponse>;
|
|
3667
|
+
/**
|
|
3668
|
+
* Customize the wallet's referral code with EIP-712 signature auth.
|
|
3669
|
+
*/
|
|
3670
|
+
updateReferralCodeWithSignature(code: string, opts: UpdateReferralCodeSignatureOptions): Promise<UpdateReferralCodeResponse>;
|
|
3595
3671
|
/**
|
|
3596
3672
|
* The signed `credentialValidatedAt` field is an upload-time freshness witness minted by
|
|
3597
3673
|
* attestation-service. `credentialExpiresAt` carries an upstream session expiry hint when one
|
|
@@ -3648,18 +3724,10 @@ declare class Zkp2pClient {
|
|
|
3648
3724
|
}): Promise<CuratorSellerVerifyResponse>;
|
|
3649
3725
|
private requireProtocolViewer;
|
|
3650
3726
|
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
3727
|
private buildProtocolViewerContexts;
|
|
3659
3728
|
private isProtocolViewerDepositPopulated;
|
|
3660
3729
|
private isProtocolViewerIntentPopulated;
|
|
3661
3730
|
private buildDepositViewFromEscrowDeposit;
|
|
3662
|
-
private convertIndexerDepositToPvView;
|
|
3663
3731
|
private getPvAccountDepositsFromIndexer;
|
|
3664
3732
|
/**
|
|
3665
3733
|
* Fetches a deposit directly from on-chain ProtocolViewer contract.
|
|
@@ -3809,4 +3877,4 @@ type SendBatchFn = (txs: Array<{
|
|
|
3809
3877
|
value?: bigint;
|
|
3810
3878
|
}>) => Promise<string>;
|
|
3811
3879
|
|
|
3812
|
-
export { type
|
|
3880
|
+
export { type SignalIntentReferralFee as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type GetTakerTierRequest as E, type GetTakerTierResponse as F, type GoogleOAuthSellerCredentialPlatform as G, type GetDepositBundleParams as H, type IntentEntity as I, type GetDepositBundleResponse as J, type GetOrderbookParams as K, type GetOrderbookResponse as L, type CurrencyType as M, type PaymentMethodCatalog as N, type TxOverrides as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type ReferralBearerWriteOptions as W, type ReferralReadOptions as X, type ReferralSignatureOptions as Y, Zkp2pClient as Z, type RedeemReferralCodeSignatureOptions as _, type IdentityAttestationRequestBody as a, type VenmoCredentialUploadInput as a$, type SignalIntentMethodParams as a0, type FulfillIntentMethodParams as a1, type CancelIntentMethodParams as a2, type UpdateReferralCodeSignatureOptions as a3, type Zkp2pNextOptions as a4, type AuthorizationTokenProvider as a5, type TimeoutConfig as a6, type ActionCallback as a7, type ReferralRedemption as a8, type ReferralSignatureBody as a9, type NearbyQuote as aA, type NearbySuggestions as aB, type ApiDeposit as aC, type DepositVerifier as aD, type DepositVerifierCurrency as aE, type DepositStatus$1 as aF, type GetDepositByIdRequest as aG, type GetDepositByIdResponse as aH, type Intent as aI, type ApiIntentStatus as aJ, type GetOwnerIntentsRequest as aK, type GetOwnerIntentsResponse as aL, type GetIntentsByDepositRequest as aM, type GetIntentsByDepositResponse as aN, type GetIntentByHashRequest as aO, type GetIntentByHashResponse as aP, type RegisterPayeeDetailsRequest as aQ, type RegisterPayeeDetailsResponse as aR, type SellerPlatform as aS, type VenmoSessionMaterial as aT, type CashAppSessionMaterial as aU, type WiseSessionMaterial as aV, type WiseProfileInfo as aW, type WiseProfileSelectionRequired as aX, type WiseProfileNotFound as aY, type PayPalGoogleOAuthSellerCredentialUploadBody as aZ, type VenmoGoogleOAuthSellerCredentialUploadBody as a_, type CreateDepositParams as aa, type CreateDepositConversionRate as ab, type Range as ac, type WithdrawDepositParams as ad, type SignalIntentParams as ae, type FulfillIntentParams as af, type ReleaseFundsToPayerParams as ag, type CancelIntentParams as ah, type BestByPlatformResponseObject as ai, type GetBestByPlatformResponse as aj, type GetBestByPlatformResponseObject as ak, type GetPlatformQuote as al, type PlatformQuote as am, type QuoteRequest as an, type GetNearbyQuote as ao, type GetNearbySuggestions as ap, type GetQuoteResponse as aq, type GetQuoteResponseObject as ar, type GetQuoteSingleResponse as as, type QuoteResponse as at, type QuoteResponseObject as au, type QuoteSingleResponse as av, type QuoteIntentResponse as aw, type QuoteFeesResponse as ax, type FiatResponse as ay, type TokenResponse as az, type AttestationServiceSellerVerifyResponse as b, type RateManagerEntity as b$, type CashAppCredentialUploadInput as b0, type WiseCredentialUploadInput as b1, type SellerCredentialUploadInputByPlatform as b2, type SellerCiphertextBundle as b3, type SellerSignedCiphertextBundle as b4, type SellerVerifyIntentDetails as b5, type SellerVerifyInput as b6, type SellerProbeInput as b7, type SellerCredentialBundleUpload as b8, type SellerCredentialStatusValue as b9, type IdentityAttestationParams as bA, type MakerIdentityAttestationRequestBody as bB, type MakerIdentityPlatform as bC, type OnchainCurrency as bD, type DepositVerifierData as bE, type PreparedTransaction as bF, type OrderStats as bG, type DepositIntentStatistics as bH, type TakerTier as bI, type TakerTierVolumeBreakdown as bJ, type TakerTierStats as bK, type TakerTierSource as bL, type PlatformLimit as bM, type PlatformRiskLevel as bN, type OrderbookEntry as bO, IndexerClient as bP, defaultIndexerEndpoint as bQ, IndexerDepositService as bR, IndexerRateManagerService as bS, compareEventCursorIdsByRecency as bT, fetchFulfillmentAndPayment as bU, type DepositEntity as bV, type IntentFulfilledEntity as bW, type IntentFulfillmentAmountsEntity as bX, type DepositPaymentMethodEntity as bY, type MethodCurrencyEntity as bZ, type IntentStatus as b_, type SellerCredentialStatus as ba, type SellerVerifyProxyBody as bb, type SellerTypedDataField as bc, type SellerTypedDataSpec as bd, type SellerPaymentTypedDataValue as be, type SellerAttestationOutput as bf, type SellerCredentialProbeResponse as bg, type FulfillIntentAttestationResponse as bh, type AttestationServiceSellerCredentialProbeResponse as bi, type BuyerTeePaymentParams as bj, type BuyerTeePaymentProofInput as bk, type BuyerTeeSessionMaterial as bl, type CuratorSellerCredentialStatusResponse as bm, type CuratorSellerVerifyResponse as bn, type RegisteredSellerCredentialPlatform as bo, type UploadSellerCredentialParams as bp, type RegisteredUploadSellerCredentialParams as bq, type UploadSellerCredentialOptions as br, type GetSellerCredentialStatusParams as bs, type UploadPayPalGoogleOAuthSellerCredentialParams as bt, type UploadVenmoGoogleOAuthSellerCredentialParams as bu, type UploadGoogleOAuthSellerCredentialParams as bv, type VerifySellerPaymentParams as bw, type IdentityAttestationActionType as bx, type IdentityAttestationOutput as by, type IdentityAttestationOutputFor as bz, type SellerCredentialUploadInput as c, ZERO_ADDRESS as c$, type RateManagerRateEntity as c0, type RateManagerDelegationEntity as c1, type ManagerAggregateStatsEntity as c2, type ManagerStatsEntity as c3, type ManagerDailySnapshotEntity as c4, type RateManagerListItem as c5, type RateManagerDetail as c6, type ManualRateUpdateEntity as c7, type OracleConfigUpdateEntity as c8, type DepositFundActivityEntity as c9, getRateManagerContracts as cA, getPaymentMethodsCatalog as cB, getGatingServiceAddress as cC, type RuntimeEnv as cD, parseDepositView as cE, parseIntentView as cF, enrichPvDepositView as cG, enrichPvIntentView as cH, type PV_DepositView as cI, type PV_Deposit as cJ, type PV_PaymentMethodData as cK, type PV_Currency as cL, type PV_ReferralFee as cM, type PV_IntentView as cN, type PV_Intent as cO, ZERO_RATE_MANAGER_ID as cP, isZeroRateManagerId as cQ, normalizeRateManagerId as cR, normalizeRegistry as cS, getDelegationRoute as cT, classifyDelegationState as cU, type DelegationRoute as cV, type DelegationState as cW, type DelegationDepositTarget as cX, type BatchResult as cY, type SendTransactionFn as cZ, type SendBatchFn as c_, type DepositDailySnapshotEntity as ca, type DepositFundActivityType as cb, type DepositFilter as cc, type PaginationOptions as cd, type DepositOrderField as ce, type OrderDirection$1 as cf, type RateManagerFilter as cg, type RateManagerPaginationOptions as ch, type RateManagerDelegationPaginationOptions as ci, type RateManagerOrderField as cj, type OrderDirection as ck, type DeploymentEnv as cl, type FulfillmentRecord as cm, type PaymentVerifiedRecord as cn, type FulfillmentAndPaymentResponse as co, PAYMENT_PLATFORMS as cp, type PaymentPlatformType as cq, Currency as cr, currencyInfo as cs, getCurrencyInfoFromHash as ct, getCurrencyInfoFromCountryCode as cu, getCurrencyCodeFromHash as cv, isSupportedCurrencyHash as cw, mapConversionRatesToOnchainMinRate as cx, type CurrencyData as cy, getContracts as cz, type SellerCredentialUploadPlatform as d, asErrorMessage as d0, assertDelegationMethodSupport as d1, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type CreateReferralCodeRequest as h, type ApiAdapterOptions as i, type CreateReferralCodeResponse as j, type ReferralReadRequest as k, type ReferralDashboardResponse as l, type ReferralEarningsResponse as m, type ReferralCodeLookupResponse as n, type RedeemReferralCodeRequest as o, type RedeemReferralCodeResponse as p, type UpdateReferralCodeRequest as q, type UpdateReferralCodeResponse as r, type GoogleOAuthSellerCredentialUploadBodyByPlatform as s, type BestByPlatformResponse as t, type ValidatePayeeDetailsResponse as u, type PostDepositDetailsResponse as v, type GetPayeeDetailsRequest as w, type GetPayeeDetailsResponse as x, type GetOwnerDepositsRequest as y, type GetOwnerDepositsResponse as z };
|