primal-caching-service icon indicating copy to clipboard operation
primal-caching-service copied to clipboard

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

Open AaruBama opened this issue 11 months ago • 3 comments

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?

AaruBama avatar Mar 20 '24 14:03 AaruBama

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.

pritk avatar Mar 20 '24 15:03 pritk

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

AaruBama avatar Mar 24 '24 16:03 AaruBama

author_pubkey contains 32 bytes of binary data too.

pritk avatar Mar 24 '24 17:03 pritk