@blocklet/meta 1.16.6-beta-56be9f01 → 1.16.6-beta-e2082fec
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/index.d.ts +1 -0
- package/lib/info.d.ts +1 -0
- package/lib/info.js +5 -1
- package/lib/schema.js +2 -1
- package/lib/types/schema.d.ts +1 -0
- package/package.json +14 -14
package/lib/index.d.ts
CHANGED
package/lib/info.d.ts
CHANGED
package/lib/info.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
const get_1 = __importDefault(require("lodash/get"));
|
|
6
|
+
const mcrypto_1 = require("@ocap/mcrypto");
|
|
6
7
|
const wallet_1 = __importDefault(require("./wallet"));
|
|
7
8
|
const util_1 = require("./util");
|
|
8
9
|
const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
|
|
@@ -27,12 +28,13 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
|
|
|
27
28
|
description,
|
|
28
29
|
passportColor,
|
|
29
30
|
appUrl,
|
|
31
|
+
secret: '',
|
|
30
32
|
wallet: null,
|
|
31
33
|
permanentWallet: null,
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
const customSk = envs.find((x) => x.key === 'BLOCKLET_APP_SK');
|
|
35
|
-
const customType = envs.find((x) => x.key === 'BLOCKLET_APP_CHAIN_TYPE');
|
|
37
|
+
const customType = envs.find((x) => x.key === 'BLOCKLET_APP_CHAIN_TYPE') || envs.find((x) => x.key === 'BLOCKLET_WALLET_TYPE');
|
|
36
38
|
const permanentSk = envs.find((x) => x.key === 'BLOCKLET_APP_PSK');
|
|
37
39
|
let type;
|
|
38
40
|
if (customType && (customType.value === 'ethereum' || customType.value === 'eth')) {
|
|
@@ -57,6 +59,7 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
|
|
|
57
59
|
wallet = (0, wallet_1.default)(state.meta.did, nodeSk);
|
|
58
60
|
}
|
|
59
61
|
}
|
|
62
|
+
const secret = mcrypto_1.Hasher.SHA3.hash256(Buffer.concat([wallet.secretKey, wallet.address].map(Buffer.from)));
|
|
60
63
|
return {
|
|
61
64
|
did,
|
|
62
65
|
version,
|
|
@@ -64,6 +67,7 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
|
|
|
64
67
|
description,
|
|
65
68
|
passportColor,
|
|
66
69
|
appUrl,
|
|
70
|
+
secret,
|
|
67
71
|
wallet,
|
|
68
72
|
permanentWallet: permanentWallet || wallet,
|
|
69
73
|
};
|
package/lib/schema.js
CHANGED
|
@@ -632,7 +632,8 @@ const blockletMetaProps = {
|
|
|
632
632
|
didSpace: Joi.string()
|
|
633
633
|
.valid(...Object.values(BLOCKLET_APP_SPACE_ENDPOINTS))
|
|
634
634
|
.optional(),
|
|
635
|
-
navigation: Joi.boolean().default(true),
|
|
635
|
+
navigation: Joi.boolean().default(true),
|
|
636
|
+
serverless: Joi.boolean().default(true), // Can the blocklet be installed on serverless
|
|
636
637
|
}).default({
|
|
637
638
|
clusterMode: false,
|
|
638
639
|
component: true,
|
package/lib/types/schema.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.6-beta-
|
|
6
|
+
"version": "1.16.6-beta-e2082fec",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@abtnode/constant": "1.16.6-beta-
|
|
28
|
-
"@abtnode/util": "1.16.6-beta-
|
|
29
|
-
"@arcblock/did": "1.18.
|
|
30
|
-
"@arcblock/did-ext": "1.18.
|
|
31
|
-
"@arcblock/did-util": "1.18.
|
|
32
|
-
"@arcblock/jwt": "1.18.
|
|
33
|
-
"@blocklet/constant": "1.16.6-beta-
|
|
34
|
-
"@ocap/asset": "1.18.
|
|
35
|
-
"@ocap/mcrypto": "1.18.
|
|
36
|
-
"@ocap/types": "1.18.
|
|
37
|
-
"@ocap/util": "1.18.
|
|
38
|
-
"@ocap/wallet": "1.18.
|
|
27
|
+
"@abtnode/constant": "1.16.6-beta-e2082fec",
|
|
28
|
+
"@abtnode/util": "1.16.6-beta-e2082fec",
|
|
29
|
+
"@arcblock/did": "1.18.77",
|
|
30
|
+
"@arcblock/did-ext": "1.18.77",
|
|
31
|
+
"@arcblock/did-util": "1.18.77",
|
|
32
|
+
"@arcblock/jwt": "1.18.77",
|
|
33
|
+
"@blocklet/constant": "1.16.6-beta-e2082fec",
|
|
34
|
+
"@ocap/asset": "1.18.77",
|
|
35
|
+
"@ocap/mcrypto": "1.18.77",
|
|
36
|
+
"@ocap/types": "1.18.77",
|
|
37
|
+
"@ocap/util": "1.18.77",
|
|
38
|
+
"@ocap/wallet": "1.18.77",
|
|
39
39
|
"ajv": "^8.11.0",
|
|
40
40
|
"axios": "^0.27.2",
|
|
41
41
|
"cjk-length": "^1.0.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^4.8.4"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "851e0ab17f1c6e160aedc47fcdbf7dd54dfa7237"
|
|
83
83
|
}
|