@typeberry/lib 0.0.1-886997c → 0.0.1-8d96ad4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/configs/index.d.ts +74 -0
  2. package/index.d.ts +160 -128
  3. package/index.js +1356 -622
  4. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ export declare const configs: {
2
+ default: {
3
+ $schema: string;
4
+ version: number;
5
+ flavor: string;
6
+ authorship: {
7
+ omit_seal_verification: boolean;
8
+ };
9
+ chain_spec: {
10
+ id: string;
11
+ bootnodes: string[];
12
+ genesis_header: string;
13
+ genesis_state: {
14
+ "01000000000000000000000000000000000000000000000000000000000000": string;
15
+ "02000000000000000000000000000000000000000000000000000000000000": string;
16
+ "03000000000000000000000000000000000000000000000000000000000000": string;
17
+ "04000000000000000000000000000000000000000000000000000000000000": string;
18
+ "05000000000000000000000000000000000000000000000000000000000000": string;
19
+ "06000000000000000000000000000000000000000000000000000000000000": string;
20
+ "07000000000000000000000000000000000000000000000000000000000000": string;
21
+ "08000000000000000000000000000000000000000000000000000000000000": string;
22
+ "09000000000000000000000000000000000000000000000000000000000000": string;
23
+ "0a000000000000000000000000000000000000000000000000000000000000": string;
24
+ "0b000000000000000000000000000000000000000000000000000000000000": string;
25
+ "0c000000000000000000000000000000000000000000000000000000000000": string;
26
+ "0d000000000000000000000000000000000000000000000000000000000000": string;
27
+ "0e000000000000000000000000000000000000000000000000000000000000": string;
28
+ "0f000000000000000000000000000000000000000000000000000000000000": string;
29
+ ff000000000000000000000000000000000000000000000000000000000000: string;
30
+ "00fe00ff00ff00ff6326432b5b3213dfd1609495e13c6b276cb474d6796453": string;
31
+ "00fe00ff00ff00fff8485e3a88e86182e63280720d5ec9892578f0e577fb1b": string;
32
+ "0023000000000000478648cd19b4f812f897a26976ecf312eac28508b4368d": string;
33
+ "004b000400000000f324d112c31c3778a072940b55dd35f3a4b77e72d2d2db": string;
34
+ };
35
+ };
36
+ database_base_path: string;
37
+ };
38
+ dev: {
39
+ $schema: string;
40
+ version: number;
41
+ flavor: string;
42
+ authorship: {
43
+ omit_seal_verification: boolean;
44
+ };
45
+ chain_spec: {
46
+ id: string;
47
+ bootnodes: string[];
48
+ genesis_header: string;
49
+ genesis_state: {
50
+ "01000000000000000000000000000000000000000000000000000000000000": string;
51
+ "02000000000000000000000000000000000000000000000000000000000000": string;
52
+ "03000000000000000000000000000000000000000000000000000000000000": string;
53
+ "04000000000000000000000000000000000000000000000000000000000000": string;
54
+ "05000000000000000000000000000000000000000000000000000000000000": string;
55
+ "06000000000000000000000000000000000000000000000000000000000000": string;
56
+ "07000000000000000000000000000000000000000000000000000000000000": string;
57
+ "08000000000000000000000000000000000000000000000000000000000000": string;
58
+ "09000000000000000000000000000000000000000000000000000000000000": string;
59
+ "0a000000000000000000000000000000000000000000000000000000000000": string;
60
+ "0b000000000000000000000000000000000000000000000000000000000000": string;
61
+ "0c000000000000000000000000000000000000000000000000000000000000": string;
62
+ "0d000000000000000000000000000000000000000000000000000000000000": string;
63
+ "0e000000000000000000000000000000000000000000000000000000000000": string;
64
+ "0f000000000000000000000000000000000000000000000000000000000000": string;
65
+ ff000000000000000000000000000000000000000000000000000000000000: string;
66
+ "00fe00ff00ff00ff6326432b5b3213dfd1609495e13c6b276cb474d6796453": string;
67
+ "00fe00ff00ff00fff8485e3a88e86182e63280720d5ec9892578f0e577fb1b": string;
68
+ "0023000000000000478648cd19b4f812f897a26976ecf312eac28508b4368d": string;
69
+ "004b000400000000f324d112c31c3778a072940b55dd35f3a4b77e72d2d2db": string;
70
+ };
71
+ };
72
+ database_base_path: string;
73
+ };
74
+ };
package/index.d.ts CHANGED
@@ -160,6 +160,10 @@ declare class Compatibility {
160
160
  }
161
161
  }
162
162
 
163
+ declare function isBrowser() {
164
+ return typeof process === "undefined" || typeof process.abort === "undefined";
165
+ }
166
+
163
167
  /**
164
168
  * A function to perform runtime assertions.
165
169
  *
@@ -278,20 +282,19 @@ declare function inspect<T>(val: T): string {
278
282
  }
279
283
 
280
284
  /** Utility function to measure time taken for some operation [ms]. */
