Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 252c770

Browse files
committed
feat: support CIDs in /ipns/ content paths
This is WIP. While the change is minimal, the code does not work because we requires async refactor of libp2p to land first. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
1 parent b289a19 commit 252c770

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"p-iteration": "^1.1.8",
164164
"p-queue": "^6.1.0",
165165
"peer-book": "^0.9.1",
166-
"peer-id": "^0.12.2",
166+
"peer-id": "libp2p/js-peer-id#feat/cid-support",
167167
"peer-info": "~0.15.1",
168168
"progress": "^2.0.1",
169169
"promise-nodeify": "^3.0.1",

src/core/ipns/resolver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class IpnsResolver {
7474

7575
// resolve ipns entries from the provided routing
7676
async _resolveName (name) {
77-
const peerId = PeerId.createFromB58String(name)
77+
const peerId = PeerId.createFromCID(name)
7878
const { routingKey } = ipns.getIdKeys(peerId.toBytes())
7979
let record
8080

0 commit comments

Comments
 (0)