sdk-triggerx 0.1.6 → 0.1.8

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 (81) hide show
  1. package/dist/{src/api → api}/jobs.js +0 -3
  2. package/dist/{src/client.js → client.js} +2 -3
  3. package/dist/{src/config.js → config.js} +2 -0
  4. package/package.json +15 -12
  5. package/.eslintrc.json +0 -16
  6. package/dist/test/createJobExample.d.ts +0 -1
  7. package/dist/test/createJobExample.js +0 -84
  8. package/dist/test/deleteJob.test.d.ts +0 -1
  9. package/dist/test/deleteJob.test.js +0 -22
  10. package/dist/test/example.test.d.ts +0 -1
  11. package/dist/test/example.test.js +0 -11
  12. package/dist/test/getJobDataById.test.d.ts +0 -1
  13. package/dist/test/getJobDataById.test.js +0 -23
  14. package/dist/test/getUserData.test.d.ts +0 -1
  15. package/dist/test/getUserData.test.js +0 -22
  16. package/dist/test/getjob.test.d.ts +0 -1
  17. package/dist/test/getjob.test.js +0 -21
  18. package/dist/test/testTgFunctions.d.ts +0 -1
  19. package/dist/test/testTgFunctions.js +0 -56
  20. package/jest.config.js +0 -7
  21. package/scripts/deploy.ts +0 -9
  22. package/src/api/checkTgBalance.ts +0 -27
  23. package/src/api/deleteJob.ts +0 -22
  24. package/src/api/getJobDataById.ts +0 -24
  25. package/src/api/getUserData.ts +0 -24
  26. package/src/api/getjob.ts +0 -26
  27. package/src/api/jobs.ts +0 -352
  28. package/src/api/topupTg.ts +0 -17
  29. package/src/api/withdrawTg.ts +0 -25
  30. package/src/client.ts +0 -38
  31. package/src/config.ts +0 -13
  32. package/src/contracts/JobRegistry.ts +0 -45
  33. package/src/contracts/TriggerXContract.ts +0 -14
  34. package/src/contracts/abi/.gitkeep +0 -1
  35. package/src/contracts/abi/GasRegistry.json +0 -607
  36. package/src/contracts/abi/JobRegistry.json +0 -1554
  37. package/src/contracts/index.ts +0 -1
  38. package/src/index.ts +0 -7
  39. package/src/types.ts +0 -249
  40. package/src/utils/errors.ts +0 -13
  41. package/test/createJobExample.ts +0 -91
  42. package/test/deleteJob.test.ts +0 -25
  43. package/test/example.test.d.ts +0 -1
  44. package/test/example.test.js +0 -11
  45. package/test/example.test.ts +0 -10
  46. package/test/getJobDataById.test.ts +0 -27
  47. package/test/getUserData.test.ts +0 -25
  48. package/test/getjob.test.ts +0 -23
  49. package/test/testTgFunctions.ts +0 -56
  50. package/tsconfig.json +0 -16
  51. /package/dist/{src/api → api}/checkTgBalance.d.ts +0 -0
  52. /package/dist/{src/api → api}/checkTgBalance.js +0 -0
  53. /package/dist/{src/api → api}/deleteJob.d.ts +0 -0
  54. /package/dist/{src/api → api}/deleteJob.js +0 -0
  55. /package/dist/{src/api → api}/getJobDataById.d.ts +0 -0
  56. /package/dist/{src/api → api}/getJobDataById.js +0 -0
  57. /package/dist/{src/api → api}/getUserData.d.ts +0 -0
  58. /package/dist/{src/api → api}/getUserData.js +0 -0
  59. /package/dist/{src/api → api}/getjob.d.ts +0 -0
  60. /package/dist/{src/api → api}/getjob.js +0 -0
  61. /package/dist/{src/api → api}/jobs.d.ts +0 -0
  62. /package/dist/{src/api → api}/topupTg.d.ts +0 -0
  63. /package/dist/{src/api → api}/topupTg.js +0 -0
  64. /package/dist/{src/api → api}/withdrawTg.d.ts +0 -0
  65. /package/dist/{src/api → api}/withdrawTg.js +0 -0
  66. /package/dist/{src/client.d.ts → client.d.ts} +0 -0
  67. /package/dist/{src/config.d.ts → config.d.ts} +0 -0
  68. /package/dist/{src/contracts → contracts}/JobRegistry.d.ts +0 -0
  69. /package/dist/{src/contracts → contracts}/JobRegistry.js +0 -0
  70. /package/dist/{src/contracts → contracts}/TriggerXContract.d.ts +0 -0
  71. /package/dist/{src/contracts → contracts}/TriggerXContract.js +0 -0
  72. /package/dist/{src/contracts → contracts}/abi/GasRegistry.json +0 -0
  73. /package/dist/{src/contracts → contracts}/abi/JobRegistry.json +0 -0
  74. /package/dist/{src/contracts → contracts}/index.d.ts +0 -0
  75. /package/dist/{src/contracts → contracts}/index.js +0 -0
  76. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  77. /package/dist/{src/index.js → index.js} +0 -0
  78. /package/dist/{src/types.d.ts → types.d.ts} +0 -0
  79. /package/dist/{src/types.js → types.js} +0 -0
  80. /package/dist/{src/utils → utils}/errors.d.ts +0 -0
  81. /package/dist/{src/utils → utils}/errors.js +0 -0
