@p2pdotme/sdk 1.0.5 → 1.1.1

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.
Files changed (66) hide show
  1. package/README.md +103 -41
  2. package/dist/country.cjs +9 -2
  3. package/dist/country.cjs.map +1 -1
  4. package/dist/country.d.cts +35 -10
  5. package/dist/country.d.ts +35 -10
  6. package/dist/country.mjs +6 -2
  7. package/dist/country.mjs.map +1 -1
  8. package/dist/fraud-engine.cjs +52 -48
  9. package/dist/fraud-engine.cjs.map +1 -1
  10. package/dist/fraud-engine.mjs +46 -42
  11. package/dist/fraud-engine.mjs.map +1 -1
  12. package/dist/index.cjs +4 -14
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +41 -36
  15. package/dist/index.d.ts +41 -36
  16. package/dist/index.mjs +4 -12
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/orders.cjs +5961 -0
  19. package/dist/orders.cjs.map +1 -0
  20. package/dist/orders.d.cts +620 -0
  21. package/dist/orders.d.ts +620 -0
  22. package/dist/orders.mjs +5911 -0
  23. package/dist/orders.mjs.map +1 -0
  24. package/dist/prices.cjs +1432 -0
  25. package/dist/prices.cjs.map +1 -0
  26. package/dist/prices.d.cts +109 -0
  27. package/dist/prices.d.ts +109 -0
  28. package/dist/prices.mjs +1404 -0
  29. package/dist/prices.mjs.map +1 -0
  30. package/dist/profile.cjs +899 -69
  31. package/dist/profile.cjs.map +1 -1
  32. package/dist/profile.d.cts +39 -27
  33. package/dist/profile.d.ts +39 -27
  34. package/dist/profile.mjs +892 -62
  35. package/dist/profile.mjs.map +1 -1
  36. package/dist/qr-parsers.cjs +88 -7
  37. package/dist/qr-parsers.cjs.map +1 -1
  38. package/dist/qr-parsers.d.cts +38 -16
  39. package/dist/qr-parsers.d.ts +38 -16
  40. package/dist/qr-parsers.mjs +88 -7
  41. package/dist/qr-parsers.mjs.map +1 -1
  42. package/dist/react.cjs +2955 -1105
  43. package/dist/react.cjs.map +1 -1
  44. package/dist/react.d.cts +384 -104
  45. package/dist/react.d.ts +384 -104
  46. package/dist/react.mjs +2841 -992
  47. package/dist/react.mjs.map +1 -1
  48. package/dist/zkkyc.cjs +405 -24
  49. package/dist/zkkyc.cjs.map +1 -1
  50. package/dist/zkkyc.d.cts +14 -9
  51. package/dist/zkkyc.d.ts +14 -9
  52. package/dist/zkkyc.mjs +405 -24
  53. package/dist/zkkyc.mjs.map +1 -1
  54. package/package.json +12 -12
  55. package/dist/order-routing.cjs +0 -888
  56. package/dist/order-routing.cjs.map +0 -1
  57. package/dist/order-routing.d.cts +0 -68
  58. package/dist/order-routing.d.ts +0 -68
  59. package/dist/order-routing.mjs +0 -860
  60. package/dist/order-routing.mjs.map +0 -1
  61. package/dist/payload.cjs +0 -3168
  62. package/dist/payload.cjs.map +0 -1
  63. package/dist/payload.d.cts +0 -147
  64. package/dist/payload.d.ts +0 -147
  65. package/dist/payload.mjs +0 -3124
  66. package/dist/payload.mjs.map +0 -1
