Skip to content

Commit

Permalink
docs: add comments for utils.h
Browse files Browse the repository at this point in the history
  • Loading branch information
keiff3r committed Jun 25, 2024
1 parent 9ef6212 commit a1da535
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,29 @@

#include "uint256.h"

/**
* Converts a binary array to a hexadecimal string representation.
*
* @param strbuf [out] The buffer to store the hexadecimal string.
* @param bin [in] The binary array to convert.
* @param len [in] The length of the binary array.
*/
void array_hexstr(char *strbuf, const void *bin, size_t len);

/**
* Converts a big-endian byte array to a uint256_t target.
*
* @param data [in] The big-endian byte array to convert.
* @param length [in] The length of the byte array.
* @param target [out] The target uint256_t to store the converted value.
*/
void convertUint256BE(const uint8_t *data, uint32_t length, uint256_t *target);

/**
* Retrieves the V value from the transaction content.
*
* @param txContent [in] The transaction content.
* @return The V value.
*/
uint32_t getV(txContent_t *txContent);

#endif /* _UTILS_H_ */
#endif /* _UTILS_H_ */

0 comments on commit a1da535

Please sign in to comment.