@openwallet-foundation/askar-nodejs 0.3.1 → 0.3.2-alpha-20250210081959

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 (2) hide show
  1. package/README.md +7 -15
  2. package/package.json +12 -14
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # Askar NodeJS
2
2
 
3
- Wrapper for Nodejs around Askar
3
+ Wrapper for Node.Js around Askar
4
+
5
+ See the [project README](https://github.com/openwallet-foundation/askar-wrapper-javascript) for version compatability between Askar and this JavaScript Wrapper.
4
6
 
5
7
  ## Requirements
6
8
 
7
- This library requires (and has been tested extensively with) Node.js version `18.x`. Newer versions might also work, but they have not been tested.
9
+ This library requires and has been tested with Node.js version `18.x`, `20.x` and `22.x`. Newer versions might also work, but they have not been tested.
8
10
 
9
11
  ## Installation
10
12
 
@@ -17,20 +19,10 @@ yarn add @openwallet-foundation/askar-nodejs
17
19
  You can import all types and classes from the `@openwallet-foundation/askar-nodejs` library:
18
20
 
19
21
  ```typescript
20
- import { Key, KeyAlgs } from '@openwallet-foundation/askar-nodejs'
22
+ import { Key, KeyAlgs } from "@openwallet-foundation/askar-nodejs";
21
23
 
22
- const seed = Uint8Array.from(Buffer.from('testseed000000000000000000000001'))
23
- const key = Key.fromSeed({ algorithm: KeyAlgs.Bls12381G1, seed })
24
+ const seed = Uint8Array.from(Buffer.from("testseed000000000000000000000001"));
25
+ const key = Key.fromSeed({ algorithm: KeyAlgs.Bls12381G1, seed });
24
26
  ```
25
27
 
26
28
  > **Note**: If you want to use this library in a cross-platform environment you need to import methods from the `@openwallet-foundation/askar-shared` package instead. This is a platform independent package that allows to register the native bindings. The `@openwallet-foundation/askar-nodejs` package uses this package under the hood. See the [Askar Shared README](https://github.com/openwallet-foundation/askar-wrapper-javascript/tree/main/packages/askar-shared/README.md) for documentation on how to use this package.
27
-
28
- ## Version Compatibility
29
-
30
- The JavaScript wrapper is versioned independently from the native bindings. The following table shows the compatibility between the different versions:
31
-
32
- | Askar | JavaScript Wrapper |
33
- | ----------- | ------------------ |
34
- | v0.2.9 | v0.1.x |
35
- | v0.3.x | v0.2.x |
36
- | v0.4.1 | v0.3.x |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwallet-foundation/askar-nodejs",
3
- "version": "0.3.1",
3
+ "version": "0.3.2-alpha-20250210081959",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Nodejs wrapper for Askar",
6
6
  "main": "build/index",
@@ -17,23 +17,15 @@
17
17
  },
18
18
  "files": [
19
19
  "build",
20
- "scripts",
21
- "../../LICENSE"
20
+ "scripts"
22
21
  ],
23
- "scripts": {
24
- "types:check": "pnpm compile --noEmit",
25
- "build": "pnpm clean && pnpm compile",
26
- "clean": "rimraf -rf ./build",
27
- "compile": "tsc -p ./tsconfig.build.json",
28
- "install": "node scripts/install.js"
29
- },
30
22
  "dependencies": {
31
23
  "@2060.io/ffi-napi": "^4.0.9",
32
24
  "@2060.io/ref-napi": "^3.0.6",
33
25
  "@mapbox/node-pre-gyp": "^1.0.11",
34
- "@openwallet-foundation/askar-shared": "0.3.1",
35
26
  "ref-array-di": "^1.2.2",
36
- "ref-struct-di": "^1.1.1"
27
+ "ref-struct-di": "^1.1.1",
28
+ "@openwallet-foundation/askar-shared": "0.3.2-alpha-20250210081959"
37
29
  },
38
30
  "devDependencies": {
39
31
  "@types/node": "^20.12.11",
@@ -51,5 +43,11 @@
51
43
  "engines": {
52
44
  "node": ">= 18"
53
45
  },
54
- "gitHead": "7e626433903c6e138ec6354e3e15447d7056a5f2"
55
- }
46
+ "scripts": {
47
+ "types:check": "pnpm compile --noEmit",
48
+ "build": "pnpm clean && pnpm compile",
49
+ "clean": "rimraf -rf ./build",
50
+ "compile": "tsc -p ./tsconfig.build.json",
51
+ "install": "node scripts/install.js"
52
+ }
53
+ }