
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
IPNS record definitions
Implements parsing and serialization of IPNS Records.
import { createIPNSRecord } from 'ipns'
import { generateKeyPair } from '@libp2p/crypto/keys'
const privateKey = await generateKeyPair('Ed25519')
const value = 'hello world'
const sequenceNumber = 0
const lifetime = 3_600_000 // ms, e.g. one hour
const ipnsRecord = await createIPNSRecord(privateKey, value, sequenceNumber, lifetime)
import { validate } from 'ipns/validator'
import { generateKeyPair } from '@libp2p/crypto/keys'
const privateKey = await generateKeyPair('Ed25519')
const publicKey = privateKey.publicKey
const marshalledRecord = Uint8Array.from([0, 1, 2, 3])
await validate(publicKey, marshalledRecord)
// if no error thrown, the record is valid
This is useful when validating IPNS names that use RSA keys, whose public key is embedded in the record (rather than in the routing key as with Ed25519).
import { ipnsValidator } from 'ipns/validator'
import { multihashToIPNSRoutingKey } from 'ipns'
import { generateKeyPair } from '@libp2p/crypto/keys'
const privateKey = await generateKeyPair('Ed25519')
const routingKey = multihashToIPNSRoutingKey(privateKey.publicKey.toMultihash())
const marshalledRecord = Uint8Array.from([0, 1, 2, 3])
await ipnsValidator(routingKey, marshalledRecord)
import { extractPublicKeyFromIPNSRecord, createIPNSRecord } from 'ipns'
import { generateKeyPair } from '@libp2p/crypto/keys'
const privateKey = await generateKeyPair('Ed25519')
const record = await createIPNSRecord(privateKey, 'hello world', 0, 3_600_000)
const publicKey = await extractPublicKeyFromIPNSRecord(record)
import { createIPNSRecord, marshalIPNSRecord } from 'ipns'
import { generateKeyPair } from '@libp2p/crypto/keys'
const privateKey = await generateKeyPair('Ed25519')
const record = await createIPNSRecord(privateKey, 'hello world', 0, 3_600_000)
// ...
const marshalledData = marshalIPNSRecord(record)
// ...
Returns the record data serialized.
import { unmarshalIPNSRecord } from 'ipns'
const storedData = Uint8Array.from([0, 1, 2, 3, 4])
const ipnsRecord = unmarshalIPNSRecord(storedData)
Returns the IPNSRecord after being deserialized.
$ npm i ipns
<script> tagLoading this module through a script tag will make its exports available as Ipns in the global namespace.
<script src="https://unpkg.com/ipns/dist/index.min.js"></script>
Licensed under either of
Contributions welcome! Please check out the issues.
Also see our contributing document for more information on how we work, and about contributing in general.
Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.
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
IPNS record definitions
The npm package ipns receives a total of 21,969 weekly downloads. As such, ipns popularity was classified as popular.
We found that ipns demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.