@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
package/dist/abi.d.ts
CHANGED
|
@@ -1883,6 +1883,10 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
1883
1883
|
readonly inputs: readonly [];
|
|
1884
1884
|
readonly name: "AnchorUnavailable";
|
|
1885
1885
|
readonly type: "error";
|
|
1886
|
+
}, {
|
|
1887
|
+
readonly inputs: readonly [];
|
|
1888
|
+
readonly name: "BeaconGasTooLow";
|
|
1889
|
+
readonly type: "error";
|
|
1886
1890
|
}, {
|
|
1887
1891
|
readonly inputs: readonly [];
|
|
1888
1892
|
readonly name: "ECDSAInvalidSignature";
|
|
@@ -1995,6 +1999,18 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
1995
1999
|
readonly inputs: readonly [];
|
|
1996
2000
|
readonly name: "RenounceDisabled";
|
|
1997
2001
|
readonly type: "error";
|
|
2002
|
+
}, {
|
|
2003
|
+
readonly inputs: readonly [{
|
|
2004
|
+
readonly internalType: "uint256";
|
|
2005
|
+
readonly name: "value";
|
|
2006
|
+
readonly type: "uint256";
|
|
2007
|
+
}, {
|
|
2008
|
+
readonly internalType: "uint256";
|
|
2009
|
+
readonly name: "length";
|
|
2010
|
+
readonly type: "uint256";
|
|
2011
|
+
}];
|
|
2012
|
+
readonly name: "StringsInsufficientHexLength";
|
|
2013
|
+
readonly type: "error";
|
|
1998
2014
|
}, {
|
|
1999
2015
|
readonly inputs: readonly [];
|
|
2000
2016
|
readonly name: "UUPSUnauthorizedCallContext";
|
|
@@ -2022,6 +2038,41 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2022
2038
|
}];
|
|
2023
2039
|
readonly name: "BackupCommitterSet";
|
|
2024
2040
|
readonly type: "event";
|
|
2041
|
+
}, {
|
|
2042
|
+
readonly anonymous: false;
|
|
2043
|
+
readonly inputs: readonly [{
|
|
2044
|
+
readonly indexed: true;
|
|
2045
|
+
readonly internalType: "uint8";
|
|
2046
|
+
readonly name: "recipe";
|
|
2047
|
+
readonly type: "uint8";
|
|
2048
|
+
}, {
|
|
2049
|
+
readonly indexed: true;
|
|
2050
|
+
readonly internalType: "address";
|
|
2051
|
+
readonly name: "verifier";
|
|
2052
|
+
readonly type: "address";
|
|
2053
|
+
}, {
|
|
2054
|
+
readonly indexed: true;
|
|
2055
|
+
readonly internalType: "bytes32";
|
|
2056
|
+
readonly name: "chainHash";
|
|
2057
|
+
readonly type: "bytes32";
|
|
2058
|
+
}, {
|
|
2059
|
+
readonly indexed: false;
|
|
2060
|
+
readonly internalType: "bytes";
|
|
2061
|
+
readonly name: "publicKey";
|
|
2062
|
+
readonly type: "bytes";
|
|
2063
|
+
}, {
|
|
2064
|
+
readonly indexed: false;
|
|
2065
|
+
readonly internalType: "uint64";
|
|
2066
|
+
readonly name: "genesis";
|
|
2067
|
+
readonly type: "uint64";
|
|
2068
|
+
}, {
|
|
2069
|
+
readonly indexed: false;
|
|
2070
|
+
readonly internalType: "uint64";
|
|
2071
|
+
readonly name: "period";
|
|
2072
|
+
readonly type: "uint64";
|
|
2073
|
+
}];
|
|
2074
|
+
readonly name: "BeaconRegistered";
|
|
2075
|
+
readonly type: "event";
|
|
2025
2076
|
}, {
|
|
2026
2077
|
readonly anonymous: false;
|
|
2027
2078
|
readonly inputs: readonly [{
|
|
@@ -2162,6 +2213,26 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2162
2213
|
}];
|
|
2163
2214
|
readonly name: "Upgraded";
|
|
2164
2215
|
readonly type: "event";
|
|
2216
|
+
}, {
|
|
2217
|
+
readonly inputs: readonly [];
|
|
2218
|
+
readonly name: "BEACON_DOMAIN";
|
|
2219
|
+
readonly outputs: readonly [{
|
|
2220
|
+
readonly internalType: "bytes32";
|
|
2221
|
+
readonly name: "";
|
|
2222
|
+
readonly type: "bytes32";
|
|
2223
|
+
}];
|
|
2224
|
+
readonly stateMutability: "view";
|
|
2225
|
+
readonly type: "function";
|
|
2226
|
+
}, {
|
|
2227
|
+
readonly inputs: readonly [];
|
|
2228
|
+
readonly name: "BEACON_VERIFY_GAS";
|
|
2229
|
+
readonly outputs: readonly [{
|
|
2230
|
+
readonly internalType: "uint256";
|
|
2231
|
+
readonly name: "";
|
|
2232
|
+
readonly type: "uint256";
|
|
2233
|
+
}];
|
|
2234
|
+
readonly stateMutability: "view";
|
|
2235
|
+
readonly type: "function";
|
|
2165
2236
|
}, {
|
|
2166
2237
|
readonly inputs: readonly [];
|
|
2167
2238
|
readonly name: "EPOCH_DOMAIN";
|
|
@@ -2328,6 +2399,41 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2328
2399
|
}];
|
|
2329
2400
|
readonly stateMutability: "view";
|
|
2330
2401
|
readonly type: "function";
|
|
2402
|
+
}, {
|
|
2403
|
+
readonly inputs: readonly [{
|
|
2404
|
+
readonly internalType: "uint8";
|
|
2405
|
+
readonly name: "recipe";
|
|
2406
|
+
readonly type: "uint8";
|
|
2407
|
+
}];
|
|
2408
|
+
readonly name: "beaconOf";
|
|
2409
|
+
readonly outputs: readonly [{
|
|
2410
|
+
readonly components: readonly [{
|
|
2411
|
+
readonly internalType: "address";
|
|
2412
|
+
readonly name: "verifier";
|
|
2413
|
+
readonly type: "address";
|
|
2414
|
+
}, {
|
|
2415
|
+
readonly internalType: "uint64";
|
|
2416
|
+
readonly name: "genesis";
|
|
2417
|
+
readonly type: "uint64";
|
|
2418
|
+
}, {
|
|
2419
|
+
readonly internalType: "uint64";
|
|
2420
|
+
readonly name: "period";
|
|
2421
|
+
readonly type: "uint64";
|
|
2422
|
+
}, {
|
|
2423
|
+
readonly internalType: "bytes32";
|
|
2424
|
+
readonly name: "chainHash";
|
|
2425
|
+
readonly type: "bytes32";
|
|
2426
|
+
}, {
|
|
2427
|
+
readonly internalType: "bytes";
|
|
2428
|
+
readonly name: "publicKey";
|
|
2429
|
+
readonly type: "bytes";
|
|
2430
|
+
}];
|
|
2431
|
+
readonly internalType: "struct EpochEntropy.Beacon";
|
|
2432
|
+
readonly name: "";
|
|
2433
|
+
readonly type: "tuple";
|
|
2434
|
+
}];
|
|
2435
|
+
readonly stateMutability: "view";
|
|
2436
|
+
readonly type: "function";
|
|
2331
2437
|
}, {
|
|
2332
2438
|
readonly inputs: readonly [];
|
|
2333
2439
|
readonly name: "btcTradeSigner";
|
|
@@ -2831,6 +2937,44 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2831
2937
|
}];
|
|
2832
2938
|
readonly stateMutability: "view";
|
|
2833
2939
|
readonly type: "function";
|
|
2940
|
+
}, {
|
|
2941
|
+
readonly inputs: readonly [{
|
|
2942
|
+
readonly internalType: "address";
|
|
2943
|
+
readonly name: "verifier";
|
|
2944
|
+
readonly type: "address";
|
|
2945
|
+
}, {
|
|
2946
|
+
readonly internalType: "bytes32";
|
|
2947
|
+
readonly name: "chainHash";
|
|
2948
|
+
readonly type: "bytes32";
|
|
2949
|
+
}, {
|
|
2950
|
+
readonly internalType: "bytes";
|
|
2951
|
+
readonly name: "publicKey";
|
|
2952
|
+
readonly type: "bytes";
|
|
2953
|
+
}, {
|
|
2954
|
+
readonly internalType: "uint64";
|
|
2955
|
+
readonly name: "genesis";
|
|
2956
|
+
readonly type: "uint64";
|
|
2957
|
+
}, {
|
|
2958
|
+
readonly internalType: "uint64";
|
|
2959
|
+
readonly name: "period";
|
|
2960
|
+
readonly type: "uint64";
|
|
2961
|
+
}, {
|
|
2962
|
+
readonly internalType: "uint64";
|
|
2963
|
+
readonly name: "sampleRound";
|
|
2964
|
+
readonly type: "uint64";
|
|
2965
|
+
}, {
|
|
2966
|
+
readonly internalType: "bytes";
|
|
2967
|
+
readonly name: "sampleSignature";
|
|
2968
|
+
readonly type: "bytes";
|
|
2969
|
+
}];
|
|
2970
|
+
readonly name: "registerBeacon";
|
|
2971
|
+
readonly outputs: readonly [{
|
|
2972
|
+
readonly internalType: "uint8";
|
|
2973
|
+
readonly name: "recipe";
|
|
2974
|
+
readonly type: "uint8";
|
|
2975
|
+
}];
|
|
2976
|
+
readonly stateMutability: "nonpayable";
|
|
2977
|
+
readonly type: "function";
|
|
2834
2978
|
}, {
|
|
2835
2979
|
readonly inputs: readonly [{
|
|
2836
2980
|
readonly internalType: "string";
|
|
@@ -2901,6 +3045,20 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2901
3045
|
readonly outputs: readonly [];
|
|
2902
3046
|
readonly stateMutability: "nonpayable";
|
|
2903
3047
|
readonly type: "function";
|
|
3048
|
+
}, {
|
|
3049
|
+
readonly inputs: readonly [{
|
|
3050
|
+
readonly internalType: "uint8";
|
|
3051
|
+
readonly name: "recipe";
|
|
3052
|
+
readonly type: "uint8";
|
|
3053
|
+
}];
|
|
3054
|
+
readonly name: "slotSigner";
|
|
3055
|
+
readonly outputs: readonly [{
|
|
3056
|
+
readonly internalType: "address";
|
|
3057
|
+
readonly name: "";
|
|
3058
|
+
readonly type: "address";
|
|
3059
|
+
}];
|
|
3060
|
+
readonly stateMutability: "view";
|
|
3061
|
+
readonly type: "function";
|
|
2904
3062
|
}, {
|
|
2905
3063
|
readonly inputs: readonly [{
|
|
2906
3064
|
readonly internalType: "uint64";
|
|
@@ -2939,4 +3097,149 @@ export declare const epochEntropyAbi: readonly [{
|
|
|
2939
3097
|
readonly outputs: readonly [];
|
|
2940
3098
|
readonly stateMutability: "payable";
|
|
2941
3099
|
readonly type: "function";
|
|
3100
|
+
}, {
|
|
3101
|
+
readonly inputs: readonly [{
|
|
3102
|
+
readonly internalType: "uint8";
|
|
3103
|
+
readonly name: "recipe";
|
|
3104
|
+
readonly type: "uint8";
|
|
3105
|
+
}, {
|
|
3106
|
+
readonly internalType: "uint64";
|
|
3107
|
+
readonly name: "round";
|
|
3108
|
+
readonly type: "uint64";
|
|
3109
|
+
}, {
|
|
3110
|
+
readonly internalType: "bytes";
|
|
3111
|
+
readonly name: "signature";
|
|
3112
|
+
readonly type: "bytes";
|
|
3113
|
+
}];
|
|
3114
|
+
readonly name: "verifyBeacon";
|
|
3115
|
+
readonly outputs: readonly [{
|
|
3116
|
+
readonly internalType: "bool";
|
|
3117
|
+
readonly name: "";
|
|
3118
|
+
readonly type: "bool";
|
|
3119
|
+
}];
|
|
3120
|
+
readonly stateMutability: "view";
|
|
3121
|
+
readonly type: "function";
|
|
3122
|
+
}];
|
|
3123
|
+
export declare const beaconVerifierAbi: readonly [{
|
|
3124
|
+
readonly inputs: readonly [{
|
|
3125
|
+
readonly internalType: "uint256[4]";
|
|
3126
|
+
readonly name: "input";
|
|
3127
|
+
readonly type: "uint256[4]";
|
|
3128
|
+
}];
|
|
3129
|
+
readonly name: "BNAddFailed";
|
|
3130
|
+
readonly type: "error";
|
|
3131
|
+
}, {
|
|
3132
|
+
readonly inputs: readonly [];
|
|
3133
|
+
readonly name: "InsufficientGas";
|
|
3134
|
+
readonly type: "error";
|
|
3135
|
+
}, {
|
|
3136
|
+
readonly inputs: readonly [{
|
|
3137
|
+
readonly internalType: "bytes";
|
|
3138
|
+
readonly name: "dst";
|
|
3139
|
+
readonly type: "bytes";
|
|
3140
|
+
}];
|
|
3141
|
+
readonly name: "InvalidDSTLength";
|
|
3142
|
+
readonly type: "error";
|
|
3143
|
+
}, {
|
|
3144
|
+
readonly inputs: readonly [{
|
|
3145
|
+
readonly internalType: "uint256";
|
|
3146
|
+
readonly name: "x";
|
|
3147
|
+
readonly type: "uint256";
|
|
3148
|
+
}];
|
|
3149
|
+
readonly name: "InvalidFieldElement";
|
|
3150
|
+
readonly type: "error";
|
|
3151
|
+
}, {
|
|
3152
|
+
readonly inputs: readonly [{
|
|
3153
|
+
readonly internalType: "uint256";
|
|
3154
|
+
readonly name: "noSqrt";
|
|
3155
|
+
readonly type: "uint256";
|
|
3156
|
+
}];
|
|
3157
|
+
readonly name: "MapToPointFailed";
|
|
3158
|
+
readonly type: "error";
|
|
3159
|
+
}, {
|
|
3160
|
+
readonly inputs: readonly [{
|
|
3161
|
+
readonly internalType: "uint256";
|
|
3162
|
+
readonly name: "base";
|
|
3163
|
+
readonly type: "uint256";
|
|
3164
|
+
}, {
|
|
3165
|
+
readonly internalType: "uint256";
|
|
3166
|
+
readonly name: "exponent";
|
|
3167
|
+
readonly type: "uint256";
|
|
3168
|
+
}, {
|
|
3169
|
+
readonly internalType: "uint256";
|
|
3170
|
+
readonly name: "modulus";
|
|
3171
|
+
readonly type: "uint256";
|
|
3172
|
+
}];
|
|
3173
|
+
readonly name: "ModExpFailed";
|
|
3174
|
+
readonly type: "error";
|
|
3175
|
+
}, {
|
|
3176
|
+
readonly inputs: readonly [];
|
|
3177
|
+
readonly name: "DST";
|
|
3178
|
+
readonly outputs: readonly [{
|
|
3179
|
+
readonly internalType: "bytes";
|
|
3180
|
+
readonly name: "";
|
|
3181
|
+
readonly type: "bytes";
|
|
3182
|
+
}];
|
|
3183
|
+
readonly stateMutability: "view";
|
|
3184
|
+
readonly type: "function";
|
|
3185
|
+
}, {
|
|
3186
|
+
readonly inputs: readonly [];
|
|
3187
|
+
readonly name: "PAIRING_GAS";
|
|
3188
|
+
readonly outputs: readonly [{
|
|
3189
|
+
readonly internalType: "uint256";
|
|
3190
|
+
readonly name: "";
|
|
3191
|
+
readonly type: "uint256";
|
|
3192
|
+
}];
|
|
3193
|
+
readonly stateMutability: "view";
|
|
3194
|
+
readonly type: "function";
|
|
3195
|
+
}, {
|
|
3196
|
+
readonly inputs: readonly [{
|
|
3197
|
+
readonly internalType: "bytes";
|
|
3198
|
+
readonly name: "publicKey";
|
|
3199
|
+
readonly type: "bytes";
|
|
3200
|
+
}];
|
|
3201
|
+
readonly name: "isValidPublicKey";
|
|
3202
|
+
readonly outputs: readonly [{
|
|
3203
|
+
readonly internalType: "bool";
|
|
3204
|
+
readonly name: "";
|
|
3205
|
+
readonly type: "bool";
|
|
3206
|
+
}];
|
|
3207
|
+
readonly stateMutability: "pure";
|
|
3208
|
+
readonly type: "function";
|
|
3209
|
+
}, {
|
|
3210
|
+
readonly inputs: readonly [{
|
|
3211
|
+
readonly internalType: "uint64";
|
|
3212
|
+
readonly name: "round";
|
|
3213
|
+
readonly type: "uint64";
|
|
3214
|
+
}];
|
|
3215
|
+
readonly name: "roundMessage";
|
|
3216
|
+
readonly outputs: readonly [{
|
|
3217
|
+
readonly internalType: "uint256[2]";
|
|
3218
|
+
readonly name: "";
|
|
3219
|
+
readonly type: "uint256[2]";
|
|
3220
|
+
}];
|
|
3221
|
+
readonly stateMutability: "view";
|
|
3222
|
+
readonly type: "function";
|
|
3223
|
+
}, {
|
|
3224
|
+
readonly inputs: readonly [{
|
|
3225
|
+
readonly internalType: "bytes";
|
|
3226
|
+
readonly name: "publicKey";
|
|
3227
|
+
readonly type: "bytes";
|
|
3228
|
+
}, {
|
|
3229
|
+
readonly internalType: "uint64";
|
|
3230
|
+
readonly name: "round";
|
|
3231
|
+
readonly type: "uint64";
|
|
3232
|
+
}, {
|
|
3233
|
+
readonly internalType: "bytes";
|
|
3234
|
+
readonly name: "signature";
|
|
3235
|
+
readonly type: "bytes";
|
|
3236
|
+
}];
|
|
3237
|
+
readonly name: "verifyRound";
|
|
3238
|
+
readonly outputs: readonly [{
|
|
3239
|
+
readonly internalType: "bool";
|
|
3240
|
+
readonly name: "";
|
|
3241
|
+
readonly type: "bool";
|
|
3242
|
+
}];
|
|
3243
|
+
readonly stateMutability: "view";
|
|
3244
|
+
readonly type: "function";
|
|
2942
3245
|
}];
|