nostrdb/content_parser: add initial db decoders

We need to pull the data out as well! Let's add some initial decoders.
We still need tests to make sure it's working.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-08-11 16:39:43 -07:00
committed by Daniel D’Aquino
parent c3b06d281e
commit d73422db38
5 changed files with 169 additions and 38 deletions
+3 -4
View File
@@ -38,19 +38,18 @@ struct ndb_mention_bech32_block {
struct nostr_bech32 bech32;
};
struct invoice_block {
struct ndb_invoice_block {
struct str_block invstr;
struct ndb_invoice invoice;
struct bolt11 *bolt11;
};
struct note_block {
enum block_type type;
union {
struct str_block str;
struct invoice_block invoice;
struct ndb_invoice_block invoice;
struct ndb_mention_bech32_block mention_bech32;
int mention_index;
uint32_t mention_index;
} block;
};