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

@libp2p/keychain

Package Overview
Dependencies
Maintainers
6
Versions
531
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/keychain - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0-58421e11

5

dist/src/index.d.ts

@@ -1,3 +0,4 @@

import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain';
import type { PeerId } from '@libp2p/interface-peer-id';
import type { KeyChain, KeyInfo } from '@libp2p/interface/keychain';
import type { KeyType } from '@libp2p/interface/keys';
import type { PeerId } from '@libp2p/interface/peer-id';
import type { Datastore } from 'interface-datastore';

@@ -4,0 +5,0 @@ export interface DEKConfig {

/* eslint max-nested-callbacks: ["error", 5] */
import { pbkdf2, randomBytes } from '@libp2p/crypto';
import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys';
import { CodeError } from '@libp2p/interfaces/errors';
import { CodeError } from '@libp2p/interface/errors';
import { logger } from '@libp2p/logger';

@@ -315,3 +315,4 @@ import { peerIdFromKeys } from '@libp2p/peer-id';

const privateKey = await importKey(pem, dek);
return await privateKey.export(password);
const keyString = await privateKey.export(password);
return keyString;
}

@@ -318,0 +319,0 @@ catch (err) {

123

package.json
{
"name": "@libp2p/keychain",
"version": "2.0.1",
"version": "3.0.0-58421e11",
"description": "Key management and cryptographically protected messages",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p-keychain#readme",
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/keychain#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/libp2p/js-libp2p-keychain.git"
"url": "git+https://github.com/libp2p/js-libp2p.git"
},
"bugs": {
"url": "https://github.com/libp2p/js-libp2p-keychain/issues"
"url": "https://github.com/libp2p/js-libp2p/issues"
},

@@ -22,6 +22,2 @@ "keywords": [

],
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",

@@ -47,87 +43,2 @@ "types": "./dist/src/index.d.ts",

},
"release": {
"branches": [
"master"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {

@@ -144,24 +55,20 @@ "clean": "aegir clean",

"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release",
"docs": "aegir docs"
"test:electron-main": "aegir test -t electron-main"
},
"dependencies": {
"@libp2p/crypto": "^1.0.11",
"@libp2p/interface-keychain": "^2.0.3",
"@libp2p/interface-peer-id": "^2.0.1",
"@libp2p/interfaces": "^3.3.1",
"@libp2p/logger": "^2.0.5",
"@libp2p/peer-id": "^2.0.1",
"interface-datastore": "^8.0.0",
"@libp2p/crypto": "2.0.0-58421e11",
"@libp2p/interface": "0.1.0-58421e11",
"@libp2p/logger": "3.0.0-58421e11",
"@libp2p/peer-id": "3.0.0-58421e11",
"interface-datastore": "^8.2.0",
"merge-options": "^3.0.4",
"sanitize-filename": "^1.6.3",
"uint8arrays": "^4.0.3"
"uint8arrays": "^4.0.4"
},
"devDependencies": {
"@libp2p/peer-id-factory": "^2.0.1",
"aegir": "^39.0.10",
"datastore-core": "^9.0.1",
"multiformats": "^11.0.1"
"@libp2p/peer-id-factory": "3.0.0-58421e11",
"aegir": "^40.0.1",
"datastore-core": "^9.1.1",
"multiformats": "^12.0.1"
}
}

@@ -5,4 +5,4 @@ # @libp2p/keychain <!-- omit in toc -->

[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-keychain.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-keychain)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-keychain/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-keychain/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)

@@ -86,3 +86,3 @@ > Key management and cryptographically protected messages

- <https://libp2p.github.io/js-libp2p-keychain>
- <https://libp2p.github.io/js-libp2p/modules/_libp2p_keychain.html>

@@ -89,0 +89,0 @@ ## License

@@ -1,2 +0,1 @@

export enum codes {

@@ -3,0 +2,0 @@ ERR_INVALID_PARAMETERS = 'ERR_INVALID_PARAMETERS',

@@ -5,3 +5,3 @@ /* eslint max-nested-callbacks: ["error", 5] */

import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { CodeError } from '@libp2p/interfaces/errors'
import { CodeError } from '@libp2p/interface/errors'
import { logger } from '@libp2p/logger'

@@ -15,4 +15,5 @@ import { peerIdFromKeys } from '@libp2p/peer-id'

import { codes } from './errors.js'
import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { KeyChain, KeyInfo } from '@libp2p/interface/keychain'
import type { KeyType } from '@libp2p/interface/keys'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { Datastore } from 'interface-datastore'

@@ -380,3 +381,5 @@

const privateKey = await importKey(pem, dek)
return await privateKey.export(password)
const keyString = await privateKey.export(password)
return keyString
} catch (err: any) {

@@ -383,0 +386,0 @@ await randomDelay()

Sorry, the diff of this file is too big to display

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