@@ -1,607 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
- {
8
- "inputs": [
9
- {
10
- "internalType": "address",
11
- "name": "target",
12
- "type": "address"
13
- }
14
- ],
15
- "name": "AddressEmptyCode",
16
- "type": "error"
17
- },
18
- {
19
- "inputs": [
20
- {
21
- "internalType": "address",
22
- "name": "implementation",
23
- "type": "address"
24
- }
25
- ],
26
- "name": "ERC1967InvalidImplementation",
27
- "type": "error"
28
- },
29
- {
30
- "inputs": [],
31
- "name": "ERC1967NonPayable",
32
- "type": "error"
33
- },
34
- {
35
- "inputs": [],
36
- "name": "FailedCall",
37
- "type": "error"
38
- },
39
- {
40
- "inputs": [],
41
- "name": "InvalidInitialization",
42
- "type": "error"
43
- },
44
- {
45
- "inputs": [],
46
- "name": "NotInitializing",
47
- "type": "error"
48
- },
49
- {
50
- "inputs": [
51
- {
52
- "internalType": "address",
53
- "name": "owner",
54
- "type": "address"
55
- }
56
- ],
57
- "name": "OwnableInvalidOwner",
58
- "type": "error"
59
- },
60
- {
61
- "inputs": [
62
- {
63
- "internalType": "address",
64
- "name": "account",
65
- "type": "address"
66
- }
67
- ],
68
- "name": "OwnableUnauthorizedAccount",
69
- "type": "error"
70
- },
71
- {
72
- "inputs": [],
73
- "name": "ReentrancyGuardReentrantCall",
74
- "type": "error"
75
- },
76
- {
77
- "inputs": [],
78
- "name": "UUPSUnauthorizedCallContext",
79
- "type": "error"
80
- },
81
- {
82
- "inputs": [
83
- {
84
- "internalType": "bytes32",
85
- "name": "slot",
86
- "type": "bytes32"
87
- }
88
- ],
89
- "name": "UUPSUnsupportedProxiableUUID",
90
- "type": "error"
91
- },
92
- {
93
- "anonymous": false,
94
- "inputs": [
95
- {
96
- "indexed": true,
97
- "internalType": "address",
98
- "name": "owner",
99
- "type": "address"
100
- },
101
- {
102
- "indexed": false,
103
- "internalType": "uint256",
104
- "name": "amount",
105
- "type": "uint256"
106
- },
107
- {
108
- "indexed": false,
109
- "internalType": "string",
110
- "name": "reason",
111
- "type": "string"
112
- }
113
- ],
114
- "name": "ETHWithdrawn",
115
- "type": "event"
116
- },
117
- {
118
- "anonymous": false,
119
- "inputs": [
120
- {
121
- "indexed": false,
122
- "internalType": "uint64",
123
- "name": "version",
124
- "type": "uint64"
125
- }
126
- ],
127
- "name": "Initialized",
128
- "type": "event"
129
- },
130
- {
131
- "anonymous": false,
132
- "inputs": [
133
- {
134
- "indexed": true,
135
- "internalType": "address",
136
- "name": "previousOwner",
137
- "type": "address"
138
- },
139
- {
140
- "indexed": true,
141
- "internalType": "address",
142
- "name": "newOwner",
143
- "type": "address"
144
- }
145
- ],
146
- "name": "OwnershipTransferred",
147
- "type": "event"
148
- },
149
- {
150
- "anonymous": false,
151
- "inputs": [
152
- {
153
- "indexed": true,
154
- "internalType": "address",
155
- "name": "user",
156
- "type": "address"
157
- },
158
- {
159
- "indexed": false,
160
- "internalType": "uint256",
161
- "name": "reward",
162
- "type": "uint256"
163
- }
164
- ],
165
- "name": "RewardClaimed",
166
- "type": "event"
167
- },
168
- {
169
- "anonymous": false,
170
- "inputs": [
171
- {
172
- "indexed": true,
173
- "internalType": "address",
174
- "name": "user",
175
- "type": "address"
176
- },
177
- {
178
- "indexed": false,
179
- "internalType": "uint256",
180
- "name": "amount",
181
- "type": "uint256"
182
- }
183
- ],
184
- "name": "TGBalanceDeducted",
185
- "type": "event"
186
- },
187
- {
188
- "anonymous": false,
189
- "inputs": [
190
- {
191
- "indexed": true,
192
- "internalType": "address",
193
- "name": "user",
194
- "type": "address"
195
- },
196
- {
197
- "indexed": false,
198
- "internalType": "uint256",
199
- "name": "amount",
200
- "type": "uint256"
201
- },
202
- {
203
- "indexed": false,
204
- "internalType": "string",
205
- "name": "reason",
206
- "type": "string"
207
- }
208
- ],
209
- "name": "TGBalanceRemoved",
210
- "type": "event"
211
- },
212
- {
213
- "anonymous": false,
214
- "inputs": [
215
- {
216
- "indexed": true,
217
- "internalType": "address",
218
- "name": "user",
219
- "type": "address"
220
- },
221
- {
222
- "indexed": false,
223
- "internalType": "uint256",
224
- "name": "amount",
225
- "type": "uint256"
226
- }
227
- ],
228
- "name": "TGClaimed",
229
- "type": "event"
230
- },
231
- {
232
- "anonymous": false,
233
- "inputs": [
234
- {
235
- "indexed": false,
236
- "internalType": "uint256",
237
- "name": "tgPerEth",
238
- "type": "uint256"
239
- }
240
- ],
241
- "name": "TGPerETHUpdated",
242
- "type": "event"
243
- },
244
- {
245
- "anonymous": false,
246
- "inputs": [
247
- {
248
- "indexed": true,
249
- "internalType": "address",
250
- "name": "user",
251
- "type": "address"
252
- },
253
- {
254
- "indexed": false,
255
- "internalType": "uint256",
256
- "name": "ethAmount",
257
- "type": "uint256"
258
- },
259
- {
260
- "indexed": false,
261
- "internalType": "uint256",
262
- "name": "tgAmount",
263
- "type": "uint256"
264
- }
265
- ],
266
- "name": "TGPurchased",
267
- "type": "event"
268
- },
269
- {
270
- "anonymous": false,
271
- "inputs": [
272
- {
273
- "indexed": true,
274
- "internalType": "address",
275
- "name": "user",
276
- "type": "address"
277
- },
278
- {
279
- "indexed": false,
280
- "internalType": "uint256",
281
- "name": "amount",
282
- "type": "uint256"
283
- }
284
- ],
285
- "name": "TGRefunded",
286
- "type": "event"
287
- },
288
- {
289
- "anonymous": false,
290
- "inputs": [
291
- {
292
- "indexed": true,
293
- "internalType": "address",
294
- "name": "user",
295
- "type": "address"
296
- },
297
- {
298
- "indexed": true,
299
- "internalType": "address",
300
- "name": "keeper",
301
- "type": "address"
302
- },
303
- {
304
- "indexed": false,
305
- "internalType": "uint256",
306
- "name": "amount",
307
- "type": "uint256"
308
- }
309
- ],
310
- "name": "TGTransferred",
311
- "type": "event"
312
- },
313
- {
314
- "anonymous": false,
315
- "inputs": [
316
- {
317
- "indexed": true,
318
- "internalType": "address",
319
- "name": "user",
320
- "type": "address"
321
- },
322
- {
323
- "indexed": false,
324
- "internalType": "uint256",
325
- "name": "amount",
326
- "type": "uint256"
327
- }
328
- ],
329
- "name": "TaskFeeClaimed",
330
- "type": "event"
331
- },
332
- {
333
- "anonymous": false,
334
- "inputs": [
335
- {
336
- "indexed": true,
337
- "internalType": "address",
338
- "name": "implementation",
339
- "type": "address"
340
- }
341
- ],
342
- "name": "Upgraded",
343
- "type": "event"
344
- },
345
- {
346
- "inputs": [],
347
- "name": "TG_PER_ETH",
348
- "outputs": [
349
- {
350
- "internalType": "uint256",
351
- "name": "",
352
- "type": "uint256"
353
- }
354
- ],
355
- "stateMutability": "view",
356
- "type": "function"
357
- },
358
- {
359
- "inputs": [],
360
- "name": "UPGRADE_INTERFACE_VERSION",
361
- "outputs": [
362
- {
363
- "internalType": "string",
364
- "name": "",
365
- "type": "string"
366
- }
367
- ],
368
- "stateMutability": "view",
369
- "type": "function"
370
- },
371
- {
372
- "inputs": [
373
- {
374
- "internalType": "address",
375
- "name": "",
376
- "type": "address"
377
- }
378
- ],
379
- "name": "balances",
380
- "outputs": [
381
- {
382
- "internalType": "uint256",
383
- "name": "ethSpent",
384
- "type": "uint256"
385
- },
386
- {
387
- "internalType": "uint256",
388
- "name": "TGbalance",
389
- "type": "uint256"
390
- }
391
- ],
392
- "stateMutability": "view",
393
- "type": "function"
394
- },
395
- {
396
- "inputs": [
397
- {
398
- "internalType": "uint256",
399
- "name": "tgAmount",
400
- "type": "uint256"
401
- }
402
- ],
403
- "name": "claimETHForTG",
404
- "outputs": [],
405
- "stateMutability": "nonpayable",
406
- "type": "function"
407
- },
408
- {
409
- "inputs": [
410
- {
411
- "internalType": "address",
412
- "name": "user",
413
- "type": "address"
414
- },
415
- {
416
- "internalType": "uint256",
417
- "name": "tgAmount",
418
- "type": "uint256"
419
- }
420
- ],
421
- "name": "deductTGBalance",
422
- "outputs": [],
423
- "stateMutability": "nonpayable",
424
- "type": "function"
425
- },
426
- {
427
- "inputs": [
428
- {
429
- "internalType": "address",
430
- "name": "user",
431
- "type": "address"
432
- }
433
- ],
434
- "name": "getBalance",
435
- "outputs": [
436
- {
437
- "internalType": "uint256",
438
- "name": "ethSpent",
439
- "type": "uint256"
440
- },
441
- {
442
- "internalType": "uint256",
443
- "name": "tgBalance",
444
- "type": "uint256"
445
- }
446
- ],
447
- "stateMutability": "view",
448
- "type": "function"
449
- },
450
- {
451
- "inputs": [
452
- {
453
- "internalType": "address",
454
- "name": "initialOwner",
455
- "type": "address"
456
- },
457
- {
458
- "internalType": "address",
459
- "name": "_operator",
460
- "type": "address"
461
- },
462
- {
463
- "internalType": "uint256",
464
- "name": "_tgPerEth",
465
- "type": "uint256"
466
- }
467
- ],
468
- "name": "initialize",
469
- "outputs": [],
470
- "stateMutability": "nonpayable",
471
- "type": "function"
472
- },
473
- {
474
- "inputs": [],
475
- "name": "operatorRole",
476
- "outputs": [
477
- {
478
- "internalType": "address",
479
- "name": "",
480
- "type": "address"
481
- }
482
- ],
483
- "stateMutability": "view",
484
- "type": "function"
485
- },
486
- {
487
- "inputs": [],
488
- "name": "owner",
489
- "outputs": [
490
- {
491
- "internalType": "address",
492
- "name": "",
493
- "type": "address"
494
- }
495
- ],
496
- "stateMutability": "view",
497
- "type": "function"
498
- },
499
- {
500
- "inputs": [],
501
- "name": "proxiableUUID",
502
- "outputs": [
503
- {
504
- "internalType": "bytes32",
505
- "name": "",
506
- "type": "bytes32"
507
- }
508
- ],
509
- "stateMutability": "view",
510
- "type": "function"
511
- },
512
- {
513
- "inputs": [
514
- {
515
- "internalType": "uint256",
516
- "name": "ethAmount",
517
- "type": "uint256"
518
- }
519
- ],
520
- "name": "purchaseTG",
521
- "outputs": [],
522
- "stateMutability": "payable",
523
- "type": "function"
524
- },
525
- {
526
- "inputs": [],
527
- "name": "renounceOwnership",
528
- "outputs": [],
529
- "stateMutability": "nonpayable",
530
- "type": "function"
531
- },
532
- {
533
- "inputs": [
534
- {
535
- "internalType": "address",
536
- "name": "_operatorRole",
537
- "type": "address"
538
- }
539
- ],
540
- "name": "setOperator",
541
- "outputs": [],
542
- "stateMutability": "nonpayable",
543
- "type": "function"
544
- },
545
- {
546
- "inputs": [
547
- {
548
- "internalType": "uint256",
549
- "name": "_tgPerEth",
550
- "type": "uint256"
551
- }
552
- ],
553
- "name": "setTGPerETH",
554
- "outputs": [],
555
- "stateMutability": "nonpayable",
556
- "type": "function"
557
- },
558
- {
559
- "inputs": [
560
- {
561
- "internalType": "address",
562
- "name": "newOwner",
563
- "type": "address"
564
- }
565
- ],
566
- "name": "transferOwnership",
567
- "outputs": [],
568
- "stateMutability": "nonpayable",
569
- "type": "function"
570
- },
571
- {
572
- "inputs": [
573
- {
574
- "internalType": "address",
575
- "name": "newImplementation",
576
- "type": "address"
577
- },
578
- {
579
- "internalType": "bytes",
580
- "name": "data",
581
- "type": "bytes"
582
- }
583
- ],
584
- "name": "upgradeToAndCall",
585
- "outputs": [],
586
- "stateMutability": "payable",
587
- "type": "function"
588
- },
589
- {
590
- "inputs": [
591
- {
592
- "internalType": "uint256",
593
- "name": "amount",
594
- "type": "uint256"
595
- },
596
- {
597
- "internalType": "string",
598
- "name": "reason",
599
- "type": "string"
600
- }
601
- ],
602
- "name": "withdrawETH",
603
- "outputs": [],
604
- "stateMutability": "nonpayable",
605
- "type": "function"
606
- }
607
- ]