Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research if hamstr can be integrated with Hashed Network/Portal #95

Open
mgravitt opened this issue Feb 22, 2023 · 5 comments
Open

Research if hamstr can be integrated with Hashed Network/Portal #95

mgravitt opened this issue Feb 22, 2023 · 5 comments
Assignees

Comments

@mgravitt
Copy link
Contributor

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.

@sebastianmontero
Copy link
Contributor

How do you envision it being used in the Portal @3yekn?

@mgravitt
Copy link
Contributor Author

  • I am curious to see how similar signing is, if signature providers between Substrate and nostr are interchangeable. This will inform our signer road map.
  • We should have a way to message to token holders that is gated. Even if it isn't confidential information AND the HASH token isn't a security, I think there are compliance rules about what can and can't be said publicly. If we can communicate on nostr and gate the relay so only people proven to have HASH tokens can join, that is a helpful guard.
  • Token holders will likely be coming to the portal to maybe claim tokens and maybe engage with our products. Nostr is super engaging and the fastest growing use case in the space. Having that integrated likely increases our DAU which is the most critical metric. Nostr DAU has gone up like crazy the last few weeks.
  • Nostr would basically supplant all the functionality found on something like Subsocial.
  • Hamstr is written in Quasar so it seems like it would be the easiest to integrate.

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.

@sebastianmontero
Copy link
Contributor

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?

@mgravitt
Copy link
Contributor Author

@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

@mgravitt
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants