@@ -141,7 +141,7 @@ typedef struct session_protocol_pro_features_for_msg {
141141/// - `codepoint_count` -- Counts the number of unicode codepoints that were in the message.
142142LIBSESSION_EXPORT
143143session_protocol_pro_features_for_msg session_protocol_pro_features_for_utf8 (
144- char const * utf8 , size_t utf8_size , PRO_EXTRA_FEATURES extra );
144+ char const * utf8 , size_t utf8_size , PRO_EXTRA_FEATURES extra ) NON_NULL_ARG ( 1 ) ;
145145
146146/// API: session_protocol/session_protocol_get_pro_features_for_utf16
147147///
@@ -164,7 +164,7 @@ session_protocol_pro_features_for_msg session_protocol_pro_features_for_utf8(
164164/// - `codepoint_count` -- Counts the number of unicode codepoints that were in the message.
165165LIBSESSION_EXPORT
166166session_protocol_pro_features_for_msg session_protocol_pro_features_for_utf16 (
167- uint16_t const * utf16 , size_t utf16_size , PRO_EXTRA_FEATURES extra );
167+ uint16_t const * utf16 , size_t utf16_size , PRO_EXTRA_FEATURES extra ) NON_NULL_ARG ( 1 ) ;
168168
169169/// API: session_protocol_encrypt_for_1o1
170170///
@@ -218,9 +218,9 @@ session_protocol_encrypted_for_destination session_protocol_encrypt_for_1o1(
218218 size_t ed25519_privkey_len ,
219219 uint64_t sent_timestamp_ms ,
220220 const bytes33 * recipient_pubkey ,
221- const bytes64 * pro_sig ,
222- char * error ,
223- size_t error_len );
221+ OPTIONAL const bytes64 * pro_sig ,
222+ OPTIONAL char * error ,
223+ size_t error_len ) NON_NULL_ARG ( 1 , 3 , 6 ) ;
224224
225225/// API: session_protocol_encrypt_for_community_inbox
226226///
@@ -279,9 +279,9 @@ session_protocol_encrypted_for_destination session_protocol_encrypt_for_communit
279279 uint64_t sent_timestamp_ms ,
280280 const bytes33 * recipient_pubkey ,
281281 const bytes32 * community_pubkey ,
282- const bytes64 * pro_sig ,
283- char * error ,
284- size_t error_len );
282+ OPTIONAL const bytes64 * pro_sig ,
283+ OPTIONAL char * error ,
284+ size_t error_len ) NON_NULL_ARG ( 1 , 3 , 6 , 7 ) ;
285285
286286/// API: session_protocol_encrypt_for_group
287287///
@@ -305,7 +305,7 @@ session_protocol_encrypted_for_destination session_protocol_encrypt_for_communit
305305/// - `sent_timestamp_ms` -- The timestamp to assign to the message envelope, in milliseconds.
306306/// - `group_ed25519_pubkey` -- The group's public key (33 bytes) for encryption with a 0x03 prefix.
307307/// - `group_ed25519_privkey` -- The group's private key (32 bytes) for groups v2 messages,
308- /// typically
308+ /// typically
309309/// the latest encryption key for the group (e.g., Keys::group_enc_key).
310310/// - `pro_sig` -- Optional signature over the unencrypted plaintext with the user's Session Pro
311311/// rotating public key, if using Session Pro features. If provided, the corresponding proof must
@@ -342,8 +342,8 @@ session_protocol_encrypted_for_destination session_protocol_encrypt_for_group(
342342 const bytes33 * group_ed25519_pubkey ,
343343 const bytes32 * group_ed25519_privkey ,
344344 const bytes64 * pro_sig ,
345- char * error ,
346- size_t error_len );
345+ OPTIONAL char * error ,
346+ size_t error_len ) NON_NULL_ARG ( 1 , 3 , 6 , 7 , 8 ) ;
347347
348348/// API: session_protocol/session_protocol_encrypt_for_destination
349349///
@@ -392,8 +392,8 @@ session_protocol_encrypted_for_destination session_protocol_encrypt_for_destinat
392392 const void * ed25519_privkey ,
393393 size_t ed25519_privkey_len ,
394394 const session_protocol_destination * dest ,
395- char * error ,
396- size_t error_len );
395+ OPTIONAL char * error ,
396+ size_t error_len ) NON_NULL_ARG ( 1 , 3 , 5 ) ;
397397
398398/// API: session_protocol/session_protocol_encrypt_for_destination_free
399399///
@@ -486,8 +486,8 @@ session_protocol_decrypted_envelope session_protocol_decrypt_envelope(
486486 uint64_t unix_ts ,
487487 const void * pro_backend_pubkey ,
488488 size_t pro_backend_pubkey_len ,
489- char * error ,
490- size_t error_len );
489+ OPTIONAL char * error ,
490+ size_t error_len ) NON_NULL_ARG ( 1 , 2 , 5 ) ;
491491
492492/// API: session_protocol/session_protocol_decrypt_envelope_free
493493///
0 commit comments