@blocklet/sdk 1.16.0 → 1.16.1
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/lib/service/auth.js +4 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -7
package/lib/service/auth.js
CHANGED
|
@@ -12,6 +12,7 @@ const wallet_1 = require("@ocap/wallet");
|
|
|
12
12
|
const constant_1 = __importDefault(require("@abtnode/constant"));
|
|
13
13
|
const check_blocklet_env_1 = __importDefault(require("../util/check-blocklet-env"));
|
|
14
14
|
const version_1 = require("../version");
|
|
15
|
+
const wallet_2 = __importDefault(require("../wallet"));
|
|
15
16
|
const { NODE_SERVICES, WELLKNOWN_SERVICE_PATH_PREFIX, USER_AVATAR_URL_PREFIX, USER_AVATAR_PATH_PREFIX } = constant_1.default;
|
|
16
17
|
const VERSION = version_1.version; // version of notification sdk
|
|
17
18
|
const isNotNullOrUndefined = (x) => ![null, undefined].includes(x);
|
|
@@ -29,9 +30,10 @@ class AuthClient extends client_1.default {
|
|
|
29
30
|
constructor(httpEndpoint) {
|
|
30
31
|
(0, check_blocklet_env_1.default)();
|
|
31
32
|
super(httpEndpoint || `http://127.0.0.1:${process.env.ABT_NODE_PORT}/api/gql`.trim(), `BlockletSDK/${VERSION}`);
|
|
33
|
+
const wallet = (0, wallet_2.default)();
|
|
32
34
|
this.setAuthAccessKey({
|
|
33
|
-
accessKeyId:
|
|
34
|
-
accessKeySecret:
|
|
35
|
+
accessKeyId: wallet.address,
|
|
36
|
+
accessKeySecret: wallet.secretKey,
|
|
35
37
|
type,
|
|
36
38
|
});
|
|
37
39
|
}
|
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.1",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"typings": "lib/index.d.ts",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/client": "1.16.
|
|
30
|
-
"@abtnode/constant": "1.16.
|
|
29
|
+
"@abtnode/client": "1.16.1",
|
|
30
|
+
"@abtnode/constant": "1.16.1",
|
|
31
31
|
"@arcblock/did": "1.18.65",
|
|
32
32
|
"@arcblock/did-auth": "1.18.65",
|
|
33
33
|
"@arcblock/jwt": "1.18.65",
|
|
34
34
|
"@arcblock/ws": "1.18.65",
|
|
35
|
-
"@blocklet/constant": "1.16.
|
|
36
|
-
"@blocklet/env": "1.16.
|
|
37
|
-
"@blocklet/meta": "1.16.
|
|
35
|
+
"@blocklet/constant": "1.16.1",
|
|
36
|
+
"@blocklet/env": "1.16.1",
|
|
37
|
+
"@blocklet/meta": "1.16.1",
|
|
38
38
|
"@did-connect/authenticator": "^2.1.47",
|
|
39
39
|
"@did-connect/handler": "^2.1.47",
|
|
40
40
|
"@nedb/core": "^2.1.5",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"ts-node": "^10.9.1",
|
|
73
73
|
"typescript": "^4.8.4"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "5912cfbd3b7573850727b05a808b1f798686267f"
|
|
76
76
|
}
|