Comments (1)
I've re-identified this issue in Ipfs.Core where the peer id (libp2p-key
) for Ipns addresses don't work for Cidv1. This was added to libp2p in 2019 in (see RFC 0001), after Richard (the original developer) stepped away from the project, so it hasn't been added.
When we add support for the libp2p-key
MultiCodec (0x72), we'll be able to differentiate between these implicitly using Cidv1.
As a workaround, if you'd still like to store the IKey.Id
multihash representing an IPNS key as a normal Cid, you can inline it with:
var ipnsPeerCid = new Cid { Hash = key.Id };
When resolving, you'd need to use the .Hash
instead of the Cid itself:
var ipnsResResult = await client.Name.ResolveAsync($"/ipns/{ipnsPeerCid.Hash}", recursive: true, cancel: cancellationToken);
For now you'll need to manually differentiate between immutable Cids and mutable Ipns Cids, but generally it's future-safe to use Cid
to represent either one in your data models.
Additional information: https://discuss.ipfs.tech/t/solved-how-do-i-get-the-cidv1-peer-id-of-a-key-pair/11707/2
from net-ipfs-core.
Related Issues (19)
- Consolidating supported TargetFrameworks to netstandard2.0 HOT 1
- Migrate to modern CI
- Set up publishing of nuget packages HOT 1
- Move to Multiformats wherever possible HOT 1
- Publishing of nuget packages HOT 1
- Welcome to the Shipyard
- Set up .editorconfig and clean up code HOT 2
- Generate files CID without connecting to node HOT 5
- Add support for Kubo MFS HOT 1
- Mass-mark deprecated APIs with [Obsolete] HOT 1
- "The IPFS network protocol 'quic-v1' is unknown."
- Let's go for a multi-project layout rather than splitting code HOT 10
- Add strong name to Ipfs.Core
- Enable nullable globally, fix issues and set to error
- Use central package management to ensure package version consistency HOT 1
- API doesn't support working with Filestore
- `dag put` API doesn't serialize Cid properties into dag links
- Uses outdated crypto library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-ipfs-core.