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

How do I get a bitcoin attestation? #1

Closed
mikedilger opened this issue Aug 6, 2024 · 7 comments
Closed

How do I get a bitcoin attestation? #1

mikedilger opened this issue Aug 6, 2024 · 7 comments

Comments

@mikedilger
Copy link

I tried "ots stamp --hash ID" and it gave me something. But the verify command at the bottom of the README says "no bitcoin attestations found".

@mikedilger
Copy link
Author

Is my command correct? Am I even asking for one? I don't know.

@mikedilger
Copy link
Author

Publish a nostr event that timestamps my NIP-41 (nostr-protocol/nips#829) replacement key event.
according to https://github.com/nostr-protocol/nips/blob/master/03.md

This is my whitelisting event:

{"id":"73a994a881ab41499ded5f0f880826e69a2ab673e56d8932929ffcabc2e3c8c5","pubkey":"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49","created_at":1722977357,"kind":1776,"sig":"16a4b56bb243f2e3a398522f3395fa1d46cd746397c99ff4facf880cbb29b07cdf544781b4d38f3614145ee544ae6ee679612c90d17b83e8aa678ca73c696ea3","content":"","tags":[["p","df66c4594d14fc41305c118ff9779e1a65230a93d9205a6a2c118f6feab77592"],["alt","pubkey whitelisting event"]]}

Now I need an OTP attestation event like this

{"id":"5a969a26dbe80f2e703b1bdae1b5f81217a51982d996600217eb5ef6d3844e3e","pubkey":"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49","created_at":1722978124,"kind":1040,"sig":"0d832bad88a07e90cb27e7b8e1e977fa24921307161c89e1c36a0618b7b919192c02a9251bbdc4c36ee0077561cd698b5d9f56d29c34c1dcc832ec21de894eef","content":"AE9wZW5UaW1lc3RhbXBzAABQcm9vZgC/ieLohOiSlAEIc6mUqIGrQUmd7V8PiAgm5poqtnPlbYkykp/8q8LjyMXwECxdLfBJJPeE1c661TemUFkI8SBsnGxbRHIfZ4xJGAvZSpHJM9QY4M45mp7n5gDW+v3zdAjxBGayjoTwCLwIVZ0LdSMSAIPf4w0u+QyOLi1odHRwczovL2FsaWNlLmJ0Yy5jYWxlbmRhci5vcGVudGltZXN0YW1wcy5vcmc=","tags":[["e","73a994a881ab41499ded5f0f880826e69a2ab673e56d8932929ffcabc2e3c8c5","wss://chorus.mikedilger.com:444/"],["alt","opentimestamps attestation"]]}

Except that this one appears to be wrong since it doesn't have any attestations in the OTP content. I created the content with

ots stamp --hash 73a994a881ab41499ded5f0f880826e69a2ab673e56d8932929ffcabc2e3c8c5

and then base64 encoded it.

@fiatjaf
Copy link
Owner

fiatjaf commented Aug 7, 2024

What does ots info say when you pass in the file it gave you in ots stamp?

What happens generally is that you'll send your hash to a calendar server. The calendar server will wait until it has gotten more hashes from other people, then aggregate everything and publish a single Bitcoin transaction with a merkle root of all the hashes it had accumulated.

That process may take hours.

So you have to call ots upgrade with your file so this command will try to ask the calendar server if the transaction is already published and fill in the rest of the merkle path up to the block hash -- i.e. it will convert your "calendar attestation" to a "bitcoin attestation".

@mikedilger
Copy link
Author

myr NEWKEY] ots info 73a994a881ab41499ded5f0f880826e69a2ab673e56d8932929ffcabc2e3c8c5.ots
file digest: 73a994a881ab41499ded5f0f880826e69a2ab673e56d8932929ffcabc2e3c8c5
hashed with: sha256
instruction sequences:
~>
append 2c5d2df04924f784d5cebad537a65059
sha256
prepend 6c9c6c5b44721f678c49180bd94a91c933d418e0ce399a9ee7e600d6fafdf374
sha256
prepend 66b28e84
append bc08559d0b752312
pending(https://alice.btc.calendar.opentimestamps.org)

@mikedilger
Copy link
Author

AHA ok I ran the upgrade, I have something now. Thanks.

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

3 participants
@fiatjaf @mikedilger and others