Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

What encoding is used for event_ids and author_pubkeys to store them as binary objects? #20

Open
AaruBama opened this issue Mar 20, 2024 · 3 comments

Comments

@AaruBama
Copy link

Hi Team,

I'm trying to fetch event ids but querying results in binary form data and I'm not sure how to decode them. Can someone tell me what encoding is used to convert the event_ids into BLOB format.

Also, what is the reason these can't be stored directly as string and are being stored as a blob instead?

@pritk
Copy link
Member

pritk commented Mar 20, 2024

hi, BLOB fields contain binary data. for event_id that's 32 bytes. hexadecimal format is two times bigger than binary data format. there are other formats for other purposes too.

@AaruBama
Copy link
Author

Can you please confirm the encoding for author_pubkey as well? Thanks.

@pritk
Copy link
Member

pritk commented Mar 24, 2024

author_pubkey contains 32 bytes of binary data too.

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

No branches or pull requests

2 participants