Rename sequence_before_author => flags. #29

This commit is contained in:
2024-03-13 19:40:09 -04:00
parent 9de33d06d2
commit 537a8654fa
5 changed files with 50 additions and 41 deletions

View File

@ -40,6 +40,11 @@ typedef enum _tf_ssb_change_t
k_tf_ssb_change_remove,
} tf_ssb_change_t;
typedef enum _tf_ssb_message_flags_t
{
k_tf_ssb_message_flag_sequence_before_author = 1,
} tf_ssb_message_flags_t;
/** An SSB instance. */
typedef struct _tf_ssb_t tf_ssb_t;
/** An SSB connection. */
@ -363,11 +368,10 @@ bool tf_ssb_id_bin_to_str(char* str, size_t str_size, const uint8_t* bin);
** @param out_id_size The size of out_id.
** @param[out] out_signature A buffer to receive the message's signature.
** @param out_signature_size The size of out_signature.
** @param[out] out_sequence_before_author A flag describing the order of the sequence and author fields.
** @param[out] out_flags tf_ssb_message_flags_t describing the message.
** @return True if the signature is valid and was successfully extracted.
*/
bool tf_ssb_verify_and_strip_signature(
JSContext* context, JSValue val, char* out_id, size_t out_id_size, char* out_signature, size_t out_signature_size, bool* out_sequence_before_author);
bool tf_ssb_verify_and_strip_signature(JSContext* context, JSValue val, char* out_id, size_t out_id_size, char* out_signature, size_t out_signature_size, int* out_flags);
/**
** Determine the message identifier.