@agentxpay/sdk 0.1.0

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.
@@ -0,0 +1,483 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [],
5
+ "stateMutability": "nonpayable"
6
+ },
7
+ {
8
+ "type": "function",
9
+ "name": "createEscrow",
10
+ "inputs": [
11
+ {
12
+ "name": "serviceId",
13
+ "type": "uint256",
14
+ "internalType": "uint256"
15
+ },
16
+ {
17
+ "name": "provider",
18
+ "type": "address",
19
+ "internalType": "address"
20
+ },
21
+ {
22
+ "name": "deadline",
23
+ "type": "uint256",
24
+ "internalType": "uint256"
25
+ },
26
+ {
27
+ "name": "description",
28
+ "type": "string",
29
+ "internalType": "string"
30
+ }
31
+ ],
32
+ "outputs": [
33
+ {
34
+ "name": "escrowId",
35
+ "type": "uint256",
36
+ "internalType": "uint256"
37
+ }
38
+ ],
39
+ "stateMutability": "payable"
40
+ },
41
+ {
42
+ "type": "function",
43
+ "name": "disputeEscrow",
44
+ "inputs": [
45
+ {
46
+ "name": "escrowId",
47
+ "type": "uint256",
48
+ "internalType": "uint256"
49
+ }
50
+ ],
51
+ "outputs": [],
52
+ "stateMutability": "nonpayable"
53
+ },
54
+ {
55
+ "type": "function",
56
+ "name": "getEscrow",
57
+ "inputs": [
58
+ {
59
+ "name": "escrowId",
60
+ "type": "uint256",
61
+ "internalType": "uint256"
62
+ }
63
+ ],
64
+ "outputs": [
65
+ {
66
+ "name": "",
67
+ "type": "tuple",
68
+ "internalType": "struct IEscrow.EscrowData",
69
+ "components": [
70
+ {
71
+ "name": "escrowId",
72
+ "type": "uint256",
73
+ "internalType": "uint256"
74
+ },
75
+ {
76
+ "name": "serviceId",
77
+ "type": "uint256",
78
+ "internalType": "uint256"
79
+ },
80
+ {
81
+ "name": "payer",
82
+ "type": "address",
83
+ "internalType": "address"
84
+ },
85
+ {
86
+ "name": "provider",
87
+ "type": "address",
88
+ "internalType": "address"
89
+ },
90
+ {
91
+ "name": "amount",
92
+ "type": "uint256",
93
+ "internalType": "uint256"
94
+ },
95
+ {
96
+ "name": "status",
97
+ "type": "uint8",
98
+ "internalType": "enum IEscrow.EscrowStatus"
99
+ },
100
+ {
101
+ "name": "createdAt",
102
+ "type": "uint256",
103
+ "internalType": "uint256"
104
+ },
105
+ {
106
+ "name": "deadline",
107
+ "type": "uint256",
108
+ "internalType": "uint256"
109
+ },
110
+ {
111
+ "name": "description",
112
+ "type": "string",
113
+ "internalType": "string"
114
+ }
115
+ ]
116
+ }
117
+ ],
118
+ "stateMutability": "view"
119
+ },
120
+ {
121
+ "type": "function",
122
+ "name": "getUserEscrows",
123
+ "inputs": [
124
+ {
125
+ "name": "user",
126
+ "type": "address",
127
+ "internalType": "address"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "",
133
+ "type": "uint256[]",
134
+ "internalType": "uint256[]"
135
+ }
136
+ ],
137
+ "stateMutability": "view"
138
+ },
139
+ {
140
+ "type": "function",
141
+ "name": "owner",
142
+ "inputs": [],
143
+ "outputs": [
144
+ {
145
+ "name": "",
146
+ "type": "address",
147
+ "internalType": "address"
148
+ }
149
+ ],
150
+ "stateMutability": "view"
151
+ },
152
+ {
153
+ "type": "function",
154
+ "name": "refundEscrow",
155
+ "inputs": [
156
+ {
157
+ "name": "escrowId",
158
+ "type": "uint256",
159
+ "internalType": "uint256"
160
+ }
161
+ ],
162
+ "outputs": [],
163
+ "stateMutability": "nonpayable"
164
+ },
165
+ {
166
+ "type": "function",
167
+ "name": "releaseEscrow",
168
+ "inputs": [
169
+ {
170
+ "name": "escrowId",
171
+ "type": "uint256",
172
+ "internalType": "uint256"
173
+ }
174
+ ],
175
+ "outputs": [],
176
+ "stateMutability": "nonpayable"
177
+ },
178
+ {
179
+ "type": "function",
180
+ "name": "renounceOwnership",
181
+ "inputs": [],
182
+ "outputs": [],
183
+ "stateMutability": "nonpayable"
184
+ },
185
+ {
186
+ "type": "function",
187
+ "name": "resolveDispute",
188
+ "inputs": [
189
+ {
190
+ "name": "escrowId",
191
+ "type": "uint256",
192
+ "internalType": "uint256"
193
+ },
194
+ {
195
+ "name": "payerPercent",
196
+ "type": "uint256",
197
+ "internalType": "uint256"
198
+ }
199
+ ],
200
+ "outputs": [],
201
+ "stateMutability": "nonpayable"
202
+ },
203
+ {
204
+ "type": "function",
205
+ "name": "transferOwnership",
206
+ "inputs": [
207
+ {
208
+ "name": "newOwner",
209
+ "type": "address",
210
+ "internalType": "address"
211
+ }
212
+ ],
213
+ "outputs": [],
214
+ "stateMutability": "nonpayable"
215
+ },
216
+ {
217
+ "type": "event",
218
+ "name": "EscrowCreated",
219
+ "inputs": [
220
+ {
221
+ "name": "escrowId",
222
+ "type": "uint256",
223
+ "indexed": true,
224
+ "internalType": "uint256"
225
+ },
226
+ {
227
+ "name": "payer",
228
+ "type": "address",
229
+ "indexed": true,
230
+ "internalType": "address"
231
+ },
232
+ {
233
+ "name": "provider",
234
+ "type": "address",
235
+ "indexed": true,
236
+ "internalType": "address"
237
+ },
238
+ {
239
+ "name": "amount",
240
+ "type": "uint256",
241
+ "indexed": false,
242
+ "internalType": "uint256"
243
+ }
244
+ ],
245
+ "anonymous": false
246
+ },
247
+ {
248
+ "type": "event",
249
+ "name": "EscrowDisputed",
250
+ "inputs": [
251
+ {
252
+ "name": "escrowId",
253
+ "type": "uint256",
254
+ "indexed": true,
255
+ "internalType": "uint256"
256
+ },
257
+ {
258
+ "name": "disputedBy",
259
+ "type": "address",
260
+ "indexed": false,
261
+ "internalType": "address"
262
+ }
263
+ ],
264
+ "anonymous": false
265
+ },
266
+ {
267
+ "type": "event",
268
+ "name": "EscrowFunded",
269
+ "inputs": [
270
+ {
271
+ "name": "escrowId",
272
+ "type": "uint256",
273
+ "indexed": true,
274
+ "internalType": "uint256"
275
+ }
276
+ ],
277
+ "anonymous": false
278
+ },
279
+ {
280
+ "type": "event",
281
+ "name": "EscrowRefunded",
282
+ "inputs": [
283
+ {
284
+ "name": "escrowId",
285
+ "type": "uint256",
286
+ "indexed": true,
287
+ "internalType": "uint256"
288
+ }
289
+ ],
290
+ "anonymous": false
291
+ },
292
+ {
293
+ "type": "event",
294
+ "name": "EscrowReleased",
295
+ "inputs": [
296
+ {
297
+ "name": "escrowId",
298
+ "type": "uint256",
299
+ "indexed": true,
300
+ "internalType": "uint256"
301
+ }
302
+ ],
303
+ "anonymous": false
304
+ },
305
+ {
306
+ "type": "event",
307
+ "name": "EscrowResolved",
308
+ "inputs": [
309
+ {
310
+ "name": "escrowId",
311
+ "type": "uint256",
312
+ "indexed": true,
313
+ "internalType": "uint256"
314
+ },
315
+ {
316
+ "name": "payerAmount",
317
+ "type": "uint256",
318
+ "indexed": false,
319
+ "internalType": "uint256"
320
+ },
321
+ {
322
+ "name": "providerAmount",
323
+ "type": "uint256",
324
+ "indexed": false,
325
+ "internalType": "uint256"
326
+ }
327
+ ],
328
+ "anonymous": false
329
+ },
330
+ {
331
+ "type": "event",
332
+ "name": "OwnershipTransferred",
333
+ "inputs": [
334
+ {
335
+ "name": "previousOwner",
336
+ "type": "address",
337
+ "indexed": true,
338
+ "internalType": "address"
339
+ },
340
+ {
341
+ "name": "newOwner",
342
+ "type": "address",
343
+ "indexed": true,
344
+ "internalType": "address"
345
+ }
346
+ ],
347
+ "anonymous": false
348
+ },
349
+ {
350
+ "type": "error",
351
+ "name": "DeadlineNotReached",
352
+ "inputs": [
353
+ {
354
+ "name": "escrowId",
355
+ "type": "uint256",
356
+ "internalType": "uint256"
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "type": "error",
362
+ "name": "EscrowNotFound",
363
+ "inputs": [
364
+ {
365
+ "name": "escrowId",
366
+ "type": "uint256",
367
+ "internalType": "uint256"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "type": "error",
373
+ "name": "InvalidDeadline",
374
+ "inputs": []
375
+ },
376
+ {
377
+ "type": "error",
378
+ "name": "InvalidPercent",
379
+ "inputs": []
380
+ },
381
+ {
382
+ "type": "error",
383
+ "name": "InvalidStatus",
384
+ "inputs": [
385
+ {
386
+ "name": "escrowId",
387
+ "type": "uint256",
388
+ "internalType": "uint256"
389
+ },
390
+ {
391
+ "name": "current",
392
+ "type": "uint8",
393
+ "internalType": "enum IEscrow.EscrowStatus"
394
+ },
395
+ {
396
+ "name": "expected",
397
+ "type": "uint8",
398
+ "internalType": "enum IEscrow.EscrowStatus"
399
+ }
400
+ ]
401
+ },
402
+ {
403
+ "type": "error",
404
+ "name": "NotParty",
405
+ "inputs": [
406
+ {
407
+ "name": "escrowId",
408
+ "type": "uint256",
409
+ "internalType": "uint256"
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ "type": "error",
415
+ "name": "NotPayer",
416
+ "inputs": [
417
+ {
418
+ "name": "escrowId",
419
+ "type": "uint256",
420
+ "internalType": "uint256"
421
+ }
422
+ ]
423
+ },
424
+ {
425
+ "type": "error",
426
+ "name": "NotProvider",
427
+ "inputs": [
428
+ {
429
+ "name": "escrowId",
430
+ "type": "uint256",
431
+ "internalType": "uint256"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "type": "error",
437
+ "name": "OwnableInvalidOwner",
438
+ "inputs": [
439
+ {
440
+ "name": "owner",
441
+ "type": "address",
442
+ "internalType": "address"
443
+ }
444
+ ]
445
+ },
446
+ {
447
+ "type": "error",
448
+ "name": "OwnableUnauthorizedAccount",
449
+ "inputs": [
450
+ {
451
+ "name": "account",
452
+ "type": "address",
453
+ "internalType": "address"
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ "type": "error",
459
+ "name": "ReentrancyGuardReentrantCall",
460
+ "inputs": []
461
+ },
462
+ {
463
+ "type": "error",
464
+ "name": "TransferFailed",
465
+ "inputs": [
466
+ {
467
+ "name": "to",
468
+ "type": "address",
469
+ "internalType": "address"
470
+ },
471
+ {
472
+ "name": "amount",
473
+ "type": "uint256",
474
+ "internalType": "uint256"
475
+ }
476
+ ]
477
+ },
478
+ {
479
+ "type": "error",
480
+ "name": "ZeroAmount",
481
+ "inputs": []
482
+ }
483
+ ]