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

@sphereon/ssi-sdk-ext.key-utils

Package Overview
Dependencies
Maintainers
4
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sphereon/ssi-sdk-ext.key-utils - npm Package Compare versions

Comparing version 0.23.1-unstable.58 to 0.23.1-unstable.59

14

dist/functions.js

@@ -74,2 +74,3 @@ "use strict";

exports.generatePrivateKeyHex = generatePrivateKeyHex;
const algorithmsFromKeyType = (type) => [type]; // TODO BEFORE PR, is correct?
/**

@@ -103,6 +104,13 @@ * We optionally generate and then import our own keys.

}
if (!privateKeyHex) {
privateKeyHex = yield (0, exports.generatePrivateKeyHex)(type);
if (privateKeyHex) {
return context.agent.keyManagerImport(Object.assign(Object.assign({}, key), { kms: args.kms, type, privateKeyHex: privateKeyHex }));
}
return context.agent.keyManagerImport(Object.assign(Object.assign({}, key), { kms: args.kms, type, privateKeyHex: privateKeyHex }));
return context.agent.keyManagerCreate({
type,
kms: args.kms,
meta: {
algorithms: algorithmsFromKeyType(type),
keyAlias: args.alias,
},
});
});

@@ -109,0 +117,0 @@ }

@@ -71,2 +71,3 @@ import { MinimalImportableKey } from '@veramo/core';

kms?: string;
alias?: string;
options?: IKeyOpts;

@@ -73,0 +74,0 @@ }

{
"name": "@sphereon/ssi-sdk-ext.key-utils",
"description": "Sphereon SSI-SDK plugin for key creation.",
"version": "0.23.1-unstable.58+9828ed6",
"version": "0.23.1-unstable.59+6d69f8c",
"source": "src/index.ts",

@@ -49,3 +49,3 @@ "main": "dist/index.js",

],
"gitHead": "9828ed65b9e3afe947e29fcf16c4d566f6fd5383"
"gitHead": "6d69f8cdf4c91cf9b60d6d63683cd2729f5bd369"
}

@@ -40,2 +40,4 @@ import { randomBytes } from '@ethersproject/random'

const algorithmsFromKeyType = (type: string): string[] => [type] // TODO BEFORE PR, is correct?
/**

@@ -80,11 +82,18 @@ * We optionally generate and then import our own keys.

}
if (!privateKeyHex) {
privateKeyHex = await generatePrivateKeyHex(type)
if (privateKeyHex) {
return context.agent.keyManagerImport({
...key,
kms: args.kms,
type,
privateKeyHex: privateKeyHex!,
})
}
return context.agent.keyManagerImport({
...key,
return context.agent.keyManagerCreate({
type,
kms: args.kms,
type,
privateKeyHex: privateKeyHex!,
meta: {
algorithms: algorithmsFromKeyType(type),
keyAlias: args.alias,
},
})

@@ -91,0 +100,0 @@ }

@@ -82,2 +82,3 @@ import { MinimalImportableKey } from '@veramo/core'

kms?: string
alias?: string
options?: IKeyOpts

@@ -84,0 +85,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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