Add "bitcoin-tx" command line utility and supporting modules.
This is a simple utility that provides command line manipulation of a hex-encoded TX. The utility takes a hex string on the command line as input, performs zero or more mutations, and outputs a hex string to standard output. This utility is also an intentional exercise of the "bitcoin library" concept. It is designed to require minimal libraries, and works entirely without need for any RPC or P2P communication. See "bitcoin-tx --help" for command and options summary.
This commit is contained in:
@@ -34,6 +34,7 @@ LIBBITCOIN_COMMON=libbitcoin_common.a
|
||||
LIBBITCOIN_CLI=libbitcoin_cli.a
|
||||
LIBBITCOIN_UTIL=libbitcoin_util.a
|
||||
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
|
||||
LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
|
||||
LIBBITCOINQT=qt/libbitcoinqt.a
|
||||
|
||||
noinst_LIBRARIES = \
|
||||
@@ -41,6 +42,7 @@ noinst_LIBRARIES = \
|
||||
libbitcoin_common.a \
|
||||
libbitcoin_cli.a \
|
||||
libbitcoin_util.a \
|
||||
univalue/libbitcoin_univalue.a \
|
||||
crypto/libbitcoin_crypto.a
|
||||
if ENABLE_WALLET
|
||||
BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
|
||||
@@ -58,6 +60,8 @@ if BUILD_BITCOIN_CLI
|
||||
bin_PROGRAMS += bitcoin-cli
|
||||
endif
|
||||
|
||||
bin_PROGRAMS += bitcoin-tx
|
||||
|
||||
.PHONY: FORCE
|
||||
# bitcoin core #
|
||||
BITCOIN_CORE_H = \
|
||||
@@ -178,6 +182,13 @@ crypto_libbitcoin_crypto_a_SOURCES = \
|
||||
crypto/sha1.h \
|
||||
crypto/ripemd160.h
|
||||
|
||||
# univalue JSON library
|
||||
univalue_libbitcoin_univalue_a_SOURCES = \
|
||||
univalue/univalue.cpp \
|
||||
univalue/univalue_read.cpp \
|
||||
univalue/univalue_write.cpp \
|
||||
univalue/univalue.h
|
||||
|
||||
# common: shared between bitcoind, and bitcoin-qt and non-server tools
|
||||
libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
libbitcoin_common_a_SOURCES = \
|
||||
@@ -229,6 +240,7 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
||||
bitcoind_LDADD = \
|
||||
$(LIBBITCOIN_SERVER) \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_UNIVALUE) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
$(LIBBITCOIN_CRYPTO) \
|
||||
$(LIBLEVELDB) \
|
||||
@@ -267,6 +279,17 @@ endif
|
||||
bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
#
|
||||
|
||||
# bitcoin-tx binary #
|
||||
bitcoin_tx_LDADD = \
|
||||
$(LIBBITCOIN_UNIVALUE) \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
$(LIBBITCOIN_CRYPTO) \
|
||||
$(BOOST_LIBS)
|
||||
bitcoin_tx_SOURCES = bitcoin-tx.cpp
|
||||
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
#
|
||||
|
||||
if TARGET_WINDOWS
|
||||
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user