Skip to content

Commit

Permalink
Merge bitcoin-core#1628: Name public API structs
Browse files Browse the repository at this point in the history
694342f Name public API structs (Ava Chow)

Pull request description:

  Closes bitcoin-core#1627

ACKs for top commit:
  real-or-random:
    utACK 694342f
  jonasnick:
    ACK 694342f

Tree-SHA512: 4e03d97e7c072fc7ddefe3f679878aa8a806f3f557a736c9a1b9137972798c953cb21b91491d65f7ba5d75d7119e3224ce60309a0ff93fcf9a64b57b4a426655
  • Loading branch information
real-or-random committed Nov 1, 2024
2 parents 7d48f5e + 694342f commit a38d879
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions include/secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct secp256k1_context_struct secp256k1_context;
* use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. To
* compare keys, use secp256k1_ec_pubkey_cmp.
*/
typedef struct {
typedef struct secp256k1_pubkey {
unsigned char data[64];
} secp256k1_pubkey;

Expand All @@ -71,7 +71,7 @@ typedef struct {
* comparison, use the secp256k1_ecdsa_signature_serialize_* and
* secp256k1_ecdsa_signature_parse_* functions.
*/
typedef struct {
typedef struct secp256k1_ecdsa_signature {
unsigned char data[64];
} secp256k1_ecdsa_signature;

Expand Down
4 changes: 2 additions & 2 deletions include/secp256k1_extrakeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern "C" {
* use secp256k1_xonly_pubkey_serialize and secp256k1_xonly_pubkey_parse. To
* compare keys, use secp256k1_xonly_pubkey_cmp.
*/
typedef struct {
typedef struct secp256k1_xonly_pubkey {
unsigned char data[64];
} secp256k1_xonly_pubkey;

Expand All @@ -30,7 +30,7 @@ typedef struct {
* guaranteed to be portable between different platforms or versions. It is
* however guaranteed to be 96 bytes in size, and can be safely copied/moved.
*/
typedef struct {
typedef struct secp256k1_keypair {
unsigned char data[96];
} secp256k1_keypair;

Expand Down
12 changes: 6 additions & 6 deletions include/secp256k1_musig.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {
* Guaranteed to be 197 bytes in size. No serialization and parsing functions
* (yet).
*/
typedef struct {
typedef struct secp256k1_musig_keyagg_cache {
unsigned char data[197];
} secp256k1_musig_keyagg_cache;

Expand All @@ -56,7 +56,7 @@ typedef struct {
* Copying this data structure can result in nonce reuse which will leak the
* secret signing key.
*/
typedef struct {
typedef struct secp256k1_musig_secnonce {
unsigned char data[132];
} secp256k1_musig_secnonce;

Expand All @@ -65,7 +65,7 @@ typedef struct {
* Guaranteed to be 132 bytes in size. Serialized and parsed with
* `musig_pubnonce_serialize` and `musig_pubnonce_parse`.
*/
typedef struct {
typedef struct secp256k1_musig_pubnonce {
unsigned char data[132];
} secp256k1_musig_pubnonce;

Expand All @@ -74,7 +74,7 @@ typedef struct {
* Guaranteed to be 132 bytes in size. Serialized and parsed with
* `musig_aggnonce_serialize` and `musig_aggnonce_parse`.
*/
typedef struct {
typedef struct secp256k1_musig_aggnonce {
unsigned char data[132];
} secp256k1_musig_aggnonce;

Expand All @@ -84,7 +84,7 @@ typedef struct {
* be secure. Guaranteed to be 133 bytes in size. No serialization and parsing
* functions (yet).
*/
typedef struct {
typedef struct secp256k1_musig_session {
unsigned char data[133];
} secp256k1_musig_session;

Expand All @@ -93,7 +93,7 @@ typedef struct {
* Guaranteed to be 36 bytes in size. Serialized and parsed with
* `musig_partial_sig_serialize` and `musig_partial_sig_parse`.
*/
typedef struct {
typedef struct secp256k1_musig_partial_sig {
unsigned char data[36];
} secp256k1_musig_partial_sig;

Expand Down
2 changes: 1 addition & 1 deletion include/secp256k1_recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {
* recoverability) will have identical representation, so they can be
* memcmp'ed.
*/
typedef struct {
typedef struct secp256k1_ecdsa_recoverable_signature {
unsigned char data[65];
} secp256k1_ecdsa_recoverable_signature;

Expand Down
2 changes: 1 addition & 1 deletion include/secp256k1_schnorrsig.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ SECP256K1_API const secp256k1_nonce_function_hardened secp256k1_nonce_function_b
* secp256k1_nonce_function_bip340 is used, then ndata must be a
* pointer to 32-byte auxiliary randomness as per BIP-340.
*/
typedef struct {
typedef struct secp256k1_schnorrsig_extraparams {
unsigned char magic[4];
secp256k1_nonce_function_hardened noncefp;
void *ndata;
Expand Down

0 comments on commit a38d879

Please sign in to comment.