New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@transmute/ed25519-key-pair

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transmute/ed25519-key-pair - npm Package Compare versions

Comparing version 0.7.0-unstable.3 to 0.7.0-unstable.4

8

package.json

@@ -5,3 +5,3 @@ {

"module": "dist/ed25519-key-pair.esm.js",
"version": "0.7.0-unstable.3",
"version": "0.7.0-unstable.4",
"license": "Apache-2.0",

@@ -62,6 +62,6 @@ "homepage": "https://github.com/transmute-industries/verifiable-data/tree/main/packages/ed25519-key-pair",

"@stablelib/ed25519": "^1.0.1",
"@transmute/ld-key-pair": "^0.7.0-unstable.3",
"@transmute/x25519-key-pair": "^0.7.0-unstable.3"
"@transmute/ld-key-pair": "^0.7.0-unstable.4",
"@transmute/x25519-key-pair": "^0.7.0-unstable.4"
},
"gitHead": "577fd3663858ac6ac3f4b4091e10246fead7a4bb"
"gitHead": "6c06b7e99e565fb46fe56321ed962e9baba6373a"
}

@@ -36,1 +36,33 @@ import { Ed25519KeyPair } from '../index';

});
it('sign / verify - larger example', async () => {
const signer = k.signer();
const verifier = k.verifier();
const credential: any = {
'@context': ['https://www.w3.org/2018/credentials/v1'],
id: 'http://example.edu/credentials/3732',
type: ['VerifiableCredential'],
issuer: 'https://example.edu/issuers/14',
issuanceDate: '2010-01-01T19:23:24Z',
credentialSubject: {
id: 'did:example:ebfeb1f712ebc6f1c276e12ec21',
},
};
const payload: any = {
iss:
typeof credential.issuer === 'string'
? credential.issuer
: credential.issuer.id,
sub:
typeof credential.credentialSubject === 'string'
? credential.credentialSubject
: credential.credentialSubject.id,
vc: credential,
jti: credential.id,
nbf: 1262373804,
};
const message = Buffer.from(JSON.stringify(payload));
const signature = await signer.sign({ data: message });
const verified = await verifier.verify({ data: message, signature });
expect(verified).toBe(true);
});
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