@openwallet-foundation/askar-shared 0.3.1 → 0.3.2-alpha-20250205012009

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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Askar Shared
2
2
 
3
- This package does not contain any functionality, just the classes and types that wrap around the native NodeJS / React Native functionality
3
+ This package does not contain any functionality, just the classes and types that wrap around the native NodeJS / React Native functionality.
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
  ## Platform independent setup
6
8
 
@@ -10,35 +12,26 @@ Before calling any methods you then need to make sure you register the platform
10
12
 
11
13
  ```typescript
12
14
  // register.ts
13
- import '@openwallet-foundation/askar-nodejs'
15
+ import "@openwallet-foundation/askar-nodejs";
14
16
  ```
15
17
 
16
18
  ```typescript
17
19
  // register.native.ts
18
- import '@openwallet-foundation/askar-react-native'
20
+ import "@openwallet-foundation/askar-react-native";
19
21
  ```
20
22
 
21
23
  An alterative approach is to first try to require the Node.JS package, and otherwise require the React Native package:
22
24
 
23
25
  ```typescript
24
26
  try {
25
- require('@openwallet-foundation/askar-nodejs')
27
+ require("@openwallet-foundation/askar-nodejs");
26
28
  } catch (error) {
27
29
  try {
28
- require('@openwallet-foundation/askar-react-native')
30
+ require("@openwallet-foundation/askar-react-native");
29
31
  } catch (error) {
30
- throw new Error('Could not load Askar bindings')
32
+ throw new Error("Could not load Askar bindings");
31
33
  }
32
34
  }
33
35
  ```
34
36
 
35
37
  How you approach it is up to you, as long as the native binding are called before any actions are performed on the Askar library.
36
-
37
- ## Version Compatibility
38
-
39
- The JavaScript wrapper is versioned independently from the native bindings. The following table shows the compatibility between the different versions:
40
-
41
- | Askar | JavaScript Wrapper |
42
- | ----------- | ------------------ |
43
- | v0.2.9 | v0.1.0, v0.1.1 |
44
- | v0.3.1 | v0.2.0 |
@@ -210,7 +210,7 @@ export type ScanNextOptions = {
210
210
  };
211
211
  export type ScanStartOptions = {
212
212
  storeHandle: StoreHandle;
213
- category: string;
213
+ category?: string;
214
214
  profile?: string;
215
215
  tagFilter?: Record<string, unknown>;
216
216
  offset?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwallet-foundation/askar-shared",
3
- "version": "0.3.1",
3
+ "version": "0.3.2-alpha-20250205012009",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Shared library for using Askar with NodeJS and React Native",
6
6
  "main": "build/index",
@@ -17,20 +17,18 @@
17
17
  "access": "public"
18
18
  },
19
19
  "files": [
20
- "build",
21
- "../../LICENSE"
20
+ "build"
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
- },
29
22
  "dependencies": {
30
23
  "buffer": "^6.0.3"
31
24
  },
32
25
  "devDependencies": {
33
26
  "typescript": "~5.4.5"
34
27
  },
35
- "gitHead": "7e626433903c6e138ec6354e3e15447d7056a5f2"
36
- }
28
+ "scripts": {
29
+ "types:check": "pnpm compile --noEmit",
30
+ "build": "pnpm clean && pnpm compile",
31
+ "clean": "rimraf -rf ./build",
32
+ "compile": "tsc -p ./tsconfig.build.json"
33
+ }
34
+ }