### Install go-bindings Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/go-bindings/README.md Install the BLS signatures Go library using go get. ```bash go get github.com/dashpay/bls-signatures/go-bindings ``` -------------------------------- ### Check Installation with CMake Source: https://github.com/dashpay/dash/blob/develop/src/secp256k1/doc/release-process.md Verify installation using CMake by building, installing, and then compiling and running an example program. This ensures the library is correctly installed and usable when built with CMake. ```shell dir=$(mktemp -d) build=$(mktemp -d) cmake -B $build -DCMAKE_INSTALL_PREFIX=$dir && cmake --build $build --target install && ls -l $dir/include $dir/lib* gcc -o ecdsa examples/ecdsa.c -I $dir/include -L $dir/lib*/ -l secp256k1 -Wl,-rpath,"$dir/lib",-rpath,"$dir/lib64" && ./ecdsa ``` -------------------------------- ### Check Installation with Autotools Source: https://github.com/dashpay/dash/blob/develop/src/secp256k1/doc/release-process.md Verify installation using autotools by building, installing, and then compiling and running an example program. This ensures the library is correctly installed and usable. ```shell dir=$(mktemp -d) ./autogen.sh && ./configure --prefix=$dir && make clean && make install && ls -l $dir/include $dir/lib gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=$dir/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"$dir/lib" && ./ecdsa ``` -------------------------------- ### Setup and Build Dash Core on Arch Linux (Command Line) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs necessary packages on Arch Linux and builds the command-line version of Dash Core. ```sh pacman --sync --needed autoconf automake boost gcc git libbacktrace libevent libtool make pkgconf python sqlite git clone https://github.com/dashpay/dash.git cd dash/ ./autogen.sh ./configure make check ./src/dashd ``` -------------------------------- ### Install Dash Core executables on Windows drive Source: https://github.com/dashpay/dash/blob/develop/doc/build-windows.md Copies the compiled Dash Core executables to a specified directory on the Windows drive, mimicking the structure of the release .zip archive. This example installs to 'c:\workspace\dash'. ```bash make install DESTDIR=/mnt/c/workspace/dash ``` -------------------------------- ### Install Guix Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Install Guix after building. ```bash sudo make install ``` -------------------------------- ### Compile Usage Examples Source: https://github.com/dashpay/dash/blob/develop/src/secp256k1/README.md To compile usage examples, configure the build with `--enable-examples`. Specific examples like Schnorr and ECDH may require additional module flags. ```bash ./configure --enable-examples # For Schnorr and ECDH examples: ./configure --enable-examples --enable-module-schnorrsig --enable-module-ecdh ``` -------------------------------- ### Install Atom Packages for Development Source: https://github.com/dashpay/dash/blob/develop/src/crc32c/README.md Installs recommended Atom editor packages for C/C++ development, including autocompletion, building, and linting tools. This is an optional setup step. ```bash apm install autocomplete-clang build build-cmake clang-format language-cmake \ linter linter-clang ``` -------------------------------- ### Install Qt Creator on Ubuntu/Debian Source: https://github.com/dashpay/dash/blob/develop/src/qt/README.md Install the Qt Creator IDE on Ubuntu and Debian-based systems using apt-get. ```sh sudo apt-get install qtcreator ``` -------------------------------- ### Build Immer Example Executables Source: https://github.com/dashpay/dash/blob/develop/src/immer/example/CMakeLists.txt Globally finds all .cpp files for Immer examples, creates an executable for each, adds them as dependencies to the 'examples' target, sets their output names, links them to 'immer-dev', and registers them as tests. ```cmake file(GLOB_RECURSE immer_examples "*.cpp") foreach(_file IN LISTS immer_examples) immer_target_name_for(_target _output "${_file}") add_executable(${_target} EXCLUDE_FROM_ALL "${_file}") add_dependencies(examples ${_target}) set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_output}) target_link_libraries(${_target} PUBLIC immer-dev) add_test("example/${_output}" ${_output}) endforeach() ``` -------------------------------- ### Install libqrencode (Optional) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs the libqrencode development library, which is optional for QR code generation. ```sh sudo apt-get install libqrencode-dev ``` -------------------------------- ### Manage Guix Daemon Service (Source Install) Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Stop and disable the original Guix daemon service, then enable and start the newly pulled Guix daemon service when Guix is built from source. ```shell systemctl stop guix-daemon-original systemctl disable guix-daemon-original systemctl enable guix-daemon systemctl start guix-daemon ``` -------------------------------- ### Install CI Requirements on Ubuntu Source: https://github.com/dashpay/dash/blob/develop/ci/README.md Installs necessary packages like Docker and QEMU for running CI tests on Ubuntu. Ensure Docker is installed before running. ```bash sudo apt install docker.io bash qemu-user-static ``` -------------------------------- ### Install USDT Dependencies Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs the SystemTap Static Defined Tracing (SDT) development package. ```sh sudo apt install systemtap-sdt-dev ``` -------------------------------- ### Install .NET Core SDK on Ubuntu 20.04 Source: https://github.com/dashpay/dash/blob/develop/doc/fuzzing.md Installs the .NET Core SDK required for Eclipser. ```shell wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt-get update sudo apt-get install -y dotnet-sdk-2.1 ``` -------------------------------- ### Install Runtime Dependencies (Fedora) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs libevent and boost development libraries required for building. ```sh sudo dnf install libevent-devel boost-devel ``` -------------------------------- ### Build and Install CMake Packages Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Build and install packages using CMake. Ensure CMakeLists.txt exists. ```bash mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX= sudo cmake --build . --target install ``` -------------------------------- ### Install ZMQ Development Package (Fedora) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs the ZeroMQ development package to enable the ZMQ API. ```sh sudo dnf install zeromq-devel ``` -------------------------------- ### Display All Configuration Options Source: https://github.com/dashpay/dash/blob/develop/doc/build-osx.md Run this command to see a comprehensive list of available configuration options for the build process. ```bash ./configure -help ``` -------------------------------- ### Install Qt for GUI Source: https://github.com/dashpay/dash/blob/develop/doc/build-osx.md Installs the Qt framework version 5, required for compiling the Dash Core GUI. Skip if not using the GUI. ```bash brew install qt@5 ``` -------------------------------- ### Copy Example Configuration File (Linux) Source: https://github.com/dashpay/dash/blob/develop/doc/dash-conf.md This command shows how to copy an example configuration file to the default Dash data directory on Linux. This is a common step after compiling to set up a new configuration. ```bash # example copy command for linux user cp contrib/debian/examples/dash.conf ~/.dashcore ``` -------------------------------- ### Install You-Complete-Me for Atom Source: https://github.com/dashpay/dash/blob/develop/src/crc32c/README.md Installs the 'you-complete-me' package for Atom, which offers advanced code completion. This requires additional setup for the ycmd server as per its documentation. ```bash apm install autocomplete-plus build build-cmake clang-format language-cmake \ linter you-complete-me ``` -------------------------------- ### Example: Get Lint Failure Logs Source: https://github.com/dashpay/dash/blob/develop/CLAUDE.md An example demonstrating how to retrieve logs for a specific GitHub Actions job that resulted in a linting failure, identified by its job ID. ```bash # gh api repos/dashpay/dash/actions/jobs/46274126203/logs ``` -------------------------------- ### Start Dash Core with Tor Proxy and Onion-Only Network Source: https://github.com/dashpay/dash/blob/develop/doc/tor.md Example of starting Dash Core when the Tor proxy is running on localhost:9050, configured to only allow .onion nodes and disable listening. ```bash ./dashd -onion=127.0.0.1:9050 -onlynet=onion -listen=0 -addnode=ssapp53tmftyjmjb.onion ``` -------------------------------- ### Install Qt5 for GUI Source: https://github.com/dashpay/dash/blob/develop/doc/build-freebsd.md Installs the Qt5 framework, which is necessary for compiling the graphical user interface of Dash Core. Skip if the GUI is not intended to be used. ```bash pkg install qt5 ``` -------------------------------- ### Example Usage of Guile Bindings Source: https://github.com/dashpay/dash/blob/develop/src/immer/extra/guile/README.rst This snippet demonstrates basic usage of the Immer Guile bindings. Ensure the library is installed and loaded in your Guile environment. ```scheme (define ivec (intro/start)) (define ivec-u32 (intro/start-u32)) (define ivec-append (intro/start-append)) (define ivec-map (intro/start-map)) ``` -------------------------------- ### Find and Link mimalloc with CMake Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/depends/mimalloc/docs/using.html Use CMake to find an installed mimalloc library and link it to your application. This example shows how to link with the shared library. ```cmake find_package(mimalloc 2.1 REQUIRED) target_link_libraries(myapp PUBLIC mimalloc) ``` -------------------------------- ### Install Qt5 for Dash Core GUI on OpenBSD Source: https://github.com/dashpay/dash/blob/develop/doc/build-openbsd.md Installs the Qt5 framework, which is required to compile the graphical user interface for Dash Core. Run as root. ```bash pkg_add qt5 ``` -------------------------------- ### Build LevelDB for POSIX Source: https://github.com/dashpay/dash/blob/develop/src/leveldb/README.md Quick start commands to build LevelDB using CMake on POSIX systems. Ensure you are in a build directory and have CMake installed. ```bash mkdir -p build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . ``` -------------------------------- ### Example Compilation and Execution Source: https://github.com/dashpay/dash/blob/develop/src/minisketch/README.md Compile and run the minisketch example C code. This demonstrates how to link against the minisketch library and execute the reconciliation process. ```bash $ gcc -std=c99 -Wall -Wextra -o example ./doc/example.c -Lsrc/ -lminisketch -lstdc++ && ./example ``` -------------------------------- ### Link with Static mimalloc using CMake Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/depends/mimalloc/docs/using.html Use CMake to find an installed mimalloc library and link it to your application. This example shows how to link with the static library. ```cmake find_package(mimalloc 2.1 REQUIRED) target_link_libraries(myapp PUBLIC mimalloc-static) ``` -------------------------------- ### Build Dependencies with Options Source: https://github.com/dashpay/dash/blob/develop/depends/README.md Demonstrates how to pass options to the make command to customize the dependency build process. For example, disabling the wallet dependencies. ```bash make NO_WALLET=1 ``` -------------------------------- ### Quickstart Fuzzing with afl++ Source: https://github.com/dashpay/dash/blob/develop/doc/fuzzing.md Clone Dash Core and afl++ repositories, then prepare afl++ for source-only fuzzing. ```sh git clone https://github.com/dashpay/dash cd dash/ git clone https://github.com/AFLplusplus/AFLplusplus make -C AFLplusplus/ source-only ./autogen.sh ``` -------------------------------- ### Get Blockheaders Source: https://github.com/dashpay/dash/blob/develop/doc/REST-interface.md Retrieves a specified number of blockheaders in upward direction starting from a given block hash. Returns empty if the block doesn't exist or is not in the active chain. ```APIDOC ## GET /rest/headers/.?count= ### Description Given a block hash, returns amount of blockheaders in upward direction. Returns empty if the block doesn't exist or it isn't in the active chain. *Deprecated (but not removed) since 23.0:* `GET /rest/headers//.` ### Method GET ### Endpoint /rest/headers/.(bin|hex|json)?count= ``` -------------------------------- ### Minject Command-Line Help Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/depends/mimalloc/bin/readme.md Displays the available options and usage instructions for the minject command-line tool. Use this to understand how to inject mimalloc DLLs into executables. ```bash > minject --help minject: Injects the mimalloc dll into the import table of a 64-bit executable, and/or ensures that it comes first in het import table. usage: > minject [options] options: -h --help show this help -v --verbose be verbose -l --list only list imported modules -i --inplace update the exe in-place (make sure there is a backup!) -f --force always overwrite without prompting --postfix=

