@abtnode/auth 1.16.34 → 1.16.35

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/lib/auth.js +2 -2
  2. package/package.json +8 -8
package/lib/auth.js CHANGED
@@ -12,7 +12,7 @@ const { getChainClient } = require('@abtnode/util/lib/get-chain-client');
12
12
  const { fromPublicKey } = require('@ocap/wallet');
13
13
  const { fromBase58, toAddress } = require('@ocap/util');
14
14
  const { toTypeInfo, isFromPublicKey } = require('@arcblock/did');
15
- const { getRandomBytes, Hasher } = require('@ocap/mcrypto');
15
+ const { getRandomBytes } = require('@ocap/mcrypto');
16
16
  const getBlockletInfo = require('@blocklet/meta/lib/info');
17
17
  const {
18
18
  PASSPORT_STATUS,
@@ -248,7 +248,7 @@ const getApplicationInfo = async ({ node, nodeInfo = {}, teamDid, baseUrl = '' }
248
248
  passportColor = 'default';
249
249
  owner = nodeInfo.nodeOwner;
250
250
  dataDir = path.join(node.dataDirs.data, NODE_DATA_DIR_NAME);
251
- secret = Hasher.SHA3.hash256(Buffer.concat([_wallet.secretKey, _wallet.address].map((v) => Buffer.from(v))));
251
+ secret = await node.getSessionSecret();
252
252
  logo = getServerAvatarUrl(baseUrl, nodeInfo);
253
253
  } else {
254
254
  const blocklet = await node.getBlocklet({ did: teamDid });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.34",
6
+ "version": "1.16.35",
7
7
  "description": "Simple lib to manage auth in ABT Node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -20,17 +20,17 @@
20
20
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@abtnode/constant": "1.16.34",
24
- "@abtnode/logger": "1.16.34",
25
- "@abtnode/util": "1.16.34",
23
+ "@abtnode/constant": "1.16.35",
24
+ "@abtnode/logger": "1.16.35",
25
+ "@abtnode/util": "1.16.35",
26
26
  "@arcblock/did": "1.18.162",
27
27
  "@arcblock/jwt": "^1.18.162",
28
28
  "@arcblock/nft-display": "^2.11.1",
29
29
  "@arcblock/validator": "^1.18.162",
30
30
  "@arcblock/vc": "1.18.162",
31
- "@blocklet/constant": "1.16.34",
32
- "@blocklet/meta": "1.16.34",
33
- "@blocklet/sdk": "1.16.34",
31
+ "@blocklet/constant": "1.16.35",
32
+ "@blocklet/meta": "1.16.35",
33
+ "@blocklet/sdk": "1.16.35",
34
34
  "@ocap/client": "^1.18.162",
35
35
  "@ocap/mcrypto": "1.18.162",
36
36
  "@ocap/util": "1.18.162",
@@ -50,5 +50,5 @@
50
50
  "devDependencies": {
51
51
  "jest": "^29.7.0"
52
52
  },
53
- "gitHead": "843b12c2cbf9c11497dea690783735f0a83551c9"
53
+ "gitHead": "a1888a5814c97a1cf6adfcee4e4d0721eabba7c3"
54
54
  }