@blocklet/meta 1.6.12 → 1.6.16

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/constants.js CHANGED
@@ -149,6 +149,8 @@ module.exports = Object.freeze({
149
149
  BLOCKLET_APP_NAME: 'BLOCKLET_APP_NAME',
150
150
  BLOCKLET_APP_DESCRIPTION: 'BLOCKLET_APP_DESCRIPTION',
151
151
  BLOCKLET_APP_SK: 'BLOCKLET_APP_SK',
152
+ BLOCKLET_APP_URL: 'BLOCKLET_APP_URL',
153
+ BLOCKLET_PASSPORT_COLOR: 'BLOCKLET_PASSPORT_COLOR',
152
154
  BLOCKLET_WALLET_TYPE: 'BLOCKLET_WALLET_TYPE',
153
155
  BLOCKLET_DELETABLE: 'BLOCKLET_DELETABLE',
154
156
  },
package/lib/did.js CHANGED
@@ -1,9 +1,7 @@
1
- const Mcrypto = require('@ocap/mcrypto');
1
+ const { types } = require('@ocap/mcrypto');
2
2
  const { toHex } = require('@ocap/util');
3
3
  const { fromPublicKey } = require('@arcblock/did');
4
4
 
5
- const { types } = Mcrypto;
6
-
7
5
  const toBlockletDid = (name) => {
8
6
  const pk = toHex(name);
9
7
  return fromPublicKey(pk, { role: types.RoleType.ROLE_ANY });
package/lib/info.js CHANGED
@@ -11,10 +11,12 @@ module.exports = (state, nodeSk, { returnWallet = true } = {}) => {
11
11
 
12
12
  const customName = envs.find((x) => x.key === 'BLOCKLET_APP_NAME');
13
13
  const customDescription = envs.find((x) => x.key === 'BLOCKLET_APP_DESCRIPTION');
14
+ const customPassportColor = envs.find((x) => x.key === 'BLOCKLET_PASSPORT_COLOR');
14
15
 
15
16
  const { did } = state.meta;
16
17
  const name = get(customName, 'value', state.meta.title || state.meta.name);
17
18
  const description = get(customDescription, 'value', state.meta.description);
19
+ const passportColor = get(customPassportColor, 'value', 'auto');
18
20
 
19
21
  if (!returnWallet) {
20
22
  return {
@@ -51,6 +53,7 @@ module.exports = (state, nodeSk, { returnWallet = true } = {}) => {
51
53
  did,
52
54
  name,
53
55
  description,
56
+ passportColor,
54
57
  wallet,
55
58
  };
56
59
  };
package/lib/parse.js CHANGED
@@ -2,7 +2,7 @@ const fs = require('fs');
2
2
  const path = require('path');
3
3
  const yaml = require('js-yaml');
4
4
  const camelCase = require('lodash/camelCase');
5
- const debug = require('debug')('@blocklet/meta:fix');
5
+ const debug = require('debug')('@blocklet/meta:parse');
6
6
 
7
7
  const { BLOCKLET_META_FILE, BLOCKLET_META_FILE_ALT, BLOCKLET_META_FILE_OLD } = require('./constants');
8
8
 
package/lib/payment.js CHANGED
@@ -5,8 +5,6 @@ const { isValidFactory } = require('@ocap/asset');
5
5
  const { toFactoryAddress } = require('@arcblock/did-util');
6
6
  const { getBlockletPurchaseTemplate } = require('@arcblock/nft/lib/templates');
7
7
 
8
- const { isFreeBlocklet } = require('./util');
9
-
10
8
  const createShareContract = ({ tokens = [], shares = [] }) => {
11
9
  const zeroBN = new BN(0);
12
10
  const decimals = 1000000; // we only support 6 decimals on share ratio
@@ -81,7 +79,6 @@ const createNftFactoryItx = ({ meta, tokens, shares, issuers, serviceUrl }) => {
81
79
  };
82
80
 
83
81
  module.exports = {
84
- isFreeBlocklet,
85
82
  createShareContract,
86
83
  createNftFactoryItx,
87
84
  };
package/lib/wallet.js CHANGED
@@ -1,10 +1,8 @@
1
- const Mcrypto = require('@ocap/mcrypto');
1
+ const { types } = require('@ocap/mcrypto');
2
2
  const { fromSecretKey } = require('@ocap/wallet');
3
3
  const { isValid } = require('@arcblock/did');
4
4
  const { fromAppDid } = require('@arcblock/did-ext');
5
5
 
6
- const { types } = Mcrypto;
7
-
8
6
  /**
9
7
  * Gen DID from blocklet did and nodeSk
10
8
  *
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.12",
6
+ "version": "1.6.16",
7
7
  "description": "Library to parse/validate/fix blocklet meta",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,14 +18,14 @@
18
18
  "author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@arcblock/did": "^1.13.79",
22
- "@arcblock/did-ext": "^1.13.79",
23
- "@arcblock/did-util": "^1.13.79",
24
- "@arcblock/nft": "^1.13.79",
25
- "@ocap/asset": "^1.13.79",
26
- "@ocap/mcrypto": "^1.13.79",
27
- "@ocap/util": "^1.13.79",
28
- "@ocap/wallet": "^1.13.79",
21
+ "@arcblock/did": "^1.14.3",
22
+ "@arcblock/did-ext": "^1.14.3",
23
+ "@arcblock/did-util": "^1.14.3",
24
+ "@arcblock/nft": "^1.14.3",
25
+ "@ocap/asset": "^1.14.3",
26
+ "@ocap/mcrypto": "^1.14.3",
27
+ "@ocap/util": "^1.14.3",
28
+ "@ocap/wallet": "^1.14.3",
29
29
  "ajv": "^7.0.3",
30
30
  "debug": "^4.3.3",
31
31
  "fs-extra": "^10.0.0",
@@ -42,5 +42,5 @@
42
42
  "devDependencies": {
43
43
  "jest": "^27.4.5"
44
44
  },
45
- "gitHead": "dd79037978dc12f72330227a553a80a504f03fa7"
45
+ "gitHead": "69b08db16aeb75ce23b0e6bb5b9fa396adba2d4b"
46
46
  }