Import modules from decentralized networks #22779
alexgleason
started this conversation in
Ideas
Replies: 2 comments
-
This is awesome! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am also very inspired by JSR, a small step towards decentralizing NPM, that I could imagine being entirely decentralized and content-addressable, with tools to publish packages on Nostr relays or similar. I imagine it could use a Nostr relay for its entire database - for storing project metadata and source code files. Just a thought. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sounds crazy, but I would like to be able to do this:
You can check the contents of it here: https://njump.me/nevent1qqsvnhgrwkwyx96zqauqjzk2wwz25a39rx75h8d68r4wlhdyk9s849spzemhxue69uhhyetvv9ujumn0wd68ytnzv9hxgq3qjky53pl5p4v73qr7dr2l76ww895tgr5fznmt8aqwhy6ay39ssp6q3ls4xh
Nostr stores immutable events on a set of relays, making it suitable for importing ES modules.
Using import maps, it's actually already possible to import code from Nostr using an HTTPS gateway!
deno.json (adding my Nostr HTTPS gateway):
"imports": { + "@nostr/": "https://77484d49eac4.ngrok.app/e/" },
code:
This works, and it's absolutely amazing!
This is possible thanks to hostr.
I just have one small wish - which is that import maps could let me specify a custom protocol. This doesn't work:
I wish import maps either allowed this syntax, or a new
protocols
field could be added to deno.json to enable this functionality.It's a small complaint. Deno is amazing.
Beta Was this translation helpful? Give feedback.
All reactions