@typeberry/jam 0.0.5-f91bac5 → 0.1.0-08a9db1
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/block-generator/index.js +15 -8
- package/block-generator/index.js.map +1 -1
- package/importer/index.js +119 -481
- package/importer/index.js.map +1 -1
- package/index.js +7374 -648
- package/index.js.map +1 -1
- package/jam-network/index.js +12 -3
- package/jam-network/index.js.map +1 -1
- package/package.json +1 -1
- package/bandersnatch/6b655f8772c01b768329.js +0 -1
- package/bandersnatch/ccf8ada94096a8f232f5.js +0 -1
- package/bandersnatch/e2fdc1b646378dd96eda.js +0 -1
- package/bandersnatch/index.js +0 -3037
- package/bandersnatch/index.js.map +0 -1
- package/bandersnatch/package.json +0 -3
- package/bandersnatch/sourcemap-register.cjs +0 -1
- package/importer/bootstrap-bandersnatch.mjs.map +0 -1
package/jam-network/index.js
CHANGED
|
@@ -28311,10 +28311,17 @@ async function initAll() {
|
|
|
28311
28311
|
await init.ed25519();
|
|
28312
28312
|
await init.reedSolomon();
|
|
28313
28313
|
}
|
|
28314
|
+
function initOnce(doInit) {
|
|
28315
|
+
let ready = null;
|
|
28316
|
+
return async () => {
|
|
28317
|
+
if (ready === null) ready = doInit();
|
|
28318
|
+
return await ready;
|
|
28319
|
+
};
|
|
28320
|
+
}
|
|
28314
28321
|
const init = {
|
|
28315
|
-
bandersnatch: async () => await bandersnatch_default({ module_or_path: await bandersnatch_bg_default() }),
|
|
28316
|
-
ed25519: async () => await ed25519_wasm_default({ module_or_path: await ed25519_wasm_bg_default() }),
|
|
28317
|
-
reedSolomon: async () => await reed_solomon_wasm_default({ module_or_path: await reed_solomon_wasm_bg_default() })
|
|
28322
|
+
bandersnatch: initOnce(async () => await bandersnatch_default({ module_or_path: await bandersnatch_bg_default() })),
|
|
28323
|
+
ed25519: initOnce(async () => await ed25519_wasm_default({ module_or_path: await ed25519_wasm_bg_default() })),
|
|
28324
|
+
reedSolomon: initOnce(async () => await reed_solomon_wasm_default({ module_or_path: await reed_solomon_wasm_bg_default() }))
|
|
28318
28325
|
};
|
|
28319
28326
|
|
|
28320
28327
|
//#endregion
|
|
@@ -28853,6 +28860,7 @@ async function verifyBatch(input) {
|
|
|
28853
28860
|
|
|
28854
28861
|
;// CONCATENATED MODULE: ./packages/core/hash/hash.ts
|
|
28855
28862
|
|
|
28863
|
+
|
|
28856
28864
|
/**
|
|
28857
28865
|
* Size of the output of the hash functions.
|
|
28858
28866
|
*
|
|
@@ -28862,6 +28870,7 @@ async function verifyBatch(input) {
|
|
|
28862
28870
|
const hash_HASH_SIZE = 32;
|
|
28863
28871
|
/** A hash without last byte (useful for trie representation). */
|
|
28864
28872
|
const TRUNCATED_HASH_SIZE = 31;
|
|
28873
|
+
const ZERO_HASH = bytes_Bytes.zero(hash_HASH_SIZE);
|
|
28865
28874
|
/**
|
|
28866
28875
|
* Container for some object with a hash that is related to this object.
|
|
28867
28876
|
*
|