@arcblock/did 1.13.44 → 1.13.48

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 CHANGED
@@ -74,7 +74,7 @@ declare namespace _Lib {
74
74
  toTypeInfo: (did: string, returnString?: boolean) => any;
75
75
  fromTypeInfo: (type: any) => string;
76
76
  DidType: typeof DidType;
77
- DID_TYPE_FORGE: _Lib.T101;
77
+ DID_TYPE_ARCBLOCK: _Lib.T101;
78
78
  DID_TYPE_ETHEREUM: _Lib.T101;
79
79
  }
80
80
  }
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ const {
14
14
  fromTypeInfo,
15
15
  isEthereumType,
16
16
  isEthereumDid,
17
- DID_TYPE_FORGE,
17
+ DID_TYPE_ARCBLOCK,
18
18
  DID_TYPE_ETHEREUM,
19
19
  toChecksumAddress,
20
20
  } = require('./type');
@@ -179,6 +179,6 @@ module.exports = {
179
179
  toTypeInfo,
180
180
  fromTypeInfo,
181
181
  DidType,
182
- DID_TYPE_FORGE,
182
+ DID_TYPE_ARCBLOCK,
183
183
  DID_TYPE_ETHEREUM,
184
184
  };
package/lib/type.js CHANGED
@@ -14,7 +14,7 @@ const mapping = {
14
14
  address: 'encoding',
15
15
  };
16
16
 
17
- const DID_TYPE_FORGE = {
17
+ const DID_TYPE_ARCBLOCK = {
18
18
  role: types.RoleType.ROLE_ACCOUNT,
19
19
  pk: types.KeyType.ED25519,
20
20
  hash: types.HashType.SHA3,
@@ -146,11 +146,11 @@ const toChecksumAddress = (address) => {
146
146
  function DidType(type = 'default') {
147
147
  let input = null;
148
148
  if (type === 'default' || type === 'forge') {
149
- input = DID_TYPE_FORGE;
149
+ input = DID_TYPE_ARCBLOCK;
150
150
  } else if (type === 'eth') {
151
151
  input = DID_TYPE_ETHEREUM;
152
152
  } else {
153
- input = { ...DID_TYPE_FORGE, ...type };
153
+ input = { ...DID_TYPE_ARCBLOCK, ...type };
154
154
  }
155
155
 
156
156
  const { role, pk, hash, address } = input;
@@ -269,7 +269,7 @@ const toTypeInfo = (did, returnString = false) => {
269
269
  };
270
270
 
271
271
  module.exports = {
272
- DID_TYPE_FORGE,
272
+ DID_TYPE_ARCBLOCK,
273
273
  DID_TYPE_ETHEREUM,
274
274
  fromTypeInfo,
275
275
  toTypeInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/did",
3
- "version": "1.13.44",
3
+ "version": "1.13.48",
4
4
  "description": "Javascript lib to work with ArcBlock DID",
5
5
  "keywords": [
6
6
  "forge",
@@ -45,11 +45,11 @@
45
45
  "url": "https://github.com/ArcBlock/asset-chain/issues"
46
46
  },
47
47
  "dependencies": {
48
- "@ocap/mcrypto": "1.13.44",
49
- "@ocap/util": "1.13.44",
48
+ "@ocap/mcrypto": "1.13.48",
49
+ "@ocap/util": "1.13.48",
50
50
  "bn.js": "^5.2.0",
51
51
  "debug": "^4.3.2",
52
52
  "lodash": "^4.17.21"
53
53
  },
54
- "gitHead": "72116480f29ddbf98543ffee58205aef29943366"
54
+ "gitHead": "08167e9f2d7223fac315e45b871a81bfbdf42de7"
55
55
  }