Progress Update #14
Replies: 6 comments
-
Progress update April 24, 2022I was finally able to dedicate some time to the project and implemented support for IPFS paths. In v0.0.6 we can currently validate CIDv0, CIDv1, URL with IPFS path, URL with an IPFS subdomain and IPFS path. Currently supported
Latest release at time of writing is available on: |
Beta Was this translation helpful? Give feedback.
-
Progress update May 9, 2022py-is_ipfs has now reached version number 0.1.0 and can be considered as entering the beta phase. py-is_ipfs can now validate both IPFS and IPNS for the most common use cases. see below As mentionned before, the docs are not always clear and concise, which resulted in me compiling a table of accepted encodings.
While py-is_ipfs can now correctly validate all IPFS/IPNS addressing, it should still be considered as a work in progress. The main logic ( Currently supported
Latest release at time of writing is available on: Footnotes |
Beta Was this translation helpful? Give feedback.
-
Progress update May 18, 2022I am currently working on implementing native URLs, as this is often used in the web3-space. Unfortunately I've been swamped with other work and haven't made much progress. Or at least, not enough to share here. If all goes well, a new update should be released soon ™️. |
Beta Was this translation helpful? Give feedback.
-
Progress update May 26, 2022I mentioned a new release in the previous progress update and actually pushed 2 new releases. Unfortunately the first release contained wrong validation logic for native URLs (ipfs:// and ipns://)... As noted before, the IPFS docs and specs are all over the place and there never seems to be one single source of truth that we can fully trust. I started by following the information from the IPFS docs in the section about "Native URLs". According to the specifications the native address format is the same as a subdomain gateway HTTP URL, but the protocol is replaced by ipfs or ipns and the gateway host + port are replaced with a CID (or a dnslink-name for IPNS). They even include a few clear examples. The information is largely the same as in the docs, but it goes a bit deeper on a technical level. Here I missed/misinterpreted the most crucial part where they briefly mention normalization of the cid:
I interpreted this as: use the same validation logic as for the subdomain gateways and just make sure the protocol is accounted for. CIDv0 can't be used because it has to be normalised. So I wrote some code and tests, everything looked correct (based on the documentation) and I pushed a new release. The next day I tried to validate NFT metadata URLs from OpenSea and noticed they were all formatted as TL;DRBasically a native IPFS/IPNS URL follows the same logic as the path gateway pattern (not subdomain as they mention in the docs). The subdomain pattern is recommended, but that does not invalidate the path gateway pattern. The latest release (0.3.0 at the time of writing) includes the correct validation logic and a few tweaks. It also includes a missing valid encoding for the IPFS subdomain gateway pattern. Currently supported
Latest release at time of writing is available on: |
Beta Was this translation helpful? Give feedback.
-
Progress update June 14, 2022As most features are already implemented, there is not much progress to report. I added a very basic CLI to the latest release. Although I suspect this library is more useful when integrated as part of a larger framework. The next step is writing documentation and adding a few examples. Currently supported
Latest release at time of writing is available on: |
Beta Was this translation helpful? Give feedback.
-
Progress update June 24, 2022py-is_ipfs is now fully supports typing. Until now it implicitly supported typing, but that is obviously not enough to explicitly support typing. Currently supported
Latest release at time of writing is available on: |
Beta Was this translation helpful? Give feedback.
-
Progress update April 16, 2022
A lot of time has been dedicated to research and writing tests for this project.
It didn't take long to realise that it would not be sufficient to write the implementation while following the IPFS documentation. The docs are interesting for endusers and developers that interact with the protocol on a "shallow" level.
E.g. what multibase encodings are supported for a CIDv1?
Let's check the docs https://docs.ipfs.io/concepts/content-addressing/#identifier-formats :
CIDv0: appears to be base 58-encoded
CIDv1:
From the CID specs and the decoding algorithm we can infer that a CIDv0 is always encoded with
base58btc
and no explicit encoding is mentionned for CIDv1.With that information in mind, I started working with writing tests for working with these encodings. This later turned out to be insufficient and much more encodings are supported for certain cases. How do we solve this conundrum? A (probably) naive approach would be brute-force converting a CIDv1 to each encoding listed in the multibase docs and testing it against the CID Inspector.
In v0.0.5 we can currently validate CIDv0, CIDv1, URL with IPFS path and URL with an IPFS subdomain.
Currently supported
Latest release at time of writing is available on:
Cross-post from IPFS/community
Beta Was this translation helpful? Give feedback.
All reactions