nostr_bech32.h (826B)
1 // 2 // nostr_bech32.h 3 // damus 4 // 5 // Created by William Casarin on 2023-04-09. 6 // 7 8 #ifndef nostr_bech32_h 9 #define nostr_bech32_h 10 11 #include <stdio.h> 12 #include "str_block.h" 13 #include "nostrdb.h" 14 #include "cursor.h" 15 16 int parse_nostr_bech32_str(struct cursor *bech32, enum nostr_bech32_type *type); 17 int parse_nostr_bech32_type(const char *prefix, enum nostr_bech32_type *type); 18 19 int parse_nostr_bech32_buffer(struct cursor *cur, enum nostr_bech32_type type, 20 struct nostr_bech32 *obj); 21 22 int parse_nostr_bech32(unsigned char *buf, int buflen, 23 const char *bech32_str, size_t bech32_len, 24 struct nostr_bech32 *obj); 25 26 /* 27 int parse_nostr_bech32(const char *bech32, size_t input_len, 28 unsigned char *outbuf, size_t outlen, 29 enum nostr_bech32_type *type); 30 */ 31 32 #endif /* nostr_bech32_h */