├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .vscode
├── launch.json
├── settings.json
└── tasks.json
├── AUTHORS
├── COPYING
├── ChangeLog
├── INSTALL
├── Makefile.am
├── NEWS
├── README
├── README.md
├── autogen.sh
├── build.cmd
├── builds
├── cmake
│ ├── CMakeLists.txt
│ ├── CMakePresets.json
│ └── modules
│ │ ├── FindDl.cmake
│ │ ├── FindIcu-I18N.cmake
│ │ ├── FindPng.cmake
│ │ ├── FindQrencode.cmake
│ │ ├── FindRt.cmake
│ │ └── FindSecp256K1.cmake
├── msvc
│ ├── .gitignore
│ ├── build
│ │ ├── build_all.bat
│ │ ├── build_base.bat
│ │ └── nuget_all.bat
│ ├── debug.natvis
│ ├── nuget.config
│ ├── properties
│ │ ├── Arm.props
│ │ ├── Arm64.props
│ │ ├── Common.props
│ │ ├── DLL.props
│ │ ├── Debug.props
│ │ ├── DebugDEXE.props
│ │ ├── DebugDLL.props
│ │ ├── DebugLEXE.props
│ │ ├── DebugLIB.props
│ │ ├── DebugLTCG.props
│ │ ├── DebugSEXE.props
│ │ ├── EXE.props
│ │ ├── LIB.props
│ │ ├── LTCG.props
│ │ ├── Link.props
│ │ ├── Messages.props
│ │ ├── Output.props
│ │ ├── Release.props
│ │ ├── ReleaseDEXE.props
│ │ ├── ReleaseDLL.props
│ │ ├── ReleaseLEXE.props
│ │ ├── ReleaseLIB.props
│ │ ├── ReleaseLTCG.props
│ │ ├── ReleaseSEXE.props
│ │ ├── Win32.props
│ │ └── x64.props
│ ├── resource.h
│ ├── resource.rc
│ └── vs2022
│ │ ├── .vs
│ │ └── libbitcoin-system
│ │ │ └── FileContentIndex
│ │ │ └── .gitignore
│ │ ├── libbitcoin-system-examples
│ │ ├── libbitcoin-system-examples.props
│ │ ├── libbitcoin-system-examples.vcxproj
│ │ ├── libbitcoin-system-examples.vcxproj.filters
│ │ └── packages.config
│ │ ├── libbitcoin-system-test
│ │ ├── libbitcoin-system-test.props
│ │ ├── libbitcoin-system-test.vcxproj
│ │ ├── libbitcoin-system-test.vcxproj.filters
│ │ ├── libbitcoin-system-test.xml
│ │ └── packages.config
│ │ ├── libbitcoin-system.import.props
│ │ ├── libbitcoin-system.import.xml
│ │ ├── libbitcoin-system.sln
│ │ └── libbitcoin-system
│ │ ├── libbitcoin-system.props
│ │ ├── libbitcoin-system.vcxproj
│ │ ├── libbitcoin-system.vcxproj.filters
│ │ ├── libbitcoin-system.xml
│ │ └── packages.config
└── vscode
│ └── system.code-workspace
├── configure.ac
├── doc
└── historic
│ ├── README
│ ├── index.html
│ ├── inner_core.png
│ ├── make_transaction.png
│ ├── multiple_currencies.png
│ ├── pluggable.png
│ ├── python_layer.png
│ ├── switching_nets.png
│ └── switching_serialisers.png
├── examples
└── main.cpp
├── include
└── bitcoin
│ ├── system.hpp
│ └── system
│ ├── allocator.hpp
│ ├── arena.hpp
│ ├── boost.hpp
│ ├── chain
│ ├── annex.hpp
│ ├── block.hpp
│ ├── chain.hpp
│ ├── chain_state.hpp
│ ├── checkpoint.hpp
│ ├── compact.hpp
│ ├── context.hpp
│ ├── enums
│ │ ├── coverage.hpp
│ │ ├── extension.hpp
│ │ ├── flags.hpp
│ │ ├── key_version.hpp
│ │ ├── magic_numbers.hpp
│ │ ├── numbers.hpp
│ │ ├── opcode.hpp
│ │ ├── policy.hpp
│ │ ├── script_pattern.hpp
│ │ ├── script_version.hpp
│ │ └── selection.hpp
│ ├── header.hpp
│ ├── input.hpp
│ ├── operation.hpp
│ ├── output.hpp
│ ├── point.hpp
│ ├── prevout.hpp
│ ├── script.hpp
│ ├── stripper.hpp
│ ├── taproot.hpp
│ ├── tapscript.hpp
│ ├── transaction.hpp
│ └── witness.hpp
│ ├── config
│ ├── base16.hpp
│ ├── base2.hpp
│ ├── base32.hpp
│ ├── base58.hpp
│ ├── base64.hpp
│ ├── base85.hpp
│ ├── block.hpp
│ ├── config.hpp
│ ├── hash160.hpp
│ ├── hash256.hpp
│ ├── header.hpp
│ ├── input.hpp
│ ├── output.hpp
│ ├── parameter.hpp
│ ├── parser.hpp
│ ├── point.hpp
│ ├── printer.hpp
│ ├── script.hpp
│ └── transaction.hpp
│ ├── constants.hpp
│ ├── constraints.hpp
│ ├── crypto
│ ├── aes256.hpp
│ ├── crypto.hpp
│ ├── der_parser.hpp
│ ├── pseudo_random.hpp
│ ├── ring_signature.hpp
│ └── secp256k1.hpp
│ ├── data
│ ├── array_cast.hpp
│ ├── byte_cast.hpp
│ ├── collection.hpp
│ ├── data.hpp
│ ├── data_array.hpp
│ ├── data_chunk.hpp
│ ├── data_reference.hpp
│ ├── data_slab.hpp
│ ├── data_slice.hpp
│ ├── exclusive_slice.hpp
│ ├── external_ptr.hpp
│ ├── iterable.hpp
│ ├── memory.hpp
│ ├── no_fill_allocator.hpp
│ └── string.hpp
│ ├── define.hpp
│ ├── endian
│ ├── batch.hpp
│ ├── endian.hpp
│ ├── integers.hpp
│ ├── integrals.hpp
│ ├── minimal.hpp
│ ├── nominal.hpp
│ ├── stream.hpp
│ ├── swaps.hpp
│ ├── uintx_t.hpp
│ └── unsafe.hpp
│ ├── error
│ ├── block_error_t.hpp
│ ├── error.hpp
│ ├── error_t.hpp
│ ├── errorno_t.hpp
│ ├── macros.hpp
│ ├── op_error_t.hpp
│ ├── script_error_t.hpp
│ └── transaction_error_t.hpp
│ ├── exceptions.hpp
│ ├── execution.hpp
│ ├── filter
│ ├── bloom.hpp
│ ├── filter.hpp
│ ├── golomb.hpp
│ └── sieve.hpp
│ ├── forks.hpp
│ ├── funclets.hpp
│ ├── hash
│ ├── accumulator.hpp
│ ├── algorithm.hpp
│ ├── algorithms.hpp
│ ├── checksum.hpp
│ ├── functions.hpp
│ ├── hash.hpp
│ ├── hmac.hpp
│ ├── pbkd.hpp
│ ├── rmd
│ │ ├── algorithm.hpp
│ │ ├── rmd.hpp
│ │ ├── rmd128.hpp
│ │ └── rmd160.hpp
│ ├── scrypt.hpp
│ ├── sha
│ │ ├── algorithm.hpp
│ │ ├── sha.hpp
│ │ ├── sha160.hpp
│ │ ├── sha256.hpp
│ │ └── sha512.hpp
│ └── siphash.hpp
│ ├── have.hpp
│ ├── impl
│ ├── chain
│ │ ├── annex.ipp
│ │ ├── compact.ipp
│ │ ├── operation_patterns.ipp
│ │ ├── script_patterns.ipp
│ │ ├── tapscript.ipp
│ │ ├── transaction_patterns.ipp
│ │ └── witness_patterns.ipp
│ ├── data
│ │ ├── array_cast.ipp
│ │ ├── byte_cast.ipp
│ │ ├── collection.ipp
│ │ ├── data_array.ipp
│ │ ├── data_reference.ipp
│ │ ├── data_slab.ipp
│ │ ├── data_slice.ipp
│ │ ├── external_ptr.ipp
│ │ └── memory.ipp
│ ├── endian
│ │ ├── batch.ipp
│ │ ├── integers.ipp
│ │ ├── integrals.ipp
│ │ ├── minimal.ipp
│ │ ├── nominal.ipp
│ │ ├── stream.ipp
│ │ ├── swaps.ipp
│ │ ├── uintx_t.ipp
│ │ └── unsafe.ipp
│ ├── filter
│ │ ├── bloom.ipp
│ │ └── sieve.ipp
│ ├── hash
│ │ ├── accumulator.ipp
│ │ ├── checksum.ipp
│ │ ├── functions.ipp
│ │ ├── hmac.ipp
│ │ ├── pbkd.ipp
│ │ ├── rmd
│ │ │ └── algorithm.ipp
│ │ ├── scrypt.ipp
│ │ └── sha
│ │ │ ├── algorithm_compress.ipp
│ │ │ ├── algorithm_double.ipp
│ │ │ ├── algorithm_functions.ipp
│ │ │ ├── algorithm_iterate.ipp
│ │ │ ├── algorithm_konstant.ipp
│ │ │ ├── algorithm_merkle.ipp
│ │ │ ├── algorithm_midstate.ipp
│ │ │ ├── algorithm_native.ipp
│ │ │ ├── algorithm_padding.ipp
│ │ │ ├── algorithm_parsing.ipp
│ │ │ ├── algorithm_schedule.ipp
│ │ │ ├── algorithm_sigma.ipp
│ │ │ ├── algorithm_single.ipp
│ │ │ └── algorithm_stream.ipp
│ ├── machine
│ │ ├── interpreter.ipp
│ │ ├── interpreter_connect.ipp
│ │ ├── interpreter_run.ipp
│ │ ├── number_boolean.ipp
│ │ ├── number_chunk.ipp
│ │ ├── number_integer.ipp
│ │ ├── program.ipp
│ │ ├── program_construct.ipp
│ │ ├── program_sign.ipp
│ │ ├── stack.ipp
│ │ └── stack_variant.ipp
│ ├── math
│ │ ├── addition.ipp
│ │ ├── bits.ipp
│ │ ├── bytes.ipp
│ │ ├── byteswap.ipp
│ │ ├── cast.ipp
│ │ ├── division.ipp
│ │ ├── limits.ipp
│ │ ├── logarithm.ipp
│ │ ├── multiplication.ipp
│ │ ├── overflow.ipp
│ │ ├── power.ipp
│ │ ├── rotate.ipp
│ │ └── sign.ipp
│ ├── radix
│ │ ├── base_16.ipp
│ │ ├── base_2n.ipp
│ │ └── base_58.ipp
│ ├── serial
│ │ ├── deserialize.ipp
│ │ └── serialize.ipp
│ ├── stream
│ │ ├── device.ipp
│ │ ├── iostream
│ │ │ ├── iostream.ipp
│ │ │ ├── istream.ipp
│ │ │ └── ostream.ipp
│ │ └── streamers
│ │ │ ├── bit_reader.ipp
│ │ │ ├── bit_writer.ipp
│ │ │ ├── byte_reader.ipp
│ │ │ ├── byte_writer.ipp
│ │ │ ├── sha256_writer.ipp
│ │ │ ├── sha256t_writer.ipp
│ │ │ └── sha256x2_writer.ipp
│ ├── wallet
│ │ └── addresses
│ │ │ └── checked.ipp
│ └── words
│ │ ├── dictionaries.ipp
│ │ └── dictionary.ipp
│ ├── intrinsics
│ ├── byte_swap.hpp
│ ├── cpuid.hpp
│ ├── detection.hpp
│ ├── intel
│ │ ├── intel.hpp
│ │ ├── intel_128.hpp
│ │ ├── intel_256.hpp
│ │ ├── intel_512.hpp
│ │ └── intel_sha.hpp
│ ├── intrinsics.hpp
│ ├── neon
│ │ ├── neon.hpp
│ │ ├── neon_128.hpp
│ │ └── neon_sha.hpp
│ ├── none
│ │ ├── none_128.hpp
│ │ └── none_sha.hpp
│ ├── rotate.hpp
│ ├── sve
│ │ └── sve.hpp
│ └── types.hpp
│ ├── literals.hpp
│ ├── machine
│ ├── interpreter.hpp
│ ├── machine.hpp
│ ├── number.hpp
│ ├── number_boolean.hpp
│ ├── number_chunk.hpp
│ ├── number_integer.hpp
│ ├── program.hpp
│ └── stack.hpp
│ ├── math
│ ├── addition.hpp
│ ├── bits.hpp
│ ├── bytes.hpp
│ ├── byteswap.hpp
│ ├── cast.hpp
│ ├── division.hpp
│ ├── functional.hpp
│ ├── limits.hpp
│ ├── logarithm.hpp
│ ├── math.hpp
│ ├── multiplication.hpp
│ ├── overflow.hpp
│ ├── power.hpp
│ ├── rotate.hpp
│ └── sign.hpp
│ ├── preprocessor.hpp
│ ├── radix
│ ├── base_10.hpp
│ ├── base_16.hpp
│ ├── base_2048.hpp
│ ├── base_2n.hpp
│ ├── base_32.hpp
│ ├── base_58.hpp
│ ├── base_64.hpp
│ ├── base_85.hpp
│ └── radix.hpp
│ ├── serial
│ ├── deserialize.hpp
│ ├── props.hpp
│ ├── serial.hpp
│ └── serialize.hpp
│ ├── settings.hpp
│ ├── stream
│ ├── binary.hpp
│ ├── device.hpp
│ ├── devices
│ │ ├── copy_sink.hpp
│ │ ├── copy_source.hpp
│ │ ├── flip_sink.hpp
│ │ └── push_sink.hpp
│ ├── iostream
│ │ ├── iostream.hpp
│ │ ├── istream.hpp
│ │ └── ostream.hpp
│ ├── make_stream.hpp
│ ├── make_streamer.hpp
│ ├── stream.hpp
│ ├── stream_result.hpp
│ ├── streamers.hpp
│ ├── streamers
│ │ ├── bit_flipper.hpp
│ │ ├── bit_reader.hpp
│ │ ├── bit_writer.hpp
│ │ ├── byte_flipper.hpp
│ │ ├── byte_reader.hpp
│ │ ├── byte_writer.hpp
│ │ ├── interfaces
│ │ │ ├── bitflipper.hpp
│ │ │ ├── bitreader.hpp
│ │ │ ├── bitwriter.hpp
│ │ │ ├── byteflipper.hpp
│ │ │ ├── bytereader.hpp
│ │ │ └── bytewriter.hpp
│ │ ├── sha256_writer.hpp
│ │ ├── sha256t_writer.hpp
│ │ └── sha256x2_writer.hpp
│ └── streams.hpp
│ ├── typelets.hpp
│ ├── types.hpp
│ ├── unicode
│ ├── ascii.hpp
│ ├── code_points.hpp
│ ├── conversion.hpp
│ ├── normalization.hpp
│ ├── unicode.hpp
│ └── utf8_everywhere
│ │ ├── console_streambuf.hpp
│ │ ├── environment.hpp
│ │ ├── ifstream.hpp
│ │ ├── ofstream.hpp
│ │ ├── paths.hpp
│ │ ├── stdio.hpp
│ │ ├── unicode_istream.hpp
│ │ ├── unicode_ostream.hpp
│ │ ├── unicode_streambuf.hpp
│ │ └── utf8_everywhere.hpp
│ ├── version.hpp
│ ├── wallet
│ ├── addresses
│ │ ├── bitcoin_uri.hpp
│ │ ├── checked.hpp
│ │ ├── payment_address.hpp
│ │ ├── qr_code.hpp
│ │ ├── stealth_address.hpp
│ │ ├── stealth_receiver.hpp
│ │ ├── stealth_sender.hpp
│ │ ├── tiff.hpp
│ │ ├── uri.hpp
│ │ ├── uri_reader.hpp
│ │ └── witness_address.hpp
│ ├── context.hpp
│ ├── keys
│ │ ├── ec_point.hpp
│ │ ├── ec_private.hpp
│ │ ├── ec_public.hpp
│ │ ├── ec_scalar.hpp
│ │ ├── ek_private.hpp
│ │ ├── ek_public.hpp
│ │ ├── ek_token.hpp
│ │ ├── encrypted_keys.hpp
│ │ ├── hd_private.hpp
│ │ ├── hd_public.hpp
│ │ ├── mini_keys.hpp
│ │ └── stealth.hpp
│ ├── message.hpp
│ ├── mnemonics
│ │ ├── electrum.hpp
│ │ ├── electrum_v1.hpp
│ │ └── mnemonic.hpp
│ ├── neutrino.hpp
│ ├── point_value.hpp
│ ├── points_value.hpp
│ └── wallet.hpp
│ ├── warnings.hpp
│ └── words
│ ├── catalogs
│ ├── electrum.hpp
│ ├── electrum_v1.hpp
│ └── mnemonic.hpp
│ ├── dictionaries.hpp
│ ├── dictionary.hpp
│ ├── language.hpp
│ ├── languages.hpp
│ └── words.hpp
├── install-cmake.sh
├── install-cmakepresets.sh
├── install.sh
├── libbitcoin-system-test_runner.sh
├── libbitcoin-system.pc.in
├── m4
├── .gitignore
├── ax_boost_base.m4
├── ax_boost_chrono.m4
├── ax_boost_date_time.m4
├── ax_boost_filesystem.m4
├── ax_boost_iostreams.m4
├── ax_boost_json.m4
├── ax_boost_locale.m4
├── ax_boost_program_options.m4
├── ax_boost_regex.m4
├── ax_boost_system.m4
├── ax_boost_thread.m4
├── ax_boost_unit_test_framework.m4
├── ax_check_compile_flag.m4
├── ax_check_link_flag.m4
├── ax_check_preproc_flag.m4
├── ax_cxx_compile_stdcxx.m4
└── ax_pthread.m4
├── src
├── arena.cpp
├── chain
│ ├── block.cpp
│ ├── chain_state.cpp
│ ├── checkpoint.cpp
│ ├── context.cpp
│ ├── enums
│ │ └── opcode.cpp
│ ├── header.cpp
│ ├── input.cpp
│ ├── operation.cpp
│ ├── output.cpp
│ ├── point.cpp
│ ├── script.cpp
│ ├── script_extract.cpp
│ ├── taproot.cpp
│ ├── transaction.cpp
│ ├── transaction_cache.cpp
│ ├── transaction_sighash.cpp
│ ├── transaction_sighash_v0.cpp
│ ├── transaction_sighash_v1.cpp
│ ├── witness.cpp
│ └── witness_extract.cpp
├── config
│ ├── base16.cpp
│ ├── base2.cpp
│ ├── base32.cpp
│ ├── base58.cpp
│ ├── base64.cpp
│ ├── base85.cpp
│ ├── block.cpp
│ ├── hash160.cpp
│ ├── hash256.cpp
│ ├── header.cpp
│ ├── input.cpp
│ ├── output.cpp
│ ├── parameter.cpp
│ ├── parser.cpp
│ ├── point.cpp
│ ├── printer.cpp
│ ├── script.cpp
│ └── transaction.cpp
├── crypto
│ ├── aes256.cpp
│ ├── der_parser.cpp
│ ├── ec_context.cpp
│ ├── ec_context.hpp
│ ├── pseudo_random.cpp
│ ├── ring_signature.cpp
│ └── secp256k1.cpp
├── data
│ ├── data_chunk.cpp
│ └── string.cpp
├── define.cpp
├── endian
│ └── endian.cpp
├── error
│ ├── block_error_t.cpp
│ ├── error_t.cpp
│ ├── errorno_t.cpp
│ ├── op_error_t.cpp
│ ├── script_error_t.cpp
│ └── transaction_error_t.cpp
├── filter
│ └── golomb.cpp
├── hash
│ ├── accumulator.cpp
│ ├── checksum.cpp
│ └── siphash.cpp
├── math
│ └── math.cpp
├── radix
│ ├── base_10.cpp
│ ├── base_2048.cpp
│ ├── base_32.cpp
│ ├── base_58.cpp
│ ├── base_64.cpp
│ └── base_85.cpp
├── serial
│ └── props.cpp
├── settings.cpp
├── stream
│ └── binary.cpp
├── unicode
│ ├── ascii.cpp
│ ├── code_points.cpp
│ ├── conversion.cpp
│ ├── normalization.cpp
│ └── utf8_everywhere
│ │ ├── console_streambuf.cpp
│ │ ├── environment.cpp
│ │ ├── ifstream.cpp
│ │ ├── ofstream.cpp
│ │ ├── paths.cpp
│ │ ├── stdio.cpp
│ │ ├── unicode_istream.cpp
│ │ ├── unicode_ostream.cpp
│ │ └── unicode_streambuf.cpp
├── wallet
│ ├── addresses
│ │ ├── bitcoin_uri.cpp
│ │ ├── payment_address.cpp
│ │ ├── qr_code.cpp
│ │ ├── qrencode
│ │ │ ├── bitstream.c
│ │ │ ├── bitstream.h
│ │ │ ├── mask.c
│ │ │ ├── mask.h
│ │ │ ├── mmask.c
│ │ │ ├── mmask.h
│ │ │ ├── mqrspec.c
│ │ │ ├── mqrspec.h
│ │ │ ├── qrencode.c
│ │ │ ├── qrencode.h
│ │ │ ├── qrencode_inner.h
│ │ │ ├── qrinput.c
│ │ │ ├── qrinput.h
│ │ │ ├── qrspec.c
│ │ │ ├── qrspec.h
│ │ │ ├── rsecc.c
│ │ │ ├── rsecc.h
│ │ │ ├── split.c
│ │ │ └── split.h
│ │ ├── stealth_address.cpp
│ │ ├── stealth_receiver.cpp
│ │ ├── stealth_sender.cpp
│ │ ├── tiff.cpp
│ │ ├── uri.cpp
│ │ └── witness_address.cpp
│ ├── context.cpp
│ ├── keys
│ │ ├── ec_point.cpp
│ │ ├── ec_private.cpp
│ │ ├── ec_public.cpp
│ │ ├── ec_scalar.cpp
│ │ ├── ek_private.cpp
│ │ ├── ek_public.cpp
│ │ ├── ek_token.cpp
│ │ ├── encrypted_keys.cpp
│ │ ├── hd_private.cpp
│ │ ├── hd_public.cpp
│ │ ├── mini_keys.cpp
│ │ ├── parse_encrypted_keys
│ │ │ ├── parse_encrypted_key.hpp
│ │ │ ├── parse_encrypted_key.ipp
│ │ │ ├── parse_encrypted_prefix.hpp
│ │ │ ├── parse_encrypted_prefix.ipp
│ │ │ ├── parse_encrypted_private.cpp
│ │ │ ├── parse_encrypted_private.hpp
│ │ │ ├── parse_encrypted_public.cpp
│ │ │ ├── parse_encrypted_public.hpp
│ │ │ ├── parse_encrypted_token.cpp
│ │ │ └── parse_encrypted_token.hpp
│ │ └── stealth.cpp
│ ├── message.cpp
│ ├── mnemonics
│ │ ├── electrum.cpp
│ │ ├── electrum_v1.cpp
│ │ └── mnemonic.cpp
│ ├── neutrino.cpp
│ ├── point_value.cpp
│ └── points_value.cpp
└── words
│ ├── catalogs
│ ├── electrum.cpp
│ ├── electrum_v1.cpp
│ └── mnemonic.cpp
│ └── languages.cpp
└── test
├── .gitignore
├── allocator.cpp
├── arena.cpp
├── chain
├── annex.cpp
├── block.cpp
├── block_malleable.cpp
├── chain_state.cpp
├── checkpoint.cpp
├── compact.cpp
├── context.cpp
├── enums
│ └── opcode.cpp
├── header.cpp
├── input.cpp
├── operation.cpp
├── output.cpp
├── point.cpp
├── satoshi_words.cpp
├── script.cpp
├── script.hpp
├── stripper.cpp
├── taproot.cpp
├── tapscript.cpp
├── transaction.cpp
└── witness.cpp
├── config
├── base16.cpp
├── base2.cpp
├── base32.cpp
├── base58.cpp
├── base64.cpp
├── base85.cpp
├── block.cpp
├── hash256.cpp
├── parameter.cpp
└── printer.cpp
├── constants.cpp
├── constraints.cpp
├── crypto
├── aes256.cpp
├── elliptic_curve.cpp
├── pseudo_random.cpp
└── ring_signature.cpp
├── data
├── array_cast.cpp
├── byte_cast.cpp
├── collection.cpp
├── data_array.cpp
├── data_chunk.cpp
├── data_reference.cpp
├── data_slab.cpp
├── data_slice.cpp
├── exclusive_slice.cpp
├── external_ptr.cpp
├── integer.cpp
├── iterable.cpp
├── memory.cpp
├── no_fill_allocator.cpp
└── string.cpp
├── define.cpp
├── endian
├── batch.cpp
├── integers.cpp
├── integrals.cpp
├── minimal.cpp
├── nominal.cpp
├── stream.cpp
├── swaps.cpp
├── uintx_t.cpp
└── unsafe.cpp
├── error
├── block_error_t.cpp
├── error.cpp
├── error_t.cpp
├── errorno_t.cpp
├── op_error_t.cpp
├── script_error_t.cpp
└── transaction_error_t.cpp
├── filter
├── bloom.cpp
├── golomb.cpp
└── sieve.cpp
├── funclets.cpp
├── hacks.cpp
├── hash
├── accumulator.cpp
├── checksum.cpp
├── functions.cpp
├── hash.hpp
├── hmac.cpp
├── pbkd.cpp
├── performance
│ ├── baseline
│ │ ├── byteswap.h
│ │ ├── common.h
│ │ ├── endian.h
│ │ ├── rmd160.cpp
│ │ ├── rmd160.h
│ │ ├── sha256.cpp
│ │ └── sha256.h
│ ├── performance.cpp
│ └── performance.hpp
├── rmd
│ ├── algorithm.cpp
│ └── analysis.cpp
├── scrypt.cpp
├── sha
│ ├── algorithm.cpp
│ ├── analysis.cpp
│ ├── sha160.cpp
│ ├── sha256.cpp
│ ├── sha512.cpp
│ └── vector.cpp
├── siphash.cpp
└── siphash.hpp
├── intrinsics
├── byte_swap.cpp
├── cpuid.cpp
├── detection.cpp
├── intel_128.cpp
├── intel_256.cpp
├── intel_512.cpp
├── platforms
│ ├── intel.cpp
│ ├── neon.cpp
│ └── sve.cpp
├── rotate.cpp
└── types.cpp
├── literals.cpp
├── machine
├── interpreter.cpp
├── number.cpp
├── program.cpp
├── sizing.cpp
└── stack.cpp
├── main.cpp
├── math
├── addition.cpp
├── bits.cpp
├── bytes.cpp
├── byteswap.cpp
├── cast.cpp
├── division.cpp
├── limits.cpp
├── logarithm.cpp
├── multiplication.cpp
├── overflow.cpp
├── power.cpp
├── rotate.cpp
└── sign.cpp
├── radix
├── base_10.cpp
├── base_16.cpp
├── base_2048.cpp
├── base_2n.cpp
├── base_32.cpp
├── base_58.cpp
├── base_64.cpp
└── base_85.cpp
├── serial
├── deserialize.cpp
├── props.cpp
└── serialize.cpp
├── settings.cpp
├── stream
├── binary.cpp
├── device.cpp
├── devices
│ ├── copy_sink.cpp
│ ├── copy_source.cpp
│ ├── flip_sink.cpp
│ └── push_sink.cpp
├── iostream
│ ├── iostream.cpp
│ ├── istream.cpp
│ └── ostream.cpp
├── stream.cpp
├── streamers.cpp
└── streamers
│ ├── bit_flipper.cpp
│ ├── bit_reader.cpp
│ ├── bit_writer.cpp
│ ├── byte_flipper.cpp
│ ├── byte_reader.cpp
│ ├── byte_writer.cpp
│ ├── sha256_writer.cpp
│ ├── sha256t_writer.cpp
│ └── sha256x2_writer.cpp
├── test.cpp
├── test.hpp
├── typelets.cpp
├── types.cpp
├── unicode
├── ascii.cpp
├── code_points.cpp
├── conversion.cpp
├── normalization.cpp
└── utf8_everywhere
│ ├── environment.cpp
│ ├── ifstream.cpp
│ ├── ofstream.cpp
│ ├── unicode_istream.cpp
│ └── unicode_ostream.cpp
├── utreexo
├── utreexo.cpp
└── utreexo.hpp
├── wallet
├── addresses
│ ├── bitcoin_uri.cpp
│ ├── checked.cpp
│ ├── payment_address.cpp
│ ├── qr_code.cpp
│ ├── stealth_address.cpp
│ ├── stealth_receiver.cpp
│ ├── stealth_sender.cpp
│ ├── tiff.cpp
│ ├── uri.cpp
│ ├── uri_reader.cpp
│ └── witness_address.cpp
├── context.cpp
├── keys
│ ├── ec_point.cpp
│ ├── ec_private.cpp
│ ├── ec_public.cpp
│ ├── ec_scalar.cpp
│ ├── encrypted_keys.cpp
│ ├── hd_private.cpp
│ ├── hd_public.cpp
│ ├── mini_keys.cpp
│ └── stealth.cpp
├── message.cpp
├── mnemonics
│ ├── electrum.cpp
│ ├── electrum.hpp
│ ├── electrum_v1.cpp
│ ├── electrum_v1.hpp
│ ├── mnemonic.cpp
│ └── mnemonic.hpp
├── neutrino.cpp
├── point_value.cpp
└── points_value.cpp
└── words
├── catalogs
├── electrum.cpp
├── electrum.hpp
├── electrum_v1.cpp
├── electrum_v1.hpp
├── mnemonic.cpp
└── mnemonic.hpp
├── dictionaries.cpp
├── dictionaries.hpp
├── dictionary.cpp
├── dictionary.hpp
├── languages.cpp
└── languages.hpp
/.gitignore:
--------------------------------------------------------------------------------
1 | .deps
2 | .libs
3 | *.la
4 | *.lo
5 | *.o
6 | *.pyc
7 | Makefile
8 | Makefile.in
9 | libbitcoin.pc
10 |
11 | bin
12 | obj
13 | build
14 | .*.swp
15 | *~
16 | /*.kdev4
17 | /.cproject
18 | /.project
19 | /.settings
20 | /nbproject
21 |
22 | /aclocal.m4
23 | /autom4te.cache
24 | /build-aux
25 | /config.*
26 | /configure
27 | /libtool
28 | .dirstamp
29 | /.vs
30 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "(gdb) Launch",
9 | "type": "cppdbg",
10 | "request": "launch",
11 | "program": "${workspaceFolder}/obj/nix-gnu-debug-static-without_icu/libbitcoin-system-test",
12 | "args": [],
13 | "stopAtEntry": false,
14 | "cwd": "${workspaceFolder}/obj/nix-gnu-debug-static-without_icu",
15 | "environment": [],
16 | "externalConsole": false,
17 | "MIMode": "gdb",
18 | "setupCommands": [
19 | {
20 | "description": "Enable pretty-printing for gdb",
21 | "text": "-enable-pretty-printing",
22 | "ignoreFailures": true
23 | },
24 | {
25 | "description": "Set Disassembly Flavor to Intel",
26 | "text": "-gdb-set disassembly-flavor intel",
27 | "ignoreFailures": true
28 | }
29 | ]
30 | }
31 | ]
32 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cmake.sourceDirectory": "${workspaceFolder}/builds/cmake",
3 | "cmake.useCMakePresets": "always"
4 | }
5 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "type": "cmake",
6 | "label": "CMake: build",
7 | "command": "build",
8 | "targets": [
9 | "bitcoin-system",
10 | "libbitcoin-system-examples",
11 | "libbitcoin-system-test"
12 | ],
13 | "preset": "${command:cmake.activeBuildPresetName}",
14 | "group": "build",
15 | "problemMatcher": [],
16 | "detail": "CMake template build task"
17 | },
18 | {
19 | "type": "cmake",
20 | "label": "CMake: clean",
21 | "command": "clean",
22 | "preset": "${command:cmake.activeBuildPresetName}",
23 | "problemMatcher": [],
24 | "detail": "CMake template clean task"
25 | },
26 | {
27 | "type": "cmake",
28 | "label": "CMake: install",
29 | "command": "install",
30 | "preset": "${command:cmake.activeBuildPresetName}",
31 | "problemMatcher": [],
32 | "detail": "CMake template install task"
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | commits libbitcoin developers
2 | --------------------------------------------
3 | 2572 Eric Voskuil (evoskuil)
4 | 1256 Amir Taaki (genjix)
5 | 196 Phillip Mienk (pmienk)
6 | 90 William Swanson (swansontec)
7 | 50 Neill Miller (thecodefactory)
8 | 39 Kamil Domański (kdomanski)
9 | 26 Patrick Strateman (phantomcircuit)
10 | 25 Pablo Castellano (pablog)
11 | 19 Yarvis Hatsa
12 | 11 Robert Williamson (bobalot)
13 | 9 RojavaCrypto
14 | 5 Noel Maersk (veox)
15 | 4 Jan Engelhardt
16 | 4 Peter Hille
17 | 2 Shawn David Pringle
18 | 2 mlmikael
19 | 2 Jake Hickey (shunyata)
20 | 1 Alexander Regueiro
21 | 1 Andy Weidenbaum
22 | 1 Bardi Harborow
23 | 1 Ben Holden-Crowther
24 | 1 Chang Lan
25 | 1 Dave Huseby
26 | 1 Dimitri John Ledkov
27 | 1 Jaromil
28 | 1 Kevin Johnson
29 | 1 Omid Aladini
30 | 1 Rafał Krupiński
31 | 1 Lucas Betschart (lclc)
32 |
--------------------------------------------------------------------------------
/ChangeLog:
--------------------------------------------------------------------------------
1 | Use command 'git log --oneline --decorate' for latest change log.
2 |
--------------------------------------------------------------------------------
/NEWS:
--------------------------------------------------------------------------------
1 | See https://libbitcoin.org
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | See README.md
--------------------------------------------------------------------------------
/autogen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ###############################################################################
3 | # Copyright (c) 2014-2025 libbitcoin-system developers (see COPYING).
4 | #
5 | # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
6 | #
7 | ###############################################################################
8 |
9 | autoreconf -i
10 |
--------------------------------------------------------------------------------
/builds/cmake/modules/FindDl.cmake:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2014-2025 libbitcoin developers (see COPYING).
3 | #
4 | ###############################################################################
5 | # Finddl
6 | #
7 | # Use this module by invoking find_package with the form::
8 | #
9 | # find_package( dl
10 | # [REQUIRED] # Fail with error if dl is not found
11 | # )
12 | #
13 | # Defines the following for use:
14 | #
15 | # dl_FOUND - True if headers and requested libraries were found
16 | # dl_LIBRARIES - dl libraries to be linked
17 | # dl_LIBS - dl libraries to be linked
18 | #
19 |
20 | if (DEFINED dl_FIND_VERSION)
21 | message( SEND_ERROR "Library 'dl' unable to process specified version: ${dl_FIND_VERSION}" )
22 | endif()
23 |
24 | if (MSVC)
25 | message( STATUS "MSVC environment detection for 'dl' not currently supported." )
26 | set( dl_FOUND false )
27 | else ()
28 | # required
29 | if ( dl_FIND_REQUIRED )
30 | set( _dl_REQUIRED "REQUIRED" )
31 | endif()
32 |
33 | find_library(dl_LIBRARIES dl)
34 |
35 | if (dl_LIBRARIES-NOTFOUND)
36 | set( dl_FOUND false )
37 | else ()
38 | set( dl_FOUND true )
39 | set( dl_LIBS "-ldl" )
40 | endif()
41 | endif()
42 |
43 | if ( dl_FIND_REQUIRED AND ( NOT dl_FOUND ) )
44 | message( SEND_ERROR "Library 'dl' not found." )
45 | endif()
46 |
--------------------------------------------------------------------------------
/builds/cmake/modules/FindRt.cmake:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2014-2025 libbitcoin developers (see COPYING).
3 | #
4 | ###############################################################################
5 | # Findrt
6 | #
7 | # Use this module by invoking find_package with the form::
8 | #
9 | # find_package( rt
10 | # [REQUIRED] # Fail with error if rt is not found
11 | # )
12 | #
13 | # Defines the following for use:
14 | #
15 | # rt_FOUND - True if headers and requested libraries were found
16 | # rt_LIBRARIES - rt libraries to be linked
17 | # rt_LIBS - rt libraries to be linked
18 | #
19 |
20 | if (DEFINED rt_FIND_VERSION)
21 | message( SEND_ERROR
22 | "Library 'rt' unable to process version: ${rt_FIND_VERSION}" )
23 | endif()
24 |
25 | if (MSVC)
26 | message( STATUS
27 | "MSVC environment detection for rt not currently supported." )
28 |
29 | set( rt_FOUND false )
30 | elseif (ANDROID)
31 | message( STATUS
32 | "ANDROID enviornment detection for rt skipped, provided by libc." )
33 |
34 | set( rt_FOUND true )
35 | else ()
36 | # required
37 | if ( rt_FIND_REQUIRED )
38 | set( _rt_REQUIRED "REQUIRED" )
39 | endif()
40 |
41 | find_library(rt_LIBRARIES rt)
42 |
43 | if (rt_LIBRARIES-NOTFOUND)
44 | set( rt_FOUND false )
45 | else ()
46 | set( rt_FOUND true )
47 | set( rt_LIBS "-lrt" )
48 | endif()
49 | endif()
50 |
51 | if ( rt_FIND_REQUIRED AND ( NOT rt_FOUND ) )
52 | message( SEND_ERROR "Library 'rt' not found." )
53 | endif()
54 |
--------------------------------------------------------------------------------
/builds/msvc/.gitignore:
--------------------------------------------------------------------------------
1 | *.bin
2 | *.json
3 | *.suo
4 | *.opensdf
5 | *.sdf
6 | *.log
7 | *.aps
8 | *.user
9 | *.ipch
10 | *.VC.*
11 | *.vsidx
12 |
--------------------------------------------------------------------------------
/builds/msvc/build/build_all.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | CALL nuget_all.bat
3 | ECHO.
4 | CALL build_base.bat vs2022 libbitcoin-system "Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build"
5 | CALL build_base.bat vs2019 libbitcoin-system "Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build"
6 | CALL build_base.bat vs2017 libbitcoin-system "Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
7 | REM CALL build_base.bat vs2015 libbitcoin-system "Microsoft Visual Studio 14.0\VC"
8 | REM CALL build_base.bat vs2013 libbitcoin-system "Microsoft Visual Studio 12.0\VC"
9 | PAUSE
10 |
--------------------------------------------------------------------------------
/builds/msvc/build/build_base.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | REM Usage: [buildbase.bat vs2017 libbitcoin "Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"]
3 | REM Usage: [buildbase.bat vs2015 libbitcoin "Microsoft Visual Studio 14.0\VC"]
4 | REM Usage: [buildbase.bat vs2013 libbitcoin "Microsoft Visual Studio 12.0\VC"]
5 |
6 | SET studio=%1
7 | SET project=%2
8 | SET version=%~3
9 |
10 | SET log=%studio%.log
11 | SET solution=..\%studio%\%project%.sln
12 | SET tools=%version%\vcvarsall.bat
13 | SET environment=%programfiles(x86)%\%tools%
14 |
15 | IF NOT EXIST "%environment%" SET environment=%programfiles%\%tools%
16 | IF NOT EXIST "%environment%" GOTO no_tools
17 |
18 | ECHO Building: %solution%
19 |
20 | CALL "%environment%" x86 > nul
21 | ECHO Platform=x86
22 |
23 | ECHO Configuration=StaticDebug
24 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log%
25 | IF errorlevel 1 GOTO error
26 | ECHO Configuration=StaticRelease
27 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
28 | IF errorlevel 1 GOTO error
29 |
30 | CALL "%environment%" x86_amd64 > nul
31 | ECHO Platform=x64
32 |
33 | ECHO Configuration=StaticDebug
34 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
35 | IF errorlevel 1 GOTO error
36 | ECHO Configuration=StaticRelease
37 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
38 | IF errorlevel 1 GOTO error
39 |
40 | ECHO Complete: %solution%
41 | GOTO end
42 |
43 | :error
44 | ECHO *** ERROR, build terminated early, see: %log%
45 | GOTO end
46 |
47 | :no_tools
48 | ECHO *** ERROR, build tools not found: %tools%
49 |
50 | :end
51 |
52 |
--------------------------------------------------------------------------------
/builds/msvc/build/nuget_all.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | ECHO Downloading libbitcoin vs2022 dependencies from NuGet
3 | CALL nuget.exe install ..\vs2022\libbitcoin-system\packages.config
4 | CALL nuget.exe install ..\vs2022\libbitcoin-system-examples\packages.config
5 | CALL nuget.exe install ..\vs2022\libbitcoin-system-test\packages.config
6 | ECHO.
7 | ECHO Downloading libbitcoin vs2019 dependencies from NuGet
8 | CALL nuget.exe install ..\vs2019\libbitcoin-system\packages.config
9 | CALL nuget.exe install ..\vs2019\libbitcoin-system-examples\packages.config
10 | CALL nuget.exe install ..\vs2019\libbitcoin-system-test\packages.config
11 | ECHO.
12 | ECHO Downloading libbitcoin vs2017 dependencies from NuGet
13 | CALL nuget.exe install ..\vs2017\libbitcoin-system\packages.config
14 | CALL nuget.exe install ..\vs2017\libbitcoin-system-examples\packages.config
15 | CALL nuget.exe install ..\vs2017\libbitcoin-system-test\packages.config
16 |
--------------------------------------------------------------------------------
/builds/msvc/debug.natvis:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 | { m_backend }
13 |
14 |
15 |
16 |
17 | { m_data }
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/builds/msvc/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Arm.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>ARM32 Settings
6 |
7 |
8 |
9 |
10 |
13 | WIN32;_WIN32;_ARM_;%(PreprocessorDefinitions)
14 |
15 |
16 | MachineARM
17 |
18 |
19 | /MACHINE:ARM %(AdditionalOptions)
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Arm64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>ARM64 Settings
6 |
7 |
8 |
9 |
10 |
13 | WIN32;_WIN32;_ARM64;%(PreprocessorDefinitions)
14 |
15 |
16 | MachineARM64
17 |
18 |
19 | /MACHINE:ARM64 %(AdditionalOptions)
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DLL.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Dynamic Library
6 | dynamic
7 | .dll
8 |
9 |
10 |
11 |
12 | _DLL;_WINDLL;%(PreprocessorDefinitions)
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Debug.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | <_PropertySheetDisplayName>Debug Settings
10 | Debug
11 |
12 |
13 |
14 |
15 |
16 | EnableFastChecks
17 | ProgramDatabase
18 | true
19 | true
20 | Disabled
21 | _DEBUG;%(PreprocessorDefinitions)
22 |
23 |
24 | _DEBUG;%(PreprocessorDefinitions)
25 |
26 |
27 | true
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugDEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Debug Dynamic
6 | dynamic
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreadedDebugDLL
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugDLL.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Dynamic Debug Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreadedDebugDLL
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugLEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Debug Link Time Code Generation
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreadedDebug
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugLIB.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Static Debug Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreadedDebug
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugLTCG.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Static Debug Link Time Code Generation Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreadedDebug
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/DebugSEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Debug Static
6 | static
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreadedDebug
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/EXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Application
6 | true
7 |
8 |
9 |
10 |
11 | _CONSOLE;%(PreprocessorDefinitions)
12 |
13 |
14 | Console
15 |
16 |
17 |
--------------------------------------------------------------------------------
/builds/msvc/properties/LIB.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Static Library
6 | static
7 | .lib
8 |
9 |
10 |
11 |
12 | _LIB;%(PreprocessorDefinitions)
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/builds/msvc/properties/LTCG.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Link Time Code Generation Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Link.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Link Time Code Generation Settings
6 | ltcg
7 |
8 |
9 |
10 |
11 | true
12 |
13 |
14 | UseLinkTimeCodeGeneration
15 |
16 |
17 | true
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Messages.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Build Messages
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Output.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Output Settings
6 |
7 | $(ProjectDir)..\..\
8 | $(ProjectDir)..\..\..\..\
9 | $(ProjectDir)..\..\..\..\..\
10 | $(ProjectDir)..\..\..\..\bin\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\
11 | $(ProjectDir)..\..\..\..\obj\$(TargetName)\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\
12 | $(OutDir)
13 | $(TargetName)
14 | $(TargetDir)$(TargetName)$(TargetExt)
15 |
16 |
17 |
18 |
19 | $(OutDir)$(TargetName).lib
20 |
21 |
22 | $(OutDir)$(TargetName).log
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseDEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Release Dynamic
6 | dynamic
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreadedDLL
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseDLL.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Dynamic Release Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreadedDLL
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseLEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Release Link Time Code Generation
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreaded
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseLIB.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Static Release Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreaded
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseLTCG.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Static Release Link Time Code Generation Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | MultiThreaded
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/builds/msvc/properties/ReleaseSEXE.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>Console Release Static
6 | static
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | MultiThreaded
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/Win32.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>x86 Settings
6 |
7 |
8 |
9 |
10 | WIN32;_WIN32;%(PreprocessorDefinitions)
11 |
12 |
13 | MachineX86
14 |
15 |
16 | /MACHINE:X86 %(AdditionalOptions)
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/builds/msvc/properties/x64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <_PropertySheetDisplayName>x64 Settings
6 |
7 |
8 |
9 |
10 |
13 | WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions)
14 |
15 |
16 | MachineX64
17 |
18 |
19 | /MACHINE:X64 %(AdditionalOptions)
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/builds/msvc/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/builds/msvc/resource.h
--------------------------------------------------------------------------------
/builds/msvc/resource.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/builds/msvc/resource.rc
--------------------------------------------------------------------------------
/builds/msvc/vs2022/.vs/libbitcoin-system/FileContentIndex/.gitignore:
--------------------------------------------------------------------------------
1 | *.vsidx
2 | *.lock
3 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system-examples/libbitcoin-system-examples.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 | {B726DF7D-6D1D-48FB-0000-000000000001}
12 |
13 |
14 | {B726DF7D-6D1D-48FB-0000-000000000000}
15 |
16 |
17 |
18 |
19 | src
20 |
21 |
22 |
23 |
24 | resource
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | resource
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system-examples/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system-test/libbitcoin-system-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system-test/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system/libbitcoin-system.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
29 |
30 |
--------------------------------------------------------------------------------
/builds/msvc/vs2022/libbitcoin-system/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/builds/vscode/system.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "../../../libbitcoin-system"
5 | }
6 | ],
7 | "settings": {}
8 | }
9 |
--------------------------------------------------------------------------------
/doc/historic/README:
--------------------------------------------------------------------------------
1 | This is the historic founding document behind libbitcoin.
2 |
3 |
--------------------------------------------------------------------------------
/doc/historic/inner_core.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/inner_core.png
--------------------------------------------------------------------------------
/doc/historic/make_transaction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/make_transaction.png
--------------------------------------------------------------------------------
/doc/historic/multiple_currencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/multiple_currencies.png
--------------------------------------------------------------------------------
/doc/historic/pluggable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/pluggable.png
--------------------------------------------------------------------------------
/doc/historic/python_layer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/python_layer.png
--------------------------------------------------------------------------------
/doc/historic/switching_nets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/switching_nets.png
--------------------------------------------------------------------------------
/doc/historic/switching_serialisers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libbitcoin/libbitcoin-system/dc29f85c65c09cb14f322c7a308aefc537df2167/doc/historic/switching_serialisers.png
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/context.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_CONTEXT_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_CONTEXT_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 | namespace chain {
29 |
30 | class BC_API context final
31 | {
32 | public:
33 | /// Determine if the flag is active for this block.
34 | bool is_enabled(chain::flags flag) const NOEXCEPT;
35 |
36 | /// Header context within chain.
37 | uint32_t flags;
38 | uint32_t timestamp;
39 | uint32_t median_time_past;
40 | size_t height;
41 | uint32_t minimum_block_version;
42 | uint32_t work_required;
43 | };
44 |
45 | bool operator==(const context& left, const context& right) NOEXCEPT;
46 | bool operator!=(const context& left, const context& right) NOEXCEPT;
47 |
48 | } // namespace chain
49 | } // namespace system
50 | } // namespace libbitcoin
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/enums/extension.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_ENUMS_EXTENSION_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_ENUMS_EXTENSION_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 | namespace chain {
27 |
28 | /// An integer in range 0-127 used for indicating extensions are appended to
29 | /// the output of signature hash message [bip141].
30 | enum class extension : uint8_t
31 | {
32 | /// Undocumented, from Satoshi source.
33 | taproot = 0,
34 |
35 | /// We define the tapscript message extension ext to bip341 Common
36 | /// Signature Message, indicated by extension flag of 1 [bip342].
37 | tapscript = 1
38 | };
39 |
40 | } // namespace chain
41 | } // namespace system
42 | } // namespace libbitcoin
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/enums/key_version.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_ENUMS_KEY_VERSION_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_ENUMS_KEY_VERSION_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 | namespace chain {
27 |
28 | /// For future extensions that define unknown public key types, making sure
29 | /// signatures can't be moved from one key type to another [bip342].
30 | enum class key_version : uint8_t
31 | {
32 | /// Version of public keys in the tapscript signature opcode execution.
33 | tapscript = 0
34 | };
35 |
36 | } // namespace chain
37 | } // namespace system
38 | } // namespace libbitcoin
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/enums/policy.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_ENUMS_POLICIES_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_ENUMS_POLICIES_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace chain {
28 |
29 | /// Analog to chain::flags but without impacting validation. These provide
30 | /// additional validation context, giving a node the option to reject an
31 | /// unconfirmed transaction.
32 | enum policy : uint32_t
33 | {
34 | no_policy = 0,
35 |
36 | /// Mask to set all rule bits.
37 | all_policy = bit_all
38 | };
39 |
40 | } // namespace chain
41 | } // namespace system
42 | } // namespace libbitcoin
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/enums/script_version.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_ENUMS_SCRIPT_VERSION_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_ENUMS_SCRIPT_VERSION_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 | namespace chain {
27 |
28 | /// Script versions [bip141].
29 | enum class script_version
30 | {
31 | /// If the version byte is 0 (either P2WPKH or P2WSH or invalid) [bip141].
32 | segwit = 0,
33 |
34 | /// Taproot output is native segwit output with version number 1 [bip341].
35 | taproot = 1,
36 |
37 | /// All reserved script versions [2..16].
38 | reserved,
39 |
40 | /// All unversioned scripts.
41 | unversioned
42 | };
43 |
44 | } // namespace chain
45 | } // namespace system
46 | } // namespace libbitcoin
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/include/bitcoin/system/chain/enums/selection.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_ENUMS_SELECTION_HPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_ENUMS_SELECTION_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 | namespace chain {
27 |
28 | /// Network selection for settings construction.
29 | enum class selection
30 | {
31 | none,
32 | mainnet,
33 | testnet,
34 | regtest
35 | };
36 |
37 | } // namespace config
38 | } // namespace system
39 | } // namespace libbitcoin
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/base2.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_BASE2_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_BASE2_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for base2 encoded data.
30 | class BC_API base2 final
31 | {
32 | public:
33 | base2() NOEXCEPT;
34 | base2(binary&& value) NOEXCEPT;
35 | base2(const binary& value) NOEXCEPT;
36 | base2(const std::string& binary) THROWS;
37 |
38 | operator const binary&() const NOEXCEPT;
39 |
40 | friend std::istream& operator>>(std::istream& stream,
41 | base2& argument) THROWS;
42 | friend std::ostream& operator<<(std::ostream& stream,
43 | const base2& argument) NOEXCEPT;
44 |
45 | private:
46 | binary value_;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/base32.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_BASE32_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_BASE32_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for base32 encoded data.
30 | class BC_API base32 final
31 | {
32 | public:
33 | base32() NOEXCEPT;
34 | base32(data_chunk&& value) NOEXCEPT;
35 | base32(const data_chunk& value) NOEXCEPT;
36 | base32(const std::string& base32) THROWS;
37 |
38 | operator const data_chunk&() const NOEXCEPT;
39 |
40 | friend std::istream& operator>>(std::istream& stream,
41 | base32& argument) THROWS;
42 | friend std::ostream& operator<<(std::ostream& stream,
43 | const base32& argument) NOEXCEPT;
44 |
45 | private:
46 | data_chunk value_;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/base58.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_BASE58_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_BASE58_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for base58 encoded text.
30 | class BC_API base58 final
31 | {
32 | public:
33 | base58() NOEXCEPT;
34 | base58(data_chunk&& value) NOEXCEPT;
35 | base58(const data_chunk& value) NOEXCEPT;
36 | base58(const std::string& base58) THROWS;
37 |
38 | operator const data_chunk&() const NOEXCEPT;
39 |
40 | friend std::istream& operator>>(std::istream& stream,
41 | base58& argument) THROWS;
42 | friend std::ostream& operator<<(std::ostream& stream,
43 | const base58& argument) NOEXCEPT;
44 |
45 | private:
46 | data_chunk value_;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/base64.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_BASE64_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_BASE64_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for base64 encoded data.
30 | class BC_API base64 final
31 | {
32 | public:
33 | base64() NOEXCEPT;
34 | base64(data_chunk&& value) NOEXCEPT;
35 | base64(const data_chunk& value) NOEXCEPT;
36 | base64(const std::string& base64) THROWS;
37 |
38 | operator const data_chunk&() const NOEXCEPT;
39 |
40 | friend std::istream& operator>>(std::istream& stream,
41 | base64& argument) THROWS;
42 | friend std::ostream& operator<<(std::ostream& stream,
43 | const base64& argument) NOEXCEPT;
44 |
45 | private:
46 | data_chunk value_;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/block.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_BLOCK_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_BLOCK_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::block.
30 | class BC_API block final
31 | : public chain::block
32 | {
33 | public:
34 | block() NOEXCEPT;
35 | block(chain::block&& value) NOEXCEPT;
36 | block(const chain::block& value) NOEXCEPT;
37 | block(const std::string& base16) THROWS;
38 |
39 | std::string to_string() const NOEXCEPT;
40 |
41 | friend std::istream& operator>>(std::istream& stream,
42 | block& argument) THROWS;
43 | friend std::ostream& operator<<(std::ostream& stream,
44 | const block& argument) NOEXCEPT;
45 | };
46 |
47 | } // namespace config
48 | } // namespace system
49 | } // namespace libbitcoin
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/config.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_CONFIG_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_CONFIG_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/hash160.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_HASH160_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_HASH160_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for a bitcoin 160 bit hash.
30 | class BC_API hash160 final
31 | {
32 | public:
33 | hash160() NOEXCEPT;
34 | hash160(short_hash&& value) NOEXCEPT;
35 | hash160(const short_hash& value) NOEXCEPT;
36 | hash160(const std::string& base16) THROWS;
37 |
38 | operator const short_hash&() const NOEXCEPT;
39 |
40 | friend std::istream& operator>>(std::istream& stream,
41 | hash160& argument) THROWS;
42 | friend std::ostream& operator<<(std::ostream& stream,
43 | const hash160& argument) NOEXCEPT;
44 |
45 | private:
46 | short_hash value_;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/header.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_HEADER_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_HEADER_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::header.
30 | class BC_API header final
31 | : public chain::header
32 | {
33 | public:
34 | header() NOEXCEPT;
35 | header(chain::header&& value) NOEXCEPT;
36 | header(const chain::header& value) NOEXCEPT;
37 | header(const std::string& base16) THROWS;
38 |
39 | ////std::string to_string() const NOEXCEPT;
40 |
41 | friend std::istream& operator>>(std::istream& stream,
42 | header& argument) THROWS;
43 | friend std::ostream& operator<<(std::ostream& stream,
44 | const header& argument) NOEXCEPT;
45 | };
46 |
47 | } // namespace config
48 | } // namespace system
49 | } // namespace libbitcoin
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/input.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_INPUT_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_INPUT_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::input.
30 | class BC_API input final
31 | : public chain::input
32 | {
33 | public:
34 | input() NOEXCEPT;
35 | input(chain::input&& value) NOEXCEPT;
36 | input(const chain::input& value) NOEXCEPT;
37 | input(const std::string& tuple) THROWS;
38 |
39 | ////std::string to_string() const NOEXCEPT;
40 |
41 | friend std::istream& operator>>(std::istream& stream,
42 | input& argument) THROWS;
43 | friend std::ostream& operator<<(std::ostream& stream,
44 | const input& argument) NOEXCEPT;
45 | };
46 |
47 | } // namespace explorer
48 | } // namespace system
49 | } // namespace libbitcoin
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/output.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_OUTPUT_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_OUTPUT_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::output.
30 | class BC_API output final
31 | : public chain::output
32 | {
33 | public:
34 | output() NOEXCEPT;
35 | output(chain::output&& value) NOEXCEPT;
36 | output(const chain::output& value) NOEXCEPT;
37 | output(const std::string& tuple) THROWS;
38 |
39 | ////std::string to_string() const NOEXCEPT;
40 |
41 | friend std::istream& operator>>(std::istream& stream,
42 | output& argument) THROWS;
43 | friend std::ostream& operator<<(std::ostream& stream,
44 | const output& argument) NOEXCEPT;
45 | };
46 |
47 | } // namespace config
48 | } // namespace system
49 | } // namespace libbitcoin
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/point.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CONFIG_POINT_HPP
20 | #define LIBBITCOIN_SYSTEM_CONFIG_POINT_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::point.
30 | class BC_API point final
31 | : public chain::point
32 | {
33 | public:
34 | static const std::string delimiter;
35 |
36 | point() NOEXCEPT;
37 | point(chain::point&& value) NOEXCEPT;
38 | point(const chain::point& value) NOEXCEPT;
39 | point(const std::string& tuple) THROWS;
40 |
41 | ////std::string to_string() const NOEXCEPT;
42 |
43 | friend std::istream& operator>>(std::istream& stream,
44 | point& argument) THROWS;
45 | friend std::ostream& operator<<(std::ostream& stream,
46 | const point& argument) NOEXCEPT;
47 | };
48 |
49 | } // namespace config
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/config/transaction.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_TRANSACTION_HPP
20 | #define LIBBITCOIN_SYSTEM_TRANSACTION_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace config {
28 |
29 | /// Serialization helper for chain::script.
30 | class BC_API transaction final
31 | : public chain::transaction
32 | {
33 | public:
34 | transaction() NOEXCEPT;
35 | transaction(chain::transaction&& value) NOEXCEPT;
36 | transaction(const chain::transaction& value) NOEXCEPT;
37 | transaction(const std::string& base16) THROWS;
38 |
39 | ////std::string to_string() const NOEXCEPT;
40 |
41 | friend std::istream& operator>>(std::istream& stream,
42 | transaction& argument) THROWS;
43 | friend std::ostream& operator<<(std::ostream& stream,
44 | const transaction& argument) NOEXCEPT;
45 | };
46 |
47 | } // namespace config
48 | } // namespace system
49 | } // namespace libbitcoin
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/include/bitcoin/system/crypto/aes256.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CRYPTO_AES256_HPP
20 | #define LIBBITCOIN_SYSTEM_CRYPTO_AES256_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace aes256 {
28 |
29 | /// This is an implementation of AES256.
30 | /// NIST selected three members of the Rijndael family, each with a block
31 | /// size of 128 bits, but three different key lengths: 128, 192 and 256 bits.
32 |
33 | constexpr size_t block_size = bytes<128>;
34 | typedef data_array block;
35 |
36 | constexpr size_t secret_size = bytes<256>;
37 | typedef data_array secret;
38 |
39 | /// Perform aes256 encryption/decryption on a data block.
40 | void encrypt(block& bytes, const secret& key) NOEXCEPT;
41 | void decrypt(block& bytes, const secret& key) NOEXCEPT;
42 |
43 | } // namespace aes256
44 | } // namespace system
45 | } // namespace libbitcoin
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/include/bitcoin/system/crypto/crypto.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CRYPTO_CRYPTO_HPP
20 | #define LIBBITCOIN_SYSTEM_CRYPTO_CRYPTO_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/include/bitcoin/system/data/data.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_DATA_DATA_HPP
20 | #define LIBBITCOIN_SYSTEM_DATA_DATA_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/include/bitcoin/system/endian/endian.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_ENDIAN_ENDIAN_HPP
20 | #define LIBBITCOIN_SYSTEM_ENDIAN_ENDIAN_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | // integers ->
33 | // integrals ->
34 | // swaps ->
35 | // stream -> swaps
36 | // unsafe -> swaps
37 | // batch -> swaps
38 | // nominal -> swaps, integers, integrals,
39 | // uintx_t -> nominal, minimal
40 | // minimal -> integers
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/include/bitcoin/system/error/error.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_ERROR_ERROR_HPP
20 | #define LIBBITCOIN_SYSTEM_ERROR_ERROR_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | namespace libbitcoin {
33 | namespace system {
34 |
35 | using code = std::error_code;
36 |
37 | } // namespace system
38 | } // namespace libbitcoin
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/include/bitcoin/system/filter/filter.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_FILTER_FILTER_HPP
20 | #define LIBBITCOIN_SYSTEM_FILTER_FILTER_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/include/bitcoin/system/hash/algorithm.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_HASH_ALGORITHM_HPP
20 | #define LIBBITCOIN_SYSTEM_HASH_ALGORITHM_HPP
21 |
22 | namespace libbitcoin {
23 | namespace system {
24 |
25 | /// For algorithm common type constraint.
26 | struct algorithm_t{};
27 |
28 | } // namespace system
29 | } // namespace libbitcoin
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/include/bitcoin/system/hash/algorithms.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_HASH_ALGORITHMS_HPP
20 | #define LIBBITCOIN_SYSTEM_HASH_ALGORITHMS_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | using rmd128 = rmd::algorithm>;
30 | using rmd128_256 = rmd::algorithm>; // not fully implemented
31 | using rmd160 = rmd::algorithm>;
32 | using rmd160_320 = rmd::algorithm>; // not fully implemented
33 |
34 | /// bc::system sha algorithm aliases (compressed, vectorized, cached).
35 | using sha160 = sha::algorithm;
36 | using sha256_224 = sha::algorithm>;
37 | using sha256 = sha::algorithm>;
38 | using sha512_256 = sha::algorithm>;
39 | using sha512_224 = sha::algorithm>;
40 | using sha512_384 = sha::algorithm>;
41 | using sha512 = sha::algorithm>;
42 |
43 | } // namespace system
44 | } // namespace libbitcoin
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/include/bitcoin/system/hash/hash.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_HASH_HASH_HPP
20 | #define LIBBITCOIN_SYSTEM_HASH_HASH_HPP
21 |
22 | // algorithms is a group include for /sha and /rmd.
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/include/bitcoin/system/hash/siphash.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | // Sponsored in part by Digital Contract Design, LLC
21 |
22 | #ifndef LIBBITCOIN_SYSTEM_HASH_SIPHASH
23 | #define LIBBITCOIN_SYSTEM_HASH_SIPHASH
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | namespace libbitcoin {
32 | namespace system {
33 |
34 | typedef std::tuple siphash_key;
35 |
36 | BC_API uint64_t siphash(const siphash_key& key,
37 | const data_slice& message) NOEXCEPT;
38 | BC_API uint64_t siphash(const half_hash& hash,
39 | const data_slice& message) NOEXCEPT;
40 |
41 | constexpr siphash_key to_siphash_key(const half_hash& hash) NOEXCEPT
42 | {
43 | const auto part = split(hash);
44 | const auto hi = from_little_endian(part.first);
45 | const auto lo = from_little_endian(part.second);
46 | return std::make_tuple(hi, lo);
47 | }
48 |
49 | } // namespace system
50 | } // namespace libbitcoin
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/include/bitcoin/system/impl/chain/witness_patterns.ipp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_CHAIN_WITNESS_PATTERNS_IPP
20 | #define LIBBITCOIN_SYSTEM_CHAIN_WITNESS_PATTERNS_IPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace chain {
28 |
29 | BC_PUSH_WARNING(SMART_PTR_NOT_NEEDED)
30 | BC_PUSH_WARNING(NO_VALUE_OR_CONST_REF_SHARED_PTR)
31 |
32 | // static
33 | constexpr bool witness::is_push_size(const chunk_cptrs& stack) NOEXCEPT
34 | {
35 | return std::all_of(stack.begin(), stack.end(),
36 | [](const auto& element) NOEXCEPT
37 | {
38 | return element->size() <= max_push_data_size;
39 | });
40 | }
41 |
42 | // static
43 | constexpr bool witness::is_reserved_pattern(const chunk_cptrs& stack) NOEXCEPT
44 | {
45 | return is_one(stack.size()) && stack.front()->size() == hash_size;
46 | }
47 |
48 | BC_POP_WARNING()
49 | BC_POP_WARNING()
50 |
51 | } // namespace chain
52 | } // namespace system
53 | } // namespace libbitcoin
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/include/bitcoin/system/impl/data/external_ptr.ipp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_DATA_EXTERNAL_POINTER_IPP
20 | #define LIBBITCOIN_SYSTEM_DATA_EXTERNAL_POINTER_IPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 |
28 | } // namespace system
29 | } // namespace libbitcoin
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/include/bitcoin/system/impl/radix/base_58.ipp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_RADIX_BASE_58_IPP
20 | #define LIBBITCOIN_SYSTEM_RADIX_BASE_58_IPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | template
30 | bool decode_base58(data_array& out, const std::string& in) NOEXCEPT
31 | {
32 | data_chunk data{};
33 | if (!decode_base58(data, in) || (data.size() != Size))
34 | return false;
35 |
36 | std::copy(data.begin(), data.end(), out.begin());
37 | return true;
38 | }
39 |
40 | // TODO: determine if the sizing function is always accurate.
41 | template
42 | data_array base58_array(const char(&string)[Size]) NOEXCEPT
43 | {
44 | // log(58) / log(256), rounded up.
45 | data_array out{};
46 | if (!decode_base58(out, string))
47 | out.fill(0);
48 |
49 | return out;
50 | }
51 |
52 | } // namespace system
53 | } // namespace libbitcoin
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/include/bitcoin/system/intrinsics/intrinsics.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_INTRINSICS_INTRINSICS_HPP
20 | #define LIBBITCOIN_SYSTEM_INTRINSICS_INTRINSICS_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/include/bitcoin/system/intrinsics/neon/neon.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_INTRINSICS_NEON_HPP
20 | #define LIBBITCOIN_SYSTEM_INTRINSICS_NEON_HPP
21 |
22 | #include
23 |
24 | #if defined(HAVE_NEON)
25 | #include
26 | #endif // HAVE_NEON
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/include/bitcoin/system/intrinsics/none/none_sha.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_INTRINSICS_NONE_SHA_HPP
20 | #define LIBBITCOIN_SYSTEM_INTRINSICS_NONE_SHA_HPP
21 |
22 | #include
23 | #include
24 |
25 | #if !defined(HAVE_SHA)
26 |
27 | namespace libbitcoin {
28 | namespace system {
29 | namespace sha {
30 |
31 | INLINE void schedule(xint128_t&, xint128_t) NOEXCEPT
32 | {
33 | }
34 |
35 | INLINE void schedule(xint128_t&, xint128_t, xint128_t) NOEXCEPT
36 | {
37 | }
38 |
39 | INLINE void compress(xint128_t&, xint128_t&, xint128_t) NOEXCEPT
40 | {
41 | }
42 |
43 | INLINE void shuffle(xint128_t&, xint128_t&) NOEXCEPT
44 | {
45 | }
46 |
47 | INLINE void unshuffle(xint128_t&, xint128_t&) NOEXCEPT
48 | {
49 | }
50 |
51 | } // namespace sha
52 | } // namespace system
53 | } // namespace libbitcoin
54 |
55 | #endif // HAVE_SHA
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/include/bitcoin/system/intrinsics/sve/sve.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without any implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_INTRINSICS_SVE_HPP
20 | #define LIBBITCOIN_SYSTEM_INTRINSICS_SVE_HPP
21 |
22 | #include
23 |
24 | #if defined(HAVE_SVE)
25 | #include
26 | #endif // HAVE_SVE
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/include/bitcoin/system/machine/machine.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_MACHINE_MACHINE_HPP
20 | #define LIBBITCOIN_SYSTEM_MACHINE_MACHINE_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/include/bitcoin/system/machine/number.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_MACHINE_NUMBER_HPP
20 | #define LIBBITCOIN_SYSTEM_MACHINE_NUMBER_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace machine {
28 | namespace number {
29 |
30 | constexpr uint8_t positive_sign_byte = 0x00;
31 | constexpr uint8_t negative_sign_byte = to_negated(positive_sign_byte);
32 |
33 | } // namespace number
34 | } // namespace machine
35 | } // namespace system
36 | } // namespace libbitcoin
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/include/bitcoin/system/machine/number_chunk.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_MACHINE_NUMBER_CHUNK_HPP
20 | #define LIBBITCOIN_SYSTEM_MACHINE_NUMBER_CHUNK_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 | namespace machine {
29 | namespace number {
30 |
31 | class BC_API chunk
32 | {
33 | public:
34 | static inline data_chunk from_bool(bool vary) NOEXCEPT;
35 | static inline data_chunk from_integer(int64_t vary) NOEXCEPT;
36 | };
37 |
38 | } // namespace number
39 | } // namespace machine
40 | } // namespace system
41 | } // namespace libbitcoin
42 |
43 | #include
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/include/bitcoin/system/math/multiplication.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_MATH_MULTIPLICATION_HPP
20 | #define LIBBITCOIN_SYSTEM_MATH_MULTIPLICATION_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 |
27 | /// Safely determine whether product is a whole mutiple of value.
28 | template = true>
30 | constexpr bool is_multiple(Integer product, Integer value) NOEXCEPT;
31 |
32 | /// Safely determine whether product is left * right.
33 | template = true>
35 | constexpr bool is_product(Integer product, Integer left,
36 | Integer right) NOEXCEPT;
37 |
38 | /// Integer maximum if would overflow, otherwise the product.
39 | template = true>
41 | constexpr Unsigned ceilinged_multiply(Unsigned left, Unsigned right) NOEXCEPT;
42 |
43 | } // namespace system
44 | } // namespace libbitcoin
45 |
46 | #include
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/include/bitcoin/system/radix/base_64.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_RADIX_BASE_64_HPP
20 | #define LIBBITCOIN_SYSTEM_RADIX_BASE_64_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 |
28 | /// Encode data as base64.
29 | BC_API std::string encode_base64(const data_slice& unencoded) NOEXCEPT;
30 |
31 | /// Attempt to decode base64 data.
32 | /// False if the input contains non-base64 characters.
33 | BC_API bool decode_base64(data_chunk& out, const std::string& in) NOEXCEPT;
34 |
35 | } // namespace system
36 | } // namespace libbitcoin
37 |
38 | #endif
39 |
40 |
--------------------------------------------------------------------------------
/include/bitcoin/system/radix/base_85.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_RADIX_BASE_85_HPP
20 | #define LIBBITCOIN_SYSTEM_RADIX_BASE_85_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 |
28 | /// Encode data as base85 (Z85).
29 | /// False if the input is not of base85 size (% 4).
30 | BC_API bool encode_base85(std::string& out, const data_slice& in) NOEXCEPT;
31 |
32 | /// Attempt to decode base85 (Z85) data.
33 | /// False if the input contains non-base85 characters or length (% 5).
34 | BC_API bool decode_base85(data_chunk& out, const std::string& in) NOEXCEPT;
35 |
36 | } // namespace system
37 | } // namespace libbitcoin
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/include/bitcoin/system/radix/radix.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_RADIX_RADIX_HPP
20 | #define LIBBITCOIN_SYSTEM_RADIX_RADIX_HPP
21 |
22 | ////#include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/include/bitcoin/system/serial/serial.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_SERIAL_SERIAL_HPP
20 | #define LIBBITCOIN_SYSTEM_SERIAL_SERIAL_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/devices/flip_sink.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_STREAM_DEVICES_FLIP_SINK_HPP
20 | #define LIBBITCOIN_SYSTEM_STREAM_DEVICES_FLIP_SINK_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | /// Sink for ios::stream, copies bytes to/from Container.
30 | // The only derivation is override of copy_sink::category.
31 | // This allows copy_sink to avoid an unnecessary output_sequence invocation.
32 | template
33 | class flip_sink
34 | : public copy_sink
35 | {
36 | public:
37 | struct category
38 | : ios::seekable, ios::direct_tag
39 | {
40 | };
41 |
42 | using copy_sink::copy_sink;
43 | };
44 |
45 | } // namespace system
46 | } // namespace libbitcoin
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/make_stream.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_STREAM_MAKE_STREAM_HPP
20 | #define LIBBITCOIN_SYSTEM_STREAM_MAKE_STREAM_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 |
28 | template
29 | using make_stream = ios::stream;
30 |
31 | } // namespace system
32 | } // namespace libbitcoin
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/stream_result.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_STREAM_STREAM_RESULT_HPP
20 | #define LIBBITCOIN_SYSTEM_STREAM_STREAM_RESULT_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 |
27 | template
28 | Stream& stream_result(Stream& stream, bool success) NOEXCEPT
29 | {
30 | if (success)
31 | stream.clear(Stream::failbit);
32 | else
33 | stream.setstate(Stream::failbit);
34 |
35 | return stream;
36 | }
37 |
38 | } // namespace system
39 | } // namespace libbitcoin
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/streamers/interfaces/bitflipper.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITFLIPPER_HPP
20 | #define LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITFLIPPER_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | namespace libbitcoin {
28 | namespace system {
29 |
30 | /// A bit reader/writer interface.
31 | class bitflipper
32 | : public virtual bitreader,
33 | public virtual bitwriter,
34 | public virtual byteflipper
35 | {
36 | };
37 |
38 | } // namespace system
39 | } // namespace libbitcoin
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/streamers/interfaces/bitreader.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | // Sponsored in part by Digital Contract Design, LLC
21 |
22 | #ifndef LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITREADER_HPP
23 | #define LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITREADER_HPP
24 |
25 | #include
26 | #include
27 |
28 | namespace libbitcoin {
29 | namespace system {
30 |
31 | /// A bit reader interface.
32 | class bitreader
33 | : public virtual bytereader
34 | {
35 | public:
36 | /// Read one bit (high to low).
37 | virtual bool read_bit() NOEXCEPT = 0;
38 |
39 | /// Read size bits into an integer (high to low).
40 | virtual uint64_t read_bits(size_t bits) NOEXCEPT = 0;
41 |
42 | /// Advance the iterator.
43 | virtual void skip_bit() NOEXCEPT = 0;
44 | virtual void skip_bits(size_t bits) NOEXCEPT = 0;
45 |
46 | /// Rewind the iterator.
47 | virtual void rewind_bit() NOEXCEPT = 0;
48 | virtual void rewind_bits(size_t bits) NOEXCEPT = 0;
49 | };
50 |
51 | } // namespace system
52 | } // namespace libbitcoin
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/streamers/interfaces/bitwriter.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | // Sponsored in part by Digital Contract Design, LLC
21 |
22 | #ifndef LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITWRITER_HPP
23 | #define LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BITWRITER_HPP
24 |
25 | #include
26 | #include
27 |
28 | namespace libbitcoin {
29 | namespace system {
30 |
31 | /// A bit writer interface.
32 | class bitwriter
33 | : public virtual bytewriter
34 | {
35 | public:
36 | /// Write one bit (high to low).
37 | virtual void write_bit(bool value) NOEXCEPT = 0;
38 |
39 | /// Write size bits from an integer (high to low)
40 | virtual void write_bits(uint64_t value, size_t bits) NOEXCEPT = 0;
41 | };
42 |
43 | } // namespace system
44 | } // namespace libbitcoin
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/include/bitcoin/system/stream/streamers/interfaces/byteflipper.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BYTEFLIPPER_HPP
20 | #define LIBBITCOIN_SYSTEM_STREAM_STREAMERS_INTERFACES_BYTEFLIPPER_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | /// A byte reader/writer interface.
30 | class byteflipper
31 | : public virtual bytereader,
32 | public virtual bytewriter
33 | {
34 | };
35 |
36 | } // namespace system
37 | } // namespace libbitcoin
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/include/bitcoin/system/unicode/unicode.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_UNICODE_UNICODE_HPP
20 | #define LIBBITCOIN_SYSTEM_UNICODE_UNICODE_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/include/bitcoin/system/unicode/utf8_everywhere/ifstream.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_IFSTREAM_HPP
20 | #define LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_IFSTREAM_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | /// Use bc::system::ifstream in place of std::ifstream.
30 | /// This provides unicode and long path translation for Win32.
31 | class BC_API ifstream
32 | : public std::ifstream
33 | {
34 | public:
35 | /// This also opens the file.
36 | ifstream(const std::filesystem::path& path,
37 | std::ifstream::openmode mode=std::ifstream::in) THROWS;
38 | };
39 |
40 | } // namespace system
41 | } // namespace libbitcoin
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/include/bitcoin/system/unicode/utf8_everywhere/ofstream.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_OFSTREAM_HPP
20 | #define LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_OFSTREAM_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 |
29 | /// Use bc::system::ofstream in place of std::ofstream.
30 | /// This provides unicode and long path translation for Win32.
31 | class BC_API ofstream
32 | : public std::ofstream
33 | {
34 | public:
35 | /// This also opens the file.
36 | ofstream(const std::filesystem::path& path,
37 | std::ofstream::openmode mode=std::ofstream::out) THROWS;
38 | };
39 |
40 | } // namespace system
41 | } // namespace libbitcoin
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/include/bitcoin/system/unicode/utf8_everywhere/unicode_istream.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_UNICODE_ISTREAM_HPP
20 | #define LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_UNICODE_ISTREAM_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 |
27 | /// Class to expose a narrowing input stream.
28 | /// std::wcin must be patched by console_streambuf if used for Windows input.
29 | class BC_API unicode_istream
30 | : public std::istream
31 | {
32 | public:
33 | DELETE_COPY_MOVE(unicode_istream);
34 |
35 | /// Construct instance of a conditionally-narrowing input stream.
36 | unicode_istream(std::istream& narrow_stream, std::wistream& wide_stream,
37 | size_t wide_size) THROWS;
38 |
39 | /// Delete the unicode_streambuf that wraps wide_stream.
40 | virtual ~unicode_istream() NOEXCEPT;
41 | };
42 |
43 | } // namespace system
44 | } // namespace libbitcoin
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/include/bitcoin/system/unicode/utf8_everywhere/unicode_ostream.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_UNICODE_OSTREAM_HPP
20 | #define LIBBITCOIN_SYSTEM_UNICODE_UTF8_EVERYWHERE_UNICODE_OSTREAM_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 |
27 | /// Class to expose a widening output stream.
28 | class BC_API unicode_ostream
29 | : public std::ostream
30 | {
31 | public:
32 | DELETE_COPY_MOVE(unicode_ostream);
33 |
34 | /// Construct instance of a conditionally-widening output stream.
35 | unicode_ostream(std::ostream& narrow_stream, std::wostream& wide_stream,
36 | size_t wide_size) THROWS;
37 |
38 | /// Delete the unicode_streambuf that wraps wide_stream.
39 | virtual ~unicode_ostream() NOEXCEPT;
40 | };
41 |
42 | } // namespace system
43 | } // namespace libbitcoin
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/include/bitcoin/system/version.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // Copyright (c) 2014-2025 libbitcoin-system developers (see COPYING).
3 | //
4 | // GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
5 | //
6 | ///////////////////////////////////////////////////////////////////////////////
7 | #ifndef LIBBITCOIN_SYSTEM_VERSION_HPP
8 | #define LIBBITCOIN_SYSTEM_VERSION_HPP
9 |
10 | /**
11 | * The semantic version of this repository as: [major].[minor].[patch]
12 | * For interpretation of the versioning scheme see: http://semver.org
13 | */
14 |
15 | #define LIBBITCOIN_SYSTEM_VERSION "4.0.0"
16 | #define LIBBITCOIN_SYSTEM_MAJOR_VERSION 4
17 | #define LIBBITCOIN_SYSTEM_MINOR_VERSION 0
18 | #define LIBBITCOIN_SYSTEM_PATCH_VERSION 0
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/include/bitcoin/system/wallet/addresses/tiff.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WALLET_ADDRESSES_TIFF_HPP
20 | #define LIBBITCOIN_SYSTEM_WALLET_ADDRESSES_TIFF_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 |
28 | /// Convert a data chunk to a black on white tiff file.
29 | class BC_API tiff
30 | {
31 | public:
32 | /// The image bit stream is stored at the end of the file.
33 | /// This is the file offset in bytes to the start of the image data.
34 | static uint32_t image_offset;
35 |
36 | /// The maximal image data size is 0xffffffff.
37 | /// The last byte of each image row may contain padding.
38 | static size_t max_image_bytes;
39 |
40 | /// False if width parameter is inconsistent with data size.
41 | /// Each row is padded to a whole byte, all rows are the same length.
42 | static bool to_image(std::ostream& out, const data_chunk& data,
43 | uint16_t width) NOEXCEPT;
44 | };
45 |
46 | } // namespace system
47 | } // namespace libbitcoin
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/include/bitcoin/system/wallet/keys/mini_keys.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WALLET_KEYS_MINI_KEYS_HPP
20 | #define LIBBITCOIN_SYSTEM_WALLET_KEYS_MINI_KEYS_HPP
21 |
22 | #include
23 | #include
24 |
25 | namespace libbitcoin {
26 | namespace system {
27 | namespace wallet {
28 |
29 | /// Convert Cascasius minikey to secret parameter.
30 | BC_API bool minikey_to_secret(ec_secret& out_secret,
31 | const std::string& key) NOEXCEPT;
32 |
33 | } // namespace wallet
34 | } // namespace system
35 | } // namespace libbitcoin
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/include/bitcoin/system/words/catalogs/electrum.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WORDS_CATALOGS_ELECTRUM_HPP
20 | #define LIBBITCOIN_SYSTEM_WORDS_CATALOGS_ELECTRUM_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 | namespace words {
29 | namespace electrum {
30 |
31 | typedef words::dictionary<2048> catalog;
32 |
33 | // TODO: these are static initializations.
34 |
35 | extern const catalog::words& en;
36 | extern const catalog::words& es;
37 | extern const catalog::words& it;
38 | extern const catalog::words& fr;
39 | extern const catalog::words& cs;
40 | extern const catalog::words& pt;
41 | extern const catalog::words& ja;
42 | extern const catalog::words& ko;
43 | extern const catalog::words& zh_Hans;
44 | extern const catalog::words& zh_Hant;
45 |
46 | typedef words::dictionaries<10, catalog::size()> catalogs;
47 |
48 | } // namespace electrum
49 | } // namespace words
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/words/catalogs/electrum_v1.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WORDS_CATALOGS_ELECTRUM_V1_HPP
20 | #define LIBBITCOIN_SYSTEM_WORDS_CATALOGS_ELECTRUM_V1_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 | namespace words {
29 | namespace electrum_v1 {
30 |
31 | typedef words::dictionary<1626> catalog;
32 |
33 | extern const catalog::words en;
34 | extern const catalog::words pt;
35 |
36 | typedef words::dictionaries<2, catalog::size()> catalogs;
37 |
38 | } // namespace electrum_v1
39 | } // namespace words
40 | } // namespace system
41 | } // namespace libbitcoin
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/include/bitcoin/system/words/catalogs/mnemonic.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WORDS_CATALOGS_MNEMONIC_HPP
20 | #define LIBBITCOIN_SYSTEM_WORDS_CATALOGS_MNEMONIC_HPP
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace libbitcoin {
27 | namespace system {
28 | namespace words {
29 | namespace mnemonic {
30 |
31 | typedef words::dictionary<2048> catalog;
32 |
33 | // TODO: these are static initializations.
34 |
35 | extern const catalog::words en;
36 | extern const catalog::words es;
37 | extern const catalog::words it;
38 | extern const catalog::words fr;
39 | extern const catalog::words cs;
40 | extern const catalog::words pt;
41 | extern const catalog::words ja;
42 | extern const catalog::words ko;
43 | extern const catalog::words zh_Hans;
44 | extern const catalog::words zh_Hant;
45 |
46 | typedef words::dictionaries<10, catalog::size()> catalogs;
47 |
48 | } // namespace mnemonic
49 | } // namespace words
50 | } // namespace system
51 | } // namespace libbitcoin
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/include/bitcoin/system/words/language.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WORDS_LANGUAGE_HPP
20 | #define LIBBITCOIN_SYSTEM_WORDS_LANGUAGE_HPP
21 |
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 |
27 | typedef enum class language
28 | {
29 | en,
30 | es,
31 | it,
32 | fr,
33 | cs,
34 | pt,
35 | ja,
36 | ko,
37 | zh_Hans,
38 | zh_Hant,
39 | none
40 | } language;
41 |
42 | } // namespace system
43 | } // namespace libbitcoin
44 |
45 | namespace std
46 | {
47 | template<>
48 | struct hash
49 | {
50 | size_t operator()(const bc::system::language& value) const NOEXCEPT
51 | {
52 | return std::hash{}(static_cast(value));
53 | }
54 | };
55 | } // namespace std
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/include/bitcoin/system/words/words.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #ifndef LIBBITCOIN_SYSTEM_WORDS_WORDS_HPP
20 | #define LIBBITCOIN_SYSTEM_WORDS_WORDS_HPP
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/libbitcoin-system-test_runner.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ###############################################################################
3 | # Copyright (c) 2014-2025 libbitcoin-system developers (see COPYING).
4 | #
5 | # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
6 | #
7 | ###############################################################################
8 |
9 | # Define tests and options.
10 | #==============================================================================
11 | BOOST_UNIT_TEST_OPTIONS=\
12 | "--run_test=* "\
13 | "--log_level=warning "\
14 | "--show_progress=no "\
15 | "--detect_memory_leak=0 "\
16 | "--report_level=no "\
17 | "--build_info=yes"
18 |
19 |
20 | # Run tests.
21 | #==============================================================================
22 | # ALlow CI to send errors to standard output
23 | if [[ $CI == true ]]; then
24 | ./test/libbitcoin-system-test ${BOOST_UNIT_TEST_OPTIONS}
25 | else
26 | ./test/libbitcoin-system-test ${BOOST_UNIT_TEST_OPTIONS} > test.log
27 | fi
28 |
--------------------------------------------------------------------------------
/libbitcoin-system.pc.in:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2014-2025 libbitcoin-system developers (see COPYING).
3 | #
4 | # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
5 | #
6 | ###############################################################################
7 |
8 | # Substitutions
9 | #==============================================================================
10 | prefix=@prefix@
11 | exec_prefix=@exec_prefix@
12 | libdir=@libdir@
13 | includedir=@includedir@
14 |
15 |
16 | # Metadata
17 | #==============================================================================
18 | Name: libbitcoin-system
19 | Description: Bitcoin Cross-Platform C++ Development Toolkit
20 | URL: https://github.com/libbitcoin/libbitcoin-system
21 | Version: @PACKAGE_VERSION@
22 |
23 |
24 | # Variables
25 | #==============================================================================
26 | # Dependencies that publish package configuration.
27 | #------------------------------------------------------------------------------
28 | Requires: @icu_i18n_PKG@ libsecp256k1 >= 0.1.0.20
29 |
30 | # Include directory and any other required compiler flags.
31 | #------------------------------------------------------------------------------
32 | Cflags: -I${includedir} @icu@ @avx2@ @avx512@ @shani@ @sse41@ @boost_CPPFLAGS@ @pthread_CPPFLAGS@
33 |
34 | # Lib directory, lib and any required that do not publish pkg-config.
35 | #------------------------------------------------------------------------------
36 | Libs: -L${libdir} -lbitcoin-system @boost_LDFLAGS@ @boost_iostreams_LIBS@ @boost_locale_LIBS@ @boost_program_options_LIBS@ @boost_thread_LIBS@ @pthread_LIBS@ @rt_LIBS@ @dl_LIBS@
37 |
38 |
--------------------------------------------------------------------------------
/m4/.gitignore:
--------------------------------------------------------------------------------
1 | /libtool.m4
2 | /lt*.m4
3 |
--------------------------------------------------------------------------------
/src/chain/context.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #include
20 |
21 | #include
22 | #include
23 |
24 | namespace libbitcoin {
25 | namespace system {
26 | namespace chain {
27 |
28 | bool context::is_enabled(chain::flags flag) const NOEXCEPT
29 | {
30 | return to_bool(flag & flags);
31 | }
32 |
33 | bool operator==(const context& left, const context& right) NOEXCEPT
34 | {
35 | return left.flags == right.flags
36 | && left.timestamp == right.timestamp
37 | && left.median_time_past == right.median_time_past
38 | && left.height == right.height
39 | && left.minimum_block_version == right.minimum_block_version
40 | && left.work_required == right.work_required;
41 | }
42 |
43 | bool operator!=(const context& left, const context& right) NOEXCEPT
44 | {
45 | return !(left == right);
46 | }
47 |
48 | } // namespace chain
49 | } // namespace system
50 | } // namespace libbitcoin
51 |
--------------------------------------------------------------------------------
/src/endian/endian.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #include
20 |
21 | // This is a maintainer file to force rebuild of /system/endian only.
22 |
23 | namespace libbitcoin {
24 | namespace system {
25 |
26 | } // namespace system
27 | } // namespace libbitcoin
28 |
--------------------------------------------------------------------------------
/src/error/error_t.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
3 | *
4 | * This file is part of libbitcoin.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | */
19 | #include
20 |
21 | #include