{"id":28455556,"url":"https://github.com/elementsproject/libwally-core","last_synced_at":"2026-04-16T02:04:10.255Z","repository":{"id":22287556,"uuid":"95169962","full_name":"ElementsProject/libwally-core","owner":"ElementsProject","description":"Useful primitives for wallets","archived":false,"fork":false,"pushed_at":"2025-06-17T06:04:29.000Z","size":6672,"stargazers_count":292,"open_issues_count":28,"forks_count":145,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-06-17T07:19:42.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElementsProject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-23T01:09:27.000Z","updated_at":"2025-06-02T14:58:27.000Z","dependencies_parsed_at":"2023-09-26T01:51:28.158Z","dependency_job_id":"7ae9284b-1f18-4e0a-8dc6-aad9252b98ee","html_url":"https://github.com/ElementsProject/libwally-core","commit_stats":{"total_commits":1971,"total_committers":45,"mean_commits":43.8,"dds":"0.23693556570268903","last_synced_commit":"870c0207084f76d8e08499b6af7f5c578d54d85a"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/ElementsProject/libwally-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementsProject%2Flibwally-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementsProject%2Flibwally-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementsProject%2Flibwally-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementsProject%2Flibwally-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElementsProject","download_url":"https://codeload.github.com/ElementsProject/libwally-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementsProject%2Flibwally-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262177866,"owners_count":23270951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-06T22:09:42.232Z","updated_at":"2026-04-16T02:04:10.233Z","avatar_url":"https://github.com/ElementsProject.png","language":"C","readme":"# libwally-core\n\nWally is a cross-platform, cross-language collection of useful primitives\nfor cryptocurrency wallets.\n\nRead the API documentation at https://wally.readthedocs.io.\n\nPlease see the [CHANGES](./CHANGES.md) for change details (including ABI changes) when upgrading.\n\nPlease report bugs and submit patches to [Our github repository](https://github.com/ElementsProject/libwally-core). If you wish to report a security issue, please read [Our security reporting guidelines](./SECURITY.md).\n\n[![Documentation Status](https://readthedocs.org/projects/wally/badge/?version=latest)](https://wally.readthedocs.io/en/latest/?badge=latest)\n\n## Platforms\n\nWally can currently be built for:\n- Linux\n- Android\n- macOS\n- iOS\n- Windows\n- Embedded (e.g ESP-32)\n- WebAssembly\n\nAnd can be used from:\n- C and compatible languages which can call C interfaces\n- C++ (see include/wally.hpp for C++ container support)\n- Python 3.x\n- Java\n- Javascript via node.js or web browser.\n\n## Building\n\n```\n# Initialise the libsecp sources (Needs to be run only once)\n$ git submodule init\n$ git submodule sync --recursive\n$ git submodule update --init --recursive\n\n# Build\n$ ./tools/autogen.sh\n$ ./configure \u003coptions - see below\u003e\n$ make\n$ make check\n```\n\n### Building on macOS\n\nUsing homebrew,\n```\n$ brew install gnu-sed\n```\n\nIf you wish to enable the SWIG interface, you\nwill need install the Java JDK 8 or newer, and install SWIG:\n\n```\n$ brew install swig\n```\n\n### configure options\n\n- `--enable-debug`. Enables debugging information and disables compiler\n   optimizations (default: no).\n- `--enable-minimal`. Minimises library size and memory requirements to target\n   embedded or resource-constrained environments (default: no).\n- `--enable-asm`. Enables fast assembly language implementations where available.\n   (default: enabled for non-debug builds).\n- `--enable-export-all`. Export all functions from the wally shared library.\n   Ordinarily only API functions are exported. (default: no). Enable this\n   if you want to test the internal functions of the library or are planning\n   to submit patches.\n- `--enable-swig-python`. Enable the [SWIG](http://www.swig.org/) Python\n   interface. The resulting shared library can be imported from Python using\n   the generated interface file `src/swig_python/wallycore/__init__.py`. (default: no).\n- `--enable-python-manylinux`. Enable [manylinux](https://github.com/pypa/manylinux)\n   support for building [PyPI](https://pypi.org/) compatible python wheels. Using\n   the resulting library in non-python programs requires linking with `libpython.so`.\n- `--enable-swig-java`. Enable the [SWIG](http://www.swig.org/) Java (JNI)\n   interface. After building, see `src/swig_java/src/com/blockstream/libwally/Wally.java`\n   for the Java interface definition (default: no).\n- `--disable-elements`. Disables support for [Elements](https://elementsproject.org/)\n   features, including [Liquid](https://blockstream.com/liquid/) support. Elements\n   functions exported by the library will always return WALLY_ERROR (default: no).\n- `--disable-elements-abi`. Changes the exposed library ABI to completely remove Elements\n   structure members and exported functions. When configured, elements support must be\n   disabled and the user must define `WALLY_ABI_NO_ELEMENTS` before including all wally\n   header files. This option *must not be given if wally is being installed as a system/shared library*. (default: no).\n- `--enable-standard-secp`. Excludes support for features that are unavailable in\n   the standard [libsecp256k1 library](https://github.com/bitcoin-core/secp256k1).\n- `--with-system-secp256k1=\u003cpackage_name\u003e`. Compile and link against a system-wide\n   install of libsecp256k1 instead of the in-tree submodule. (default: not enabled).\n- `--enable-mbed-tls`. Use mbed-tls hashing functions if available. This typically\n   results in faster hashing via hardware on embedded platforms such as ESP32.\n   Note that the caller must ensure that ``sdkconfig.h`` and ``soc/soc_caps.h``\n   are available when compiling, e.g. by setting the `CFLAGS` environment variable\n   before calling configure. (default: no)\n- `--enable-coverage`. Enables code coverage (default: no) Note that you will\n   need [lcov](http://ltp.sourceforge.net/coverage/lcov.php) installed to\n   build with this option enabled and generate coverage reports.\n- `--disable-shared`. Disables building a shared library and builds a static\n  library instead. (default: no)\n- `--disable-tests`. Disables building library tests. (default: no)\n- `--disable-clear-tests`. Disables just the test_clear test (required to pass\n  the test suite with some compilers). (default: no)\n- `--enable-fuzzing`. Enables fuzzing support by compiling with\n  `-fsanitize=fuzzer-no-link` and builds fuzz targets. (default: no).\n- `--enable-address-sanitizer`. Enables the address sanitizer for detecting\n  memory errors. (default: no).\n- `--enable-ub-sanitizer`. Enables the undefined behavior sanitizer. (default: no).\n\n### Recommended development configure options\n\n```\n$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-swig-java --enable-coverage\n```\n\n### Compiler options\n\nSet `CC=clang` to use clang for building instead of gcc, when both are\ninstalled.\n\n### Python\n\nFor non-development use, you can install wally from PyPI with `pip` as follows:\n\n```\npip install wallycore==1.5.3\n```\n\nFor development, you can build and install wally using:\n\n```\n$ pip install .\n```\n\nIf you wish to explicitly choose the python version to use, set the\n`PYTHON_VERSION` environment variable (to e.g. `3.9`, `3.10` etc) before\nrunning `pip` or (when compiling manually) `./configure`.\n\nYou can also install the binary [wally releases](https://github.com/ElementsProject/libwally-core/releases)\nusing the released wheel files, for example if you don't wish to install from PyPI over the network:\n\n```\npip install wallycore-\u003cversion_and_architecture\u003e.whl\n```\n\nEach wally release includes a signed `requirements.txt` file. It is strongly\nsuggested that you verify and use this file when installing, with:\n\n```\npip install --require-hashes -r requirements.txt\n```\n\nDoing so ensures that the wheel you install is the version you expect and an\nofficial build. This will detect, for example, if PyPI is hacked and a\nmalicious wallycore package uploaded.\n\n### Android\n\nAndroid builds are currently supported for all Android binary targets using\nthe Android NDK. The script `tools/android_helpers.sh` can be sourced from\nthe shell or scripts to make it easier to produce builds:\n\n```\n$ export ANDROID_NDK=/opt/android-ndk-r26b # r22 is the minimum supported version\n$ . ./tools/android_helpers.sh\n\n$ android_get_arch_list\narmeabi-v7a arm64-v8a x86 x86_64\n\n# Prepare to build\n$ ./tools/cleanup.sh\n$ ./tools/autogen.sh\n\n# See the comments in tools/android_helpers.sh for arguments\n$ android_build_wally armeabi-v7a $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64 19 \"--enable-swig-java\"\n```\n\nThe script `tools/build_android_libraries.sh` builds the Android release files and\ncan be used as an example for your own Android projects.\n\n### WebAssembly\n\nWebAssembly is available as a preview feature. Users may want to avoid using wally compiled for\nwasm for signing or encryption/decryption as the transpiled code may not remain constant time.\n\nBuilding wally as wasm requires following emsdk instructions for\nyour [platform](https://webassembly.org/getting-started/developers-guide/) and sourcing\nthe `emsdk_env.sh` file:\n\n```\n# Set up the environment variables for the toolchain\n$ source $HOME/emsdk/emsdk_env.sh\n\n# Optionally set the list of wally functions to export to wasm (default: all)\n$ export EXPORTED_FUNCTIONS=\"['_malloc','_free','_wally_init','_wally_cleanup',...]\"\n\n# Optionally set emcc options, e.g. to build as an ES6 module:\n$ export EMCC_OPTIONS=\"-s EXPORT_ES6=1 -s MODULARIZE=1\"\n\n# Build\n$ ./tools/build_wasm.sh [--disable-elements]\n```\n\nNote that emsdk v3.1.27 or later is required.\n\nThe file `contrib/wally_js_example.html` is an example page using the\n`wallycore.js` and `wallycore.wasm` files, which can be used as an example\nfor your own WebAssembly projects.\n\nOpen `wally_js_example.html` in a browser via a webserver like [nginx](https://www.nginx.com/)\nor `python3 -m http.server` to run the example.\n\n## Cleaning\n\n```\n$ ./tools/cleanup.sh\n```\n\n## Submitting patches\n\nPlease use pull requests on [github](https://github.com/ElementsProject/libwally-core) to\nsubmit. Before producing your patch you should format your changes\nusing [uncrustify](https://github.com/uncrustify/uncrustify.git) version 0.60 or\nlater. The script `./tools/uncrustify` will reformat all C sources in the library\nas needed, with the currently chosen uncrustify options.\n\nTo reformat a single source file, use e.g.:\n```\n$ ./tools/uncrustify src/transaction.c\n```\n\nOr to reformat all source files, pass no arguments:\n```\n$ ./tools/uncrustify\n```\n\nIf you have added new API functions in your patch, run `tools/update_generated.sh`\nto update the auto-generated support code for various platforms. This requires\nPython and the `jq` binary.\n\nYou should also make sure the existing tests pass and if possible write tests\ncovering any new functionality, following the existing style. You can run the\ntests via:\n```\n$ make check\n```\n\nPython ctypes tests (in `./src/test/`) are strongly preferred, but you can add\nto the other test suites if your changes target a specific language or your\ntests need to be written at a higher level of abstraction.\n\n## Generating a coverage report\n\nTo generate an HTML coverage report, install `lcov` and use:\n\n```\n$ ./tools/cleanup.sh\n$ ./tools/autogen.sh\n$ ./configure --enable-debug --enable-export-all --enable-swig-python --enable-swig-java --enable-coverage\n$ make\n$ ./tools/coverage.sh clean\n$ make check\n$ ./tools/coverage.sh\n```\n\nFor coverage with `clang`, you need to install `llvm-cov`, typically via the\n`llvm-\u003cversion\u003e` package that corresponds to your `clang` version. Once\ninstalled, set the `GCOV` environment variable to the versioned `llvm-cov`\nbinary name before running `./tools/coverage.sh`, e.g:\n\n```\n$ GCOV=llvm-cov-11 ./tools/coverage.sh clean\n$ make check\n$ GCOV=llvm-cov-11 ./tools/coverage.sh\n```\n\nThe coverage report can be viewed at `./src/lcov/src/index.html`. Patches\nto increase the test coverage are welcome.\n\n## Users of libwally-core\n\nProjects and products that are known to depend on or use `libwally`:\n* [Blockstream Green Command Line Wallet](https://github.com/Blockstream/green_cli)\n* [Blockstream Green Development Kit](https://github.com/Blockstream/gdk)\n* [Blockstream Green Wallet for Android](https://github.com/Blockstream/green_android)\n* [Blockstream Green Wallet for iOS](https://github.com/Blockstream/green_ios)\n* [Blockstream Green Wallet for Desktops](https://github.com/Blockstream/green_qt)\n* [Blockstream Jade Hardware Wallet](https://github.com/Blockstream/Jade)\n* [BitBox02 Hardware Wallet](https://github.com/digitalbitbox/bitbox02-firmware)\n* [Blockstream Blind PIN Server](https://github.com/Blockstream/blind_pin_server)\n* [Blockstream/liquid-melt](https://github.com/Blockstream/liquid-melt)\n* [Blockstream/liquid_multisig_issuance](https://github.com/Blockstream/liquid_multisig_issuance)\n* [c-lightning](https://github.com/ElementsProject/lightning)\n* [gdk_rpc for bitcoind/liquidd](https://github.com/Blockstream/gdk_rpc)\n* [GreenAddress Recovery Tool](https://github.com/greenaddress/garecovery)\n* [GreenAddress Wallet for Windows/Mac/Linux](https://github.com/greenaddress/WalletElectron)\n* [GreenAddress Web Files](https://github.com/greenaddress/GreenAddressWebFiles)\n* [LibWally Swift](https://github.com/blockchain/libwally-swift)\n* [Multy-Core](https://github.com/Multy-io/Multy-Core)\n\nPlease note that some of the listed projects may be experimental or superseded.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementsproject%2Flibwally-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementsproject%2Flibwally-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementsproject%2Flibwally-core/lists"}