@varla/sdk 1.0.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.
Files changed (61) hide show
  1. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts +240 -0
  2. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts.map +1 -0
  3. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js +315 -0
  4. package/dist/abi/full/PolymarketCtfAdapter.d.ts +234 -0
  5. package/dist/abi/full/PolymarketCtfAdapter.d.ts.map +1 -0
  6. package/dist/abi/full/PolymarketCtfAdapter.js +307 -0
  7. package/dist/abi/full/VarlaAccessManager.d.ts +896 -0
  8. package/dist/abi/full/VarlaAccessManager.d.ts.map +1 -0
  9. package/dist/abi/full/VarlaAccessManager.js +1166 -0
  10. package/dist/abi/full/VarlaConvertLiquidator.d.ts +603 -0
  11. package/dist/abi/full/VarlaConvertLiquidator.d.ts.map +1 -0
  12. package/dist/abi/full/VarlaConvertLiquidator.js +784 -0
  13. package/dist/abi/full/VarlaCore.d.ts +1671 -0
  14. package/dist/abi/full/VarlaCore.d.ts.map +1 -0
  15. package/dist/abi/full/VarlaCore.js +2176 -0
  16. package/dist/abi/full/VarlaInterestRateStrategy.d.ts +337 -0
  17. package/dist/abi/full/VarlaInterestRateStrategy.d.ts.map +1 -0
  18. package/dist/abi/full/VarlaInterestRateStrategy.js +437 -0
  19. package/dist/abi/full/VarlaLiquidator.d.ts +669 -0
  20. package/dist/abi/full/VarlaLiquidator.d.ts.map +1 -0
  21. package/dist/abi/full/VarlaLiquidator.js +864 -0
  22. package/dist/abi/full/VarlaMergeLiquidator.d.ts +575 -0
  23. package/dist/abi/full/VarlaMergeLiquidator.d.ts.map +1 -0
  24. package/dist/abi/full/VarlaMergeLiquidator.js +747 -0
  25. package/dist/abi/full/VarlaOracle.d.ts +1278 -0
  26. package/dist/abi/full/VarlaOracle.d.ts.map +1 -0
  27. package/dist/abi/full/VarlaOracle.js +1673 -0
  28. package/dist/abi/full/VarlaPool.d.ts +1242 -0
  29. package/dist/abi/full/VarlaPool.d.ts.map +1 -0
  30. package/dist/abi/full/VarlaPool.js +1621 -0
  31. package/dist/abi/full/VarlaProxyAdmin.d.ts +227 -0
  32. package/dist/abi/full/VarlaProxyAdmin.d.ts.map +1 -0
  33. package/dist/abi/full/VarlaProxyAdmin.js +296 -0
  34. package/dist/abi/index.d.ts +13 -0
  35. package/dist/abi/index.d.ts.map +1 -0
  36. package/dist/abi/index.js +14 -0
  37. package/dist/abi/subsets/VarlaOracle.registry.d.ts +532 -0
  38. package/dist/abi/subsets/VarlaOracle.registry.d.ts.map +1 -0
  39. package/dist/abi/subsets/VarlaOracle.registry.js +695 -0
  40. package/dist/abi.d.ts +2 -0
  41. package/dist/abi.d.ts.map +1 -0
  42. package/dist/abi.js +2 -0
  43. package/dist/addresses/bsc.d.ts +3 -0
  44. package/dist/addresses/bsc.d.ts.map +1 -0
  45. package/dist/addresses/bsc.js +10 -0
  46. package/dist/addresses/index.d.ts +3 -0
  47. package/dist/addresses/index.d.ts.map +1 -0
  48. package/dist/addresses/index.js +4 -0
  49. package/dist/addresses/polygon.d.ts +3 -0
  50. package/dist/addresses/polygon.d.ts.map +1 -0
  51. package/dist/addresses/polygon.js +10 -0
  52. package/dist/addresses.d.ts +2 -0
  53. package/dist/addresses.d.ts.map +1 -0
  54. package/dist/addresses.js +2 -0
  55. package/dist/index.d.ts +2 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +2 -0
  58. package/dist/types.d.ts +20 -0
  59. package/dist/types.d.ts.map +1 -0
  60. package/dist/types.js +1 -0
  61. package/package.json +42 -0
@@ -0,0 +1,695 @@
1
+ export const VARLAORACLE_ABI_REGISTRY = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_authority",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_updater",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_collateral",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "address",
27
+ "name": "authority",
28
+ "type": "address"
29
+ }
30
+ ],
31
+ "name": "AccessManagedInvalidAuthority",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [
36
+ {
37
+ "internalType": "address",
38
+ "name": "caller",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "internalType": "uint32",
43
+ "name": "delay",
44
+ "type": "uint32"
45
+ }
46
+ ],
47
+ "name": "AccessManagedRequiredDelay",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "address",
54
+ "name": "caller",
55
+ "type": "address"
56
+ }
57
+ ],
58
+ "name": "AccessManagedUnauthorized",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [],
63
+ "name": "ArrayLengthMismatch",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "positionId",
71
+ "type": "uint256"
72
+ }
73
+ ],
74
+ "name": "DuplicateNegRiskPositionId",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "positionId",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "EarlyClosureWindowActive",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "bytes32",
92
+ "name": "marketId",
93
+ "type": "bytes32"
94
+ }
95
+ ],
96
+ "name": "EmptyNegRiskMarketPositions",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "InvalidAddress",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [
106
+ {
107
+ "internalType": "uint256",
108
+ "name": "value",
109
+ "type": "uint256"
110
+ }
111
+ ],
112
+ "name": "InvalidEarlyClosureWindow",
113
+ "type": "error"
114
+ },
115
+ {
116
+ "inputs": [
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "value",
120
+ "type": "uint256"
121
+ }
122
+ ],
123
+ "name": "InvalidLiquidationGracePeriod",
124
+ "type": "error"
125
+ },
126
+ {
127
+ "inputs": [
128
+ {
129
+ "internalType": "uint256",
130
+ "name": "value",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "InvalidMaxStaleness",
135
+ "type": "error"
136
+ },
137
+ {
138
+ "inputs": [
139
+ {
140
+ "internalType": "uint256",
141
+ "name": "yesPositionId",
142
+ "type": "uint256"
143
+ },
144
+ {
145
+ "internalType": "uint256",
146
+ "name": "noPositionId",
147
+ "type": "uint256"
148
+ }
149
+ ],
150
+ "name": "InvalidOppositePositionPair",
151
+ "type": "error"
152
+ },
153
+ {
154
+ "inputs": [
155
+ {
156
+ "internalType": "uint256",
157
+ "name": "positionId",
158
+ "type": "uint256"
159
+ }
160
+ ],
161
+ "name": "InvalidPrice",
162
+ "type": "error"
163
+ },
164
+ {
165
+ "inputs": [
166
+ {
167
+ "internalType": "uint8",
168
+ "name": "tier",
169
+ "type": "uint8"
170
+ }
171
+ ],
172
+ "name": "InvalidRiskTier",
173
+ "type": "error"
174
+ },
175
+ {
176
+ "inputs": [
177
+ {
178
+ "internalType": "bytes32",
179
+ "name": "marketId",
180
+ "type": "bytes32"
181
+ }
182
+ ],
183
+ "name": "NegRiskMarketAlreadyRegistered",
184
+ "type": "error"
185
+ },
186
+ {
187
+ "inputs": [],
188
+ "name": "OnlyUpdater",
189
+ "type": "error"
190
+ },
191
+ {
192
+ "inputs": [
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "positionId",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "name": "PositionNotConfigured",
200
+ "type": "error"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "uint256",
206
+ "name": "price",
207
+ "type": "uint256"
208
+ }
209
+ ],
210
+ "name": "PriceExceedsMax",
211
+ "type": "error"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "positionId",
218
+ "type": "uint256"
219
+ },
220
+ {
221
+ "internalType": "uint256",
222
+ "name": "lastUpdated",
223
+ "type": "uint256"
224
+ },
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "maxAge",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "name": "StalePrice",
232
+ "type": "error"
233
+ },
234
+ {
235
+ "anonymous": false,
236
+ "inputs": [
237
+ {
238
+ "indexed": false,
239
+ "internalType": "address",
240
+ "name": "authority",
241
+ "type": "address"
242
+ }
243
+ ],
244
+ "name": "AuthorityUpdated",
245
+ "type": "event"
246
+ },
247
+ {
248
+ "anonymous": false,
249
+ "inputs": [
250
+ {
251
+ "indexed": false,
252
+ "internalType": "uint256",
253
+ "name": "oldWindow",
254
+ "type": "uint256"
255
+ },
256
+ {
257
+ "indexed": false,
258
+ "internalType": "uint256",
259
+ "name": "newWindow",
260
+ "type": "uint256"
261
+ }
262
+ ],
263
+ "name": "DefaultEarlyClosureWindowUpdated",
264
+ "type": "event"
265
+ },
266
+ {
267
+ "anonymous": false,
268
+ "inputs": [
269
+ {
270
+ "indexed": false,
271
+ "internalType": "uint256",
272
+ "name": "oldGracePeriod",
273
+ "type": "uint256"
274
+ },
275
+ {
276
+ "indexed": false,
277
+ "internalType": "uint256",
278
+ "name": "newGracePeriod",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "name": "LiquidationGracePeriodUpdated",
283
+ "type": "event"
284
+ },
285
+ {
286
+ "anonymous": false,
287
+ "inputs": [
288
+ {
289
+ "indexed": false,
290
+ "internalType": "uint256",
291
+ "name": "oldMaxStaleness",
292
+ "type": "uint256"
293
+ },
294
+ {
295
+ "indexed": false,
296
+ "internalType": "uint256",
297
+ "name": "newMaxStaleness",
298
+ "type": "uint256"
299
+ }
300
+ ],
301
+ "name": "MaxStalenessUpdated",
302
+ "type": "event"
303
+ },
304
+ {
305
+ "anonymous": false,
306
+ "inputs": [
307
+ {
308
+ "indexed": true,
309
+ "internalType": "bytes32",
310
+ "name": "marketId",
311
+ "type": "bytes32"
312
+ },
313
+ {
314
+ "indexed": false,
315
+ "internalType": "uint256",
316
+ "name": "oldCount",
317
+ "type": "uint256"
318
+ },
319
+ {
320
+ "indexed": false,
321
+ "internalType": "uint256",
322
+ "name": "newCount",
323
+ "type": "uint256"
324
+ }
325
+ ],
326
+ "name": "NegRiskMarketPositionsOverridden",
327
+ "type": "event"
328
+ },
329
+ {
330
+ "anonymous": false,
331
+ "inputs": [
332
+ {
333
+ "indexed": true,
334
+ "internalType": "bytes32",
335
+ "name": "marketId",
336
+ "type": "bytes32"
337
+ },
338
+ {
339
+ "indexed": false,
340
+ "internalType": "uint256",
341
+ "name": "count",
342
+ "type": "uint256"
343
+ }
344
+ ],
345
+ "name": "NegRiskMarketPositionsRegistered",
346
+ "type": "event"
347
+ },
348
+ {
349
+ "anonymous": false,
350
+ "inputs": [
351
+ {
352
+ "indexed": true,
353
+ "internalType": "uint256",
354
+ "name": "positionId",
355
+ "type": "uint256"
356
+ },
357
+ {
358
+ "indexed": true,
359
+ "internalType": "bytes32",
360
+ "name": "marketId",
361
+ "type": "bytes32"
362
+ }
363
+ ],
364
+ "name": "NegRiskPositionConfigured",
365
+ "type": "event"
366
+ },
367
+ {
368
+ "anonymous": false,
369
+ "inputs": [
370
+ {
371
+ "indexed": true,
372
+ "internalType": "bytes32",
373
+ "name": "marketId",
374
+ "type": "bytes32"
375
+ },
376
+ {
377
+ "indexed": false,
378
+ "internalType": "uint256",
379
+ "name": "count",
380
+ "type": "uint256"
381
+ }
382
+ ],
383
+ "name": "NegRiskPositionsBatchConfigured",
384
+ "type": "event"
385
+ },
386
+ {
387
+ "anonymous": false,
388
+ "inputs": [
389
+ {
390
+ "indexed": true,
391
+ "internalType": "uint256",
392
+ "name": "yesPositionId",
393
+ "type": "uint256"
394
+ },
395
+ {
396
+ "indexed": true,
397
+ "internalType": "uint256",
398
+ "name": "noPositionId",
399
+ "type": "uint256"
400
+ }
401
+ ],
402
+ "name": "OppositePositionsConfigured",
403
+ "type": "event"
404
+ },
405
+ {
406
+ "anonymous": false,
407
+ "inputs": [
408
+ {
409
+ "indexed": true,
410
+ "internalType": "uint256",
411
+ "name": "positionId",
412
+ "type": "uint256"
413
+ },
414
+ {
415
+ "indexed": false,
416
+ "internalType": "uint8",
417
+ "name": "riskTier",
418
+ "type": "uint8"
419
+ },
420
+ {
421
+ "indexed": false,
422
+ "internalType": "bytes32",
423
+ "name": "conditionId",
424
+ "type": "bytes32"
425
+ },
426
+ {
427
+ "indexed": false,
428
+ "internalType": "uint256",
429
+ "name": "resolutionTime",
430
+ "type": "uint256"
431
+ }
432
+ ],
433
+ "name": "PositionConfigured",
434
+ "type": "event"
435
+ },
436
+ {
437
+ "anonymous": false,
438
+ "inputs": [
439
+ {
440
+ "indexed": true,
441
+ "internalType": "uint256",
442
+ "name": "positionId",
443
+ "type": "uint256"
444
+ },
445
+ {
446
+ "indexed": false,
447
+ "internalType": "bool",
448
+ "name": "isSet",
449
+ "type": "bool"
450
+ },
451
+ {
452
+ "indexed": false,
453
+ "internalType": "uint256",
454
+ "name": "window",
455
+ "type": "uint256"
456
+ }
457
+ ],
458
+ "name": "PositionEarlyClosureWindowOverrideUpdated",
459
+ "type": "event"
460
+ },
461
+ {
462
+ "anonymous": false,
463
+ "inputs": [
464
+ {
465
+ "indexed": true,
466
+ "internalType": "uint256",
467
+ "name": "positionId",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "indexed": false,
472
+ "internalType": "string",
473
+ "name": "reason",
474
+ "type": "string"
475
+ }
476
+ ],
477
+ "name": "PositionInvalidated",
478
+ "type": "event"
479
+ },
480
+ {
481
+ "anonymous": false,
482
+ "inputs": [
483
+ {
484
+ "indexed": true,
485
+ "internalType": "uint256",
486
+ "name": "positionId",
487
+ "type": "uint256"
488
+ }
489
+ ],
490
+ "name": "PositionValidated",
491
+ "type": "event"
492
+ },
493
+ {
494
+ "anonymous": false,
495
+ "inputs": [
496
+ {
497
+ "indexed": true,
498
+ "internalType": "uint256",
499
+ "name": "positionId",
500
+ "type": "uint256"
501
+ },
502
+ {
503
+ "indexed": false,
504
+ "internalType": "uint256",
505
+ "name": "price",
506
+ "type": "uint256"
507
+ },
508
+ {
509
+ "indexed": false,
510
+ "internalType": "uint256",
511
+ "name": "twap",
512
+ "type": "uint256"
513
+ },
514
+ {
515
+ "indexed": false,
516
+ "internalType": "uint256",
517
+ "name": "liquidity",
518
+ "type": "uint256"
519
+ },
520
+ {
521
+ "indexed": false,
522
+ "internalType": "bool",
523
+ "name": "isValid",
524
+ "type": "bool"
525
+ }
526
+ ],
527
+ "name": "PriceUpdated",
528
+ "type": "event"
529
+ },
530
+ {
531
+ "anonymous": false,
532
+ "inputs": [
533
+ {
534
+ "indexed": true,
535
+ "internalType": "address",
536
+ "name": "oldUpdater",
537
+ "type": "address"
538
+ },
539
+ {
540
+ "indexed": true,
541
+ "internalType": "address",
542
+ "name": "newUpdater",
543
+ "type": "address"
544
+ }
545
+ ],
546
+ "name": "UpdaterChanged",
547
+ "type": "event"
548
+ },
549
+ {
550
+ "inputs": [
551
+ {
552
+ "internalType": "uint256",
553
+ "name": "positionId",
554
+ "type": "uint256"
555
+ }
556
+ ],
557
+ "name": "getConditionId",
558
+ "outputs": [
559
+ {
560
+ "internalType": "bytes32",
561
+ "name": "",
562
+ "type": "bytes32"
563
+ }
564
+ ],
565
+ "stateMutability": "view",
566
+ "type": "function"
567
+ },
568
+ {
569
+ "inputs": [
570
+ {
571
+ "internalType": "uint256",
572
+ "name": "index",
573
+ "type": "uint256"
574
+ }
575
+ ],
576
+ "name": "getConfiguredPositionAt",
577
+ "outputs": [
578
+ {
579
+ "internalType": "uint256",
580
+ "name": "",
581
+ "type": "uint256"
582
+ }
583
+ ],
584
+ "stateMutability": "view",
585
+ "type": "function"
586
+ },
587
+ {
588
+ "inputs": [],
589
+ "name": "getConfiguredPositionsCount",
590
+ "outputs": [
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "",
594
+ "type": "uint256"
595
+ }
596
+ ],
597
+ "stateMutability": "view",
598
+ "type": "function"
599
+ },
600
+ {
601
+ "inputs": [
602
+ {
603
+ "internalType": "uint256",
604
+ "name": "positionId",
605
+ "type": "uint256"
606
+ }
607
+ ],
608
+ "name": "getNegRiskMarketId",
609
+ "outputs": [
610
+ {
611
+ "internalType": "bytes32",
612
+ "name": "",
613
+ "type": "bytes32"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [
621
+ {
622
+ "internalType": "uint256",
623
+ "name": "positionId",
624
+ "type": "uint256"
625
+ }
626
+ ],
627
+ "name": "getOppositePositionId",
628
+ "outputs": [
629
+ {
630
+ "internalType": "uint256",
631
+ "name": "",
632
+ "type": "uint256"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "positionId",
643
+ "type": "uint256"
644
+ }
645
+ ],
646
+ "name": "getResolutionTime",
647
+ "outputs": [
648
+ {
649
+ "internalType": "uint256",
650
+ "name": "",
651
+ "type": "uint256"
652
+ }
653
+ ],
654
+ "stateMutability": "view",
655
+ "type": "function"
656
+ },
657
+ {
658
+ "inputs": [
659
+ {
660
+ "internalType": "uint256",
661
+ "name": "positionId",
662
+ "type": "uint256"
663
+ }
664
+ ],
665
+ "name": "isConfigured",
666
+ "outputs": [
667
+ {
668
+ "internalType": "bool",
669
+ "name": "",
670
+ "type": "bool"
671
+ }
672
+ ],
673
+ "stateMutability": "view",
674
+ "type": "function"
675
+ },
676
+ {
677
+ "inputs": [
678
+ {
679
+ "internalType": "uint256",
680
+ "name": "positionId",
681
+ "type": "uint256"
682
+ }
683
+ ],
684
+ "name": "isNegRisk",
685
+ "outputs": [
686
+ {
687
+ "internalType": "bool",
688
+ "name": "",
689
+ "type": "bool"
690
+ }
691
+ ],
692
+ "stateMutability": "view",
693
+ "type": "function"
694
+ }
695
+ ];
package/dist/abi.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./abi/index.js";
2
+ //# sourceMappingURL=abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../src/abi.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC"}
package/dist/abi.js ADDED
@@ -0,0 +1,2 @@
1
+ // Note: explicit .js extension is required for Node ESM resolution.
2
+ export * from "./abi/index.js";
@@ -0,0 +1,3 @@
1
+ import type { AddressBook } from "../types";
2
+ export declare const bsc: AddressBook;
3
+ //# sourceMappingURL=bsc.d.ts.map