@arcblock/did 1.13.45 → 1.13.49
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 -1
- package/lib/index.js +2 -2
- package/lib/type.js +4 -4
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
fromTypeInfo,
|
|
15
15
|
isEthereumType,
|
|
16
16
|
isEthereumDid,
|
|
17
|
-
|
|
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
|
-
|
|
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
|
|
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 =
|
|
149
|
+
input = DID_TYPE_ARCBLOCK;
|
|
150
150
|
} else if (type === 'eth') {
|
|
151
151
|
input = DID_TYPE_ETHEREUM;
|
|
152
152
|
} else {
|
|
153
|
-
input = { ...
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.13.49",
|
|
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.
|
|
49
|
-
"@ocap/util": "1.13.
|
|
48
|
+
"@ocap/mcrypto": "1.13.49",
|
|
49
|
+
"@ocap/util": "1.13.49",
|
|
50
50
|
"bn.js": "^5.2.0",
|
|
51
51
|
"debug": "^4.3.2",
|
|
52
52
|
"lodash": "^4.17.21"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c0af0d1ba7ead95f2224ff29aaebb635f6969a94"
|
|
55
55
|
}
|