Skip to content

Commit a9af9eb

Browse files
committed
silentpayments: add examples/silentpayments.c
Demonstrate sending, scanning, and light client scanning.
1 parent b06254b commit a9af9eb

File tree

4 files changed

+634
-0
lines changed

4 files changed

+634
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ecdsa_example
1212
schnorr_example
1313
ellswift_example
1414
musig_example
15+
silentpayments_example
1516
*.exe
1617
*.so
1718
*.a

Makefile.am

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,17 @@ musig_example_LDFLAGS += -lbcrypt
207207
endif
208208
TESTS += musig_example
209209
endif
210+
if ENABLE_MODULE_SILENTPAYMENTS
211+
noinst_PROGRAMS += silentpayments_example
212+
silentpayments_example_SOURCES = examples/silentpayments.c
213+
silentpayments_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
214+
silentpayments_example_LDADD = libsecp256k1.la
215+
silentpayments_example_LDFLAGS = -static
216+
if BUILD_WINDOWS
217+
silentpayments_example_LDFLAGS += -lbcrypt
218+
endif
219+
TESTS += silentpayments_example
220+
endif
210221
endif
211222

212223
### Precomputed tables

examples/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ endif()
2929
if(SECP256K1_ENABLE_MODULE_MUSIG)
3030
add_example(musig)
3131
endif()
32+
33+
if(SECP256K1_ENABLE_MODULE_SILENTPAYMENTS)
34+
add_example(silentpayments)
35+
endif()

0 commit comments

Comments
 (0)