281
- declare const measure =
282
- typeof process === "undefined"
283
- ? (id: string) => {
284
- const start = performance.now();
285
- return () => `${id} took ${performance.now() - start}ms`;
286
- }
287
- : (id: string) => {
288
- const start = process.hrtime.bigint();
289
- return () => {
290
- const tookNano = process.hrtime.bigint() - start;
291
- const tookMilli = Number(tookNano / 1_000_000n).toFixed(2);
292
- return `${id} took ${tookMilli}ms`;
293
- };
285
+ declare const measure = isBrowser()
286
+ ? (id: string) => {
287
+ const start = performance.now();
288
+ return () => `${id} took ${performance.now() - start}ms`;
289
+ }
290
+ : (id: string) => {
291
+ const start = process.hrtime.bigint();
292
+ return () => {
293
+ const tookNano = process.hrtime.bigint() - start;
294
+ const tookMilli = Number(tookNano / 1_000_000n).toFixed(2);
295
+ return `${id} took ${tookMilli}ms`;
294
296
  };
297
+ };
295
298
 
296
299
  /** A class that adds `toString` method that prints all properties of an object. */
297
300
  declare abstract class WithDebug {
@@ -778,6 +781,7 @@ declare const index$r_ensure: typeof ensure;
778
781
  declare const index$r_env: typeof env;
779
782
  declare const index$r_getAllKeysSorted: typeof getAllKeysSorted;
780
783
  declare const index$r_inspect: typeof inspect;
784
+ declare const index$r_isBrowser: typeof isBrowser;
781
785
  declare const index$r_isResult: typeof isResult;
782
786
  declare const index$r_isTaggedError: typeof isTaggedError;
783
787
  declare const index$r_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
@@ -788,7 +792,7 @@ declare const index$r_resultToString: typeof resultToString;
788
792
  declare const index$r_seeThrough: typeof seeThrough;
789
793
  declare const index$r_trimStack: typeof trimStack;
790
794
  declare namespace index$r {
791
- export { index$r_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$r_CURRENT_SUITE as CURRENT_SUITE, index$r_CURRENT_VERSION as CURRENT_VERSION, index$r_Compatibility as Compatibility, index$r_DEFAULT_SUITE as DEFAULT_SUITE, index$r_DEFAULT_VERSION as DEFAULT_VERSION, index$r_ErrorsCollector as ErrorsCollector, index$r_GpVersion as GpVersion, Result$2 as Result, index$r_RichTaggedError as RichTaggedError, index$r_TEST_COMPARE_USING as TEST_COMPARE_USING, index$r_TestSuite as TestSuite, index$r_WithDebug as WithDebug, index$r___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$r_asOpaqueType as asOpaqueType, index$r_assertEmpty as assertEmpty, index$r_assertNever as assertNever, index$r_callCompareFunction as callCompareFunction, index$r_cast as cast, index$r_check as check, index$r_deepEqual as deepEqual, index$r_ensure as ensure, index$r_env as env, index$r_getAllKeysSorted as getAllKeysSorted, index$r_inspect as inspect, index$r_isResult as isResult, index$r_isTaggedError as isTaggedError, index$r_maybeTaggedErrorToString as maybeTaggedErrorToString, index$r_measure as measure, index$r_parseCurrentSuite as parseCurrentSuite, index$r_parseCurrentVersion as parseCurrentVersion, index$r_resultToString as resultToString, index$r_seeThrough as seeThrough, index$r_trimStack as trimStack };
795
+ export { index$r_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$r_CURRENT_SUITE as CURRENT_SUITE, index$r_CURRENT_VERSION as CURRENT_VERSION, index$r_Compatibility as Compatibility, index$r_DEFAULT_SUITE as DEFAULT_SUITE, index$r_DEFAULT_VERSION as DEFAULT_VERSION, index$r_ErrorsCollector as ErrorsCollector, index$r_GpVersion as GpVersion, Result$2 as Result, index$r_RichTaggedError as RichTaggedError, index$r_TEST_COMPARE_USING as TEST_COMPARE_USING, index$r_TestSuite as TestSuite, index$r_WithDebug as WithDebug, index$r___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$r_asOpaqueType as asOpaqueType, index$r_assertEmpty as assertEmpty, index$r_assertNever as assertNever, index$r_callCompareFunction as callCompareFunction, index$r_cast as cast, index$r_check as check, index$r_deepEqual as deepEqual, index$r_ensure as ensure, index$r_env as env, index$r_getAllKeysSorted as getAllKeysSorted, index$r_inspect as inspect, index$r_isBrowser as isBrowser, index$r_isResult as isResult, index$r_isTaggedError as isTaggedError, index$r_maybeTaggedErrorToString as maybeTaggedErrorToString, index$r_measure as measure, index$r_parseCurrentSuite as parseCurrentSuite, index$r_parseCurrentVersion as parseCurrentVersion, index$r_resultToString as resultToString, index$r_seeThrough as seeThrough, index$r_trimStack as trimStack };
792
796
  export type { index$r_DeepEqualOptions as DeepEqualOptions, index$r_EnumMapping as EnumMapping, index$r_ErrorResult as ErrorResult, index$r_OK as OK, index$r_OkResult as OkResult, index$r_Opaque as Opaque, index$r_StringLiteral as StringLiteral, index$r_TaggedError as TaggedError, index$r_TokenOf as TokenOf, index$r_Uninstantiable as Uninstantiable, index$r_WithOpaque as WithOpaque };
793
797
  }
794
798
 
@@ -4456,6 +4460,84 @@ declare namespace index$m {
4456
4460
  export type { index$m_HashWithZeroedBit as HashWithZeroedBit, index$m_ImmutableHashDictionary as ImmutableHashDictionary, index$m_ImmutableHashSet as ImmutableHashSet, index$m_ImmutableSortedArray as ImmutableSortedArray, index$m_ImmutableSortedSet as ImmutableSortedSet, index$m_KeyMapper as KeyMapper, index$m_KeyMappers as KeyMappers, index$m_KnownSize as KnownSize, index$m_KnownSizeArray as KnownSizeArray, index$m_KnownSizeId as KnownSizeId, index$m_NestedMaps as NestedMaps };
4457
4461
  }
4458
4462
 
4463
+ declare namespace bandersnatch_d_exports {
4464
+ export { batch_verify_tickets, __wbg_init$2 as default, derive_public_key, initSync$2 as initSync, ring_commitment, verify_seal };
4465
+ export type { InitInput$2 as InitInput, InitOutput$2 as InitOutput, SyncInitInput$2 as SyncInitInput };
4466
+ }
4467
+ /* tslint:disable */
4468
+ /* eslint-disable */
4469
+ /**
4470
+ * @param {Uint8Array} keys
4471
+ * @returns {Uint8Array}
4472
+ */
4473
+ declare function ring_commitment(keys: Uint8Array): Uint8Array;
4474
+ /**
4475
+ * Derive Private and Public Key from Seed
4476
+ *
4477
+ * returns: `Vec<u8>` containing the exit (1 byte) status followed by the (32 bytes) public key
4478
+ * @param {Uint8Array} seed
4479
+ * @returns {Uint8Array}
4480
+ */
4481
+ declare function derive_public_key(seed: Uint8Array): Uint8Array;
4482
+ /**
4483
+ * Seal verification as defined in:
4484
+ * https://graypaper.fluffylabs.dev/#/68eaa1f/0eff000eff00?v=0.6.4
4485
+ * or
4486
+ * https://graypaper.fluffylabs.dev/#/68eaa1f/0e54010e5401?v=0.6.4
4487
+ * @param {Uint8Array} keys
4488
+ * @param {number} signer_key_index
4489
+ * @param {Uint8Array} seal_data
4490
+ * @param {Uint8Array} payload
4491
+ * @param {Uint8Array} aux_data
4492
+ * @returns {Uint8Array}
4493
+ */
4494
+ declare function verify_seal(keys: Uint8Array, signer_key_index: number, seal_data: Uint8Array, payload: Uint8Array, aux_data: Uint8Array): Uint8Array;
4495
+ /**
4496
+ * Verify multiple tickets at once as defined in:
4497
+ * https://graypaper.fluffylabs.dev/#/68eaa1f/0f3e000f3e00?v=0.6.4
4498
+ *
4499
+ * NOTE: the aux_data of VRF function is empty!
4500
+ * @param {Uint8Array} keys
4501
+ * @param {Uint8Array} tickets_data
4502
+ * @param {number} vrf_input_data_len
4503
+ * @returns {Uint8Array}
4504
+ */
4505
+ declare function batch_verify_tickets(keys: Uint8Array, tickets_data: Uint8Array, vrf_input_data_len: number): Uint8Array;
4506
+ type InitInput$2 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
4507
+ interface InitOutput$2 {
4508
+ readonly memory: WebAssembly.Memory;
4509
+ readonly ring_commitment: (a: number, b: number, c: number) => void;
4510
+ readonly derive_public_key: (a: number, b: number, c: number) => void;
4511
+ readonly verify_seal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
4512
+ readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
4513
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
4514
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
4515
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
4516
+ }
4517
+ type SyncInitInput$2 = BufferSource | WebAssembly.Module;
4518
+ /**
4519
+ * Instantiates the given `module`, which can either be bytes or
4520
+ * a precompiled `WebAssembly.Module`.
4521
+ *
4522
+ * @param {SyncInitInput} module
4523
+ *
4524
+ * @returns {InitOutput}
4525
+ */
4526
+ declare function initSync$2(module: SyncInitInput$2): InitOutput$2;
4527
+
4528
+ /**
4529
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
4530
+ * for everything else, calls `WebAssembly.instantiate` directly.
4531
+ *
4532
+ * @param {InitInput | Promise<InitInput>} module_or_path
4533
+ *
4534
+ * @returns {Promise<InitOutput>}
4535
+ */
4536
+ declare function __wbg_init$2(module_or_path?: InitInput$2 | Promise<InitInput$2>): Promise<InitOutput$2>;
4537
+ //#endregion
4538
+ //#region native/index.d.ts
4539
+ declare function initAll(): Promise<void>;
4540
+
4459
4541
  /** ED25519 private key size. */
4460
4542
  declare const ED25519_PRIV_KEY_BYTES = 32;
4461
4543
  type ED25519_PRIV_KEY_BYTES = typeof ED25519_PRIV_KEY_BYTES;
@@ -4548,7 +4630,7 @@ declare async function verify<T extends BytesBlob>(input: Input<T>[]): Promise<b
4548
4630
  offset += messageLength;
4549
4631
  }
4550
4632
 
4551
- const result = Array.from(verify_ed25519(data)).map((x) => x === 1);
4633
+ const result = Array.from(ed25519.verify_ed25519(data)).map((x) => x === 1);
4552
4634
  return Promise.resolve(result);
4553
4635
  }
