iceberg: add the example program
Port examples/iceberg.c from the source tree: a full Iceberg session demonstrating the call order from the module docs -- distributed key generation, pubshare_gen/pubkey_agg to obtain the group public key, nonce_gen/nonce_agg into an ordinary MuSig2 public nonce, and partial_sign/partial_sig_agg into an ordinary MuSig2 partial signature. One content adaptation: the secp256k1_musig_nonce_process call gains a NULL adaptor argument, matching this repo's zkp musig variant. Wired like the chilldkg example: autotools noinst_PROGRAMS + TESTS entry under ENABLE_MODULE_ICEBERG (the example runs as part of make check), CMake example target in examples/CMakeLists.txt, and iceberg_example added to .gitignore. Verified: ./iceberg_example runs to completion (exit 0) under both build systems.
This commit is contained in:
11
Makefile.am
11
Makefile.am
@@ -234,6 +234,17 @@ chilldkg_example_LDFLAGS += -lbcrypt
|
||||
endif
|
||||
TESTS += chilldkg_example
|
||||
endif
|
||||
if ENABLE_MODULE_ICEBERG
|
||||
noinst_PROGRAMS += iceberg_example
|
||||
iceberg_example_SOURCES = examples/iceberg.c
|
||||
iceberg_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
|
||||
iceberg_example_LDADD = libsecp256k1.la
|
||||
iceberg_example_LDFLAGS = -static
|
||||
if BUILD_WINDOWS
|
||||
iceberg_example_LDFLAGS += -lbcrypt
|
||||
endif
|
||||
TESTS += iceberg_example
|
||||
endif
|
||||
endif
|
||||
|
||||
### Precomputed tables
|
||||
|
||||
Reference in New Issue
Block a user