@ocap/asset 1.18.51 → 1.18.53

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/index.js +3 -3
  2. package/package.json +11 -11
package/lib/index.js CHANGED
@@ -178,7 +178,7 @@ const preMintFromFactory = ({ factory, inputs, owner, issuer, }) => {
178
178
  const extra = {};
179
179
  const issuerObject = { id: wallet.address, pk: (0, util_1.toBase58)(wallet.publicKey), name };
180
180
  const render = (templateObject) => JSON.parse(mustache_1.default.render(JSON.stringify(templateObject), {
181
- input: Object.assign(Object.assign({}, inputs), extra),
181
+ input: { ...inputs, ...extra },
182
182
  data: data.value || data,
183
183
  ctx: { factory: factoryAddress, id: numMinted + 1, owner, issuer: issuerObject },
184
184
  }));
@@ -198,7 +198,7 @@ const preMintFromFactory = ({ factory, inputs, owner, issuer, }) => {
198
198
  const vcRootPath = key.split('.').slice(0, -1).join('.');
199
199
  const vcIdPath = vcRootPath.split('.').concat(['id']).join('.');
200
200
  const typeInfo = (0, did_1.toTypeInfo)(issuerObject.id);
201
- const vcType = Object.assign(Object.assign({}, typeInfo), { role: mcrypto_1.types.RoleType.ROLE_VC });
201
+ const vcType = { ...typeInfo, role: mcrypto_1.types.RoleType.ROLE_VC };
202
202
  const vcId = (0, did_1.fromPublicKeyHash)(wallet.hash((0, vc_1.stableStringify)(subjectObject)), vcType);
203
203
  extra.id = vcId;
204
204
  extra.proofType = vc_1.proofTypes[typeInfo.pk];
@@ -241,7 +241,7 @@ const preMintFromFactory = ({ factory, inputs, owner, issuer, }) => {
241
241
  // calculate address
242
242
  const address = (0, did_util_1.toAssetAddress)(asset);
243
243
  // return extra inputs
244
- return { address, issuer: issuerObject, variables: Object.assign(Object.assign({}, inputs), extra), asset };
244
+ return { address, issuer: issuerObject, variables: { ...inputs, ...extra }, asset };
245
245
  };
246
246
  exports.preMintFromFactory = preMintFromFactory;
247
247
  const formatFactoryState = (state) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/asset",
3
3
  "description": "Utility to work with asset and factory on ArcBlock blockchain",
4
- "version": "1.18.51",
4
+ "version": "1.18.53",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -18,15 +18,15 @@
18
18
  "wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
19
19
  ],
20
20
  "dependencies": {
21
- "@arcblock/did": "1.18.51",
22
- "@arcblock/did-util": "1.18.51",
23
- "@arcblock/validator": "1.18.51",
24
- "@arcblock/vc": "1.18.51",
25
- "@ocap/contract": "1.18.51",
26
- "@ocap/mcrypto": "1.18.51",
27
- "@ocap/types": "1.18.51",
28
- "@ocap/util": "1.18.51",
29
- "@ocap/wallet": "1.18.51",
21
+ "@arcblock/did": "1.18.53",
22
+ "@arcblock/did-util": "1.18.53",
23
+ "@arcblock/validator": "1.18.53",
24
+ "@arcblock/vc": "1.18.53",
25
+ "@ocap/contract": "1.18.53",
26
+ "@ocap/mcrypto": "1.18.53",
27
+ "@ocap/types": "1.18.53",
28
+ "@ocap/util": "1.18.53",
29
+ "@ocap/wallet": "1.18.53",
30
30
  "debug": "^4.3.4",
31
31
  "flat": "^5.0.2",
32
32
  "is-absolute-url": "^3.0.3",
@@ -74,5 +74,5 @@
74
74
  "build": "tsc",
75
75
  "build:watch": "npm run build -- -w"
76
76
  },
77
- "gitHead": "cbe5db2a6951ade1e813990421ec4c1f757eeaf8"
77
+ "gitHead": "aca89e1a332437703b6019332d75aed4a0ea579f"
78
78
  }