4554
4636
 
@@ -4570,7 +4652,7 @@ declare async function verifyBatch<T extends BytesBlob>(input: Input<T>[]): Prom
4570
4652
 
4571
4653
  const data = BytesBlob.blobFromParts(first, ...rest).raw;
4572
4654
 
4573
- return Promise.resolve(verify_ed25519_batch(data));
4655
+ return Promise.resolve(ed25519.verify_ed25519_batch(data));
4574
4656
  }
4575
4657
 
4576
4658
  type ed25519_ED25519_KEY_BYTES = ED25519_KEY_BYTES;
@@ -4590,59 +4672,6 @@ declare namespace ed25519 {
4590
4672
  export type { ed25519_ED25519_KEY_BYTES as ED25519_KEY_BYTES, ed25519_ED25519_PRIV_KEY_BYTES as ED25519_PRIV_KEY_BYTES, ed25519_ED25519_SIGNATURE_BYTES as ED25519_SIGNATURE_BYTES, ed25519_Ed25519Key as Ed25519Key, ed25519_Ed25519Signature as Ed25519Signature, ed25519_Input as Input };
4591
4673
  }
4592
4674
 
4593
- /* tslint:disable */
4594
- /* eslint-disable */
4595
- /**
4596
- * @param {Uint8Array} keys
4597
- * @returns {Uint8Array}
4598
- */
4599
- declare function ring_commitment(keys: Uint8Array): Uint8Array;
4600
- /**
4601
- * Derive Private and Public Key from Seed
4602
- *
4603
- * returns: `Vec<u8>` containing the exit (1 byte) status followed by the (32 bytes) public key
4604
- * @param {Uint8Array} seed
4605
- * @returns {Uint8Array}
4606
- */
4607
- declare function derive_public_key(seed: Uint8Array): Uint8Array;
4608
- /**
4609
- * Seal verification as defined in:
4610
- * https://graypaper.fluffylabs.dev/#/68eaa1f/0eff000eff00?v=0.6.4
4611
- * or
4612
- * https://graypaper.fluffylabs.dev/#/68eaa1f/0e54010e5401?v=0.6.4
4613
- * @param {Uint8Array} keys
4614
- * @param {number} signer_key_index
4615
- * @param {Uint8Array} seal_data
4616
- * @param {Uint8Array} payload
4617
- * @param {Uint8Array} aux_data
4618
- * @returns {Uint8Array}
4619
- */
4620
- declare function verify_seal(keys: Uint8Array, signer_key_index: number, seal_data: Uint8Array, payload: Uint8Array, aux_data: Uint8Array): Uint8Array;
4621
- /**
4622
- * Verify multiple tickets at once as defined in:
4623
- * https://graypaper.fluffylabs.dev/#/68eaa1f/0f3e000f3e00?v=0.6.4
4624
- *
4625
- * NOTE: the aux_data of VRF function is empty!
4626
- * @param {Uint8Array} keys
4627
- * @param {Uint8Array} tickets_data
4628
- * @param {number} vrf_input_data_len
4629
- * @returns {Uint8Array}
4630
- */
4631
- declare function batch_verify_tickets(keys: Uint8Array, tickets_data: Uint8Array, vrf_input_data_len: number): Uint8Array;
4632
-
4633
- declare const bandersnatch_d_batch_verify_tickets: typeof batch_verify_tickets;
4634
- declare const bandersnatch_d_derive_public_key: typeof derive_public_key;
4635
- declare const bandersnatch_d_ring_commitment: typeof ring_commitment;
4636
- declare const bandersnatch_d_verify_seal: typeof verify_seal;
4637
- declare namespace bandersnatch_d {
4638
- export {
4639
- bandersnatch_d_batch_verify_tickets as batch_verify_tickets,
4640
- bandersnatch_d_derive_public_key as derive_public_key,
4641
- bandersnatch_d_ring_commitment as ring_commitment,
4642
- bandersnatch_d_verify_seal as verify_seal,
4643
- };
4644
- }
4645
-
4646
4675
  /** Bandersnatch public key size. */
