Skip to content

Commit

Permalink
export SECP256K1_SURJECTIONPROOF_RAW_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
dgpv committed Dec 24, 2018
1 parent 53ad841 commit 2f69f4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/secp256k1_surjectionproof.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ extern "C" {
* and secp256k1_surjectionproof_serialize to encode/decode proofs into a
* well-defined format.
*
* If you need to allocate new secp256k1_surjectionproof structure
* for use with secp256k1_surjectionproof_initialize, you should allocate
* a buffer of size SECP256K1_SURJECTIONPROOF_RAW_SIZE, and then treat the
* data in this buffer as opaque data, as described above.
*
* The representation is exposed to allow creation of these objects on the
* stack; please *do not* use these internals directly.
*/
Expand All @@ -49,6 +54,8 @@ typedef struct {
unsigned char data[32 * (1 + SECP256K1_SURJECTIONPROOF_MAX_N_INPUTS)];
} secp256k1_surjectionproof;

SECP256K1_API const int SECP256K1_SURJECTIONPROOF_RAW_SIZE;

/** Parse a surjection proof
*
* Returns: 1 when the proof could be parsed, 0 otherwise.
Expand Down
1 change: 1 addition & 0 deletions src/secp256k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,5 @@ int secp256k1_ec_pubkey_combine(const secp256k1_context* ctx, secp256k1_pubkey *

#ifdef ENABLE_MODULE_SURJECTIONPROOF
# include "modules/surjection/main_impl.h"
const int SECP256K1_SURJECTIONPROOF_RAW_SIZE = sizeof(secp256k1_surjectionproof);
#endif

0 comments on commit 2f69f4b

Please sign in to comment.