@@ -0,0 +1,1432 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/prices/index.ts
21
+ var prices_exports = {};
22
+ __export(prices_exports, {
23
+ PricesError: () => PricesError,
24
+ createPrices: () => createPrices
25
+ });
26
+ module.exports = __toCommonJS(prices_exports);
27
+
28
+ // src/contracts/abis/index.ts
29
+ var import_viem = require("viem");
30
+
31
+ // src/contracts/abis/order-flow-facet.ts
32
+ var orderFlowFacetAbi = [
33
+ {
34
+ inputs: [
35
+ { internalType: "uint256", name: "circleId", type: "uint256" },
36
+ { internalType: "uint256", name: "assignUpto", type: "uint256" },
37
+ { internalType: "bytes32", name: "currency", type: "bytes32" },
38
+ { internalType: "address", name: "user", type: "address" },
39
+ { internalType: "uint256", name: "usdtAmount", type: "uint256" },
40
+ { internalType: "uint256", name: "fiatAmount", type: "uint256" },
41
+ { internalType: "int256", name: "orderType", type: "int256" },
42
+ { internalType: "uint256", name: "preferredPCConfigId", type: "uint256" }
43
+ ],
44
+ name: "getAssignableMerchantsFromCircle",
45
+ outputs: [{ internalType: "address[]", name: "", type: "address[]" }],
46
+ stateMutability: "view",
47
+ type: "function"
48
+ },
49
+ {
50
+ inputs: [
51
+ { internalType: "address", name: "_user", type: "address" },
52
+ { internalType: "bytes32", name: "_nativeCurrency", type: "bytes32" }
53
+ ],
54
+ name: "userTxLimit",
55
+ outputs: [
56
+ { internalType: "uint256", name: "", type: "uint256" },
57
+ { internalType: "uint256", name: "", type: "uint256" }
58
+ ],
59
+ stateMutability: "view",
60
+ type: "function"
61
+ },
62
+ {
63
+ inputs: [
64
+ { internalType: "string", name: "_pubKey", type: "string" },
65
+ { internalType: "uint256", name: "_amount", type: "uint256" },
66
+ { internalType: "address", name: "_recipientAddr", type: "address" },
67
+ { internalType: "uint8", name: "_orderType", type: "uint8" },
68
+ { internalType: "string", name: "_userUpi", type: "string" },
69
+ { internalType: "string", name: "_userPubKey", type: "string" },
70
+ { internalType: "bytes32", name: "_currency", type: "bytes32" },
71
+ { internalType: "uint256", name: "preferredPaymentChannelConfigId", type: "uint256" },
72
+ { internalType: "uint256", name: "_circleId", type: "uint256" },
73
+ { internalType: "uint256", name: "_fiatAmountLimit", type: "uint256" }
74
+ ],
75
+ name: "placeOrder",
76
+ outputs: [],
77
+ stateMutability: "nonpayable",
78
+ type: "function"
79
+ },
80
+ {
81
+ inputs: [{ internalType: "uint256", name: "_orderId", type: "uint256" }],
82
+ name: "cancelOrder",
83
+ outputs: [],
84
+ stateMutability: "nonpayable",
85
+ type: "function"
86
+ },
87
+ {
88
+ inputs: [
89
+ { internalType: "uint256", name: "_orderId", type: "uint256" },
90
+ { internalType: "string", name: "_userEncUpi", type: "string" },
91
+ { internalType: "uint256", name: "_updatedAmount", type: "uint256" }
92
+ ],
93
+ name: "setSellOrderUpi",
94
+ outputs: [],
95
+ stateMutability: "nonpayable",
96
+ type: "function"
97
+ },
98
+ {
99
+ type: "event",
100
+ name: "OrderPlaced",
101
+ anonymous: false,
102
+ inputs: [
103
+ { indexed: true, name: "orderId", type: "uint256" },
104
+ { indexed: true, name: "user", type: "address" },
105
+ { indexed: true, name: "merchant", type: "address" },
106
+ { indexed: false, name: "amount", type: "uint256" },
107
+ { indexed: false, name: "orderType", type: "uint8" },
108
+ { indexed: false, name: "placedTimestamp", type: "uint256" },
109
+ {
110
+ indexed: false,
111
+ name: "_order",
112
+ type: "tuple",
113
+ components: [
114
+ { name: "amount", type: "uint256" },
115
+ { name: "fiatAmount", type: "uint256" },
116
+ { name: "placedTimestamp", type: "uint256" },
117
+ { name: "completedTimestamp", type: "uint256" },
118
+ { name: "userCompletedTimestamp", type: "uint256" },
119
+ { name: "acceptedMerchant", type: "address" },
120
+ { name: "user", type: "address" },
121
+ { name: "recipientAddr", type: "address" },
122
+ { name: "pubkey", type: "string" },
123
+ { name: "encUpi", type: "string" },
124
+ { name: "userCompleted", type: "bool" },
125
+ { name: "status", type: "uint8" },
126
+ { name: "orderType", type: "uint8" },
127
+ {
128
+ name: "disputeInfo",
129
+ type: "tuple",
130
+ components: [
131
+ { name: "raisedBy", type: "uint8" },
132
+ { name: "status", type: "uint8" },
133
+ { name: "redactTransId", type: "uint256" },
134
+ { name: "accountNumber", type: "uint256" }
135
+ ]
136
+ },
137
+ { name: "id", type: "uint256" },
138
+ { name: "userPubKey", type: "string" },
139
+ { name: "encMerchantUpi", type: "string" },
140
+ { name: "acceptedAccountNo", type: "uint256" },
141
+ { name: "assignedAccountNos", type: "uint256[]" },
142
+ { name: "currency", type: "bytes32" },
143
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
144
+ { name: "circleId", type: "uint256" }
145
+ ]
146
+ }
147
+ ]
148
+ },
149
+ {
150
+ type: "event",
151
+ name: "OrderAccepted",
152
+ anonymous: false,
153
+ inputs: [
154
+ { indexed: true, name: "orderId", type: "uint256" },
155
+ { indexed: true, name: "merchant", type: "address" },
156
+ { indexed: false, name: "pubKey", type: "string" },
157
+ {
158
+ indexed: false,
159
+ name: "_order",
160
+ type: "tuple",
161
+ components: [
162
+ { name: "amount", type: "uint256" },
163
+ { name: "fiatAmount", type: "uint256" },
164
+ { name: "placedTimestamp", type: "uint256" },
165
+ { name: "completedTimestamp", type: "uint256" },
166
+ { name: "userCompletedTimestamp", type: "uint256" },
167
+ { name: "acceptedMerchant", type: "address" },
168
+ { name: "user", type: "address" },
169
+ { name: "recipientAddr", type: "address" },
170
+ { name: "pubkey", type: "string" },
171
+ { name: "encUpi", type: "string" },
172
+ { name: "userCompleted", type: "bool" },
173
+ { name: "status", type: "uint8" },
174
+ { name: "orderType", type: "uint8" },
175
+ {
176
+ name: "disputeInfo",
177
+ type: "tuple",
178
+ components: [
179
+ { name: "raisedBy", type: "uint8" },
180
+ { name: "status", type: "uint8" },
181
+ { name: "redactTransId", type: "uint256" },
182
+ { name: "accountNumber", type: "uint256" }
183
+ ]
184
+ },
185
+ { name: "id", type: "uint256" },
186
+ { name: "userPubKey", type: "string" },
187
+ { name: "encMerchantUpi", type: "string" },
188
+ { name: "acceptedAccountNo", type: "uint256" },
189
+ { name: "assignedAccountNos", type: "uint256[]" },
190
+ { name: "currency", type: "bytes32" },
191
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
192
+ { name: "circleId", type: "uint256" }
193
+ ]
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ type: "event",
199
+ name: "BuyOrderPaid",
200
+ anonymous: false,
201
+ inputs: [
202
+ { indexed: true, name: "orderId", type: "uint256" },
203
+ { indexed: true, name: "user", type: "address" },
204
+ {
205
+ indexed: false,
206
+ name: "_order",
207
+ type: "tuple",
208
+ components: [
209
+ { name: "amount", type: "uint256" },
210
+ { name: "fiatAmount", type: "uint256" },
211
+ { name: "placedTimestamp", type: "uint256" },
212
+ { name: "completedTimestamp", type: "uint256" },
213
+ { name: "userCompletedTimestamp", type: "uint256" },
214
+ { name: "acceptedMerchant", type: "address" },
215
+ { name: "user", type: "address" },
216
+ { name: "recipientAddr", type: "address" },
217
+ { name: "pubkey", type: "string" },
218
+ { name: "encUpi", type: "string" },
219
+ { name: "userCompleted", type: "bool" },
220
+ { name: "status", type: "uint8" },
221
+ { name: "orderType", type: "uint8" },
222
+ {
223
+ name: "disputeInfo",
224
+ type: "tuple",
225
+ components: [
226
+ { name: "raisedBy", type: "uint8" },
227
+ { name: "status", type: "uint8" },
228
+ { name: "redactTransId", type: "uint256" },
229
+ { name: "accountNumber", type: "uint256" }
230
+ ]
231
+ },
232
+ { name: "id", type: "uint256" },
233
+ { name: "userPubKey", type: "string" },
234
+ { name: "encMerchantUpi", type: "string" },
235
+ { name: "acceptedAccountNo", type: "uint256" },
236
+ { name: "assignedAccountNos", type: "uint256[]" },
237
+ { name: "currency", type: "bytes32" },
238
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
239
+ { name: "circleId", type: "uint256" }
240
+ ]
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ type: "event",
246
+ name: "OrderCompleted",
247
+ anonymous: false,
248
+ inputs: [
249
+ { indexed: true, name: "orderId", type: "uint256" },
250
+ { indexed: true, name: "user", type: "address" },
251
+ { indexed: false, name: "completedTimestamp", type: "uint256" },
252
+ {
253
+ indexed: false,
254
+ name: "_order",
255
+ type: "tuple",
256
+ components: [
257
+ { name: "amount", type: "uint256" },
258
+ { name: "fiatAmount", type: "uint256" },
259
+ { name: "placedTimestamp", type: "uint256" },
260
+ { name: "completedTimestamp", type: "uint256" },
261
+ { name: "userCompletedTimestamp", type: "uint256" },
262
+ { name: "acceptedMerchant", type: "address" },
263
+ { name: "user", type: "address" },
264
+ { name: "recipientAddr", type: "address" },
265
+ { name: "pubkey", type: "string" },
266
+ { name: "encUpi", type: "string" },
267
+ { name: "userCompleted", type: "bool" },
268
+ { name: "status", type: "uint8" },
269
+ { name: "orderType", type: "uint8" },
270
+ {
271
+ name: "disputeInfo",
272
+ type: "tuple",
273
+ components: [
274
+ { name: "raisedBy", type: "uint8" },
275
+ { name: "status", type: "uint8" },
276
+ { name: "redactTransId", type: "uint256" },
277
+ { name: "accountNumber", type: "uint256" }
278
+ ]
279
+ },
280
+ { name: "id", type: "uint256" },
281
+ { name: "userPubKey", type: "string" },
282
+ { name: "encMerchantUpi", type: "string" },
283
+ { name: "acceptedAccountNo", type: "uint256" },
284
+ { name: "assignedAccountNos", type: "uint256[]" },
285
+ { name: "currency", type: "bytes32" },
286
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
287
+ { name: "circleId", type: "uint256" }
288
+ ]
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ type: "event",
294
+ name: "CancelledOrders",
295
+ anonymous: false,
296
+ inputs: [
297
+ { indexed: true, name: "orderId", type: "uint256" },
298
+ {
299
+ indexed: false,
300
+ name: "_order",
301
+ type: "tuple",
302
+ components: [
303
+ { name: "amount", type: "uint256" },
304
+ { name: "fiatAmount", type: "uint256" },
305
+ { name: "placedTimestamp", type: "uint256" },
306
+ { name: "completedTimestamp", type: "uint256" },
307
+ { name: "userCompletedTimestamp", type: "uint256" },
308
+ { name: "acceptedMerchant", type: "address" },
309
+ { name: "user", type: "address" },
310
+ { name: "recipientAddr", type: "address" },
311
+ { name: "pubkey", type: "string" },
312
+ { name: "encUpi", type: "string" },
313
+ { name: "userCompleted", type: "bool" },
314
+ { name: "status", type: "uint8" },
315
+ { name: "orderType", type: "uint8" },
316
+ {
317
+ name: "disputeInfo",
318
+ type: "tuple",
319
+ components: [
320
+ { name: "raisedBy", type: "uint8" },
321
+ { name: "status", type: "uint8" },
322
+ { name: "redactTransId", type: "uint256" },
323
+ { name: "accountNumber", type: "uint256" }
324
+ ]
325
+ },
326
+ { name: "id", type: "uint256" },
327
+ { name: "userPubKey", type: "string" },
328
+ { name: "encMerchantUpi", type: "string" },
329
+ { name: "acceptedAccountNo", type: "uint256" },
330
+ { name: "assignedAccountNos", type: "uint256[]" },
331
+ { name: "currency", type: "bytes32" },
332
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
333
+ { name: "circleId", type: "uint256" }
334
+ ]
335
+ }
336
+ ]
337
+ }
338
+ ];
339
+
340
+ // src/contracts/abis/order-processor-facet.ts
341
+ var orderProcessorFacetAbi = [
342
+ {
343
+ type: "function",
344
+ name: "getOrdersById",
345
+ stateMutability: "view",
346
+ inputs: [{ name: "orderId", type: "uint256" }],
347
+ outputs: [
348
+ {
349
+ type: "tuple",
350
+ components: [
351
+ { name: "amount", type: "uint256" },
352
+ { name: "fiatAmount", type: "uint256" },
353
+ { name: "placedTimestamp", type: "uint256" },
354
+ { name: "completedTimestamp", type: "uint256" },
355
+ { name: "userCompletedTimestamp", type: "uint256" },
356
+ { name: "acceptedMerchant", type: "address" },
357
+ { name: "user", type: "address" },
358
+ { name: "recipientAddr", type: "address" },
359
+ { name: "pubkey", type: "string" },
360
+ { name: "encUpi", type: "string" },
361
+ { name: "userCompleted", type: "bool" },
362
+ { name: "status", type: "uint8" },
363
+ { name: "orderType", type: "uint8" },
364
+ {
365
+ name: "disputeInfo",
366
+ type: "tuple",
367
+ components: [
368
+ { name: "raisedBy", type: "uint8" },
369
+ { name: "status", type: "uint8" },
370
+ { name: "redactTransId", type: "uint256" },
371
+ { name: "accountNumber", type: "uint256" }
372
+ ]
373
+ },
374
+ { name: "id", type: "uint256" },
375
+ { name: "userPubKey", type: "string" },
376
+ { name: "encMerchantUpi", type: "string" },
377
+ { name: "acceptedAccountNo", type: "uint256" },
378
+ { name: "assignedAccountNos", type: "uint256[]" },
379
+ { name: "currency", type: "bytes32" },
380
+ { name: "preferredPaymentChannelConfigId", type: "uint256" },
381
+ { name: "circleId", type: "uint256" }
382
+ ]
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ type: "function",
388
+ name: "getAdditionalOrderDetails",
389
+ stateMutability: "view",
390
+ inputs: [{ name: "orderId", type: "uint256" }],
391
+ outputs: [
392
+ {
393
+ type: "tuple",
394
+ components: [
395
+ { name: "fixedFeePaid", type: "uint64" },
396
+ { name: "tipsPaid", type: "uint64" },
397
+ { name: "acceptedTimestamp", type: "uint128" },
398
+ { name: "paidTimestamp", type: "uint128" },
399
+ { name: "reserved2", type: "uint128" },
400
+ { name: "actualUsdtAmount", type: "uint256" },
401
+ { name: "actualFiatAmount", type: "uint256" }
402
+ ]
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ type: "function",
408
+ name: "getSmallOrderThreshold",
409
+ stateMutability: "view",
410
+ inputs: [{ name: "currency", type: "bytes32" }],
411
+ outputs: [{ name: "", type: "uint256" }]
412
+ },
413
+ {
414
+ type: "function",
415
+ name: "getSmallOrderFixedFee",
416
+ stateMutability: "view",
417
+ inputs: [{ name: "currency", type: "bytes32" }],
418
+ outputs: [{ name: "", type: "uint256" }]
419
+ },
420
+ {
421
+ type: "function",
422
+ name: "raiseDispute",
423
+ stateMutability: "nonpayable",
424
+ inputs: [
425
+ { name: "_orderId", type: "uint256" },
426
+ { name: "redactTransId", type: "uint256" }
427
+ ],
428
+ outputs: []
429
+ },
430
+ {
431
+ type: "function",
432
+ name: "paidBuyOrder",
433
+ stateMutability: "nonpayable",
434
+ inputs: [{ name: "_orderId", type: "uint256" }],
435
+ outputs: []
436
+ }
437
+ ];
438
+
439
+ // src/contracts/abis/p2p-config-facet.ts
440
+ var p2pConfigFacetAbi = [
441
+ {
442
+ inputs: [
443
+ {
444
+ internalType: "bytes32",
445
+ name: "_currency",
446
+ type: "bytes32"
447
+ }
448
+ ],
449
+ name: "getPriceConfig",
450
+ outputs: [
451
+ {
452
+ components: [
453
+ {
454
+ internalType: "uint256",
455
+ name: "buyPrice",
456
+ type: "uint256"
457
+ },
458
+ {
459
+ internalType: "uint256",
460
+ name: "sellPrice",
461
+ type: "uint256"
462
+ },
463
+ {
464
+ internalType: "int256",
465
+ name: "buyPriceOffset",
466
+ type: "int256"
467
+ },
468
+ {
469
+ internalType: "uint256",
470
+ name: "baseSpread",
471
+ type: "uint256"
472
+ }
473
+ ],
474
+ internalType: "struct P2pConfigStorage.PriceConfig",
475
+ name: "",
476
+ type: "tuple"
477
+ }
478
+ ],
479
+ stateMutability: "view",
480
+ type: "function"
481
+ },
482
+ {
483
+ inputs: [
484
+ {
485
+ internalType: "bytes32",
486
+ name: "_nativeCurrency",
487
+ type: "bytes32"
488
+ }
489
+ ],
490
+ name: "getRpPerUsdtLimitRational",
491
+ outputs: [
492
+ {
493
+ internalType: "uint256",
494
+ name: "numerator",
495
+ type: "uint256"
496
+ },
497
+ {
498
+ internalType: "uint256",
499
+ name: "denominator",
500
+ type: "uint256"
501
+ }
502
+ ],
503
+ stateMutability: "view",
504
+ type: "function"
505
+ }
506
+ ];
507
+
508
+ // src/contracts/abis/reputation-manager.ts
509
+ var reputationManagerAbi = [
510
+ {
511
+ inputs: [
512
+ {
513
+ internalType: "string",
514
+ name: "_socialName",
515
+ type: "string"
516
+ },
517
+ {
518
+ components: [
519
+ {
520
+ components: [
521
+ {
522
+ internalType: "string",
523
+ name: "provider",
524
+ type: "string"
525
+ },
526
+ {
527
+ internalType: "string",
528
+ name: "parameters",
529
+ type: "string"
530
+ },
531
+ {
532
+ internalType: "string",
533
+ name: "context",
534
+ type: "string"
535
+ }
536
+ ],
537
+ internalType: "struct IReclaimSDK.ClaimInfo",
538
+ name: "claimInfo",
539
+ type: "tuple"
540
+ },
541
+ {
542
+ components: [
543
+ {
544
+ components: [
545
+ {
546
+ internalType: "bytes32",
547
+ name: "identifier",
548
+ type: "bytes32"
549
+ },
550
+ {
551
+ internalType: "address",
552
+ name: "owner",
553
+ type: "address"
554
+ },
555
+ {
556
+ internalType: "uint32",
557
+ name: "timestampS",
558
+ type: "uint32"
559
+ },
560
+ {
561
+ internalType: "uint32",
562
+ name: "epoch",
563
+ type: "uint32"
564
+ }
565
+ ],
566
+ internalType: "struct IReclaimSDK.CompleteClaimData",
567
+ name: "claim",
568
+ type: "tuple"
569
+ },
570
+ {
571
+ internalType: "bytes[]",
572
+ name: "signatures",
573
+ type: "bytes[]"
574
+ }
575
+ ],
576
+ internalType: "struct IReclaimSDK.SignedClaim",
577
+ name: "signedClaim",
578
+ type: "tuple"
579
+ }
580
+ ],
581
+ internalType: "struct IReclaimSDK.Proof[]",
582
+ name: "proofs",
583
+ type: "tuple[]"
584
+ }
585
+ ],
586
+ name: "socialVerify",
587
+ outputs: [],
588
+ stateMutability: "nonpayable",
589
+ type: "function"
590
+ },
591
+ {
592
+ inputs: [
593
+ {
594
+ internalType: "uint256",
595
+ name: "nullifierSeed",
596
+ type: "uint256"
597
+ },
598
+ {
599
+ internalType: "uint256",
600
+ name: "nullifier",
601
+ type: "uint256"
602
+ },
603
+ {
604
+ internalType: "uint256",
605
+ name: "timestamp",
606
+ type: "uint256"
607
+ },
608
+ {
609
+ internalType: "uint256",
610
+ name: "signal",
611
+ type: "uint256"
612
+ },
613
+ {
614
+ internalType: "uint256[4]",
615
+ name: "revealArray",
616
+ type: "uint256[4]"
617
+ },
618
+ {
619
+ internalType: "uint256[8]",
620
+ name: "groth16Proof",
621
+ type: "uint256[8]"
622
+ }
623
+ ],
624
+ name: "submitAnonAadharProof",
625
+ outputs: [],
626
+ stateMutability: "nonpayable",
627
+ type: "function"
628
+ },
629
+ {
630
+ inputs: [
631
+ {
632
+ components: [
633
+ {
634
+ internalType: "bytes32",
635
+ name: "version",
636
+ type: "bytes32"
637
+ },
638
+ {
639
+ components: [
640
+ {
641
+ internalType: "bytes32",
642
+ name: "vkeyHash",
643
+ type: "bytes32"
644
+ },
645
+ {
646
+ internalType: "bytes",
647
+ name: "proof",
648
+ type: "bytes"
649
+ },
650
+ {
651
+ internalType: "bytes32[]",
652
+ name: "publicInputs",
653
+ type: "bytes32[]"
654
+ }
655
+ ],
656
+ internalType: "struct ProofVerificationData",
657
+ name: "proofVerificationData",
658
+ type: "tuple"
659
+ },
660
+ {
661
+ internalType: "bytes",
662
+ name: "committedInputs",
663
+ type: "bytes"
664
+ },
665
+ {
666
+ components: [
667
+ {
668
+ internalType: "uint256",
669
+ name: "validityPeriodInSeconds",
670
+ type: "uint256"
671
+ },
672
+ {
673
+ internalType: "string",
674
+ name: "domain",
675
+ type: "string"
676
+ },
677
+ {
678
+ internalType: "string",
679
+ name: "scope",
680
+ type: "string"
681
+ },
682
+ {
683
+ internalType: "bool",
684
+ name: "devMode",
685
+ type: "bool"
686
+ }
687
+ ],
688
+ internalType: "struct ServiceConfig",
689
+ name: "serviceConfig",
690
+ type: "tuple"
691
+ }
692
+ ],
693
+ internalType: "struct ProofVerificationParams",
694
+ name: "params",
695
+ type: "tuple"
696
+ },
697
+ {
698
+ internalType: "bool",
699
+ name: "isIDCard",
700
+ type: "bool"
701
+ }
702
+ ],
703
+ name: "zkPassportRegister",
704
+ outputs: [],
705
+ stateMutability: "nonpayable",
706
+ type: "function"
707
+ }
708
+ ];
709
+
710
+ // src/contracts/abis/index.ts
711
+ var DIAMOND_ABI = [
712
+ ...orderFlowFacetAbi,
713
+ ...orderProcessorFacetAbi,
714
+ ...p2pConfigFacetAbi
715
+ ];
716
+ var ABIS = {
717
+ DIAMOND: DIAMOND_ABI,
718
+ FACETS: {
719
+ ORDER_FLOW: orderFlowFacetAbi,
720
+ ORDER_PROCESSOR: orderProcessorFacetAbi,
721
+ CONFIG: p2pConfigFacetAbi
722
+ },
723
+ EXTERNAL: {
724
+ USDC: import_viem.erc20Abi,
725
+ REPUTATION_MANAGER: reputationManagerAbi
726
+ }
727
+ };
728
+
729
+ // src/contracts/errors.ts
730
+ var contractErrors = {
731
+ // Access control
732
+ NotAdmin: "NOT_ADMIN",
733
+ NotSuperAdmin: "NOT_SUPER_ADMIN",
734
+ NotAuthorized: "NOT_AUTHORIZED",
735
+ NotSelf: "NOT_SELF",
736
+ NotWhitelisted: "NOT_WHITELISTED",
737
+ NotCircleAdmin: "NOT_CIRCLE_ADMIN",
738
+ // Circle / community management
739
+ InvalidName: "INVALID_NAME",
740
+ InvalidCommunityUrl: "INVALID_COMMUNITY_URL",
741
+ InvalidAdminCommunityUrl: "INVALID_ADMIN_COMMUNITY_URL",
742
+ AdminAlreadyHasCircle: "ADMIN_ALREADY_HAS_CIRCLE",
743
+ CircleNameAlreadyTaken: "CIRCLE_NAME_ALREADY_TAKEN",
744
+ P2PStakeConfigNotSet: "P2P_STAKE_CONFIG_NOT_SET",
745
+ InsufficientP2PStake: "INSUFFICIENT_P2P_STAKE",
746
+ P2PTokenNotSet: "P2P_TOKEN_NOT_SET",
747
+ P2PUnstakeRequestPending: "P2P_UNSTAKE_REQUEST_PENDING",
748
+ NoP2PUnstakeRequest: "NO_P2P_UNSTAKE_REQUEST",
749
+ P2PUnstakeCooldownNotPassed: "P2P_UNSTAKE_COOLDOWN_NOT_PASSED",
750
+ SlashAmountExceedsStake: "SLASH_AMOUNT_EXCEEDS_STAKE",
751
+ CircleNotActive: "CIRCLE_NOT_ACTIVE",
752
+ InvalidCircleId: "INVALID_CIRCLE_ID",
753
+ CurrencyMismatch: "CURRENCY_MISMATCH",
754
+ CircleFull: "CIRCLE_FULL",
755
+ CircleIdMismatch: "CIRCLE_ID_MISMATCH",
756
+ DuplicateAccountName: "DUPLICATE_ACCOUNT_NAME",
757
+ EmptyName: "EMPTY_NAME",
758
+ AccountBoundToAnotherCircle: "ACCOUNT_BOUND_TO_ANOTHER_CIRCLE",
759
+ ExitAmountExceededCircleBalance: "EXIT_AMOUNT_EXCEEDED_CIRCLE_BALANCE",
760
+ UndelegationAmountTooHigh: "UNDELEGATION_AMOUNT_TOO_HIGH",
761
+ // Exchange / order lifecycle
762
+ ExchangeNotOperational: "EXCHANGE_NOT_OPERATIONAL",
763
+ OrderNotPlaced: "ORDER_NOT_PLACED",
764
+ OrderNotPaid: "ORDER_NOT_PAID",
765
+ OrderStatusInvalid: "ORDER_STATUS_INVALID",
766
+ OrderExpired: "ORDER_EXPIRED",
767
+ OrderAlreadyPaid: "ORDER_ALREADY_PAID",
768
+ OrderAlreadyCompleted: "ORDER_ALREADY_COMPLETED",
769
+ InvalidOrderType: "INVALID_ORDER_TYPE",
770
+ OrderTypeIncorrect: "ORDER_TYPE_INCORRECT",
771
+ OrderNotAccepted: "ORDER_NOT_ACCEPTED",
772
+ OrderNotAssigned: "ORDER_NOT_ASSIGNED",
773
+ OrderAmountExceedsLimit: "ORDER_AMOUNT_EXCEEDS_LIMIT",
774
+ InvalidOrderAmount: "INVALID_ORDER_AMOUNT",
775
+ InvalidOrderAmountToCoverFee: "INVALID_ORDER_AMOUNT_TO_COVER_FEE",
776
+ InvalidOrderId: "INVALID_ORDER_ID",
777
+ OrderTooEarlyForReassignment: "ORDER_TOO_EARLY_FOR_REASSIGNMENT",
778
+ OrderTooLateForReassignment: "ORDER_TOO_LATE_FOR_REASSIGNMENT",
779
+ ReAssignmentNotRequired: "REASSIGNMENT_NOT_REQUIRED",
780
+ TipAlreadyGiven: "TIP_ALREADY_GIVEN",
781
+ CashbackTransferFailed: "CASHBACK_TRANSFER_FAILED",
782
+ // Order limits
783
+ DailyBuyOrderLimitExceeded: "DAILY_BUY_ORDER_LIMIT_EXCEEDED",
784
+ MonthlyBuyOrderLimitExceeded: "MONTHLY_BUY_ORDER_LIMIT_EXCEEDED",
785
+ SellOrderAmountLimitExceeded: "SELL_ORDER_AMOUNT_LIMIT_EXCEEDED",
786
+ BuyOrderAmountExceedsLimit: "BUY_ORDER_AMOUNT_EXCEEDS_LIMIT",
787
+ SellOrderAmountExceedsLimit: "SELL_ORDER_AMOUNT_EXCEEDS_LIMIT",
788
+ BuyAmountExceedsUsdcLimit: "BUY_AMOUNT_EXCEEDS_USDC_LIMIT",
789
+ SellAmountExceedsFiatLimit: "SELL_AMOUNT_EXCEEDS_FIAT_LIMIT",
790
+ DailyVolumeLimitExceeded: "DAILY_VOLUME_LIMIT_EXCEEDED",
791
+ MonthlyVolumeLimitExceeded: "MONTHLY_VOLUME_LIMIT_EXCEEDED",
792
+ UserYearlyVolumeLimitExceeded: "USER_YEARLY_VOLUME_LIMIT_EXCEEDED",
793
+ // Dispute
794
+ DisputeTimeNotReached: "DISPUTE_TIME_NOT_REACHED",
795
+ DisputeTimeExpired: "DISPUTE_TIME_EXPIRED",
796
+ InvalidOrderStatusToRaiseDispute: "INVALID_ORDER_STATUS_TO_RAISE_DISPUTE",
797
+ DisputeNotRaised: "DISPUTE_NOT_RAISED",
798
+ CannotRaiseDisputeTwice: "CANNOT_RAISE_DISPUTE_TWICE",
799
+ DisputeAlreadySettled: "DISPUTE_ALREADY_SETTLED",
800
+ TransactionIdMismatch: "TRANSACTION_ID_MISMATCH",
801
+ AccountNumberMismatch: "ACCOUNT_NUMBER_MISMATCH",
802
+ NotPaidBuyOrder: "NOT_PAID_BUY_ORDER",
803
+ // Payment channels
804
+ PaymentChannelNotFound: "PAYMENT_CHANNEL_NOT_FOUND",
805
+ PaymentChannelNotActive: "PAYMENT_CHANNEL_NOT_ACTIVE",
806
+ PaymentChannelNotApproved: "PAYMENT_CHANNEL_NOT_APPROVED",
807
+ PaymentChannelNotRejected: "PAYMENT_CHANNEL_NOT_REJECTED",
808
+ InvalidPaymentChannelId: "INVALID_PAYMENT_CHANNEL_ID",
809
+ DuplicatePaymentChannel: "DUPLICATE_PAYMENT_CHANNEL",
810
+ OldPaymentChannelNotFound: "OLD_PAYMENT_CHANNEL_NOT_FOUND",
811
+ NewPaymentChannelNotFound: "NEW_PAYMENT_CHANNEL_NOT_FOUND",
812
+ SamePaymentChannel: "SAME_PAYMENT_CHANNEL",
813
+ OldPaymentChannelShouldBeInactive: "OLD_PAYMENT_CHANNEL_SHOULD_BE_INACTIVE",
814
+ NewPaymentChannelShouldBeActive: "NEW_PAYMENT_CHANNEL_SHOULD_BE_ACTIVE",
815
+ OngoingOrderOnPaymentChannel: "ONGOING_ORDER_ON_PAYMENT_CHANNEL",
816
+ UpiAlreadySent: "UPI_ALREADY_SENT",
817
+ InvalidOrderUpi: "INVALID_ORDER_UPI",
818
+ NoFiatLiquidity: "NO_FIAT_LIQUIDITY",
819
+ // Merchant
820
+ NotEnoughEligibleMerchants: "NOT_ENOUGH_ELIGIBLE_MERCHANTS",
821
+ MerchantNotRegistered: "MERCHANT_NOT_REGISTERED",
822
+ MerchantNotApproved: "MERCHANT_NOT_APPROVED",
823
+ MerchantAlreadyRegistered: "MERCHANT_ALREADY_REGISTERED",
824
+ MerchantAlreadyRejected: "MERCHANT_ALREADY_REJECTED",
825
+ MerchantBlacklisted: "MERCHANT_BLACKLISTED",
826
+ MerchantNotBlacklisted: "MERCHANT_NOT_BLACKLISTED",
827
+ MerchantAlreadyBlacklisted: "MERCHANT_ALREADY_BLACKLISTED",
828
+ MerchantHasOngoingOrders: "MERCHANT_HAS_ONGOING_ORDERS",
829
+ MerchantNotFullfilledEligibilityThreshold: "MERCHANT_NOT_FULLFILLED_ELIGIBILITY_THRESHOLD",
830
+ InvalidMerchant: "INVALID_MERCHANT",
831
+ // Staking / unstaking
832
+ StakeAmountTooLow: "STAKE_AMOUNT_TOO_LOW",
833
+ AdditionalStakeNotAllowed: "ADDITIONAL_STAKE_NOT_ALLOWED",
834
+ UnstakeRequestPending: "UNSTAKE_REQUEST_PENDING",
835
+ UnstakeRequestNotPending: "UNSTAKE_REQUEST_NOT_PENDING",
836
+ UnstakeAmountExceeded: "UNSTAKE_AMOUNT_EXCEEDED",
837
+ ZeroUnstakeAmount: "ZERO_UNSTAKE_AMOUNT",
838
+ NoWithdrawableAmount: "NO_WITHDRAWABLE_AMOUNT",
839
+ NoStake: "NO_STAKE",
840
+ NoStakers: "NO_STAKERS",
841
+ InsufficientStakedAmount: "INSUFFICIENT_STAKED_AMOUNT",
842
+ CooldownNotPassed: "COOLDOWN_NOT_PASSED",
843
+ ClaimableRewardsNotAvailable: "CLAIMABLE_REWARDS_NOT_AVAILABLE",
844
+ // Delegation
845
+ ExitWouldBreachDelegationInvariant: "EXIT_WOULD_BREACH_DELEGATION_INVARIANT",
846
+ AggregateDelegationExceedsTotalStaked: "AGGREGATE_DELEGATION_EXCEEDS_TOTAL_STAKED",
847
+ InsufficientMerchantRewards: "INSUFFICIENT_MERCHANT_REWARDS",
848
+ // Migration
849
+ InvalidMigrationStatus: "INVALID_MIGRATION_STATUS",
850
+ MigrationRequestNotPending: "MIGRATION_REQUEST_NOT_PENDING",
851
+ MigrationAlreadyRequested: "MIGRATION_ALREADY_REQUESTED",
852
+ // Token / currency
853
+ TokenAlreadyExists: "TOKEN_ALREADY_EXISTS",
854
+ TokenNotFound: "TOKEN_NOT_FOUND",
855
+ TokenEmpty: "TOKEN_EMPTY",
856
+ CurrencyNotSupported: "CURRENCY_NOT_SUPPORTED",
857
+ InvalidCurrency: "INVALID_CURRENCY",
858
+ // USDC / transfer
859
+ UsdtTransferFailed: "USDC_TRANSFER_FAILED",
860
+ UsdtTransferFailedWithErrorMessage: "USDC_TRANSFER_FAILED_WITH_ERROR_MESSAGE",
861
+ UsdtTransferFailedWithPanic: "USDC_TRANSFER_FAILED_WITH_PANIC",
862
+ InsufficientAllowance: "INSUFFICIENT_ALLOWANCE",
863
+ // ZK Passport
864
+ ZKPassportVerifierNotSet: "ZK_PASSPORT_VERIFIER_NOT_SET",
865
+ ZKPassportDomainEmpty: "ZK_PASSPORT_DOMAIN_EMPTY",
866
+ ZKPassportScopeEmpty: "ZK_PASSPORT_SCOPE_EMPTY",
867
+ PassportAlreadyVerified: "PASSPORT_ALREADY_VERIFIED",
868
+ ZKPassportProofInvalid: "ZK_PASSPORT_PROOF_INVALID",
869
+ ZKPassportIdentifierAlreadyVerified: "ZK_PASSPORT_IDENTIFIER_ALREADY_VERIFIED",
870
+ ZKPassportInvalidScope: "ZK_PASSPORT_INVALID_SCOPE",
871
+ ZKPassportUnexpectedSender: "ZK_PASSPORT_UNEXPECTED_SENDER",
872
+ ZKPassportAgeBelowMinimum: "ZK_PASSPORT_AGE_BELOW_MINIMUM",
873
+ ZKPassportMinAgeTooHigh: "ZK_PASSPORT_MIN_AGE_TOO_HIGH",
874
+ // Chainlink / oracle
875
+ UnexpectedRequestId: "UNEXPECTED_REQUEST_ID",
876
+ OnlyRouterCanFulfill: "ONLY_ROUTER_CAN_FULFILL",
877
+ RequestFailed: "REQUEST_FAILED",
878
+ SourceCodeMismatch: "SOURCE_CODE_MISMATCH",
879
+ ZeroMarketPrice: "ZERO_MARKET_PRICE",
880
+ InvalidComputedPrices: "INVALID_COMPUTED_PRICES",
881
+ NotPriceUpdaterForCurrency: "NOT_PRICE_UPDATER_FOR_CURRENCY",
882
+ ThresholdNotConfigured: "THRESHOLD_NOT_CONFIGURED",
883
+ SlippageExceeded: "SLIPPAGE_EXCEEDED",
884
+ // Reputation / verification
885
+ UserHasNoReputation: "USER_HAS_NO_REPUTATION",
886
+ ZeroReputationPoints: "ZERO_REPUTATION_POINTS",
887
+ NoReputation: "NO_REPUTATION",
888
+ InsufficientRP: "INSUFFICIENT_RP",
889
+ NullifierAlreadyVerified: "NULLIFIER_ALREADY_VERIFIED",
890
+ VerificationFailed: "VERIFICATION_FAILED",
891
+ InvalidSocialPlatform: "INVALID_SOCIAL_PLATFORM",
892
+ SocialAlreadyVerified: "SOCIAL_ALREADY_VERIFIED",
893
+ YearFieldNotInProof: "YEAR_FIELD_NOT_IN_PROOF",
894
+ UserIdFieldNotInProof: "USER_ID_FIELD_NOT_IN_PROOF",
895
+ UserIdAlreadyVerified: "USER_ID_ALREADY_VERIFIED",
896
+ UsernameAlreadyVerified: "USERNAME_ALREADY_VERIFIED",
897
+ UsernameNotInProof: "USERNAME_NOT_IN_PROOF",
898
+ LinkedInOnlyRpUpdates: "LINKEDIN_ONLY_RP_UPDATES",
899
+ FacebookOnlyRpUpdates: "FACEBOOK_ONLY_RP_UPDATES",
900
+ // Voting / referral
901
+ AlreadyReferred: "ALREADY_REFERRED",
902
+ SelfReferralNotAllowed: "SELF_REFERRAL_NOT_ALLOWED",
903
+ NotEligibleToRefer: "NOT_ELIGIBLE_TO_REFER",
904
+ MerchantMonthlyReferralLimitReached: "MERCHANT_MONTHLY_REFERRAL_LIMIT_REACHED",
905
+ NoRecommender: "NO_RECOMMENDER",
906
+ RecommendationAlreadyClaimed: "RECOMMENDATION_ALREADY_CLAIMED",
907
+ CannotVoteYourself: "CANNOT_VOTE_YOURSELF",
908
+ VotesPerEpochExceeded: "VOTES_PER_EPOCH_EXCEEDED",
909
+ AlreadyVoted: "ALREADY_VOTED",
910
+ FunctionNotFound: "FUNCTION_NOT_FOUND",
911
+ // Campaign
912
+ CampaignNotActive: "CAMPAIGN_NOT_ACTIVE",
913
+ InvalidManagerDetails: "INVALID_MANAGER_DETAILS",
914
+ UnclaimedRewardsExist: "UNCLAIMED_REWARDS_EXIST",
915
+ RewardAlreadyClaimed: "REWARD_ALREADY_CLAIMED",
916
+ OnlyNewUsersAllowed: "ONLY_NEW_USERS_ALLOWED",
917
+ ManagerNotFound: "MANAGER_NOT_FOUND",
918
+ ManagerInactive: "MANAGER_INACTIVE",
919
+ NoRewards: "NO_REWARDS",
920
+ InvalidCampaignId: "INVALID_CAMPAIGN_ID",
921
+ CannotClaimRevenueForCurrentMonth: "CANNOT_CLAIM_REVENUE_FOR_CURRENT_MONTH",
922
+ // Referral reward config
923
+ RewardPercentageTooHigh: "REWARD_PERCENTAGE_TOO_HIGH",
924
+ // Signature / nonce
925
+ NonceAlreadyUsed: "NONCE_ALREADY_USED",
926
+ SignatureValidationFailed: "SIGNATURE_VALIDATION_FAILED",
927
+ // Misc
928
+ InvalidAddress: "INVALID_ADDRESS",
929
+ InvalidBlockAmount: "INVALID_BLOCK_AMOUNT",
930
+ InvalidAmount: "INVALID_AMOUNT",
931
+ InvalidInput: "INVALID_INPUT",
932
+ InvalidStatusTransition: "INVALID_STATUS_TRANSITION",
933
+ ArrayLengthMismatch: "ARRAY_LENGTH_MISMATCH",
934
+ UserIsBlacklisted: "USER_IS_BLACKLISTED",
935
+ ZeroAddress: "ZERO_ADDRESS",
936
+ ReentrancyGuard: "REENTRANCY_GUARD",
937
+ BatchTooLarge: "BATCH_TOO_LARGE",
938
+ UnderflowSubtraction: "UNDERFLOW_SUBTRACTION",
939
+ TargetLongerThanData: "TARGET_LONGER_THAN_DATA"
940
+ };
941
+ var hexContractErrors = {
942
+ // Access control
943
+ "0x7bfa4b9f": contractErrors.NotAdmin,
944
+ "0x16c726b1": contractErrors.NotSuperAdmin,
945
+ "0xea8e4eb5": contractErrors.NotAuthorized,
946
+ "0x29c3b7ee": contractErrors.NotSelf,
947
+ "0x584a7938": contractErrors.NotWhitelisted,
948
+ "0xa8143fbc": contractErrors.NotCircleAdmin,
949
+ // Circle / community management
950
+ "0x430f13b3": contractErrors.InvalidName,
951
+ "0xe7cbf75a": contractErrors.InvalidCommunityUrl,
952
+ "0x3762bfee": contractErrors.InvalidAdminCommunityUrl,
953
+ "0x201c1ffc": contractErrors.AdminAlreadyHasCircle,
954
+ "0x6540a51d": contractErrors.CircleNameAlreadyTaken,
955
+ "0xcadc6786": contractErrors.P2PStakeConfigNotSet,
956
+ "0x78317f44": contractErrors.InsufficientP2PStake,
957
+ "0x18eda032": contractErrors.P2PTokenNotSet,
958
+ "0xdab11ea6": contractErrors.P2PUnstakeRequestPending,
959
+ "0xeb1ce40b": contractErrors.NoP2PUnstakeRequest,
960
+ "0xbf2d0ba1": contractErrors.P2PUnstakeCooldownNotPassed,
961
+ "0x06b663af": contractErrors.SlashAmountExceedsStake,
962
+ "0xff9b022c": contractErrors.CircleNotActive,
963
+ "0x3d90c0a6": contractErrors.InvalidCircleId,
964
+ "0xfb42a67d": contractErrors.CurrencyMismatch,
965
+ "0xf2775265": contractErrors.CircleFull,
966
+ "0x784b6c3c": contractErrors.CircleIdMismatch,
967
+ "0xee240e49": contractErrors.DuplicateAccountName,
968
+ "0x2ef13105": contractErrors.EmptyName,
969
+ "0x1b5433c8": contractErrors.AccountBoundToAnotherCircle,
970
+ "0x549e2555": contractErrors.ExitAmountExceededCircleBalance,
971
+ "0x865b21e1": contractErrors.UndelegationAmountTooHigh,
972
+ // Exchange / order lifecycle
973
+ "0x4bbac5de": contractErrors.ExchangeNotOperational,
974
+ "0x58db8ed6": contractErrors.OrderNotPlaced,
975
+ "0x1e3b9629": contractErrors.OrderNotPaid,
976
+ "0x181b1b2e": contractErrors.OrderStatusInvalid,
977
+ "0xc56873ba": contractErrors.OrderExpired,
978
+ "0x7f61b868": contractErrors.OrderAlreadyPaid,
979
+ "0x03683687": contractErrors.OrderAlreadyCompleted,
980
+ "0x688c176f": contractErrors.InvalidOrderType,
981
+ "0x2e757a60": contractErrors.OrderTypeIncorrect,
982
+ "0x6b1b90b4": contractErrors.OrderNotAccepted,
983
+ "0x1775c43e": contractErrors.OrderNotAssigned,
984
+ "0xf42e41a1": contractErrors.OrderAmountExceedsLimit,
985
+ "0x93845d68": contractErrors.InvalidOrderAmount,
986
+ "0x138b9d5a": contractErrors.InvalidOrderAmountToCoverFee,
987
+ "0x5d706033": contractErrors.InvalidOrderId,
988
+ "0xbb776720": contractErrors.OrderTooEarlyForReassignment,
989
+ "0x20d5910f": contractErrors.OrderTooLateForReassignment,
990
+ "0xccd87bf0": contractErrors.ReAssignmentNotRequired,
991
+ "0xb20277f8": contractErrors.TipAlreadyGiven,
992
+ "0xdf9f707c": contractErrors.CashbackTransferFailed,
993
+ // Order limits
994
+ "0xe595a7bf": contractErrors.DailyBuyOrderLimitExceeded,
995
+ "0x675dbc86": contractErrors.MonthlyBuyOrderLimitExceeded,
996
+ "0x64301cb8": contractErrors.SellOrderAmountLimitExceeded,
997
+ "0x91da284f": contractErrors.BuyOrderAmountExceedsLimit,
998
+ "0xb407b9ec": contractErrors.SellOrderAmountExceedsLimit,
999
+ "0x4b29cf0a": contractErrors.BuyAmountExceedsUsdcLimit,
1000
+ "0xbba2edf9": contractErrors.SellAmountExceedsFiatLimit,
1001
+ "0x7e2ee654": contractErrors.DailyVolumeLimitExceeded,
1002
+ "0x49de1789": contractErrors.MonthlyVolumeLimitExceeded,
1003
+ "0xb14a1ff3": contractErrors.UserYearlyVolumeLimitExceeded,
1004
+ // Dispute
1005
+ "0x07a2454f": contractErrors.DisputeTimeNotReached,
1006
+ "0xb28c3e29": contractErrors.DisputeTimeExpired,
1007
+ "0x2a829f07": contractErrors.InvalidOrderStatusToRaiseDispute,
1008
+ "0x88d039ce": contractErrors.DisputeNotRaised,
1009
+ "0x3764a75c": contractErrors.CannotRaiseDisputeTwice,
1010
+ "0x866e9f89": contractErrors.DisputeAlreadySettled,
1011
+ "0x6131d13d": contractErrors.TransactionIdMismatch,
1012
+ "0x8ec051b8": contractErrors.AccountNumberMismatch,
1013
+ "0xf8bfad32": contractErrors.NotPaidBuyOrder,
1014
+ // Payment channels
1015
+ "0x552ff5ec": contractErrors.PaymentChannelNotFound,
1016
+ "0xfccd93cf": contractErrors.PaymentChannelNotActive,
1017
+ "0x6764f4d6": contractErrors.PaymentChannelNotApproved,
1018
+ "0xab284291": contractErrors.PaymentChannelNotRejected,
1019
+ "0x99c8ef4d": contractErrors.InvalidPaymentChannelId,
1020
+ "0x0569ab3e": contractErrors.DuplicatePaymentChannel,
1021
+ "0xff4f83ca": contractErrors.OldPaymentChannelNotFound,
1022
+ "0xb1198199": contractErrors.NewPaymentChannelNotFound,
1023
+ "0xc905b99a": contractErrors.SamePaymentChannel,
1024
+ "0xcedb41f1": contractErrors.OldPaymentChannelShouldBeInactive,
1025
+ "0x487add97": contractErrors.NewPaymentChannelShouldBeActive,
1026
+ "0x6d4c3f9e": contractErrors.OngoingOrderOnPaymentChannel,
1027
+ "0xc1654697": contractErrors.UpiAlreadySent,
1028
+ "0xaa60ec26": contractErrors.InvalidOrderUpi,
1029
+ "0x81c2b982": contractErrors.NoFiatLiquidity,
1030
+ // Merchant
1031
+ "0x5d04ff4c": contractErrors.NotEnoughEligibleMerchants,
1032
+ "0xa6af7ebe": contractErrors.MerchantNotRegistered,
1033
+ "0x7290a612": contractErrors.MerchantNotApproved,
1034
+ "0xf4a1e014": contractErrors.MerchantAlreadyRegistered,
1035
+ "0x8713aaba": contractErrors.MerchantAlreadyRejected,
1036
+ "0x9ae55bc7": contractErrors.MerchantBlacklisted,
1037
+ "0x0ee0b659": contractErrors.MerchantNotBlacklisted,
1038
+ "0x5f765689": contractErrors.MerchantAlreadyBlacklisted,
1039
+ "0x9c54e5a8": contractErrors.MerchantHasOngoingOrders,
1040
+ "0x70d753bd": contractErrors.MerchantNotFullfilledEligibilityThreshold,
1041
+ "0xc0b6c919": contractErrors.InvalidMerchant,
1042
+ // Staking / unstaking
1043
+ "0x3fd2347e": contractErrors.StakeAmountTooLow,
1044
+ "0x703cde0a": contractErrors.AdditionalStakeNotAllowed,
1045
+ "0xa9de99ae": contractErrors.UnstakeRequestPending,
1046
+ "0x0b7c70f3": contractErrors.UnstakeRequestNotPending,
1047
+ "0xe665491f": contractErrors.UnstakeAmountExceeded,
1048
+ "0x2d3087f9": contractErrors.ZeroUnstakeAmount,
1049
+ "0x1b1d7861": contractErrors.NoWithdrawableAmount,
1050
+ "0xcacf989a": contractErrors.NoStake,
1051
+ "0x21311aa3": contractErrors.NoStakers,
1052
+ "0xd06ff88e": contractErrors.InsufficientStakedAmount,
1053
+ "0x9ab7872d": contractErrors.CooldownNotPassed,
1054
+ "0x73380d99": contractErrors.ClaimableRewardsNotAvailable,
1055
+ // Delegation
1056
+ "0xec4b3ce6": contractErrors.ExitWouldBreachDelegationInvariant,
1057
+ "0x8f90a426": contractErrors.AggregateDelegationExceedsTotalStaked,
1058
+ "0x2cc11576": contractErrors.InsufficientMerchantRewards,
1059
+ // Migration
1060
+ "0x92aa7d0f": contractErrors.InvalidMigrationStatus,
1061
+ "0x7ff47425": contractErrors.MigrationRequestNotPending,
1062
+ "0x88ddec46": contractErrors.MigrationAlreadyRequested,
1063
+ // Token / currency
1064
+ "0xc991cbb1": contractErrors.TokenAlreadyExists,
1065
+ "0xcbdb7b30": contractErrors.TokenNotFound,
1066
+ "0x9f11a53f": contractErrors.TokenEmpty,
1067
+ "0x02a6fdd2": contractErrors.CurrencyNotSupported,
1068
+ "0xf5993428": contractErrors.InvalidCurrency,
1069
+ // USDC / transfer
1070
+ "0x149f9fca": contractErrors.UsdtTransferFailed,
1071
+ "0x47bfece5": contractErrors.UsdtTransferFailedWithErrorMessage,
1072
+ "0x279bbc0c": contractErrors.UsdtTransferFailedWithPanic,
1073
+ "0xfb8f41b2": contractErrors.InsufficientAllowance,
1074
+ // ZK Passport
1075
+ "0xfd8d4a6d": contractErrors.ZKPassportVerifierNotSet,
1076
+ "0xb87078f9": contractErrors.ZKPassportDomainEmpty,
1077
+ "0x5eadc4c2": contractErrors.ZKPassportScopeEmpty,
1078
+ "0x7642fe15": contractErrors.PassportAlreadyVerified,
1079
+ "0x1fa24b35": contractErrors.ZKPassportProofInvalid,
1080
+ "0x36bdb7b6": contractErrors.ZKPassportIdentifierAlreadyVerified,
1081
+ "0xd13a7934": contractErrors.ZKPassportInvalidScope,
1082
+ "0x69f5bfe7": contractErrors.ZKPassportUnexpectedSender,
1083
+ "0x0464115c": contractErrors.ZKPassportAgeBelowMinimum,
1084
+ "0x48183836": contractErrors.ZKPassportMinAgeTooHigh,
1085
+ // Chainlink / oracle
1086
+ "0x7f73f237": contractErrors.UnexpectedRequestId,
1087
+ "0xab948796": contractErrors.OnlyRouterCanFulfill,
1088
+ "0x61982c98": contractErrors.RequestFailed,
1089
+ "0xab66be18": contractErrors.SourceCodeMismatch,
1090
+ "0xff2826ef": contractErrors.ZeroMarketPrice,
1091
+ "0xbb6c216c": contractErrors.InvalidComputedPrices,
1092
+ "0x3a8fbef4": contractErrors.NotPriceUpdaterForCurrency,
1093
+ "0x3e2c36f2": contractErrors.ThresholdNotConfigured,
1094
+ "0x71c4efed": contractErrors.SlippageExceeded,
1095
+ // Reputation / verification
1096
+ "0x071ea33c": contractErrors.UserHasNoReputation,
1097
+ "0xd2e1e6e0": contractErrors.ZeroReputationPoints,
1098
+ "0x3c0ca622": contractErrors.NoReputation,
1099
+ "0x412dd2b1": contractErrors.InsufficientRP,
1100
+ "0x0f165e7b": contractErrors.NullifierAlreadyVerified,
1101
+ "0x439cc0cd": contractErrors.VerificationFailed,
1102
+ "0x2366073b": contractErrors.InvalidSocialPlatform,
1103
+ "0x2f850b6b": contractErrors.SocialAlreadyVerified,
1104
+ "0x466f52a8": contractErrors.YearFieldNotInProof,
1105
+ "0x4d460588": contractErrors.UserIdFieldNotInProof,
1106
+ "0xa18ea4e8": contractErrors.UserIdAlreadyVerified,
1107
+ "0x69470b13": contractErrors.UsernameAlreadyVerified,
1108
+ "0x8390b2dd": contractErrors.UsernameNotInProof,
1109
+ "0xef053cf4": contractErrors.LinkedInOnlyRpUpdates,
1110
+ "0x355b0709": contractErrors.FacebookOnlyRpUpdates,
1111
+ // Voting / referral
1112
+ "0x7aabdfe3": contractErrors.AlreadyReferred,
1113
+ "0x83463f4a": contractErrors.SelfReferralNotAllowed,
1114
+ "0x69f6994a": contractErrors.NotEligibleToRefer,
1115
+ "0x1b19ad97": contractErrors.MerchantMonthlyReferralLimitReached,
1116
+ "0x944a2241": contractErrors.NoRecommender,
1117
+ "0x0ece93a6": contractErrors.RecommendationAlreadyClaimed,
1118
+ "0x74785d0f": contractErrors.CannotVoteYourself,
1119
+ "0xc26d5f75": contractErrors.VotesPerEpochExceeded,
1120
+ "0x7c9a1cf9": contractErrors.AlreadyVoted,
1121
+ "0x403e7fa6": contractErrors.FunctionNotFound,
1122
+ // Campaign
1123
+ "0x7a551e38": contractErrors.CampaignNotActive,
1124
+ "0x668ca75d": contractErrors.InvalidManagerDetails,
1125
+ "0x2f950361": contractErrors.UnclaimedRewardsExist,
1126
+ "0x626b7c00": contractErrors.RewardAlreadyClaimed,
1127
+ "0x902ade67": contractErrors.OnlyNewUsersAllowed,
1128
+ "0x22a5e34b": contractErrors.ManagerNotFound,
1129
+ "0xa1610e37": contractErrors.ManagerInactive,
1130
+ "0x3fb087f4": contractErrors.NoRewards,
1131
+ "0x3eedee0f": contractErrors.InvalidCampaignId,
1132
+ "0x302c5138": contractErrors.CannotClaimRevenueForCurrentMonth,
1133
+ // Referral reward config
1134
+ "0x074a6991": contractErrors.RewardPercentageTooHigh,
1135
+ // Signature / nonce
1136
+ "0x1fb09b80": contractErrors.NonceAlreadyUsed,
1137
+ "0x2fdec18b": contractErrors.SignatureValidationFailed,
1138
+ // Misc
1139
+ "0xe6c4247b": contractErrors.InvalidAddress,
1140
+ "0x3eb17c88": contractErrors.InvalidBlockAmount,
1141
+ "0x2c5211c6": contractErrors.InvalidAmount,
1142
+ "0xb4fa3fb3": contractErrors.InvalidInput,
1143
+ "0x1117a646": contractErrors.InvalidStatusTransition,
1144
+ "0xa24a13a6": contractErrors.ArrayLengthMismatch,
1145
+ "0xebb6f34b": contractErrors.UserIsBlacklisted,
1146
+ "0xd92e233d": contractErrors.ZeroAddress,
1147
+ "0x8beb9d16": contractErrors.ReentrancyGuard,
1148
+ "0xbb1cb70b": contractErrors.BatchTooLarge,
1149
+ "0xd97cf1ba": contractErrors.UnderflowSubtraction,
1150
+ "0xc9b16952": contractErrors.TargetLongerThanData
1151
+ };
1152
+
1153
+ // src/contracts/order-flow/index.ts
1154
+ var import_neverthrow3 = require("neverthrow");
1155
+
1156
+ // src/lib/subgraph.ts
1157
+ var import_neverthrow2 = require("neverthrow");
1158
+
1159
+ // src/validation/errors.validation.ts
1160
+ var SdkError = class extends Error {
1161
+ code;
1162
+ cause;
1163
+ context;
1164
+ constructor(message, options) {
1165
+ super(message);
1166
+ this.name = "SdkError";
1167
+ this.code = options.code;
1168
+ this.cause = options.cause;
1169
+ this.context = options.context;
1170
+ }
1171
+ };
1172
+
1173
+ // src/validation/schemas.validation.ts
1174
+ var import_neverthrow = require("neverthrow");
1175
+ var import_viem2 = require("viem");
1176
+ var import_zod = require("zod");
1177
+
1178
+ // src/country/currency.ts
1179
+ var CURRENCY = {
1180
+ IDR: "IDR",
1181
+ INR: "INR",
1182
+ BRL: "BRL",
1183
+ ARS: "ARS",
1184
+ MEX: "MEX",
1185
+ VEN: "VEN",
1186
+ EUR: "EUR",
1187
+ NGN: "NGN",
1188
+ USD: "USD",
1189
+ COP: "COP"
1190
+ };
1191
+ var CURRENCY_CODES = Object.values(CURRENCY);
1192
+
1193
+ // src/validation/schemas.validation.ts
1194
+ var ZodAddressSchema = import_zod.z.string().refine((s) => (0, import_viem2.isAddress)(s), { message: "Invalid Ethereum address" });
1195
+ var ZodCurrencySchema = import_zod.z.enum(CURRENCY_CODES);
1196
+ function validate(schema, data, toError) {
1197
+ const result = schema.safeParse(data);
1198
+ if (result.success) {
1199
+ return (0, import_neverthrow.ok)(result.data);
1200
+ }
1201
+ return (0, import_neverthrow.err)(toError(import_zod.z.prettifyError(result.error), result.error, data));
1202
+ }
1203
+
1204
+ // src/orders/internal/routing/validation.ts
1205
+ var import_zod2 = require("zod");
1206
+ var ZodCircleScoreStateSchema = import_zod2.z.object({
1207
+ activeMerchantsCount: import_zod2.z.coerce.number()
1208
+ });
1209
+ var ZodCircleMetricsForRoutingSchema = import_zod2.z.object({
1210
+ circleScore: import_zod2.z.coerce.number(),
1211
+ circleStatus: import_zod2.z.string(),
1212
+ scoreState: ZodCircleScoreStateSchema
1213
+ });
1214
+ var ZodCircleForRoutingSchema = import_zod2.z.object({
1215
+ circleId: import_zod2.z.string(),
1216
+ currency: import_zod2.z.string(),
1217
+ metrics: ZodCircleMetricsForRoutingSchema
1218
+ });
1219
+ var ZodCirclesForRoutingResponseSchema = import_zod2.z.object({
1220
+ circles: import_zod2.z.array(ZodCircleForRoutingSchema)
1221
+ });
1222
+ var ZodCheckCircleEligibilityParamsSchema = import_zod2.z.object({
1223
+ circleId: import_zod2.z.bigint(),
1224
+ currency: import_zod2.z.string(),
1225
+ user: ZodAddressSchema,
1226
+ usdtAmount: import_zod2.z.bigint(),
1227
+ fiatAmount: import_zod2.z.bigint(),
1228
+ orderType: import_zod2.z.bigint(),
1229
+ preferredPCConfigId: import_zod2.z.bigint()
1230
+ });
1231
+ var ZodSelectCircleParamsSchema = import_zod2.z.object({
1232
+ currency: import_zod2.z.string().min(1),
1233
+ user: ZodAddressSchema,
1234
+ usdtAmount: import_zod2.z.bigint(),
1235
+ fiatAmount: import_zod2.z.bigint(),
1236
+ orderType: import_zod2.z.bigint(),
1237
+ preferredPCConfigId: import_zod2.z.bigint()
1238
+ });
1239
+
1240
+ // src/contracts/order-processor/index.ts
1241
+ var import_neverthrow4 = require("neverthrow");
1242
+ var import_viem3 = require("viem");
1243
+
1244
+ // src/contracts/p2p-config/index.ts
1245
+ var import_neverthrow5 = require("neverthrow");
1246
+ var import_viem4 = require("viem");
1247
+
1248
+ // src/prices/errors.ts
1249
+ var PricesError = class extends SdkError {
1250
+ constructor(message, options) {
1251
+ super(message, options);
1252
+ this.name = "PricesError";
1253
+ }
1254
+ };
1255
+
1256
+ // src/prices/validation.ts
1257
+ var import_zod3 = require("zod");
1258
+ var ZodCurrencyScopedParamsSchema = import_zod3.z.object({
1259
+ currency: ZodCurrencySchema
1260
+ });
1261
+
1262
+ // src/contracts/p2p-config/index.ts
1263
+ function getPriceConfig(publicClient, diamondAddress, params) {
1264
+ return validate(
1265
+ ZodCurrencyScopedParamsSchema,
1266
+ params,
1267
+ (message, cause, data) => new PricesError(message, {
1268
+ code: "VALIDATION_ERROR",
1269
+ cause,
1270
+ context: { params: data }
1271
+ })
1272
+ ).asyncAndThen(
1273
+ (validated) => import_neverthrow5.ResultAsync.fromPromise(
1274
+ publicClient.readContract({
1275
+ address: diamondAddress,
1276
+ abi: ABIS.FACETS.CONFIG,
1277
+ functionName: "getPriceConfig",
1278
+ args: [(0, import_viem4.stringToHex)(validated.currency, { size: 32 })]
1279
+ }),
1280
+ (error) => new PricesError("Failed to read price config", {
1281
+ code: "CONTRACT_READ_ERROR",
1282
+ cause: error,
1283
+ context: { currency: validated.currency, diamondAddress }
1284
+ })
1285
+ )
1286
+ );
1287
+ }
1288
+ function getReputationPerUsdcLimit(publicClient, diamondAddress, params) {
1289
+ return validate(
1290
+ ZodCurrencyScopedParamsSchema,
1291
+ params,
1292
+ (message, cause, data) => new PricesError(message, {
1293
+ code: "VALIDATION_ERROR",
1294
+ cause,
1295
+ context: { params: data }
1296
+ })
1297
+ ).asyncAndThen(
1298
+ (validated) => import_neverthrow5.ResultAsync.fromPromise(
1299
+ publicClient.readContract({
1300
+ address: diamondAddress,
1301
+ abi: ABIS.DIAMOND,
1302
+ functionName: "getRpPerUsdtLimitRational",
1303
+ args: [(0, import_viem4.stringToHex)(validated.currency, { size: 32 })]
1304
+ }),
1305
+ (error) => new PricesError("Failed to read reputation-per-USDC limit", {
1306
+ code: "CONTRACT_READ_ERROR",
1307
+ cause: error,
1308
+ context: { currency: validated.currency, diamondAddress }
1309
+ })
1310
+ ).map(([numerator, denominator]) => ({
1311
+ numerator,
1312
+ denominator,
1313
+ multiplier: numerator > 0n ? Number(denominator) / Number(numerator) : 0
1314
+ }))
1315
+ );
1316
+ }
1317
+
1318
+ // src/contracts/reputation-manager/writes.ts
1319
+ var import_neverthrow6 = require("neverthrow");
1320
+ var import_viem5 = require("viem");
1321
+
1322
+ // src/zkkyc/validation.ts
1323
+ var import_zod4 = require("zod");
1324
+ var ZodAnonAadharProofParamsSchema = import_zod4.z.object({
1325
+ nullifierSeed: import_zod4.z.bigint(),
1326
+ nullifier: import_zod4.z.bigint(),
1327
+ timestamp: import_zod4.z.bigint(),
1328
+ signal: import_zod4.z.bigint(),
1329
+ revealArray: import_zod4.z.tuple([import_zod4.z.bigint(), import_zod4.z.bigint(), import_zod4.z.bigint(), import_zod4.z.bigint()]),
1330
+ packedGroth16Proof: import_zod4.z.tuple([
1331
+ import_zod4.z.bigint(),
1332
+ import_zod4.z.bigint(),
1333
+ import_zod4.z.bigint(),
1334
+ import_zod4.z.bigint(),
1335
+ import_zod4.z.bigint(),
1336
+ import_zod4.z.bigint(),
1337
+ import_zod4.z.bigint(),
1338
+ import_zod4.z.bigint()
1339
+ ])
1340
+ });
1341
+ var ZodSocialVerifyParamsSchema = import_zod4.z.object({
1342
+ _socialName: import_zod4.z.string(),
1343
+ proofs: import_zod4.z.array(
1344
+ import_zod4.z.object({
1345
+ claimInfo: import_zod4.z.object({
1346
+ provider: import_zod4.z.string(),
1347
+ parameters: import_zod4.z.string(),
1348
+ context: import_zod4.z.string()
1349
+ }),
1350
+ signedClaim: import_zod4.z.object({
1351
+ claim: import_zod4.z.object({
1352
+ identifier: import_zod4.z.string(),
1353
+ owner: ZodAddressSchema,
1354
+ timestampS: import_zod4.z.number(),
1355
+ epoch: import_zod4.z.number()
1356
+ }),
1357
+ signatures: import_zod4.z.array(import_zod4.z.string())
1358
+ })
1359
+ })
1360
+ )
1361
+ });
1362
+ var ZodSolidityVerifierParametersSchema = import_zod4.z.object({
1363
+ version: import_zod4.z.string().refine((val) => val.startsWith("0x"), {
1364
+ message: "Version must be a hex string"
1365
+ }),
1366
+ proofVerificationData: import_zod4.z.object({
1367
+ vkeyHash: import_zod4.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
1368
+ message: "Invalid bytes32 hex string"
1369
+ }),
1370
+ proof: import_zod4.z.string().refine((val) => val.startsWith("0x"), {
1371
+ message: "Proof must be a hex string"
1372
+ }),
1373
+ publicInputs: import_zod4.z.array(
1374
+ import_zod4.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
1375
+ message: "Each public input must be a valid bytes32 hex string"
1376
+ })
1377
+ )
1378
+ }),
1379
+ committedInputs: import_zod4.z.string().refine((val) => val.startsWith("0x"), {
1380
+ message: "Committed inputs must be a hex string"
1381
+ }),
1382
+ serviceConfig: import_zod4.z.object({
1383
+ validityPeriodInSeconds: import_zod4.z.number().int().nonnegative(),
1384
+ domain: import_zod4.z.string(),
1385
+ scope: import_zod4.z.string(),
1386
+ devMode: import_zod4.z.boolean()
1387
+ })
1388
+ });
1389
+ var ZodZkPassportRegisterParamsSchema = import_zod4.z.object({
1390
+ params: ZodSolidityVerifierParametersSchema,
1391
+ isIDCard: import_zod4.z.boolean()
1392
+ });
1393
+
1394
+ // src/contracts/tx-limits/index.ts
1395
+ var import_neverthrow7 = require("neverthrow");
1396
+ var import_viem6 = require("viem");
1397
+
1398
+ // src/profile/validation.ts
1399
+ var import_zod5 = require("zod");
1400
+ var ZodUsdcBalanceParamsSchema = import_zod5.z.object({
1401
+ address: ZodAddressSchema
1402
+ });
1403
+ var ZodUsdcAllowanceParamsSchema = import_zod5.z.object({
1404
+ owner: ZodAddressSchema
1405
+ });
1406
+ var ZodGetBalancesParamsSchema = import_zod5.z.object({
1407
+ address: ZodAddressSchema,
1408
+ currency: ZodCurrencySchema
1409
+ });
1410
+ var ZodTxLimitsParamsSchema = import_zod5.z.object({
1411
+ address: ZodAddressSchema,
1412
+ currency: ZodCurrencySchema
1413
+ });
1414
+
1415
+ // src/contracts/usdc/index.ts
1416
+ var import_neverthrow8 = require("neverthrow");
1417
+ var import_viem7 = require("viem");
1418
+
1419
+ // src/prices/client.ts
1420
+ function createPrices(config) {
1421
+ const { publicClient, diamondAddress } = config;
1422
+ return {
1423
+ getPriceConfig: (params) => getPriceConfig(publicClient, diamondAddress, params),
1424
+ getReputationPerUsdcLimit: (params) => getReputationPerUsdcLimit(publicClient, diamondAddress, params)
1425
+ };
1426
+ }
1427
+ // Annotate the CommonJS export names for ESM import in node:
1428
+ 0 && (module.exports = {
1429
+ PricesError,
1430
+ createPrices
1431
+ });
1432
+ //# sourceMappingURL=prices.cjs.map