Skip to content

Commit d9b3b44

Browse files
josibaketheStack
authored andcommitted
silentpayments: add examples/silentpayments.c
Demonstrate sending and scanning on full nodes.
1 parent f749a71 commit d9b3b44

File tree

4 files changed

+485
-0
lines changed

4 files changed

+485
-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
@@ -210,6 +210,17 @@ musig_example_LDFLAGS += -lbcrypt
210210
endif
211211
TESTS += musig_example
212212
endif
213+
if ENABLE_MODULE_SILENTPAYMENTS
214+
noinst_PROGRAMS += silentpayments_example
215+
silentpayments_example_SOURCES = examples/silentpayments.c
216+
silentpayments_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
217+
silentpayments_example_LDADD = libsecp256k1.la
218+
silentpayments_example_LDFLAGS = -static
219+
if BUILD_WINDOWS
220+
silentpayments_example_LDFLAGS += -lbcrypt
221+
endif
222+
TESTS += silentpayments_example
223+
endif
213224
endif
214225

215226
### 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)