@typeberry/native 0.2.0-bd1a174 → 0.2.0-e2a2c06

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.
@@ -1,8 +1,7 @@
1
- import { createRequire } from "module";
2
-
3
1
  //#region bandersnatch/src/native.ts
4
- const require = createRequire(import.meta.url);
5
- function loadNativeBinding() {
2
+ async function loadNativeBinding() {
3
+ const { createRequire } = await import("module");
4
+ const require = createRequire(import.meta.url);
6
5
  const platform = process?.platform;
7
6
  const arch = process?.arch;
8
7
  let nativeBinding = null;
@@ -20,15 +19,6 @@ function loadNativeBinding() {
20
19
  if (!nativeBinding) throw loadError || /* @__PURE__ */ new Error("Failed to load native binding");
21
20
  return nativeBinding;
22
21
  }
23
- const binding = loadNativeBinding();
24
- const ringCommitment = binding.ringCommitment;
25
- const derivePublicKey = binding.derivePublicKey;
26
- const verifyHeaderSeals = binding.verifyHeaderSeals;
27
- const verifySeal = binding.verifySeal;
28
- const generateSeal = binding.generateSeal;
29
- const vrfOutputHash = binding.vrfOutputHash;
30
- const batchVerifyTickets = binding.batchVerifyTickets;
31
- var native_default = binding;
32
22
 
33
23
  //#endregion
34
- export { batchVerifyTickets, native_default as default, derivePublicKey, generateSeal, ringCommitment, verifyHeaderSeals, verifySeal, vrfOutputHash };
24
+ export { loadNativeBinding };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeberry/native",
3
- "version": "0.2.0-bd1a174",
3
+ "version": "0.2.0-e2a2c06",
4
4
  "description": "Native libraries for typeberry - bundles bandersnatch, ed25519 and reed-solomon with WASM and optional native bindings",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "node": ">=18"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@typeberry/bandersnatch-native-darwin-arm64": "0.2.0-bd1a174",
27
- "@typeberry/bandersnatch-native-linux-x64-gnu": "0.2.0-bd1a174"
26
+ "@typeberry/bandersnatch-native-darwin-arm64": "0.2.0-e2a2c06",
27
+ "@typeberry/bandersnatch-native-linux-x64-gnu": "0.2.0-e2a2c06"
28
28
  },
29
29
  "scripts": {
30
30
  "lint": "true",