Socket
Socket
Sign inDemoInstall

@arcblock/did

Package Overview
Dependencies
Maintainers
1
Versions
518
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/did - npm Package Compare versions

Comparing version 0.28.1 to 0.29.0

7

lib/index.d.ts

@@ -37,3 +37,8 @@ // Generate by [js2dts@0.3.3](https://github.com/whxaxes/js2dts#readme)

jwtSign: (did: string, sk: string, payload?: any) => string;
jwtVerify: (token: string, pk: string, tolerance?: number) => boolean;
jwtVerify: (
token: string,
pk: string,
tolerance?: number,
verifyTimestamp?: boolean
) => boolean;
jwtDecode: (token: string, payloadOnly?: boolean) => any;

@@ -40,0 +45,0 @@ }

2

lib/index.js

@@ -62,3 +62,3 @@ /**

const typeHex = fromTypeInfo(type);
const checksum = stripHexPrefix(hashFn(`0x${typeHex}${pkHash}`)).slice(0, 8); // 4 bytes
const checksum = stripHexPrefix(hashFn(`0x${typeHex}${pkHash}`, 1)).slice(0, 8); // 4 bytes
const didHash = `${typeHex}${pkHash}${checksum}`;

@@ -65,0 +65,0 @@ debug('fromPublicKeyHash', { pkHash, typeHex, checksum, didHash });

{
"name": "@arcblock/did",
"version": "0.28.1",
"version": "0.29.0",
"description": "Javascript lib to work with ArcBlock DID",

@@ -48,4 +48,4 @@ "keywords": [

"dependencies": {
"@arcblock/forge-util": "^0.28.0",
"@arcblock/mcrypto": "^0.28.0",
"@arcblock/forge-util": "^0.29.0",
"@arcblock/mcrypto": "^0.29.0",
"base64-url": "^2.2.0",

@@ -57,3 +57,3 @@ "debug": "^4.1.1",

},
"gitHead": "e860dd970e1e7ec1b231f30201e789acf0dd251f"
"gitHead": "6e922db0d834db071d8208d56cbf46175192e301"
}
# `@arcblock/did`
> Javascript library to manipulate ArcBlock DID: https://github.com/ArcBlock/abt-did-spec
> Javascript library to manipulate ArcBlock DID: <https://github.com/ArcBlock/abt-did-spec>
## Usage

@@ -46,4 +47,5 @@

## Documentation
For full documentation, checkout [README.md](./docs/README.md).
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