Add back a verify command. Remove unused and not very useful ssb.getMessage(). Make field ordering shenanigans more explicit.

This commit is contained in:
2024-05-11 08:48:50 -04:00
parent 7caf4a0173
commit 11a6649847
5 changed files with 189 additions and 51 deletions

View File

@ -126,8 +126,9 @@ JSValue tf_ssb_db_get_message_by_id(tf_ssb_t* ssb, const char* id, bool is_keys)
** @param[out] out_content Populated with the message content. Free with tf_free().
** @return True if the message was found and retrieved.
*/
bool tf_ssb_db_get_message_by_author_and_sequence(
tf_ssb_t* ssb, const char* author, int64_t sequence, char* out_message_id, size_t out_message_id_size, double* out_timestamp, char** out_content);
bool tf_ssb_db_get_message_by_author_and_sequence(tf_ssb_t* ssb, const char* author, int64_t sequence, char* out_message_id, size_t out_message_id_size, char* out_previous,
size_t out_previous_size, char* out_author, size_t out_author_size, double* out_timestamp, char** out_content, char* out_hash, size_t out_hash_size, char* out_signature,
size_t out_signature_size, int* out_flags);
/**
** Get information about the last message from an author.
@ -379,6 +380,8 @@ bool tf_ssb_db_set_property(tf_ssb_t* ssb, const char* id, const char* key, cons
*/
void tf_ssb_db_resolve_index_async(tf_ssb_t* ssb, const char* host, void (*callback)(const char* path, void* user_data), void* user_data);
bool tf_ssb_db_verify(tf_ssb_t* ssb, const char* id);
/**
** An SQLite authorizer callback. See https://www.sqlite.org/c3ref/set_authorizer.html for use.
** @param user_data User data registered with the authorizer.