Open mgravitt opened 1 year ago
How do you envision it being used in the Portal @3yekn?
Those are some of trends and themes. In terms of precisely how it would be used on the short term, I think it is to communicate with token holders as a "Hashed Network" feed of information, and it would inform our product road map. Like we discussed yesterday, I can imagine nostr replacing the Greymass buoy server and some of the other tooling to greatly simplify the new Signer product. But I am not sure, there are lots of research tangents to this so it is highly exploratory.
Thanks for the detailed explanation @3yekn! So the first task would be to determine if its possible to sign a nostr event with the polkadotjs wallet, with a substrate account?
@sebastianmontero Yes, that is the first experiment, which maybe can be done just with the polkadot CLI or polkadotjs application utilities. Technically it is the same signature type, but I don't know how the payload might be manipulated (e.g. hashed) before it is signed.
This is the spec on how to sign an event. https://github.com/nostr-protocol/nips/blob/master/01.md
Here is the list of libraries, where nostr-tools
is a popular JS client.
https://github.com/aljazceru/awesome-nostr#libraries
I have been building with this rust one and it is pretty good: https://github.com/rust-nostr/nostr
The inverse is also a good experiment: signing a Substrate transaction with a library that can be used to also sign a nostr event. Or maybe not the exact same library, but the same secret mnemonic.
With coinstr
, I used the same mnemonic and Rust code to sign a nostr event and a multisig bitcoin transaction. This illustrates how a user can do both with the same app and same key.
IMHO, an amazing goal is having one app and one secret mnemonic that can sign Substrate, Nostr, and Bitcoin transactions. Then we could use Nostr Connect and the relay to communicate between web apps and that app to present any of these requests to the user for a common UX.
Hamstr (https://github.com/styppo/hamstr) is a twitter-style Nostr client developed in Quasar. Nostr uses the same signatures (Schnorr) as Hashed Network. Instead of signing a transaction, users sign an event.
It would be super cool to integrate Hamstr into the Portal using the same authentication. We can run our own Nostr relay (we already do at
wss://r1.hashed.systems
)I think the first step would be to see if we can use the same polkadot.js signature library to sign and submit events to a nostr relay. If that works, then it should just be a matter of connecting the dots and implementing a Polkadot signing experience within a fork of Hamstr.