@zkp2p/sdk 0.0.12-rc.2 → 0.0.13
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 +8 -4
- package/dist/{Zkp2pClient-Cr0LzGo5.d.mts → Zkp2pClient-B0l_kPQB.d.mts} +9 -324
- package/dist/{Zkp2pClient-Cr0LzGo5.d.ts → Zkp2pClient-B0l_kPQB.d.ts} +9 -324
- package/dist/{chunk-RLCHSX5F.mjs → chunk-2CLQDBR3.mjs} +2 -5
- package/dist/chunk-2CLQDBR3.mjs.map +1 -0
- package/dist/{chunk-DJ7FJLYA.mjs → chunk-2J2N74ZD.mjs} +15 -44
- package/dist/chunk-2J2N74ZD.mjs.map +1 -0
- package/dist/chunk-MDLTLKWK.mjs +126 -0
- package/dist/chunk-MDLTLKWK.mjs.map +1 -0
- package/dist/{chunk-YMWVT5KP.mjs → chunk-QLGMIRQ5.mjs} +2 -2
- package/dist/{chunk-YMWVT5KP.mjs.map → chunk-QLGMIRQ5.mjs.map} +1 -1
- package/dist/{constants-MCRAVLDF.mjs → constants-F3MNDOGF.mjs} +4 -4
- package/dist/{constants-MCRAVLDF.mjs.map → constants-F3MNDOGF.mjs.map} +1 -1
- package/dist/{currency-5RZ6VCEA.mjs → currency-P4HY7S34.mjs} +3 -3
- package/dist/{currency-5RZ6VCEA.mjs.map → currency-P4HY7S34.mjs.map} +1 -1
- package/dist/index.cjs +82 -1106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +49 -781
- package/dist/index.mjs.map +1 -1
- package/dist/{paymentResolution-HBYLUETP.mjs → paymentResolution-F4I7TTEW.mjs} +3 -3
- package/dist/{paymentResolution-HBYLUETP.mjs.map → paymentResolution-F4I7TTEW.mjs.map} +1 -1
- package/dist/protocolViewerParsers-5WBXCEHR.mjs +6 -0
- package/dist/{protocolViewerParsers-DDQ4TKNB.mjs.map → protocolViewerParsers-5WBXCEHR.mjs.map} +1 -1
- package/dist/react.cjs +0 -434
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +2 -86
- package/dist/react.d.ts +2 -86
- package/dist/react.mjs +1 -429
- package/dist/react.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-DJ7FJLYA.mjs.map +0 -1
- package/dist/chunk-PQQWQF3C.mjs +0 -375
- package/dist/chunk-PQQWQF3C.mjs.map +0 -1
- package/dist/chunk-RLCHSX5F.mjs.map +0 -1
- package/dist/protocolViewerParsers-DDQ4TKNB.mjs +0 -6
package/README.md
CHANGED
|
@@ -136,7 +136,8 @@ const walletClient = createWalletClient({
|
|
|
136
136
|
const client = new OfframpClient({
|
|
137
137
|
walletClient,
|
|
138
138
|
chainId: base.id,
|
|
139
|
-
apiKey: '
|
|
139
|
+
apiKey: 'YOUR_CURATOR_API_KEY', // For curator API (createDeposit, signalIntent, etc.)
|
|
140
|
+
indexerApiKey: 'YOUR_INDEXER_KEY', // For indexer proxy (x-api-key header)
|
|
140
141
|
});
|
|
141
142
|
|
|
142
143
|
// Optional: keep indexer auth fresh in long-lived clients
|
|
@@ -147,16 +148,19 @@ const getFreshAuthToken = async () => {
|
|
|
147
148
|
const clientWithTokenProvider = new OfframpClient({
|
|
148
149
|
walletClient,
|
|
149
150
|
chainId: base.id,
|
|
150
|
-
getAuthorizationToken: getFreshAuthToken,
|
|
151
|
+
getAuthorizationToken: getFreshAuthToken, // Bearer token per indexer request
|
|
151
152
|
});
|
|
152
153
|
```
|
|
153
154
|
|
|
154
155
|
### Authentication Behavior
|
|
155
156
|
|
|
156
157
|
- Indexer authentication is optional. `client.indexer.*` works without auth unless your backend policy requires it.
|
|
157
|
-
-
|
|
158
|
+
- The indexer accepts two auth methods:
|
|
159
|
+
- **Bearer token** — set via `authorizationToken` (static) or `getAuthorizationToken` (per-request). Sent as `Authorization: Bearer <token>`.
|
|
160
|
+
- **Indexer API key** — set via `indexerApiKey`. Sent as `x-api-key: <key>`. Separate from the curator `apiKey`.
|
|
161
|
+
- `authorizationToken` is also used by API adapter methods like `getQuote()`, `getTakerTier()`, and API-backed deposit flows.
|
|
158
162
|
- `getAuthorizationToken` is used by indexer requests (`client.indexer.*`) and is called per request.
|
|
159
|
-
- If both
|
|
163
|
+
- If both bearer and indexer API key are provided, both headers are sent.
|
|
160
164
|
- If `getAuthorizationToken` throws, indexer requests continue without an `Authorization` header.
|
|
161
165
|
- Authenticated requests may receive different limits or entitlements depending on backend policy.
|
|
162
166
|
|
|
@@ -20,7 +20,6 @@ declare const Currency: {
|
|
|
20
20
|
readonly AED: "AED";
|
|
21
21
|
readonly ARS: "ARS";
|
|
22
22
|
readonly AUD: "AUD";
|
|
23
|
-
readonly BRL: "BRL";
|
|
24
23
|
readonly CAD: "CAD";
|
|
25
24
|
readonly CHF: "CHF";
|
|
26
25
|
readonly CNY: "CNY";
|
|
@@ -173,10 +172,6 @@ type V2ContractAddresses = {
|
|
|
173
172
|
protocolViewer?: `0x${string}`;
|
|
174
173
|
/** USDC token address */
|
|
175
174
|
usdc?: `0x${string}`;
|
|
176
|
-
/** DepositRateManagerRegistryV1 contract */
|
|
177
|
-
rateManagerRegistry?: `0x${string}`;
|
|
178
|
-
/** DepositRateManagerController contract */
|
|
179
|
-
rateManagerController?: `0x${string}`;
|
|
180
175
|
};
|
|
181
176
|
/**
|
|
182
177
|
* Contract ABIs for a specific deployment.
|
|
@@ -186,8 +181,6 @@ type V2ContractAbis = {
|
|
|
186
181
|
orchestrator?: Abi;
|
|
187
182
|
unifiedPaymentVerifier?: Abi;
|
|
188
183
|
protocolViewer?: Abi;
|
|
189
|
-
rateManagerRegistry?: Abi;
|
|
190
|
-
rateManagerController?: Abi;
|
|
191
184
|
};
|
|
192
185
|
/**
|
|
193
186
|
* Runtime environment: 'production' for mainnet, 'staging' for testnet/dev.
|
|
@@ -252,16 +245,6 @@ declare function getPaymentMethodsCatalog(chainId: number, env?: RuntimeEnv): Pa
|
|
|
252
245
|
* @returns Gating service signer address
|
|
253
246
|
*/
|
|
254
247
|
declare function getGatingServiceAddress(chainId: number, env?: RuntimeEnv): `0x${string}`;
|
|
255
|
-
declare function getRateManagerContracts(chainId: number, env?: RuntimeEnv): {
|
|
256
|
-
addresses: {
|
|
257
|
-
registry: `0x${string}`;
|
|
258
|
-
controller: `0x${string}`;
|
|
259
|
-
};
|
|
260
|
-
abis: {
|
|
261
|
-
registry: Abi;
|
|
262
|
-
controller: Abi;
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
248
|
|
|
266
249
|
type PV_Deposit = {
|
|
267
250
|
depositor: string;
|
|
@@ -361,6 +344,7 @@ type IndexerClientOptions = {
|
|
|
361
344
|
authorizationToken?: string;
|
|
362
345
|
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
363
346
|
onAuthorizationTokenError?: (error: unknown) => void;
|
|
347
|
+
apiKey?: string;
|
|
364
348
|
};
|
|
365
349
|
declare class IndexerClient {
|
|
366
350
|
private endpoint;
|
|
@@ -388,8 +372,6 @@ interface DepositEntity {
|
|
|
388
372
|
depositId: string;
|
|
389
373
|
depositor: string;
|
|
390
374
|
delegate?: string | null;
|
|
391
|
-
rateManagerId?: string | null;
|
|
392
|
-
rateManagerRegistry?: string | null;
|
|
393
375
|
token: string;
|
|
394
376
|
remainingDeposits: string;
|
|
395
377
|
intentAmountMin: string;
|
|
@@ -428,9 +410,6 @@ interface MethodCurrencyEntity {
|
|
|
428
410
|
paymentMethodHash: string;
|
|
429
411
|
currencyCode: string;
|
|
430
412
|
minConversionRate: string;
|
|
431
|
-
conversionRate?: string | null;
|
|
432
|
-
managerRate?: string | null;
|
|
433
|
-
rateManagerId?: string | null;
|
|
434
413
|
}
|
|
435
414
|
type IntentStatus = 'SIGNALED' | 'FULFILLED' | 'PRUNED' | 'MANUALLY_RELEASED';
|
|
436
415
|
interface IntentEntity {
|
|
@@ -455,11 +434,6 @@ interface IntentEntity {
|
|
|
455
434
|
fulfillTxHash?: string | null;
|
|
456
435
|
pruneTxHash?: string | null;
|
|
457
436
|
paymentMethodHash?: string | null;
|
|
458
|
-
rateManagerId?: string | null;
|
|
459
|
-
manager?: string | null;
|
|
460
|
-
managerFee?: string | null;
|
|
461
|
-
managerFeeRecipient?: string | null;
|
|
462
|
-
managerFeeAmount?: string | null;
|
|
463
437
|
paymentAmount?: string | null;
|
|
464
438
|
paymentCurrency?: string | null;
|
|
465
439
|
paymentTimestamp?: string | null;
|
|
@@ -477,133 +451,9 @@ interface IntentFulfilledEntity {
|
|
|
477
451
|
isManualRelease: boolean;
|
|
478
452
|
fundsTransferredTo?: string | null;
|
|
479
453
|
}
|
|
480
|
-
interface RateManagerEntity {
|
|
481
|
-
id: string;
|
|
482
|
-
chainId: number;
|
|
483
|
-
registry: string;
|
|
484
|
-
rateManagerId: string;
|
|
485
|
-
manager: string;
|
|
486
|
-
feeRecipient: string;
|
|
487
|
-
maxFee: string;
|
|
488
|
-
fee: string;
|
|
489
|
-
depositHook: string;
|
|
490
|
-
name: string;
|
|
491
|
-
uri: string;
|
|
492
|
-
createdAt: string;
|
|
493
|
-
updatedAt: string;
|
|
494
|
-
}
|
|
495
|
-
interface RateManagerRateEntity {
|
|
496
|
-
id: string;
|
|
497
|
-
chainId: number;
|
|
498
|
-
rateManagerId: string;
|
|
499
|
-
registry: string;
|
|
500
|
-
paymentMethodHash: string;
|
|
501
|
-
currencyCode: string;
|
|
502
|
-
managerRate: string;
|
|
503
|
-
updatedAt: string;
|
|
504
|
-
}
|
|
505
|
-
interface RateManagerDelegationEntity {
|
|
506
|
-
id: string;
|
|
507
|
-
chainId: number;
|
|
508
|
-
rateManagerId: string;
|
|
509
|
-
registry: string;
|
|
510
|
-
depositId: string;
|
|
511
|
-
createdAt: string;
|
|
512
|
-
updatedAt: string;
|
|
513
|
-
}
|
|
514
|
-
interface ManagerAggregateStatsEntity {
|
|
515
|
-
id: string;
|
|
516
|
-
chainId: number;
|
|
517
|
-
rateManagerId: string;
|
|
518
|
-
manager: string;
|
|
519
|
-
totalFilledVolume: string;
|
|
520
|
-
totalFeeAmount: string;
|
|
521
|
-
totalPnlUsdCents: string;
|
|
522
|
-
fulfilledIntents: number;
|
|
523
|
-
currentDelegatedBalance: string;
|
|
524
|
-
currentDelegatedDeposits: number;
|
|
525
|
-
firstSeenAt: string;
|
|
526
|
-
updatedAt: string;
|
|
527
|
-
}
|
|
528
|
-
interface ManagerStatsEntity {
|
|
529
|
-
id: string;
|
|
530
|
-
chainId: number;
|
|
531
|
-
rateManagerId: string;
|
|
532
|
-
manager: string;
|
|
533
|
-
intentId: string;
|
|
534
|
-
depositId: string;
|
|
535
|
-
paymentMethodHash: string;
|
|
536
|
-
currencyCode: string;
|
|
537
|
-
amount: string;
|
|
538
|
-
quoteConversionRate: string;
|
|
539
|
-
marketRate: string;
|
|
540
|
-
spreadBps: number;
|
|
541
|
-
pnlUsdCents: string;
|
|
542
|
-
managerFee: string;
|
|
543
|
-
managerFeeAmount: string;
|
|
544
|
-
createdAt: string;
|
|
545
|
-
}
|
|
546
|
-
interface ManagerDailySnapshotEntity {
|
|
547
|
-
id: string;
|
|
548
|
-
chainId: number;
|
|
549
|
-
rateManagerId: string;
|
|
550
|
-
dayTimestamp: string;
|
|
551
|
-
tvl: string;
|
|
552
|
-
delegatedDeposits: number;
|
|
553
|
-
dailyVolume: string;
|
|
554
|
-
dailyFees: string;
|
|
555
|
-
dailyPnlUsdCents: string;
|
|
556
|
-
dailyFulfilledIntents: number;
|
|
557
|
-
cumulativeVolume: string;
|
|
558
|
-
cumulativeFees: string;
|
|
559
|
-
cumulativePnlUsdCents: string;
|
|
560
|
-
cumulativeFulfilledIntents: number;
|
|
561
|
-
updatedAt: string;
|
|
562
|
-
}
|
|
563
|
-
interface RateManagerOracleConfigEntity {
|
|
564
|
-
id: string;
|
|
565
|
-
chainId: number;
|
|
566
|
-
rateManagerId: string;
|
|
567
|
-
registry: string;
|
|
568
|
-
paymentMethodHash: string;
|
|
569
|
-
currencyCode: string;
|
|
570
|
-
adapter: string;
|
|
571
|
-
adapterConfig: string;
|
|
572
|
-
feed: string;
|
|
573
|
-
feedDecimals: number;
|
|
574
|
-
spreadBps: number;
|
|
575
|
-
maxStaleness: string;
|
|
576
|
-
invert: boolean;
|
|
577
|
-
lastOracleUpdatedAt?: string | null;
|
|
578
|
-
kind: string;
|
|
579
|
-
createdAt: string;
|
|
580
|
-
updatedAt: string;
|
|
581
|
-
}
|
|
582
|
-
interface RateManagerHookMinLiquidityEntity {
|
|
583
|
-
id: string;
|
|
584
|
-
chainId: number;
|
|
585
|
-
registry: string;
|
|
586
|
-
rateManagerId: string;
|
|
587
|
-
minLiquidity: string;
|
|
588
|
-
createdAt: string;
|
|
589
|
-
updatedAt: string;
|
|
590
|
-
}
|
|
591
|
-
interface RateManagerListItem {
|
|
592
|
-
manager: RateManagerEntity;
|
|
593
|
-
aggregate?: ManagerAggregateStatsEntity | null;
|
|
594
|
-
}
|
|
595
|
-
interface RateManagerDetail {
|
|
596
|
-
manager: RateManagerEntity;
|
|
597
|
-
rates: RateManagerRateEntity[];
|
|
598
|
-
aggregate?: ManagerAggregateStatsEntity | null;
|
|
599
|
-
recentStats: ManagerStatsEntity[];
|
|
600
|
-
delegations: RateManagerDelegationEntity[];
|
|
601
|
-
oracleConfigs: RateManagerOracleConfigEntity[];
|
|
602
|
-
hookMinLiquidity: RateManagerHookMinLiquidityEntity | null;
|
|
603
|
-
}
|
|
604
454
|
|
|
605
455
|
type DepositOrderField = 'remainingDeposits' | 'outstandingIntentAmount' | 'totalAmountTaken' | 'totalWithdrawn' | 'updatedAt' | 'timestamp';
|
|
606
|
-
type OrderDirection
|
|
456
|
+
type OrderDirection = 'asc' | 'desc';
|
|
607
457
|
type DepositFilter = Partial<{
|
|
608
458
|
status: 'ACTIVE' | 'CLOSED';
|
|
609
459
|
depositor: string;
|
|
@@ -620,7 +470,7 @@ type PaginationOptions = Partial<{
|
|
|
620
470
|
limit: number;
|
|
621
471
|
offset: number;
|
|
622
472
|
orderBy: DepositOrderField;
|
|
623
|
-
orderDirection: OrderDirection
|
|
473
|
+
orderDirection: OrderDirection;
|
|
624
474
|
}>;
|
|
625
475
|
declare class IndexerDepositService {
|
|
626
476
|
private client;
|
|
@@ -665,48 +515,6 @@ declare class IndexerDepositService {
|
|
|
665
515
|
}): Promise<DepositWithRelations[]>;
|
|
666
516
|
}
|
|
667
517
|
|
|
668
|
-
type OrderDirection = 'asc' | 'desc';
|
|
669
|
-
type RateManagerOrderField = 'createdAt' | 'updatedAt' | 'fee' | 'maxFee' | 'rateManagerId' | 'currentDelegatedBalance' | 'totalFilledVolume';
|
|
670
|
-
type RateManagerFilter = Partial<{
|
|
671
|
-
manager: string;
|
|
672
|
-
name: string;
|
|
673
|
-
hasHook: boolean;
|
|
674
|
-
maxFee: string;
|
|
675
|
-
rateManagerIds: string[];
|
|
676
|
-
}>;
|
|
677
|
-
type RateManagerPaginationOptions = Partial<{
|
|
678
|
-
limit: number;
|
|
679
|
-
offset: number;
|
|
680
|
-
orderBy: RateManagerOrderField;
|
|
681
|
-
orderDirection: OrderDirection;
|
|
682
|
-
}>;
|
|
683
|
-
type RateManagerDelegationPaginationOptions = Partial<{
|
|
684
|
-
limit: number;
|
|
685
|
-
offset: number;
|
|
686
|
-
orderBy: 'createdAt' | 'updatedAt' | 'depositId';
|
|
687
|
-
orderDirection: OrderDirection;
|
|
688
|
-
registry: string;
|
|
689
|
-
}>;
|
|
690
|
-
declare class IndexerRateManagerService {
|
|
691
|
-
private client;
|
|
692
|
-
constructor(client: IndexerClient);
|
|
693
|
-
private buildWhere;
|
|
694
|
-
private buildOrderBy;
|
|
695
|
-
private toRateManagerListItems;
|
|
696
|
-
private buildDelegationOrderBy;
|
|
697
|
-
fetchRateManagers(pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter): Promise<RateManagerListItem[]>;
|
|
698
|
-
fetchRateManagerDetail(rateManagerId: string, options?: {
|
|
699
|
-
statsLimit?: number;
|
|
700
|
-
registry?: string | null;
|
|
701
|
-
}): Promise<RateManagerDetail | null>;
|
|
702
|
-
fetchRateManagerDelegations(rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions): Promise<RateManagerDelegationEntity[]>;
|
|
703
|
-
fetchManagerDailySnapshots(rateManagerId: string, options?: {
|
|
704
|
-
limit?: number;
|
|
705
|
-
registry?: string | null;
|
|
706
|
-
}): Promise<ManagerDailySnapshotEntity[]>;
|
|
707
|
-
fetchDelegationForDeposit(depositId: string): Promise<RateManagerDelegationEntity | null>;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
518
|
type FulfillmentRecord = {
|
|
711
519
|
id: string;
|
|
712
520
|
intentHash: string;
|
|
@@ -1140,7 +948,6 @@ type Intent = {
|
|
|
1140
948
|
};
|
|
1141
949
|
type GetOwnerIntentsRequest = {
|
|
1142
950
|
ownerAddress: string;
|
|
1143
|
-
escrowAddress?: string;
|
|
1144
951
|
status?: ApiIntentStatus | ApiIntentStatus[];
|
|
1145
952
|
};
|
|
1146
953
|
type GetOwnerIntentsResponse = {
|
|
@@ -1151,7 +958,6 @@ type GetOwnerIntentsResponse = {
|
|
|
1151
958
|
};
|
|
1152
959
|
type GetIntentsByDepositRequest = {
|
|
1153
960
|
depositId: string;
|
|
1154
|
-
escrowAddress?: string;
|
|
1155
961
|
status?: ApiIntentStatus | ApiIntentStatus[];
|
|
1156
962
|
};
|
|
1157
963
|
type GetIntentsByDepositResponse = {
|
|
@@ -1162,7 +968,6 @@ type GetIntentsByDepositResponse = {
|
|
|
1162
968
|
};
|
|
1163
969
|
type GetIntentByHashRequest = {
|
|
1164
970
|
intentHash: string;
|
|
1165
|
-
escrowAddress?: string;
|
|
1166
971
|
};
|
|
1167
972
|
type GetIntentByHashResponse = {
|
|
1168
973
|
success: boolean;
|
|
@@ -1211,7 +1016,6 @@ type ApiDeposit = {
|
|
|
1211
1016
|
};
|
|
1212
1017
|
type GetOwnerDepositsRequest = {
|
|
1213
1018
|
ownerAddress: string;
|
|
1214
|
-
escrowAddress?: string;
|
|
1215
1019
|
/** Optional status filter: 'ACTIVE' | 'WITHDRAWN' | 'CLOSED' */
|
|
1216
1020
|
status?: DepositStatus;
|
|
1217
1021
|
};
|
|
@@ -1223,7 +1027,6 @@ type GetOwnerDepositsResponse = {
|
|
|
1223
1027
|
};
|
|
1224
1028
|
type GetDepositByIdRequest = {
|
|
1225
1029
|
depositId: string;
|
|
1226
|
-
escrowAddress?: string;
|
|
1227
1030
|
};
|
|
1228
1031
|
type GetDepositByIdResponse = {
|
|
1229
1032
|
success: boolean;
|
|
@@ -1305,7 +1108,8 @@ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
|
|
|
1305
1108
|
* walletClient,
|
|
1306
1109
|
* chainId: 8453, // Base mainnet
|
|
1307
1110
|
* runtimeEnv: 'production',
|
|
1308
|
-
* apiKey: 'your-api-key',
|
|
1111
|
+
* apiKey: 'your-curator-api-key',
|
|
1112
|
+
* indexerApiKey: 'your-indexer-key',
|
|
1309
1113
|
* };
|
|
1310
1114
|
* ```
|
|
1311
1115
|
*/
|
|
@@ -1322,12 +1126,14 @@ type Zkp2pNextOptions = {
|
|
|
1322
1126
|
indexerUrl?: string;
|
|
1323
1127
|
/** Base API URL for ZKP2P services (defaults to https://api.zkp2p.xyz) */
|
|
1324
1128
|
baseApiUrl?: string;
|
|
1325
|
-
/** API key for authenticated endpoints
|
|
1129
|
+
/** Curator API key for authenticated endpoints like createDeposit, signalIntent (sent as x-api-key to curator) */
|
|
1326
1130
|
apiKey?: string;
|
|
1327
1131
|
/** Optional bearer token for hybrid authentication */
|
|
1328
1132
|
authorizationToken?: string;
|
|
1329
1133
|
/** Optional async token provider for indexer auth in long-lived clients */
|
|
1330
1134
|
getAuthorizationToken?: IndexerAuthTokenProvider;
|
|
1135
|
+
/** Optional API key for indexer proxy authentication (sent as x-api-key header) */
|
|
1136
|
+
indexerApiKey?: string;
|
|
1331
1137
|
/** Timeout configuration */
|
|
1332
1138
|
timeouts?: {
|
|
1333
1139
|
/** API call timeout in milliseconds (default: 15000) */
|
|
@@ -1495,14 +1301,6 @@ declare class Zkp2pClient {
|
|
|
1495
1301
|
readonly protocolViewerAddress?: Address;
|
|
1496
1302
|
/** ProtocolViewer contract ABI */
|
|
1497
1303
|
readonly protocolViewerAbi?: Abi;
|
|
1498
|
-
/** DepositRateManagerRegistryV1 contract address */
|
|
1499
|
-
readonly rateManagerRegistryAddress?: Address;
|
|
1500
|
-
/** DepositRateManagerRegistryV1 ABI */
|
|
1501
|
-
readonly rateManagerRegistryAbi?: Abi;
|
|
1502
|
-
/** DepositRateManagerController contract address */
|
|
1503
|
-
readonly rateManagerControllerAddress?: Address;
|
|
1504
|
-
/** DepositRateManagerController ABI */
|
|
1505
|
-
readonly rateManagerControllerAbi?: Abi;
|
|
1506
1304
|
/** Base API URL for ZKP2P services */
|
|
1507
1305
|
readonly baseApiUrl?: string;
|
|
1508
1306
|
/** API key for authenticated endpoints */
|
|
@@ -1514,7 +1312,6 @@ declare class Zkp2pClient {
|
|
|
1514
1312
|
private _usdcAddress?;
|
|
1515
1313
|
private readonly _indexerClient;
|
|
1516
1314
|
private readonly _indexerService;
|
|
1517
|
-
private readonly _indexerRateManagerService;
|
|
1518
1315
|
/**
|
|
1519
1316
|
* Creates a new Zkp2pClient instance.
|
|
1520
1317
|
*
|
|
@@ -1535,8 +1332,6 @@ declare class Zkp2pClient {
|
|
|
1535
1332
|
private executePreparedTransaction;
|
|
1536
1333
|
private prepareEscrowTransaction;
|
|
1537
1334
|
private prepareOrchestratorTransaction;
|
|
1538
|
-
private prepareContractTransaction;
|
|
1539
|
-
private buildContractMethod;
|
|
1540
1335
|
private buildEscrowMethod;
|
|
1541
1336
|
private buildOrchestratorMethod;
|
|
1542
1337
|
/**
|
|
@@ -1721,32 +1516,6 @@ declare class Zkp2pClient {
|
|
|
1721
1516
|
includeIntents?: boolean;
|
|
1722
1517
|
intentStatuses?: IntentStatus[];
|
|
1723
1518
|
}) => Promise<DepositWithRelations[]>;
|
|
1724
|
-
/**
|
|
1725
|
-
* Fetches rate managers (vaults) with aggregate stats.
|
|
1726
|
-
*/
|
|
1727
|
-
getRateManagers: (pagination?: RateManagerPaginationOptions, filter?: RateManagerFilter) => Promise<RateManagerListItem[]>;
|
|
1728
|
-
/**
|
|
1729
|
-
* Fetches detail for a single rate manager.
|
|
1730
|
-
*/
|
|
1731
|
-
getRateManagerDetail: (rateManagerId: string, options?: {
|
|
1732
|
-
statsLimit?: number;
|
|
1733
|
-
registry?: string | null;
|
|
1734
|
-
}) => Promise<RateManagerDetail | null>;
|
|
1735
|
-
/**
|
|
1736
|
-
* Fetches delegated deposits for a rate manager.
|
|
1737
|
-
*/
|
|
1738
|
-
getRateManagerDelegations: (rateManagerId: string, pagination?: RateManagerDelegationPaginationOptions) => Promise<RateManagerDelegationEntity[]>;
|
|
1739
|
-
/**
|
|
1740
|
-
* Fetches delegation record for a specific composite deposit ID.
|
|
1741
|
-
*/
|
|
1742
|
-
getDelegationForDeposit: (depositId: string) => Promise<RateManagerDelegationEntity | null>;
|
|
1743
|
-
/**
|
|
1744
|
-
* Fetches daily snapshots for a rate manager (vault).
|
|
1745
|
-
*/
|
|
1746
|
-
getManagerDailySnapshots: (rateManagerId: string, options?: {
|
|
1747
|
-
limit?: number;
|
|
1748
|
-
registry?: string | null;
|
|
1749
|
-
}) => Promise<ManagerDailySnapshotEntity[]>;
|
|
1750
1519
|
/**
|
|
1751
1520
|
* Performs a raw GraphQL query against the indexer.
|
|
1752
1521
|
*/
|
|
@@ -2030,90 +1799,6 @@ declare class Zkp2pClient {
|
|
|
2030
1799
|
depositId: bigint;
|
|
2031
1800
|
txOverrides?: TxOverrides;
|
|
2032
1801
|
}, `0x${string}`>;
|
|
2033
|
-
/**
|
|
2034
|
-
* Assign a deposit to a rate manager (vault) through the controller.
|
|
2035
|
-
*/
|
|
2036
|
-
readonly setDepositRateManager: PrepareableMethod<{
|
|
2037
|
-
escrow: Address;
|
|
2038
|
-
depositId: bigint;
|
|
2039
|
-
registry: Address;
|
|
2040
|
-
rateManagerId: Hex;
|
|
2041
|
-
txOverrides?: TxOverrides;
|
|
2042
|
-
}, `0x${string}`>;
|
|
2043
|
-
/**
|
|
2044
|
-
* Clear an existing rate manager delegation for a deposit.
|
|
2045
|
-
*/
|
|
2046
|
-
readonly clearDepositRateManager: PrepareableMethod<{
|
|
2047
|
-
escrow: Address;
|
|
2048
|
-
depositId: bigint;
|
|
2049
|
-
txOverrides?: TxOverrides;
|
|
2050
|
-
}, `0x${string}`>;
|
|
2051
|
-
/**
|
|
2052
|
-
* Create a new rate manager (vault).
|
|
2053
|
-
*/
|
|
2054
|
-
readonly createRateManager: PrepareableMethod<{
|
|
2055
|
-
config: {
|
|
2056
|
-
manager: Address;
|
|
2057
|
-
feeRecipient: Address;
|
|
2058
|
-
maxFee: bigint;
|
|
2059
|
-
fee: bigint;
|
|
2060
|
-
depositHook: Address;
|
|
2061
|
-
name: string;
|
|
2062
|
-
uri: string;
|
|
2063
|
-
};
|
|
2064
|
-
txOverrides?: TxOverrides;
|
|
2065
|
-
}, `0x${string}`>;
|
|
2066
|
-
/**
|
|
2067
|
-
* Set a manager floor for a single payment method/currency pair.
|
|
2068
|
-
*/
|
|
2069
|
-
readonly setVaultMinRate: PrepareableMethod<{
|
|
2070
|
-
rateManagerId: Hex;
|
|
2071
|
-
paymentMethodHash: `0x${string}`;
|
|
2072
|
-
currencyHash: `0x${string}`;
|
|
2073
|
-
rate: bigint;
|
|
2074
|
-
txOverrides?: TxOverrides;
|
|
2075
|
-
}, `0x${string}`>;
|
|
2076
|
-
/**
|
|
2077
|
-
* Set manager floors in batch.
|
|
2078
|
-
*/
|
|
2079
|
-
readonly setVaultMinRatesBatch: PrepareableMethod<{
|
|
2080
|
-
rateManagerId: Hex;
|
|
2081
|
-
paymentMethods: `0x${string}`[];
|
|
2082
|
-
currencies: `0x${string}`[][];
|
|
2083
|
-
rates: bigint[][];
|
|
2084
|
-
txOverrides?: TxOverrides;
|
|
2085
|
-
}, `0x${string}`>;
|
|
2086
|
-
/**
|
|
2087
|
-
* Update vault manager fee.
|
|
2088
|
-
*/
|
|
2089
|
-
readonly setVaultFee: PrepareableMethod<{
|
|
2090
|
-
rateManagerId: Hex;
|
|
2091
|
-
newFee: bigint;
|
|
2092
|
-
txOverrides?: TxOverrides;
|
|
2093
|
-
}, `0x${string}`>;
|
|
2094
|
-
/**
|
|
2095
|
-
* Update vault manager/config metadata.
|
|
2096
|
-
*/
|
|
2097
|
-
readonly setVaultConfig: PrepareableMethod<{
|
|
2098
|
-
rateManagerId: Hex;
|
|
2099
|
-
newManager: Address;
|
|
2100
|
-
newFeeRecipient: Address;
|
|
2101
|
-
newHook: Address;
|
|
2102
|
-
newName: string;
|
|
2103
|
-
newUri: string;
|
|
2104
|
-
txOverrides?: TxOverrides;
|
|
2105
|
-
}, `0x${string}`>;
|
|
2106
|
-
/**
|
|
2107
|
-
* Read controller delegation state for a deposit.
|
|
2108
|
-
*/
|
|
2109
|
-
getDepositRateManager(escrow: Address, depositId: bigint | number | string): Promise<{
|
|
2110
|
-
registry: Address;
|
|
2111
|
-
rateManagerId: Hex;
|
|
2112
|
-
}>;
|
|
2113
|
-
/**
|
|
2114
|
-
* Read effective manager fee for a deposit.
|
|
2115
|
-
*/
|
|
2116
|
-
getManagerFee(escrow: Address, depositId: bigint | number | string): Promise<bigint>;
|
|
2117
1802
|
/**
|
|
2118
1803
|
* Adds new payment methods to an existing deposit.
|
|
2119
1804
|
*
|
|
@@ -2531,4 +2216,4 @@ declare class Zkp2pClient {
|
|
|
2531
2216
|
}>;
|
|
2532
2217
|
}
|
|
2533
2218
|
|
|
2534
|
-
export { type GetIntentByHashResponse as $, type AuthorizationTokenProvider as A, type DepositVerifier as B, type CancelIntentMethodParams as C, type DepositWithRelations as D, type DepositVerifierCurrency as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type DepositStatus as H, type IntentEntity as I, type GetDepositByIdRequest as J, type GetDepositByIdResponse as K, type Intent as L, type ApiIntentStatus as M, type NearbyQuote as N, type GetOwnerIntentsRequest as O, type PostDepositDetailsRequest as P, type QuoteRequest as Q, type Range as R, type SignalIntentMethodParams as S, type TxOverrides as T, type GetOwnerIntentsResponse as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type GetIntentsByDepositRequest as X, type GetIntentsByDepositResponse as Y, Zkp2pClient as Z, type GetIntentByHashRequest as _, type ValidatePayeeDetailsResponse as a,
|
|
2219
|
+
export { type GetIntentByHashResponse as $, type AuthorizationTokenProvider as A, type DepositVerifier as B, type CancelIntentMethodParams as C, type DepositWithRelations as D, type DepositVerifierCurrency as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type DepositStatus as H, type IntentEntity as I, type GetDepositByIdRequest as J, type GetDepositByIdResponse as K, type Intent as L, type ApiIntentStatus as M, type NearbyQuote as N, type GetOwnerIntentsRequest as O, type PostDepositDetailsRequest as P, type QuoteRequest as Q, type Range as R, type SignalIntentMethodParams as S, type TxOverrides as T, type GetOwnerIntentsResponse as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type GetIntentsByDepositRequest as X, type GetIntentsByDepositResponse as Y, Zkp2pClient as Z, type GetIntentByHashRequest as _, type ValidatePayeeDetailsResponse as a, type RegisterPayeeDetailsRequest as a0, type RegisterPayeeDetailsResponse as a1, type OnchainCurrency as a2, type DepositVerifierData as a3, type PreparedTransaction as a4, type OrderStats as a5, type DepositIntentStatistics as a6, type TakerTier as a7, type TakerTierStats as a8, type TakerTierLevel as a9, isSupportedCurrencyHash as aA, mapConversionRatesToOnchainMinRate as aB, type CurrencyType as aC, type CurrencyData as aD, getContracts as aE, getPaymentMethodsCatalog as aF, getGatingServiceAddress as aG, type RuntimeEnv as aH, parseDepositView as aI, parseIntentView as aJ, enrichPvDepositView as aK, enrichPvIntentView as aL, type PV_DepositView as aM, type PV_Deposit as aN, type PV_PaymentMethodData as aO, type PV_Currency as aP, type PV_IntentView as aQ, type PV_Intent as aR, type PlatformLimit as aa, type PlatformRiskLevel as ab, IndexerClient as ac, defaultIndexerEndpoint as ad, IndexerDepositService as ae, fetchFulfillmentAndPayment as af, type DepositEntity as ag, type IntentFulfilledEntity as ah, type DepositPaymentMethodEntity as ai, type MethodCurrencyEntity as aj, type IntentStatus as ak, type DepositFilter as al, type PaginationOptions as am, type DepositOrderField as an, type OrderDirection as ao, type DeploymentEnv as ap, type FulfillmentRecord as aq, type PaymentVerifiedRecord as ar, type FulfillmentAndPaymentResponse as as, PAYMENT_PLATFORMS as at, type PaymentPlatformType as au, Currency as av, currencyInfo as aw, getCurrencyInfoFromHash as ax, getCurrencyInfoFromCountryCode as ay, getCurrencyCodeFromHash as az, type PostDepositDetailsResponse as b, type GetPayeeDetailsResponse as c, type GetOwnerDepositsRequest as d, type GetOwnerDepositsResponse as e, type GetTakerTierRequest as f, type GetTakerTierResponse as g, type PaymentMethodCatalog as h, type Zkp2pClientOptions as i, type TimeoutConfig as j, type ActionCallback as k, type CreateDepositParams as l, type CreateDepositConversionRate as m, type SignalIntentParams as n, type FulfillIntentParams as o, type ReleaseFundsToPayerParams as p, type CancelIntentParams as q, type QuoteResponse as r, type QuoteResponseObject as s, type QuoteSingleResponse as t, type QuoteIntentResponse as u, type QuoteFeesResponse as v, type FiatResponse as w, type TokenResponse as x, type NearbySuggestions as y, type ApiDeposit as z };
|