@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,596 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [
5
+ {
6
+ "name": "_serviceRegistry",
7
+ "type": "address",
8
+ "internalType": "address"
9
+ },
10
+ {
11
+ "name": "_platformFeeRate",
12
+ "type": "uint256",
13
+ "internalType": "uint256"
14
+ },
15
+ {
16
+ "name": "_feeCollector",
17
+ "type": "address",
18
+ "internalType": "address"
19
+ }
20
+ ],
21
+ "stateMutability": "nonpayable"
22
+ },
23
+ {
24
+ "type": "function",
25
+ "name": "batchPay",
26
+ "inputs": [
27
+ {
28
+ "name": "serviceIds",
29
+ "type": "uint256[]",
30
+ "internalType": "uint256[]"
31
+ }
32
+ ],
33
+ "outputs": [],
34
+ "stateMutability": "payable"
35
+ },
36
+ {
37
+ "type": "function",
38
+ "name": "deposit",
39
+ "inputs": [],
40
+ "outputs": [],
41
+ "stateMutability": "payable"
42
+ },
43
+ {
44
+ "type": "function",
45
+ "name": "feeCollector",
46
+ "inputs": [],
47
+ "outputs": [
48
+ {
49
+ "name": "",
50
+ "type": "address",
51
+ "internalType": "address"
52
+ }
53
+ ],
54
+ "stateMutability": "view"
55
+ },
56
+ {
57
+ "type": "function",
58
+ "name": "getPaymentCount",
59
+ "inputs": [
60
+ {
61
+ "name": "user",
62
+ "type": "address",
63
+ "internalType": "address"
64
+ }
65
+ ],
66
+ "outputs": [
67
+ {
68
+ "name": "",
69
+ "type": "uint256",
70
+ "internalType": "uint256"
71
+ }
72
+ ],
73
+ "stateMutability": "view"
74
+ },
75
+ {
76
+ "type": "function",
77
+ "name": "getTotalSpent",
78
+ "inputs": [
79
+ {
80
+ "name": "user",
81
+ "type": "address",
82
+ "internalType": "address"
83
+ }
84
+ ],
85
+ "outputs": [
86
+ {
87
+ "name": "",
88
+ "type": "uint256",
89
+ "internalType": "uint256"
90
+ }
91
+ ],
92
+ "stateMutability": "view"
93
+ },
94
+ {
95
+ "type": "function",
96
+ "name": "getPlatformFeeRate",
97
+ "inputs": [],
98
+ "outputs": [
99
+ {
100
+ "name": "",
101
+ "type": "uint256",
102
+ "internalType": "uint256"
103
+ }
104
+ ],
105
+ "stateMutability": "view"
106
+ },
107
+ {
108
+ "type": "function",
109
+ "name": "getProviderEarnings",
110
+ "inputs": [
111
+ {
112
+ "name": "provider",
113
+ "type": "address",
114
+ "internalType": "address"
115
+ }
116
+ ],
117
+ "outputs": [
118
+ {
119
+ "name": "",
120
+ "type": "uint256",
121
+ "internalType": "uint256"
122
+ }
123
+ ],
124
+ "stateMutability": "view"
125
+ },
126
+ {
127
+ "type": "function",
128
+ "name": "getUserBalance",
129
+ "inputs": [
130
+ {
131
+ "name": "user",
132
+ "type": "address",
133
+ "internalType": "address"
134
+ }
135
+ ],
136
+ "outputs": [
137
+ {
138
+ "name": "",
139
+ "type": "uint256",
140
+ "internalType": "uint256"
141
+ }
142
+ ],
143
+ "stateMutability": "view"
144
+ },
145
+ {
146
+ "type": "function",
147
+ "name": "owner",
148
+ "inputs": [],
149
+ "outputs": [
150
+ {
151
+ "name": "",
152
+ "type": "address",
153
+ "internalType": "address"
154
+ }
155
+ ],
156
+ "stateMutability": "view"
157
+ },
158
+ {
159
+ "type": "function",
160
+ "name": "pause",
161
+ "inputs": [],
162
+ "outputs": [],
163
+ "stateMutability": "nonpayable"
164
+ },
165
+ {
166
+ "type": "function",
167
+ "name": "paused",
168
+ "inputs": [],
169
+ "outputs": [
170
+ {
171
+ "name": "",
172
+ "type": "bool",
173
+ "internalType": "bool"
174
+ }
175
+ ],
176
+ "stateMutability": "view"
177
+ },
178
+ {
179
+ "type": "function",
180
+ "name": "payFromBalance",
181
+ "inputs": [
182
+ {
183
+ "name": "serviceId",
184
+ "type": "uint256",
185
+ "internalType": "uint256"
186
+ }
187
+ ],
188
+ "outputs": [],
189
+ "stateMutability": "nonpayable"
190
+ },
191
+ {
192
+ "type": "function",
193
+ "name": "payPerUse",
194
+ "inputs": [
195
+ {
196
+ "name": "serviceId",
197
+ "type": "uint256",
198
+ "internalType": "uint256"
199
+ }
200
+ ],
201
+ "outputs": [],
202
+ "stateMutability": "payable"
203
+ },
204
+ {
205
+ "type": "function",
206
+ "name": "platformFeeRate",
207
+ "inputs": [],
208
+ "outputs": [
209
+ {
210
+ "name": "",
211
+ "type": "uint256",
212
+ "internalType": "uint256"
213
+ }
214
+ ],
215
+ "stateMutability": "view"
216
+ },
217
+ {
218
+ "type": "function",
219
+ "name": "renounceOwnership",
220
+ "inputs": [],
221
+ "outputs": [],
222
+ "stateMutability": "nonpayable"
223
+ },
224
+ {
225
+ "type": "function",
226
+ "name": "serviceRegistry",
227
+ "inputs": [],
228
+ "outputs": [
229
+ {
230
+ "name": "",
231
+ "type": "address",
232
+ "internalType": "contract IServiceRegistry"
233
+ }
234
+ ],
235
+ "stateMutability": "view"
236
+ },
237
+ {
238
+ "type": "function",
239
+ "name": "setFeeCollector",
240
+ "inputs": [
241
+ {
242
+ "name": "newCollector",
243
+ "type": "address",
244
+ "internalType": "address"
245
+ }
246
+ ],
247
+ "outputs": [],
248
+ "stateMutability": "nonpayable"
249
+ },
250
+ {
251
+ "type": "function",
252
+ "name": "setPlatformFeeRate",
253
+ "inputs": [
254
+ {
255
+ "name": "newRate",
256
+ "type": "uint256",
257
+ "internalType": "uint256"
258
+ }
259
+ ],
260
+ "outputs": [],
261
+ "stateMutability": "nonpayable"
262
+ },
263
+ {
264
+ "type": "function",
265
+ "name": "transferOwnership",
266
+ "inputs": [
267
+ {
268
+ "name": "newOwner",
269
+ "type": "address",
270
+ "internalType": "address"
271
+ }
272
+ ],
273
+ "outputs": [],
274
+ "stateMutability": "nonpayable"
275
+ },
276
+ {
277
+ "type": "function",
278
+ "name": "unpause",
279
+ "inputs": [],
280
+ "outputs": [],
281
+ "stateMutability": "nonpayable"
282
+ },
283
+ {
284
+ "type": "function",
285
+ "name": "withdraw",
286
+ "inputs": [
287
+ {
288
+ "name": "amount",
289
+ "type": "uint256",
290
+ "internalType": "uint256"
291
+ }
292
+ ],
293
+ "outputs": [],
294
+ "stateMutability": "nonpayable"
295
+ },
296
+ {
297
+ "type": "function",
298
+ "name": "withdrawPlatformFees",
299
+ "inputs": [],
300
+ "outputs": [],
301
+ "stateMutability": "nonpayable"
302
+ },
303
+ {
304
+ "type": "function",
305
+ "name": "withdrawProviderEarnings",
306
+ "inputs": [],
307
+ "outputs": [],
308
+ "stateMutability": "nonpayable"
309
+ },
310
+ {
311
+ "type": "event",
312
+ "name": "BalanceDeposited",
313
+ "inputs": [
314
+ {
315
+ "name": "user",
316
+ "type": "address",
317
+ "indexed": true,
318
+ "internalType": "address"
319
+ },
320
+ {
321
+ "name": "amount",
322
+ "type": "uint256",
323
+ "indexed": false,
324
+ "internalType": "uint256"
325
+ }
326
+ ],
327
+ "anonymous": false
328
+ },
329
+ {
330
+ "type": "event",
331
+ "name": "BalanceWithdrawn",
332
+ "inputs": [
333
+ {
334
+ "name": "user",
335
+ "type": "address",
336
+ "indexed": true,
337
+ "internalType": "address"
338
+ },
339
+ {
340
+ "name": "amount",
341
+ "type": "uint256",
342
+ "indexed": false,
343
+ "internalType": "uint256"
344
+ }
345
+ ],
346
+ "anonymous": false
347
+ },
348
+ {
349
+ "type": "event",
350
+ "name": "BatchPaymentMade",
351
+ "inputs": [
352
+ {
353
+ "name": "payer",
354
+ "type": "address",
355
+ "indexed": true,
356
+ "internalType": "address"
357
+ },
358
+ {
359
+ "name": "totalAmount",
360
+ "type": "uint256",
361
+ "indexed": false,
362
+ "internalType": "uint256"
363
+ },
364
+ {
365
+ "name": "count",
366
+ "type": "uint256",
367
+ "indexed": false,
368
+ "internalType": "uint256"
369
+ }
370
+ ],
371
+ "anonymous": false
372
+ },
373
+ {
374
+ "type": "event",
375
+ "name": "OwnershipTransferred",
376
+ "inputs": [
377
+ {
378
+ "name": "previousOwner",
379
+ "type": "address",
380
+ "indexed": true,
381
+ "internalType": "address"
382
+ },
383
+ {
384
+ "name": "newOwner",
385
+ "type": "address",
386
+ "indexed": true,
387
+ "internalType": "address"
388
+ }
389
+ ],
390
+ "anonymous": false
391
+ },
392
+ {
393
+ "type": "event",
394
+ "name": "Paused",
395
+ "inputs": [
396
+ {
397
+ "name": "account",
398
+ "type": "address",
399
+ "indexed": false,
400
+ "internalType": "address"
401
+ }
402
+ ],
403
+ "anonymous": false
404
+ },
405
+ {
406
+ "type": "event",
407
+ "name": "PaymentMade",
408
+ "inputs": [
409
+ {
410
+ "name": "serviceId",
411
+ "type": "uint256",
412
+ "indexed": true,
413
+ "internalType": "uint256"
414
+ },
415
+ {
416
+ "name": "payer",
417
+ "type": "address",
418
+ "indexed": true,
419
+ "internalType": "address"
420
+ },
421
+ {
422
+ "name": "provider",
423
+ "type": "address",
424
+ "indexed": true,
425
+ "internalType": "address"
426
+ },
427
+ {
428
+ "name": "amount",
429
+ "type": "uint256",
430
+ "indexed": false,
431
+ "internalType": "uint256"
432
+ },
433
+ {
434
+ "name": "platformFee",
435
+ "type": "uint256",
436
+ "indexed": false,
437
+ "internalType": "uint256"
438
+ }
439
+ ],
440
+ "anonymous": false
441
+ },
442
+ {
443
+ "type": "event",
444
+ "name": "ProviderWithdrawn",
445
+ "inputs": [
446
+ {
447
+ "name": "provider",
448
+ "type": "address",
449
+ "indexed": true,
450
+ "internalType": "address"
451
+ },
452
+ {
453
+ "name": "amount",
454
+ "type": "uint256",
455
+ "indexed": false,
456
+ "internalType": "uint256"
457
+ }
458
+ ],
459
+ "anonymous": false
460
+ },
461
+ {
462
+ "type": "event",
463
+ "name": "Unpaused",
464
+ "inputs": [
465
+ {
466
+ "name": "account",
467
+ "type": "address",
468
+ "indexed": false,
469
+ "internalType": "address"
470
+ }
471
+ ],
472
+ "anonymous": false
473
+ },
474
+ {
475
+ "type": "error",
476
+ "name": "ArrayLengthMismatch",
477
+ "inputs": []
478
+ },
479
+ {
480
+ "type": "error",
481
+ "name": "EnforcedPause",
482
+ "inputs": []
483
+ },
484
+ {
485
+ "type": "error",
486
+ "name": "ExpectedPause",
487
+ "inputs": []
488
+ },
489
+ {
490
+ "type": "error",
491
+ "name": "InsufficientBalance",
492
+ "inputs": [
493
+ {
494
+ "name": "required",
495
+ "type": "uint256",
496
+ "internalType": "uint256"
497
+ },
498
+ {
499
+ "name": "available",
500
+ "type": "uint256",
501
+ "internalType": "uint256"
502
+ }
503
+ ]
504
+ },
505
+ {
506
+ "type": "error",
507
+ "name": "InsufficientPayment",
508
+ "inputs": [
509
+ {
510
+ "name": "required",
511
+ "type": "uint256",
512
+ "internalType": "uint256"
513
+ },
514
+ {
515
+ "name": "provided",
516
+ "type": "uint256",
517
+ "internalType": "uint256"
518
+ }
519
+ ]
520
+ },
521
+ {
522
+ "type": "error",
523
+ "name": "InvalidFeeRate",
524
+ "inputs": [
525
+ {
526
+ "name": "feeRate",
527
+ "type": "uint256",
528
+ "internalType": "uint256"
529
+ }
530
+ ]
531
+ },
532
+ {
533
+ "type": "error",
534
+ "name": "NoEarningsToWithdraw",
535
+ "inputs": []
536
+ },
537
+ {
538
+ "type": "error",
539
+ "name": "OwnableInvalidOwner",
540
+ "inputs": [
541
+ {
542
+ "name": "owner",
543
+ "type": "address",
544
+ "internalType": "address"
545
+ }
546
+ ]
547
+ },
548
+ {
549
+ "type": "error",
550
+ "name": "OwnableUnauthorizedAccount",
551
+ "inputs": [
552
+ {
553
+ "name": "account",
554
+ "type": "address",
555
+ "internalType": "address"
556
+ }
557
+ ]
558
+ },
559
+ {
560
+ "type": "error",
561
+ "name": "ReentrancyGuardReentrantCall",
562
+ "inputs": []
563
+ },
564
+ {
565
+ "type": "error",
566
+ "name": "ServiceNotActive",
567
+ "inputs": [
568
+ {
569
+ "name": "serviceId",
570
+ "type": "uint256",
571
+ "internalType": "uint256"
572
+ }
573
+ ]
574
+ },
575
+ {
576
+ "type": "error",
577
+ "name": "TransferFailed",
578
+ "inputs": [
579
+ {
580
+ "name": "to",
581
+ "type": "address",
582
+ "internalType": "address"
583
+ },
584
+ {
585
+ "name": "amount",
586
+ "type": "uint256",
587
+ "internalType": "uint256"
588
+ }
589
+ ]
590
+ },
591
+ {
592
+ "type": "error",
593
+ "name": "ZeroAmount",
594
+ "inputs": []
595
+ }
596
+ ]