Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@libp2p/config
Advanced tools
Helper functions to make dealing with libp2p config easier
Helper functions to make dealing with libp2p config easier
Most nodes will want to persist the same private key between restarts so this function helps you extract one from a datastore if it exists, otherwise it will create a new one and save it in the keystore.
The options you pass to this function should be the same as those passed to
the @libp2p/keychain
service you configure your node with.
import { loadOrCreateSelfKey } from '@libp2p/config'
import { keychain } from '@libp2p/keychain'
import { LevelDatastore } from 'datastore-level'
import { createLibp2p } from 'libp2p'
const datastore = new LevelDatastore('/path/to/db')
await datastore.open()
const keychainInit = {
pass: 'yes-yes-very-secure'
}
const privateKey = await loadOrCreateSelfKey(datastore, keychainInit)
const node = await createLibp2p({
privateKey,
services: {
datastore,
keychain: keychain(keychainInit)
}
})
$ npm i @libp2p/config
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
Helper functions to make dealing with libp2p config easier
The npm package @libp2p/config receives a total of 11 weekly downloads. As such, @libp2p/config popularity was classified as not popular.
We found that @libp2p/config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.