4647
4676
  declare const BANDERSNATCH_KEY_BYTES = 32;
4648
4677
  type BANDERSNATCH_KEY_BYTES = typeof BANDERSNATCH_KEY_BYTES;
@@ -4700,7 +4729,7 @@ type BlsKey = Opaque<Bytes<BLS_KEY_BYTES>, "BlsKey">;
4700
4729
 
4701
4730
  /** Derive a Bandersnatch public key from a seed. */
4702
4731
  declare function publicKey(seed: Uint8Array): BandersnatchKey {
4703
- const key = derive_public_key(seed);
4732
+ const key = bandersnatch.derive_public_key(seed);
4704
4733
 
4705
4734
  check(key[0] === 0, "Invalid Bandersnatch public key derived from seed");
4706
4735
 
@@ -4826,7 +4855,7 @@ declare const index$l_bandersnatch: typeof bandersnatch;
4826
4855
  declare const index$l_ed25519: typeof ed25519;
4827
4856
  declare const index$l_keyDerivation: typeof keyDerivation;
4828
4857
  declare namespace index$l {
4829
- export { index$l_Ed25519Pair as Ed25519Pair, index$l_bandersnatch as bandersnatch, bandersnatch_d as bandersnatchWasm, index$l_ed25519 as ed25519, index$l_keyDerivation as keyDerivation };
4858
+ export { index$l_Ed25519Pair as Ed25519Pair, index$l_bandersnatch as bandersnatch, bandersnatch_d_exports as bandersnatchWasm, index$l_ed25519 as ed25519, initAll as initWasm, index$l_keyDerivation as keyDerivation };
4830
4859
  export type { index$l_BANDERSNATCH_KEY_BYTES as BANDERSNATCH_KEY_BYTES, index$l_BANDERSNATCH_PROOF_BYTES as BANDERSNATCH_PROOF_BYTES, index$l_BANDERSNATCH_RING_ROOT_BYTES as BANDERSNATCH_RING_ROOT_BYTES, index$l_BANDERSNATCH_VRF_SIGNATURE_BYTES as BANDERSNATCH_VRF_SIGNATURE_BYTES, index$l_BLS_KEY_BYTES as BLS_KEY_BYTES, index$l_BandersnatchKey as BandersnatchKey, index$l_BandersnatchProof as BandersnatchProof, index$l_BandersnatchRingRoot as BandersnatchRingRoot, index$l_BandersnatchSecretSeed as BandersnatchSecretSeed, index$l_BandersnatchVrfSignature as BandersnatchVrfSignature, index$l_BlsKey as BlsKey, index$l_ED25519_KEY_BYTES as ED25519_KEY_BYTES, index$l_ED25519_PRIV_KEY_BYTES as ED25519_PRIV_KEY_BYTES, index$l_ED25519_SIGNATURE_BYTES as ED25519_SIGNATURE_BYTES, index$l_Ed25519Key as Ed25519Key, index$l_Ed25519SecretSeed as Ed25519SecretSeed, index$l_Ed25519Signature as Ed25519Signature, KeySeed as PublicKeySeed, index$l_SEED_SIZE as SEED_SIZE };
4831
4860
  }
4832
4861
 
@@ -7820,7 +7849,7 @@ declare const DEV_CONFIG = "dev";
7820
7849
  declare const DEFAULT_CONFIG = "default";
7821
7850
 
7822
7851
  declare const NODE_DEFAULTS = {
7823
- name: os.hostname(),
7852
+ name: isBrowser() ? "browser" : os.hostname(),
7824
7853
  config: DEFAULT_CONFIG,
7825
7854
  };
7826
7855
 
@@ -7875,11 +7904,11 @@ declare class NodeConfiguration {
7875
7904
 
7876
7905
  declare function loadConfig(configPath: string): NodeConfiguration {
7877
7906
  if (configPath === DEFAULT_CONFIG) {
7878
- return parseFromJson(defaultConfigJson, NodeConfiguration.fromJson);
7907
+ return parseFromJson(configs.default, NodeConfiguration.fromJson);
7879
7908
  }
7880
7909
 
7881
7910
  if (configPath === DEV_CONFIG) {
7882
- return parseFromJson(devConfigJson, NodeConfiguration.fromJson);
7911
+ return parseFromJson(configs.dev, NodeConfiguration.fromJson);
7883
7912
  }
7884
7913
 
7885
7914
  try {
@@ -8743,31 +8772,18 @@ declare const ignoreValueWithDefault = <T>(defaultValue: T) =>
8743
8772
  * https://graypaper.fluffylabs.dev/#/7e6ff6a/108301108301?v=0.6.7
8744
8773
  */
8745
8774
  declare class ServiceAccountInfo extends WithDebug {
8746
- static Codec = Compatibility.isGreaterOrEqual(GpVersion.V0_6_7)
8747
- ? codec.Class(ServiceAccountInfo, {
8748
- codeHash: codec.bytes(HASH_SIZE).asOpaque<CodeHash>(),
8749
- balance: codec.u64,
8750
- accumulateMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8751
- onTransferMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8752
- storageUtilisationBytes: codec.u64,
8753
- gratisStorage: codec.u64,
8754
- storageUtilisationCount: codec.u32,
8755
- created: codec.u32.convert((x) => x, tryAsTimeSlot),
8756
- lastAccumulation: codec.u32.convert((x) => x, tryAsTimeSlot),
8757
- parentService: codec.u32.convert((x) => x, tryAsServiceId),
8758
- })
8759
- : codec.Class(ServiceAccountInfo, {
8760
- codeHash: codec.bytes(HASH_SIZE).asOpaque<CodeHash>(),
8761
- balance: codec.u64,
8762
- accumulateMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8763
- onTransferMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8764
- storageUtilisationBytes: codec.u64,
8765
- storageUtilisationCount: codec.u32,
8766
- gratisStorage: ignoreValueWithDefault(tryAsU64(0)),
8767
- created: ignoreValueWithDefault(tryAsTimeSlot(0)),
8768
- lastAccumulation: ignoreValueWithDefault(tryAsTimeSlot(0)),
8769
- parentService: ignoreValueWithDefault(tryAsServiceId(0)),
8770
- });
8775
+ static Codec = codec.Class(ServiceAccountInfo, {
8776
+ codeHash: codec.bytes(HASH_SIZE).asOpaque<CodeHash>(),
8777
+ balance: codec.u64,
8778
+ accumulateMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8779
+ onTransferMinGas: codec.u64.convert((x) => x, tryAsServiceGas),
8780
+ storageUtilisationBytes: codec.u64,
8781
+ gratisStorage: codec.u64,
8782
+ storageUtilisationCount: codec.u32,
8783
+ created: codec.u32.convert((x) => x, tryAsTimeSlot),
8784
+ lastAccumulation: codec.u32.convert((x) => x, tryAsTimeSlot),
8785
+ parentService: codec.u32.convert((x) => x, tryAsServiceId),
8786
+ });
8771
8787
 
8772
8788
  static create(a: CodecRecord<ServiceAccountInfo>) {
8773
8789
  return new ServiceAccountInfo(
@@ -10361,7 +10377,7 @@ type StateCodec<T> = {
10361
10377
 
10362
10378
  /** Serialization for particular state entries. */
10363
10379
  declare namespace serialize {
10364
- /** C(1): https://graypaper.fluffylabs.dev/#/85129da/38a20138a201?v=0.6.3 */
10380
+ /** C(1): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b15013b1501?v=0.6.7 */
10365
10381
  export const authPools: StateCodec<State["authPools"]> = {
10366
10382
  key: stateKeys.index(StateKeyIdx.Alpha),
10367
10383
  Codec: codecPerCore(
@@ -10374,7 +10390,7 @@ declare namespace serialize {
10374
10390
  extract: (s) => s.authPools,
10375
10391
  };
10376
10392
 
10377
- /** C(2): https://graypaper.fluffylabs.dev/#/85129da/38be0138be01?v=0.6.3 */
10393
+ /** C(2): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b31013b3101?v=0.6.7 */
10378
10394
  export const authQueues: StateCodec<State["authQueues"]> = {
10379
10395
  key: stateKeys.index(StateKeyIdx.Phi),
10380
10396
  Codec: codecPerCore(
@@ -10385,7 +10401,6 @@ declare namespace serialize {
10385
10401
 
10386
10402
  /**
10387
10403
  * C(3): Recent blocks with compatibility
10388
- * https://graypaper.fluffylabs.dev/#/85129da/38cb0138cb01?v=0.6.3
10389
10404
  * https://graypaper.fluffylabs.dev/#/7e6ff6a/3b3e013b3e01?v=0.6.7
10390
10405
  */
10391
10406
  export const recentBlocks: StateCodec<State["recentBlocks"]> = {
@@ -10394,7 +10409,7 @@ declare namespace serialize {
10394
10409
  extract: (s) => s.recentBlocks,
10395
10410
  };
10396
10411
 
10397
- /** C(4): https://graypaper.fluffylabs.dev/#/85129da/38e60138e601?v=0.6.3 */
10412
+ /** C(4): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b63013b6301?v=0.6.7 */
10398
10413
  export const safrole: StateCodec<SafroleData> = {
10399
10414
  key: stateKeys.index(StateKeyIdx.Gamma),
10400
10415
  Codec: SafroleData.Codec,
@@ -10407,63 +10422,63 @@ declare namespace serialize {
10407
10422
  }),
10408
10423
  };
10409
10424
 
10410
- /** C(5): https://graypaper.fluffylabs.dev/#/85129da/383d02383d02?v=0.6.3 */
10425
+ /** C(5): https://graypaper.fluffylabs.dev/#/7e6ff6a/3bba013bba01?v=0.6.7 */
10411
10426
  export const disputesRecords: StateCodec<State["disputesRecords"]> = {
10412
10427
  key: stateKeys.index(StateKeyIdx.Psi),
10413
10428
  Codec: DisputesRecords.Codec,
10414
10429
  extract: (s) => s.disputesRecords,
10415
10430
  };
10416
10431
 
10417
- /** C(6): https://graypaper.fluffylabs.dev/#/85129da/387602387602?v=0.6.3 */
10432
+ /** C(6): https://graypaper.fluffylabs.dev/#/7e6ff6a/3bf3013bf301?v=0.6.7 */
10418
10433
  export const entropy: StateCodec<State["entropy"]> = {
10419
10434
  key: stateKeys.index(StateKeyIdx.Eta),
10420
10435
  Codec: codecFixedSizeArray(codec.bytes(HASH_SIZE).asOpaque<EntropyHash>(), ENTROPY_ENTRIES),
10421
10436
  extract: (s) => s.entropy,
10422
10437
  };
10423
10438
 
10424
- /** C(7): https://graypaper.fluffylabs.dev/#/85129da/388302388302?v=0.6.3 */
10439
+ /** C(7): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b00023b0002?v=0.6.7 */
10425
10440
  export const designatedValidators: StateCodec<State["designatedValidatorData"]> = {
10426
10441
  key: stateKeys.index(StateKeyIdx.Iota),
10427
10442
  Codec: codecPerValidator(ValidatorData.Codec),
10428
10443
  extract: (s) => s.designatedValidatorData,
10429
10444
  };
10430
10445
 
10431
- /** C(8): https://graypaper.fluffylabs.dev/#/85129da/389002389002?v=0.6.3 */
10446
+ /** C(8): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b0d023b0d02?v=0.6.7 */
10432
10447
  export const currentValidators: StateCodec<State["currentValidatorData"]> = {
10433
10448
  key: stateKeys.index(StateKeyIdx.Kappa),
10434
10449
  Codec: codecPerValidator(ValidatorData.Codec),
10435
10450
  extract: (s) => s.currentValidatorData,
10436
10451
  };
10437
10452
 
10438
- /** C(9): https://graypaper.fluffylabs.dev/#/85129da/389d02389d02?v=0.6.3 */
10453
+ /** C(9): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b1a023b1a02?v=0.6.7 */
10439
10454
  export const previousValidators: StateCodec<State["previousValidatorData"]> = {
10440
10455
  key: stateKeys.index(StateKeyIdx.Lambda),
10441
10456
  Codec: codecPerValidator(ValidatorData.Codec),
10442
10457
  extract: (s) => s.previousValidatorData,
10443
10458
  };
10444
10459
 
10445
- /** C(10): https://graypaper.fluffylabs.dev/#/85129da/38aa0238aa02?v=0.6.3 */
10460
+ /** C(10): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b27023b2702?v=0.6.7 */
10446
10461
  export const availabilityAssignment: StateCodec<State["availabilityAssignment"]> = {
10447
10462
  key: stateKeys.index(StateKeyIdx.Rho),
10448
10463
  Codec: codecPerCore(codec.optional(AvailabilityAssignment.Codec)),
10449
10464
  extract: (s) => s.availabilityAssignment,
10450
10465
  };
10451
10466
 
10452
- /** C(11): https://graypaper.fluffylabs.dev/#/85129da/38c10238c102?v=0.6.3 */
10467
+ /** C(11): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b3e023b3e02?v=0.6.7 */
10453
10468
  export const timeslot: StateCodec<State["timeslot"]> = {
10454
10469
  key: stateKeys.index(StateKeyIdx.Tau),
10455
10470
  Codec: codec.u32.asOpaque<TimeSlot>(),
10456
10471
  extract: (s) => s.timeslot,
10457
10472
  };
10458
10473
 
10459
- /** C(12): https://graypaper.fluffylabs.dev/#/85129da/38cf0238cf02?v=0.6.3 */
10474
+ /** C(12): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b4c023b4c02?v=0.6.7 */
10460
10475
  export const privilegedServices: StateCodec<State["privilegedServices"]> = {
10461
10476
  key: stateKeys.index(StateKeyIdx.Chi),
10462
10477
  Codec: PrivilegedServices.Codec,
10463
10478
  extract: (s) => s.privilegedServices,
10464
10479
  };
10465
10480
 
10466
- /** C(13): https://graypaper.fluffylabs.dev/#/85129da/38e10238e102?v=0.6.3 */
10481
+ /** C(13): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b5e023b5e02?v=0.6.7 */
10467
10482
  export const statistics: StateCodec<State["statistics"]> = {
10468
10483
  key: stateKeys.index(StateKeyIdx.Pi),
10469
10484
  Codec: StatisticsData.Codec,
@@ -10477,7 +10492,7 @@ declare namespace serialize {
10477
10492
  extract: (s) => s.accumulationQueue,
10478
10493
  };
10479
10494
 
10480
- /** C(15): https://graypaper.fluffylabs.dev/#/85129da/381903381903?v=0.6.3 */
10495
+ /** C(15): https://graypaper.fluffylabs.dev/#/7e6ff6a/3b96023b9602?v=0.6.7 */
10481
10496
  export const recentlyAccumulated: StateCodec<State["recentlyAccumulated"]> = {
10482
10497
  key: stateKeys.index(StateKeyIdx.Xi),
10483
10498
  Codec: codecPerEpochBlock(
@@ -12245,8 +12260,8 @@ declare function encodePoints(input: Bytes<PIECE_SIZE>): FixedSizeArray<Bytes<PO
12245
12260
  }
12246
12261
 
12247
12262
  // encode and add redundancy shards
12248
- const points = new ShardsCollection(POINT_ALIGNMENT, data);
12249
- const encodedResult = encode(N_CHUNKS_REDUNDANCY, POINT_ALIGNMENT, points);
12263
+ const points = new reedSolomon.ShardsCollection(POINT_ALIGNMENT, data);
12264
+ const encodedResult = reedSolomon.encode(N_CHUNKS_REDUNDANCY, points);
12250
12265
  const encodedData = encodedResult.take_data();
12251
12266
 
12252
12267
  for (let i = 0; i < N_CHUNKS_REDUNDANCY; i++) {
@@ -12288,9 +12303,9 @@ declare function decodePiece(
12288
12303
  result.raw.set(points.raw, pointStartInResult);
12289
12304
  }
12290
12305
  }
12291
- const points = new ShardsCollection(POINT_ALIGNMENT, data, indices);
12306
+ const points = new reedSolomon.ShardsCollection(POINT_ALIGNMENT, data, indices);
12292
12307
 
12293
- const decodingResult = decode(N_CHUNKS_REQUIRED, N_CHUNKS_REDUNDANCY, POINT_ALIGNMENT, points);
12308
+ const decodingResult = reedSolomon.decode(N_CHUNKS_REQUIRED, N_CHUNKS_REDUNDANCY, points);
12294
12309
  const resultIndices = decodingResult.take_indices(); // it has to be called before take_data
12295
12310
  const resultData = decodingResult.take_data(); // it destroys the result object in rust
12296
12311
 
@@ -12527,6 +12542,10 @@ declare function chunksToShards(
12527
12542
  return tryAsPerValidator(result, spec);
12528
12543
  }
12529
12544
 
12545
+ declare const initEc = async () => {
12546
+ await init.reedSolomon();
12547
+ };
12548
+
12530
12549
  declare const index$a_HALF_POINT_SIZE: typeof HALF_POINT_SIZE;
12531
12550
  declare const index$a_N_CHUNKS_REDUNDANCY: typeof N_CHUNKS_REDUNDANCY;
12532
12551
  type index$a_N_CHUNKS_REQUIRED = N_CHUNKS_REQUIRED;
@@ -12540,6 +12559,7 @@ declare const index$a_decodeData: typeof decodeData;
12540
12559
  declare const index$a_decodeDataAndTrim: typeof decodeDataAndTrim;
12541
12560
  declare const index$a_decodePiece: typeof decodePiece;
12542
12561
  declare const index$a_encodePoints: typeof encodePoints;
12562
+ declare const index$a_initEc: typeof initEc;
12543
12563
  declare const index$a_join: typeof join;
12544
12564
  declare const index$a_lace: typeof lace;
12545
12565
  declare const index$a_padAndEncodeData: typeof padAndEncodeData;
@@ -12548,7 +12568,7 @@ declare const index$a_split: typeof split;
12548
12568
  declare const index$a_transpose: typeof transpose;
12549
12569
  declare const index$a_unzip: typeof unzip;
12550
12570
  declare namespace index$a {
12551
- export { index$a_HALF_POINT_SIZE as HALF_POINT_SIZE, index$a_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$a_POINT_ALIGNMENT as POINT_ALIGNMENT, index$a_chunkingFunction as chunkingFunction, index$a_chunksToShards as chunksToShards, index$a_decodeData as decodeData, index$a_decodeDataAndTrim as decodeDataAndTrim, index$a_decodePiece as decodePiece, index$a_encodePoints as encodePoints, index$a_join as join, index$a_lace as lace, index$a_padAndEncodeData as padAndEncodeData, index$a_shardsToChunks as shardsToChunks, index$a_split as split, index$a_transpose as transpose, index$a_unzip as unzip };
12571
+ export { index$a_HALF_POINT_SIZE as HALF_POINT_SIZE, index$a_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$a_POINT_ALIGNMENT as POINT_ALIGNMENT, index$a_chunkingFunction as chunkingFunction, index$a_chunksToShards as chunksToShards, index$a_decodeData as decodeData, index$a_decodeDataAndTrim as decodeDataAndTrim, index$a_decodePiece as decodePiece, index$a_encodePoints as encodePoints, index$a_initEc as initEc, index$a_join as join, index$a_lace as lace, index$a_padAndEncodeData as padAndEncodeData, index$a_shardsToChunks as shardsToChunks, index$a_split as split, index$a_transpose as transpose, index$a_unzip as unzip };
12552
12572
  export type { index$a_N_CHUNKS_REQUIRED as N_CHUNKS_REQUIRED, index$a_N_CHUNKS_TOTAL as N_CHUNKS_TOTAL, index$a_PIECE_SIZE as PIECE_SIZE, index$a_POINT_LENGTH as POINT_LENGTH };
12553
12573
  }
12554
12574
 
@@ -13839,13 +13859,14 @@ declare abstract class MemoryPage {
13839
13859
  * And then a new version of TypeScript is released.
13840
13860
  */
13841
13861
  declare global {
13842
- interface ArrayBufferConstructor {
13843
- new (length: number, options?: { maxByteLength: number }): ArrayBuffer;
13844
- }
13845
-
13846
- interface ArrayBuffer {
13847
- resize(length: number): void;
13848
- }
13862
+ interface ArrayBufferConstructor {
13863
+ new (length: number, options?: {
13864
+ maxByteLength: number;
13865
+ }): ArrayBuffer;
13866
+ }
13867
+ interface ArrayBuffer {
13868
+ resize(length: number): void;
13869
+ }
13849
13870
  }
13850
13871
 
13851
13872
  type InitialMemoryState = {
@@ -16690,8 +16711,18 @@ declare class HostCalls {
16690
16711
  return this.getReturnValue(status, pvmInstance);
16691
16712
  }
16692
16713
 
16693
- pvmInstance.runProgram();
16694
- status = pvmInstance.getStatus();
16714
+ if (result === PvmExecution.Panic) {
16715
+ status = Status.PANIC;
16716
+ return this.getReturnValue(status, pvmInstance);
16717
+ }
16718
+
16719
+ if (result === undefined) {
16720
+ pvmInstance.runProgram();
16721
+ status = pvmInstance.getStatus();
16722
+ continue;
16723
+ }
16724
+
16725
+ assertNever(result);
16695
16726
  }
16696
16727
  }
16697
16728
 
@@ -18030,6 +18061,7 @@ declare const index$3_getServiceId: typeof getServiceId;
18030
18061
  declare const index$3_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
18031
18062
  declare const index$3_inspect: typeof inspect;
18032
18063
  declare const index$3_instructionArgumentTypeMap: typeof instructionArgumentTypeMap;
18064
+ declare const index$3_isBrowser: typeof isBrowser;
18033
18065
  declare const index$3_isTaggedError: typeof isTaggedError;
18034
18066
  declare const index$3_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
18035
18067
  declare const index$3_measure: typeof measure;
@@ -18042,7 +18074,7 @@ declare const index$3_tryAsMachineId: typeof tryAsMachineId;
18042
18074
  declare const index$3_tryAsProgramCounter: typeof tryAsProgramCounter;
18043
18075
  declare const index$3_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
18044
18076
  declare namespace index$3 {
18045
- export { index$3_AccumulationStateUpdate as AccumulationStateUpdate, index$3_ArgsDecoder as ArgsDecoder, index$3_ArgumentType as ArgumentType, index$3_BasicBlocks as BasicBlocks, index$3_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$3_EjectError as EjectError, index$3_ExtendedWitdthImmediateDecoder as ExtendedWitdthImmediateDecoder, index$3_ForgetPreimageError as ForgetPreimageError, index$3_HostCallMemory as HostCallMemory, index$3_HostCallRegisters as HostCallRegisters, index$3_HostCallResult as HostCallResult, index$3_ImmediateDecoder as ImmediateDecoder, index$3_MAX_U32 as MAX_U32, index$3_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$3_MachineInstance as MachineInstance, index$3_Mask as Mask, index$3_MemoryOperation as MemoryOperation, index$3_MemorySegment as MemorySegment, NO_OF_REGISTERS$1 as NO_OF_REGISTERS, index$3_NewServiceError as NewServiceError, index$3_NibblesDecoder as NibblesDecoder, index$3_PagesError as PagesError, index$3_PartiallyUpdatedState as PartiallyUpdatedState, index$3_PeekPokeError as PeekPokeError, index$3_PendingTransfer as PendingTransfer, index$3_PreimageStatusKind as PreimageStatusKind, index$3_Program as Program, index$3_ProgramDecoder as ProgramDecoder, index$3_ProvidePreimageError as ProvidePreimageError, DebuggerAdapter as Pvm, index$3_Registers as Registers, index$3_RequestPreimageError as RequestPreimageError, Result$2 as Result, index$3_RichTaggedError as RichTaggedError, index$3_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$3_SpiMemory as SpiMemory, index$3_SpiProgram as SpiProgram, index$3_TransferError as TransferError, index$3_UpdatePrivilegesError as UpdatePrivilegesError, index$3_WithDebug as WithDebug, index$3_ZeroVoidError as ZeroVoidError, index$3___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$3_asOpaqueType as asOpaqueType, index$3_assertEmpty as assertEmpty, index$3_assertNever as assertNever, index$j as block, index$q as bytes, index$3_cast as cast, index$3_check as check, index$3_clampU64ToU32 as clampU64ToU32, index$3_createResults as createResults, index$3_decodeStandardProgram as decodeStandardProgram, index$3_ensure as ensure, index$3_extractCodeAndMetadata as extractCodeAndMetadata, index$3_getServiceId as getServiceId, index$3_getServiceIdOrCurrent as getServiceIdOrCurrent, index$n as hash, index$3_inspect as inspect, index$3_instructionArgumentTypeMap as instructionArgumentTypeMap, index$8 as interpreter, index$3_isTaggedError as isTaggedError, index$3_maybeTaggedErrorToString as maybeTaggedErrorToString, index$3_measure as measure, index$p as numbers, index$3_preimageLenAsU32 as preimageLenAsU32, index$3_resultToString as resultToString, index$3_seeThrough as seeThrough, index$3_slotsToPreimageStatus as slotsToPreimageStatus, index$3_toMemoryOperation as toMemoryOperation, index$3_tryAsMachineId as tryAsMachineId, index$3_tryAsProgramCounter as tryAsProgramCounter, index$3_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
18077
+ export { index$3_AccumulationStateUpdate as AccumulationStateUpdate, index$3_ArgsDecoder as ArgsDecoder, index$3_ArgumentType as ArgumentType, index$3_BasicBlocks as BasicBlocks, index$3_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$3_EjectError as EjectError, index$3_ExtendedWitdthImmediateDecoder as ExtendedWitdthImmediateDecoder, index$3_ForgetPreimageError as ForgetPreimageError, index$3_HostCallMemory as HostCallMemory, index$3_HostCallRegisters as HostCallRegisters, index$3_HostCallResult as HostCallResult, index$3_ImmediateDecoder as ImmediateDecoder, index$3_MAX_U32 as MAX_U32, index$3_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$3_MachineInstance as MachineInstance, index$3_Mask as Mask, index$3_MemoryOperation as MemoryOperation, index$3_MemorySegment as MemorySegment, NO_OF_REGISTERS$1 as NO_OF_REGISTERS, index$3_NewServiceError as NewServiceError, index$3_NibblesDecoder as NibblesDecoder, index$3_PagesError as PagesError, index$3_PartiallyUpdatedState as PartiallyUpdatedState, index$3_PeekPokeError as PeekPokeError, index$3_PendingTransfer as PendingTransfer, index$3_PreimageStatusKind as PreimageStatusKind, index$3_Program as Program, index$3_ProgramDecoder as ProgramDecoder, index$3_ProvidePreimageError as ProvidePreimageError, DebuggerAdapter as Pvm, index$3_Registers as Registers, index$3_RequestPreimageError as RequestPreimageError, Result$2 as Result, index$3_RichTaggedError as RichTaggedError, index$3_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$3_SpiMemory as SpiMemory, index$3_SpiProgram as SpiProgram, index$3_TransferError as TransferError, index$3_UpdatePrivilegesError as UpdatePrivilegesError, index$3_WithDebug as WithDebug, index$3_ZeroVoidError as ZeroVoidError, index$3___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$3_asOpaqueType as asOpaqueType, index$3_assertEmpty as assertEmpty, index$3_assertNever as assertNever, index$j as block, index$q as bytes, index$3_cast as cast, index$3_check as check, index$3_clampU64ToU32 as clampU64ToU32, index$3_createResults as createResults, index$3_decodeStandardProgram as decodeStandardProgram, index$3_ensure as ensure, index$3_extractCodeAndMetadata as extractCodeAndMetadata, index$3_getServiceId as getServiceId, index$3_getServiceIdOrCurrent as getServiceIdOrCurrent, index$n as hash, index$3_inspect as inspect, index$3_instructionArgumentTypeMap as instructionArgumentTypeMap, index$8 as interpreter, index$3_isBrowser as isBrowser, index$3_isTaggedError as isTaggedError, index$3_maybeTaggedErrorToString as maybeTaggedErrorToString, index$3_measure as measure, index$p as numbers, index$3_preimageLenAsU32 as preimageLenAsU32, index$3_resultToString as resultToString, index$3_seeThrough as seeThrough, index$3_slotsToPreimageStatus as slotsToPreimageStatus, index$3_toMemoryOperation as toMemoryOperation, index$3_tryAsMachineId as tryAsMachineId, index$3_tryAsProgramCounter as tryAsProgramCounter, index$3_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
18046
18078
  export type { index$3_Args as Args, index$3_EnumMapping as EnumMapping, index$3_ErrorResult as ErrorResult, index$3_IHostCallMemory as IHostCallMemory, index$3_IHostCallRegisters as IHostCallRegisters, index$3_InsufficientFundsError as InsufficientFundsError, index$3_MachineId as MachineId, index$3_MachineResult as MachineResult, index$3_MachineStatus as MachineStatus, index$3_NoMachineError as NoMachineError, index$3_OK as OK, index$3_OkResult as OkResult, index$3_Opaque as Opaque, index$3_PartialState as PartialState, index$3_PreimageStatus as PreimageStatus, index$3_ProgramCounter as ProgramCounter, index$3_RefineExternalities as RefineExternalities, index$3_SegmentExportError as SegmentExportError, index$3_ServiceStateUpdate as ServiceStateUpdate, index$3_StateSlice as StateSlice, index$3_StringLiteral as StringLiteral, index$3_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$3_TaggedError as TaggedError, index$3_TokenOf as TokenOf, index$3_Uninstantiable as Uninstantiable, index$3_UnprivilegedError as UnprivilegedError, index$3_WithOpaque as WithOpaque };
18047
18079
  }
18048
18080