@abtnode/auth 1.16.8-beta-ca58a421 → 1.16.8-beta-81db8efa

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/auth.js CHANGED
@@ -342,7 +342,7 @@ const getApplicationInfo = async ({ node, nodeInfo = {}, teamDid }) => {
342
342
  dataDir = path.join(node.dataDirs.data, NODE_DATA_DIR_NAME);
343
343
  secret = Hasher.SHA3.hash256(Buffer.concat([_wallet.secretKey, _wallet.address].map(Buffer.from)));
344
344
  } else {
345
- const blocklet = await node.getBlocklet({ did: teamDid, attachRuntimeInfo: false });
345
+ const blocklet = await node.getBlocklet({ did: teamDid });
346
346
  const blockletInfo = getBlockletInfo(blocklet, nodeInfo.sk);
347
347
  name = blockletInfo.name;
348
348
  description = blockletInfo.description;
@@ -50,7 +50,7 @@ const getApplicationInfo = async ({ type, node, req }) => {
50
50
  dataDir = path.join(node.dataDirs.data, NODE_DATA_DIR_NAME);
51
51
  } else if (TEAM_TYPES.BLOCKLET) {
52
52
  teamDid = req.headers['x-blocklet-did'];
53
- const blocklet = await node.getBlocklet({ did: teamDid, attachRuntimeInfo: false });
53
+ const blocklet = await node.getBlocklet({ did: teamDid });
54
54
  const blockletInfo = getBlockletInfo(blocklet, info.sk);
55
55
  issuerDid = blockletInfo.wallet.address;
56
56
  issuerDidList = uniq([blockletInfo.wallet.address, ...getBlockletAppIdList(blocklet)]);
package/lib/server.js CHANGED
@@ -323,7 +323,7 @@ const getAuthPrincipalForMigrateAppToV2 = (node) => async (param) => {
323
323
  throw new Error('appDid is required in extraParams');
324
324
  }
325
325
 
326
- const blocklet = await node.getBlocklet({ did: appDid, attachRuntimeInfo: false });
326
+ const blocklet = await node.getBlocklet({ did: appDid });
327
327
  if (!blocklet) {
328
328
  throw new Error(messages.invalidBlocklet[locale]);
329
329
  }
@@ -370,7 +370,7 @@ const getKeyPairClaim =
370
370
 
371
371
  // We are rotating a key-pair for existing application
372
372
  if (appDid) {
373
- const blocklet = await node.getBlocklet({ did: appDid, attachRuntimeInfo: false });
373
+ const blocklet = await node.getBlocklet({ did: appDid });
374
374
  if (!blocklet) {
375
375
  throw new Error(messages.invalidBlocklet[locale]);
376
376
  }
@@ -426,7 +426,7 @@ const getRotateKeyPairClaims = (node) => {
426
426
  throw new Error(messages.missingBlockletDid[locale]);
427
427
  }
428
428
 
429
- const blocklet = await node.getBlocklet({ did: appDid, attachRuntimeInfo: false });
429
+ const blocklet = await node.getBlocklet({ did: appDid });
430
430
  if (!blocklet) {
431
431
  throw new Error(messages.invalidBlocklet[locale]);
432
432
  }
@@ -689,7 +689,7 @@ const createLaunchBlockletHandler =
689
689
 
690
690
  if (blocklet) {
691
691
  // 检查是否已安装,这里不做升级的处理
692
- const existedBlocklet = await node.getBlocklet({ did: appDid, attachRuntimeInfo: false });
692
+ const existedBlocklet = await node.getBlocklet({ did: appDid });
693
693
 
694
694
  // 如果是 serverless, 并且已经消费过了,但是没有安装,则抛出异常
695
695
  if (!existedBlocklet && role === SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER && isNFTConsumed(nft)) {
@@ -763,7 +763,7 @@ const createRotateKeyPairHandler =
763
763
  throw new Error(messages.missingBlockletDid[locale]);
764
764
  }
765
765
 
766
- const blocklet = await node.getBlocklet({ did: appDid, attachRuntimeInfo: false });
766
+ const blocklet = await node.getBlocklet({ did: appDid });
767
767
  if (!blocklet) {
768
768
  throw new Error(messages.invalidBlocklet[locale]);
769
769
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.8-beta-ca58a421",
6
+ "version": "1.16.8-beta-81db8efa",
7
7
  "description": "Simple lib to manage auth in ABT Node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -20,13 +20,13 @@
20
20
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@abtnode/constant": "1.16.8-beta-ca58a421",
24
- "@abtnode/logger": "1.16.8-beta-ca58a421",
25
- "@abtnode/util": "1.16.8-beta-ca58a421",
23
+ "@abtnode/constant": "1.16.8-beta-81db8efa",
24
+ "@abtnode/logger": "1.16.8-beta-81db8efa",
25
+ "@abtnode/util": "1.16.8-beta-81db8efa",
26
26
  "@arcblock/did": "1.18.78",
27
27
  "@arcblock/vc": "1.18.78",
28
- "@blocklet/constant": "1.16.8-beta-ca58a421",
29
- "@blocklet/meta": "1.16.8-beta-ca58a421",
28
+ "@blocklet/constant": "1.16.8-beta-81db8efa",
29
+ "@blocklet/meta": "1.16.8-beta-81db8efa",
30
30
  "@ocap/mcrypto": "1.18.78",
31
31
  "@ocap/util": "1.18.78",
32
32
  "@ocap/wallet": "1.18.78",
@@ -41,5 +41,5 @@
41
41
  "devDependencies": {
42
42
  "jest": "^27.5.1"
43
43
  },
44
- "gitHead": "d0f724c8082572a01b6e9287df6c3d0663ec9c57"
44
+ "gitHead": "8c4e3190de79a1fb2aaa14646255d938324cc5c2"
45
45
  }