@lutindiscret @mauve @dat_ecosystem @ninabreznik I'd love to try building a similar idea for Dat but don't know much about it. Is there a way to refer to a file by some immutable ID, like BitTorrent does?

@EvanHahn @lutindiscret @mauve @ninabreznik

The main mechanism is to refer to a file based on pubkey + version.

The pubkey refers to the "filesystem" containing the file. The version is a number between 0 and latest which refers to the exact point in time.

If you have the merkle root hash for that specific filesystem version or the specific file hash, you can later verify that the file has not been tampered with.

This is app/usecase specific

@EvanHahn @lutindiscret @mauve @ninabreznik

Dat started out to build "git for any data".
version controlled torrents authors can update over time. This is what dat is good for and was intended to do when it started as a project in 2013.

@dat_ecosystem Is there good example code for this? My dream would be something like:

let publicKey = "abc123"
let version = 456
let data = await dat.download(publicKey, version)

Is there something like that? Or would I need to build that myself (using Hyperdrive)?

@EvanHahn @dat_ecosystem yeah check out hyper-sdk. The p2p stufd can be a pain to set up for browsers tho

@mauve @dat_ecosystem Alright, built a prototype! gitlab.com/EvanHahn/node-hyper

Lets you do things like:

import myModule from "hyper+node:?key=abcd&discoverykey=1234&path=%2Fmodule.js";

Let me know what you think...I'm new to the Hypercore world so I'm sure I've made some mistakes. (Feel free to respond here or contact me via evanhahn.com/contact/)

Follow

@EvanHahn That's awesome! As dat_ecosystem mentioned, we in the community usually use a different URL scheme. Have you seen my web browser that loads p2p URLs (including JS) natively? @agregore

I also have a cli environment which supports p2p web apis that might be relevant: github.com/AgregoreWeb/agregor

· · Web · 1 · 0 · 0

@mauve I have not...this is neat! agregore-cli seems very similar to my idea, but better.

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.