Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arcblock/did-util

Package Overview
Dependencies
Maintainers
1
Versions
580
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/did-util - npm Package Compare versions

Comparing version 0.19.1 to 0.19.2

24

lib/index.js

@@ -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);

6

package.json
{
"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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc