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

feat: implement a Cairo struct to represent NIP-01 event #19

Merged
merged 8 commits into from
May 14, 2024
Merged

feat: implement a Cairo struct to represent NIP-01 event #19

merged 8 commits into from
May 14, 2024

Conversation

zintarh
Copy link
Contributor

@zintarh zintarh commented May 10, 2024

implement a Cairo struct to represent NIP-01 event

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
joyboy ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:15am
joyboy-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:15am

Copy link
Collaborator

@maciejka maciejka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure field types match types specified in NIP-01:

{
  "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>,
  "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
  "created_at": <unix timestamp in seconds>,
  "kind": <integer between 0 and 65535>,
  "tags": [
    [<arbitrary string>...],
    // ...
  ],
  "content": <arbitrary string>,
  "sig": <64-bytes lowercase hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
}

onchain/src/nip01.cairo Outdated Show resolved Hide resolved
onchain/src/nip01.cairo Outdated Show resolved Hide resolved
onchain/src/nip01.cairo Outdated Show resolved Hide resolved
onchain/src/nip01.cairo Outdated Show resolved Hide resolved
@maciejka maciejka merged commit dfe1e77 into keep-starknet-strange:main May 14, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants