@hyperledger/anoncreds-nodejs 0.2.0-dev.1 → 0.2.0-dev.11
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 +1 -1
- package/build/NodeJSAnoncreds.d.ts +79 -2
- package/build/NodeJSAnoncreds.js +201 -93
- package/build/NodeJSAnoncreds.js.map +1 -1
- package/build/ffi/index.js +5 -1
- package/build/ffi/index.js.map +1 -1
- package/build/ffi/serialize.d.ts +4 -4
- package/build/ffi/serialize.js +2 -2
- package/build/ffi/serialize.js.map +1 -1
- package/build/ffi/structures.js +19 -17
- package/build/ffi/structures.js.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/library/NativeBindingInterface.d.ts +5 -7
- package/build/library/bindings.d.ts +77 -0
- package/build/library/bindings.js +78 -23
- package/build/library/bindings.js.map +1 -1
- package/build/library/index.js +5 -1
- package/build/library/index.js.map +1 -1
- package/build/library/register.d.ts +10 -0
- package/build/library/register.js +4 -4
- package/build/library/register.js.map +1 -1
- package/package.json +13 -13
- package/scripts/install.js +15 -0
- package/scripts/arch.js +0 -22
- package/scripts/platform.js +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperledger/anoncreds-nodejs",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Nodejs wrapper for Anoncreds",
|
|
6
6
|
"main": "build/index",
|
|
@@ -20,32 +20,32 @@
|
|
|
20
20
|
"scripts"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"
|
|
23
|
+
"check-types": "pnpm compile --noEmit",
|
|
24
|
+
"build": "pnpm clean && pnpm compile",
|
|
24
25
|
"clean": "rimraf -rf ./build",
|
|
25
|
-
"compile": "tsc -p tsconfig.build.json",
|
|
26
|
-
"install": "node
|
|
26
|
+
"compile": "tsc -p ./tsconfig.build.json",
|
|
27
|
+
"install": "node scripts/install.js"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@2060.io/ffi-napi": "4.0.8",
|
|
30
31
|
"@2060.io/ref-napi": "3.0.6",
|
|
31
|
-
"@hyperledger/anoncreds-shared": "0.2.0-dev.
|
|
32
|
-
"@mapbox/node-pre-gyp": "^1.0.
|
|
33
|
-
"node-cache": "5.1.2",
|
|
32
|
+
"@hyperledger/anoncreds-shared": "0.2.0-dev.11",
|
|
33
|
+
"@mapbox/node-pre-gyp": "^1.0.11",
|
|
34
34
|
"ref-array-di": "1.2.2",
|
|
35
35
|
"ref-struct-di": "1.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "
|
|
39
|
-
"@types/ref-array-di": "1.2.
|
|
40
|
-
"@types/ref-struct-di": "1.1.
|
|
41
|
-
"typescript": "
|
|
38
|
+
"@types/node": "^20.6.1",
|
|
39
|
+
"@types/ref-array-di": "^1.2.5",
|
|
40
|
+
"@types/ref-struct-di": "^1.1.9",
|
|
41
|
+
"typescript": "~5.2.2"
|
|
42
42
|
},
|
|
43
43
|
"binary": {
|
|
44
44
|
"module_name": "anoncreds",
|
|
45
45
|
"module_path": "native",
|
|
46
|
-
"remote_path": "v0.2.0-dev.
|
|
46
|
+
"remote_path": "v0.2.0-dev.11",
|
|
47
47
|
"host": "https://github.com/hyperledger/anoncreds-rs/releases/download/",
|
|
48
48
|
"package_name": "library-{platform}-{arch}.tar.gz"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "c12eb3cb793fe1f2b6c53488384b97a2f1b1bcc3"
|
|
51
51
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { execSync } = require('node:child_process')
|
|
2
|
+
const { arch, platform: osPlatform } = require('os')
|
|
3
|
+
|
|
4
|
+
const archTable = {
|
|
5
|
+
x64: 'x86_64',
|
|
6
|
+
arm64: 'aarch64'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const platform = osPlatform()
|
|
10
|
+
const targetPlatform = platform === 'win32' ? 'windows' : platform
|
|
11
|
+
const targetArchitecture = platform == 'darwin' ? 'universal' : archTable[arch]
|
|
12
|
+
|
|
13
|
+
const command = `node-pre-gyp install --target_arch=${targetArchitecture} --target_platform=${targetPlatform}`
|
|
14
|
+
|
|
15
|
+
execSync(command)
|
package/scripts/arch.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const os = require('os')
|
|
2
|
-
|
|
3
|
-
// Find appropriate target architecture for retrieving the anoncreds library
|
|
4
|
-
const arch = os.arch()
|
|
5
|
-
|
|
6
|
-
// Architecture mapping
|
|
7
|
-
// This is used because node-pre-gyp uses `os.arch()` for
|
|
8
|
-
// architecture detection, but our library uses a different
|
|
9
|
-
// naming convention
|
|
10
|
-
const archTable = {
|
|
11
|
-
x64: 'x86_64',
|
|
12
|
-
arm64: 'aarch64',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const targetArchitecture = archTable[arch]
|
|
16
|
-
|
|
17
|
-
if (targetArchitecture) {
|
|
18
|
-
// We console.log here because when we use the `yarn install` script
|
|
19
|
-
// er evaluate this script and use the output as an argument to
|
|
20
|
-
// node-pre-gyp as `--arch=$(node -e arch.js)`
|
|
21
|
-
console.log(targetArchitecture)
|
|
22
|
-
}
|
package/scripts/platform.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
|
-
/* eslint-disable no-undef */
|
|
5
|
-
const os = require('os')
|
|
6
|
-
|
|
7
|
-
// Find appropriate target architecture for retrieving the anoncreds library
|
|
8
|
-
const platform = os.platform()
|
|
9
|
-
|
|
10
|
-
// We swap win32 with windows as that is the key that we use
|
|
11
|
-
const targetPlatform = platform == 'win32' ? 'windows' : platform
|
|
12
|
-
|
|
13
|
-
console.log(targetPlatform)
|