@provex/abis 1.2.3

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 (37) hide show
  1. package/dist/index.d.ts +48 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +48 -0
  4. package/dist/messaging/MessageBus.d.ts +289 -0
  5. package/dist/messaging/MessageBus.d.ts.map +1 -0
  6. package/dist/messaging/MessageBus.js +363 -0
  7. package/dist/messaging/index.d.ts +8 -0
  8. package/dist/messaging/index.d.ts.map +1 -0
  9. package/dist/messaging/index.js +7 -0
  10. package/dist/v2/Escrow.d.ts +425 -0
  11. package/dist/v2/Escrow.d.ts.map +1 -0
  12. package/dist/v2/Escrow.js +38 -0
  13. package/dist/v2/Verifiers.d.ts +22 -0
  14. package/dist/v2/Verifiers.d.ts.map +1 -0
  15. package/dist/v2/Verifiers.js +10 -0
  16. package/dist/v2/index.d.ts +8 -0
  17. package/dist/v2/index.d.ts.map +1 -0
  18. package/dist/v2/index.js +7 -0
  19. package/dist/v3/Escrow.d.ts +1725 -0
  20. package/dist/v3/Escrow.d.ts.map +1 -0
  21. package/dist/v3/Escrow.js +15 -0
  22. package/dist/v3/NullifierRegistry.d.ts +26 -0
  23. package/dist/v3/NullifierRegistry.d.ts.map +1 -0
  24. package/dist/v3/NullifierRegistry.js +20 -0
  25. package/dist/v3/Orchestrator.d.ts +883 -0
  26. package/dist/v3/Orchestrator.d.ts.map +1 -0
  27. package/dist/v3/Orchestrator.js +13 -0
  28. package/dist/v3/PaymentVerifierRegistry.d.ts +262 -0
  29. package/dist/v3/PaymentVerifierRegistry.d.ts.map +1 -0
  30. package/dist/v3/PaymentVerifierRegistry.js +7 -0
  31. package/dist/v3/UnifiedPaymentVerifier.d.ts +294 -0
  32. package/dist/v3/UnifiedPaymentVerifier.d.ts.map +1 -0
  33. package/dist/v3/UnifiedPaymentVerifier.js +12 -0
  34. package/dist/v3/index.d.ts +15 -0
  35. package/dist/v3/index.d.ts.map +1 -0
  36. package/dist/v3/index.js +14 -0
  37. package/package.json +44 -0
