@typeberry/lib 0.4.0 → 0.4.1-0a3acb2
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/index.cjs +725 -342
- package/index.d.ts +1468 -1410
- package/index.js +700 -316
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -13,7 +13,11 @@ declare enum TestSuite {
|
|
|
13
13
|
declare const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
|
|
14
14
|
|
|
15
15
|
declare const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Current version is set to track the jam-conformance testing.
|
|
18
|
+
* Since we are currently at 0.7.1 not 0.7.2, we set our default version accordingly.
|
|
19
|
+
*/
|
|
20
|
+
declare const DEFAULT_VERSION = GpVersion.V0_7_1;
|
|
17
21
|
declare let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
|
|
18
22
|
declare let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
|
|
19
23
|
|
|
@@ -85,8 +89,8 @@ declare class Compatibility {
|
|
|
85
89
|
/**
|
|
86
90
|
* Allows selecting different values for different Gray Paper versions from one record.
|
|
87
91
|
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
92
|
+
* fallback The default value to return if no value is found for the current.
|
|
93
|
+
* versions A record mapping versions to values, checking if the version is greater or equal to the current version.
|
|
90
94
|
* @returns The value for the current version, or the default value.
|
|
91
95
|
*/
|
|
92
96
|
static selectIfGreaterOrEqual<T>({
|
|
@@ -274,7 +278,7 @@ declare const workspacePathFix =
|
|
|
274
278
|
: () => (p: string) => p;
|
|
275
279
|
|
|
276
280
|
/**
|
|
277
|
-
*
|
|
281
|
+
* `Opaque<Type, Token>` constructs a unique type which is a subset of Type with a
|
|
278
282
|
* specified unique token Token. It means that base type cannot be assigned to unique type by accident.
|
|
279
283
|
* Good examples of opaque types include:
|
|
280
284
|
* - JWTs or other tokens - these are special kinds of string used for authorization purposes.
|
|
@@ -431,7 +435,7 @@ declare const Result$2 = {
|
|
|
431
435
|
// - https://onnxruntime.ai/docs/tutorials/web/large-models.html#maximum-size-of-arraybuffer
|
|
432
436
|
declare const MAX_LENGTH$1 = 2145386496;
|
|
433
437
|
|
|
434
|
-
declare function safeAllocUint8Array(length: number) {
|
|
438
|
+
declare function safeAllocUint8Array(length: number): Uint8Array {
|
|
435
439
|
if (length > MAX_LENGTH) {
|
|
436
440
|
// biome-ignore lint/suspicious/noConsole: can't have a dependency on logger here
|
|
437
441
|
console.warn(`Trying to allocate ${length} bytes, which is greater than the maximum of ${MAX_LENGTH}.`);
|
|
@@ -731,61 +735,61 @@ declare function isResult(x: unknown): x is Result$2<unknown, unknown> {
|
|
|
731
735
|
* as an afterthought.
|
|
732
736
|
*/
|
|
733
737
|
|
|
734
|
-
declare const index$
|
|
735
|
-
declare const index$
|
|
736
|
-
declare const index$
|
|
737
|
-
type index$
|
|
738
|
-
declare const index$
|
|
739
|
-
declare const index$
|
|
740
|
-
declare const index$
|
|
741
|
-
type index$
|
|
742
|
-
type index$
|
|
743
|
-
type index$
|
|
744
|
-
type index$
|
|
745
|
-
declare const index$
|
|
746
|
-
type index$
|
|
747
|
-
declare const index$
|
|
748
|
-
type index$
|
|
749
|
-
type index$
|
|
750
|
-
type index$
|
|
751
|
-
type index$
|
|
752
|
-
declare const index$
|
|
753
|
-
type index$
|
|
754
|
-
declare const index$
|
|
755
|
-
type index$
|
|
756
|
-
type index$
|
|
757
|
-
declare const index$
|
|
758
|
-
type index$
|
|
759
|
-
type index$
|
|
760
|
-
type index$
|
|
761
|
-
declare const index$
|
|
762
|
-
type index$
|
|
763
|
-
declare const index$
|
|
764
|
-
declare const index$
|
|
765
|
-
declare const index$
|
|
766
|
-
declare const index$
|
|
767
|
-
declare const index$
|
|
768
|
-
declare const index$
|
|
769
|
-
declare const index$
|
|
770
|
-
declare const index$
|
|
771
|
-
declare const index$
|
|
772
|
-
declare const index$
|
|
773
|
-
declare const index$
|
|
774
|
-
declare const index$
|
|
775
|
-
declare const index$
|
|
776
|
-
declare const index$
|
|
777
|
-
declare const index$
|
|
778
|
-
declare const index$
|
|
779
|
-
declare const index$
|
|
780
|
-
declare const index$
|
|
781
|
-
declare const index$
|
|
782
|
-
declare const index$
|
|
783
|
-
declare const index$
|
|
784
|
-
declare const index$
|
|
785
|
-
declare const index$
|
|
786
|
-
declare namespace index$
|
|
787
|
-
export { index$
|
|
788
|
-
export type { index$
|
|
738
|
+
declare const index$u_ALL_VERSIONS_IN_ORDER: typeof ALL_VERSIONS_IN_ORDER;
|
|
739
|
+
declare const index$u_CURRENT_SUITE: typeof CURRENT_SUITE;
|
|
740
|
+
declare const index$u_CURRENT_VERSION: typeof CURRENT_VERSION;
|
|
741
|
+
type index$u_Compatibility = Compatibility;
|
|
742
|
+
declare const index$u_Compatibility: typeof Compatibility;
|
|
743
|
+
declare const index$u_DEFAULT_SUITE: typeof DEFAULT_SUITE;
|
|
744
|
+
declare const index$u_DEFAULT_VERSION: typeof DEFAULT_VERSION;
|
|
745
|
+
type index$u_DeepEqualOptions = DeepEqualOptions;
|
|
746
|
+
type index$u_EnumMapping = EnumMapping;
|
|
747
|
+
type index$u_ErrorResult<Error> = ErrorResult<Error>;
|
|
748
|
+
type index$u_ErrorsCollector = ErrorsCollector;
|
|
749
|
+
declare const index$u_ErrorsCollector: typeof ErrorsCollector;
|
|
750
|
+
type index$u_GpVersion = GpVersion;
|
|
751
|
+
declare const index$u_GpVersion: typeof GpVersion;
|
|
752
|
+
type index$u_OK = OK;
|
|
753
|
+
type index$u_OkResult<Ok> = OkResult<Ok>;
|
|
754
|
+
type index$u_Opaque<Type, Token extends string> = Opaque<Type, Token>;
|
|
755
|
+
type index$u_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
|
|
756
|
+
declare const index$u_RichTaggedError: typeof RichTaggedError;
|
|
757
|
+
type index$u_StringLiteral<Type> = StringLiteral<Type>;
|
|
758
|
+
declare const index$u_TEST_COMPARE_USING: typeof TEST_COMPARE_USING;
|
|
759
|
+
type index$u_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
|
|
760
|
+
type index$u_TestSuite = TestSuite;
|
|
761
|
+
declare const index$u_TestSuite: typeof TestSuite;
|
|
762
|
+
type index$u_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
|
|
763
|
+
type index$u_Uninstantiable = Uninstantiable;
|
|
764
|
+
type index$u_WithDebug = WithDebug;
|
|
765
|
+
declare const index$u_WithDebug: typeof WithDebug;
|
|
766
|
+
type index$u_WithOpaque<Token extends string> = WithOpaque<Token>;
|
|
767
|
+
declare const index$u___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
|
|
768
|
+
declare const index$u_asOpaqueType: typeof asOpaqueType;
|
|
769
|
+
declare const index$u_assertEmpty: typeof assertEmpty;
|
|
770
|
+
declare const index$u_assertNever: typeof assertNever;
|
|
771
|
+
declare const index$u_callCompareFunction: typeof callCompareFunction;
|
|
772
|
+
declare const index$u_check: typeof check;
|
|
773
|
+
declare const index$u_deepEqual: typeof deepEqual;
|
|
774
|
+
declare const index$u_getAllKeysSorted: typeof getAllKeysSorted;
|
|
775
|
+
declare const index$u_inspect: typeof inspect;
|
|
776
|
+
declare const index$u_isBrowser: typeof isBrowser;
|
|
777
|
+
declare const index$u_isResult: typeof isResult;
|
|
778
|
+
declare const index$u_isTaggedError: typeof isTaggedError;
|
|
779
|
+
declare const index$u_lazyInspect: typeof lazyInspect;
|
|
780
|
+
declare const index$u_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
|
|
781
|
+
declare const index$u_measure: typeof measure;
|
|
782
|
+
declare const index$u_oomWarningPrinted: typeof oomWarningPrinted;
|
|
783
|
+
declare const index$u_parseCurrentSuite: typeof parseCurrentSuite;
|
|
784
|
+
declare const index$u_parseCurrentVersion: typeof parseCurrentVersion;
|
|
785
|
+
declare const index$u_resultToString: typeof resultToString;
|
|
786
|
+
declare const index$u_safeAllocUint8Array: typeof safeAllocUint8Array;
|
|
787
|
+
declare const index$u_seeThrough: typeof seeThrough;
|
|
788
|
+
declare const index$u_trimStack: typeof trimStack;
|
|
789
|
+
declare const index$u_workspacePathFix: typeof workspacePathFix;
|
|
790
|
+
declare namespace index$u {
|
|
791
|
+
export { index$u_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$u_CURRENT_SUITE as CURRENT_SUITE, index$u_CURRENT_VERSION as CURRENT_VERSION, index$u_Compatibility as Compatibility, index$u_DEFAULT_SUITE as DEFAULT_SUITE, index$u_DEFAULT_VERSION as DEFAULT_VERSION, index$u_ErrorsCollector as ErrorsCollector, index$u_GpVersion as GpVersion, MAX_LENGTH$1 as MAX_LENGTH, Result$2 as Result, index$u_RichTaggedError as RichTaggedError, index$u_TEST_COMPARE_USING as TEST_COMPARE_USING, index$u_TestSuite as TestSuite, index$u_WithDebug as WithDebug, index$u___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$u_asOpaqueType as asOpaqueType, index$u_assertEmpty as assertEmpty, index$u_assertNever as assertNever, index$u_callCompareFunction as callCompareFunction, index$u_check as check, index$u_deepEqual as deepEqual, index$u_getAllKeysSorted as getAllKeysSorted, index$u_inspect as inspect, index$u_isBrowser as isBrowser, index$u_isResult as isResult, index$u_isTaggedError as isTaggedError, index$u_lazyInspect as lazyInspect, index$u_maybeTaggedErrorToString as maybeTaggedErrorToString, index$u_measure as measure, index$u_oomWarningPrinted as oomWarningPrinted, index$u_parseCurrentSuite as parseCurrentSuite, index$u_parseCurrentVersion as parseCurrentVersion, index$u_resultToString as resultToString, index$u_safeAllocUint8Array as safeAllocUint8Array, index$u_seeThrough as seeThrough, index$u_trimStack as trimStack, index$u_workspacePathFix as workspacePathFix };
|
|
792
|
+
export type { index$u_DeepEqualOptions as DeepEqualOptions, index$u_EnumMapping as EnumMapping, index$u_ErrorResult as ErrorResult, index$u_OK as OK, index$u_OkResult as OkResult, index$u_Opaque as Opaque, index$u_StringLiteral as StringLiteral, index$u_TaggedError as TaggedError, index$u_TokenOf as TokenOf, index$u_Uninstantiable as Uninstantiable, index$u_WithOpaque as WithOpaque };
|
|
789
793
|
}
|
|
790
794
|
|
|
791
795
|
/** A return value of some comparator. */
|
|
@@ -838,14 +842,14 @@ declare class Ordering {
|
|
|
838
842
|
*/
|
|
839
843
|
type Comparator<V> = (self: V, other: V) => Ordering;
|
|
840
844
|
|
|
841
|
-
type index$
|
|
842
|
-
type index$
|
|
843
|
-
declare const index$
|
|
844
|
-
type index$
|
|
845
|
-
declare const index$
|
|
846
|
-
declare namespace index$
|
|
847
|
-
export { index$
|
|
848
|
-
export type { index$
|
|
845
|
+
type index$t_Comparator<V> = Comparator<V>;
|
|
846
|
+
type index$t_Ordering = Ordering;
|
|
847
|
+
declare const index$t_Ordering: typeof Ordering;
|
|
848
|
+
type index$t_OrderingValue = OrderingValue;
|
|
849
|
+
declare const index$t_OrderingValue: typeof OrderingValue;
|
|
850
|
+
declare namespace index$t {
|
|
851
|
+
export { index$t_Ordering as Ordering, index$t_OrderingValue as OrderingValue };
|
|
852
|
+
export type { index$t_Comparator as Comparator };
|
|
849
853
|
}
|
|
850
854
|
|
|
851
855
|
// TODO: [MaSo] Update BytesBlob and Bytes, so they return Result (not throw error)
|
|
@@ -1004,7 +1008,7 @@ declare class BytesBlob {
|
|
|
1004
1008
|
*
|
|
1005
1009
|
* Last chunk might be smaller than `size`.
|
|
1006
1010
|
*/
|
|
1007
|
-
*chunks(size: number): Generator<BytesBlob> {
|
|
1011
|
+
*chunks(size: number): Generator<BytesBlob, undefined, void> {
|
|
1008
1012
|
for (let i = 0; i < this.length; i += size) {
|
|
1009
1013
|
yield BytesBlob.blobFrom(this.raw.subarray(i, i + size));
|
|
1010
1014
|
}
|
|
@@ -1239,41 +1243,41 @@ declare class BitVec {
|
|
|
1239
1243
|
}
|
|
1240
1244
|
}
|
|
1241
1245
|
|
|
1242
|
-
type index$
|
|
1243
|
-
declare const index$
|
|
1244
|
-
type index$
|
|
1245
|
-
declare const index$
|
|
1246
|
-
type index$
|
|
1247
|
-
declare const index$
|
|
1248
|
-
declare const index$
|
|
1249
|
-
declare const index$
|
|
1250
|
-
declare const index$
|
|
1251
|
-
declare const index$
|
|
1252
|
-
declare const index$
|
|
1253
|
-
declare const index$
|
|
1254
|
-
declare const index$
|
|
1255
|
-
declare const index$
|
|
1256
|
-
declare const index$
|
|
1257
|
-
declare const index$
|
|
1258
|
-
declare const index$
|
|
1259
|
-
declare const index$
|
|
1260
|
-
declare namespace index$
|
|
1246
|
+
type index$s_BitVec = BitVec;
|
|
1247
|
+
declare const index$s_BitVec: typeof BitVec;
|
|
1248
|
+
type index$s_Bytes<T extends number> = Bytes<T>;
|
|
1249
|
+
declare const index$s_Bytes: typeof Bytes;
|
|
1250
|
+
type index$s_BytesBlob = BytesBlob;
|
|
1251
|
+
declare const index$s_BytesBlob: typeof BytesBlob;
|
|
1252
|
+
declare const index$s_CODE_OF_0: typeof CODE_OF_0;
|
|
1253
|
+
declare const index$s_CODE_OF_9: typeof CODE_OF_9;
|
|
1254
|
+
declare const index$s_CODE_OF_A: typeof CODE_OF_A;
|
|
1255
|
+
declare const index$s_CODE_OF_F: typeof CODE_OF_F;
|
|
1256
|
+
declare const index$s_CODE_OF_a: typeof CODE_OF_a;
|
|
1257
|
+
declare const index$s_CODE_OF_f: typeof CODE_OF_f;
|
|
1258
|
+
declare const index$s_VALUE_OF_A: typeof VALUE_OF_A;
|
|
1259
|
+
declare const index$s_byteFromString: typeof byteFromString;
|
|
1260
|
+
declare const index$s_bytesBlobComparator: typeof bytesBlobComparator;
|
|
1261
|
+
declare const index$s_bytesToHexString: typeof bytesToHexString;
|
|
1262
|
+
declare const index$s_numberFromCharCode: typeof numberFromCharCode;
|
|
1263
|
+
declare const index$s_u8ArraySameLengthEqual: typeof u8ArraySameLengthEqual;
|
|
1264
|
+
declare namespace index$s {
|
|
1261
1265
|
export {
|
|
1262
|
-
index$
|
|
1263
|
-
index$
|
|
1264
|
-
index$
|
|
1265
|
-
index$
|
|
1266
|
-
index$
|
|
1267
|
-
index$
|
|
1268
|
-
index$
|
|
1269
|
-
index$
|
|
1270
|
-
index$
|
|
1271
|
-
index$
|
|
1272
|
-
index$
|
|
1273
|
-
index$
|
|
1274
|
-
index$
|
|
1275
|
-
index$
|
|
1276
|
-
index$
|
|
1266
|
+
index$s_BitVec as BitVec,
|
|
1267
|
+
index$s_Bytes as Bytes,
|
|
1268
|
+
index$s_BytesBlob as BytesBlob,
|
|
1269
|
+
index$s_CODE_OF_0 as CODE_OF_0,
|
|
1270
|
+
index$s_CODE_OF_9 as CODE_OF_9,
|
|
1271
|
+
index$s_CODE_OF_A as CODE_OF_A,
|
|
1272
|
+
index$s_CODE_OF_F as CODE_OF_F,
|
|
1273
|
+
index$s_CODE_OF_a as CODE_OF_a,
|
|
1274
|
+
index$s_CODE_OF_f as CODE_OF_f,
|
|
1275
|
+
index$s_VALUE_OF_A as VALUE_OF_A,
|
|
1276
|
+
index$s_byteFromString as byteFromString,
|
|
1277
|
+
index$s_bytesBlobComparator as bytesBlobComparator,
|
|
1278
|
+
index$s_bytesToHexString as bytesToHexString,
|
|
1279
|
+
index$s_numberFromCharCode as numberFromCharCode,
|
|
1280
|
+
index$s_u8ArraySameLengthEqual as u8ArraySameLengthEqual,
|
|
1277
1281
|
};
|
|
1278
1282
|
}
|
|
1279
1283
|
|
|
@@ -1418,37 +1422,37 @@ declare const minU64 = (a: U64, ...values: U64[]): U64 => values.reduce((min, va
|
|
|
1418
1422
|
/** Get the biggest value between U64 a and values given as input parameters. */
|
|
1419
1423
|
declare const maxU64 = (a: U64, ...values: U64[]): U64 => values.reduce((max, value) => (value < max ? max : value), a);
|
|
1420
1424
|
|
|
1421
|
-
type index$
|
|
1422
|
-
declare const index$
|
|
1423
|
-
declare const index$
|
|
1424
|
-
declare const index$
|
|
1425
|
-
declare const index$
|
|
1426
|
-
type index$
|
|
1427
|
-
type index$
|
|
1428
|
-
type index$
|
|
1429
|
-
type index$
|
|
1430
|
-
type index$
|
|
1431
|
-
declare const index$
|
|
1432
|
-
declare const index$
|
|
1433
|
-
declare const index$
|
|
1434
|
-
declare const index$
|
|
1435
|
-
declare const index$
|
|
1436
|
-
declare const index$
|
|
1437
|
-
declare const index$
|
|
1438
|
-
declare const index$
|
|
1439
|
-
declare const index$
|
|
1440
|
-
declare const index$
|
|
1441
|
-
declare const index$
|
|
1442
|
-
declare const index$
|
|
1443
|
-
declare const index$
|
|
1444
|
-
declare const index$
|
|
1445
|
-
declare const index$
|
|
1446
|
-
declare const index$
|
|
1447
|
-
declare const index$
|
|
1448
|
-
declare const index$
|
|
1449
|
-
declare namespace index$
|
|
1450
|
-
export { index$
|
|
1451
|
-
export type { index$
|
|
1425
|
+
type index$r_FixedSizeNumber<Bytes extends number> = FixedSizeNumber<Bytes>;
|
|
1426
|
+
declare const index$r_MAX_VALUE_U16: typeof MAX_VALUE_U16;
|
|
1427
|
+
declare const index$r_MAX_VALUE_U32: typeof MAX_VALUE_U32;
|
|
1428
|
+
declare const index$r_MAX_VALUE_U64: typeof MAX_VALUE_U64;
|
|
1429
|
+
declare const index$r_MAX_VALUE_U8: typeof MAX_VALUE_U8;
|
|
1430
|
+
type index$r_U16 = U16;
|
|
1431
|
+
type index$r_U32 = U32;
|
|
1432
|
+
type index$r_U64 = U64;
|
|
1433
|
+
type index$r_U8 = U8;
|
|
1434
|
+
type index$r_WithBytesRepresentation<Bytes extends number> = WithBytesRepresentation<Bytes>;
|
|
1435
|
+
declare const index$r___REPRESENTATION_BYTES__: typeof __REPRESENTATION_BYTES__;
|
|
1436
|
+
declare const index$r_asTypedNumber: typeof asTypedNumber;
|
|
1437
|
+
declare const index$r_isU16: typeof isU16;
|
|
1438
|
+
declare const index$r_isU32: typeof isU32;
|
|
1439
|
+
declare const index$r_isU64: typeof isU64;
|
|
1440
|
+
declare const index$r_isU8: typeof isU8;
|
|
1441
|
+
declare const index$r_leBytesAsU32: typeof leBytesAsU32;
|
|
1442
|
+
declare const index$r_maxU64: typeof maxU64;
|
|
1443
|
+
declare const index$r_minU64: typeof minU64;
|
|
1444
|
+
declare const index$r_sumU32: typeof sumU32;
|
|
1445
|
+
declare const index$r_sumU64: typeof sumU64;
|
|
1446
|
+
declare const index$r_tryAsU16: typeof tryAsU16;
|
|
1447
|
+
declare const index$r_tryAsU32: typeof tryAsU32;
|
|
1448
|
+
declare const index$r_tryAsU64: typeof tryAsU64;
|
|
1449
|
+
declare const index$r_tryAsU8: typeof tryAsU8;
|
|
1450
|
+
declare const index$r_u32AsLeBytes: typeof u32AsLeBytes;
|
|
1451
|
+
declare const index$r_u64FromParts: typeof u64FromParts;
|
|
1452
|
+
declare const index$r_u64IntoParts: typeof u64IntoParts;
|
|
1453
|
+
declare namespace index$r {
|
|
1454
|
+
export { index$r_MAX_VALUE_U16 as MAX_VALUE_U16, index$r_MAX_VALUE_U32 as MAX_VALUE_U32, index$r_MAX_VALUE_U64 as MAX_VALUE_U64, index$r_MAX_VALUE_U8 as MAX_VALUE_U8, index$r___REPRESENTATION_BYTES__ as __REPRESENTATION_BYTES__, index$r_asTypedNumber as asTypedNumber, index$r_isU16 as isU16, index$r_isU32 as isU32, index$r_isU64 as isU64, index$r_isU8 as isU8, index$r_leBytesAsU32 as leBytesAsU32, index$r_maxU64 as maxU64, index$r_minU64 as minU64, index$r_sumU32 as sumU32, index$r_sumU64 as sumU64, index$r_tryAsU16 as tryAsU16, index$r_tryAsU32 as tryAsU32, index$r_tryAsU64 as tryAsU64, index$r_tryAsU8 as tryAsU8, index$r_u32AsLeBytes as u32AsLeBytes, index$r_u64FromParts as u64FromParts, index$r_u64IntoParts as u64IntoParts };
|
|
1455
|
+
export type { index$r_FixedSizeNumber as FixedSizeNumber, Result$1 as Result, index$r_U16 as U16, index$r_U32 as U32, index$r_U64 as U64, index$r_U8 as U8, index$r_WithBytesRepresentation as WithBytesRepresentation };
|
|
1452
1456
|
}
|
|
1453
1457
|
|
|
1454
1458
|
/** A decoder for some specific type `T` */
|
|
@@ -2435,10 +2439,10 @@ type ClassConstructor<T> = {
|
|
|
2435
2439
|
type Codec<T> = Encode<T> & Decode<T>;
|
|
2436
2440
|
|
|
2437
2441
|
/** A codec descriptor with extra view. */
|
|
2438
|
-
|
|
2442
|
+
interface CodecWithView<T, V> extends Codec<T> {
|
|
2439
2443
|
/** encoded data view codec. */
|
|
2440
2444
|
View: Codec<V>;
|
|
2441
|
-
}
|
|
2445
|
+
}
|
|
2442
2446
|
|
|
2443
2447
|
/**
|
|
2444
2448
|
* Type descriptor definition.
|
|
@@ -3470,53 +3474,53 @@ declare function sequenceViewFixLen<T, V>(
|
|
|
3470
3474
|
);
|
|
3471
3475
|
}
|
|
3472
3476
|
|
|
3473
|
-
type index$
|
|
3474
|
-
type index$
|
|
3475
|
-
type index$
|
|
3476
|
-
type index$
|
|
3477
|
-
declare const index$
|
|
3478
|
-
type index$
|
|
3479
|
-
type index$
|
|
3480
|
-
declare const index$
|
|
3481
|
-
type index$
|
|
3482
|
-
type index$
|
|
3483
|
-
declare const index$
|
|
3484
|
-
type index$
|
|
3485
|
-
type index$
|
|
3486
|
-
type index$
|
|
3487
|
-
declare const index$
|
|
3488
|
-
type index$
|
|
3489
|
-
declare const index$
|
|
3490
|
-
type index$
|
|
3491
|
-
declare const index$
|
|
3492
|
-
declare const index$
|
|
3493
|
-
type index$
|
|
3494
|
-
declare const index$
|
|
3495
|
-
type index$
|
|
3496
|
-
type index$
|
|
3497
|
-
type index$
|
|
3498
|
-
declare const index$
|
|
3499
|
-
type index$
|
|
3500
|
-
type index$
|
|
3501
|
-
declare const index$
|
|
3502
|
-
declare const index$
|
|
3503
|
-
type index$
|
|
3504
|
-
declare const index$
|
|
3505
|
-
type index$
|
|
3506
|
-
declare const index$
|
|
3507
|
-
declare const index$
|
|
3508
|
-
declare const index$
|
|
3509
|
-
declare const index$
|
|
3510
|
-
declare const index$
|
|
3511
|
-
declare const index$
|
|
3512
|
-
declare const index$
|
|
3513
|
-
declare const index$
|
|
3514
|
-
declare const index$
|
|
3515
|
-
declare const index$
|
|
3516
|
-
declare const index$
|
|
3517
|
-
declare namespace index$
|
|
3518
|
-
export { index$
|
|
3519
|
-
export type { index$
|
|
3477
|
+
type index$q_ClassConstructor<T> = ClassConstructor<T>;
|
|
3478
|
+
type index$q_Codec<T> = Codec<T>;
|
|
3479
|
+
type index$q_CodecRecord<T> = CodecRecord<T>;
|
|
3480
|
+
type index$q_CodecWithView<T, V> = CodecWithView<T, V>;
|
|
3481
|
+
declare const index$q_DEFAULT_START_LENGTH: typeof DEFAULT_START_LENGTH;
|
|
3482
|
+
type index$q_Decode<T> = Decode<T>;
|
|
3483
|
+
type index$q_Decoder = Decoder;
|
|
3484
|
+
declare const index$q_Decoder: typeof Decoder;
|
|
3485
|
+
type index$q_DescribedBy<T> = DescribedBy<T>;
|
|
3486
|
+
type index$q_Descriptor<T, V = T> = Descriptor<T, V>;
|
|
3487
|
+
declare const index$q_Descriptor: typeof Descriptor;
|
|
3488
|
+
type index$q_DescriptorRecord<T> = DescriptorRecord<T>;
|
|
3489
|
+
type index$q_Encode<T> = Encode<T>;
|
|
3490
|
+
type index$q_Encoder = Encoder;
|
|
3491
|
+
declare const index$q_Encoder: typeof Encoder;
|
|
3492
|
+
type index$q_EndOfDataError = EndOfDataError;
|
|
3493
|
+
declare const index$q_EndOfDataError: typeof EndOfDataError;
|
|
3494
|
+
type index$q_LengthRange = LengthRange;
|
|
3495
|
+
declare const index$q_MASKS: typeof MASKS;
|
|
3496
|
+
declare const index$q_MAX_LENGTH: typeof MAX_LENGTH;
|
|
3497
|
+
type index$q_ObjectView<T> = ObjectView<T>;
|
|
3498
|
+
declare const index$q_ObjectView: typeof ObjectView;
|
|
3499
|
+
type index$q_OptionalRecord<T> = OptionalRecord<T>;
|
|
3500
|
+
type index$q_PropertyKeys<T> = PropertyKeys<T>;
|
|
3501
|
+
type index$q_SequenceView<T, V = T> = SequenceView<T, V>;
|
|
3502
|
+
declare const index$q_SequenceView: typeof SequenceView;
|
|
3503
|
+
type index$q_SimpleDescriptorRecord<T> = SimpleDescriptorRecord<T>;
|
|
3504
|
+
type index$q_SizeHint = SizeHint;
|
|
3505
|
+
declare const index$q_TYPICAL_DICTIONARY_LENGTH: typeof TYPICAL_DICTIONARY_LENGTH;
|
|
3506
|
+
declare const index$q_TYPICAL_SEQUENCE_LENGTH: typeof TYPICAL_SEQUENCE_LENGTH;
|
|
3507
|
+
type index$q_ViewField<T, V> = ViewField<T, V>;
|
|
3508
|
+
declare const index$q_ViewField: typeof ViewField;
|
|
3509
|
+
type index$q_ViewOf<T, D extends DescriptorRecord<T>> = ViewOf<T, D>;
|
|
3510
|
+
declare const index$q_addSizeHints: typeof addSizeHints;
|
|
3511
|
+
declare const index$q_decodeVariableLengthExtraBytes: typeof decodeVariableLengthExtraBytes;
|
|
3512
|
+
declare const index$q_exactHint: typeof exactHint;
|
|
3513
|
+
declare const index$q_forEachDescriptor: typeof forEachDescriptor;
|
|
3514
|
+
declare const index$q_hasUniqueView: typeof hasUniqueView;
|
|
3515
|
+
declare const index$q_objectView: typeof objectView;
|
|
3516
|
+
declare const index$q_readonlyArray: typeof readonlyArray;
|
|
3517
|
+
declare const index$q_sequenceViewFixLen: typeof sequenceViewFixLen;
|
|
3518
|
+
declare const index$q_sequenceViewVarLen: typeof sequenceViewVarLen;
|
|
3519
|
+
declare const index$q_tryAsExactBytes: typeof tryAsExactBytes;
|
|
3520
|
+
declare const index$q_validateLength: typeof validateLength;
|
|
3521
|
+
declare namespace index$q {
|
|
3522
|
+
export { index$q_DEFAULT_START_LENGTH as DEFAULT_START_LENGTH, index$q_Decoder as Decoder, index$q_Descriptor as Descriptor, index$q_Encoder as Encoder, index$q_EndOfDataError as EndOfDataError, index$q_MASKS as MASKS, index$q_MAX_LENGTH as MAX_LENGTH, index$q_ObjectView as ObjectView, index$q_SequenceView as SequenceView, index$q_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, index$q_TYPICAL_SEQUENCE_LENGTH as TYPICAL_SEQUENCE_LENGTH, index$q_ViewField as ViewField, index$q_addSizeHints as addSizeHints, codec$1 as codec, index$q_decodeVariableLengthExtraBytes as decodeVariableLengthExtraBytes, index$q_exactHint as exactHint, index$q_forEachDescriptor as forEachDescriptor, index$q_hasUniqueView as hasUniqueView, index$q_objectView as objectView, index$q_readonlyArray as readonlyArray, index$q_sequenceViewFixLen as sequenceViewFixLen, index$q_sequenceViewVarLen as sequenceViewVarLen, index$q_tryAsExactBytes as tryAsExactBytes, index$q_validateLength as validateLength };
|
|
3523
|
+
export type { index$q_ClassConstructor as ClassConstructor, index$q_Codec as Codec, index$q_CodecRecord as CodecRecord, index$q_CodecWithView as CodecWithView, index$q_Decode as Decode, index$q_DescribedBy as DescribedBy, index$q_DescriptorRecord as DescriptorRecord, index$q_Encode as Encode, index$q_LengthRange as LengthRange, index$q_OptionalRecord as OptionalRecord, Options$1 as Options, index$q_PropertyKeys as PropertyKeys, index$q_SimpleDescriptorRecord as SimpleDescriptorRecord, index$q_SizeHint as SizeHint, index$q_ViewOf as ViewOf };
|
|
3520
3524
|
}
|
|
3521
3525
|
|
|
3522
3526
|
/**
|
|
@@ -3566,6 +3570,497 @@ declare class ArrayView<T> implements Iterable<T> {
|
|
|
3566
3570
|
}
|
|
3567
3571
|
}
|
|
3568
3572
|
|
|
3573
|
+
/** A map which uses byte blobs as keys */
|
|
3574
|
+
declare class BlobDictionary<K extends BytesBlob, V> extends WithDebug {
|
|
3575
|
+
/**
|
|
3576
|
+
* The root node of the dictionary.
|
|
3577
|
+
*
|
|
3578
|
+
* This is the main internal data structure that organizes entries
|
|
3579
|
+
* in a tree-like fashion (array-based nodes up to `mapNodeThreshold`,
|
|
3580
|
+
* map-based nodes beyond it). All insertions, updates, and deletions
|
|
3581
|
+
* operate through this structure.
|
|
3582
|
+
*/
|
|
3583
|
+
private root: Node<K, V> = Node.withList();
|
|
3584
|
+
|
|
3585
|
+
/**
|
|
3586
|
+
* Auxiliary map that stores references to the original keys and their values.
|
|
3587
|
+
*
|
|
3588
|
+
* - Overriding a value in the main structure does not replace the original key reference.
|
|
3589
|
+
* - Used for efficient iteration over `keys()`, `values()`, `entries()`, and computing `size`.
|
|
3590
|
+
*/
|
|
3591
|
+
private keyvals: Map<K, Leaf<K, V>> = new Map();
|
|
3592
|
+
|
|
3593
|
+
/**
|
|
3594
|
+
* Protected constructor used internally by `BlobDictionary.new`
|
|
3595
|
+
* and `BlobDictionary.fromEntries`.
|
|
3596
|
+
*
|
|
3597
|
+
* This enforces controlled instantiation — users should create instances
|
|
3598
|
+
* through the provided static factory methods instead of calling the
|
|
3599
|
+
* constructor directly.
|
|
3600
|
+
*
|
|
3601
|
+
* @param mapNodeThreshold - The threshold that determines when the dictionary
|
|
3602
|
+
* switches from using an array-based (`ListChildren`) node to a map-based (`MapChildren`) node for storing entries.
|
|
3603
|
+
*/
|
|
3604
|
+
protected constructor(private mapNodeThreshold: number) {
|
|
3605
|
+
super();
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
/**
|
|
3609
|
+
* Returns the number of entries in the dictionary.
|
|
3610
|
+
*
|
|
3611
|
+
* The count is derived from the auxiliary `keyvals` map, which stores
|
|
3612
|
+
* all original key references and their associated values. This ensures
|
|
3613
|
+
* that the `size` reflects the actual number of entries, independent of
|
|
3614
|
+
* internal overrides in the main `root` structure.
|
|
3615
|
+
*
|
|
3616
|
+
* @returns The total number of entries in the dictionary.
|
|
3617
|
+
*/
|
|
3618
|
+
get size(): number {
|
|
3619
|
+
return this.keyvals.size;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
[TEST_COMPARE_USING]() {
|
|
3623
|
+
const vals: [K, V][] = Array.from(this);
|
|
3624
|
+
vals.sort((a, b) => a[0].compare(b[0]).value);
|
|
3625
|
+
return vals;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* Creates an empty `BlobDictionary`.
|
|
3630
|
+
*
|
|
3631
|
+
* @param mapNodeThreshold - The threshold that determines when the dictionary
|
|
3632
|
+
* switches from using an array-based (`ListChildren`) node to a map-based (`MapChildren`) node for storing entries.
|
|
3633
|
+
* Defaults to `0`.
|
|
3634
|
+
*
|
|
3635
|
+
* @returns A new, empty `BlobDictionary` instance.
|
|
3636
|
+
*/
|
|
3637
|
+
static new<K extends BytesBlob, V>(mapNodeThreshold = 0) {
|
|
3638
|
+
return new BlobDictionary<K, V>(mapNodeThreshold);
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Creates a new `BlobDictionary` initialized with the given entries.
|
|
3643
|
+
*
|
|
3644
|
+
* @param entries - An array of `[key, value]` pairs used to populate the dictionary.
|
|
3645
|
+
* @param mapNodeThreshold - The threshold that determines when the dictionary
|
|
3646
|
+
* switches from using an array-based (`ListChildren`) node to a map-based (`MapChildren`) node for storing entries.
|
|
3647
|
+
* Defaults to `0`.
|
|
3648
|
+
*
|
|
3649
|
+
* @returns A new `BlobDictionary` containing the provided entries.
|
|
3650
|
+
*/
|
|
3651
|
+
static fromEntries<K extends BytesBlob, V>(entries: [K, V][], mapNodeThreshold?: number): BlobDictionary<K, V> {
|
|
3652
|
+
const dict = BlobDictionary.new<K, V>(mapNodeThreshold);
|
|
3653
|
+
for (const [key, value] of entries) {
|
|
3654
|
+
dict.set(key, value);
|
|
3655
|
+
}
|
|
3656
|
+
return dict;
|
|
3657
|
+
}
|
|
3658
|
+
/**
|
|
3659
|
+
* Internal helper that inserts, updates or deletes an entry in the dictionary.
|
|
3660
|
+
*
|
|
3661
|
+
* Behaviour details:
|
|
3662
|
+
* - Passing `undefined` as `value` indicates a deletion. (E.g. `delete` uses `internalSet(key, undefined)`.)
|
|
3663
|
+
* - When an add (new entry) or a delete actually changes the structure, the method returns the affected leaf node.
|
|
3664
|
+
* - When the call only overrides an existing value (no structural add/delete), the method returns `null`.
|
|
3665
|
+
*
|
|
3666
|
+
* This method is intended for internal use by the dictionary implementation and allows `undefined` as a
|
|
3667
|
+
* sentinel value to signal removals.
|
|
3668
|
+
*
|
|
3669
|
+
* @param key - The key to insert, update or remove.
|
|
3670
|
+
* @param value - The value to associate with the key, or `undefined` to remove the key.
|
|
3671
|
+
* @returns The leaf node created or removed on add/delete, or `null` if the operation only overwrote an existing value.
|
|
3672
|
+
*/
|
|
3673
|
+
private internalSet(key: K, value: V | undefined): Leaf<K, V> | null {
|
|
3674
|
+
let node: Node<K, V> = this.root;
|
|
3675
|
+
const keyChunkGenerator = key.chunks(CHUNK_SIZE);
|
|
3676
|
+
let depth = 0;
|
|
3677
|
+
|
|
3678
|
+
for (;;) {
|
|
3679
|
+
const maybeKeyChunk = keyChunkGenerator.next().value;
|
|
3680
|
+
if (maybeKeyChunk === undefined) {
|
|
3681
|
+
if (value === undefined) {
|
|
3682
|
+
return node.remove(key);
|
|
3683
|
+
}
|
|
3684
|
+
return node.set(key, value);
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
const keyChunk: KeyChunk = asOpaqueType(maybeKeyChunk);
|
|
3688
|
+
|
|
3689
|
+
if (node.children instanceof ListChildren) {
|
|
3690
|
+
const subkey = BytesBlob.blobFrom(key.raw.subarray(CHUNK_SIZE * depth));
|
|
3691
|
+
const leaf = value !== undefined ? node.children.insert(subkey, { key, value }) : node.children.remove(subkey);
|
|
3692
|
+
|
|
3693
|
+
if (subkey.length > CHUNK_SIZE && node.children.children.length > this.mapNodeThreshold) {
|
|
3694
|
+
node.convertListChildrenToMap();
|
|
3695
|
+
}
|
|
3696
|
+
return leaf;
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
depth += 1;
|
|
3700
|
+
|
|
3701
|
+
const children = node.children;
|
|
3702
|
+
if (children instanceof ListChildren) {
|
|
3703
|
+
throw new Error("We handle list node earlier. If we fall through, we know it's for the `Map` case.");
|
|
3704
|
+
}
|
|
3705
|
+
|
|
3706
|
+
if (children instanceof MapChildren) {
|
|
3707
|
+
const maybeNode = children.getChild(keyChunk);
|
|
3708
|
+
|
|
3709
|
+
if (maybeNode !== undefined) {
|
|
3710
|
+
// simply go one level deeper
|
|
3711
|
+
node = maybeNode;
|
|
3712
|
+
} else {
|
|
3713
|
+
// we are trying to remove an item, but it does not exist
|
|
3714
|
+
if (value === undefined) {
|
|
3715
|
+
return null;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
// no more child nodes, we insert a new one.
|
|
3719
|
+
const newNode = Node.withList<K, V>();
|
|
3720
|
+
children.setChild(keyChunk, newNode);
|
|
3721
|
+
node = newNode;
|
|
3722
|
+
}
|
|
3723
|
+
continue;
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
assertNever(children);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* Adds a new entry to the dictionary or updates the value of an existing key.
|
|
3732
|
+
*
|
|
3733
|
+
* If an entry with the given key already exists, its value is replaced
|
|
3734
|
+
* with the new one.
|
|
3735
|
+
*
|
|
3736
|
+
* @param key - The key to add or update in the dictionary.
|
|
3737
|
+
* @param value - The value to associate with the specified key.
|
|
3738
|
+
* @returns Nothing (`void`).
|
|
3739
|
+
*/
|
|
3740
|
+
set(key: K, value: V): void {
|
|
3741
|
+
const leaf = this.internalSet(key, value);
|
|
3742
|
+
if (leaf !== null) {
|
|
3743
|
+
this.keyvals.set(leaf.key, leaf);
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3747
|
+
/**
|
|
3748
|
+
* Retrieves the value associated with the given key from the dictionary.
|
|
3749
|
+
*
|
|
3750
|
+
* If the key does not exist, this method returns `undefined`.
|
|
3751
|
+
*
|
|
3752
|
+
* @param key - The key whose associated value should be retrieved.
|
|
3753
|
+
* @returns The value associated with the specified key, or `undefined` if the key is not present.
|
|
3754
|
+
*/
|
|
3755
|
+
get(key: K): V | undefined {
|
|
3756
|
+
let node: MaybeNode<K, V> = this.root;
|
|
3757
|
+
const pathChunksGenerator = key.chunks(CHUNK_SIZE);
|
|
3758
|
+
let depth = 0;
|
|
3759
|
+
|
|
3760
|
+
while (node !== undefined) {
|
|
3761
|
+
const maybePathChunk = pathChunksGenerator.next().value;
|
|
3762
|
+
|
|
3763
|
+
if (node.children instanceof ListChildren) {
|
|
3764
|
+
const subkey = BytesBlob.blobFrom(key.raw.subarray(depth * CHUNK_SIZE));
|
|
3765
|
+
const child = node.children.find(subkey);
|
|
3766
|
+
if (child !== null) {
|
|
3767
|
+
return child.value;
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
if (maybePathChunk === undefined) {
|
|
3772
|
+
return node.getLeaf()?.value;
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
if (node.children instanceof MapChildren) {
|
|
3776
|
+
const pathChunk: KeyChunk = asOpaqueType(maybePathChunk);
|
|
3777
|
+
node = node.children.getChild(pathChunk);
|
|
3778
|
+
depth += 1;
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
return undefined;
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
/**
|
|
3786
|
+
* Checks whether the dictionary contains an entry for the given key.
|
|
3787
|
+
*
|
|
3788
|
+
* ⚠️ **Note:** Avoid using `has(...)` together with `get(...)` in a pattern like this:
|
|
3789
|
+
*
|
|
3790
|
+
* ```ts
|
|
3791
|
+
* if (dict.has(key)) {
|
|
3792
|
+
* const value = dict.get(key);
|
|
3793
|
+
* ...
|
|
3794
|
+
* }
|
|
3795
|
+
* ```
|
|
3796
|
+
*
|
|
3797
|
+
* This approach performs two lookups for the same key.
|
|
3798
|
+
*
|
|
3799
|
+
* Instead, prefer the following pattern, which retrieves the value once:
|
|
3800
|
+
*
|
|
3801
|
+
* ```ts
|
|
3802
|
+
* const value = dict.get(key);
|
|
3803
|
+
* if (value !== undefined) {
|
|
3804
|
+
* ...
|
|
3805
|
+
* }
|
|
3806
|
+
* ```
|
|
3807
|
+
*
|
|
3808
|
+
* @param key - The key to check for.
|
|
3809
|
+
* @returns `true` if the dictionary contains an entry for the given key, otherwise `false`.
|
|
3810
|
+
*/
|
|
3811
|
+
has(key: K): boolean {
|
|
3812
|
+
return this.get(key) !== undefined;
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
/**
|
|
3816
|
+
* Removes an entry with the specified key from the dictionary.
|
|
3817
|
+
*
|
|
3818
|
+
* Internally, this calls {@link internalSet} with `undefined` to mark the entry as deleted.
|
|
3819
|
+
*
|
|
3820
|
+
* @param key - The key of the entry to remove.
|
|
3821
|
+
* @returns `true` if an entry was removed (i.e. the key existed), otherwise `false`.
|
|
3822
|
+
*/
|
|
3823
|
+
delete(key: K): boolean {
|
|
3824
|
+
const leaf = this.internalSet(key, undefined);
|
|
3825
|
+
if (leaf !== null) {
|
|
3826
|
+
this.keyvals.delete(leaf.key);
|
|
3827
|
+
return true;
|
|
3828
|
+
}
|
|
3829
|
+
return false;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
/**
|
|
3833
|
+
* Returns an iterator over the keys in the dictionary.
|
|
3834
|
+
*
|
|
3835
|
+
* The iterator yields each key in insertion order.
|
|
3836
|
+
*
|
|
3837
|
+
* @returns An iterator over all keys in the dictionary.
|
|
3838
|
+
*/
|
|
3839
|
+
keys(): Iterator<K> & Iterable<K> {
|
|
3840
|
+
return this.keyvals.keys();
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* Returns an iterator over the values in the dictionary.
|
|
3845
|
+
*
|
|
3846
|
+
* The iterator yields each value in insertion order.
|
|
3847
|
+
*
|
|
3848
|
+
* @returns An iterator over all values in the dictionary.
|
|
3849
|
+
*/
|
|
3850
|
+
*values(): Iterator<V> & Iterable<V> {
|
|
3851
|
+
for (const leaf of this.keyvals.values()) {
|
|
3852
|
+
yield leaf.value;
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
/**
|
|
3857
|
+
* Returns an iterator over the `[key, value]` pairs in the dictionary.
|
|
3858
|
+
*
|
|
3859
|
+
* The iterator yields entries in insertion order.
|
|
3860
|
+
*
|
|
3861
|
+
* @returns An iterator over `[key, value]` tuples for each entry in the dictionary.
|
|
3862
|
+
*/
|
|
3863
|
+
*entries(): Iterator<[K, V]> & Iterable<[K, V]> {
|
|
3864
|
+
for (const leaf of this.keyvals.values()) {
|
|
3865
|
+
yield [leaf.key, leaf.value];
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
/**
|
|
3870
|
+
* Default iterator for the dictionary.
|
|
3871
|
+
*
|
|
3872
|
+
* Equivalent to calling {@link entries}.
|
|
3873
|
+
* Enables iteration with `for...of`:
|
|
3874
|
+
*
|
|
3875
|
+
* ```ts
|
|
3876
|
+
* for (const [key, value] of dict) {
|
|
3877
|
+
* ...
|
|
3878
|
+
* }
|
|
3879
|
+
* ```
|
|
3880
|
+
*
|
|
3881
|
+
* @returns An iterator over `[key, value]` pairs.
|
|
3882
|
+
*/
|
|
3883
|
+
[Symbol.iterator](): Iterator<[K, V]> & Iterable<[K, V]> {
|
|
3884
|
+
return this.entries();
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
/**
|
|
3888
|
+
* Creates a new sorted array of values, ordered by their corresponding keys.
|
|
3889
|
+
*
|
|
3890
|
+
* Iterates over all entries in the dictionary and sorts them according
|
|
3891
|
+
* to the provided comparator function applied to the keys.
|
|
3892
|
+
*
|
|
3893
|
+
* @param comparator - A comparator function that can compare two keys.
|
|
3894
|
+
*
|
|
3895
|
+
* @returns A new array containing all values from the dictionary,
|
|
3896
|
+
* sorted according to their keys.
|
|
3897
|
+
*/
|
|
3898
|
+
toSortedArray(comparator: Comparator<K>): V[] {
|
|
3899
|
+
const vals: [K, V][] = Array.from(this);
|
|
3900
|
+
vals.sort((a, b) => comparator(a[0], b[0]).value);
|
|
3901
|
+
return vals.map((x) => x[1]);
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
declare const CHUNK_SIZE = 6;
|
|
3906
|
+
type CHUNK_SIZE = typeof CHUNK_SIZE;
|
|
3907
|
+
|
|
3908
|
+
/**
|
|
3909
|
+
* A function to transform a bytes chunk (up to 6 bytes into U48 number)
|
|
3910
|
+
*
|
|
3911
|
+
* Note that it uses 3 additional bits to store length(`value * 8 + len;`),
|
|
3912
|
+
* It is needed to distinguish shorter chunks that have 0s at the end, for example: [1, 2] and [1, 2, 0]
|
|
3913
|
+
* */
|
|
3914
|
+
declare function bytesAsU48(bytes: Uint8Array): number {
|
|
3915
|
+
const len = bytes.length;
|
|
3916
|
+
|
|
3917
|
+
check`${len <= CHUNK_SIZE} Length has to be <= ${CHUNK_SIZE}, got: ${len}`;
|
|
3918
|
+
|
|
3919
|
+
let value = bytes[3] | (bytes[2] << 8) | (bytes[1] << 16) | (bytes[0] << 24);
|
|
3920
|
+
|
|
3921
|
+
for (let i = 4; i < bytes.length; i++) {
|
|
3922
|
+
value = value * 256 + bytes[i];
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
return value * 8 + len;
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
type KeyChunk = Opaque<BytesBlob, `up to ${CHUNK_SIZE} bytes`>;
|
|
3929
|
+
type U48 = number;
|
|
3930
|
+
type SubKey<_K extends BytesBlob> = BytesBlob;
|
|
3931
|
+
type OriginalKeyRef<K> = K;
|
|
3932
|
+
type MaybeNode<K extends BytesBlob, V> = Node<K, V> | undefined;
|
|
3933
|
+
|
|
3934
|
+
type Leaf<K extends BytesBlob, V> = {
|
|
3935
|
+
key: OriginalKeyRef<K>;
|
|
3936
|
+
value: V;
|
|
3937
|
+
};
|
|
3938
|
+
|
|
3939
|
+
declare class Node<K extends BytesBlob, V> {
|
|
3940
|
+
convertListChildrenToMap() {
|
|
3941
|
+
if (!(this.children instanceof ListChildren)) {
|
|
3942
|
+
return;
|
|
3943
|
+
}
|
|
3944
|
+
this.children = MapChildren.fromListNode<K, V>(this.children);
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
static withList<K extends BytesBlob, V>(): Node<K, V> {
|
|
3948
|
+
return new Node(undefined, ListChildren.new());
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
static withMap<K extends BytesBlob, V>(): Node<K, V> {
|
|
3952
|
+
return new Node(undefined, MapChildren.new());
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
private constructor(
|
|
3956
|
+
private leaf: Leaf<K, V> | undefined,
|
|
3957
|
+
public children: MapChildren<K, V> | ListChildren<K, V>,
|
|
3958
|
+
) {}
|
|
3959
|
+
|
|
3960
|
+
getLeaf(): Leaf<K, V> | undefined {
|
|
3961
|
+
return this.leaf;
|
|
3962
|
+
}
|
|
3963
|
+
|
|
3964
|
+
remove(_key: K): Leaf<K, V> | null {
|
|
3965
|
+
if (this.leaf === undefined) {
|
|
3966
|
+
return null;
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3969
|
+
const removedLeaf = this.leaf;
|
|
3970
|
+
this.leaf = undefined;
|
|
3971
|
+
return removedLeaf;
|
|
3972
|
+
}
|
|
3973
|
+
|
|
3974
|
+
set(key: K, value: V): Leaf<K, V> | null {
|
|
3975
|
+
if (this.leaf === undefined) {
|
|
3976
|
+
this.leaf = { key, value };
|
|
3977
|
+
return this.leaf;
|
|
3978
|
+
}
|
|
3979
|
+
this.leaf.value = value;
|
|
3980
|
+
return null;
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
declare class ListChildren<K extends BytesBlob, V> {
|
|
3985
|
+
children: [SubKey<K>, Leaf<K, V>][] = [];
|
|
3986
|
+
|
|
3987
|
+
private constructor() {}
|
|
3988
|
+
|
|
3989
|
+
find(key: SubKey<K>): Leaf<K, V> | null {
|
|
3990
|
+
const result = this.children.find((item) => item[0].isEqualTo(key));
|
|
3991
|
+
if (result !== undefined) {
|
|
3992
|
+
return result[1];
|
|
3993
|
+
}
|
|
3994
|
+
return null;
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
remove(key: SubKey<K>): Leaf<K, V> | null {
|
|
3998
|
+
const existingIndex = this.children.findIndex((item) => item[0].isEqualTo(key));
|
|
3999
|
+
if (existingIndex >= 0) {
|
|
4000
|
+
const ret = this.children.splice(existingIndex, 1);
|
|
4001
|
+
return ret[0][1];
|
|
4002
|
+
}
|
|
4003
|
+
return null;
|
|
4004
|
+
}
|
|
4005
|
+
|
|
4006
|
+
insert(key: SubKey<K>, leaf: Leaf<K, V>): Leaf<K, V> | null {
|
|
4007
|
+
const existingIndex = this.children.findIndex((item) => item[0].isEqualTo(key));
|
|
4008
|
+
if (existingIndex >= 0) {
|
|
4009
|
+
const existing = this.children[existingIndex];
|
|
4010
|
+
existing[1].value = leaf.value;
|
|
4011
|
+
return null;
|
|
4012
|
+
}
|
|
4013
|
+
|
|
4014
|
+
this.children.push([key, leaf]);
|
|
4015
|
+
return leaf;
|
|
4016
|
+
}
|
|
4017
|
+
|
|
4018
|
+
static new<K extends BytesBlob, V>() {
|
|
4019
|
+
return new ListChildren<K, V>();
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
declare class MapChildren<K extends BytesBlob, V> {
|
|
4024
|
+
children: Map<U48, Node<K, V>> = new Map();
|
|
4025
|
+
|
|
4026
|
+
private constructor() {}
|
|
4027
|
+
|
|
4028
|
+
static new<K extends BytesBlob, V>(): MapChildren<K, V> {
|
|
4029
|
+
return new MapChildren<K, V>();
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
static fromListNode<K extends BytesBlob, T>(node: ListChildren<K, T>): MapChildren<K, T> {
|
|
4033
|
+
const mapNode = new MapChildren<K, T>();
|
|
4034
|
+
|
|
4035
|
+
for (const [key, leaf] of node.children) {
|
|
4036
|
+
const currentKeyChunk: KeyChunk = asOpaqueType(BytesBlob.blobFrom(key.raw.subarray(0, CHUNK_SIZE)));
|
|
4037
|
+
const subKey = BytesBlob.blobFrom(key.raw.subarray(CHUNK_SIZE));
|
|
4038
|
+
|
|
4039
|
+
let child = mapNode.getChild(currentKeyChunk);
|
|
4040
|
+
|
|
4041
|
+
if (child === undefined) {
|
|
4042
|
+
child = Node.withList<K, T>();
|
|
4043
|
+
mapNode.setChild(currentKeyChunk, child);
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
const children = child.children as ListChildren<K, T>;
|
|
4047
|
+
children.insert(subKey, leaf);
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
return mapNode;
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
getChild(keyChunk: KeyChunk) {
|
|
4054
|
+
const chunkAsNumber = bytesAsU48(keyChunk.raw);
|
|
4055
|
+
return this.children.get(chunkAsNumber);
|
|
4056
|
+
}
|
|
4057
|
+
|
|
4058
|
+
setChild(keyChunk: KeyChunk, node: Node<K, V>) {
|
|
4059
|
+
const chunkAsNumber = bytesAsU48(keyChunk.raw);
|
|
4060
|
+
this.children.set(chunkAsNumber, node);
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
|
|
3569
4064
|
type ITypedArray = Uint8Array | Uint16Array | Uint32Array;
|
|
3570
4065
|
type IDataType = string | Buffer | ITypedArray;
|
|
3571
4066
|
|
|
@@ -3737,23 +4232,23 @@ declare namespace keccak {
|
|
|
3737
4232
|
// TODO [ToDr] (#213) this should most likely be moved to a separate
|
|
3738
4233
|
// package to avoid pulling in unnecessary deps.
|
|
3739
4234
|
|
|
3740
|
-
type index$
|
|
3741
|
-
declare const index$
|
|
3742
|
-
type index$
|
|
3743
|
-
type index$
|
|
3744
|
-
type index$
|
|
3745
|
-
type index$
|
|
3746
|
-
type index$
|
|
3747
|
-
type index$
|
|
3748
|
-
type index$
|
|
3749
|
-
declare const index$
|
|
3750
|
-
type index$
|
|
3751
|
-
declare const index$
|
|
3752
|
-
declare const index$
|
|
3753
|
-
declare const index$
|
|
3754
|
-
declare namespace index$
|
|
3755
|
-
export { index$
|
|
3756
|
-
export type { index$
|
|
4235
|
+
type index$p_Blake2b = Blake2b;
|
|
4236
|
+
declare const index$p_Blake2b: typeof Blake2b;
|
|
4237
|
+
type index$p_Blake2bHash = Blake2bHash;
|
|
4238
|
+
type index$p_HASH_SIZE = HASH_SIZE;
|
|
4239
|
+
type index$p_KeccakHash = KeccakHash;
|
|
4240
|
+
type index$p_OpaqueHash = OpaqueHash;
|
|
4241
|
+
type index$p_TRUNCATED_HASH_SIZE = TRUNCATED_HASH_SIZE;
|
|
4242
|
+
type index$p_TruncatedHash = TruncatedHash;
|
|
4243
|
+
type index$p_WithHash<THash extends OpaqueHash, TData> = WithHash<THash, TData>;
|
|
4244
|
+
declare const index$p_WithHash: typeof WithHash;
|
|
4245
|
+
type index$p_WithHashAndBytes<THash extends OpaqueHash, TData> = WithHashAndBytes<THash, TData>;
|
|
4246
|
+
declare const index$p_WithHashAndBytes: typeof WithHashAndBytes;
|
|
4247
|
+
declare const index$p_ZERO_HASH: typeof ZERO_HASH;
|
|
4248
|
+
declare const index$p_keccak: typeof keccak;
|
|
4249
|
+
declare namespace index$p {
|
|
4250
|
+
export { index$p_Blake2b as Blake2b, index$p_WithHash as WithHash, index$p_WithHashAndBytes as WithHashAndBytes, index$p_ZERO_HASH as ZERO_HASH, index$p_keccak as keccak, zero$1 as zero };
|
|
4251
|
+
export type { index$p_Blake2bHash as Blake2bHash, index$p_HASH_SIZE as HASH_SIZE, index$p_KeccakHash as KeccakHash, index$p_OpaqueHash as OpaqueHash, index$p_TRUNCATED_HASH_SIZE as TRUNCATED_HASH_SIZE, index$p_TruncatedHash as TruncatedHash };
|
|
3757
4252
|
}
|
|
3758
4253
|
|
|
3759
4254
|
/** Immutable view of the `HashDictionary`. */
|
|
@@ -3766,17 +4261,20 @@ interface ImmutableHashDictionary<K extends OpaqueHash, V> extends Iterable<[K,
|
|
|
3766
4261
|
get(key: K): V | undefined;
|
|
3767
4262
|
|
|
3768
4263
|
/** Iterator over keys of the dictionary. */
|
|
3769
|
-
keys():
|
|
4264
|
+
keys(): Iterator<K>;
|
|
3770
4265
|
|
|
3771
4266
|
/** Iterator over values of the dictionary. */
|
|
3772
|
-
values():
|
|
4267
|
+
values(): Iterator<V>;
|
|
3773
4268
|
|
|
3774
4269
|
/** Returns an array of the map's values, sorted by their corresponding keys */
|
|
3775
4270
|
toSortedArray(compare: Comparator<K>): V[];
|
|
3776
4271
|
}
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
4272
|
+
/**
|
|
4273
|
+
* A map which uses hashes as keys.
|
|
4274
|
+
*
|
|
4275
|
+
* @deprecated
|
|
4276
|
+
* */
|
|
4277
|
+
declare class StringHashDictionary<K extends OpaqueHash, V> implements ImmutableHashDictionary<K, V> {
|
|
3780
4278
|
// TODO [ToDr] [crit] We can't use `TrieHash` directly in the map,
|
|
3781
4279
|
// because of the way it's being compared. Hence having `string` here.
|
|
3782
4280
|
// This has to be benchmarked and re-written to a custom map most likely.
|
|
@@ -3856,6 +4354,15 @@ declare class HashDictionary<K extends OpaqueHash, V> implements ImmutableHashDi
|
|
|
3856
4354
|
}
|
|
3857
4355
|
}
|
|
3858
4356
|
|
|
4357
|
+
declare class HashDictionary<K extends OpaqueHash, V>
|
|
4358
|
+
extends BlobDictionary<K, V>
|
|
4359
|
+
implements ImmutableHashDictionary<K, V>
|
|
4360
|
+
{
|
|
4361
|
+
constructor() {
|
|
4362
|
+
super(BLOB_DICTIONARY_THRESHOLD);
|
|
4363
|
+
}
|
|
4364
|
+
}
|
|
4365
|
+
|
|
3859
4366
|
/** Immutable version of the HashSet. */
|
|
3860
4367
|
interface ImmutableHashSet<V extends OpaqueHash> extends Iterable<V> {
|
|
3861
4368
|
/** Return number of items in the set. */
|
|
@@ -4447,7 +4954,14 @@ declare class SortedSet<V> extends SortedArray<V> implements ImmutableSortedSet<
|
|
|
4447
4954
|
}
|
|
4448
4955
|
}
|
|
4449
4956
|
|
|
4450
|
-
|
|
4957
|
+
declare function getTruncatedKey(key: OpaqueHash | TruncatedHash) {
|
|
4958
|
+
// Always return exactly TRUNCATED_HASH_SIZE bytes.
|
|
4959
|
+
if (key.length === TRUNCATED_HASH_SIZE) {
|
|
4960
|
+
return key;
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
return Bytes.fromBlob(key.raw.subarray(0, TRUNCATED_HASH_SIZE), TRUNCATED_HASH_SIZE);
|
|
4964
|
+
}
|
|
4451
4965
|
|
|
4452
4966
|
/**
|
|
4453
4967
|
* A collection of hash-based keys (likely `StateKey`s) which ignores
|
|
@@ -4462,22 +4976,18 @@ declare class TruncatedHashDictionary<T extends OpaqueHash, V> {
|
|
|
4462
4976
|
static fromEntries<T extends OpaqueHash, V>(
|
|
4463
4977
|
entries: Iterable<[T | TruncatedHash, V] | readonly [T | TruncatedHash, V]>,
|
|
4464
4978
|
): TruncatedHashDictionary<T, V> {
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
return new TruncatedHashDictionary(HashDictionary.fromEntries(mapped));
|
|
4979
|
+
return new TruncatedHashDictionary(
|
|
4980
|
+
BlobDictionary.fromEntries<TruncatedHash, V>(
|
|
4981
|
+
Array.from(entries).map(([key, value]) => [getTruncatedKey(key), value]),
|
|
4982
|
+
BLOB_DICTIONARY_THRESHOLD,
|
|
4983
|
+
),
|
|
4984
|
+
);
|
|
4472
4985
|
}
|
|
4473
4986
|
|
|
4474
|
-
|
|
4475
|
-
private readonly truncatedKey: T = Bytes.zero(HASH_SIZE).asOpaque();
|
|
4476
|
-
|
|
4477
|
-
private constructor(private readonly dict: HashDictionary<HashWithZeroedBit<T>, V>) {}
|
|
4987
|
+
private constructor(private readonly dict: BlobDictionary<TruncatedHash, V>) {}
|
|
4478
4988
|
|
|
4479
4989
|
[TEST_COMPARE_USING]() {
|
|
4480
|
-
return this.dict;
|
|
4990
|
+
return Array.from(this.dict);
|
|
4481
4991
|
}
|
|
4482
4992
|
|
|
4483
4993
|
/** Return number of items in the dictionary. */
|
|
@@ -4486,31 +4996,27 @@ declare class TruncatedHashDictionary<T extends OpaqueHash, V> {
|
|
|
4486
4996
|
}
|
|
4487
4997
|
|
|
4488
4998
|
/** Retrieve a value that matches the key on `TRUNCATED_HASH_SIZE`. */
|
|
4489
|
-
get(
|
|
4490
|
-
|
|
4491
|
-
return this.dict.get(
|
|
4999
|
+
get(key: T | TruncatedHash): V | undefined {
|
|
5000
|
+
const truncatedKey = getTruncatedKey(key);
|
|
5001
|
+
return this.dict.get(truncatedKey);
|
|
4492
5002
|
}
|
|
4493
5003
|
|
|
4494
5004
|
/** Return true if the key is present in the dictionary */
|
|
4495
|
-
has(
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
return this.dict.has(this.truncatedKey);
|
|
5005
|
+
has(key: T | TruncatedHash): boolean {
|
|
5006
|
+
const truncatedKey = getTruncatedKey(key);
|
|
5007
|
+
return this.dict.has(truncatedKey);
|
|
4499
5008
|
}
|
|
4500
5009
|
|
|
4501
5010
|
/** Set or update a value that matches the key on `TRUNCATED_HASH_SIZE`. */
|
|
4502
|
-
set(
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
const key = Bytes.zero(HASH_SIZE);
|
|
4506
|
-
key.raw.set(fullKey.raw.subarray(0, TRUNCATED_HASH_SIZE));
|
|
4507
|
-
this.dict.set(key.asOpaque(), value);
|
|
5011
|
+
set(key: T | TruncatedHash, value: V) {
|
|
5012
|
+
const truncatedKey = getTruncatedKey(key);
|
|
5013
|
+
this.dict.set(truncatedKey, value);
|
|
4508
5014
|
}
|
|
4509
5015
|
|
|
4510
5016
|
/** Remove a value that matches the key on `TRUNCATED_HASH_SIZE`. */
|
|
4511
|
-
delete(
|
|
4512
|
-
|
|
4513
|
-
this.dict.delete(
|
|
5017
|
+
delete(key: T | TruncatedHash) {
|
|
5018
|
+
const truncatedKey = getTruncatedKey(key);
|
|
5019
|
+
this.dict.delete(truncatedKey);
|
|
4514
5020
|
}
|
|
4515
5021
|
|
|
4516
5022
|
/** Iterator over values of the dictionary. */
|
|
@@ -4520,9 +5026,7 @@ declare class TruncatedHashDictionary<T extends OpaqueHash, V> {
|
|
|
4520
5026
|
|
|
4521
5027
|
/** Iterator over entries of the dictionary (with truncated keys) */
|
|
4522
5028
|
*entries(): Generator<[TruncatedHash, V]> {
|
|
4523
|
-
|
|
4524
|
-
yield [Bytes.fromBlob(key.raw.subarray(0, TRUNCATED_HASH_SIZE), TRUNCATED_HASH_SIZE).asOpaque(), value];
|
|
4525
|
-
}
|
|
5029
|
+
yield* this.dict.entries();
|
|
4526
5030
|
}
|
|
4527
5031
|
|
|
4528
5032
|
[Symbol.iterator]() {
|
|
@@ -4530,37 +5034,55 @@ declare class TruncatedHashDictionary<T extends OpaqueHash, V> {
|
|
|
4530
5034
|
}
|
|
4531
5035
|
}
|
|
4532
5036
|
|
|
4533
|
-
type index$
|
|
4534
|
-
declare const index$
|
|
4535
|
-
type index$
|
|
4536
|
-
declare const index$
|
|
4537
|
-
type index$
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
type index$
|
|
4543
|
-
|
|
4544
|
-
type index$
|
|
4545
|
-
type index$
|
|
4546
|
-
type index$
|
|
4547
|
-
type index$
|
|
4548
|
-
type index$
|
|
4549
|
-
type index$
|
|
4550
|
-
type index$
|
|
4551
|
-
type index$
|
|
4552
|
-
|
|
4553
|
-
type index$
|
|
4554
|
-
type index$
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
declare
|
|
4562
|
-
|
|
4563
|
-
|
|
5037
|
+
type index$o_ArrayView<T> = ArrayView<T>;
|
|
5038
|
+
declare const index$o_ArrayView: typeof ArrayView;
|
|
5039
|
+
type index$o_BlobDictionary<K extends BytesBlob, V> = BlobDictionary<K, V>;
|
|
5040
|
+
declare const index$o_BlobDictionary: typeof BlobDictionary;
|
|
5041
|
+
type index$o_CHUNK_SIZE = CHUNK_SIZE;
|
|
5042
|
+
type index$o_FixedSizeArray<T, N extends number> = FixedSizeArray<T, N>;
|
|
5043
|
+
declare const index$o_FixedSizeArray: typeof FixedSizeArray;
|
|
5044
|
+
type index$o_HashDictionary<K extends OpaqueHash, V> = HashDictionary<K, V>;
|
|
5045
|
+
declare const index$o_HashDictionary: typeof HashDictionary;
|
|
5046
|
+
type index$o_HashSet<V extends OpaqueHash> = HashSet<V>;
|
|
5047
|
+
declare const index$o_HashSet: typeof HashSet;
|
|
5048
|
+
type index$o_ImmutableHashDictionary<K extends OpaqueHash, V> = ImmutableHashDictionary<K, V>;
|
|
5049
|
+
type index$o_ImmutableHashSet<V extends OpaqueHash> = ImmutableHashSet<V>;
|
|
5050
|
+
type index$o_ImmutableSortedArray<V> = ImmutableSortedArray<V>;
|
|
5051
|
+
type index$o_ImmutableSortedSet<V> = ImmutableSortedSet<V>;
|
|
5052
|
+
type index$o_KeyChunk = KeyChunk;
|
|
5053
|
+
type index$o_KeyMapper<K> = KeyMapper<K>;
|
|
5054
|
+
type index$o_KeyMappers<TKeys extends readonly unknown[]> = KeyMappers<TKeys>;
|
|
5055
|
+
type index$o_KnownSize<T, F extends string> = KnownSize<T, F>;
|
|
5056
|
+
type index$o_KnownSizeArray<T, F extends string> = KnownSizeArray<T, F>;
|
|
5057
|
+
type index$o_KnownSizeId<X> = KnownSizeId<X>;
|
|
5058
|
+
type index$o_Leaf<K extends BytesBlob, V> = Leaf<K, V>;
|
|
5059
|
+
type index$o_ListChildren<K extends BytesBlob, V> = ListChildren<K, V>;
|
|
5060
|
+
declare const index$o_ListChildren: typeof ListChildren;
|
|
5061
|
+
type index$o_MapChildren<K extends BytesBlob, V> = MapChildren<K, V>;
|
|
5062
|
+
declare const index$o_MapChildren: typeof MapChildren;
|
|
5063
|
+
type index$o_MaybeNode<K extends BytesBlob, V> = MaybeNode<K, V>;
|
|
5064
|
+
type index$o_MultiMap<TKeys extends readonly unknown[], TValue> = MultiMap<TKeys, TValue>;
|
|
5065
|
+
declare const index$o_MultiMap: typeof MultiMap;
|
|
5066
|
+
type index$o_NestedMaps<TKeys extends readonly unknown[], TValue> = NestedMaps<TKeys, TValue>;
|
|
5067
|
+
type index$o_Node<K extends BytesBlob, V> = Node<K, V>;
|
|
5068
|
+
declare const index$o_Node: typeof Node;
|
|
5069
|
+
type index$o_OriginalKeyRef<K> = OriginalKeyRef<K>;
|
|
5070
|
+
type index$o_SortedArray<V> = SortedArray<V>;
|
|
5071
|
+
declare const index$o_SortedArray: typeof SortedArray;
|
|
5072
|
+
type index$o_SortedSet<V> = SortedSet<V>;
|
|
5073
|
+
declare const index$o_SortedSet: typeof SortedSet;
|
|
5074
|
+
type index$o_StringHashDictionary<K extends OpaqueHash, V> = StringHashDictionary<K, V>;
|
|
5075
|
+
declare const index$o_StringHashDictionary: typeof StringHashDictionary;
|
|
5076
|
+
type index$o_SubKey<_K extends BytesBlob> = SubKey<_K>;
|
|
5077
|
+
type index$o_TruncatedHashDictionary<T extends OpaqueHash, V> = TruncatedHashDictionary<T, V>;
|
|
5078
|
+
declare const index$o_TruncatedHashDictionary: typeof TruncatedHashDictionary;
|
|
5079
|
+
type index$o_U48 = U48;
|
|
5080
|
+
declare const index$o_asKnownSize: typeof asKnownSize;
|
|
5081
|
+
declare const index$o_bytesAsU48: typeof bytesAsU48;
|
|
5082
|
+
declare const index$o_getTruncatedKey: typeof getTruncatedKey;
|
|
5083
|
+
declare namespace index$o {
|
|
5084
|
+
export { index$o_ArrayView as ArrayView, index$o_BlobDictionary as BlobDictionary, index$o_FixedSizeArray as FixedSizeArray, index$o_HashDictionary as HashDictionary, index$o_HashSet as HashSet, index$o_ListChildren as ListChildren, index$o_MapChildren as MapChildren, index$o_MultiMap as MultiMap, index$o_Node as Node, index$o_SortedArray as SortedArray, index$o_SortedSet as SortedSet, index$o_StringHashDictionary as StringHashDictionary, index$o_TruncatedHashDictionary as TruncatedHashDictionary, index$o_asKnownSize as asKnownSize, index$o_bytesAsU48 as bytesAsU48, index$o_getTruncatedKey as getTruncatedKey };
|
|
5085
|
+
export type { index$o_CHUNK_SIZE as CHUNK_SIZE, index$o_ImmutableHashDictionary as ImmutableHashDictionary, index$o_ImmutableHashSet as ImmutableHashSet, index$o_ImmutableSortedArray as ImmutableSortedArray, index$o_ImmutableSortedSet as ImmutableSortedSet, index$o_KeyChunk as KeyChunk, index$o_KeyMapper as KeyMapper, index$o_KeyMappers as KeyMappers, index$o_KnownSize as KnownSize, index$o_KnownSizeArray as KnownSizeArray, index$o_KnownSizeId as KnownSizeId, index$o_Leaf as Leaf, index$o_MaybeNode as MaybeNode, index$o_NestedMaps as NestedMaps, index$o_OriginalKeyRef as OriginalKeyRef, index$o_SubKey as SubKey, index$o_U48 as U48 };
|
|
4564
5086
|
}
|
|
4565
5087
|
|
|
4566
5088
|
declare namespace bandersnatch_d_exports {
|
|
@@ -4920,32 +5442,32 @@ declare namespace keyDerivation {
|
|
|
4920
5442
|
export type { keyDerivation_BandersnatchSecretSeed as BandersnatchSecretSeed, keyDerivation_Ed25519SecretSeed as Ed25519SecretSeed, keyDerivation_KeySeed as KeySeed, keyDerivation_SEED_SIZE as SEED_SIZE };
|
|
4921
5443
|
}
|
|
4922
5444
|
|
|
4923
|
-
type index$
|
|
4924
|
-
type index$
|
|
4925
|
-
type index$
|
|
4926
|
-
type index$
|
|
4927
|
-
type index$
|
|
4928
|
-
type index$
|
|
4929
|
-
type index$
|
|
4930
|
-
type index$
|
|
4931
|
-
type index$
|
|
4932
|
-
type index$
|
|
4933
|
-
type index$
|
|
4934
|
-
type index$
|
|
4935
|
-
type index$
|
|
4936
|
-
type index$
|
|
4937
|
-
type index$
|
|
4938
|
-
type index$
|
|
4939
|
-
declare const index$
|
|
4940
|
-
type index$
|
|
4941
|
-
type index$
|
|
4942
|
-
type index$
|
|
4943
|
-
declare const index$
|
|
4944
|
-
declare const index$
|
|
4945
|
-
declare const index$
|
|
4946
|
-
declare namespace index$
|
|
4947
|
-
export { index$
|
|
4948
|
-
export type { index$
|
|
5445
|
+
type index$n_BANDERSNATCH_KEY_BYTES = BANDERSNATCH_KEY_BYTES;
|
|
5446
|
+
type index$n_BANDERSNATCH_PROOF_BYTES = BANDERSNATCH_PROOF_BYTES;
|
|
5447
|
+
type index$n_BANDERSNATCH_RING_ROOT_BYTES = BANDERSNATCH_RING_ROOT_BYTES;
|
|
5448
|
+
type index$n_BANDERSNATCH_VRF_SIGNATURE_BYTES = BANDERSNATCH_VRF_SIGNATURE_BYTES;
|
|
5449
|
+
type index$n_BLS_KEY_BYTES = BLS_KEY_BYTES;
|
|
5450
|
+
type index$n_BandersnatchKey = BandersnatchKey;
|
|
5451
|
+
type index$n_BandersnatchProof = BandersnatchProof;
|
|
5452
|
+
type index$n_BandersnatchRingRoot = BandersnatchRingRoot;
|
|
5453
|
+
type index$n_BandersnatchSecretSeed = BandersnatchSecretSeed;
|
|
5454
|
+
type index$n_BandersnatchVrfSignature = BandersnatchVrfSignature;
|
|
5455
|
+
type index$n_BlsKey = BlsKey;
|
|
5456
|
+
type index$n_ED25519_KEY_BYTES = ED25519_KEY_BYTES;
|
|
5457
|
+
type index$n_ED25519_PRIV_KEY_BYTES = ED25519_PRIV_KEY_BYTES;
|
|
5458
|
+
type index$n_ED25519_SIGNATURE_BYTES = ED25519_SIGNATURE_BYTES;
|
|
5459
|
+
type index$n_Ed25519Key = Ed25519Key;
|
|
5460
|
+
type index$n_Ed25519Pair = Ed25519Pair;
|
|
5461
|
+
declare const index$n_Ed25519Pair: typeof Ed25519Pair;
|
|
5462
|
+
type index$n_Ed25519SecretSeed = Ed25519SecretSeed;
|
|
5463
|
+
type index$n_Ed25519Signature = Ed25519Signature;
|
|
5464
|
+
type index$n_SEED_SIZE = SEED_SIZE;
|
|
5465
|
+
declare const index$n_bandersnatch: typeof bandersnatch;
|
|
5466
|
+
declare const index$n_ed25519: typeof ed25519;
|
|
5467
|
+
declare const index$n_keyDerivation: typeof keyDerivation;
|
|
5468
|
+
declare namespace index$n {
|
|
5469
|
+
export { index$n_Ed25519Pair as Ed25519Pair, index$n_bandersnatch as bandersnatch, bandersnatch_d_exports as bandersnatchWasm, index$n_ed25519 as ed25519, initAll as initWasm, index$n_keyDerivation as keyDerivation };
|
|
5470
|
+
export type { index$n_BANDERSNATCH_KEY_BYTES as BANDERSNATCH_KEY_BYTES, index$n_BANDERSNATCH_PROOF_BYTES as BANDERSNATCH_PROOF_BYTES, index$n_BANDERSNATCH_RING_ROOT_BYTES as BANDERSNATCH_RING_ROOT_BYTES, index$n_BANDERSNATCH_VRF_SIGNATURE_BYTES as BANDERSNATCH_VRF_SIGNATURE_BYTES, index$n_BLS_KEY_BYTES as BLS_KEY_BYTES, index$n_BandersnatchKey as BandersnatchKey, index$n_BandersnatchProof as BandersnatchProof, index$n_BandersnatchRingRoot as BandersnatchRingRoot, index$n_BandersnatchSecretSeed as BandersnatchSecretSeed, index$n_BandersnatchVrfSignature as BandersnatchVrfSignature, index$n_BlsKey as BlsKey, index$n_ED25519_KEY_BYTES as ED25519_KEY_BYTES, index$n_ED25519_PRIV_KEY_BYTES as ED25519_PRIV_KEY_BYTES, index$n_ED25519_SIGNATURE_BYTES as ED25519_SIGNATURE_BYTES, index$n_Ed25519Key as Ed25519Key, index$n_Ed25519SecretSeed as Ed25519SecretSeed, index$n_Ed25519Signature as Ed25519Signature, KeySeed as PublicKeySeed, index$n_SEED_SIZE as SEED_SIZE };
|
|
4949
5471
|
}
|
|
4950
5472
|
|
|
4951
5473
|
/**
|
|
@@ -5135,25 +5657,25 @@ declare enum PvmBackend {
|
|
|
5135
5657
|
Ananas = 1,
|
|
5136
5658
|
}
|
|
5137
5659
|
|
|
5138
|
-
type index$
|
|
5139
|
-
declare const index$
|
|
5140
|
-
type index$
|
|
5141
|
-
declare const index$
|
|
5142
|
-
declare const index$
|
|
5143
|
-
declare const index$
|
|
5144
|
-
declare const index$
|
|
5145
|
-
declare const index$
|
|
5146
|
-
declare const index$
|
|
5147
|
-
type index$
|
|
5148
|
-
type index$
|
|
5149
|
-
type index$
|
|
5150
|
-
declare const index$
|
|
5151
|
-
declare const index$
|
|
5152
|
-
declare const index$
|
|
5153
|
-
declare const index$
|
|
5154
|
-
declare namespace index$
|
|
5155
|
-
export { index$
|
|
5156
|
-
export type { index$
|
|
5660
|
+
type index$m_Bootnode = Bootnode;
|
|
5661
|
+
declare const index$m_Bootnode: typeof Bootnode;
|
|
5662
|
+
type index$m_ChainSpec = ChainSpec;
|
|
5663
|
+
declare const index$m_ChainSpec: typeof ChainSpec;
|
|
5664
|
+
declare const index$m_EC_SEGMENT_SIZE: typeof EC_SEGMENT_SIZE;
|
|
5665
|
+
declare const index$m_EST_CORES: typeof EST_CORES;
|
|
5666
|
+
declare const index$m_EST_EPOCH_LENGTH: typeof EST_EPOCH_LENGTH;
|
|
5667
|
+
declare const index$m_EST_VALIDATORS: typeof EST_VALIDATORS;
|
|
5668
|
+
declare const index$m_EST_VALIDATORS_SUPER_MAJORITY: typeof EST_VALIDATORS_SUPER_MAJORITY;
|
|
5669
|
+
type index$m_PeerAddress = PeerAddress;
|
|
5670
|
+
type index$m_PeerId = PeerId;
|
|
5671
|
+
type index$m_PvmBackend = PvmBackend;
|
|
5672
|
+
declare const index$m_PvmBackend: typeof PvmBackend;
|
|
5673
|
+
declare const index$m_PvmBackendNames: typeof PvmBackendNames;
|
|
5674
|
+
declare const index$m_fullChainSpec: typeof fullChainSpec;
|
|
5675
|
+
declare const index$m_tinyChainSpec: typeof tinyChainSpec;
|
|
5676
|
+
declare namespace index$m {
|
|
5677
|
+
export { index$m_Bootnode as Bootnode, index$m_ChainSpec as ChainSpec, index$m_EC_SEGMENT_SIZE as EC_SEGMENT_SIZE, index$m_EST_CORES as EST_CORES, index$m_EST_EPOCH_LENGTH as EST_EPOCH_LENGTH, index$m_EST_VALIDATORS as EST_VALIDATORS, index$m_EST_VALIDATORS_SUPER_MAJORITY as EST_VALIDATORS_SUPER_MAJORITY, index$m_PvmBackend as PvmBackend, index$m_PvmBackendNames as PvmBackendNames, index$m_fullChainSpec as fullChainSpec, index$m_tinyChainSpec as tinyChainSpec };
|
|
5678
|
+
export type { index$m_PeerAddress as PeerAddress, index$m_PeerId as PeerId };
|
|
5157
5679
|
}
|
|
5158
5680
|
|
|
5159
5681
|
/**
|
|
@@ -6959,74 +7481,74 @@ declare function reencodeAsView<T, V>(codec: Descriptor<T, V>, object: T, chainS
|
|
|
6959
7481
|
return Decoder.decodeObject(codec.View, encoded, chainSpec);
|
|
6960
7482
|
}
|
|
6961
7483
|
|
|
6962
|
-
type index$
|
|
6963
|
-
declare const index$
|
|
6964
|
-
type index$
|
|
6965
|
-
type index$
|
|
6966
|
-
type index$
|
|
6967
|
-
type index$
|
|
6968
|
-
type index$
|
|
6969
|
-
type index$
|
|
6970
|
-
declare const index$
|
|
6971
|
-
type index$
|
|
6972
|
-
type index$
|
|
6973
|
-
declare const index$
|
|
6974
|
-
type index$
|
|
6975
|
-
type index$
|
|
6976
|
-
type index$
|
|
6977
|
-
declare const index$
|
|
6978
|
-
type index$
|
|
6979
|
-
type index$
|
|
6980
|
-
type index$
|
|
6981
|
-
declare const index$
|
|
6982
|
-
declare const index$
|
|
6983
|
-
type index$
|
|
6984
|
-
type index$
|
|
6985
|
-
type index$
|
|
6986
|
-
type index$
|
|
6987
|
-
type index$
|
|
6988
|
-
type index$
|
|
6989
|
-
type index$
|
|
6990
|
-
type index$
|
|
6991
|
-
type index$
|
|
6992
|
-
declare const index$
|
|
6993
|
-
type index$
|
|
6994
|
-
type index$
|
|
6995
|
-
type index$
|
|
6996
|
-
type index$
|
|
6997
|
-
declare const index$
|
|
6998
|
-
declare const index$
|
|
6999
|
-
declare const index$
|
|
7000
|
-
type index$
|
|
7001
|
-
declare const index$
|
|
7002
|
-
declare const index$
|
|
7003
|
-
declare const index$
|
|
7004
|
-
declare const index$
|
|
7005
|
-
declare const index$
|
|
7006
|
-
declare const index$
|
|
7007
|
-
declare const index$
|
|
7008
|
-
declare const index$
|
|
7009
|
-
declare const index$
|
|
7010
|
-
declare const index$
|
|
7011
|
-
declare const index$
|
|
7012
|
-
declare const index$
|
|
7013
|
-
declare const index$
|
|
7014
|
-
declare const index$
|
|
7015
|
-
declare const index$
|
|
7016
|
-
declare const index$
|
|
7017
|
-
declare const index$
|
|
7018
|
-
declare const index$
|
|
7019
|
-
declare const index$
|
|
7020
|
-
declare const index$
|
|
7021
|
-
declare const index$
|
|
7022
|
-
declare const index$
|
|
7023
|
-
declare const index$
|
|
7024
|
-
declare const index$
|
|
7025
|
-
declare const index$
|
|
7026
|
-
declare const index$
|
|
7027
|
-
declare namespace index$
|
|
7028
|
-
export { index$
|
|
7029
|
-
export type { index$
|
|
7484
|
+
type index$l_Block = Block;
|
|
7485
|
+
declare const index$l_Block: typeof Block;
|
|
7486
|
+
type index$l_BlockView = BlockView;
|
|
7487
|
+
type index$l_CodeHash = CodeHash;
|
|
7488
|
+
type index$l_CoreIndex = CoreIndex;
|
|
7489
|
+
type index$l_EntropyHash = EntropyHash;
|
|
7490
|
+
type index$l_Epoch = Epoch;
|
|
7491
|
+
type index$l_EpochMarker = EpochMarker;
|
|
7492
|
+
declare const index$l_EpochMarker: typeof EpochMarker;
|
|
7493
|
+
type index$l_EpochMarkerView = EpochMarkerView;
|
|
7494
|
+
type index$l_Extrinsic = Extrinsic;
|
|
7495
|
+
declare const index$l_Extrinsic: typeof Extrinsic;
|
|
7496
|
+
type index$l_ExtrinsicHash = ExtrinsicHash;
|
|
7497
|
+
type index$l_ExtrinsicView = ExtrinsicView;
|
|
7498
|
+
type index$l_Header = Header;
|
|
7499
|
+
declare const index$l_Header: typeof Header;
|
|
7500
|
+
type index$l_HeaderHash = HeaderHash;
|
|
7501
|
+
type index$l_HeaderView = HeaderView;
|
|
7502
|
+
type index$l_HeaderViewWithHash = HeaderViewWithHash;
|
|
7503
|
+
declare const index$l_HeaderViewWithHash: typeof HeaderViewWithHash;
|
|
7504
|
+
declare const index$l_MAX_NUMBER_OF_SEGMENTS: typeof MAX_NUMBER_OF_SEGMENTS;
|
|
7505
|
+
type index$l_PerEpochBlock<T> = PerEpochBlock<T>;
|
|
7506
|
+
type index$l_PerValidator<T> = PerValidator<T>;
|
|
7507
|
+
type index$l_SEGMENT_BYTES = SEGMENT_BYTES;
|
|
7508
|
+
type index$l_Segment = Segment;
|
|
7509
|
+
type index$l_SegmentIndex = SegmentIndex;
|
|
7510
|
+
type index$l_ServiceGas = ServiceGas;
|
|
7511
|
+
type index$l_ServiceId = ServiceId;
|
|
7512
|
+
type index$l_StateRootHash = StateRootHash;
|
|
7513
|
+
type index$l_TicketsMarker = TicketsMarker;
|
|
7514
|
+
declare const index$l_TicketsMarker: typeof TicketsMarker;
|
|
7515
|
+
type index$l_TicketsMarkerView = TicketsMarkerView;
|
|
7516
|
+
type index$l_TimeSlot = TimeSlot;
|
|
7517
|
+
type index$l_ValidatorIndex = ValidatorIndex;
|
|
7518
|
+
type index$l_ValidatorKeys = ValidatorKeys;
|
|
7519
|
+
declare const index$l_ValidatorKeys: typeof ValidatorKeys;
|
|
7520
|
+
declare const index$l_W_E: typeof W_E;
|
|
7521
|
+
declare const index$l_W_S: typeof W_S;
|
|
7522
|
+
type index$l_WorkReportHash = WorkReportHash;
|
|
7523
|
+
declare const index$l_assurances: typeof assurances;
|
|
7524
|
+
declare const index$l_codecPerEpochBlock: typeof codecPerEpochBlock;
|
|
7525
|
+
declare const index$l_codecPerValidator: typeof codecPerValidator;
|
|
7526
|
+
declare const index$l_disputes: typeof disputes;
|
|
7527
|
+
declare const index$l_emptyBlock: typeof emptyBlock;
|
|
7528
|
+
declare const index$l_encodeUnsealedHeader: typeof encodeUnsealedHeader;
|
|
7529
|
+
declare const index$l_guarantees: typeof guarantees;
|
|
7530
|
+
declare const index$l_headerViewWithHashCodec: typeof headerViewWithHashCodec;
|
|
7531
|
+
declare const index$l_legacyDescriptor: typeof legacyDescriptor;
|
|
7532
|
+
declare const index$l_preimage: typeof preimage;
|
|
7533
|
+
declare const index$l_reencodeAsView: typeof reencodeAsView;
|
|
7534
|
+
declare const index$l_refineContext: typeof refineContext;
|
|
7535
|
+
declare const index$l_tickets: typeof tickets;
|
|
7536
|
+
declare const index$l_tryAsCoreIndex: typeof tryAsCoreIndex;
|
|
7537
|
+
declare const index$l_tryAsEpoch: typeof tryAsEpoch;
|
|
7538
|
+
declare const index$l_tryAsPerEpochBlock: typeof tryAsPerEpochBlock;
|
|
7539
|
+
declare const index$l_tryAsPerValidator: typeof tryAsPerValidator;
|
|
7540
|
+
declare const index$l_tryAsSegmentIndex: typeof tryAsSegmentIndex;
|
|
7541
|
+
declare const index$l_tryAsServiceGas: typeof tryAsServiceGas;
|
|
7542
|
+
declare const index$l_tryAsServiceId: typeof tryAsServiceId;
|
|
7543
|
+
declare const index$l_tryAsTimeSlot: typeof tryAsTimeSlot;
|
|
7544
|
+
declare const index$l_tryAsValidatorIndex: typeof tryAsValidatorIndex;
|
|
7545
|
+
declare const index$l_workItem: typeof workItem;
|
|
7546
|
+
declare const index$l_workPackage: typeof workPackage;
|
|
7547
|
+
declare const index$l_workReport: typeof workReport;
|
|
7548
|
+
declare const index$l_workResult: typeof workResult;
|
|
7549
|
+
declare namespace index$l {
|
|
7550
|
+
export { index$l_Block as Block, index$l_EpochMarker as EpochMarker, index$l_Extrinsic as Extrinsic, index$l_Header as Header, index$l_HeaderViewWithHash as HeaderViewWithHash, index$l_MAX_NUMBER_OF_SEGMENTS as MAX_NUMBER_OF_SEGMENTS, index$l_TicketsMarker as TicketsMarker, index$l_ValidatorKeys as ValidatorKeys, index$l_W_E as W_E, index$l_W_S as W_S, index$l_assurances as assurances, index$l_codecPerEpochBlock as codecPerEpochBlock, index$l_codecPerValidator as codecPerValidator, codec as codecUtils, index$l_disputes as disputes, index$l_emptyBlock as emptyBlock, index$l_encodeUnsealedHeader as encodeUnsealedHeader, index$l_guarantees as guarantees, index$l_headerViewWithHashCodec as headerViewWithHashCodec, index$l_legacyDescriptor as legacyDescriptor, index$l_preimage as preimage, index$l_reencodeAsView as reencodeAsView, index$l_refineContext as refineContext, index$l_tickets as tickets, index$l_tryAsCoreIndex as tryAsCoreIndex, index$l_tryAsEpoch as tryAsEpoch, index$l_tryAsPerEpochBlock as tryAsPerEpochBlock, index$l_tryAsPerValidator as tryAsPerValidator, index$l_tryAsSegmentIndex as tryAsSegmentIndex, index$l_tryAsServiceGas as tryAsServiceGas, index$l_tryAsServiceId as tryAsServiceId, index$l_tryAsTimeSlot as tryAsTimeSlot, index$l_tryAsValidatorIndex as tryAsValidatorIndex, index$l_workItem as workItem, index$l_workPackage as workPackage, index$l_workReport as workReport, index$l_workResult as workResult };
|
|
7551
|
+
export type { index$l_BlockView as BlockView, index$l_CodeHash as CodeHash, index$l_CoreIndex as CoreIndex, index$l_EntropyHash as EntropyHash, index$l_Epoch as Epoch, index$l_EpochMarkerView as EpochMarkerView, index$l_ExtrinsicHash as ExtrinsicHash, index$l_ExtrinsicView as ExtrinsicView, index$l_HeaderHash as HeaderHash, index$l_HeaderView as HeaderView, index$l_PerEpochBlock as PerEpochBlock, index$l_PerValidator as PerValidator, index$l_SEGMENT_BYTES as SEGMENT_BYTES, index$l_Segment as Segment, index$l_SegmentIndex as SegmentIndex, index$l_ServiceGas as ServiceGas, index$l_ServiceId as ServiceId, index$l_StateRootHash as StateRootHash, index$l_TicketsMarkerView as TicketsMarkerView, index$l_TimeSlot as TimeSlot, index$l_ValidatorIndex as ValidatorIndex, index$l_WorkReportHash as WorkReportHash };
|
|
7030
7552
|
}
|
|
7031
7553
|
|
|
7032
7554
|
/** A type that can be read from a JSON-parsed object. */
|
|
@@ -7337,21 +7859,21 @@ declare namespace json {
|
|
|
7337
7859
|
}
|
|
7338
7860
|
}
|
|
7339
7861
|
|
|
7340
|
-
type index$
|
|
7341
|
-
type index$
|
|
7342
|
-
type index$
|
|
7343
|
-
type index$
|
|
7344
|
-
type index$
|
|
7345
|
-
declare const index$
|
|
7346
|
-
type index$
|
|
7347
|
-
type index$
|
|
7348
|
-
declare const index$
|
|
7349
|
-
import index$
|
|
7350
|
-
declare const index$
|
|
7351
|
-
declare const index$
|
|
7352
|
-
declare namespace index$
|
|
7353
|
-
export { index$
|
|
7354
|
-
export type { index$
|
|
7862
|
+
type index$k_Builder<TFrom, TInto> = Builder<TFrom, TInto>;
|
|
7863
|
+
type index$k_FromJson<T> = FromJson<T>;
|
|
7864
|
+
type index$k_FromJsonOptional<TInto> = FromJsonOptional<TInto>;
|
|
7865
|
+
type index$k_FromJsonPrimitive<T> = FromJsonPrimitive<T>;
|
|
7866
|
+
type index$k_FromJsonWithParser<TFrom, TInto> = FromJsonWithParser<TFrom, TInto>;
|
|
7867
|
+
declare const index$k_NO_KEY: typeof NO_KEY;
|
|
7868
|
+
type index$k_ObjectFromJson<T> = ObjectFromJson<T>;
|
|
7869
|
+
type index$k_Parser<TFrom, TInto> = Parser<TFrom, TInto>;
|
|
7870
|
+
declare const index$k_diffKeys: typeof diffKeys;
|
|
7871
|
+
import index$k_json = json;
|
|
7872
|
+
declare const index$k_parseFromJson: typeof parseFromJson;
|
|
7873
|
+
declare const index$k_parseOrThrow: typeof parseOrThrow;
|
|
7874
|
+
declare namespace index$k {
|
|
7875
|
+
export { index$k_NO_KEY as NO_KEY, index$k_diffKeys as diffKeys, index$k_json as json, index$k_parseFromJson as parseFromJson, index$k_parseOrThrow as parseOrThrow };
|
|
7876
|
+
export type { index$k_Builder as Builder, index$k_FromJson as FromJson, index$k_FromJsonOptional as FromJsonOptional, index$k_FromJsonPrimitive as FromJsonPrimitive, index$k_FromJsonWithParser as FromJsonWithParser, index$k_ObjectFromJson as ObjectFromJson, index$k_Parser as Parser };
|
|
7355
7877
|
}
|
|
7356
7878
|
|
|
7357
7879
|
declare namespace fromJson {
|
|
@@ -7854,52 +8376,52 @@ declare const blockFromJson = (spec: ChainSpec) =>
|
|
|
7854
8376
|
({ header, extrinsic }) => Block.create({ header, extrinsic }),
|
|
7855
8377
|
);
|
|
7856
8378
|
|
|
7857
|
-
type index$
|
|
7858
|
-
type index$
|
|
7859
|
-
type index$
|
|
7860
|
-
type index$
|
|
7861
|
-
type index$
|
|
7862
|
-
type index$
|
|
7863
|
-
type index$
|
|
7864
|
-
type index$
|
|
7865
|
-
type index$
|
|
7866
|
-
type index$
|
|
7867
|
-
type index$
|
|
7868
|
-
type index$
|
|
7869
|
-
type index$
|
|
7870
|
-
type index$
|
|
7871
|
-
declare const index$
|
|
7872
|
-
declare const index$
|
|
7873
|
-
declare const index$
|
|
7874
|
-
declare const index$
|
|
7875
|
-
declare const index$
|
|
7876
|
-
declare const index$
|
|
7877
|
-
import index$
|
|
7878
|
-
declare const index$
|
|
7879
|
-
declare const index$
|
|
7880
|
-
declare const index$
|
|
7881
|
-
declare const index$
|
|
7882
|
-
declare const index$
|
|
7883
|
-
declare const index$
|
|
7884
|
-
declare const index$
|
|
7885
|
-
declare const index$
|
|
7886
|
-
declare const index$
|
|
7887
|
-
declare const index$
|
|
7888
|
-
declare const index$
|
|
7889
|
-
declare const index$
|
|
7890
|
-
declare const index$
|
|
7891
|
-
declare const index$
|
|
7892
|
-
declare const index$
|
|
7893
|
-
declare const index$
|
|
7894
|
-
declare const index$
|
|
7895
|
-
declare const index$
|
|
7896
|
-
declare const index$
|
|
7897
|
-
declare const index$
|
|
7898
|
-
declare const index$
|
|
7899
|
-
declare const index$
|
|
7900
|
-
declare namespace index$
|
|
7901
|
-
export { index$
|
|
7902
|
-
export type { index$
|
|
8379
|
+
type index$j_CamelToSnake<S extends string> = CamelToSnake<S>;
|
|
8380
|
+
type index$j_JsonCulprit = JsonCulprit;
|
|
8381
|
+
type index$j_JsonEpochMarker = JsonEpochMarker;
|
|
8382
|
+
type index$j_JsonFault = JsonFault;
|
|
8383
|
+
type index$j_JsonHeader = JsonHeader;
|
|
8384
|
+
type index$j_JsonJudgement = JsonJudgement;
|
|
8385
|
+
type index$j_JsonObject<T> = JsonObject<T>;
|
|
8386
|
+
type index$j_JsonRefineContext = JsonRefineContext;
|
|
8387
|
+
type index$j_JsonReportGuarantee = JsonReportGuarantee;
|
|
8388
|
+
type index$j_JsonVerdict = JsonVerdict;
|
|
8389
|
+
type index$j_JsonWorkExecResult = JsonWorkExecResult;
|
|
8390
|
+
type index$j_JsonWorkRefineLoad = JsonWorkRefineLoad;
|
|
8391
|
+
type index$j_JsonWorkReport = JsonWorkReport;
|
|
8392
|
+
type index$j_JsonWorkResult = JsonWorkResult;
|
|
8393
|
+
declare const index$j_bandersnatchVrfSignature: typeof bandersnatchVrfSignature;
|
|
8394
|
+
declare const index$j_blockFromJson: typeof blockFromJson;
|
|
8395
|
+
declare const index$j_culpritFromJson: typeof culpritFromJson;
|
|
8396
|
+
declare const index$j_disputesExtrinsicFromJson: typeof disputesExtrinsicFromJson;
|
|
8397
|
+
declare const index$j_epochMark: typeof epochMark;
|
|
8398
|
+
declare const index$j_faultFromJson: typeof faultFromJson;
|
|
8399
|
+
import index$j_fromJson = fromJson;
|
|
8400
|
+
declare const index$j_getAssurancesExtrinsicFromJson: typeof getAssurancesExtrinsicFromJson;
|
|
8401
|
+
declare const index$j_getAvailabilityAssuranceFromJson: typeof getAvailabilityAssuranceFromJson;
|
|
8402
|
+
declare const index$j_getExtrinsicFromJson: typeof getExtrinsicFromJson;
|
|
8403
|
+
declare const index$j_guaranteesExtrinsicFromJson: typeof guaranteesExtrinsicFromJson;
|
|
8404
|
+
declare const index$j_headerFromJson: typeof headerFromJson;
|
|
8405
|
+
declare const index$j_judgementFromJson: typeof judgementFromJson;
|
|
8406
|
+
declare const index$j_preimageFromJson: typeof preimageFromJson;
|
|
8407
|
+
declare const index$j_preimagesExtrinsicFromJson: typeof preimagesExtrinsicFromJson;
|
|
8408
|
+
declare const index$j_refineContextFromJson: typeof refineContextFromJson;
|
|
8409
|
+
declare const index$j_reportGuaranteeFromJson: typeof reportGuaranteeFromJson;
|
|
8410
|
+
declare const index$j_segmentRootLookupItemFromJson: typeof segmentRootLookupItemFromJson;
|
|
8411
|
+
declare const index$j_ticket: typeof ticket;
|
|
8412
|
+
declare const index$j_ticketEnvelopeFromJson: typeof ticketEnvelopeFromJson;
|
|
8413
|
+
declare const index$j_ticketsExtrinsicFromJson: typeof ticketsExtrinsicFromJson;
|
|
8414
|
+
declare const index$j_validatorKeysFromJson: typeof validatorKeysFromJson;
|
|
8415
|
+
declare const index$j_validatorSignatureFromJson: typeof validatorSignatureFromJson;
|
|
8416
|
+
declare const index$j_verdictFromJson: typeof verdictFromJson;
|
|
8417
|
+
declare const index$j_workExecResultFromJson: typeof workExecResultFromJson;
|
|
8418
|
+
declare const index$j_workPackageSpecFromJson: typeof workPackageSpecFromJson;
|
|
8419
|
+
declare const index$j_workRefineLoadFromJson: typeof workRefineLoadFromJson;
|
|
8420
|
+
declare const index$j_workReportFromJson: typeof workReportFromJson;
|
|
8421
|
+
declare const index$j_workResultFromJson: typeof workResultFromJson;
|
|
8422
|
+
declare namespace index$j {
|
|
8423
|
+
export { index$j_bandersnatchVrfSignature as bandersnatchVrfSignature, index$j_blockFromJson as blockFromJson, index$j_culpritFromJson as culpritFromJson, index$j_disputesExtrinsicFromJson as disputesExtrinsicFromJson, index$j_epochMark as epochMark, index$j_faultFromJson as faultFromJson, index$j_fromJson as fromJson, index$j_getAssurancesExtrinsicFromJson as getAssurancesExtrinsicFromJson, index$j_getAvailabilityAssuranceFromJson as getAvailabilityAssuranceFromJson, index$j_getExtrinsicFromJson as getExtrinsicFromJson, index$j_guaranteesExtrinsicFromJson as guaranteesExtrinsicFromJson, index$j_headerFromJson as headerFromJson, index$j_judgementFromJson as judgementFromJson, index$j_preimageFromJson as preimageFromJson, index$j_preimagesExtrinsicFromJson as preimagesExtrinsicFromJson, index$j_refineContextFromJson as refineContextFromJson, index$j_reportGuaranteeFromJson as reportGuaranteeFromJson, index$j_segmentRootLookupItemFromJson as segmentRootLookupItemFromJson, index$j_ticket as ticket, index$j_ticketEnvelopeFromJson as ticketEnvelopeFromJson, index$j_ticketsExtrinsicFromJson as ticketsExtrinsicFromJson, index$j_validatorKeysFromJson as validatorKeysFromJson, index$j_validatorSignatureFromJson as validatorSignatureFromJson, index$j_verdictFromJson as verdictFromJson, index$j_workExecResultFromJson as workExecResultFromJson, index$j_workPackageSpecFromJson as workPackageSpecFromJson, index$j_workRefineLoadFromJson as workRefineLoadFromJson, index$j_workReportFromJson as workReportFromJson, index$j_workResultFromJson as workResultFromJson };
|
|
8424
|
+
export type { index$j_CamelToSnake as CamelToSnake, index$j_JsonCulprit as JsonCulprit, index$j_JsonEpochMarker as JsonEpochMarker, index$j_JsonFault as JsonFault, index$j_JsonHeader as JsonHeader, index$j_JsonJudgement as JsonJudgement, index$j_JsonObject as JsonObject, index$j_JsonRefineContext as JsonRefineContext, index$j_JsonReportGuarantee as JsonReportGuarantee, index$j_JsonVerdict as JsonVerdict, index$j_JsonWorkExecResult as JsonWorkExecResult, index$j_JsonWorkRefineLoad as JsonWorkRefineLoad, index$j_JsonWorkReport as JsonWorkReport, index$j_JsonWorkResult as JsonWorkResult };
|
|
7903
8425
|
}
|
|
7904
8426
|
|
|
7905
8427
|
declare function parseBootnode(v: string): Bootnode {
|
|
@@ -7911,7 +8433,7 @@ declare function parseBootnode(v: string): Bootnode {
|
|
|
7911
8433
|
throw new Error(`Invalid bootnode format, expected: <name>@<ip>:<port>, got: "${v}"`);
|
|
7912
8434
|
}
|
|
7913
8435
|
|
|
7914
|
-
const portNumber = Number.parseInt(port);
|
|
8436
|
+
const portNumber = Number.parseInt(port, 10);
|
|
7915
8437
|
if (!isU16(portNumber)) {
|
|
7916
8438
|
throw new Error(`Invalid port number: "${port}"`);
|
|
7917
8439
|
}
|
|
@@ -8147,16 +8669,16 @@ declare class Logger {
|
|
|
8147
8669
|
}
|
|
8148
8670
|
}
|
|
8149
8671
|
|
|
8150
|
-
type index$
|
|
8151
|
-
declare const index$
|
|
8152
|
-
type index$
|
|
8153
|
-
declare const index$
|
|
8154
|
-
declare const index$
|
|
8155
|
-
declare namespace index$
|
|
8672
|
+
type index$i_Level = Level;
|
|
8673
|
+
declare const index$i_Level: typeof Level;
|
|
8674
|
+
type index$i_Logger = Logger;
|
|
8675
|
+
declare const index$i_Logger: typeof Logger;
|
|
8676
|
+
declare const index$i_parseLoggerOptions: typeof parseLoggerOptions;
|
|
8677
|
+
declare namespace index$i {
|
|
8156
8678
|
export {
|
|
8157
|
-
index$
|
|
8158
|
-
index$
|
|
8159
|
-
index$
|
|
8679
|
+
index$i_Level as Level,
|
|
8680
|
+
index$i_Logger as Logger,
|
|
8681
|
+
index$i_parseLoggerOptions as parseLoggerOptions,
|
|
8160
8682
|
};
|
|
8161
8683
|
}
|
|
8162
8684
|
|
|
@@ -8388,27 +8910,27 @@ declare function isJsonObject(value: JsonValue): value is AnyJsonObject {
|
|
|
8388
8910
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8389
8911
|
}
|
|
8390
8912
|
|
|
8391
|
-
type index$
|
|
8392
|
-
declare const index$
|
|
8393
|
-
declare const index$
|
|
8394
|
-
type index$
|
|
8395
|
-
declare const index$
|
|
8396
|
-
type index$
|
|
8397
|
-
type index$
|
|
8398
|
-
type index$
|
|
8399
|
-
declare const index$
|
|
8400
|
-
declare const index$
|
|
8401
|
-
type index$
|
|
8402
|
-
declare const index$
|
|
8403
|
-
declare const index$
|
|
8404
|
-
declare const index$
|
|
8405
|
-
declare const index$
|
|
8406
|
-
declare const index$
|
|
8407
|
-
declare const index$
|
|
8408
|
-
declare const index$
|
|
8409
|
-
declare namespace index$
|
|
8410
|
-
export { index$
|
|
8411
|
-
export type { index$
|
|
8913
|
+
type index$h_AnyJsonObject = AnyJsonObject;
|
|
8914
|
+
declare const index$h_DEFAULT_CONFIG: typeof DEFAULT_CONFIG;
|
|
8915
|
+
declare const index$h_DEV_CONFIG: typeof DEV_CONFIG;
|
|
8916
|
+
type index$h_JipChainSpec = JipChainSpec;
|
|
8917
|
+
declare const index$h_JipChainSpec: typeof JipChainSpec;
|
|
8918
|
+
type index$h_JsonArray = JsonArray;
|
|
8919
|
+
type index$h_JsonValue = JsonValue;
|
|
8920
|
+
type index$h_KnownChainSpec = KnownChainSpec;
|
|
8921
|
+
declare const index$h_KnownChainSpec: typeof KnownChainSpec;
|
|
8922
|
+
declare const index$h_NODE_DEFAULTS: typeof NODE_DEFAULTS;
|
|
8923
|
+
type index$h_NodeConfiguration = NodeConfiguration;
|
|
8924
|
+
declare const index$h_NodeConfiguration: typeof NodeConfiguration;
|
|
8925
|
+
declare const index$h_deepMerge: typeof deepMerge;
|
|
8926
|
+
declare const index$h_isJsonObject: typeof isJsonObject;
|
|
8927
|
+
declare const index$h_knownChainSpecFromJson: typeof knownChainSpecFromJson;
|
|
8928
|
+
declare const index$h_loadConfig: typeof loadConfig;
|
|
8929
|
+
declare const index$h_parseBootnode: typeof parseBootnode;
|
|
8930
|
+
declare const index$h_processQuery: typeof processQuery;
|
|
8931
|
+
declare namespace index$h {
|
|
8932
|
+
export { index$h_DEFAULT_CONFIG as DEFAULT_CONFIG, index$h_DEV_CONFIG as DEV_CONFIG, index$h_JipChainSpec as JipChainSpec, index$h_KnownChainSpec as KnownChainSpec, index$h_NODE_DEFAULTS as NODE_DEFAULTS, index$h_NodeConfiguration as NodeConfiguration, index$h_deepMerge as deepMerge, index$h_isJsonObject as isJsonObject, index$h_knownChainSpecFromJson as knownChainSpecFromJson, index$h_loadConfig as loadConfig, logger$2 as logger, index$h_parseBootnode as parseBootnode, index$h_processQuery as processQuery };
|
|
8933
|
+
export type { index$h_AnyJsonObject as AnyJsonObject, index$h_JsonArray as JsonArray, index$h_JsonValue as JsonValue };
|
|
8412
8934
|
}
|
|
8413
8935
|
|
|
8414
8936
|
/**
|
|
@@ -8695,7 +9217,6 @@ declare class LeafNode {
|
|
|
8695
9217
|
/**
|
|
8696
9218
|
* Get the byte length of embedded value.
|
|
8697
9219
|
*
|
|
8698
|
-
* @remark
|
|
8699
9220
|
* Note in case this node only contains hash this is going to be 0.
|
|
8700
9221
|
*/
|
|
8701
9222
|
getValueLength(): number {
|
|
@@ -8707,7 +9228,6 @@ declare class LeafNode {
|
|
|
8707
9228
|
/**
|
|
8708
9229
|
* Returns the embedded value.
|
|
8709
9230
|
*
|
|
8710
|
-
* @remark
|
|
8711
9231
|
* Note that this is going to be empty for a regular leaf node (i.e. containing a hash).
|
|
8712
9232
|
*/
|
|
8713
9233
|
getValue(): BytesBlob {
|
|
@@ -8718,7 +9238,6 @@ declare class LeafNode {
|
|
|
8718
9238
|
/**
|
|
8719
9239
|
* Returns contained value hash.
|
|
8720
9240
|
*
|
|
8721
|
-
* @remark
|
|
8722
9241
|
* Note that for embedded value this is going to be full 0-padded 32 bytes.
|
|
8723
9242
|
*/
|
|
8724
9243
|
getValueHash(): ValueHash {
|
|
@@ -9198,43 +9717,43 @@ declare const bitLookup = [
|
|
|
9198
9717
|
[0b00000000, 8],
|
|
9199
9718
|
];
|
|
9200
9719
|
|
|
9201
|
-
type index$
|
|
9202
|
-
declare const index$
|
|
9203
|
-
type index$
|
|
9204
|
-
declare const index$
|
|
9205
|
-
type index$
|
|
9206
|
-
type index$
|
|
9207
|
-
declare const index$
|
|
9208
|
-
type index$
|
|
9209
|
-
declare const index$
|
|
9210
|
-
type index$
|
|
9211
|
-
declare const index$
|
|
9212
|
-
declare const index$
|
|
9213
|
-
declare const index$
|
|
9214
|
-
type index$
|
|
9215
|
-
type index$
|
|
9216
|
-
declare const index$
|
|
9217
|
-
type index$
|
|
9218
|
-
type index$
|
|
9219
|
-
declare const index$
|
|
9220
|
-
type index$
|
|
9221
|
-
type index$
|
|
9222
|
-
type index$
|
|
9223
|
-
type index$
|
|
9224
|
-
declare const index$
|
|
9225
|
-
declare const index$
|
|
9226
|
-
declare const index$
|
|
9227
|
-
declare const index$
|
|
9228
|
-
declare const index$
|
|
9229
|
-
declare const index$
|
|
9230
|
-
declare const index$
|
|
9231
|
-
declare const index$
|
|
9232
|
-
declare const index$
|
|
9233
|
-
declare const index$
|
|
9234
|
-
declare const index$
|
|
9235
|
-
declare namespace index$
|
|
9236
|
-
export { index$
|
|
9237
|
-
export type { index$
|
|
9720
|
+
type index$g_BranchNode = BranchNode;
|
|
9721
|
+
declare const index$g_BranchNode: typeof BranchNode;
|
|
9722
|
+
type index$g_InMemoryTrie = InMemoryTrie;
|
|
9723
|
+
declare const index$g_InMemoryTrie: typeof InMemoryTrie;
|
|
9724
|
+
type index$g_InputKey = InputKey;
|
|
9725
|
+
type index$g_LeafNode = LeafNode;
|
|
9726
|
+
declare const index$g_LeafNode: typeof LeafNode;
|
|
9727
|
+
type index$g_NodeType = NodeType;
|
|
9728
|
+
declare const index$g_NodeType: typeof NodeType;
|
|
9729
|
+
type index$g_NodesDb = NodesDb;
|
|
9730
|
+
declare const index$g_NodesDb: typeof NodesDb;
|
|
9731
|
+
declare const index$g_TRIE_NODE_BYTES: typeof TRIE_NODE_BYTES;
|
|
9732
|
+
declare const index$g_TRUNCATED_KEY_BITS: typeof TRUNCATED_KEY_BITS;
|
|
9733
|
+
type index$g_TRUNCATED_KEY_BYTES = TRUNCATED_KEY_BYTES;
|
|
9734
|
+
type index$g_TraversedPath = TraversedPath;
|
|
9735
|
+
declare const index$g_TraversedPath: typeof TraversedPath;
|
|
9736
|
+
type index$g_TrieHasher = TrieHasher;
|
|
9737
|
+
type index$g_TrieNode = TrieNode;
|
|
9738
|
+
declare const index$g_TrieNode: typeof TrieNode;
|
|
9739
|
+
type index$g_TrieNodeHash = TrieNodeHash;
|
|
9740
|
+
type index$g_TruncatedStateKey = TruncatedStateKey;
|
|
9741
|
+
type index$g_ValueHash = ValueHash;
|
|
9742
|
+
type index$g_WriteableNodesDb = WriteableNodesDb;
|
|
9743
|
+
declare const index$g_WriteableNodesDb: typeof WriteableNodesDb;
|
|
9744
|
+
declare const index$g_bitLookup: typeof bitLookup;
|
|
9745
|
+
declare const index$g_createSubtreeForBothLeaves: typeof createSubtreeForBothLeaves;
|
|
9746
|
+
declare const index$g_findNodeToReplace: typeof findNodeToReplace;
|
|
9747
|
+
declare const index$g_findSharedPrefix: typeof findSharedPrefix;
|
|
9748
|
+
declare const index$g_getBit: typeof getBit;
|
|
9749
|
+
declare const index$g_leafComparator: typeof leafComparator;
|
|
9750
|
+
declare const index$g_parseInputKey: typeof parseInputKey;
|
|
9751
|
+
declare const index$g_trieInsert: typeof trieInsert;
|
|
9752
|
+
declare const index$g_trieStringify: typeof trieStringify;
|
|
9753
|
+
declare const index$g_zero: typeof zero;
|
|
9754
|
+
declare namespace index$g {
|
|
9755
|
+
export { index$g_BranchNode as BranchNode, index$g_InMemoryTrie as InMemoryTrie, index$g_LeafNode as LeafNode, index$g_NodeType as NodeType, index$g_NodesDb as NodesDb, index$g_TRIE_NODE_BYTES as TRIE_NODE_BYTES, index$g_TRUNCATED_KEY_BITS as TRUNCATED_KEY_BITS, index$g_TraversedPath as TraversedPath, index$g_TrieNode as TrieNode, index$g_WriteableNodesDb as WriteableNodesDb, index$g_bitLookup as bitLookup, index$g_createSubtreeForBothLeaves as createSubtreeForBothLeaves, index$g_findNodeToReplace as findNodeToReplace, index$g_findSharedPrefix as findSharedPrefix, index$g_getBit as getBit, index$g_leafComparator as leafComparator, index$g_parseInputKey as parseInputKey, index$g_trieInsert as trieInsert, index$g_trieStringify as trieStringify, index$g_zero as zero };
|
|
9756
|
+
export type { index$g_InputKey as InputKey, StateKey$1 as StateKey, index$g_TRUNCATED_KEY_BYTES as TRUNCATED_KEY_BYTES, index$g_TrieHasher as TrieHasher, index$g_TrieNodeHash as TrieNodeHash, index$g_TruncatedStateKey as TruncatedStateKey, index$g_ValueHash as ValueHash };
|
|
9238
9757
|
}
|
|
9239
9758
|
|
|
9240
9759
|
/**
|
|
@@ -9664,16 +10183,16 @@ declare class Mountain<H extends OpaqueHash> {
|
|
|
9664
10183
|
}
|
|
9665
10184
|
}
|
|
9666
10185
|
|
|
9667
|
-
type index$
|
|
9668
|
-
declare const index$
|
|
9669
|
-
type index$
|
|
9670
|
-
type index$
|
|
9671
|
-
type index$
|
|
9672
|
-
declare const index$
|
|
9673
|
-
declare const index$
|
|
9674
|
-
declare namespace index$
|
|
9675
|
-
export { index$
|
|
9676
|
-
export type { index$
|
|
10186
|
+
type index$f_MerkleMountainRange<H extends OpaqueHash> = MerkleMountainRange<H>;
|
|
10187
|
+
declare const index$f_MerkleMountainRange: typeof MerkleMountainRange;
|
|
10188
|
+
type index$f_MmrHasher<H extends OpaqueHash> = MmrHasher<H>;
|
|
10189
|
+
type index$f_MmrPeaks<H extends OpaqueHash> = MmrPeaks<H>;
|
|
10190
|
+
type index$f_Mountain<H extends OpaqueHash> = Mountain<H>;
|
|
10191
|
+
declare const index$f_Mountain: typeof Mountain;
|
|
10192
|
+
declare const index$f_SUPER_PEAK_STRING: typeof SUPER_PEAK_STRING;
|
|
10193
|
+
declare namespace index$f {
|
|
10194
|
+
export { index$f_MerkleMountainRange as MerkleMountainRange, index$f_Mountain as Mountain, index$f_SUPER_PEAK_STRING as SUPER_PEAK_STRING };
|
|
10195
|
+
export type { index$f_MmrHasher as MmrHasher, index$f_MmrPeaks as MmrPeaks };
|
|
9677
10196
|
}
|
|
9678
10197
|
|
|
9679
10198
|
/**
|
|
@@ -10777,11 +11296,32 @@ type StateView = {
|
|
|
10777
11296
|
};
|
|
10778
11297
|
|
|
10779
11298
|
declare enum UpdatePreimageKind {
|
|
10780
|
-
/**
|
|
11299
|
+
/**
|
|
11300
|
+
* Insert new preimage and optionally update it's lookup history.
|
|
11301
|
+
*
|
|
11302
|
+
* Used in: `provide`
|
|
11303
|
+
*
|
|
11304
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/383904383904?v=0.7.2
|
|
11305
|
+
*/
|
|
10781
11306
|
Provide = 0,
|
|
10782
|
-
/**
|
|
11307
|
+
/**
|
|
11308
|
+
* Remove a preimage and it's lookup history.
|
|
11309
|
+
*
|
|
11310
|
+
* Used in: `forget` and `eject`
|
|
11311
|
+
*
|
|
11312
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/38c701380202?v=0.7.2
|
|
11313
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/379102379302?v=0.7.2
|
|
11314
|
+
*/
|
|
10783
11315
|
Remove = 1,
|
|
10784
|
-
/**
|
|
11316
|
+
/**
|
|
11317
|
+
* Update or add lookup history for preimage hash/len to given value.
|
|
11318
|
+
*
|
|
11319
|
+
* Used in: `solicit` and `forget`
|
|
11320
|
+
*
|
|
11321
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/382802382802?v=0.7.2
|
|
11322
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/384002384b02?v=0.7.2
|
|
11323
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/38c60038ea00?v=0.7.2
|
|
11324
|
+
*/
|
|
10785
11325
|
UpdateOrAdd = 2,
|
|
10786
11326
|
}
|
|
10787
11327
|
/**
|
|
@@ -10789,7 +11329,7 @@ declare enum UpdatePreimageKind {
|
|
|
10789
11329
|
*
|
|
10790
11330
|
* Can be one of the following cases:
|
|
10791
11331
|
* 1. Provide a new preimage blob and set the lookup history to available at `slot`.
|
|
10792
|
-
* 2. Remove (
|
|
11332
|
+
* 2. Remove (forget) a preimage and it's lookup history.
|
|
10793
11333
|
* 3. Update `LookupHistory` with given value.
|
|
10794
11334
|
*/
|
|
10795
11335
|
declare class UpdatePreimage {
|
|
@@ -11560,123 +12100,123 @@ type FieldNames<T> = {
|
|
|
11560
12100
|
[K in keyof T]: T[K] extends Function ? never : K;
|
|
11561
12101
|
}[keyof T];
|
|
11562
12102
|
|
|
11563
|
-
type index$
|
|
11564
|
-
type index$
|
|
11565
|
-
declare const index$
|
|
11566
|
-
type index$
|
|
11567
|
-
type index$
|
|
11568
|
-
type index$
|
|
11569
|
-
type index$
|
|
11570
|
-
type index$
|
|
11571
|
-
declare const index$
|
|
11572
|
-
type index$
|
|
11573
|
-
declare const index$
|
|
11574
|
-
type index$
|
|
11575
|
-
declare const index$
|
|
11576
|
-
type index$
|
|
11577
|
-
type index$
|
|
11578
|
-
declare const index$
|
|
11579
|
-
type index$
|
|
11580
|
-
declare const index$
|
|
11581
|
-
declare const index$
|
|
11582
|
-
declare const index$
|
|
11583
|
-
type index$
|
|
11584
|
-
type index$
|
|
11585
|
-
type index$
|
|
11586
|
-
type index$
|
|
11587
|
-
declare const index$
|
|
11588
|
-
type index$
|
|
11589
|
-
declare const index$
|
|
11590
|
-
type index$
|
|
11591
|
-
type index$
|
|
11592
|
-
declare const index$
|
|
11593
|
-
type index$
|
|
11594
|
-
type index$
|
|
11595
|
-
declare const index$
|
|
11596
|
-
type index$
|
|
11597
|
-
type index$
|
|
11598
|
-
declare const index$
|
|
11599
|
-
type index$
|
|
11600
|
-
type index$
|
|
11601
|
-
declare const index$
|
|
11602
|
-
type index$
|
|
11603
|
-
declare const index$
|
|
11604
|
-
type index$
|
|
11605
|
-
declare const index$
|
|
11606
|
-
type index$
|
|
11607
|
-
type index$
|
|
11608
|
-
type index$
|
|
11609
|
-
type index$
|
|
11610
|
-
declare const index$
|
|
11611
|
-
type index$
|
|
11612
|
-
type index$
|
|
11613
|
-
type index$
|
|
11614
|
-
declare const index$
|
|
11615
|
-
type index$
|
|
11616
|
-
declare const index$
|
|
11617
|
-
type index$
|
|
11618
|
-
type index$
|
|
11619
|
-
declare const index$
|
|
11620
|
-
type index$
|
|
11621
|
-
type index$
|
|
11622
|
-
type index$
|
|
11623
|
-
type index$
|
|
11624
|
-
declare const index$
|
|
11625
|
-
type index$
|
|
11626
|
-
type index$
|
|
11627
|
-
type index$
|
|
11628
|
-
type index$
|
|
11629
|
-
declare const index$
|
|
11630
|
-
type index$
|
|
11631
|
-
type index$
|
|
11632
|
-
declare const index$
|
|
11633
|
-
type index$
|
|
11634
|
-
type index$
|
|
11635
|
-
declare const index$
|
|
11636
|
-
type index$
|
|
11637
|
-
declare const index$
|
|
11638
|
-
type index$
|
|
11639
|
-
declare const index$
|
|
11640
|
-
type index$
|
|
11641
|
-
declare const index$
|
|
11642
|
-
type index$
|
|
11643
|
-
declare const index$
|
|
11644
|
-
type index$
|
|
11645
|
-
declare const index$
|
|
11646
|
-
type index$
|
|
11647
|
-
declare const index$
|
|
11648
|
-
type index$
|
|
11649
|
-
type index$
|
|
11650
|
-
declare const index$
|
|
11651
|
-
type index$
|
|
11652
|
-
type index$
|
|
11653
|
-
declare const index$
|
|
11654
|
-
type index$
|
|
11655
|
-
declare const index$
|
|
11656
|
-
declare const index$
|
|
11657
|
-
declare const index$
|
|
11658
|
-
declare const index$
|
|
11659
|
-
declare const index$
|
|
11660
|
-
declare const index$
|
|
11661
|
-
declare const index$
|
|
11662
|
-
declare const index$
|
|
11663
|
-
declare const index$
|
|
11664
|
-
declare const index$
|
|
11665
|
-
declare const index$
|
|
11666
|
-
declare const index$
|
|
11667
|
-
declare const index$
|
|
11668
|
-
declare const index$
|
|
11669
|
-
declare const index$
|
|
11670
|
-
declare const index$
|
|
11671
|
-
declare const index$
|
|
11672
|
-
declare const index$
|
|
11673
|
-
declare const index$
|
|
11674
|
-
declare const index$
|
|
11675
|
-
declare const index$
|
|
11676
|
-
declare const index$
|
|
11677
|
-
declare namespace index$
|
|
11678
|
-
export { index$
|
|
11679
|
-
export type { index$
|
|
12103
|
+
type index$e_AUTHORIZATION_QUEUE_SIZE = AUTHORIZATION_QUEUE_SIZE;
|
|
12104
|
+
type index$e_AccumulationOutput = AccumulationOutput;
|
|
12105
|
+
declare const index$e_AccumulationOutput: typeof AccumulationOutput;
|
|
12106
|
+
type index$e_AccumulationQueue = AccumulationQueue;
|
|
12107
|
+
type index$e_AccumulationQueueView = AccumulationQueueView;
|
|
12108
|
+
type index$e_AuthorizationPool = AuthorizationPool;
|
|
12109
|
+
type index$e_AuthorizationQueue = AuthorizationQueue;
|
|
12110
|
+
type index$e_AvailabilityAssignment = AvailabilityAssignment;
|
|
12111
|
+
declare const index$e_AvailabilityAssignment: typeof AvailabilityAssignment;
|
|
12112
|
+
type index$e_AvailabilityAssignmentsView = AvailabilityAssignmentsView;
|
|
12113
|
+
declare const index$e_BASE_SERVICE_BALANCE: typeof BASE_SERVICE_BALANCE;
|
|
12114
|
+
type index$e_BlockState = BlockState;
|
|
12115
|
+
declare const index$e_BlockState: typeof BlockState;
|
|
12116
|
+
type index$e_BlocksState = BlocksState;
|
|
12117
|
+
type index$e_CoreStatistics = CoreStatistics;
|
|
12118
|
+
declare const index$e_CoreStatistics: typeof CoreStatistics;
|
|
12119
|
+
type index$e_DisputesRecords = DisputesRecords;
|
|
12120
|
+
declare const index$e_DisputesRecords: typeof DisputesRecords;
|
|
12121
|
+
declare const index$e_ELECTIVE_BYTE_BALANCE: typeof ELECTIVE_BYTE_BALANCE;
|
|
12122
|
+
declare const index$e_ELECTIVE_ITEM_BALANCE: typeof ELECTIVE_ITEM_BALANCE;
|
|
12123
|
+
type index$e_ENTROPY_ENTRIES = ENTROPY_ENTRIES;
|
|
12124
|
+
type index$e_EnumerableState = EnumerableState;
|
|
12125
|
+
type index$e_FieldNames<T> = FieldNames<T>;
|
|
12126
|
+
type index$e_InMemoryService = InMemoryService;
|
|
12127
|
+
declare const index$e_InMemoryService: typeof InMemoryService;
|
|
12128
|
+
type index$e_InMemoryState = InMemoryState;
|
|
12129
|
+
declare const index$e_InMemoryState: typeof InMemoryState;
|
|
12130
|
+
type index$e_InMemoryStateFields = InMemoryStateFields;
|
|
12131
|
+
type index$e_LookupHistoryItem = LookupHistoryItem;
|
|
12132
|
+
declare const index$e_LookupHistoryItem: typeof LookupHistoryItem;
|
|
12133
|
+
type index$e_LookupHistorySlots = LookupHistorySlots;
|
|
12134
|
+
type index$e_MAX_AUTH_POOL_SIZE = MAX_AUTH_POOL_SIZE;
|
|
12135
|
+
declare const index$e_MAX_LOOKUP_HISTORY_SLOTS: typeof MAX_LOOKUP_HISTORY_SLOTS;
|
|
12136
|
+
type index$e_MAX_RECENT_HISTORY = MAX_RECENT_HISTORY;
|
|
12137
|
+
type index$e_NotYetAccumulatedReport = NotYetAccumulatedReport;
|
|
12138
|
+
declare const index$e_NotYetAccumulatedReport: typeof NotYetAccumulatedReport;
|
|
12139
|
+
type index$e_PerCore<T> = PerCore<T>;
|
|
12140
|
+
type index$e_PreimageItem = PreimageItem;
|
|
12141
|
+
declare const index$e_PreimageItem: typeof PreimageItem;
|
|
12142
|
+
type index$e_PrivilegedServices = PrivilegedServices;
|
|
12143
|
+
declare const index$e_PrivilegedServices: typeof PrivilegedServices;
|
|
12144
|
+
type index$e_RecentBlocks = RecentBlocks;
|
|
12145
|
+
declare const index$e_RecentBlocks: typeof RecentBlocks;
|
|
12146
|
+
type index$e_RecentBlocksView = RecentBlocksView;
|
|
12147
|
+
type index$e_RecentlyAccumulated = RecentlyAccumulated;
|
|
12148
|
+
type index$e_RecentlyAccumulatedView = RecentlyAccumulatedView;
|
|
12149
|
+
type index$e_SafroleData = SafroleData;
|
|
12150
|
+
declare const index$e_SafroleData: typeof SafroleData;
|
|
12151
|
+
type index$e_SafroleDataView = SafroleDataView;
|
|
12152
|
+
type index$e_SafroleSealingKeys = SafroleSealingKeys;
|
|
12153
|
+
type index$e_SafroleSealingKeysData = SafroleSealingKeysData;
|
|
12154
|
+
declare const index$e_SafroleSealingKeysData: typeof SafroleSealingKeysData;
|
|
12155
|
+
type index$e_SafroleSealingKeysKind = SafroleSealingKeysKind;
|
|
12156
|
+
declare const index$e_SafroleSealingKeysKind: typeof SafroleSealingKeysKind;
|
|
12157
|
+
type index$e_Service = Service;
|
|
12158
|
+
type index$e_ServiceAccountInfo = ServiceAccountInfo;
|
|
12159
|
+
declare const index$e_ServiceAccountInfo: typeof ServiceAccountInfo;
|
|
12160
|
+
type index$e_ServiceAccountInfoView = ServiceAccountInfoView;
|
|
12161
|
+
type index$e_ServiceData = ServiceData;
|
|
12162
|
+
type index$e_ServiceEntries = ServiceEntries;
|
|
12163
|
+
type index$e_ServiceStatistics = ServiceStatistics;
|
|
12164
|
+
declare const index$e_ServiceStatistics: typeof ServiceStatistics;
|
|
12165
|
+
type index$e_ServicesUpdate = ServicesUpdate;
|
|
12166
|
+
type index$e_State = State;
|
|
12167
|
+
type index$e_StateView = StateView;
|
|
12168
|
+
type index$e_StatisticsData = StatisticsData;
|
|
12169
|
+
declare const index$e_StatisticsData: typeof StatisticsData;
|
|
12170
|
+
type index$e_StatisticsDataView = StatisticsDataView;
|
|
12171
|
+
type index$e_StorageItem = StorageItem;
|
|
12172
|
+
declare const index$e_StorageItem: typeof StorageItem;
|
|
12173
|
+
type index$e_StorageKey = StorageKey;
|
|
12174
|
+
type index$e_UpdateError = UpdateError;
|
|
12175
|
+
declare const index$e_UpdateError: typeof UpdateError;
|
|
12176
|
+
type index$e_UpdatePreimage = UpdatePreimage;
|
|
12177
|
+
declare const index$e_UpdatePreimage: typeof UpdatePreimage;
|
|
12178
|
+
type index$e_UpdatePreimageKind = UpdatePreimageKind;
|
|
12179
|
+
declare const index$e_UpdatePreimageKind: typeof UpdatePreimageKind;
|
|
12180
|
+
type index$e_UpdateService = UpdateService;
|
|
12181
|
+
declare const index$e_UpdateService: typeof UpdateService;
|
|
12182
|
+
type index$e_UpdateServiceKind = UpdateServiceKind;
|
|
12183
|
+
declare const index$e_UpdateServiceKind: typeof UpdateServiceKind;
|
|
12184
|
+
type index$e_UpdateStorage = UpdateStorage;
|
|
12185
|
+
declare const index$e_UpdateStorage: typeof UpdateStorage;
|
|
12186
|
+
type index$e_UpdateStorageKind = UpdateStorageKind;
|
|
12187
|
+
declare const index$e_UpdateStorageKind: typeof UpdateStorageKind;
|
|
12188
|
+
type index$e_VALIDATOR_META_BYTES = VALIDATOR_META_BYTES;
|
|
12189
|
+
type index$e_ValidatorData = ValidatorData;
|
|
12190
|
+
declare const index$e_ValidatorData: typeof ValidatorData;
|
|
12191
|
+
type index$e_ValidatorDataView = ValidatorDataView;
|
|
12192
|
+
type index$e_ValidatorStatistics = ValidatorStatistics;
|
|
12193
|
+
declare const index$e_ValidatorStatistics: typeof ValidatorStatistics;
|
|
12194
|
+
type index$e_WithStateView<V = StateView> = WithStateView<V>;
|
|
12195
|
+
declare const index$e_accumulationOutputComparator: typeof accumulationOutputComparator;
|
|
12196
|
+
declare const index$e_accumulationQueueCodec: typeof accumulationQueueCodec;
|
|
12197
|
+
declare const index$e_authPoolsCodec: typeof authPoolsCodec;
|
|
12198
|
+
declare const index$e_authQueuesCodec: typeof authQueuesCodec;
|
|
12199
|
+
declare const index$e_availabilityAssignmentsCodec: typeof availabilityAssignmentsCodec;
|
|
12200
|
+
declare const index$e_codecBandersnatchKey: typeof codecBandersnatchKey;
|
|
12201
|
+
declare const index$e_codecPerCore: typeof codecPerCore;
|
|
12202
|
+
declare const index$e_codecServiceId: typeof codecServiceId;
|
|
12203
|
+
declare const index$e_codecVarGas: typeof codecVarGas;
|
|
12204
|
+
declare const index$e_codecVarU16: typeof codecVarU16;
|
|
12205
|
+
declare const index$e_codecWithVersion: typeof codecWithVersion;
|
|
12206
|
+
declare const index$e_hashComparator: typeof hashComparator;
|
|
12207
|
+
declare const index$e_ignoreValueWithDefault: typeof ignoreValueWithDefault;
|
|
12208
|
+
declare const index$e_recentlyAccumulatedCodec: typeof recentlyAccumulatedCodec;
|
|
12209
|
+
declare const index$e_serviceDataCodec: typeof serviceDataCodec;
|
|
12210
|
+
declare const index$e_serviceEntriesCodec: typeof serviceEntriesCodec;
|
|
12211
|
+
declare const index$e_sortedSetCodec: typeof sortedSetCodec;
|
|
12212
|
+
declare const index$e_tryAsLookupHistorySlots: typeof tryAsLookupHistorySlots;
|
|
12213
|
+
declare const index$e_tryAsPerCore: typeof tryAsPerCore;
|
|
12214
|
+
declare const index$e_validatorsDataCodec: typeof validatorsDataCodec;
|
|
12215
|
+
declare const index$e_workReportsSortedSetCodec: typeof workReportsSortedSetCodec;
|
|
12216
|
+
declare const index$e_zeroSizeHint: typeof zeroSizeHint;
|
|
12217
|
+
declare namespace index$e {
|
|
12218
|
+
export { index$e_AccumulationOutput as AccumulationOutput, index$e_AvailabilityAssignment as AvailabilityAssignment, index$e_BASE_SERVICE_BALANCE as BASE_SERVICE_BALANCE, index$e_BlockState as BlockState, index$e_CoreStatistics as CoreStatistics, index$e_DisputesRecords as DisputesRecords, index$e_ELECTIVE_BYTE_BALANCE as ELECTIVE_BYTE_BALANCE, index$e_ELECTIVE_ITEM_BALANCE as ELECTIVE_ITEM_BALANCE, index$e_InMemoryService as InMemoryService, index$e_InMemoryState as InMemoryState, index$e_LookupHistoryItem as LookupHistoryItem, index$e_MAX_LOOKUP_HISTORY_SLOTS as MAX_LOOKUP_HISTORY_SLOTS, index$e_NotYetAccumulatedReport as NotYetAccumulatedReport, index$e_PreimageItem as PreimageItem, index$e_PrivilegedServices as PrivilegedServices, index$e_RecentBlocks as RecentBlocks, index$e_SafroleData as SafroleData, index$e_SafroleSealingKeysData as SafroleSealingKeysData, index$e_SafroleSealingKeysKind as SafroleSealingKeysKind, index$e_ServiceAccountInfo as ServiceAccountInfo, index$e_ServiceStatistics as ServiceStatistics, index$e_StatisticsData as StatisticsData, index$e_StorageItem as StorageItem, index$e_UpdateError as UpdateError, index$e_UpdatePreimage as UpdatePreimage, index$e_UpdatePreimageKind as UpdatePreimageKind, index$e_UpdateService as UpdateService, index$e_UpdateServiceKind as UpdateServiceKind, index$e_UpdateStorage as UpdateStorage, index$e_UpdateStorageKind as UpdateStorageKind, index$e_ValidatorData as ValidatorData, index$e_ValidatorStatistics as ValidatorStatistics, index$e_accumulationOutputComparator as accumulationOutputComparator, index$e_accumulationQueueCodec as accumulationQueueCodec, index$e_authPoolsCodec as authPoolsCodec, index$e_authQueuesCodec as authQueuesCodec, index$e_availabilityAssignmentsCodec as availabilityAssignmentsCodec, index$e_codecBandersnatchKey as codecBandersnatchKey, index$e_codecPerCore as codecPerCore, index$e_codecServiceId as codecServiceId, index$e_codecVarGas as codecVarGas, index$e_codecVarU16 as codecVarU16, index$e_codecWithVersion as codecWithVersion, index$e_hashComparator as hashComparator, index$e_ignoreValueWithDefault as ignoreValueWithDefault, index$e_recentlyAccumulatedCodec as recentlyAccumulatedCodec, index$e_serviceDataCodec as serviceDataCodec, index$e_serviceEntriesCodec as serviceEntriesCodec, index$e_sortedSetCodec as sortedSetCodec, index$e_tryAsLookupHistorySlots as tryAsLookupHistorySlots, index$e_tryAsPerCore as tryAsPerCore, index$e_validatorsDataCodec as validatorsDataCodec, index$e_workReportsSortedSetCodec as workReportsSortedSetCodec, index$e_zeroSizeHint as zeroSizeHint };
|
|
12219
|
+
export type { index$e_AUTHORIZATION_QUEUE_SIZE as AUTHORIZATION_QUEUE_SIZE, index$e_AccumulationQueue as AccumulationQueue, index$e_AccumulationQueueView as AccumulationQueueView, index$e_AuthorizationPool as AuthorizationPool, index$e_AuthorizationQueue as AuthorizationQueue, index$e_AvailabilityAssignmentsView as AvailabilityAssignmentsView, index$e_BlocksState as BlocksState, index$e_ENTROPY_ENTRIES as ENTROPY_ENTRIES, index$e_EnumerableState as EnumerableState, index$e_FieldNames as FieldNames, index$e_InMemoryStateFields as InMemoryStateFields, index$e_LookupHistorySlots as LookupHistorySlots, index$e_MAX_AUTH_POOL_SIZE as MAX_AUTH_POOL_SIZE, index$e_MAX_RECENT_HISTORY as MAX_RECENT_HISTORY, index$e_PerCore as PerCore, index$e_RecentBlocksView as RecentBlocksView, index$e_RecentlyAccumulated as RecentlyAccumulated, index$e_RecentlyAccumulatedView as RecentlyAccumulatedView, index$e_SafroleDataView as SafroleDataView, index$e_SafroleSealingKeys as SafroleSealingKeys, index$e_Service as Service, index$e_ServiceAccountInfoView as ServiceAccountInfoView, index$e_ServiceData as ServiceData, index$e_ServiceEntries as ServiceEntries, index$e_ServicesUpdate as ServicesUpdate, index$e_State as State, index$e_StateView as StateView, index$e_StatisticsDataView as StatisticsDataView, index$e_StorageKey as StorageKey, index$e_VALIDATOR_META_BYTES as VALIDATOR_META_BYTES, index$e_ValidatorDataView as ValidatorDataView, index$e_WithStateView as WithStateView };
|
|
11680
12220
|
}
|
|
11681
12221
|
|
|
11682
12222
|
type StateKey = Opaque<OpaqueHash, "stateKey">;
|
|
@@ -12775,47 +13315,47 @@ declare function loadState(spec: ChainSpec, blake2b: Blake2b, entries: Iterable<
|
|
|
12775
13315
|
* hashmap of `key -> value` entries.
|
|
12776
13316
|
*/
|
|
12777
13317
|
|
|
12778
|
-
declare const index$
|
|
12779
|
-
type index$
|
|
12780
|
-
type index$
|
|
12781
|
-
type index$
|
|
12782
|
-
type index$
|
|
12783
|
-
declare const index$
|
|
12784
|
-
type index$
|
|
12785
|
-
declare const index$
|
|
12786
|
-
type index$
|
|
12787
|
-
type index$
|
|
12788
|
-
declare const index$
|
|
12789
|
-
type index$
|
|
12790
|
-
type index$
|
|
12791
|
-
declare const index$
|
|
12792
|
-
type index$
|
|
12793
|
-
type index$
|
|
12794
|
-
declare const index$
|
|
12795
|
-
type index$
|
|
12796
|
-
type index$
|
|
12797
|
-
declare const index$
|
|
12798
|
-
declare const index$
|
|
12799
|
-
declare const index$
|
|
12800
|
-
declare const index$
|
|
12801
|
-
declare const index$
|
|
12802
|
-
declare const index$
|
|
12803
|
-
declare const index$
|
|
12804
|
-
declare const index$
|
|
12805
|
-
declare const index$
|
|
12806
|
-
declare const index$
|
|
12807
|
-
import index$
|
|
12808
|
-
declare const index$
|
|
12809
|
-
declare const index$
|
|
12810
|
-
declare const index$
|
|
12811
|
-
declare const index$
|
|
12812
|
-
declare const index$
|
|
12813
|
-
declare const index$
|
|
12814
|
-
declare const index$
|
|
12815
|
-
import index$
|
|
12816
|
-
declare namespace index$
|
|
12817
|
-
export { index$
|
|
12818
|
-
export type { index$
|
|
13318
|
+
declare const index$d_EMPTY_BLOB: typeof EMPTY_BLOB;
|
|
13319
|
+
type index$d_EncodeFun = EncodeFun;
|
|
13320
|
+
type index$d_KeyAndCodec<T> = KeyAndCodec<T>;
|
|
13321
|
+
type index$d_KeyAndCodecWithView<T, V> = KeyAndCodecWithView<T, V>;
|
|
13322
|
+
type index$d_SerializedService = SerializedService;
|
|
13323
|
+
declare const index$d_SerializedService: typeof SerializedService;
|
|
13324
|
+
type index$d_SerializedState<T extends SerializedStateBackend = SerializedStateBackend> = SerializedState<T>;
|
|
13325
|
+
declare const index$d_SerializedState: typeof SerializedState;
|
|
13326
|
+
type index$d_SerializedStateBackend = SerializedStateBackend;
|
|
13327
|
+
type index$d_SerializedStateView<T extends SerializedStateBackend> = SerializedStateView<T>;
|
|
13328
|
+
declare const index$d_SerializedStateView: typeof SerializedStateView;
|
|
13329
|
+
type index$d_StateCodec<T, V = T> = StateCodec<T, V>;
|
|
13330
|
+
type index$d_StateEntries = StateEntries;
|
|
13331
|
+
declare const index$d_StateEntries: typeof StateEntries;
|
|
13332
|
+
type index$d_StateEntryUpdate = StateEntryUpdate;
|
|
13333
|
+
type index$d_StateEntryUpdateAction = StateEntryUpdateAction;
|
|
13334
|
+
declare const index$d_StateEntryUpdateAction: typeof StateEntryUpdateAction;
|
|
13335
|
+
type index$d_StateKey = StateKey;
|
|
13336
|
+
type index$d_StateKeyIdx = StateKeyIdx;
|
|
13337
|
+
declare const index$d_StateKeyIdx: typeof StateKeyIdx;
|
|
13338
|
+
declare const index$d_TYPICAL_STATE_ITEMS: typeof TYPICAL_STATE_ITEMS;
|
|
13339
|
+
declare const index$d_TYPICAL_STATE_ITEM_LEN: typeof TYPICAL_STATE_ITEM_LEN;
|
|
13340
|
+
declare const index$d_U32_BYTES: typeof U32_BYTES;
|
|
13341
|
+
declare const index$d_binaryMerkleization: typeof binaryMerkleization;
|
|
13342
|
+
declare const index$d_convertInMemoryStateToDictionary: typeof convertInMemoryStateToDictionary;
|
|
13343
|
+
declare const index$d_dumpCodec: typeof dumpCodec;
|
|
13344
|
+
declare const index$d_getSafroleData: typeof getSafroleData;
|
|
13345
|
+
declare const index$d_legacyServiceNested: typeof legacyServiceNested;
|
|
13346
|
+
declare const index$d_loadState: typeof loadState;
|
|
13347
|
+
import index$d_serialize = serialize;
|
|
13348
|
+
declare const index$d_serializeBasicKeys: typeof serializeBasicKeys;
|
|
13349
|
+
declare const index$d_serializePreimages: typeof serializePreimages;
|
|
13350
|
+
declare const index$d_serializeRemovedServices: typeof serializeRemovedServices;
|
|
13351
|
+
declare const index$d_serializeServiceUpdates: typeof serializeServiceUpdates;
|
|
13352
|
+
declare const index$d_serializeStateUpdate: typeof serializeStateUpdate;
|
|
13353
|
+
declare const index$d_serializeStorage: typeof serializeStorage;
|
|
13354
|
+
declare const index$d_stateEntriesSequenceCodec: typeof stateEntriesSequenceCodec;
|
|
13355
|
+
import index$d_stateKeys = stateKeys;
|
|
13356
|
+
declare namespace index$d {
|
|
13357
|
+
export { index$d_EMPTY_BLOB as EMPTY_BLOB, index$d_SerializedService as SerializedService, index$d_SerializedState as SerializedState, index$d_SerializedStateView as SerializedStateView, index$d_StateEntries as StateEntries, index$d_StateEntryUpdateAction as StateEntryUpdateAction, index$d_StateKeyIdx as StateKeyIdx, index$d_TYPICAL_STATE_ITEMS as TYPICAL_STATE_ITEMS, index$d_TYPICAL_STATE_ITEM_LEN as TYPICAL_STATE_ITEM_LEN, index$d_U32_BYTES as U32_BYTES, index$d_binaryMerkleization as binaryMerkleization, index$d_convertInMemoryStateToDictionary as convertInMemoryStateToDictionary, index$d_dumpCodec as dumpCodec, index$d_getSafroleData as getSafroleData, index$d_legacyServiceNested as legacyServiceNested, index$d_loadState as loadState, index$d_serialize as serialize, index$d_serializeBasicKeys as serializeBasicKeys, index$d_serializePreimages as serializePreimages, index$d_serializeRemovedServices as serializeRemovedServices, index$d_serializeServiceUpdates as serializeServiceUpdates, index$d_serializeStateUpdate as serializeStateUpdate, index$d_serializeStorage as serializeStorage, index$d_stateEntriesSequenceCodec as stateEntriesSequenceCodec, index$d_stateKeys as stateKeys };
|
|
13358
|
+
export type { index$d_EncodeFun as EncodeFun, index$d_KeyAndCodec as KeyAndCodec, index$d_KeyAndCodecWithView as KeyAndCodecWithView, index$d_SerializedStateBackend as SerializedStateBackend, index$d_StateCodec as StateCodec, index$d_StateEntryUpdate as StateEntryUpdate, index$d_StateKey as StateKey };
|
|
12819
13359
|
}
|
|
12820
13360
|
|
|
12821
13361
|
/** Error during `LeafDb` creation. */
|
|
@@ -13171,31 +13711,31 @@ declare class InMemorySerializedStates implements StatesDb<SerializedState<LeafD
|
|
|
13171
13711
|
async close() {}
|
|
13172
13712
|
}
|
|
13173
13713
|
|
|
13174
|
-
type index$
|
|
13175
|
-
type index$
|
|
13176
|
-
declare const index$
|
|
13177
|
-
type index$
|
|
13178
|
-
declare const index$
|
|
13179
|
-
type index$
|
|
13180
|
-
declare const index$
|
|
13181
|
-
type index$
|
|
13182
|
-
type index$
|
|
13183
|
-
declare const index$
|
|
13184
|
-
type index$
|
|
13185
|
-
declare const index$
|
|
13186
|
-
type index$
|
|
13187
|
-
type index$
|
|
13188
|
-
declare const index$
|
|
13189
|
-
type index$
|
|
13190
|
-
type index$
|
|
13191
|
-
type index$
|
|
13192
|
-
declare const index$
|
|
13193
|
-
type index$
|
|
13194
|
-
type index$
|
|
13195
|
-
declare const index$
|
|
13196
|
-
declare namespace index$
|
|
13197
|
-
export { index$
|
|
13198
|
-
export type { index$
|
|
13714
|
+
type index$c_BlocksDb = BlocksDb;
|
|
13715
|
+
type index$c_InMemoryBlocks = InMemoryBlocks;
|
|
13716
|
+
declare const index$c_InMemoryBlocks: typeof InMemoryBlocks;
|
|
13717
|
+
type index$c_InMemorySerializedStates = InMemorySerializedStates;
|
|
13718
|
+
declare const index$c_InMemorySerializedStates: typeof InMemorySerializedStates;
|
|
13719
|
+
type index$c_InMemoryStates = InMemoryStates;
|
|
13720
|
+
declare const index$c_InMemoryStates: typeof InMemoryStates;
|
|
13721
|
+
type index$c_InitStatesDb<T = State> = InitStatesDb<T>;
|
|
13722
|
+
type index$c_LeafDb = LeafDb;
|
|
13723
|
+
declare const index$c_LeafDb: typeof LeafDb;
|
|
13724
|
+
type index$c_LeafDbError = LeafDbError;
|
|
13725
|
+
declare const index$c_LeafDbError: typeof LeafDbError;
|
|
13726
|
+
type index$c_Lookup = Lookup;
|
|
13727
|
+
type index$c_LookupKind = LookupKind;
|
|
13728
|
+
declare const index$c_LookupKind: typeof LookupKind;
|
|
13729
|
+
type index$c_RootDb<TBlocks = BlocksDb, TStates = StatesDb> = RootDb<TBlocks, TStates>;
|
|
13730
|
+
type index$c_SerializedStatesDb = SerializedStatesDb;
|
|
13731
|
+
type index$c_StateUpdateError = StateUpdateError;
|
|
13732
|
+
declare const index$c_StateUpdateError: typeof StateUpdateError;
|
|
13733
|
+
type index$c_StatesDb<T extends State = State> = StatesDb<T>;
|
|
13734
|
+
type index$c_ValuesDb = ValuesDb;
|
|
13735
|
+
declare const index$c_updateLeafs: typeof updateLeafs;
|
|
13736
|
+
declare namespace index$c {
|
|
13737
|
+
export { index$c_InMemoryBlocks as InMemoryBlocks, index$c_InMemorySerializedStates as InMemorySerializedStates, index$c_InMemoryStates as InMemoryStates, index$c_LeafDb as LeafDb, index$c_LeafDbError as LeafDbError, index$c_LookupKind as LookupKind, index$c_StateUpdateError as StateUpdateError, index$c_updateLeafs as updateLeafs };
|
|
13738
|
+
export type { index$c_BlocksDb as BlocksDb, index$c_InitStatesDb as InitStatesDb, index$c_Lookup as Lookup, index$c_RootDb as RootDb, index$c_SerializedStatesDb as SerializedStatesDb, index$c_StatesDb as StatesDb, index$c_ValuesDb as ValuesDb };
|
|
13199
13739
|
}
|
|
13200
13740
|
|
|
13201
13741
|
/**
|
|
@@ -13617,31 +14157,31 @@ declare const initEc = async () => {
|
|
|
13617
14157
|
await init.reedSolomon();
|
|
13618
14158
|
};
|
|
13619
14159
|
|
|
13620
|
-
declare const index$
|
|
13621
|
-
declare const index$
|
|
13622
|
-
type index$
|
|
13623
|
-
type index$
|
|
13624
|
-
type index$
|
|
13625
|
-
declare const index$
|
|
13626
|
-
type index$
|
|
13627
|
-
declare const index$
|
|
13628
|
-
declare const index$
|
|
13629
|
-
declare const index$
|
|
13630
|
-
declare const index$
|
|
13631
|
-
declare const index$
|
|
13632
|
-
declare const index$
|
|
13633
|
-
declare const index$
|
|
13634
|
-
declare const index$
|
|
13635
|
-
declare const index$
|
|
13636
|
-
declare const index$
|
|
13637
|
-
declare const index$
|
|
13638
|
-
declare const index$
|
|
13639
|
-
declare const index$
|
|
13640
|
-
declare const index$
|
|
13641
|
-
declare const index$
|
|
13642
|
-
declare namespace index$
|
|
13643
|
-
export { index$
|
|
13644
|
-
export type { index$
|
|
14160
|
+
declare const index$b_HALF_POINT_SIZE: typeof HALF_POINT_SIZE;
|
|
14161
|
+
declare const index$b_N_CHUNKS_REDUNDANCY: typeof N_CHUNKS_REDUNDANCY;
|
|
14162
|
+
type index$b_N_CHUNKS_REQUIRED = N_CHUNKS_REQUIRED;
|
|
14163
|
+
type index$b_N_CHUNKS_TOTAL = N_CHUNKS_TOTAL;
|
|
14164
|
+
type index$b_PIECE_SIZE = PIECE_SIZE;
|
|
14165
|
+
declare const index$b_POINT_ALIGNMENT: typeof POINT_ALIGNMENT;
|
|
14166
|
+
type index$b_POINT_LENGTH = POINT_LENGTH;
|
|
14167
|
+
declare const index$b_checkConsistency: typeof checkConsistency;
|
|
14168
|
+
declare const index$b_chunkingFunction: typeof chunkingFunction;
|
|
14169
|
+
declare const index$b_chunksToShards: typeof chunksToShards;
|
|
14170
|
+
declare const index$b_decodeData: typeof decodeData;
|
|
14171
|
+
declare const index$b_decodeDataAndTrim: typeof decodeDataAndTrim;
|
|
14172
|
+
declare const index$b_decodePiece: typeof decodePiece;
|
|
14173
|
+
declare const index$b_encodePoints: typeof encodePoints;
|
|
14174
|
+
declare const index$b_initEc: typeof initEc;
|
|
14175
|
+
declare const index$b_join: typeof join;
|
|
14176
|
+
declare const index$b_lace: typeof lace;
|
|
14177
|
+
declare const index$b_padAndEncodeData: typeof padAndEncodeData;
|
|
14178
|
+
declare const index$b_shardsToChunks: typeof shardsToChunks;
|
|
14179
|
+
declare const index$b_split: typeof split;
|
|
14180
|
+
declare const index$b_transpose: typeof transpose;
|
|
14181
|
+
declare const index$b_unzip: typeof unzip;
|
|
14182
|
+
declare namespace index$b {
|
|
14183
|
+
export { index$b_HALF_POINT_SIZE as HALF_POINT_SIZE, index$b_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$b_POINT_ALIGNMENT as POINT_ALIGNMENT, index$b_checkConsistency as checkConsistency, index$b_chunkingFunction as chunkingFunction, index$b_chunksToShards as chunksToShards, index$b_decodeData as decodeData, index$b_decodeDataAndTrim as decodeDataAndTrim, index$b_decodePiece as decodePiece, index$b_encodePoints as encodePoints, index$b_initEc as initEc, index$b_join as join, index$b_lace as lace, index$b_padAndEncodeData as padAndEncodeData, index$b_shardsToChunks as shardsToChunks, index$b_split as split, index$b_transpose as transpose, index$b_unzip as unzip };
|
|
14184
|
+
export type { index$b_N_CHUNKS_REQUIRED as N_CHUNKS_REQUIRED, index$b_N_CHUNKS_TOTAL as N_CHUNKS_TOTAL, index$b_PIECE_SIZE as PIECE_SIZE, index$b_POINT_LENGTH as POINT_LENGTH };
|
|
13645
14185
|
}
|
|
13646
14186
|
|
|
13647
14187
|
/** A per-client handler of incoming socket messages. */
|
|
@@ -14144,45 +14684,45 @@ declare class FuzzTarget implements IpcHandler {
|
|
|
14144
14684
|
}
|
|
14145
14685
|
}
|
|
14146
14686
|
|
|
14147
|
-
type index$
|
|
14148
|
-
type index$
|
|
14149
|
-
declare const index$
|
|
14150
|
-
type index$
|
|
14151
|
-
declare const index$
|
|
14152
|
-
type index$
|
|
14153
|
-
declare const index$
|
|
14154
|
-
type index$
|
|
14155
|
-
type index$
|
|
14156
|
-
declare const index$
|
|
14157
|
-
type index$
|
|
14158
|
-
type index$
|
|
14159
|
-
declare const index$
|
|
14160
|
-
type index$
|
|
14161
|
-
declare const index$
|
|
14162
|
-
type index$
|
|
14163
|
-
type index$
|
|
14164
|
-
type index$
|
|
14165
|
-
declare const index$
|
|
14166
|
-
type index$
|
|
14167
|
-
declare const index$
|
|
14168
|
-
type index$
|
|
14169
|
-
type index$
|
|
14170
|
-
declare const index$
|
|
14171
|
-
declare const index$
|
|
14172
|
-
declare const index$
|
|
14173
|
-
declare const index$
|
|
14174
|
-
declare const index$
|
|
14175
|
-
declare const index$
|
|
14176
|
-
declare namespace index$
|
|
14177
|
-
export { index$
|
|
14178
|
-
export type { index$
|
|
14687
|
+
type index$a_Ancestry = Ancestry;
|
|
14688
|
+
type index$a_AncestryItem = AncestryItem;
|
|
14689
|
+
declare const index$a_AncestryItem: typeof AncestryItem;
|
|
14690
|
+
type index$a_ErrorMessage = ErrorMessage;
|
|
14691
|
+
declare const index$a_ErrorMessage: typeof ErrorMessage;
|
|
14692
|
+
type index$a_Features = Features;
|
|
14693
|
+
declare const index$a_Features: typeof Features;
|
|
14694
|
+
type index$a_FuzzMessageHandler = FuzzMessageHandler;
|
|
14695
|
+
type index$a_FuzzTarget = FuzzTarget;
|
|
14696
|
+
declare const index$a_FuzzTarget: typeof FuzzTarget;
|
|
14697
|
+
type index$a_GetState = GetState;
|
|
14698
|
+
type index$a_Initialize = Initialize;
|
|
14699
|
+
declare const index$a_Initialize: typeof Initialize;
|
|
14700
|
+
type index$a_KeyValue = KeyValue;
|
|
14701
|
+
declare const index$a_KeyValue: typeof KeyValue;
|
|
14702
|
+
type index$a_Message = Message;
|
|
14703
|
+
type index$a_MessageData = MessageData;
|
|
14704
|
+
type index$a_MessageType = MessageType;
|
|
14705
|
+
declare const index$a_MessageType: typeof MessageType;
|
|
14706
|
+
type index$a_PeerInfo = PeerInfo;
|
|
14707
|
+
declare const index$a_PeerInfo: typeof PeerInfo;
|
|
14708
|
+
type index$a_StateRoot = StateRoot;
|
|
14709
|
+
type index$a_Version = Version;
|
|
14710
|
+
declare const index$a_Version: typeof Version;
|
|
14711
|
+
declare const index$a_ancestryCodec: typeof ancestryCodec;
|
|
14712
|
+
declare const index$a_getStateCodec: typeof getStateCodec;
|
|
14713
|
+
declare const index$a_messageCodec: typeof messageCodec;
|
|
14714
|
+
declare const index$a_stateCodec: typeof stateCodec;
|
|
14715
|
+
declare const index$a_stateRootCodec: typeof stateRootCodec;
|
|
14716
|
+
declare namespace index$a {
|
|
14717
|
+
export { index$a_AncestryItem as AncestryItem, index$a_ErrorMessage as ErrorMessage, index$a_Features as Features, index$a_FuzzTarget as FuzzTarget, index$a_Initialize as Initialize, index$a_KeyValue as KeyValue, index$a_MessageType as MessageType, index$a_PeerInfo as PeerInfo, index$a_Version as Version, index$a_ancestryCodec as ancestryCodec, index$a_getStateCodec as getStateCodec, logger$1 as logger, index$a_messageCodec as messageCodec, index$a_stateCodec as stateCodec, index$a_stateRootCodec as stateRootCodec };
|
|
14718
|
+
export type { index$a_Ancestry as Ancestry, index$a_FuzzMessageHandler as FuzzMessageHandler, index$a_GetState as GetState, index$a_Message as Message, index$a_MessageData as MessageData, index$a_StateRoot as StateRoot };
|
|
14179
14719
|
}
|
|
14180
14720
|
|
|
14181
|
-
type index$
|
|
14182
|
-
type index$
|
|
14183
|
-
declare namespace index$
|
|
14184
|
-
export { index$
|
|
14185
|
-
export type { index$
|
|
14721
|
+
type index$9_IpcHandler = IpcHandler;
|
|
14722
|
+
type index$9_IpcSender = IpcSender;
|
|
14723
|
+
declare namespace index$9 {
|
|
14724
|
+
export { index$a as v1 };
|
|
14725
|
+
export type { index$9_IpcHandler as IpcHandler, index$9_IpcSender as IpcSender };
|
|
14186
14726
|
}
|
|
14187
14727
|
|
|
14188
14728
|
/** Size of the transfer memo. */
|
|
@@ -14547,8 +15087,6 @@ interface IMemory {
|
|
|
14547
15087
|
read(address: U32, result: Uint8Array): Result$2<OK, PageFault$1>;
|
|
14548
15088
|
}
|
|
14549
15089
|
|
|
14550
|
-
declare const NO_OF_REGISTERS$1 = 13;
|
|
14551
|
-
|
|
14552
15090
|
/** Allow to set and get all registers encoded into little-endian bytes. */
|
|
14553
15091
|
interface IRegisters {
|
|
14554
15092
|
/**
|
|
@@ -14848,11 +15386,6 @@ declare class HostCallsManager {
|
|
|
14848
15386
|
}
|
|
14849
15387
|
}
|
|
14850
15388
|
|
|
14851
|
-
/** Create a new gas counter instance depending on the gas value. */
|
|
14852
|
-
declare function gasCounter(gas: Gas): IGasCounter {
|
|
14853
|
-
return new GasCounterU64(tryAsU64(gas));
|
|
14854
|
-
}
|
|
14855
|
-
|
|
14856
15389
|
type MemoryIndex = Opaque<number, "memory index">;
|
|
14857
15390
|
|
|
14858
15391
|
declare const tryAsMemoryIndex = (index: number): MemoryIndex => {
|
|
@@ -15467,25 +16000,25 @@ declare function getRegisters(argsLength: number) {
|
|
|
15467
16000
|
return regs;
|
|
15468
16001
|
}
|
|
15469
16002
|
|
|
15470
|
-
type index$
|
|
15471
|
-
declare const index$
|
|
15472
|
-
declare const index$
|
|
15473
|
-
type index$
|
|
15474
|
-
declare const index$
|
|
15475
|
-
type index$
|
|
15476
|
-
declare const index$
|
|
15477
|
-
declare const index$
|
|
15478
|
-
declare const index$
|
|
15479
|
-
declare const index$
|
|
15480
|
-
declare namespace index$
|
|
16003
|
+
type index$8_MemorySegment = MemorySegment;
|
|
16004
|
+
declare const index$8_MemorySegment: typeof MemorySegment;
|
|
16005
|
+
declare const index$8_NO_OF_REGISTERS: typeof NO_OF_REGISTERS;
|
|
16006
|
+
type index$8_SpiMemory = SpiMemory;
|
|
16007
|
+
declare const index$8_SpiMemory: typeof SpiMemory;
|
|
16008
|
+
type index$8_SpiProgram = SpiProgram;
|
|
16009
|
+
declare const index$8_SpiProgram: typeof SpiProgram;
|
|
16010
|
+
declare const index$8_decodeStandardProgram: typeof decodeStandardProgram;
|
|
16011
|
+
declare const index$8_getMemorySegment: typeof getMemorySegment;
|
|
16012
|
+
declare const index$8_getRegisters: typeof getRegisters;
|
|
16013
|
+
declare namespace index$8 {
|
|
15481
16014
|
export {
|
|
15482
|
-
index$
|
|
15483
|
-
index$
|
|
15484
|
-
index$
|
|
15485
|
-
index$
|
|
15486
|
-
index$
|
|
15487
|
-
index$
|
|
15488
|
-
index$
|
|
16015
|
+
index$8_MemorySegment as MemorySegment,
|
|
16016
|
+
index$8_NO_OF_REGISTERS as NO_OF_REGISTERS,
|
|
16017
|
+
index$8_SpiMemory as SpiMemory,
|
|
16018
|
+
index$8_SpiProgram as SpiProgram,
|
|
16019
|
+
index$8_decodeStandardProgram as decodeStandardProgram,
|
|
16020
|
+
index$8_getMemorySegment as getMemorySegment,
|
|
16021
|
+
index$8_getRegisters as getRegisters,
|
|
15489
16022
|
};
|
|
15490
16023
|
}
|
|
15491
16024
|
|
|
@@ -15543,13 +16076,13 @@ declare function extractCodeAndMetadata(blobWithMetadata: Uint8Array) {
|
|
|
15543
16076
|
return { metadata, code };
|
|
15544
16077
|
}
|
|
15545
16078
|
|
|
15546
|
-
type index$
|
|
15547
|
-
declare const index$
|
|
15548
|
-
declare const index$
|
|
15549
|
-
declare namespace index$
|
|
16079
|
+
type index$7_Program = Program;
|
|
16080
|
+
declare const index$7_Program: typeof Program;
|
|
16081
|
+
declare const index$7_extractCodeAndMetadata: typeof extractCodeAndMetadata;
|
|
16082
|
+
declare namespace index$7 {
|
|
15550
16083
|
export {
|
|
15551
|
-
index$
|
|
15552
|
-
index$
|
|
16084
|
+
index$7_Program as Program,
|
|
16085
|
+
index$7_extractCodeAndMetadata as extractCodeAndMetadata,
|
|
15553
16086
|
};
|
|
15554
16087
|
}
|
|
15555
16088
|
|
|
@@ -15722,38 +16255,6 @@ declare class ImmediateDecoder {
|
|
|
15722
16255
|
}
|
|
15723
16256
|
}
|
|
15724
16257
|
|
|
15725
|
-
declare class NibblesDecoder {
|
|
15726
|
-
private byte = new Int8Array(1);
|
|
15727
|
-
|
|
15728
|
-
setByte(byte: number) {
|
|
15729
|
-
this.byte[0] = byte;
|
|
15730
|
-
}
|
|
15731
|
-
|
|
15732
|
-
getHighNibble() {
|
|
15733
|
-
return (this.byte[0] & 0xf0) >>> 4;
|
|
15734
|
-
}
|
|
15735
|
-
|
|
15736
|
-
getLowNibble() {
|
|
15737
|
-
return this.byte[0] & 0x0f;
|
|
15738
|
-
}
|
|
15739
|
-
|
|
15740
|
-
getHighNibbleAsRegisterIndex() {
|
|
15741
|
-
return Math.min(this.getHighNibble(), MAX_REGISTER_INDEX);
|
|
15742
|
-
}
|
|
15743
|
-
|
|
15744
|
-
getLowNibbleAsRegisterIndex() {
|
|
15745
|
-
return Math.min(this.getLowNibble(), MAX_REGISTER_INDEX);
|
|
15746
|
-
}
|
|
15747
|
-
|
|
15748
|
-
getHighNibbleAsLength() {
|
|
15749
|
-
return Math.min(this.getHighNibble(), MAX_LENGTH);
|
|
15750
|
-
}
|
|
15751
|
-
|
|
15752
|
-
getLowNibbleAsLength() {
|
|
15753
|
-
return Math.min(this.getLowNibble(), MAX_LENGTH);
|
|
15754
|
-
}
|
|
15755
|
-
}
|
|
15756
|
-
|
|
15757
16258
|
type EmptyArgs = {
|
|
15758
16259
|
type: ArgumentType.NO_ARGUMENTS;
|
|
15759
16260
|
noOfBytesToSkip: number;
|
|
@@ -16092,106 +16593,6 @@ declare class ArgsDecoder {
|
|
|
16092
16593
|
}
|
|
16093
16594
|
}
|
|
16094
16595
|
|
|
16095
|
-
declare const createResults = () => {
|
|
16096
|
-
const results = new Array(ARGUMENT_TYPE_LENGTH) as Results;
|
|
16097
|
-
|
|
16098
|
-
results[ArgumentType.NO_ARGUMENTS] = {
|
|
16099
|
-
type: ArgumentType.NO_ARGUMENTS,
|
|
16100
|
-
noOfBytesToSkip: 1,
|
|
16101
|
-
};
|
|
16102
|
-
|
|
16103
|
-
results[ArgumentType.ONE_IMMEDIATE] = {
|
|
16104
|
-
type: ArgumentType.ONE_IMMEDIATE,
|
|
16105
|
-
noOfBytesToSkip: 1,
|
|
16106
|
-
immediateDecoder: new ImmediateDecoder(),
|
|
16107
|
-
};
|
|
16108
|
-
|
|
16109
|
-
results[ArgumentType.TWO_REGISTERS] = {
|
|
16110
|
-
type: ArgumentType.TWO_REGISTERS,
|
|
16111
|
-
noOfBytesToSkip: 1,
|
|
16112
|
-
firstRegisterIndex: 0,
|
|
16113
|
-
secondRegisterIndex: 0,
|
|
16114
|
-
};
|
|
16115
|
-
|
|
16116
|
-
results[ArgumentType.THREE_REGISTERS] = {
|
|
16117
|
-
type: ArgumentType.THREE_REGISTERS,
|
|
16118
|
-
noOfBytesToSkip: 1,
|
|
16119
|
-
firstRegisterIndex: 0,
|
|
16120
|
-
secondRegisterIndex: 0,
|
|
16121
|
-
thirdRegisterIndex: 0,
|
|
16122
|
-
};
|
|
16123
|
-
|
|
16124
|
-
results[ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET] = {
|
|
16125
|
-
type: ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET,
|
|
16126
|
-
noOfBytesToSkip: 1,
|
|
16127
|
-
registerIndex: 0,
|
|
16128
|
-
immediateDecoder: new ImmediateDecoder(),
|
|
16129
|
-
nextPc: 0,
|
|
16130
|
-
};
|
|
16131
|
-
|
|
16132
|
-
results[ArgumentType.TWO_REGISTERS_ONE_OFFSET] = {
|
|
16133
|
-
type: ArgumentType.TWO_REGISTERS_ONE_OFFSET,
|
|
16134
|
-
noOfBytesToSkip: 1,
|
|
16135
|
-
firstRegisterIndex: 0,
|
|
16136
|
-
secondRegisterIndex: 0,
|
|
16137
|
-
nextPc: 0,
|
|
16138
|
-
};
|
|
16139
|
-
|
|
16140
|
-
results[ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE] = {
|
|
16141
|
-
type: ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE,
|
|
16142
|
-
noOfBytesToSkip: 1,
|
|
16143
|
-
firstRegisterIndex: 0,
|
|
16144
|
-
secondRegisterIndex: 0,
|
|
16145
|
-
immediateDecoder: new ImmediateDecoder(),
|
|
16146
|
-
};
|
|
16147
|
-
|
|
16148
|
-
results[ArgumentType.ONE_REGISTER_ONE_IMMEDIATE] = {
|
|
16149
|
-
type: ArgumentType.ONE_REGISTER_ONE_IMMEDIATE,
|
|
16150
|
-
noOfBytesToSkip: 1,
|
|
16151
|
-
registerIndex: 0,
|
|
16152
|
-
immediateDecoder: new ImmediateDecoder(),
|
|
16153
|
-
};
|
|
16154
|
-
|
|
16155
|
-
results[ArgumentType.ONE_REGISTER_TWO_IMMEDIATES] = {
|
|
16156
|
-
type: ArgumentType.ONE_REGISTER_TWO_IMMEDIATES,
|
|
16157
|
-
noOfBytesToSkip: 1,
|
|
16158
|
-
registerIndex: 0,
|
|
16159
|
-
firstImmediateDecoder: new ImmediateDecoder(),
|
|
16160
|
-
secondImmediateDecoder: new ImmediateDecoder(),
|
|
16161
|
-
};
|
|
16162
|
-
|
|
16163
|
-
results[ArgumentType.ONE_OFFSET] = {
|
|
16164
|
-
type: ArgumentType.ONE_OFFSET,
|
|
16165
|
-
noOfBytesToSkip: 1,
|
|
16166
|
-
nextPc: 0,
|
|
16167
|
-
};
|
|
16168
|
-
|
|
16169
|
-
results[ArgumentType.TWO_IMMEDIATES] = {
|
|
16170
|
-
type: ArgumentType.TWO_IMMEDIATES,
|
|
16171
|
-
noOfBytesToSkip: 1,
|
|
16172
|
-
firstImmediateDecoder: new ImmediateDecoder(),
|
|
16173
|
-
secondImmediateDecoder: new ImmediateDecoder(),
|
|
16174
|
-
};
|
|
16175
|
-
|
|
16176
|
-
results[ArgumentType.TWO_REGISTERS_TWO_IMMEDIATES] = {
|
|
16177
|
-
type: ArgumentType.TWO_REGISTERS_TWO_IMMEDIATES,
|
|
16178
|
-
noOfBytesToSkip: 1,
|
|
16179
|
-
firstImmediateDecoder: new ImmediateDecoder(),
|
|
16180
|
-
secondImmediateDecoder: new ImmediateDecoder(),
|
|
16181
|
-
firstRegisterIndex: 0,
|
|
16182
|
-
secondRegisterIndex: 0,
|
|
16183
|
-
};
|
|
16184
|
-
|
|
16185
|
-
results[ArgumentType.ONE_REGISTER_ONE_EXTENDED_WIDTH_IMMEDIATE] = {
|
|
16186
|
-
type: ArgumentType.ONE_REGISTER_ONE_EXTENDED_WIDTH_IMMEDIATE,
|
|
16187
|
-
noOfBytesToSkip: 9,
|
|
16188
|
-
registerIndex: 0,
|
|
16189
|
-
immediateDecoder: new ExtendedWitdthImmediateDecoder(),
|
|
16190
|
-
};
|
|
16191
|
-
|
|
16192
|
-
return results;
|
|
16193
|
-
};
|
|
16194
|
-
|
|
16195
16596
|
declare enum Instruction {
|
|
16196
16597
|
TRAP = 0,
|
|
16197
16598
|
FALLTHROUGH = 1,
|
|
@@ -16334,164 +16735,6 @@ declare enum Instruction {
|
|
|
16334
16735
|
MIN_U = 230,
|
|
16335
16736
|
}
|
|
16336
16737
|
|
|
16337
|
-
declare const instructionArgumentTypeMap = (() => {
|
|
16338
|
-
const instructionArgumentTypeMap = new Array<ArgumentType>(HIGHEST_INSTRUCTION_NUMBER + 1);
|
|
16339
|
-
|
|
16340
|
-
instructionArgumentTypeMap[Instruction.TRAP] = ArgumentType.NO_ARGUMENTS;
|
|
16341
|
-
instructionArgumentTypeMap[Instruction.FALLTHROUGH] = ArgumentType.NO_ARGUMENTS;
|
|
16342
|
-
|
|
16343
|
-
instructionArgumentTypeMap[Instruction.ECALLI] = ArgumentType.ONE_IMMEDIATE;
|
|
16344
|
-
|
|
16345
|
-
instructionArgumentTypeMap[Instruction.LOAD_IMM_64] = ArgumentType.ONE_REGISTER_ONE_EXTENDED_WIDTH_IMMEDIATE;
|
|
16346
|
-
|
|
16347
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_U8] = ArgumentType.TWO_IMMEDIATES;
|
|
16348
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_U16] = ArgumentType.TWO_IMMEDIATES;
|
|
16349
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_U32] = ArgumentType.TWO_IMMEDIATES;
|
|
16350
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_U64] = ArgumentType.TWO_IMMEDIATES;
|
|
16351
|
-
|
|
16352
|
-
instructionArgumentTypeMap[Instruction.JUMP] = ArgumentType.ONE_OFFSET;
|
|
16353
|
-
|
|
16354
|
-
instructionArgumentTypeMap[Instruction.JUMP_IND] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16355
|
-
instructionArgumentTypeMap[Instruction.LOAD_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16356
|
-
instructionArgumentTypeMap[Instruction.LOAD_U8] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16357
|
-
instructionArgumentTypeMap[Instruction.LOAD_I8] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16358
|
-
instructionArgumentTypeMap[Instruction.LOAD_U16] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16359
|
-
instructionArgumentTypeMap[Instruction.LOAD_I16] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16360
|
-
instructionArgumentTypeMap[Instruction.LOAD_U32] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16361
|
-
instructionArgumentTypeMap[Instruction.LOAD_I32] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16362
|
-
instructionArgumentTypeMap[Instruction.LOAD_U64] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16363
|
-
instructionArgumentTypeMap[Instruction.STORE_U8] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16364
|
-
instructionArgumentTypeMap[Instruction.STORE_U16] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16365
|
-
instructionArgumentTypeMap[Instruction.STORE_U32] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16366
|
-
instructionArgumentTypeMap[Instruction.STORE_U64] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE;
|
|
16367
|
-
|
|
16368
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_IND_U8] = ArgumentType.ONE_REGISTER_TWO_IMMEDIATES;
|
|
16369
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_IND_U16] = ArgumentType.ONE_REGISTER_TWO_IMMEDIATES;
|
|
16370
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_IND_U32] = ArgumentType.ONE_REGISTER_TWO_IMMEDIATES;
|
|
16371
|
-
instructionArgumentTypeMap[Instruction.STORE_IMM_IND_U64] = ArgumentType.ONE_REGISTER_TWO_IMMEDIATES;
|
|
16372
|
-
|
|
16373
|
-
instructionArgumentTypeMap[Instruction.LOAD_IMM_JUMP] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16374
|
-
instructionArgumentTypeMap[Instruction.BRANCH_EQ_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16375
|
-
instructionArgumentTypeMap[Instruction.BRANCH_NE_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16376
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LT_U_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16377
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LE_U_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16378
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GE_U_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16379
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GT_U_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16380
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LT_S_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16381
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LE_S_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16382
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GE_S_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16383
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GT_S_IMM] = ArgumentType.ONE_REGISTER_ONE_IMMEDIATE_ONE_OFFSET;
|
|
16384
|
-
|
|
16385
|
-
instructionArgumentTypeMap[Instruction.MOVE_REG] = ArgumentType.TWO_REGISTERS;
|
|
16386
|
-
instructionArgumentTypeMap[Instruction.SBRK] = ArgumentType.TWO_REGISTERS;
|
|
16387
|
-
instructionArgumentTypeMap[Instruction.COUNT_SET_BITS_64] = ArgumentType.TWO_REGISTERS;
|
|
16388
|
-
instructionArgumentTypeMap[Instruction.COUNT_SET_BITS_32] = ArgumentType.TWO_REGISTERS;
|
|
16389
|
-
instructionArgumentTypeMap[Instruction.LEADING_ZERO_BITS_64] = ArgumentType.TWO_REGISTERS;
|
|
16390
|
-
instructionArgumentTypeMap[Instruction.LEADING_ZERO_BITS_32] = ArgumentType.TWO_REGISTERS;
|
|
16391
|
-
instructionArgumentTypeMap[Instruction.TRAILING_ZERO_BITS_64] = ArgumentType.TWO_REGISTERS;
|
|
16392
|
-
instructionArgumentTypeMap[Instruction.TRAILING_ZERO_BITS_32] = ArgumentType.TWO_REGISTERS;
|
|
16393
|
-
instructionArgumentTypeMap[Instruction.SIGN_EXTEND_8] = ArgumentType.TWO_REGISTERS;
|
|
16394
|
-
instructionArgumentTypeMap[Instruction.SIGN_EXTEND_16] = ArgumentType.TWO_REGISTERS;
|
|
16395
|
-
instructionArgumentTypeMap[Instruction.ZERO_EXTEND_16] = ArgumentType.TWO_REGISTERS;
|
|
16396
|
-
instructionArgumentTypeMap[Instruction.REVERSE_BYTES] = ArgumentType.TWO_REGISTERS;
|
|
16397
|
-
|
|
16398
|
-
instructionArgumentTypeMap[Instruction.STORE_IND_U8] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16399
|
-
instructionArgumentTypeMap[Instruction.STORE_IND_U16] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16400
|
-
instructionArgumentTypeMap[Instruction.STORE_IND_U32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16401
|
-
instructionArgumentTypeMap[Instruction.STORE_IND_U64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16402
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_U8] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16403
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_I8] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16404
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_U16] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16405
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_I16] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16406
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_U32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16407
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_I32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16408
|
-
instructionArgumentTypeMap[Instruction.LOAD_IND_U64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16409
|
-
instructionArgumentTypeMap[Instruction.ADD_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16410
|
-
instructionArgumentTypeMap[Instruction.ADD_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16411
|
-
instructionArgumentTypeMap[Instruction.AND_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16412
|
-
instructionArgumentTypeMap[Instruction.XOR_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16413
|
-
instructionArgumentTypeMap[Instruction.OR_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16414
|
-
instructionArgumentTypeMap[Instruction.MUL_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16415
|
-
instructionArgumentTypeMap[Instruction.MUL_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16416
|
-
instructionArgumentTypeMap[Instruction.SET_LT_U_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16417
|
-
instructionArgumentTypeMap[Instruction.SET_LT_S_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16418
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16419
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16420
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16421
|
-
instructionArgumentTypeMap[Instruction.NEG_ADD_IMM_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16422
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16423
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16424
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16425
|
-
instructionArgumentTypeMap[Instruction.NEG_ADD_IMM_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16426
|
-
instructionArgumentTypeMap[Instruction.SET_GT_U_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16427
|
-
instructionArgumentTypeMap[Instruction.SET_GT_S_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16428
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_IMM_ALT_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16429
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_IMM_ALT_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16430
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_IMM_ALT_32] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16431
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_IMM_ALT_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16432
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_IMM_ALT_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16433
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_IMM_ALT_64] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16434
|
-
instructionArgumentTypeMap[Instruction.CMOV_IZ_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16435
|
-
instructionArgumentTypeMap[Instruction.CMOV_NZ_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16436
|
-
instructionArgumentTypeMap[Instruction.ROT_R_64_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16437
|
-
instructionArgumentTypeMap[Instruction.ROT_R_64_IMM_ALT] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16438
|
-
instructionArgumentTypeMap[Instruction.ROT_R_32_IMM] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16439
|
-
instructionArgumentTypeMap[Instruction.ROT_R_32_IMM_ALT] = ArgumentType.TWO_REGISTERS_ONE_IMMEDIATE;
|
|
16440
|
-
|
|
16441
|
-
instructionArgumentTypeMap[Instruction.BRANCH_EQ] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16442
|
-
instructionArgumentTypeMap[Instruction.BRANCH_NE] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16443
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LT_U] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16444
|
-
instructionArgumentTypeMap[Instruction.BRANCH_LT_S] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16445
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GE_U] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16446
|
-
instructionArgumentTypeMap[Instruction.BRANCH_GE_S] = ArgumentType.TWO_REGISTERS_ONE_OFFSET;
|
|
16447
|
-
|
|
16448
|
-
instructionArgumentTypeMap[Instruction.LOAD_IMM_JUMP_IND] = ArgumentType.TWO_REGISTERS_TWO_IMMEDIATES;
|
|
16449
|
-
|
|
16450
|
-
instructionArgumentTypeMap[Instruction.ADD_32] = ArgumentType.THREE_REGISTERS;
|
|
16451
|
-
instructionArgumentTypeMap[Instruction.ADD_64] = ArgumentType.THREE_REGISTERS;
|
|
16452
|
-
instructionArgumentTypeMap[Instruction.SUB_32] = ArgumentType.THREE_REGISTERS;
|
|
16453
|
-
instructionArgumentTypeMap[Instruction.SUB_64] = ArgumentType.THREE_REGISTERS;
|
|
16454
|
-
instructionArgumentTypeMap[Instruction.AND] = ArgumentType.THREE_REGISTERS;
|
|
16455
|
-
instructionArgumentTypeMap[Instruction.XOR] = ArgumentType.THREE_REGISTERS;
|
|
16456
|
-
instructionArgumentTypeMap[Instruction.OR] = ArgumentType.THREE_REGISTERS;
|
|
16457
|
-
instructionArgumentTypeMap[Instruction.MUL_32] = ArgumentType.THREE_REGISTERS;
|
|
16458
|
-
instructionArgumentTypeMap[Instruction.MUL_64] = ArgumentType.THREE_REGISTERS;
|
|
16459
|
-
instructionArgumentTypeMap[Instruction.MUL_UPPER_S_S] = ArgumentType.THREE_REGISTERS;
|
|
16460
|
-
instructionArgumentTypeMap[Instruction.MUL_UPPER_U_U] = ArgumentType.THREE_REGISTERS;
|
|
16461
|
-
instructionArgumentTypeMap[Instruction.MUL_UPPER_S_U] = ArgumentType.THREE_REGISTERS;
|
|
16462
|
-
instructionArgumentTypeMap[Instruction.DIV_U_32] = ArgumentType.THREE_REGISTERS;
|
|
16463
|
-
instructionArgumentTypeMap[Instruction.DIV_S_32] = ArgumentType.THREE_REGISTERS;
|
|
16464
|
-
instructionArgumentTypeMap[Instruction.REM_U_32] = ArgumentType.THREE_REGISTERS;
|
|
16465
|
-
instructionArgumentTypeMap[Instruction.REM_S_32] = ArgumentType.THREE_REGISTERS;
|
|
16466
|
-
instructionArgumentTypeMap[Instruction.DIV_U_64] = ArgumentType.THREE_REGISTERS;
|
|
16467
|
-
instructionArgumentTypeMap[Instruction.DIV_S_64] = ArgumentType.THREE_REGISTERS;
|
|
16468
|
-
instructionArgumentTypeMap[Instruction.REM_U_64] = ArgumentType.THREE_REGISTERS;
|
|
16469
|
-
instructionArgumentTypeMap[Instruction.REM_S_64] = ArgumentType.THREE_REGISTERS;
|
|
16470
|
-
instructionArgumentTypeMap[Instruction.SET_LT_U] = ArgumentType.THREE_REGISTERS;
|
|
16471
|
-
instructionArgumentTypeMap[Instruction.SET_LT_S] = ArgumentType.THREE_REGISTERS;
|
|
16472
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_32] = ArgumentType.THREE_REGISTERS;
|
|
16473
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_32] = ArgumentType.THREE_REGISTERS;
|
|
16474
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_32] = ArgumentType.THREE_REGISTERS;
|
|
16475
|
-
instructionArgumentTypeMap[Instruction.SHLO_L_64] = ArgumentType.THREE_REGISTERS;
|
|
16476
|
-
instructionArgumentTypeMap[Instruction.SHLO_R_64] = ArgumentType.THREE_REGISTERS;
|
|
16477
|
-
instructionArgumentTypeMap[Instruction.SHAR_R_64] = ArgumentType.THREE_REGISTERS;
|
|
16478
|
-
instructionArgumentTypeMap[Instruction.CMOV_IZ] = ArgumentType.THREE_REGISTERS;
|
|
16479
|
-
instructionArgumentTypeMap[Instruction.CMOV_NZ] = ArgumentType.THREE_REGISTERS;
|
|
16480
|
-
instructionArgumentTypeMap[Instruction.ROT_L_64] = ArgumentType.THREE_REGISTERS;
|
|
16481
|
-
instructionArgumentTypeMap[Instruction.ROT_L_32] = ArgumentType.THREE_REGISTERS;
|
|
16482
|
-
instructionArgumentTypeMap[Instruction.ROT_R_64] = ArgumentType.THREE_REGISTERS;
|
|
16483
|
-
instructionArgumentTypeMap[Instruction.ROT_R_32] = ArgumentType.THREE_REGISTERS;
|
|
16484
|
-
instructionArgumentTypeMap[Instruction.AND_INV] = ArgumentType.THREE_REGISTERS;
|
|
16485
|
-
instructionArgumentTypeMap[Instruction.OR_INV] = ArgumentType.THREE_REGISTERS;
|
|
16486
|
-
instructionArgumentTypeMap[Instruction.XNOR] = ArgumentType.THREE_REGISTERS;
|
|
16487
|
-
instructionArgumentTypeMap[Instruction.MAX] = ArgumentType.THREE_REGISTERS;
|
|
16488
|
-
instructionArgumentTypeMap[Instruction.MAX_U] = ArgumentType.THREE_REGISTERS;
|
|
16489
|
-
instructionArgumentTypeMap[Instruction.MIN] = ArgumentType.THREE_REGISTERS;
|
|
16490
|
-
instructionArgumentTypeMap[Instruction.MIN_U] = ArgumentType.THREE_REGISTERS;
|
|
16491
|
-
|
|
16492
|
-
return instructionArgumentTypeMap;
|
|
16493
|
-
})();
|
|
16494
|
-
|
|
16495
16738
|
declare class BasicBlocks {
|
|
16496
16739
|
private basicBlocks: Set<number> = new Set();
|
|
16497
16740
|
|
|
@@ -16515,6 +16758,11 @@ declare class BasicBlocks {
|
|
|
16515
16758
|
}
|
|
16516
16759
|
}
|
|
16517
16760
|
|
|
16761
|
+
/** Create a new gas counter instance depending on the gas value. */
|
|
16762
|
+
declare function gasCounter(gas: Gas): IGasCounter {
|
|
16763
|
+
return new GasCounterU64(tryAsU64(gas));
|
|
16764
|
+
}
|
|
16765
|
+
|
|
16518
16766
|
declare enum Result {
|
|
16519
16767
|
HALT = 0,
|
|
16520
16768
|
PANIC = 1,
|
|
@@ -18267,66 +18515,6 @@ declare enum ProgramDecoderError {
|
|
|
18267
18515
|
InvalidProgramError = 0,
|
|
18268
18516
|
}
|
|
18269
18517
|
|
|
18270
|
-
declare class ProgramDecoder {
|
|
18271
|
-
private code: Uint8Array;
|
|
18272
|
-
private mask: Mask;
|
|
18273
|
-
private jumpTable: JumpTable;
|
|
18274
|
-
|
|
18275
|
-
constructor(rawProgram: Uint8Array) {
|
|
18276
|
-
const { code, mask, jumpTable, jumpTableItemLength } = this.decodeProgram(rawProgram);
|
|
18277
|
-
|
|
18278
|
-
this.code = new Uint8Array(code);
|
|
18279
|
-
this.mask = new Mask(mask);
|
|
18280
|
-
this.jumpTable = new JumpTable(jumpTableItemLength, jumpTable);
|
|
18281
|
-
}
|
|
18282
|
-
|
|
18283
|
-
private decodeProgram(program: Uint8Array) {
|
|
18284
|
-
const decoder = Decoder.fromBlob(program);
|
|
18285
|
-
// number of items in the jump table
|
|
18286
|
-
const jumpTableLength = decoder.varU32();
|
|
18287
|
-
// how many bytes are used to encode a single item of the jump table
|
|
18288
|
-
const jumpTableItemLength = decoder.u8();
|
|
18289
|
-
// the length of the code (in bytes).
|
|
18290
|
-
const codeLength = decoder.varU32();
|
|
18291
|
-
|
|
18292
|
-
const jumpTableLengthInBytes = jumpTableLength * jumpTableItemLength;
|
|
18293
|
-
const jumpTable = decoder.bytes(jumpTableLengthInBytes).raw;
|
|
18294
|
-
|
|
18295
|
-
const code = decoder.bytes(codeLength).raw;
|
|
18296
|
-
const mask = decoder.bitVecFixLen(codeLength);
|
|
18297
|
-
decoder.finish();
|
|
18298
|
-
|
|
18299
|
-
return {
|
|
18300
|
-
mask,
|
|
18301
|
-
code,
|
|
18302
|
-
jumpTableItemLength,
|
|
18303
|
-
jumpTable,
|
|
18304
|
-
};
|
|
18305
|
-
}
|
|
18306
|
-
|
|
18307
|
-
getMask() {
|
|
18308
|
-
return this.mask;
|
|
18309
|
-
}
|
|
18310
|
-
|
|
18311
|
-
getCode() {
|
|
18312
|
-
return this.code;
|
|
18313
|
-
}
|
|
18314
|
-
|
|
18315
|
-
getJumpTable() {
|
|
18316
|
-
return this.jumpTable;
|
|
18317
|
-
}
|
|
18318
|
-
|
|
18319
|
-
/** https://graypaper.fluffylabs.dev/#/68eaa1f/23f400234701?v=0.6.4 */
|
|
18320
|
-
static deblob(program: Uint8Array): Result$2<ProgramDecoder, ProgramDecoderError> {
|
|
18321
|
-
try {
|
|
18322
|
-
return Result.ok(new ProgramDecoder(program));
|
|
18323
|
-
} catch (e) {
|
|
18324
|
-
logger.error`Invalid program: ${e}`;
|
|
18325
|
-
return Result.error(ProgramDecoderError.InvalidProgramError, () => `Program decoder error: ${e}`);
|
|
18326
|
-
}
|
|
18327
|
-
}
|
|
18328
|
-
}
|
|
18329
|
-
|
|
18330
18518
|
type InterpreterOptions = {
|
|
18331
18519
|
useSbrkGas?: boolean;
|
|
18332
18520
|
};
|
|
@@ -18602,24 +18790,112 @@ declare class Interpreter implements IPvmInterpreter {
|
|
|
18602
18790
|
}
|
|
18603
18791
|
}
|
|
18604
18792
|
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18793
|
+
declare class DebuggerAdapter {
|
|
18794
|
+
private readonly pvm: Interpreter;
|
|
18795
|
+
|
|
18796
|
+
constructor(useSbrkGas = false) {
|
|
18797
|
+
this.pvm = new Interpreter({ useSbrkGas });
|
|
18798
|
+
}
|
|
18799
|
+
|
|
18800
|
+
resetGeneric(rawProgram: Uint8Array, flatRegisters: Uint8Array, initialGas: bigint) {
|
|
18801
|
+
this.pvm.resetGeneric(rawProgram, 0, tryAsGas(initialGas), new Registers(flatRegisters));
|
|
18802
|
+
}
|
|
18803
|
+
|
|
18804
|
+
reset(rawProgram: Uint8Array, pc: number, gas: bigint, maybeRegisters?: Registers, maybeMemory?: Memory) {
|
|
18805
|
+
this.pvm.resetGeneric(rawProgram, pc, tryAsGas(gas), maybeRegisters, maybeMemory);
|
|
18806
|
+
}
|
|
18807
|
+
|
|
18808
|
+
getPageDump(pageNumber: number): null | Uint8Array {
|
|
18809
|
+
const page = this.pvm.getMemoryPage(pageNumber);
|
|
18810
|
+
|
|
18811
|
+
if (page === null) {
|
|
18812
|
+
// page wasn't allocated so we return an empty page
|
|
18813
|
+
return safeAllocUint8Array(PAGE_SIZE);
|
|
18814
|
+
}
|
|
18815
|
+
|
|
18816
|
+
if (page.length === PAGE_SIZE) {
|
|
18817
|
+
// page was allocated and has a proper size so we can simply return it
|
|
18818
|
+
return page;
|
|
18819
|
+
}
|
|
18820
|
+
|
|
18821
|
+
// page was allocated but it is shorter than PAGE_SIZE so we have to extend it
|
|
18822
|
+
const fullPage = safeAllocUint8Array(PAGE_SIZE);
|
|
18823
|
+
fullPage.set(page);
|
|
18824
|
+
return fullPage;
|
|
18825
|
+
}
|
|
18826
|
+
|
|
18827
|
+
setMemory(address: number, value: Uint8Array) {
|
|
18828
|
+
this.pvm.memory.storeFrom(tryAsMemoryIndex(address), value);
|
|
18829
|
+
}
|
|
18830
|
+
|
|
18831
|
+
getExitArg(): number {
|
|
18832
|
+
return this.pvm.getExitParam() ?? 0;
|
|
18833
|
+
}
|
|
18834
|
+
|
|
18835
|
+
getStatus(): Status {
|
|
18836
|
+
return this.pvm.getStatus();
|
|
18837
|
+
}
|
|
18838
|
+
|
|
18839
|
+
nextStep(): boolean {
|
|
18840
|
+
return this.pvm.nextStep() === Status.OK;
|
|
18841
|
+
}
|
|
18842
|
+
|
|
18843
|
+
nSteps(steps: number): boolean {
|
|
18844
|
+
check`${steps >>> 0 > 0} Expected a positive integer got ${steps}`;
|
|
18845
|
+
for (let i = 0; i < steps; i++) {
|
|
18846
|
+
const isOk = this.nextStep();
|
|
18847
|
+
if (!isOk) {
|
|
18848
|
+
return false;
|
|
18849
|
+
}
|
|
18850
|
+
}
|
|
18851
|
+
return true;
|
|
18852
|
+
}
|
|
18853
|
+
|
|
18854
|
+
getRegisters(): BigUint64Array {
|
|
18855
|
+
return this.pvm.registers.getAllU64();
|
|
18856
|
+
}
|
|
18857
|
+
|
|
18858
|
+
setRegisters(registers: Uint8Array) {
|
|
18859
|
+
this.pvm.registers.copyFrom(new Registers(registers));
|
|
18860
|
+
}
|
|
18861
|
+
|
|
18862
|
+
getProgramCounter(): number {
|
|
18863
|
+
return this.pvm.getPC();
|
|
18864
|
+
}
|
|
18865
|
+
|
|
18866
|
+
setNextProgramCounter(nextPc: number) {
|
|
18867
|
+
this.pvm.setNextPC(nextPc);
|
|
18868
|
+
}
|
|
18869
|
+
|
|
18870
|
+
getGasLeft(): bigint {
|
|
18871
|
+
return BigInt(this.pvm.gas.get());
|
|
18872
|
+
}
|
|
18873
|
+
|
|
18874
|
+
setGasLeft(gas: bigint) {
|
|
18875
|
+
this.pvm.gas.set(tryAsGas(gas));
|
|
18876
|
+
}
|
|
18877
|
+
}
|
|
18878
|
+
|
|
18879
|
+
type index$6_DebuggerAdapter = DebuggerAdapter;
|
|
18880
|
+
declare const index$6_DebuggerAdapter: typeof DebuggerAdapter;
|
|
18881
|
+
type index$6_Interpreter = Interpreter;
|
|
18882
|
+
declare const index$6_Interpreter: typeof Interpreter;
|
|
18883
|
+
type index$6_InterpreterOptions = InterpreterOptions;
|
|
18884
|
+
type index$6_Memory = Memory;
|
|
18885
|
+
declare const index$6_Memory: typeof Memory;
|
|
18886
|
+
type index$6_MemoryBuilder = MemoryBuilder;
|
|
18887
|
+
declare const index$6_MemoryBuilder: typeof MemoryBuilder;
|
|
18888
|
+
type index$6_MemoryIndex = MemoryIndex;
|
|
18889
|
+
type index$6_Registers = Registers;
|
|
18890
|
+
declare const index$6_Registers: typeof Registers;
|
|
18891
|
+
type index$6_SbrkIndex = SbrkIndex;
|
|
18892
|
+
declare const index$6_gasCounter: typeof gasCounter;
|
|
18893
|
+
declare const index$6_logger: typeof logger;
|
|
18894
|
+
declare const index$6_tryAsMemoryIndex: typeof tryAsMemoryIndex;
|
|
18895
|
+
declare const index$6_tryAsSbrkIndex: typeof tryAsSbrkIndex;
|
|
18896
|
+
declare namespace index$6 {
|
|
18897
|
+
export { index$6_DebuggerAdapter as DebuggerAdapter, index$6_Interpreter as Interpreter, index$6_Memory as Memory, index$6_MemoryBuilder as MemoryBuilder, index$6_Registers as Registers, index$6_gasCounter as gasCounter, index$6_logger as logger, index$6_tryAsMemoryIndex as tryAsMemoryIndex, index$6_tryAsSbrkIndex as tryAsSbrkIndex };
|
|
18898
|
+
export type { index$6_InterpreterOptions as InterpreterOptions, index$6_MemoryIndex as MemoryIndex, index$6_SbrkIndex as SbrkIndex };
|
|
18623
18899
|
}
|
|
18624
18900
|
|
|
18625
18901
|
type ResolveFn = (pvm: IPvmInterpreter) => void;
|
|
@@ -18805,18 +19081,18 @@ declare class HostCalls {
|
|
|
18805
19081
|
}
|
|
18806
19082
|
}
|
|
18807
19083
|
|
|
18808
|
-
type index$
|
|
18809
|
-
type index$
|
|
18810
|
-
declare const index$
|
|
18811
|
-
type index$
|
|
18812
|
-
declare const index$
|
|
18813
|
-
type index$
|
|
18814
|
-
declare const index$
|
|
18815
|
-
declare const index$
|
|
18816
|
-
declare const index$
|
|
18817
|
-
declare namespace index$
|
|
18818
|
-
export { index$
|
|
18819
|
-
export type { index$
|
|
19084
|
+
type index$5_HostCallHandler = HostCallHandler;
|
|
19085
|
+
type index$5_HostCallMemory = HostCallMemory;
|
|
19086
|
+
declare const index$5_HostCallMemory: typeof HostCallMemory;
|
|
19087
|
+
type index$5_HostCallRegisters = HostCallRegisters;
|
|
19088
|
+
declare const index$5_HostCallRegisters: typeof HostCallRegisters;
|
|
19089
|
+
type index$5_PvmExecution = PvmExecution;
|
|
19090
|
+
declare const index$5_PvmExecution: typeof PvmExecution;
|
|
19091
|
+
declare const index$5_traceRegisters: typeof traceRegisters;
|
|
19092
|
+
declare const index$5_tryAsHostCallIndex: typeof tryAsHostCallIndex;
|
|
19093
|
+
declare namespace index$5 {
|
|
19094
|
+
export { index$5_HostCallMemory as HostCallMemory, index$5_HostCallRegisters as HostCallRegisters, HostCallsManager as HostCalls, index$5_PvmExecution as PvmExecution, HostCalls as PvmHostCallExtension, InterpreterInstanceManager as PvmInstanceManager, index$5_traceRegisters as traceRegisters, index$5_tryAsHostCallIndex as tryAsHostCallIndex };
|
|
19095
|
+
export type { index$5_HostCallHandler as HostCallHandler };
|
|
18820
19096
|
}
|
|
18821
19097
|
|
|
18822
19098
|
/**
|
|
@@ -19178,7 +19454,11 @@ declare class PartiallyUpdatedState<T extends StateSlice = StateSlice> {
|
|
|
19178
19454
|
return service?.getPreimage(hash) ?? null;
|
|
19179
19455
|
}
|
|
19180
19456
|
|
|
19181
|
-
/**
|
|
19457
|
+
/**
|
|
19458
|
+
* Get status of a preimage of current service taking into account any updates.
|
|
19459
|
+
*
|
|
19460
|
+
* https://graypaper.fluffylabs.dev/#/ab2cdbd/110201110201?v=0.7.2
|
|
19461
|
+
*/
|
|
19182
19462
|
getLookupHistory(
|
|
19183
19463
|
currentTimeslot: TimeSlot,
|
|
19184
19464
|
serviceId: ServiceId,
|
|
@@ -19231,13 +19511,7 @@ declare class PartiallyUpdatedState<T extends StateSlice = StateSlice> {
|
|
|
19231
19511
|
return new LookupHistoryItem(hash, updatedPreimage.length, tryAsLookupHistorySlots([currentTimeslot]));
|
|
19232
19512
|
}
|
|
19233
19513
|
case UpdatePreimageKind.Remove: {
|
|
19234
|
-
|
|
19235
|
-
// kinda impossible, since we know it's there because it's removed.
|
|
19236
|
-
if (state === null) {
|
|
19237
|
-
return null;
|
|
19238
|
-
}
|
|
19239
|
-
|
|
19240
|
-
return new LookupHistoryItem(hash, state.length, tryAsLookupHistorySlots([...state.slots, currentTimeslot]));
|
|
19514
|
+
return null;
|
|
19241
19515
|
}
|
|
19242
19516
|
case UpdatePreimageKind.UpdateOrAdd: {
|
|
19243
19517
|
return action.item;
|
|
@@ -19456,184 +19730,14 @@ declare const codecServiceAccountInfoWithThresholdBalance = codec.object(
|
|
|
19456
19730
|
"ServiceAccountInfoWithThresholdBalance",
|
|
19457
19731
|
);
|
|
19458
19732
|
|
|
19459
|
-
type index$5_AccumulationStateUpdate = AccumulationStateUpdate;
|
|
19460
|
-
declare const index$5_AccumulationStateUpdate: typeof AccumulationStateUpdate;
|
|
19461
|
-
declare const index$5_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
|
|
19462
|
-
type index$5_EjectError = EjectError;
|
|
19463
|
-
declare const index$5_EjectError: typeof EjectError;
|
|
19464
|
-
type index$5_ForgetPreimageError = ForgetPreimageError;
|
|
19465
|
-
declare const index$5_ForgetPreimageError: typeof ForgetPreimageError;
|
|
19466
|
-
declare const index$5_HostCallResult: typeof HostCallResult;
|
|
19467
|
-
type index$5_InsufficientFundsError = InsufficientFundsError;
|
|
19468
|
-
declare const index$5_MAX_U32: typeof MAX_U32;
|
|
19469
|
-
declare const index$5_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
|
|
19470
|
-
type index$5_MachineId = MachineId;
|
|
19471
|
-
type index$5_MachineInstance = MachineInstance;
|
|
19472
|
-
declare const index$5_MachineInstance: typeof MachineInstance;
|
|
19473
|
-
type index$5_MachineResult = MachineResult;
|
|
19474
|
-
type index$5_MachineStatus = MachineStatus;
|
|
19475
|
-
type index$5_MemoryOperation = MemoryOperation;
|
|
19476
|
-
declare const index$5_MemoryOperation: typeof MemoryOperation;
|
|
19477
|
-
type index$5_NewServiceError = NewServiceError;
|
|
19478
|
-
declare const index$5_NewServiceError: typeof NewServiceError;
|
|
19479
|
-
type index$5_NoMachineError = NoMachineError;
|
|
19480
|
-
type index$5_PagesError = PagesError;
|
|
19481
|
-
declare const index$5_PagesError: typeof PagesError;
|
|
19482
|
-
type index$5_PartialState = PartialState;
|
|
19483
|
-
type index$5_PartiallyUpdatedState<T extends StateSlice = StateSlice> = PartiallyUpdatedState<T>;
|
|
19484
|
-
declare const index$5_PartiallyUpdatedState: typeof PartiallyUpdatedState;
|
|
19485
|
-
type index$5_PeekPokeError = PeekPokeError;
|
|
19486
|
-
declare const index$5_PeekPokeError: typeof PeekPokeError;
|
|
19487
|
-
type index$5_PendingTransfer = PendingTransfer;
|
|
19488
|
-
declare const index$5_PendingTransfer: typeof PendingTransfer;
|
|
19489
|
-
type index$5_PreimageStatus = PreimageStatus;
|
|
19490
|
-
type index$5_PreimageStatusKind = PreimageStatusKind;
|
|
19491
|
-
declare const index$5_PreimageStatusKind: typeof PreimageStatusKind;
|
|
19492
|
-
type index$5_ProgramCounter = ProgramCounter;
|
|
19493
|
-
type index$5_ProvidePreimageError = ProvidePreimageError;
|
|
19494
|
-
declare const index$5_ProvidePreimageError: typeof ProvidePreimageError;
|
|
19495
|
-
type index$5_RefineExternalities = RefineExternalities;
|
|
19496
|
-
type index$5_RequestPreimageError = RequestPreimageError;
|
|
19497
|
-
declare const index$5_RequestPreimageError: typeof RequestPreimageError;
|
|
19498
|
-
declare const index$5_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
|
|
19499
|
-
type index$5_SegmentExportError = SegmentExportError;
|
|
19500
|
-
type index$5_ServiceStateUpdate = ServiceStateUpdate;
|
|
19501
|
-
type index$5_StateSlice = StateSlice;
|
|
19502
|
-
type index$5_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
|
|
19503
|
-
type index$5_TransferError = TransferError;
|
|
19504
|
-
declare const index$5_TransferError: typeof TransferError;
|
|
19505
|
-
type index$5_UnprivilegedError = UnprivilegedError;
|
|
19506
|
-
type index$5_UpdatePrivilegesError = UpdatePrivilegesError;
|
|
19507
|
-
declare const index$5_UpdatePrivilegesError: typeof UpdatePrivilegesError;
|
|
19508
|
-
type index$5_ZeroVoidError = ZeroVoidError;
|
|
19509
|
-
declare const index$5_ZeroVoidError: typeof ZeroVoidError;
|
|
19510
|
-
declare const index$5_clampU64ToU32: typeof clampU64ToU32;
|
|
19511
|
-
declare const index$5_deepCloneMapWithArray: typeof deepCloneMapWithArray;
|
|
19512
|
-
declare const index$5_emptyRegistersBuffer: typeof emptyRegistersBuffer;
|
|
19513
|
-
declare const index$5_getServiceId: typeof getServiceId;
|
|
19514
|
-
declare const index$5_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
|
|
19515
|
-
declare const index$5_preimageLenAsU32: typeof preimageLenAsU32;
|
|
19516
|
-
declare const index$5_slotsToPreimageStatus: typeof slotsToPreimageStatus;
|
|
19517
|
-
declare const index$5_toMemoryOperation: typeof toMemoryOperation;
|
|
19518
|
-
declare const index$5_tryAsMachineId: typeof tryAsMachineId;
|
|
19519
|
-
declare const index$5_tryAsProgramCounter: typeof tryAsProgramCounter;
|
|
19520
|
-
declare const index$5_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
|
|
19521
|
-
declare namespace index$5 {
|
|
19522
|
-
export { index$5_AccumulationStateUpdate as AccumulationStateUpdate, index$5_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$5_EjectError as EjectError, index$5_ForgetPreimageError as ForgetPreimageError, index$5_HostCallResult as HostCallResult, index$5_MAX_U32 as MAX_U32, index$5_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$5_MachineInstance as MachineInstance, index$5_MemoryOperation as MemoryOperation, index$5_NewServiceError as NewServiceError, index$5_PagesError as PagesError, index$5_PartiallyUpdatedState as PartiallyUpdatedState, index$5_PeekPokeError as PeekPokeError, index$5_PendingTransfer as PendingTransfer, index$5_PreimageStatusKind as PreimageStatusKind, index$5_ProvidePreimageError as ProvidePreimageError, index$5_RequestPreimageError as RequestPreimageError, index$5_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$5_TransferError as TransferError, index$5_UpdatePrivilegesError as UpdatePrivilegesError, index$5_ZeroVoidError as ZeroVoidError, index$5_clampU64ToU32 as clampU64ToU32, index$5_deepCloneMapWithArray as deepCloneMapWithArray, index$5_emptyRegistersBuffer as emptyRegistersBuffer, index$5_getServiceId as getServiceId, index$5_getServiceIdOrCurrent as getServiceIdOrCurrent, codecServiceAccountInfoWithThresholdBalance as hostCallInfoAccount, index$5_preimageLenAsU32 as preimageLenAsU32, index$5_slotsToPreimageStatus as slotsToPreimageStatus, index$5_toMemoryOperation as toMemoryOperation, index$5_tryAsMachineId as tryAsMachineId, index$5_tryAsProgramCounter as tryAsProgramCounter, index$5_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
|
|
19523
|
-
export type { index$5_InsufficientFundsError as InsufficientFundsError, index$5_MachineId as MachineId, index$5_MachineResult as MachineResult, index$5_MachineStatus as MachineStatus, index$5_NoMachineError as NoMachineError, index$5_PartialState as PartialState, index$5_PreimageStatus as PreimageStatus, index$5_ProgramCounter as ProgramCounter, index$5_RefineExternalities as RefineExternalities, index$5_SegmentExportError as SegmentExportError, index$5_ServiceStateUpdate as ServiceStateUpdate, index$5_StateSlice as StateSlice, index$5_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$5_UnprivilegedError as UnprivilegedError };
|
|
19524
|
-
}
|
|
19525
|
-
|
|
19526
|
-
declare class DebuggerAdapter {
|
|
19527
|
-
private readonly pvm: Interpreter;
|
|
19528
|
-
|
|
19529
|
-
constructor(useSbrkGas = false) {
|
|
19530
|
-
this.pvm = new Interpreter({ useSbrkGas });
|
|
19531
|
-
}
|
|
19532
|
-
|
|
19533
|
-
resetGeneric(rawProgram: Uint8Array, flatRegisters: Uint8Array, initialGas: bigint) {
|
|
19534
|
-
this.pvm.resetGeneric(rawProgram, 0, tryAsGas(initialGas), new Registers(flatRegisters));
|
|
19535
|
-
}
|
|
19536
|
-
|
|
19537
|
-
reset(rawProgram: Uint8Array, pc: number, gas: bigint, maybeRegisters?: Registers, maybeMemory?: Memory) {
|
|
19538
|
-
this.pvm.resetGeneric(rawProgram, pc, tryAsGas(gas), maybeRegisters, maybeMemory);
|
|
19539
|
-
}
|
|
19540
|
-
|
|
19541
|
-
getPageDump(pageNumber: number): null | Uint8Array {
|
|
19542
|
-
const page = this.pvm.getMemoryPage(pageNumber);
|
|
19543
|
-
|
|
19544
|
-
if (page === null) {
|
|
19545
|
-
// page wasn't allocated so we return an empty page
|
|
19546
|
-
return safeAllocUint8Array(PAGE_SIZE);
|
|
19547
|
-
}
|
|
19548
|
-
|
|
19549
|
-
if (page.length === PAGE_SIZE) {
|
|
19550
|
-
// page was allocated and has a proper size so we can simply return it
|
|
19551
|
-
return page;
|
|
19552
|
-
}
|
|
19553
|
-
|
|
19554
|
-
// page was allocated but it is shorter than PAGE_SIZE so we have to extend it
|
|
19555
|
-
const fullPage = safeAllocUint8Array(PAGE_SIZE);
|
|
19556
|
-
fullPage.set(page);
|
|
19557
|
-
return fullPage;
|
|
19558
|
-
}
|
|
19559
|
-
|
|
19560
|
-
setMemory(address: number, value: Uint8Array) {
|
|
19561
|
-
this.pvm.memory.storeFrom(tryAsMemoryIndex(address), value);
|
|
19562
|
-
}
|
|
19563
|
-
|
|
19564
|
-
getExitArg(): number {
|
|
19565
|
-
return this.pvm.getExitParam() ?? 0;
|
|
19566
|
-
}
|
|
19567
|
-
|
|
19568
|
-
getStatus(): Status {
|
|
19569
|
-
return this.pvm.getStatus();
|
|
19570
|
-
}
|
|
19571
|
-
|
|
19572
|
-
nextStep(): boolean {
|
|
19573
|
-
return this.pvm.nextStep() === Status.OK;
|
|
19574
|
-
}
|
|
19575
|
-
|
|
19576
|
-
nSteps(steps: number): boolean {
|
|
19577
|
-
check`${steps >>> 0 > 0} Expected a positive integer got ${steps}`;
|
|
19578
|
-
for (let i = 0; i < steps; i++) {
|
|
19579
|
-
const isOk = this.nextStep();
|
|
19580
|
-
if (!isOk) {
|
|
19581
|
-
return false;
|
|
19582
|
-
}
|
|
19583
|
-
}
|
|
19584
|
-
return true;
|
|
19585
|
-
}
|
|
19586
|
-
|
|
19587
|
-
getRegisters(): BigUint64Array {
|
|
19588
|
-
return this.pvm.registers.getAllU64();
|
|
19589
|
-
}
|
|
19590
|
-
|
|
19591
|
-
setRegisters(registers: Uint8Array) {
|
|
19592
|
-
this.pvm.registers.copyFrom(new Registers(registers));
|
|
19593
|
-
}
|
|
19594
|
-
|
|
19595
|
-
getProgramCounter(): number {
|
|
19596
|
-
return this.pvm.getPC();
|
|
19597
|
-
}
|
|
19598
|
-
|
|
19599
|
-
setNextProgramCounter(nextPc: number) {
|
|
19600
|
-
this.pvm.setNextPC(nextPc);
|
|
19601
|
-
}
|
|
19602
|
-
|
|
19603
|
-
getGasLeft(): bigint {
|
|
19604
|
-
return BigInt(this.pvm.gas.get());
|
|
19605
|
-
}
|
|
19606
|
-
|
|
19607
|
-
setGasLeft(gas: bigint) {
|
|
19608
|
-
this.pvm.gas.set(tryAsGas(gas));
|
|
19609
|
-
}
|
|
19610
|
-
}
|
|
19611
|
-
|
|
19612
19733
|
type index$4_AccumulationStateUpdate = AccumulationStateUpdate;
|
|
19613
19734
|
declare const index$4_AccumulationStateUpdate: typeof AccumulationStateUpdate;
|
|
19614
|
-
type index$4_Args = Args;
|
|
19615
|
-
type index$4_ArgsDecoder = ArgsDecoder;
|
|
19616
|
-
declare const index$4_ArgsDecoder: typeof ArgsDecoder;
|
|
19617
|
-
type index$4_ArgumentType = ArgumentType;
|
|
19618
|
-
declare const index$4_ArgumentType: typeof ArgumentType;
|
|
19619
|
-
type index$4_BasicBlocks = BasicBlocks;
|
|
19620
|
-
declare const index$4_BasicBlocks: typeof BasicBlocks;
|
|
19621
19735
|
declare const index$4_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
|
|
19622
19736
|
type index$4_EjectError = EjectError;
|
|
19623
19737
|
declare const index$4_EjectError: typeof EjectError;
|
|
19624
|
-
type index$4_EnumMapping = EnumMapping;
|
|
19625
|
-
type index$4_ErrorResult<Error> = ErrorResult<Error>;
|
|
19626
|
-
type index$4_ExtendedWitdthImmediateDecoder = ExtendedWitdthImmediateDecoder;
|
|
19627
|
-
declare const index$4_ExtendedWitdthImmediateDecoder: typeof ExtendedWitdthImmediateDecoder;
|
|
19628
19738
|
type index$4_ForgetPreimageError = ForgetPreimageError;
|
|
19629
19739
|
declare const index$4_ForgetPreimageError: typeof ForgetPreimageError;
|
|
19630
|
-
type index$4_HostCallMemory = HostCallMemory;
|
|
19631
|
-
declare const index$4_HostCallMemory: typeof HostCallMemory;
|
|
19632
|
-
type index$4_HostCallRegisters = HostCallRegisters;
|
|
19633
|
-
declare const index$4_HostCallRegisters: typeof HostCallRegisters;
|
|
19634
19740
|
declare const index$4_HostCallResult: typeof HostCallResult;
|
|
19635
|
-
type index$4_ImmediateDecoder = ImmediateDecoder;
|
|
19636
|
-
declare const index$4_ImmediateDecoder: typeof ImmediateDecoder;
|
|
19637
19741
|
type index$4_InsufficientFundsError = InsufficientFundsError;
|
|
19638
19742
|
declare const index$4_MAX_U32: typeof MAX_U32;
|
|
19639
19743
|
declare const index$4_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
|
|
@@ -19642,20 +19746,11 @@ type index$4_MachineInstance = MachineInstance;
|
|
|
19642
19746
|
declare const index$4_MachineInstance: typeof MachineInstance;
|
|
19643
19747
|
type index$4_MachineResult = MachineResult;
|
|
19644
19748
|
type index$4_MachineStatus = MachineStatus;
|
|
19645
|
-
type index$4_Mask = Mask;
|
|
19646
|
-
declare const index$4_Mask: typeof Mask;
|
|
19647
19749
|
type index$4_MemoryOperation = MemoryOperation;
|
|
19648
19750
|
declare const index$4_MemoryOperation: typeof MemoryOperation;
|
|
19649
|
-
type index$4_MemorySegment = MemorySegment;
|
|
19650
|
-
declare const index$4_MemorySegment: typeof MemorySegment;
|
|
19651
19751
|
type index$4_NewServiceError = NewServiceError;
|
|
19652
19752
|
declare const index$4_NewServiceError: typeof NewServiceError;
|
|
19653
|
-
type index$4_NibblesDecoder = NibblesDecoder;
|
|
19654
|
-
declare const index$4_NibblesDecoder: typeof NibblesDecoder;
|
|
19655
19753
|
type index$4_NoMachineError = NoMachineError;
|
|
19656
|
-
type index$4_OK = OK;
|
|
19657
|
-
type index$4_OkResult<Ok> = OkResult<Ok>;
|
|
19658
|
-
type index$4_Opaque<Type, Token extends string> = Opaque<Type, Token>;
|
|
19659
19754
|
type index$4_PagesError = PagesError;
|
|
19660
19755
|
declare const index$4_PagesError: typeof PagesError;
|
|
19661
19756
|
type index$4_PartialState = PartialState;
|
|
@@ -19668,74 +19763,38 @@ declare const index$4_PendingTransfer: typeof PendingTransfer;
|
|
|
19668
19763
|
type index$4_PreimageStatus = PreimageStatus;
|
|
19669
19764
|
type index$4_PreimageStatusKind = PreimageStatusKind;
|
|
19670
19765
|
declare const index$4_PreimageStatusKind: typeof PreimageStatusKind;
|
|
19671
|
-
type index$4_Program = Program;
|
|
19672
|
-
declare const index$4_Program: typeof Program;
|
|
19673
19766
|
type index$4_ProgramCounter = ProgramCounter;
|
|
19674
|
-
type index$4_ProgramDecoder = ProgramDecoder;
|
|
19675
|
-
declare const index$4_ProgramDecoder: typeof ProgramDecoder;
|
|
19676
19767
|
type index$4_ProvidePreimageError = ProvidePreimageError;
|
|
19677
19768
|
declare const index$4_ProvidePreimageError: typeof ProvidePreimageError;
|
|
19678
19769
|
type index$4_RefineExternalities = RefineExternalities;
|
|
19679
|
-
type index$4_Registers = Registers;
|
|
19680
|
-
declare const index$4_Registers: typeof Registers;
|
|
19681
19770
|
type index$4_RequestPreimageError = RequestPreimageError;
|
|
19682
19771
|
declare const index$4_RequestPreimageError: typeof RequestPreimageError;
|
|
19683
|
-
type index$4_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
|
|
19684
|
-
declare const index$4_RichTaggedError: typeof RichTaggedError;
|
|
19685
19772
|
declare const index$4_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
|
|
19686
19773
|
type index$4_SegmentExportError = SegmentExportError;
|
|
19687
19774
|
type index$4_ServiceStateUpdate = ServiceStateUpdate;
|
|
19688
|
-
type index$4_SpiMemory = SpiMemory;
|
|
19689
|
-
declare const index$4_SpiMemory: typeof SpiMemory;
|
|
19690
|
-
type index$4_SpiProgram = SpiProgram;
|
|
19691
|
-
declare const index$4_SpiProgram: typeof SpiProgram;
|
|
19692
19775
|
type index$4_StateSlice = StateSlice;
|
|
19693
|
-
type index$4_StringLiteral<Type> = StringLiteral<Type>;
|
|
19694
19776
|
type index$4_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
|
|
19695
|
-
type index$4_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
|
|
19696
|
-
type index$4_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
|
|
19697
19777
|
type index$4_TransferError = TransferError;
|
|
19698
19778
|
declare const index$4_TransferError: typeof TransferError;
|
|
19699
|
-
type index$4_Uninstantiable = Uninstantiable;
|
|
19700
19779
|
type index$4_UnprivilegedError = UnprivilegedError;
|
|
19701
19780
|
type index$4_UpdatePrivilegesError = UpdatePrivilegesError;
|
|
19702
19781
|
declare const index$4_UpdatePrivilegesError: typeof UpdatePrivilegesError;
|
|
19703
|
-
type index$4_WithDebug = WithDebug;
|
|
19704
|
-
declare const index$4_WithDebug: typeof WithDebug;
|
|
19705
|
-
type index$4_WithOpaque<Token extends string> = WithOpaque<Token>;
|
|
19706
19782
|
type index$4_ZeroVoidError = ZeroVoidError;
|
|
19707
19783
|
declare const index$4_ZeroVoidError: typeof ZeroVoidError;
|
|
19708
|
-
declare const index$4___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
|
|
19709
|
-
declare const index$4_asOpaqueType: typeof asOpaqueType;
|
|
19710
|
-
declare const index$4_assertEmpty: typeof assertEmpty;
|
|
19711
|
-
declare const index$4_assertNever: typeof assertNever;
|
|
19712
|
-
declare const index$4_check: typeof check;
|
|
19713
19784
|
declare const index$4_clampU64ToU32: typeof clampU64ToU32;
|
|
19714
|
-
declare const index$4_createResults: typeof createResults;
|
|
19715
|
-
declare const index$4_decodeStandardProgram: typeof decodeStandardProgram;
|
|
19716
19785
|
declare const index$4_deepCloneMapWithArray: typeof deepCloneMapWithArray;
|
|
19717
19786
|
declare const index$4_emptyRegistersBuffer: typeof emptyRegistersBuffer;
|
|
19718
|
-
declare const index$4_extractCodeAndMetadata: typeof extractCodeAndMetadata;
|
|
19719
19787
|
declare const index$4_getServiceId: typeof getServiceId;
|
|
19720
19788
|
declare const index$4_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
|
|
19721
|
-
declare const index$4_inspect: typeof inspect;
|
|
19722
|
-
declare const index$4_instructionArgumentTypeMap: typeof instructionArgumentTypeMap;
|
|
19723
|
-
declare const index$4_isBrowser: typeof isBrowser;
|
|
19724
|
-
declare const index$4_isTaggedError: typeof isTaggedError;
|
|
19725
|
-
declare const index$4_lazyInspect: typeof lazyInspect;
|
|
19726
|
-
declare const index$4_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
|
|
19727
|
-
declare const index$4_measure: typeof measure;
|
|
19728
19789
|
declare const index$4_preimageLenAsU32: typeof preimageLenAsU32;
|
|
19729
|
-
declare const index$4_resultToString: typeof resultToString;
|
|
19730
|
-
declare const index$4_seeThrough: typeof seeThrough;
|
|
19731
19790
|
declare const index$4_slotsToPreimageStatus: typeof slotsToPreimageStatus;
|
|
19732
19791
|
declare const index$4_toMemoryOperation: typeof toMemoryOperation;
|
|
19733
19792
|
declare const index$4_tryAsMachineId: typeof tryAsMachineId;
|
|
19734
19793
|
declare const index$4_tryAsProgramCounter: typeof tryAsProgramCounter;
|
|
19735
19794
|
declare const index$4_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
|
|
19736
19795
|
declare namespace index$4 {
|
|
19737
|
-
export { index$4_AccumulationStateUpdate as AccumulationStateUpdate, index$
|
|
19738
|
-
export type { index$
|
|
19796
|
+
export { index$4_AccumulationStateUpdate as AccumulationStateUpdate, index$4_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$4_EjectError as EjectError, index$4_ForgetPreimageError as ForgetPreimageError, index$4_HostCallResult as HostCallResult, index$4_MAX_U32 as MAX_U32, index$4_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$4_MachineInstance as MachineInstance, index$4_MemoryOperation as MemoryOperation, index$4_NewServiceError as NewServiceError, index$4_PagesError as PagesError, index$4_PartiallyUpdatedState as PartiallyUpdatedState, index$4_PeekPokeError as PeekPokeError, index$4_PendingTransfer as PendingTransfer, index$4_PreimageStatusKind as PreimageStatusKind, index$4_ProvidePreimageError as ProvidePreimageError, index$4_RequestPreimageError as RequestPreimageError, index$4_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$4_TransferError as TransferError, index$4_UpdatePrivilegesError as UpdatePrivilegesError, index$4_ZeroVoidError as ZeroVoidError, index$4_clampU64ToU32 as clampU64ToU32, index$4_deepCloneMapWithArray as deepCloneMapWithArray, index$4_emptyRegistersBuffer as emptyRegistersBuffer, index$4_getServiceId as getServiceId, index$4_getServiceIdOrCurrent as getServiceIdOrCurrent, codecServiceAccountInfoWithThresholdBalance as hostCallInfoAccount, index$4_preimageLenAsU32 as preimageLenAsU32, index$4_slotsToPreimageStatus as slotsToPreimageStatus, index$4_toMemoryOperation as toMemoryOperation, index$4_tryAsMachineId as tryAsMachineId, index$4_tryAsProgramCounter as tryAsProgramCounter, index$4_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
|
|
19797
|
+
export type { index$4_InsufficientFundsError as InsufficientFundsError, index$4_MachineId as MachineId, index$4_MachineResult as MachineResult, index$4_MachineStatus as MachineStatus, index$4_NoMachineError as NoMachineError, index$4_PartialState as PartialState, index$4_PreimageStatus as PreimageStatus, index$4_ProgramCounter as ProgramCounter, index$4_RefineExternalities as RefineExternalities, index$4_SegmentExportError as SegmentExportError, index$4_ServiceStateUpdate as ServiceStateUpdate, index$4_StateSlice as StateSlice, index$4_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$4_UnprivilegedError as UnprivilegedError };
|
|
19739
19798
|
}
|
|
19740
19799
|
|
|
19741
19800
|
declare const ENTROPY_BYTES = 32;
|
|
@@ -20539,7 +20598,6 @@ declare namespace index$1 {
|
|
|
20539
20598
|
/** Helper function to create most used hashes in the block */
|
|
20540
20599
|
declare class TransitionHasher implements MmrHasher<KeccakHash> {
|
|
20541
20600
|
constructor(
|
|
20542
|
-
private readonly context: ChainSpec,
|
|
20543
20601
|
private readonly keccakHasher: KeccakHasher,
|
|
20544
20602
|
public readonly blake2b: Blake2b,
|
|
20545
20603
|
) {}
|
|
@@ -20695,4 +20753,4 @@ declare namespace index {
|
|
|
20695
20753
|
export type { index_PreimagesInput as PreimagesInput, index_PreimagesState as PreimagesState, index_PreimagesStateUpdate as PreimagesStateUpdate };
|
|
20696
20754
|
}
|
|
20697
20755
|
|
|
20698
|
-
export { index$
|
|
20756
|
+
export { index$l as block, index$j as block_json, index$s as bytes, index$q as codec, index$o as collections, index$m as config, index$h as config_node, index$n as crypto, index$c as database, index$b as erasure_coding, index$9 as fuzz_proto, index$p as hash, index$4 as jam_host_calls, index$k as json_parser, index$i as logger, index$f as mmr, index$r as numbers, index$t as ordering, index$6 as pvm, index$5 as pvm_host_calls, index$7 as pvm_program, index$8 as pvm_spi_decoder, index$3 as shuffling, index$e as state, index$2 as state_json, index$d as state_merkleization, index$1 as state_vectors, index as transition, index$g as trie, index$u as utils };
|