use

as a postfix to the mimalloc dll. e.g. use --postfix=debug to link with mimalloc-debug.dll notes: Without '--inplace' an injected is generated with the same name ending in '-mi'. Ensure 'mimalloc-redirect.dll' is in the same folder as the mimalloc dll. examples: > minject --list myprogram.exe > minject --force --inplace myprogram.exe ``` -------------------------------- ### Get Balance from Specific Wallet via JSON-RPC Source: https://context7.com/dashpay/dash/llms.txt Example of retrieving the balance from a specific wallet when multiple wallets are loaded. The wallet name is appended to the RPC endpoint URL. ```sh # Multi-wallet: balance from a specific wallet curl --user alice:supersecretpassword \ --data-binary '{"jsonrpc":"1.0","id":"3","method":"getbalance","params":[]}' \ -H 'content-type: application/json;' \ http://127.0.0.1:9998/wallet/mywallet ``` -------------------------------- ### Get Current Block Count via JSON-RPC Source: https://context7.com/dashpay/dash/llms.txt Example of fetching the current block count using `curl` with positional parameters. Ensure correct RPC credentials and endpoint are used. ```sh # Get current block count — positional params curl --user alice:supersecretpassword \ --data-binary '{"jsonrpc":"1.0","id":"1","method":"getblockcount","params":[]}' \ -H 'content-type: application/json;' \ http://127.0.0.1:9998/ # Response: # {"result":2045812,"error":null,"id":"1"} ``` -------------------------------- ### Fetch All Sources Source: https://github.com/dashpay/dash/blob/develop/depends/README.md Run 'make download' to fetch all source code required for building without initiating the build process. ```makefile make download ``` -------------------------------- ### Get Block Headers via REST API Source: https://context7.com/dashpay/dash/llms.txt Fetches a specified number of block headers starting from a given block hash using the REST interface. Useful for tracking blockchain progress. ```bash # Get up to 5 blockheaders starting at a given hash curl "http://127.0.0.1:19998/rest/headers/${HASH}.json?count=5" | python3 -m json.tool ``` -------------------------------- ### Manage Guix Daemon Service (Arch Linux AUR) Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Stop and disable the existing Guix daemon service, then enable and start the 'guix-daemon-latest.service' for updated Guix installations via the Arch Linux AUR package. ```shell systemctl stop guix-daemon systemctl disable guix-daemon systemctl enable guix-daemon-latest systemctl start guix-daemon-latest ``` -------------------------------- ### Create Wallet with Named Parameters and Args Source: https://github.com/dashpay/dash/blob/develop/doc/JSON-RPC-interface.md This `dash-cli` command demonstrates creating a wallet using a combination of the `args` parameter for positional values and named parameters for other options. ```sh # "params": {"args": ["mywallet"], "load_on_startup": true} dash-cli -named createwallet mywallet load_on_startup=true ``` -------------------------------- ### Configure Installation Directories Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/depends/mimalloc/CMakeLists.txt Sets installation directories for object files, includes, and CMake config files. It uses versioned directories by default for side-by-side installation, but can be configured to install to top-level directories. ```cmake if (MI_INSTALL_TOPLEVEL) set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}") set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}") set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc") else() set(mi_install_objdir "${CMAKE_INSTALL_LIBDIR}/mimalloc-${mi_version}") # for static library and object files set(mi_install_incdir "${CMAKE_INSTALL_INCLUDEDIR}/mimalloc-${mi_version}") # for includes set(mi_install_cmakedir "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info endif() ``` -------------------------------- ### Install Required Dependencies with Homebrew Source: https://github.com/dashpay/dash/blob/develop/doc/build-osx.md Installs essential packages for a barebones Dash Core installation using Homebrew. ```bash brew install automake libtool boost gmp pkg-config libevent ``` -------------------------------- ### Bootstrap Guix Build System Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Bootstrap the build system for Guix. ```bash ./bootstrap ``` -------------------------------- ### Install GUI Dependency (Qt5) Source: https://github.com/dashpay/dash/blob/develop/doc/build-netbsd.md Installs `qt5`, the cross-platform framework required to compile the Dash Core GUI. ```bash pkgin install qt5 ``` -------------------------------- ### Install blspy Python Package Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/python-bindings/README.md Install the blspy package using pip. Alternatively, install from source if you have the necessary build tools. ```bash pip3 install blspy ``` ```bash pip3 install . ``` -------------------------------- ### Install ZeroMQ for Notifications Source: https://github.com/dashpay/dash/blob/develop/doc/build-freebsd.md Installs the ZeroMQ library, which enables Dash Core to provide notifications. Support will be compiled in if this package is installed. ```bash pkg install libzmq4 ``` -------------------------------- ### Dash CLI: Using named parameters for createwallet Source: https://github.com/dashpay/dash/blob/develop/doc/release-notes/dash/release-notes-20.0.0.md Demonstrates how to use the new named parameter 'args' with the `dash-cli` tool for the `createwallet` command, allowing for optional named arguments. ```sh dash-cli -named createwallet wallet_name=mywallet load_on_startup=1 ``` ```sh dash-cli -named createwallet mywallet load_on_startup=1 ``` -------------------------------- ### Display Configure Help Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Shows all available configuration options for the Dash Core build process. ```sh ./configure --help ``` -------------------------------- ### Install mimalloc Header Files and CMake Configuration Source: https://github.com/dashpay/dash/blob/develop/src/dashbls/depends/mimalloc/CMakeLists.txt Installs the necessary mimalloc header files and CMake configuration files to the specified installation directories. ```cmake install(FILES include/mimalloc.h DESTINATION ${mi_install_incdir}) install(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir}) install(FILES include/mimalloc-new-delete.h DESTINATION ${mi_install_incdir}) install(FILES include/mimalloc-stats.h DESTINATION ${mi_install_incdir}) install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_cmakedir}) install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_cmakedir}) ``` -------------------------------- ### Install Qt 5 Development Packages (Fedora) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs Qt 5 development packages required for building the dash-qt GUI. ```sh sudo dnf install qt5-qttools-devel qt5-qtbase-devel ``` -------------------------------- ### Install Guile v3.0 on Debian/Ubuntu Source: https://github.com/dashpay/dash/blob/develop/contrib/guix/INSTALL.md Installs Guile version 3.0 and its development headers. This is necessary for building Guix and its dependencies if Guile is not already installed. ```bash apt install guile-3.0 guile-3.0-dev ``` -------------------------------- ### Installation Commands for Guile Bindings Source: https://github.com/dashpay/dash/blob/develop/src/immer/extra/guile/README.rst These commands outline the steps to build and install the Guile bindings for Immer. Ensure you have GNU Guile 2.2 and CMake installed. ```sh mkdir build; cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DGUILE_EXTENSION_DIR="" make guile cp extra/guile/libguile-immer.so "<...the GUILE_EXTENSION_DIR>" cp extra/guile/immer.scm "" ``` -------------------------------- ### Define an Interface Library with Includes and Dependencies Source: https://github.com/dashpay/dash/blob/develop/src/secp256k1/examples/CMakeLists.txt This snippet defines an interface library named 'example' that includes headers from the project's include directory and links against the secp256k1 library and bcrypt on Windows. ```cmake add_library(example INTERFACE) target_include_directories(example INTERFACE ${PROJECT_SOURCE_DIR}/include ) target_link_libraries(example INTERFACE secp256k1 $<$:bcrypt> ) ``` -------------------------------- ### Install libqrencode for QR Code Support in GUI Source: https://github.com/dashpay/dash/blob/develop/doc/build-freebsd.md Installs libqrencode, enabling the GUI to encode addresses into QR codes. This is optional and can be skipped if QR code functionality is not desired. ```bash pkg install libqrencode ``` -------------------------------- ### Define Custom Target for Examples Source: https://github.com/dashpay/dash/blob/develop/src/immer/example/CMakeLists.txt Creates a custom target named 'examples' to group all example builds. It also adds a dependency on this target to the 'check' target. ```cmake add_custom_target(examples COMMENT "Build all examples.") add_dependencies(check examples) ``` -------------------------------- ### Start Dash QT Server Mode Source: https://github.com/dashpay/dash/blob/develop/doc/build-osx.md Launches the dash-qt application in server mode, enabling control via dash-cli. ```bash ./src/qt/dash-qt -server ``` -------------------------------- ### Install USDT Development Package (Fedora) Source: https://github.com/dashpay/dash/blob/develop/doc/build-unix.md Installs the systemtap-sdt development package for User-Space Statically Defined Tracing. ```sh sudo dnf install systemtap-sdt-devel ``` -------------------------------- ### Install Dependencies on OpenBSD Source: https://github.com/dashpay/dash/blob/develop/depends/README.md Installs necessary packages for OpenBSD. ```bash pkg_add bash gmake gtar ```