@arcblock/abt-did
Advanced tools
Comparing version 0.13.0 to 0.13.2
{ | ||
"name": "@arcblock/abt-did", | ||
"version": "0.13.0", | ||
"version": "0.13.2", | ||
"description": "Javascript lib to work with ArcBlock DID", | ||
@@ -40,4 +40,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@arcblock/forge-util": "^0.13.0", | ||
"@arcblock/mcrypto": "^0.13.0", | ||
"@arcblock/forge-util": "^0.13.2", | ||
"@arcblock/mcrypto": "^0.13.2", | ||
"base64-url": "^2.2.0", | ||
@@ -50,3 +50,3 @@ "debug": "^4.1.1", | ||
}, | ||
"gitHead": "9990c02d2f3fabd7e3ab1a01a163da88d505a2eb" | ||
"gitHead": "0e6bf3aee160b0f3a28c0cacaca85c1be15c844d" | ||
} |
@@ -14,4 +14,5 @@ # `@arcblock/abt-did` | ||
const randomBytes = require('randombytes'); | ||
const { types, fromSecretKey, fromPublicKey, fromAppDID } = require('@arcblock/abt-did'); | ||
const { fromSecretKey, fromPublicKey, fromAppDID } = require('@arcblock/abt-did'); | ||
const { types } = Mcrypto; | ||
const keyPair = Mcrypto.Signer.Ed25519.genKeyPair(); | ||
@@ -21,5 +22,5 @@ | ||
const address = fromSecretKey(keyPir.secretKey, { | ||
role: enums.RoleType.ROLE_APPLICATION, | ||
pk: enums.KeyType.ED25519, | ||
hash: enums.HashType.SHA3, | ||
role: types.RoleType.ROLE_APPLICATION, | ||
pk: types.KeyType.ED25519, | ||
hash: types.HashType.SHA3, | ||
}); | ||
@@ -30,5 +31,5 @@ console.log(`abt:did:${address}`); | ||
const address = fromPublicKey(keyPir.publicKey, { | ||
role: enums.RoleType.ROLE_APPLICATION, | ||
pk: enums.KeyType.ED25519, | ||
hash: enums.HashType.SHA3, | ||
role: types.RoleType.ROLE_APPLICATION, | ||
pk: types.KeyType.ED25519, | ||
hash: types.HashType.SHA3, | ||
}); | ||
@@ -42,7 +43,7 @@ console.log(`abt:did:${address}`); | ||
const userDID = fromAppDID(appDID, keyPir.publicKey, { | ||
role: enums.RoleType.ROLE_APPLICATION, | ||
pk: enums.KeyType.ED25519, | ||
hash: enums.HashType.SHA3, | ||
role: types.RoleType.ROLE_APPLICATION, | ||
pk: types.KeyType.ED25519, | ||
hash: types.HashType.SHA3, | ||
}) | ||
console.log(`abt:did:${userDID}`); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13532
46
Updated@arcblock/forge-util@^0.13.2
Updated@arcblock/mcrypto@^0.13.2