Skip to content

Commit 6c13af9

Browse files
committed
Squashed 'src/secp256k1/' changes from 642c885b61..3165b6b091
3165b6b091 docs: update README 371584a19b ci: enable silentpayments module ba7e7a1484 tests: add BIP-352 test vectors 7686c5e2c6 silentpayments: add benchmarks for scanning 2f39991873 silentpayments: add examples/silentpayments.c 6b1f86b3e5 silentpayments: receiving bc9ac6237f silentpayments: recipient label support 31a6da2cf7 silentpayments: sending 93c2cd3071 build: add skeleton for new silentpayments (BIP352) module 3fdf146bad Merge bitcoin-core/secp256k1#1578: ci: Silent Homebrew's noisy reinstall warnings f8c1b0e0e6 Merge bitcoin-core/secp256k1#1577: release cleanup: bump version after 0.5.1 7057d3c9af ci: Silent Homebrew's noisy reinstall warnings c3e40d75db release cleanup: bump version after 0.5.1 git-subtree-dir: src/secp256k1 git-subtree-split: 3165b6b091a30a4ace948d67d55142c61a12929d
1 parent 41797f8 commit 6c13af9

23 files changed

+9592
-19
lines changed

.cirrus.yml

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ env:
2323
EXTRAKEYS: no
2424
SCHNORRSIG: no
2525
ELLSWIFT: no
26+
SILENTPAYMENTS: no
2627
### test options
2728
SECP256K1_TEST_ITERS:
2829
BENCH: yes
@@ -70,6 +71,7 @@ task:
7071
EXTRAKEYS: yes
7172
SCHNORRSIG: yes
7273
ELLSWIFT: yes
74+
SILENTPAYMENTS: yes
7375
matrix:
7476
# Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU
7577
- env: { CC: 'gcc-snapshot' }
@@ -87,6 +89,7 @@ task:
8789
EXTRAKEYS: yes
8890
SCHNORRSIG: yes
8991
ELLSWIFT: yes
92+
SILENTPAYMENTS: yes
9093
WRAPPER_CMD: 'valgrind --error-exitcode=42'
9194
SECP256K1_TEST_ITERS: 2
9295
matrix:

.github/workflows/ci.yml

