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

@libp2p/peer-id-factory

Package Overview
Dependencies
Maintainers
4
Versions
448
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/peer-id-factory - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

14

dist/src/index.d.ts

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

import type { PublicKey, PrivateKey } from '@libp2p/interfaces/keys';
import type { RSAPeerId, Ed25519PeerId, Secp256k1PeerId } from '@libp2p/interfaces/peer-id';
import type { PublicKey, PrivateKey } from '@libp2p/interface-keys';
import type { RSAPeerId, Ed25519PeerId, Secp256k1PeerId } from '@libp2p/interface-peer-id';
export declare const createEd25519PeerId: () => Promise<Ed25519PeerId>;

@@ -7,7 +7,7 @@ export declare const createSecp256k1PeerId: () => Promise<Secp256k1PeerId>;

bits: number;
} | undefined) => Promise<RSAPeerId>;
export declare function createFromPubKey(publicKey: PublicKey): Promise<import("@libp2p/interfaces/peer-id").PeerId>;
export declare function createFromPrivKey(privateKey: PrivateKey): Promise<import("@libp2p/interfaces/peer-id").PeerId>;
}) => Promise<RSAPeerId>;
export declare function createFromPubKey(publicKey: PublicKey): Promise<import("@libp2p/interface-peer-id").PeerId>;
export declare function createFromPrivKey(privateKey: PrivateKey): Promise<import("@libp2p/interface-peer-id").PeerId>;
export declare function exportToProtobuf(peerId: RSAPeerId | Ed25519PeerId | Secp256k1PeerId, excludePrivateKey?: boolean): Uint8Array;
export declare function createFromProtobuf(buf: Uint8Array): Promise<import("@libp2p/interfaces/peer-id").PeerId>;
export declare function createFromProtobuf(buf: Uint8Array): Promise<import("@libp2p/interface-peer-id").PeerId>;
export declare function createFromJSON(obj: {

@@ -17,3 +17,3 @@ id: string;

pubKey?: string;
}): Promise<import("@libp2p/interfaces/peer-id").PeerId>;
}): Promise<import("@libp2p/interface-peer-id").PeerId>;
//# sourceMappingURL=index.d.ts.map
{
"name": "@libp2p/peer-id-factory",
"version": "1.0.11",
"description": "IPFS Peer Id implementation in Node.js",
"version": "1.0.12",
"description": "Create PeerId instances",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-peer-id-factory#readme",
"homepage": "https://github.com/libp2p/js-libp2p-peer-id/tree/master/packages/libp2p-peer-id-factory#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/libp2p/js-libp2p-interfaces.git"
"url": "git+https://github.com/libp2p/js-libp2p-peer-id.git"
},
"bugs": {
"url": "https://github.com/libp2p/js-libp2p-interfaces/issues"
"url": "https://github.com/libp2p/js-libp2p-peer-id/issues"
},

@@ -142,3 +142,4 @@ "keywords": [

"@libp2p/crypto": "^0.22.8",
"@libp2p/interfaces": "^2.0.0",
"@libp2p/interface-keys": "^0.0.1",
"@libp2p/interface-peer-id": "^0.0.1",
"@libp2p/peer-id": "^1.1.0",

@@ -145,0 +146,0 @@ "multiformats": "^9.6.3",

@@ -1,15 +0,23 @@

# libp2p-peer-id-factory <!-- omit in toc -->
# @libp2p/peer-id-factory <!-- omit in toc -->
> create peer-ids in JavaScript
[![test & maybe release](https://github.com/libp2p/js-libp2p-peer-id/actions/workflows/js-test-and-release.yml/badge.svg)](https://github.com/libp2p/js-libp2p-peer-id/actions/workflows/js-test-and-release.yml)
## Table of Contents <!-- omit in toc -->
> Create PeerId instances
## Table of contents <!-- omit in toc -->
- [Install](#install)
- [Description](#description)
- [Example](#example)
- [Installation](#installation)
- [License](#license)
- [Contribution](#contribution)
- [License](#license)
- [Contribution](#contribution)
# Description
## Install
```console
$ npm i @libp2p/peer-id-factory
```
## Description
Generate, import, and export PeerIDs, for use with [IPFS](https://github.com/ipfs/ipfs).

@@ -21,3 +29,3 @@

# Example
## Example

@@ -35,8 +43,2 @@ ```JavaScript

# Installation
```console
$ npm i libp2p-peer-id-factory
```
## License

@@ -46,4 +48,4 @@

* Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / http://www.apache.org/licenses/LICENSE-2.0)
* MIT ([LICENSE-MIT](LICENSE-MIT) / http://opensource.org/licenses/MIT)
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

@@ -50,0 +52,0 @@ ### Contribution

@@ -5,4 +5,4 @@ import { generateKeyPair, marshalPrivateKey, unmarshalPrivateKey, marshalPublicKey, unmarshalPublicKey } from '@libp2p/crypto/keys'

import { PeerIdProto } from './proto.js'
import type { PublicKey, PrivateKey } from '@libp2p/interfaces/keys'
import type { RSAPeerId, Ed25519PeerId, Secp256k1PeerId } from '@libp2p/interfaces/peer-id'
import type { PublicKey, PrivateKey } from '@libp2p/interface-keys'
import type { RSAPeerId, Ed25519PeerId, Secp256k1PeerId } from '@libp2p/interface-peer-id'

@@ -9,0 +9,0 @@ export const createEd25519PeerId = async (): Promise<Ed25519PeerId> => {

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