@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,48 @@
1
+ /**
2
+ * @fileoverview Contract ABIs for ZKP2P protocol (V2 and V3).
3
+ *
4
+ * This package provides a single source of truth for all contract ABIs used across the monorepo.
5
+ * ABIs are exported as const assertions for full type inference with viem.
6
+ *
7
+ * @remarks
8
+ * **Contract Architecture:**
9
+ *
10
+ * V2 (Legacy):
11
+ * - Escrow: Combined escrow + intent handling
12
+ * - Verifiers: Per-provider verifier contracts (VenmoVerifier, ZelleVerifier, etc.)
13
+ *
14
+ * V3 (Current):
15
+ * - Escrow: Fund management only (deposits, locking)
16
+ * - Orchestrator: Intent coordination (signal, fulfill, cancel)
17
+ * - UnifiedPaymentVerifier: Single verifier for all payment methods via attestations
18
+ * - PaymentVerifierRegistry: Payment method whitelist
19
+ * - NullifierRegistry: Prevents double-spend of payment proofs
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * // Namespace imports (recommended)
24
+ * import { v2, v3 } from '@provex/abis'
25
+ * const escrowV2 = v2.EscrowAbi
26
+ * const escrowV3 = v3.EscrowAbi
27
+ *
28
+ * // Direct imports with version prefix
29
+ * import { V2EscrowAbi, V3EscrowAbi, OrchestratorAbi } from '@provex/abis'
30
+ *
31
+ * // Version-specific imports
32
+ * import { EscrowAbi } from '@provex/abis/v2'
33
+ * import { EscrowAbi as V3EscrowAbi } from '@provex/abis/v3'
34
+ * ```
35
+ *
36
+ * @packageDocumentation
37
+ */
38
+ import * as v2 from "./v2/index.js";
39
+ import * as v3 from "./v3/index.js";
40
+ export { v2, v3 };
41
+ export { EscrowAbi as V2EscrowAbi } from "./v2/Escrow.js";
42
+ export { VerifiersAbi as V2VerifiersAbi } from "./v2/Verifiers.js";
43
+ export { EscrowAbi as V3EscrowAbi } from "./v3/Escrow.js";
44
+ export { OrchestratorAbi } from "./v3/Orchestrator.js";
45
+ export { UnifiedPaymentVerifierAbi } from "./v3/UnifiedPaymentVerifier.js";
46
+ export { PaymentVerifierRegistryAbi } from "./v3/PaymentVerifierRegistry.js";
47
+ export { NullifierRegistryAbi } from "./v3/NullifierRegistry.js";
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAGlB,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @fileoverview Contract ABIs for ZKP2P protocol (V2 and V3).
3
+ *
4
+ * This package provides a single source of truth for all contract ABIs used across the monorepo.
5
+ * ABIs are exported as const assertions for full type inference with viem.
6
+ *
7
+ * @remarks
8
+ * **Contract Architecture:**
9
+ *
10
+ * V2 (Legacy):
11
+ * - Escrow: Combined escrow + intent handling
12
+ * - Verifiers: Per-provider verifier contracts (VenmoVerifier, ZelleVerifier, etc.)
13
+ *
14
+ * V3 (Current):
15
+ * - Escrow: Fund management only (deposits, locking)
16
+ * - Orchestrator: Intent coordination (signal, fulfill, cancel)
17
+ * - UnifiedPaymentVerifier: Single verifier for all payment methods via attestations
18
+ * - PaymentVerifierRegistry: Payment method whitelist
19
+ * - NullifierRegistry: Prevents double-spend of payment proofs
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * // Namespace imports (recommended)
24
+ * import { v2, v3 } from '@provex/abis'
25
+ * const escrowV2 = v2.EscrowAbi
26
+ * const escrowV3 = v3.EscrowAbi
27
+ *
28
+ * // Direct imports with version prefix
29
+ * import { V2EscrowAbi, V3EscrowAbi, OrchestratorAbi } from '@provex/abis'
30
+ *
31
+ * // Version-specific imports
32
+ * import { EscrowAbi } from '@provex/abis/v2'
33
+ * import { EscrowAbi as V3EscrowAbi } from '@provex/abis/v3'
34
+ * ```
35
+ *
36
+ * @packageDocumentation
37
+ */
38
+ import * as v2 from "./v2/index.js";
39
+ import * as v3 from "./v3/index.js";
40
+ export { v2, v3 };
41
+ // Convenience exports with version-prefixed names to avoid conflicts
42
+ export { EscrowAbi as V2EscrowAbi } from "./v2/Escrow.js";
43
+ export { VerifiersAbi as V2VerifiersAbi } from "./v2/Verifiers.js";
44
+ export { EscrowAbi as V3EscrowAbi } from "./v3/Escrow.js";
45
+ export { OrchestratorAbi } from "./v3/Orchestrator.js";
46
+ export { UnifiedPaymentVerifierAbi } from "./v3/UnifiedPaymentVerifier.js";
47
+ export { PaymentVerifierRegistryAbi } from "./v3/PaymentVerifierRegistry.js";
48
+ export { NullifierRegistryAbi } from "./v3/NullifierRegistry.js";
@@ -0,0 +1,289 @@
1
+ /**
2
+ * MessageBus ABI
3
+ *
4
+ * The MessageBus is a pure-event contract for encrypted peer-to-peer messaging.
5
+ * It supports dappId-scoped filtering and topicId threads.
6
+ *
7
+ * Key functions:
8
+ * - registerKey: Publish an ECDH public key for a dappId
9
+ * - registerKeyFor: Register a key on behalf of a user (relayer pattern)
10
+ * - send: Send an encrypted message to a recipient
11
+ * - sendFor: Send a message on behalf of a user (relayer pattern)
12
+ *
13
+ * Key events:
14
+ * - KeyExchange: Emitted when a user registers an ECDH public key
15
+ * - Message: Emitted when a message is sent (contains ciphertext)
16
+ */
17
+ export declare const MessageBusAbi: readonly [{
18
+ readonly type: "constructor";
19
+ readonly inputs: readonly [];
20
+ readonly stateMutability: "nonpayable";
21
+ }, {
22
+ readonly type: "function";
23
+ readonly name: "REGISTER_KEY_TYPEHASH";
24
+ readonly inputs: readonly [];
25
+ readonly outputs: readonly [{
26
+ readonly name: "";
27
+ readonly type: "bytes32";
28
+ readonly internalType: "bytes32";
29
+ }];
30
+ readonly stateMutability: "view";
31
+ }, {
32
+ readonly type: "function";
33
+ readonly name: "SEND_TYPEHASH";
34
+ readonly inputs: readonly [];
35
+ readonly outputs: readonly [{
36
+ readonly name: "";
37
+ readonly type: "bytes32";
38
+ readonly internalType: "bytes32";
39
+ }];
40
+ readonly stateMutability: "view";
41
+ }, {
42
+ readonly type: "function";
43
+ readonly name: "domainSeparator";
44
+ readonly inputs: readonly [];
45
+ readonly outputs: readonly [{
46
+ readonly name: "";
47
+ readonly type: "bytes32";
48
+ readonly internalType: "bytes32";
49
+ }];
50
+ readonly stateMutability: "view";
51
+ }, {
52
+ readonly type: "function";
53
+ readonly name: "eip712Domain";
54
+ readonly inputs: readonly [];
55
+ readonly outputs: readonly [{
56
+ readonly name: "fields";
57
+ readonly type: "bytes1";
58
+ readonly internalType: "bytes1";
59
+ }, {
60
+ readonly name: "name";
61
+ readonly type: "string";
62
+ readonly internalType: "string";
63
+ }, {
64
+ readonly name: "version";
65
+ readonly type: "string";
66
+ readonly internalType: "string";
67
+ }, {
68
+ readonly name: "chainId";
69
+ readonly type: "uint256";
70
+ readonly internalType: "uint256";
71
+ }, {
72
+ readonly name: "verifyingContract";
73
+ readonly type: "address";
74
+ readonly internalType: "address";
75
+ }, {
76
+ readonly name: "salt";
77
+ readonly type: "bytes32";
78
+ readonly internalType: "bytes32";
79
+ }, {
80
+ readonly name: "extensions";
81
+ readonly type: "uint256[]";
82
+ readonly internalType: "uint256[]";
83
+ }];
84
+ readonly stateMutability: "view";
85
+ }, {
86
+ readonly type: "function";
87
+ readonly name: "registerKey";
88
+ readonly inputs: readonly [{
89
+ readonly name: "dappId";
90
+ readonly type: "bytes32";
91
+ readonly internalType: "bytes32";
92
+ }, {
93
+ readonly name: "publicKey";
94
+ readonly type: "bytes";
95
+ readonly internalType: "bytes";
96
+ }];
97
+ readonly outputs: readonly [];
98
+ readonly stateMutability: "nonpayable";
99
+ }, {
100
+ readonly type: "function";
101
+ readonly name: "registerKeyFor";
102
+ readonly inputs: readonly [{
103
+ readonly name: "dappId";
104
+ readonly type: "bytes32";
105
+ readonly internalType: "bytes32";
106
+ }, {
107
+ readonly name: "publicKey";
108
+ readonly type: "bytes";
109
+ readonly internalType: "bytes";
110
+ }, {
111
+ readonly name: "user";
112
+ readonly type: "address";
113
+ readonly internalType: "address";
114
+ }, {
115
+ readonly name: "signature";
116
+ readonly type: "bytes";
117
+ readonly internalType: "bytes";
118
+ }];
119
+ readonly outputs: readonly [];
120
+ readonly stateMutability: "nonpayable";
121
+ }, {
122
+ readonly type: "function";
123
+ readonly name: "send";
124
+ readonly inputs: readonly [{
125
+ readonly name: "dappId";
126
+ readonly type: "bytes32";
127
+ readonly internalType: "bytes32";
128
+ }, {
129
+ readonly name: "topicId";
130
+ readonly type: "bytes32";
131
+ readonly internalType: "bytes32";
132
+ }, {
133
+ readonly name: "to";
134
+ readonly type: "address";
135
+ readonly internalType: "address";
136
+ }, {
137
+ readonly name: "nonce";
138
+ readonly type: "bytes32";
139
+ readonly internalType: "bytes32";
140
+ }, {
141
+ readonly name: "ciphertext";
142
+ readonly type: "bytes";
143
+ readonly internalType: "bytes";
144
+ }];
145
+ readonly outputs: readonly [];
146
+ readonly stateMutability: "nonpayable";
147
+ }, {
148
+ readonly type: "function";
149
+ readonly name: "sendFor";
150
+ readonly inputs: readonly [{
151
+ readonly name: "dappId";
152
+ readonly type: "bytes32";
153
+ readonly internalType: "bytes32";
154
+ }, {
155
+ readonly name: "topicId";
156
+ readonly type: "bytes32";
157
+ readonly internalType: "bytes32";
158
+ }, {
159
+ readonly name: "to";
160
+ readonly type: "address";
161
+ readonly internalType: "address";
162
+ }, {
163
+ readonly name: "ciphertext";
164
+ readonly type: "bytes";
165
+ readonly internalType: "bytes";
166
+ }, {
167
+ readonly name: "nonce";
168
+ readonly type: "bytes32";
169
+ readonly internalType: "bytes32";
170
+ }, {
171
+ readonly name: "sender";
172
+ readonly type: "address";
173
+ readonly internalType: "address";
174
+ }, {
175
+ readonly name: "signature";
176
+ readonly type: "bytes";
177
+ readonly internalType: "bytes";
178
+ }];
179
+ readonly outputs: readonly [];
180
+ readonly stateMutability: "nonpayable";
181
+ }, {
182
+ readonly type: "function";
183
+ readonly name: "usedNonces";
184
+ readonly inputs: readonly [{
185
+ readonly name: "";
186
+ readonly type: "bytes32";
187
+ readonly internalType: "bytes32";
188
+ }];
189
+ readonly outputs: readonly [{
190
+ readonly name: "";
191
+ readonly type: "bool";
192
+ readonly internalType: "bool";
193
+ }];
194
+ readonly stateMutability: "view";
195
+ }, {
196
+ readonly type: "event";
197
+ readonly name: "EIP712DomainChanged";
198
+ readonly inputs: readonly [];
199
+ readonly anonymous: false;
200
+ }, {
201
+ readonly type: "event";
202
+ readonly name: "KeyExchange";
203
+ readonly inputs: readonly [{
204
+ readonly name: "dappId";
205
+ readonly type: "bytes32";
206
+ readonly indexed: true;
207
+ readonly internalType: "bytes32";
208
+ }, {
209
+ readonly name: "user";
210
+ readonly type: "address";
211
+ readonly indexed: true;
212
+ readonly internalType: "address";
213
+ }, {
214
+ readonly name: "publicKey";
215
+ readonly type: "bytes";
216
+ readonly indexed: false;
217
+ readonly internalType: "bytes";
218
+ }];
219
+ readonly anonymous: false;
220
+ }, {
221
+ readonly type: "event";
222
+ readonly name: "Message";
223
+ readonly inputs: readonly [{
224
+ readonly name: "dappId";
225
+ readonly type: "bytes32";
226
+ readonly indexed: true;
227
+ readonly internalType: "bytes32";
228
+ }, {
229
+ readonly name: "topicId";
230
+ readonly type: "bytes32";
231
+ readonly indexed: true;
232
+ readonly internalType: "bytes32";
233
+ }, {
234
+ readonly name: "from";
235
+ readonly type: "address";
236
+ readonly indexed: true;
237
+ readonly internalType: "address";
238
+ }, {
239
+ readonly name: "to";
240
+ readonly type: "address";
241
+ readonly indexed: false;
242
+ readonly internalType: "address";
243
+ }, {
244
+ readonly name: "nonce";
245
+ readonly type: "bytes32";
246
+ readonly indexed: false;
247
+ readonly internalType: "bytes32";
248
+ }, {
249
+ readonly name: "ciphertext";
250
+ readonly type: "bytes";
251
+ readonly indexed: false;
252
+ readonly internalType: "bytes";
253
+ }];
254
+ readonly anonymous: false;
255
+ }, {
256
+ readonly type: "error";
257
+ readonly name: "ECDSAInvalidSignature";
258
+ readonly inputs: readonly [];
259
+ }, {
260
+ readonly type: "error";
261
+ readonly name: "ECDSAInvalidSignatureLength";
262
+ readonly inputs: readonly [{
263
+ readonly name: "length";
264
+ readonly type: "uint256";
265
+ readonly internalType: "uint256";
266
+ }];
267
+ }, {
268
+ readonly type: "error";
269
+ readonly name: "ECDSAInvalidSignatureS";
270
+ readonly inputs: readonly [{
271
+ readonly name: "s";
272
+ readonly type: "bytes32";
273
+ readonly internalType: "bytes32";
274
+ }];
275
+ }, {
276
+ readonly type: "error";
277
+ readonly name: "InvalidShortString";
278
+ readonly inputs: readonly [];
279
+ }, {
280
+ readonly type: "error";
281
+ readonly name: "StringTooLong";
282
+ readonly inputs: readonly [{
283
+ readonly name: "str";
284
+ readonly type: "string";
285
+ readonly internalType: "string";
286
+ }];
287
+ }];
288
+ export type MessageBusAbi = typeof MessageBusAbi;
289
+ //# sourceMappingURL=MessageBus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBus.d.ts","sourceRoot":"","sources":["../../src/messaging/MessageBus.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0VF,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC"}