@@ -0,0 +1,425 @@
1
+ /**
2
+ * V2 Escrow ABI
3
+ *
4
+ * The V2 Escrow contract handles deposits and intents for zkp2p v2.
5
+ * This ABI includes both events (for indexing) and functions (for UI interactions).
6
+ */
7
+ export declare const EscrowAbi: readonly [{
8
+ readonly name: "DepositReceived";
9
+ readonly type: "event";
10
+ readonly inputs: readonly [{
11
+ readonly type: "uint256";
12
+ readonly name: "depositId";
13
+ readonly indexed: true;
14
+ }, {
15
+ readonly type: "address";
16
+ readonly name: "depositor";
17
+ readonly indexed: true;
18
+ }, {
19
+ readonly type: "address";
20
+ readonly name: "token";
21
+ readonly indexed: true;
22
+ }, {
23
+ readonly type: "uint256";
24
+ readonly name: "amount";
25
+ }, {
26
+ readonly type: "tuple";
27
+ readonly components: readonly [{
28
+ readonly type: "uint256";
29
+ }, {
30
+ readonly type: "uint256";
31
+ }];
32
+ readonly name: "intentAmountRange";
33
+ }];
34
+ }, {
35
+ readonly name: "DepositVerifierAdded";
36
+ readonly type: "event";
37
+ readonly inputs: readonly [{
38
+ readonly type: "uint256";
39
+ readonly name: "depositId";
40
+ readonly indexed: true;
41
+ }, {
42
+ readonly type: "address";
43
+ readonly name: "verifier";
44
+ readonly indexed: true;
45
+ }, {
46
+ readonly type: "bytes32";
47
+ readonly name: "payeeDetailsHash";
48
+ readonly indexed: true;
49
+ }, {
50
+ readonly type: "address";
51
+ readonly name: "intentGatingService";
52
+ }];
53
+ }, {
54
+ readonly name: "DepositCurrencyAdded";
55
+ readonly type: "event";
56
+ readonly inputs: readonly [{
57
+ readonly type: "uint256";
58
+ readonly name: "depositId";
59
+ readonly indexed: true;
60
+ }, {
61
+ readonly type: "address";
62
+ readonly name: "verifier";
63
+ readonly indexed: true;
64
+ }, {
65
+ readonly type: "bytes32";
66
+ readonly name: "currency";
67
+ readonly indexed: true;
68
+ }, {
69
+ readonly type: "uint256";
70
+ readonly name: "conversionRate";
71
+ }];
72
+ }, {
73
+ readonly name: "DepositConversionRateUpdated";
74
+ readonly type: "event";
75
+ readonly inputs: readonly [{
76
+ readonly type: "uint256";
77
+ readonly name: "depositId";
78
+ readonly indexed: true;
79
+ }, {
80
+ readonly type: "address";
81
+ readonly name: "verifier";
82
+ readonly indexed: true;
83
+ }, {
84
+ readonly type: "bytes32";
85
+ readonly name: "currency";
86
+ readonly indexed: true;
87
+ }, {
88
+ readonly type: "uint256";
89
+ readonly name: "newConversionRate";
90
+ }];
91
+ }, {
92
+ readonly name: "IntentSignaled";
93
+ readonly type: "event";
94
+ readonly inputs: readonly [{
95
+ readonly type: "bytes32";
96
+ readonly name: "intentHash";
97
+ readonly indexed: true;
98
+ }, {
99
+ readonly type: "uint256";
100
+ readonly name: "depositId";
101
+ readonly indexed: true;
102
+ }, {
103
+ readonly type: "address";
104
+ readonly name: "verifier";
105
+ readonly indexed: true;
106
+ }, {
107
+ readonly type: "address";
108
+ readonly name: "owner";
109
+ }, {
110
+ readonly type: "address";
111
+ readonly name: "to";
112
+ }, {
113
+ readonly type: "uint256";
114
+ readonly name: "amount";
115
+ }, {
116
+ readonly type: "bytes32";
117
+ readonly name: "currency";
118
+ }, {
119
+ readonly type: "uint256";
120
+ readonly name: "conversionRate";
121
+ }, {
122
+ readonly type: "uint256";
123
+ readonly name: "timestamp";
124
+ }];
125
+ }, {
126
+ readonly name: "IntentPruned";
127
+ readonly type: "event";
128
+ readonly inputs: readonly [{
129
+ readonly type: "bytes32";
130
+ readonly name: "intentHash";
131
+ readonly indexed: true;
132
+ }, {
133
+ readonly type: "uint256";
134
+ readonly name: "depositId";
135
+ readonly indexed: true;
136
+ }];
137
+ }, {
138
+ readonly name: "IntentFulfilled";
139
+ readonly type: "event";
140
+ readonly inputs: readonly [{
141
+ readonly type: "bytes32";
142
+ readonly name: "intentHash";
143
+ readonly indexed: true;
144
+ }, {
145
+ readonly type: "uint256";
146
+ readonly name: "depositId";
147
+ readonly indexed: true;
148
+ }, {
149
+ readonly type: "address";
150
+ readonly name: "verifier";
151
+ readonly indexed: true;
152
+ }, {
153
+ readonly type: "address";
154
+ readonly name: "owner";
155
+ }, {
156
+ readonly type: "address";
157
+ readonly name: "to";
158
+ }, {
159
+ readonly type: "uint256";
160
+ readonly name: "amount";
161
+ }, {
162
+ readonly type: "uint256";
163
+ readonly name: "sustainabilityFee";
164
+ }, {
165
+ readonly type: "uint256";
166
+ readonly name: "verifierFee";
167
+ }];
168
+ }, {
169
+ readonly name: "DepositWithdrawn";
170
+ readonly type: "event";
171
+ readonly inputs: readonly [{
172
+ readonly type: "uint256";
173
+ readonly name: "depositId";
174
+ readonly indexed: true;
175
+ }, {
176
+ readonly type: "address";
177
+ readonly name: "depositor";
178
+ readonly indexed: true;
179
+ }, {
180
+ readonly type: "uint256";
181
+ readonly name: "amount";
182
+ }];
183
+ }, {
184
+ readonly name: "DepositClosed";
185
+ readonly type: "event";
186
+ readonly inputs: readonly [{
187
+ readonly type: "uint256";
188
+ readonly name: "depositId";
189
+ }, {
190
+ readonly type: "address";
191
+ readonly name: "depositor";
192
+ }];
193
+ }, {
194
+ readonly name: "MinDepositAmountSet";
195
+ readonly type: "event";
196
+ readonly inputs: readonly [{
197
+ readonly type: "uint256";
198
+ readonly name: "minDepositAmount";
199
+ }];
200
+ }, {
201
+ readonly name: "SustainabilityFeeUpdated";
202
+ readonly type: "event";
203
+ readonly inputs: readonly [{
204
+ readonly type: "uint256";
205
+ readonly name: "fee";
206
+ }];
207
+ }, {
208
+ readonly name: "SustainabilityFeeRecipientUpdated";
209
+ readonly type: "event";
210
+ readonly inputs: readonly [{
211
+ readonly type: "address";
212
+ readonly name: "feeRecipient";
213
+ }];
214
+ }, {
215
+ readonly name: "AcceptAllPaymentVerifiersUpdated";
216
+ readonly type: "event";
217
+ readonly inputs: readonly [{
218
+ readonly type: "bool";
219
+ readonly name: "acceptAllPaymentVerifiers";
220
+ }];
221
+ }, {
222
+ readonly name: "IntentExpirationPeriodSet";
223
+ readonly type: "event";
224
+ readonly inputs: readonly [{
225
+ readonly type: "uint256";
226
+ readonly name: "intentExpirationPeriod";
227
+ }];
228
+ }, {
229
+ readonly name: "PaymentVerifierAdded";
230
+ readonly type: "event";
231
+ readonly inputs: readonly [{
232
+ readonly type: "address";
233
+ readonly name: "verifier";
234
+ }, {
235
+ readonly type: "uint256";
236
+ readonly name: "feeShare";
237
+ }];
238
+ }, {
239
+ readonly name: "PaymentVerifierFeeShareUpdated";
240
+ readonly type: "event";
241
+ readonly inputs: readonly [{
242
+ readonly type: "address";
243
+ readonly name: "verifier";
244
+ }, {
245
+ readonly type: "uint256";
246
+ readonly name: "feeShare";
247
+ }];
248
+ }, {
249
+ readonly name: "PaymentVerifierRemoved";
250
+ readonly type: "event";
251
+ readonly inputs: readonly [{
252
+ readonly type: "address";
253
+ readonly name: "verifier";
254
+ }];
255
+ }, {
256
+ readonly name: "depositVerifierData";
257
+ readonly type: "function";
258
+ readonly stateMutability: "view";
259
+ readonly inputs: readonly [{
260
+ readonly type: "uint256";
261
+ readonly name: "depositId";
262
+ }, {
263
+ readonly type: "address";
264
+ readonly name: "verifier";
265
+ }];
266
+ readonly outputs: readonly [{
267
+ readonly type: "address";
268
+ }, {
269
+ readonly type: "string";
270
+ }, {
271
+ readonly type: "bytes";
272
+ }];
273
+ }, {
274
+ readonly name: "updateDepositConversionRate";
275
+ readonly type: "function";
276
+ readonly stateMutability: "nonpayable";
277
+ readonly inputs: readonly [{
278
+ readonly type: "uint256";
279
+ readonly name: "depositId";
280
+ }, {
281
+ readonly type: "address";
282
+ readonly name: "verifier";
283
+ }, {
284
+ readonly type: "bytes32";
285
+ readonly name: "currency";
286
+ }, {
287
+ readonly type: "uint256";
288
+ readonly name: "conversionRate";
289
+ }];
290
+ readonly outputs: readonly [];
291
+ }, {
292
+ readonly name: "createDeposit";
293
+ readonly type: "function";
294
+ readonly stateMutability: "nonpayable";
295
+ readonly inputs: readonly [{
296
+ readonly type: "address";
297
+ readonly name: "_token";
298
+ }, {
299
+ readonly type: "uint256";
300
+ readonly name: "_amount";
301
+ }, {
302
+ readonly type: "tuple";
303
+ readonly components: readonly [{
304
+ readonly type: "uint256";
305
+ }, {
306
+ readonly type: "uint256";
307
+ }];
308
+ readonly name: "_intentAmountRange";
309
+ }, {
310
+ readonly type: "address[]";
311
+ readonly name: "_verifiers";
312
+ }, {
313
+ readonly type: "tuple[]";
314
+ readonly components: readonly [{
315
+ readonly type: "address";
316
+ }, {
317
+ readonly type: "string";
318
+ }, {
319
+ readonly type: "bytes";
320
+ }];
321
+ readonly name: "_verifierData";
322
+ }, never];
323
+ readonly outputs: readonly [];
324
+ }, {
325
+ readonly name: "withdrawDeposit";
326
+ readonly type: "function";
327
+ readonly stateMutability: "nonpayable";
328
+ readonly inputs: readonly [{
329
+ readonly type: "uint256";
330
+ readonly name: "_depositId";
331
+ }];
332
+ readonly outputs: readonly [];
333
+ }, {
334
+ readonly name: "signalIntent";
335
+ readonly type: "function";
336
+ readonly stateMutability: "nonpayable";
337
+ readonly inputs: readonly [{
338
+ readonly type: "uint256";
339
+ readonly name: "_depositId";
340
+ }, {
341
+ readonly type: "uint256";
342
+ readonly name: "_amount";
343
+ }, {
344
+ readonly type: "address";
345
+ readonly name: "_to";
346
+ }, {
347
+ readonly type: "address";
348
+ readonly name: "_verifier";
349
+ }, {
350
+ readonly type: "bytes32";
351
+ readonly name: "_fiatCurrency";
352
+ }, {
353
+ readonly type: "bytes";
354
+ readonly name: "_gatingServiceSignature";
355
+ }];
356
+ readonly outputs: readonly [];
357
+ }, {
358
+ readonly name: "cancelIntent";
359
+ readonly type: "function";
360
+ readonly stateMutability: "nonpayable";
361
+ readonly inputs: readonly [{
362
+ readonly type: "bytes32";
363
+ readonly name: "_intentHash";
364
+ }];
365
+ readonly outputs: readonly [];
366
+ }, {
367
+ readonly name: "releaseFundsToPayer";
368
+ readonly type: "function";
369
+ readonly stateMutability: "nonpayable";
370
+ readonly inputs: readonly [{
371
+ readonly type: "bytes32";
372
+ readonly name: "_intentHash";
373
+ }];
374
+ readonly outputs: readonly [];
375
+ }, {
376
+ readonly name: "fulfillIntent";
377
+ readonly type: "function";
378
+ readonly stateMutability: "nonpayable";
379
+ readonly inputs: readonly [{
380
+ readonly type: "bytes";
381
+ readonly name: "_paymentProof";
382
+ }, {
383
+ readonly type: "bytes32";
384
+ readonly name: "_intentHash";
385
+ }];
386
+ readonly outputs: readonly [];
387
+ }, {
388
+ readonly name: "accountIntent";
389
+ readonly type: "function";
390
+ readonly stateMutability: "view";
391
+ readonly inputs: readonly [{
392
+ readonly type: "address";
393
+ readonly name: "_account";
394
+ }];
395
+ readonly outputs: readonly [{
396
+ readonly type: "bytes32";
397
+ }];
398
+ }, {
399
+ readonly name: "intents";
400
+ readonly type: "function";
401
+ readonly stateMutability: "view";
402
+ readonly inputs: readonly [{
403
+ readonly type: "bytes32";
404
+ readonly name: "intentHash";
405
+ }];
406
+ readonly outputs: readonly [{
407
+ readonly type: "address";
408
+ }, {
409
+ readonly type: "address";
410
+ }, {
411
+ readonly type: "uint256";
412
+ }, {
413
+ readonly type: "uint256";
414
+ }, {
415
+ readonly type: "uint256";
416
+ }, {
417
+ readonly type: "address";
418
+ }, {
419
+ readonly type: "bytes32";
420
+ }, {
421
+ readonly type: "uint256";
422
+ }];
423
+ }];
424
+ export type EscrowAbi = typeof EscrowAbi;
425
+ //# sourceMappingURL=Escrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Escrow.d.ts","sourceRoot":"","sources":["../../src/v2/Escrow.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { parseAbi } from "viem";
2
+ /**
3
+ * V2 Escrow ABI
4
+ *
5
+ * The V2 Escrow contract handles deposits and intents for zkp2p v2.
6
+ * This ABI includes both events (for indexing) and functions (for UI interactions).
7
+ */
8
+ export const EscrowAbi = parseAbi([
9
+ // Events for indexing
10
+ "event DepositReceived(uint256 indexed depositId,address indexed depositor,address indexed token,uint256 amount,(uint256,uint256) intentAmountRange)",
11
+ "event DepositVerifierAdded(uint256 indexed depositId,address indexed verifier,bytes32 indexed payeeDetailsHash,address intentGatingService)",
12
+ "event DepositCurrencyAdded(uint256 indexed depositId,address indexed verifier,bytes32 indexed currency,uint256 conversionRate)",
13
+ "event DepositConversionRateUpdated(uint256 indexed depositId,address indexed verifier,bytes32 indexed currency,uint256 newConversionRate)",
14
+ "event IntentSignaled(bytes32 indexed intentHash,uint256 indexed depositId,address indexed verifier,address owner,address to,uint256 amount,bytes32 currency,uint256 conversionRate,uint256 timestamp)",
15
+ "event IntentPruned(bytes32 indexed intentHash,uint256 indexed depositId)",
16
+ "event IntentFulfilled(bytes32 indexed intentHash,uint256 indexed depositId,address indexed verifier,address owner,address to,uint256 amount,uint256 sustainabilityFee,uint256 verifierFee)",
17
+ "event DepositWithdrawn(uint256 indexed depositId,address indexed depositor,uint256 amount)",
18
+ "event DepositClosed(uint256 depositId, address depositor)",
19
+ "event MinDepositAmountSet(uint256 minDepositAmount)",
20
+ "event SustainabilityFeeUpdated(uint256 fee)",
21
+ "event SustainabilityFeeRecipientUpdated(address feeRecipient)",
22
+ "event AcceptAllPaymentVerifiersUpdated(bool acceptAllPaymentVerifiers)",
23
+ "event IntentExpirationPeriodSet(uint256 intentExpirationPeriod)",
24
+ "event PaymentVerifierAdded(address verifier, uint256 feeShare)",
25
+ "event PaymentVerifierFeeShareUpdated(address verifier, uint256 feeShare)",
26
+ "event PaymentVerifierRemoved(address verifier)",
27
+ // Functions for UI interactions
28
+ "function depositVerifierData(uint256 depositId, address verifier) view returns (address,string,bytes)",
29
+ "function updateDepositConversionRate(uint256 depositId, address verifier, bytes32 currency, uint256 conversionRate)",
30
+ "function createDeposit(address _token, uint256 _amount, (uint256, uint256) calldata _intentAmountRange, address[] calldata _verifiers, (address, string, bytes)[] calldata _verifierData, (bytes32, uint256)[][] calldata _currencies) external",
31
+ "function withdrawDeposit(uint256 _depositId) external",
32
+ "function signalIntent(uint256 _depositId,uint256 _amount,address _to,address _verifier,bytes32 _fiatCurrency,bytes calldata _gatingServiceSignature) external",
33
+ "function cancelIntent(bytes32 _intentHash) external",
34
+ "function releaseFundsToPayer(bytes32 _intentHash) external",
35
+ "function fulfillIntent(bytes calldata _paymentProof,bytes32 _intentHash) external",
36
+ "function accountIntent(address _account) view returns (bytes32)",
37
+ "function intents(bytes32 intentHash) view returns(address,address,uint256,uint256,uint256,address,bytes32,uint256)",
38
+ ]);
@@ -0,0 +1,22 @@
1
+ /**
2
+ * V2 Verifiers ABI
3
+ *
4
+ * Events for tracking payment verifier provider hash management.
5
+ */
6
+ export declare const VerifiersAbi: readonly [{
7
+ readonly name: "ProviderHashAdded";
8
+ readonly type: "event";
9
+ readonly inputs: readonly [{
10
+ readonly type: "string";
11
+ readonly name: "providerHash";
12
+ }];
13
+ }, {
14
+ readonly name: "ProviderHashRemoved";
15
+ readonly type: "event";
16
+ readonly inputs: readonly [{
17
+ readonly type: "string";
18
+ readonly name: "providerHash";
19
+ }];
20
+ }];
21
+ export type VerifiersAbi = typeof VerifiersAbi;
22
+ //# sourceMappingURL=Verifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Verifiers.d.ts","sourceRoot":"","sources":["../../src/v2/Verifiers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;EAGvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { parseAbi } from "viem";
2
+ /**
3
+ * V2 Verifiers ABI
4
+ *
5
+ * Events for tracking payment verifier provider hash management.
6
+ */
7
+ export const VerifiersAbi = parseAbi([
8
+ "event ProviderHashAdded(string providerHash)",
9
+ "event ProviderHashRemoved(string providerHash)",
10
+ ]);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * V2 Contract ABIs
3
+ *
4
+ * ABIs for zkp2p v2 contracts. V2 is the legacy system still active on Base and Pulsechain.
5
+ */
6
+ export { EscrowAbi } from "./Escrow.js";
7
+ export { VerifiersAbi } from "./Verifiers.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * V2 Contract ABIs
3
+ *
4
+ * ABIs for zkp2p v2 contracts. V2 is the legacy system still active on Base and Pulsechain.
5
+ */
6
+ export { EscrowAbi } from "./Escrow.js";
7
+ export { VerifiersAbi } from "./Verifiers.js";