@arcblock/did-util
Advanced tools
Comparing version 0.19.1 to 0.19.2
@@ -0,1 +1,11 @@ | ||
/** | ||
* @fileOverview Utility functions to calculate various kinds of did, such as asset address | ||
* | ||
* @module @arcblock/did-util | ||
* @requires @arcblock/mcrypto | ||
* @requires @arcblock/abt-did | ||
* @requires @arcblock/forge-util | ||
* @requires @arcblock/forge-wallet | ||
* @requires @arcblock/forge-message | ||
*/ | ||
const { types, Hasher } = require('@arcblock/mcrypto'); | ||
@@ -7,2 +17,9 @@ const { WalletType } = require('@arcblock/forge-wallet'); | ||
/** | ||
* Create an asset address, eg: the did of an asset | ||
* | ||
* @param {object} itx - an object of `CreateAssetTx` | ||
* @param {string} sender - creator address, also the initial owner of the asset | ||
* @returns {string} asset address without `did:abt:` prefix | ||
*/ | ||
function toAssetAddress(itx, sender) { | ||
@@ -24,2 +41,9 @@ const walletType = toTypeInfo(sender); | ||
/** | ||
* Generate an stake address, eg: the did of the stake | ||
* | ||
* @param {string} sender - sender address | ||
* @param {string} receiver - receiver address | ||
* @returns {string} stake address without `did:abt:` prefix | ||
*/ | ||
function toStakeAddress(sender, receiver) { | ||
@@ -26,0 +50,0 @@ const senderBuffer = Buffer.from(sender); |
{ | ||
"name": "@arcblock/did-util", | ||
"description": "Helper function to calculate did", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"author": "wangshijun <shijun@arcblock.io> (https://ocap.arcblock.io)", | ||
@@ -20,3 +20,3 @@ "engines": { | ||
"dependencies": { | ||
"@arcblock/abt-did": "^0.19.0", | ||
"@arcblock/abt-did": "^0.19.2", | ||
"@arcblock/forge-message": "^0.20.1", | ||
@@ -68,3 +68,3 @@ "@arcblock/forge-util": "^0.20.0", | ||
}, | ||
"gitHead": "80165d5cf1362b7862e9239cc94157d3b03b9adc" | ||
"gitHead": "384c601aea7cdfb652f48818f75c0c16f4189c98" | ||
} |
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
6322
58
Updated@arcblock/abt-did@^0.19.2