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

@arcblock/vc

Package Overview
Dependencies
Maintainers
4
Versions
489
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/vc - npm Package Compare versions

Comparing version 1.8.25 to 1.8.26

29

lib/index.js

@@ -220,11 +220,11 @@ /**

function createStatusList({ statusList, issuer, issuanceDate }) {
if (!statusList || !Array.isArray(statusList) || !statusList.length) {
throw new Error('Can not create with empty status list');
function createCredentialList({ claims, issuer, issuanceDate }) {
if (!claims || !Array.isArray(claims) || !claims.length) {
throw new Error('Can not create credential list with empty claim list');
}
if (!issuer || !issuer.wallet || !issuer.name) {
throw new Error('Can not create with empty issuer name or wallet');
throw new Error('Can not create credential list with empty issuer name or wallet');
}
if (typeof issuer.wallet.sign !== 'function') {
throw new Error('Can not create with invalid issuer wallet');
throw new Error('Can not create credential list with invalid issuer wallet');
}

@@ -239,3 +239,3 @@

return statusList.map((x) => {
return claims.map((x) => {
const vc = { claim: x };

@@ -263,8 +263,8 @@

function verifyStatusList({ statusList, trustedIssuers }) {
if (!statusList || !Array.isArray(statusList) || !statusList.length) {
throw new Error('Can not verify with empty status list');
function verifyCredentialList({ credentials, trustedIssuers }) {
if (!credentials || !Array.isArray(credentials) || !credentials.length) {
throw new Error('Can not verify with empty credentials list');
}
return statusList.map((x) => {
return credentials.map((x) => {
// Verify issuer

@@ -274,6 +274,6 @@ const issuers = Array.isArray(trustedIssuers) ? trustedIssuers : [trustedIssuers];

if (!issuerDid) {
throw new Error('Status credential not issued by trusted issuers');
throw new Error('Credential not issued by trusted issuers');
}
if (!isFromPublicKey(issuerDid, x.issuer.pk)) {
throw new Error('Status credential not issuer pk not match with issuer did');
throw new Error('Credential not issuer pk not match with issuer did');
}

@@ -288,3 +288,2 @@

delete clone.proof;
delete clone.signature;

@@ -306,4 +305,4 @@ // Verify signature

proofTypes,
createStatusList,
verifyStatusList,
createCredentialList,
verifyCredentialList,
};
{
"name": "@arcblock/vc",
"version": "1.8.25",
"version": "1.8.26",
"description": "Javascript lib to work with ArcBlock Verifiable Credentials",

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

"dependencies": {
"@arcblock/did": "^1.8.25",
"@ocap/mcrypto": "^1.8.25",
"@ocap/util": "^1.8.25",
"@ocap/wallet": "^1.8.25",
"@arcblock/did": "^1.8.26",
"@ocap/mcrypto": "^1.8.26",
"@ocap/util": "^1.8.26",
"@ocap/wallet": "^1.8.26",
"debug": "^4.3.1",

@@ -57,3 +57,3 @@ "json-stable-stringify": "^1.0.1",

},
"gitHead": "c8142759941802cbefefec343b2a4835b75fe4f9"
"gitHead": "72840b219e0b8ac9c74744dd05cfc3bc87038245"
}
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