ATProto did association with a wallet #55
Kzoeps
started this conversation in
1. Hypercerts v2
Replies: 1 comment
-
https://www.loom.com/share/1bc15cae53c94e2297f0d384a05ef462?sid=065a49ed-e172-481e-94ff-b567bada4d6d again test url is here https://did-wallet-connection.vercel.app/ And this is the repository link https://github.com/Kzoeps/did-wallet-connection |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Jumping off of this article that sharfy shared with me: https://piss.beauty/post/atproto-payment-identities. I tried to implement an MVP approach of how this could possibly be done.
Firstly the user creates a record on atproto on this collection: com.hypercert.walletAttestationTest. for the mvp there is only ever one record in this collection and its stored at com.hypercert.walletAttestationTest/self. The data stored on this looks like this
You can take a look here on atproto-browser for how the data looks.
The
attestation
is a signature where the body that is signed would be the did and the wallet address delimited by a comma. Eg:did:plc:u7h3dstby64di67bxaotzxcz,0xFb15d6fF3305355D1e163338C385778111C02f76
.Including the did and the address in the body of the signature so that it is easy to construct for the verifier and easy to verify.
Once the user signs the message then the signature and the address they are claiming to own is set up in the repo mentioned above.
On the verifier side if someone wants to verify whether this did actually owns this address or not. they would take the message signed (the did and the address), and the signature and get the address who signed that message and check if it matches up.
Currently in my code i do it like this:
After getting the recovered address check to see it matches with the address on the record ( atproto ). If they match wallet ownership is verified if not its not.
Links
Repo
test url: did-wallet-connection.vercel.app/
Loom Video
Beta Was this translation helpful? Give feedback.
All reactions