@d20dao/vrf-sdk 0.4.0 → 0.5.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.
- package/AGENTS.md +11 -11
- package/API.md +411 -193
- package/BUILD-MANIFEST.json +36 -24
- package/CHANGELOG.md +53 -0
- package/PROTOCOL-PROVENANCE.json +15 -9
- package/README.md +66 -26
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/abi/D20BeaconVerifier.json +165 -0
- package/abi/EpochEntropy.json +233 -0
- package/dist/abi.d.ts +303 -0
- package/dist/abi.js +2 -1
- package/dist/beacon.d.ts +28 -0
- package/dist/beacon.js +133 -0
- package/dist/epoch.d.ts +11 -3
- package/dist/epoch.js +70 -9
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/dist/sources.d.ts +11 -0
- package/dist/sources.js +72 -0
- package/notices/BLS-BN254-LICENSE +21 -0
- package/notices/PROVENANCE.md +12 -0
- package/package.json +30 -4
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "uint256[4]",
|
|
6
|
+
"name": "input",
|
|
7
|
+
"type": "uint256[4]"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"name": "BNAddFailed",
|
|
11
|
+
"type": "error"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"inputs": [],
|
|
15
|
+
"name": "InsufficientGas",
|
|
16
|
+
"type": "error"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"inputs": [
|
|
20
|
+
{
|
|
21
|
+
"internalType": "bytes",
|
|
22
|
+
"name": "dst",
|
|
23
|
+
"type": "bytes"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"name": "InvalidDSTLength",
|
|
27
|
+
"type": "error"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"inputs": [
|
|
31
|
+
{
|
|
32
|
+
"internalType": "uint256",
|
|
33
|
+
"name": "x",
|
|
34
|
+
"type": "uint256"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"name": "InvalidFieldElement",
|
|
38
|
+
"type": "error"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"inputs": [
|
|
42
|
+
{
|
|
43
|
+
"internalType": "uint256",
|
|
44
|
+
"name": "noSqrt",
|
|
45
|
+
"type": "uint256"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "MapToPointFailed",
|
|
49
|
+
"type": "error"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"inputs": [
|
|
53
|
+
{
|
|
54
|
+
"internalType": "uint256",
|
|
55
|
+
"name": "base",
|
|
56
|
+
"type": "uint256"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"internalType": "uint256",
|
|
60
|
+
"name": "exponent",
|
|
61
|
+
"type": "uint256"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"internalType": "uint256",
|
|
65
|
+
"name": "modulus",
|
|
66
|
+
"type": "uint256"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"name": "ModExpFailed",
|
|
70
|
+
"type": "error"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"inputs": [],
|
|
74
|
+
"name": "DST",
|
|
75
|
+
"outputs": [
|
|
76
|
+
{
|
|
77
|
+
"internalType": "bytes",
|
|
78
|
+
"name": "",
|
|
79
|
+
"type": "bytes"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"stateMutability": "view",
|
|
83
|
+
"type": "function"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"inputs": [],
|
|
87
|
+
"name": "PAIRING_GAS",
|
|
88
|
+
"outputs": [
|
|
89
|
+
{
|
|
90
|
+
"internalType": "uint256",
|
|
91
|
+
"name": "",
|
|
92
|
+
"type": "uint256"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"stateMutability": "view",
|
|
96
|
+
"type": "function"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"inputs": [
|
|
100
|
+
{
|
|
101
|
+
"internalType": "bytes",
|
|
102
|
+
"name": "publicKey",
|
|
103
|
+
"type": "bytes"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"name": "isValidPublicKey",
|
|
107
|
+
"outputs": [
|
|
108
|
+
{
|
|
109
|
+
"internalType": "bool",
|
|
110
|
+
"name": "",
|
|
111
|
+
"type": "bool"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"stateMutability": "pure",
|
|
115
|
+
"type": "function"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"internalType": "uint64",
|
|
121
|
+
"name": "round",
|
|
122
|
+
"type": "uint64"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"name": "roundMessage",
|
|
126
|
+
"outputs": [
|
|
127
|
+
{
|
|
128
|
+
"internalType": "uint256[2]",
|
|
129
|
+
"name": "",
|
|
130
|
+
"type": "uint256[2]"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"stateMutability": "view",
|
|
134
|
+
"type": "function"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"inputs": [
|
|
138
|
+
{
|
|
139
|
+
"internalType": "bytes",
|
|
140
|
+
"name": "publicKey",
|
|
141
|
+
"type": "bytes"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"internalType": "uint64",
|
|
145
|
+
"name": "round",
|
|
146
|
+
"type": "uint64"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"internalType": "bytes",
|
|
150
|
+
"name": "signature",
|
|
151
|
+
"type": "bytes"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"name": "verifyRound",
|
|
155
|
+
"outputs": [
|
|
156
|
+
{
|
|
157
|
+
"internalType": "bool",
|
|
158
|
+
"name": "",
|
|
159
|
+
"type": "bool"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"stateMutability": "view",
|
|
163
|
+
"type": "function"
|
|
164
|
+
}
|
|
165
|
+
]
|
package/abi/EpochEntropy.json
CHANGED
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"name": "AnchorUnavailable",
|
|
26
26
|
"type": "error"
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [],
|
|
30
|
+
"name": "BeaconGasTooLow",
|
|
31
|
+
"type": "error"
|
|
32
|
+
},
|
|
28
33
|
{
|
|
29
34
|
"inputs": [],
|
|
30
35
|
"name": "ECDSAInvalidSignature",
|
|
@@ -170,6 +175,22 @@
|
|
|
170
175
|
"name": "RenounceDisabled",
|
|
171
176
|
"type": "error"
|
|
172
177
|
},
|
|
178
|
+
{
|
|
179
|
+
"inputs": [
|
|
180
|
+
{
|
|
181
|
+
"internalType": "uint256",
|
|
182
|
+
"name": "value",
|
|
183
|
+
"type": "uint256"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"internalType": "uint256",
|
|
187
|
+
"name": "length",
|
|
188
|
+
"type": "uint256"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"name": "StringsInsufficientHexLength",
|
|
192
|
+
"type": "error"
|
|
193
|
+
},
|
|
173
194
|
{
|
|
174
195
|
"inputs": [],
|
|
175
196
|
"name": "UUPSUnauthorizedCallContext",
|
|
@@ -205,6 +226,49 @@
|
|
|
205
226
|
"name": "BackupCommitterSet",
|
|
206
227
|
"type": "event"
|
|
207
228
|
},
|
|
229
|
+
{
|
|
230
|
+
"anonymous": false,
|
|
231
|
+
"inputs": [
|
|
232
|
+
{
|
|
233
|
+
"indexed": true,
|
|
234
|
+
"internalType": "uint8",
|
|
235
|
+
"name": "recipe",
|
|
236
|
+
"type": "uint8"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"indexed": true,
|
|
240
|
+
"internalType": "address",
|
|
241
|
+
"name": "verifier",
|
|
242
|
+
"type": "address"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"indexed": true,
|
|
246
|
+
"internalType": "bytes32",
|
|
247
|
+
"name": "chainHash",
|
|
248
|
+
"type": "bytes32"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"indexed": false,
|
|
252
|
+
"internalType": "bytes",
|
|
253
|
+
"name": "publicKey",
|
|
254
|
+
"type": "bytes"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"indexed": false,
|
|
258
|
+
"internalType": "uint64",
|
|
259
|
+
"name": "genesis",
|
|
260
|
+
"type": "uint64"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"indexed": false,
|
|
264
|
+
"internalType": "uint64",
|
|
265
|
+
"name": "period",
|
|
266
|
+
"type": "uint64"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"name": "BeaconRegistered",
|
|
270
|
+
"type": "event"
|
|
271
|
+
},
|
|
208
272
|
{
|
|
209
273
|
"anonymous": false,
|
|
210
274
|
"inputs": [
|
|
@@ -381,6 +445,32 @@
|
|
|
381
445
|
"name": "Upgraded",
|
|
382
446
|
"type": "event"
|
|
383
447
|
},
|
|
448
|
+
{
|
|
449
|
+
"inputs": [],
|
|
450
|
+
"name": "BEACON_DOMAIN",
|
|
451
|
+
"outputs": [
|
|
452
|
+
{
|
|
453
|
+
"internalType": "bytes32",
|
|
454
|
+
"name": "",
|
|
455
|
+
"type": "bytes32"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"stateMutability": "view",
|
|
459
|
+
"type": "function"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"inputs": [],
|
|
463
|
+
"name": "BEACON_VERIFY_GAS",
|
|
464
|
+
"outputs": [
|
|
465
|
+
{
|
|
466
|
+
"internalType": "uint256",
|
|
467
|
+
"name": "",
|
|
468
|
+
"type": "uint256"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"stateMutability": "view",
|
|
472
|
+
"type": "function"
|
|
473
|
+
},
|
|
384
474
|
{
|
|
385
475
|
"inputs": [],
|
|
386
476
|
"name": "EPOCH_DOMAIN",
|
|
@@ -596,6 +686,52 @@
|
|
|
596
686
|
"stateMutability": "view",
|
|
597
687
|
"type": "function"
|
|
598
688
|
},
|
|
689
|
+
{
|
|
690
|
+
"inputs": [
|
|
691
|
+
{
|
|
692
|
+
"internalType": "uint8",
|
|
693
|
+
"name": "recipe",
|
|
694
|
+
"type": "uint8"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"name": "beaconOf",
|
|
698
|
+
"outputs": [
|
|
699
|
+
{
|
|
700
|
+
"components": [
|
|
701
|
+
{
|
|
702
|
+
"internalType": "address",
|
|
703
|
+
"name": "verifier",
|
|
704
|
+
"type": "address"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"internalType": "uint64",
|
|
708
|
+
"name": "genesis",
|
|
709
|
+
"type": "uint64"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"internalType": "uint64",
|
|
713
|
+
"name": "period",
|
|
714
|
+
"type": "uint64"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"internalType": "bytes32",
|
|
718
|
+
"name": "chainHash",
|
|
719
|
+
"type": "bytes32"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"internalType": "bytes",
|
|
723
|
+
"name": "publicKey",
|
|
724
|
+
"type": "bytes"
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
"internalType": "struct EpochEntropy.Beacon",
|
|
728
|
+
"name": "",
|
|
729
|
+
"type": "tuple"
|
|
730
|
+
}
|
|
731
|
+
],
|
|
732
|
+
"stateMutability": "view",
|
|
733
|
+
"type": "function"
|
|
734
|
+
},
|
|
599
735
|
{
|
|
600
736
|
"inputs": [],
|
|
601
737
|
"name": "btcTradeSigner",
|
|
@@ -1256,6 +1392,55 @@
|
|
|
1256
1392
|
"stateMutability": "view",
|
|
1257
1393
|
"type": "function"
|
|
1258
1394
|
},
|
|
1395
|
+
{
|
|
1396
|
+
"inputs": [
|
|
1397
|
+
{
|
|
1398
|
+
"internalType": "address",
|
|
1399
|
+
"name": "verifier",
|
|
1400
|
+
"type": "address"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"internalType": "bytes32",
|
|
1404
|
+
"name": "chainHash",
|
|
1405
|
+
"type": "bytes32"
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"internalType": "bytes",
|
|
1409
|
+
"name": "publicKey",
|
|
1410
|
+
"type": "bytes"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"internalType": "uint64",
|
|
1414
|
+
"name": "genesis",
|
|
1415
|
+
"type": "uint64"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"internalType": "uint64",
|
|
1419
|
+
"name": "period",
|
|
1420
|
+
"type": "uint64"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"internalType": "uint64",
|
|
1424
|
+
"name": "sampleRound",
|
|
1425
|
+
"type": "uint64"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"internalType": "bytes",
|
|
1429
|
+
"name": "sampleSignature",
|
|
1430
|
+
"type": "bytes"
|
|
1431
|
+
}
|
|
1432
|
+
],
|
|
1433
|
+
"name": "registerBeacon",
|
|
1434
|
+
"outputs": [
|
|
1435
|
+
{
|
|
1436
|
+
"internalType": "uint8",
|
|
1437
|
+
"name": "recipe",
|
|
1438
|
+
"type": "uint8"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
"stateMutability": "nonpayable",
|
|
1442
|
+
"type": "function"
|
|
1443
|
+
},
|
|
1259
1444
|
{
|
|
1260
1445
|
"inputs": [
|
|
1261
1446
|
{
|
|
@@ -1346,6 +1531,25 @@
|
|
|
1346
1531
|
"stateMutability": "nonpayable",
|
|
1347
1532
|
"type": "function"
|
|
1348
1533
|
},
|
|
1534
|
+
{
|
|
1535
|
+
"inputs": [
|
|
1536
|
+
{
|
|
1537
|
+
"internalType": "uint8",
|
|
1538
|
+
"name": "recipe",
|
|
1539
|
+
"type": "uint8"
|
|
1540
|
+
}
|
|
1541
|
+
],
|
|
1542
|
+
"name": "slotSigner",
|
|
1543
|
+
"outputs": [
|
|
1544
|
+
{
|
|
1545
|
+
"internalType": "address",
|
|
1546
|
+
"name": "",
|
|
1547
|
+
"type": "address"
|
|
1548
|
+
}
|
|
1549
|
+
],
|
|
1550
|
+
"stateMutability": "view",
|
|
1551
|
+
"type": "function"
|
|
1552
|
+
},
|
|
1349
1553
|
{
|
|
1350
1554
|
"inputs": [
|
|
1351
1555
|
{
|
|
@@ -1395,5 +1599,34 @@
|
|
|
1395
1599
|
"outputs": [],
|
|
1396
1600
|
"stateMutability": "payable",
|
|
1397
1601
|
"type": "function"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"inputs": [
|
|
1605
|
+
{
|
|
1606
|
+
"internalType": "uint8",
|
|
1607
|
+
"name": "recipe",
|
|
1608
|
+
"type": "uint8"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"internalType": "uint64",
|
|
1612
|
+
"name": "round",
|
|
1613
|
+
"type": "uint64"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"internalType": "bytes",
|
|
1617
|
+
"name": "signature",
|
|
1618
|
+
"type": "bytes"
|
|
1619
|
+
}
|
|
1620
|
+
],
|
|
1621
|
+
"name": "verifyBeacon",
|
|
1622
|
+
"outputs": [
|
|
1623
|
+
{
|
|
1624
|
+
"internalType": "bool",
|
|
1625
|
+
"name": "",
|
|
1626
|
+
"type": "bool"
|
|
1627
|
+
}
|
|
1628
|
+
],
|
|
1629
|
+
"stateMutability": "view",
|
|
1630
|
+
"type": "function"
|
|
1398
1631
|
}
|
|
1399
1632
|
]
|