+23-12
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
EXTRAKEYS: 'no'
3535
SCHNORRSIG: 'no'
3636
ELLSWIFT: 'no'
37+
SILENTPAYMENTS: 'no'
3738
### test options
3839
SECP256K1_TEST_ITERS:
3940
BENCH: 'yes'
@@ -72,18 +73,18 @@ jobs:
7273
matrix:
7374
configuration:
7475
- env_vars: { WIDEMUL: 'int64', RECOVERY: 'yes' }
75-
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
76+
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes' }
7677
- env_vars: { WIDEMUL: 'int128' }
7778
- env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
7879
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
79-
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes' }
80+
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', SILENTPAYMENTS: 'yes' }
8081
- env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
8182
- env_vars: { RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes' }
82-
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', CPPFLAGS: '-DVERIFY' }
83+
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', SILENTPAYMENTS: 'yes', CPPFLAGS: '-DVERIFY' }
8384
- env_vars: { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
8485
- env_vars: { CPPFLAGS: '-DDETERMINISTIC' }
8586
- env_vars: { CFLAGS: '-O0', CTIMETESTS: 'no' }
86-
- env_vars: { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
87+
- env_vars: { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes' }
8788
- env_vars: { ECMULTGENKB: 2, ECMULTWINDOW: 2 }
8889
- env_vars: { ECMULTGENKB: 86, ECMULTWINDOW: 4 }
8990
cc:
@@ -143,6 +144,7 @@ jobs:
143144
EXTRAKEYS: 'yes'
144145
SCHNORRSIG: 'yes'
145146
ELLSWIFT: 'yes'
147+
SILENTPAYMENTS: 'yes'
146148
CC: ${{ matrix.cc }}
147149

148150
steps:
@@ -188,6 +190,7 @@ jobs:
188190
EXTRAKEYS: 'yes'
189191
SCHNORRSIG: 'yes'
190192
ELLSWIFT: 'yes'
193+
SILENTPAYMENTS: 'yes'
191194
CTIMETESTS: 'no'
192195

193196
steps:
@@ -240,6 +243,7 @@ jobs:
240243
EXTRAKEYS: 'yes'
241244
SCHNORRSIG: 'yes'
242245
ELLSWIFT: 'yes'
246+
SILENTPAYMENTS: 'yes'
243247
CTIMETESTS: 'no'
244248

245249
steps:
@@ -286,6 +290,7 @@ jobs:
286290
EXTRAKEYS: 'yes'
287291
SCHNORRSIG: 'yes'
288292
ELLSWIFT: 'yes'
293+
SILENTPAYMENTS: 'yes'
289294
CTIMETESTS: 'no'
290295

291296
strategy:
@@ -342,6 +347,7 @@ jobs:
342347
EXTRAKEYS: 'yes'
343348
SCHNORRSIG: 'yes'
344349
ELLSWIFT: 'yes'
350+
SILENTPAYMENTS: 'yes'
345351
CTIMETESTS: 'no'
346352

347353
steps:
@@ -395,6 +401,7 @@ jobs:
395401
EXTRAKEYS: 'yes'
396402
SCHNORRSIG: 'yes'
397403
ELLSWIFT: 'yes'
404+
SILENTPAYMENTS: 'yes'
398405
CTIMETESTS: 'no'
399406
SECP256K1_TEST_ITERS: 2
400407

@@ -447,6 +454,7 @@ jobs:
447454
EXTRAKEYS: 'yes'
448455
SCHNORRSIG: 'yes'
449456
ELLSWIFT: 'yes'
457+
SILENTPAYMENTS: 'yes'
450458
CTIMETESTS: 'no'
451459
CFLAGS: '-fsanitize=undefined,address -g'
452460
UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
@@ -512,6 +520,7 @@ jobs:
512520
EXTRAKEYS: 'yes'
513521
SCHNORRSIG: 'yes'
514522
ELLSWIFT: 'yes'
523+
SILENTPAYMENTS: 'yes'
515524
CC: 'clang'
516525
SECP256K1_TEST_ITERS: 32
517526
ASM: 'no'
@@ -559,6 +568,7 @@ jobs:
559568
EXTRAKEYS: 'yes'
560569
SCHNORRSIG: 'yes'
561570
ELLSWIFT: 'yes'
571+
SILENTPAYMENTS: 'yes'
562572
CTIMETESTS: 'no'
563573

564574
strategy:
@@ -615,14 +625,14 @@ jobs:
615625
fail-fast: false
616626
matrix:
617627
env_vars:
618-
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
628+
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes' }
619629
- { WIDEMUL: 'int128_struct', ECMULTGENKB: 2, ECMULTWINDOW: 4 }
620-
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
630+
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes' }
621631
- { WIDEMUL: 'int128', RECOVERY: 'yes' }
622-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
623-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
624-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
625-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
632+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes' }
633+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes', CC: 'gcc' }
634+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
635+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', SILENTPAYMENTS: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
626636
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
627637
- BUILD: 'distcheck'
628638

@@ -632,7 +642,7 @@ jobs:
632642

633643
- name: Install Homebrew packages
634644
run: |
635-
brew install automake libtool gcc
645+
brew install --quiet automake libtool gcc
636646
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
637647
638648
- name: Install and cache Valgrind
@@ -691,7 +701,7 @@ jobs:
691701

692702
- name: Install Homebrew packages
693703
run: |
694-
brew install automake libtool gcc
704+
brew install --quiet automake libtool gcc
695705
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
696706
697707
- name: CI script
@@ -791,6 +801,7 @@ jobs:
791801
EXTRAKEYS: 'yes'
792802
SCHNORRSIG: 'yes'
793803
ELLSWIFT: 'yes'
804+
SILENTPAYMENTS: 'yes'
794805

795806
steps:
796807
- name: Checkout

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ecdh_example
1111
ecdsa_example
1212
schnorr_example
1313
ellswift_example
14+
silentpayments_example
1415
*.exe
1516
*.so
1617
*.a

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
810
## [0.5.1] - 2024-08-01
911

1012
#### Added
@@ -141,6 +143,7 @@ This version was in fact never released.
141143
The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6).
142144
Therefore, this version number does not uniquely identify a set of source files.
143145

146+
[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.1...HEAD
144147
[0.5.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.0...v0.5.1
145148
[0.5.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.1...v0.5.0
146149
[0.4.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.0...v0.4.1

CMakeLists.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(libsecp256k1
44
# The package (a.k.a. release) version is based on semantic versioning 2.0.0 of
55
# the API. All changes in experimental modules are treated as
66
# backwards-compatible and therefore at most increase the minor version.
7-
VERSION 0.5.1
7+
VERSION 0.5.2
88
DESCRIPTION "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1."
99
HOMEPAGE_URL "https://github.com/bitcoin-core/secp256k1"
1010
LANGUAGES C
@@ -27,7 +27,7 @@ endif()
2727
# All changes in experimental modules are treated as if they don't affect the
2828
# interface and therefore only increase the revision.
2929
set(${PROJECT_NAME}_LIB_VERSION_CURRENT 4)
30-
set(${PROJECT_NAME}_LIB_VERSION_REVISION 1)
30+
set(${PROJECT_NAME}_LIB_VERSION_REVISION 2)
3131
set(${PROJECT_NAME}_LIB_VERSION_AGE 2)
3232

3333
set(CMAKE_C_STANDARD 90)
@@ -52,9 +52,14 @@ option(SECP256K1_ENABLE_MODULE_RECOVERY "Enable ECDSA pubkey recovery module." O
5252
option(SECP256K1_ENABLE_MODULE_EXTRAKEYS "Enable extrakeys module." ON)
5353
option(SECP256K1_ENABLE_MODULE_SCHNORRSIG "Enable schnorrsig module." ON)
5454
option(SECP256K1_ENABLE_MODULE_ELLSWIFT "Enable ElligatorSwift module." ON)
55+
option(SECP256K1_ENABLE_MODULE_SILENTPAYMENTS "Enable Silent Payments module." OFF)
5556

5657
# Processing must be done in a topological sorting of the dependency graph
5758
# (dependent module first).
59+
if(SECP256K1_ENABLE_MODULE_SILENTPAYMENTS)
60+
add_compile_definitions(ENABLE_MODULE_SILENTPAYMENTS=1)
61+
endif()
62+
5863
if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
5964
add_compile_definitions(ENABLE_MODULE_ELLSWIFT=1)
6065
endif()
@@ -298,6 +303,7 @@ message(" ECDSA pubkey recovery ............... ${SECP256K1_ENABLE_MODULE_RECOV
298303
message(" extrakeys ........................... ${SECP256K1_ENABLE_MODULE_EXTRAKEYS}")
299304
message(" schnorrsig .......................... ${SECP256K1_ENABLE_MODULE_SCHNORRSIG}")
300305
message(" ElligatorSwift ...................... ${SECP256K1_ENABLE_MODULE_ELLSWIFT}")
306+
message(" Silent Payments ..................... ${SECP256K1_ENABLE_MODULE_SILENTPAYMENTS}")
301307
message("Parameters:")
302308
message(" ecmult window size .................. ${SECP256K1_ECMULT_WINDOW_SIZE}")
303309
message(" ecmult gen table size ............... ${SECP256K1_ECMULT_GEN_KB} KiB")

Makefile.am

+20
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ ellswift_example_LDFLAGS += -lbcrypt
195195
endif
196196
TESTS += ellswift_example
197197
endif
198+
if ENABLE_MODULE_SILENTPAYMENTS
199+
noinst_PROGRAMS += silentpayments_example
200+
silentpayments_example_SOURCES = examples/silentpayments.c
201+
silentpayments_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
202+
silentpayments_example_LDADD = libsecp256k1.la
203+
silentpayments_example_LDFLAGS = -static
204+
if BUILD_WINDOWS
205+
silentpayments_example_LDFLAGS += -lbcrypt
206+
endif
207+
TESTS += silentpayments_example
208+
endif
198209
endif
199210

200211
### Precomputed tables
@@ -237,11 +248,16 @@ maintainer-clean-local: clean-precomp
237248
### Pregenerated test vectors
238249
### (see the comments in the previous section for detailed rationale)
239250
TESTVECTORS = src/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.h
251+
TESTVECTORS += src/modules/silentpayments/vectors.h
240252

241253
src/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.h:
242254
mkdir -p $(@D)
243255
python3 $(top_srcdir)/tools/tests_wycheproof_generate.py $(top_srcdir)/src/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.json > $@
244256

257+
src/modules/silentpayments/vectors.h:
258+
mkdir -p $(@D)
259+
python3 $(top_srcdir)/tools/tests_silentpayments_generate.py $(top_srcdir)/src/modules/silentpayments/bip352_send_and_receive_test_vectors.json > $@
260+
245261
testvectors: $(TESTVECTORS)
246262

247263
BUILT_SOURCES += $(TESTVECTORS)
@@ -284,3 +300,7 @@ endif
284300
if ENABLE_MODULE_ELLSWIFT
285301
include src/modules/ellswift/Makefile.am.include
286302
endif
303+
304+
if ENABLE_MODULE_SILENTPAYMENTS
305+
include src/modules/silentpayments/Makefile.am.include
306+
endif

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Features:
2121
* Optional module for ECDH key exchange.
2222
* Optional module for Schnorr signatures according to [BIP-340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki).
2323
* Optional module for ElligatorSwift key exchange according to [BIP-324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki).
24+
* Optional module for Silent Payments send and receive according to [BIP-352](https://github.com/bitcoin/bips/blob/master/bip-0352.mediawiki).
2425

2526
Implementation details
2627
----------------------
@@ -115,6 +116,7 @@ Usage examples can be found in the [examples](examples) directory. To compile th
115116
* [Schnorr signatures example](examples/schnorr.c)
116117
* [Deriving a shared secret (ECDH) example](examples/ecdh.c)
117118
* [ElligatorSwift key exchange example](examples/ellswift.c)
119+
* [Silent Payments send and receive example](examples/silentpayments.c)
118120

119121
To compile the Schnorr signature and ECDH examples, you also need to configure with `--enable-module-schnorrsig` and `--enable-module-ecdh`.
120122

ci/ci.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ print_environment() {
1313
# does not rely on bash.
1414
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
1515
ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
16-
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS SCHNORRSIG ELLSWIFT \
16+
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS SCHNORRSIG ELLSWIFT SILENTPAYMENTS \
1717
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
1818
EXAMPLES \
1919
HOST WRAPPER_CMD \
@@ -79,6 +79,7 @@ esac
7979
--enable-module-ellswift="$ELLSWIFT" \
8080
--enable-module-extrakeys="$EXTRAKEYS" \
8181
--enable-module-schnorrsig="$SCHNORRSIG" \
82+
--enable-module-silentpayments="$SILENTPAYMENTS" \
8283
--enable-examples="$EXAMPLES" \
8384
--enable-ctime-tests="$CTIMETESTS" \
8485
--with-valgrind="$WITH_VALGRIND" \

configure.ac

+13-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ AC_PREREQ([2.60])
55
# backwards-compatible and therefore at most increase the minor version.
66
define(_PKG_VERSION_MAJOR, 0)
77
define(_PKG_VERSION_MINOR, 5)
8-
define(_PKG_VERSION_PATCH, 1)
9-
define(_PKG_VERSION_IS_RELEASE, true)
8+
define(_PKG_VERSION_PATCH, 2)
9+
define(_PKG_VERSION_IS_RELEASE, false)
1010

1111
# The library version is based on libtool versioning of the ABI. The set of
1212
# rules for updating the version can be found here:
1313
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
1414
# All changes in experimental modules are treated as if they don't affect the
1515
# interface and therefore only increase the revision.
1616
define(_LIB_VERSION_CURRENT, 4)
17-
define(_LIB_VERSION_REVISION, 1)
17+
define(_LIB_VERSION_REVISION, 2)
1818
define(_LIB_VERSION_AGE, 2)
1919

2020
AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
@@ -188,6 +188,10 @@ AC_ARG_ENABLE(module_ellswift,
188188
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
189189
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
190190

191+
AC_ARG_ENABLE(module_silentpayments,
192+
AS_HELP_STRING([--enable-module-silentpayments],[enable Silent Payments module [default=no]]), [],
193+
[SECP_SET_DEFAULT([enable_module_silentpayments], [no], [yes])])
194+
191195
AC_ARG_ENABLE(external_default_callbacks,
192196
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
193197
[SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
@@ -394,6 +398,10 @@ SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
394398

395399
# Processing must be done in a reverse topological sorting of the dependency graph
396400
# (dependent module first).
401+
if test x"$enable_module_silentpayments" = x"yes"; then
402+
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SILENTPAYMENTS=1"
403+
fi
404+
397405
if test x"$enable_module_ellswift" = x"yes"; then
398406
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1"
399407
fi
@@ -450,6 +458,7 @@ AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"ye
450458
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
451459
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
452460
AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
461+
AM_CONDITIONAL([ENABLE_MODULE_SILENTPAYMENTS], [test x"$enable_module_silentpayments" = x"yes"])
453462
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
454463
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm32"])
455464
AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
@@ -472,6 +481,7 @@ echo " module recovery = $enable_module_recovery"
472481
echo " module extrakeys = $enable_module_extrakeys"
473482
echo " module schnorrsig = $enable_module_schnorrsig"
474483
echo " module ellswift = $enable_module_ellswift"
484+
echo " module silentpayments = $enable_module_silentpayments"
475485
echo
476486
echo " asm = $set_asm"
477487
echo " ecmult window size = $set_ecmult_window"

0 commit comments

Comments
 (0)