{"id":14956109,"url":"https://github.com/ipfs/js-ipns","last_synced_at":"2026-04-10T19:03:12.878Z","repository":{"id":32646122,"uuid":"138147427","full_name":"ipfs/js-ipns","owner":"ipfs","description":"Utilities for creating, parsing, and validating IPNS records","archived":false,"fork":false,"pushed_at":"2025-10-14T10:05:29.000Z","size":2035,"stargazers_count":89,"open_issues_count":2,"forks_count":27,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-11-23T16:24:53.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipfs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-21T09:12:41.000Z","updated_at":"2025-10-14T10:05:14.000Z","dependencies_parsed_at":"2024-01-03T11:48:51.923Z","dependency_job_id":"39ff420e-56e9-4beb-bada-e7d5b47eb58c","html_url":"https://github.com/ipfs/js-ipns","commit_stats":{"total_commits":228,"total_committers":22,"mean_commits":"10.363636363636363","dds":0.6447368421052632,"last_synced_commit":"675aa64258154513bc014afb3f99bdfd13d5f167"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/ipfs/js-ipns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fjs-ipns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fjs-ipns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fjs-ipns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fjs-ipns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipfs","download_url":"https://codeload.github.com/ipfs/js-ipns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fjs-ipns/sbom","scorecard":{"id":493831,"data":{"date":"2025-08-11","repo":{"name":"github.com/ipfs/js-ipns","commit":"2fd019acaa2122dc64c1a0a20e9eda3e6ebe8223"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/generated-pr.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ipfs/js-ipns/generated-pr.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/js-test-and-release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ipfs/js-ipns/js-test-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/semantic-pull-request.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ipfs/js-ipns/semantic-pull-request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/stale.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ipfs/js-ipns/stale.yml/main?enable=pin","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'packages' permission set to 'write': .github/workflows/js-test-and-release.yml:13","Warn: topLevel 'contents' permission set to 'write': .github/workflows/js-test-and-release.yml:11","Warn: no topLevel permission defined: .github/workflows/semantic-pull-request.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T19:55:42.568Z","repository_id":32646122,"created_at":"2025-08-19T19:55:42.568Z","updated_at":"2025-08-19T19:55:42.568Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285987607,"owners_count":27266216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:12:19.670Z","updated_at":"2026-04-10T19:03:12.871Z","avatar_url":"https://github.com/ipfs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipns\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipns.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipns)\n[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-ipns/js-test-and-release.yml?branch=main\\\u0026style=flat-square)](https://github.com/ipfs/js-ipns/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n\u003e IPNS record definitions\n\n# About\n\n\u003c!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n--\u003e\n\nImplements parsing and serialization of [IPNS Records](https://specs.ipfs.tech/ipns/ipns-record/).\n\n## Example - Create record\n\n```TypeScript\nimport { createIPNSRecord } from 'ipns'\nimport { generateKeyPair } from '@libp2p/crypto/keys'\n\nconst privateKey = await generateKeyPair('Ed25519')\nconst value = 'hello world'\nconst sequenceNumber = 0\nconst lifetime = 3_600_000 // ms, e.g. one hour\n\nconst ipnsRecord = await createIPNSRecord(privateKey, value, sequenceNumber, lifetime)\n```\n\n## Example - Validate record against public key\n\n```TypeScript\nimport { validate } from 'ipns/validator'\nimport { generateKeyPair } from '@libp2p/crypto/keys'\n\nconst privateKey = await generateKeyPair('Ed25519')\nconst publicKey = privateKey.publicKey\nconst marshalledRecord = Uint8Array.from([0, 1, 2, 3])\n\nawait validate(publicKey, marshalledRecord)\n// if no error thrown, the record is valid\n```\n\n## Example - Validate record against routing key\n\nThis 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).\n\n```TypeScript\nimport { ipnsValidator } from 'ipns/validator'\nimport { multihashToIPNSRoutingKey } from 'ipns'\nimport { generateKeyPair } from '@libp2p/crypto/keys'\n\nconst privateKey = await generateKeyPair('Ed25519')\nconst routingKey = multihashToIPNSRoutingKey(privateKey.publicKey.toMultihash())\nconst marshalledRecord = Uint8Array.from([0, 1, 2, 3])\n\nawait ipnsValidator(routingKey, marshalledRecord)\n```\n\n## Example - Extract public key from record\n\n```TypeScript\nimport { extractPublicKeyFromIPNSRecord, createIPNSRecord } from 'ipns'\nimport { generateKeyPair } from '@libp2p/crypto/keys'\n\nconst privateKey = await generateKeyPair('Ed25519')\nconst record = await createIPNSRecord(privateKey, 'hello world', 0, 3_600_000)\n\nconst publicKey = await extractPublicKeyFromIPNSRecord(record)\n```\n\n## Example - Marshal data with proto buffer\n\n```TypeScript\nimport { createIPNSRecord, marshalIPNSRecord } from 'ipns'\nimport { generateKeyPair } from '@libp2p/crypto/keys'\n\nconst privateKey = await generateKeyPair('Ed25519')\nconst record = await createIPNSRecord(privateKey, 'hello world', 0, 3_600_000)\n// ...\nconst marshalledData = marshalIPNSRecord(record)\n// ...\n```\n\nReturns the record data serialized.\n\n## Example - Unmarshal data from proto buffer\n\n```TypeScript\nimport { unmarshalIPNSRecord } from 'ipns'\n\nconst storedData = Uint8Array.from([0, 1, 2, 3, 4])\nconst ipnsRecord = unmarshalIPNSRecord(storedData)\n```\n\nReturns the `IPNSRecord` after being deserialized.\n\n# Install\n\n```console\n$ npm i ipns\n```\n\n## Browser `\u003cscript\u003e` tag\n\nLoading this module through a script tag will make its exports available as `Ipns` in the global namespace.\n\n```html\n\u003cscript src=\"https://unpkg.com/ipns/dist/index.min.js\"\u003e\u003c/script\u003e\n```\n\n# API Docs\n\n- \u003chttps://ipfs.github.io/js-ipns\u003e\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-ipns/LICENSE-APACHE) / \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT ([LICENSE-MIT](https://github.com/ipfs/js-ipns/LICENSE-MIT) / \u003chttp://opensource.org/licenses/MIT\u003e)\n\n# Contribute\n\nContributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipns/issues).\n\nAlso see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.\n\nPlease be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nUnless 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.\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs%2Fjs-ipns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipfs%2Fjs-ipns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs%2Fjs-ipns/lists"}