diff --git a/CHANGES.md b/CHANGES.md index 48b6e05f5..fce47d594 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,28 @@ # Changes +## Version 1.5.0 + +### Added +- psbt: add psbt_get_input_signature_type to get the type of signature required by an input. +- descriptor: Add support for Elements el-prefixed descriptor builtins as used in rust-elements. +- descriptor: Add support for parsing Elements ct descriptors with slip77(), elip150() and raw hex blinding keys. +- descriptor: Add support for generating Elements confidential addresses from ct descriptors. +- descriptor: Expose functions to perform ELIP-150 blinding key tweaking. +- crypto: Add ec_public_key_tweak to tweak standard (non-xonly) pubkeys. +- elements: Add asset_blinding_key_to_ec_public_key to compute the blinding pubkey from a blinding key. + +### Changed +- psbt: Speed up p2tr signing slightly. +- descriptor: Allow U type children for thresh() expressions. +- build: Further extend CI coverage for scan-build/valgrind/asan checks. + +### Fixed +- tx: Fix taproot cached hashing when using external sha256 implementations. +- wasm: Fixes for es6 and cjs. +- address_to_scriptpubkey: Correctly handle WALLY_NETWORK_BITCOIN_REGTEST. +- amalgamation: Support all supported standard configurations. Minor improvements to make usage easier/more robust. +- Various minor code and build fixes. + ## Version 1.4.0 ### Added diff --git a/README.md b/README.md index 96042dd5b..71e58d3f0 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ installed. For non-development use, you can install wally from PyPI with `pip` as follows: ``` -pip install wallycore==1.4.0 +pip install wallycore==1.5.0 ``` For development, you can build and install wally using: diff --git a/_CMakeLists.txt b/_CMakeLists.txt index bc99a6f05..6d8b883fc 100644 --- a/_CMakeLists.txt +++ b/_CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.18) project( libwallycore - VERSION 1.4.0 + VERSION 1.5.0 DESCRIPTION "A collection of useful primitives for cryptocurrency wallets" LANGUAGES C ) diff --git a/configure.ac b/configure.ac index 0aecb2751..c66a8454b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([libwallycore],[1.4.0]) +AC_INIT([libwallycore],[1.5.0]) AC_CONFIG_AUX_DIR([tools/build-aux]) AC_CONFIG_MACRO_DIR([tools/build-aux/m4]) AC_CONFIG_SRCDIR([src/mnemonic.h]) diff --git a/docs/source/conf.py b/docs/source/conf.py index 7d0591591..816dd600a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -168,7 +168,7 @@ def extract_docs(infile, outfile): # built documents. # # The short X.Y version. -version = u'1.4.0' +version = u'1.5.0' # The full version, including alpha/beta/rc tags. release = version diff --git a/include/wally.hpp b/include/wally.hpp index ef8d2e14d..1c60acc0e 100644 --- a/include/wally.hpp +++ b/include/wally.hpp @@ -820,8 +820,8 @@ inline int free_string(char* str) { return detail::check_ret(__FUNCTION__, ret); } -inline int get_build_version(uint32_t* value) { - int ret = ::wally_get_build_version(value); +inline int get_build_version(uint32_t* value_out) { + int ret = ::wally_get_build_version(value_out); return detail::check_ret(__FUNCTION__, ret); } diff --git a/include/wally_core.h b/include/wally_core.h index 0d73ef81b..9e625e0b6 100644 --- a/include/wally_core.h +++ b/include/wally_core.h @@ -30,9 +30,9 @@ extern "C" { /** Library version */ #define WALLY_MAJOR_VER 1 -#define WALLY_MINOR_VER 4 +#define WALLY_MINOR_VER 5 #define WALLY_PATCH_VER 0 -#define WALLY_BUILD_VER 0x10400 +#define WALLY_BUILD_VER 0x10500 /** * Initialize wally. @@ -53,11 +53,11 @@ WALLY_CORE_API int wally_cleanup(uint32_t flags); /** * Get the version number of the library. * - * :param value: Destination for the library build version. This is the + * :param value_out: Destination for the library build version. This is the *| value of `WALLY_BUILD_VER` when the library was compiled. */ WALLY_CORE_API int wally_get_build_version( - uint32_t *value); + uint32_t *value_out); #ifndef SWIG /** diff --git a/setup.py b/setup.py index 8ddab6595..ef75dbbda 100644 --- a/setup.py +++ b/setup.py @@ -172,7 +172,7 @@ def _call(args, cwd=ABS_PATH): kwargs = { 'name': 'wallycore', - 'version': '1.4.0', + 'version': '1.5.0', 'description': 'libwally Bitcoin library', 'long_description': 'Python bindings for the libwally Bitcoin library', 'url': 'https://github.com/ElementsProject/libwally-core', diff --git a/src/Makefile.am b/src/Makefile.am index b11c8014d..2cc4c9da1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -199,11 +199,11 @@ libwallycore_la_INCLUDES = \ if SHARED_BUILD_ENABLED # Increment at every ABI change (whether breaking or non-breaking) -LT_VER_CURRENT = 6 +LT_VER_CURRENT = 7 # Increment at every release, but reset to 0 at every ABI change LT_VER_REVISION = 0 # Increment at every ABI change, but reset to 0 if breaking -LT_VER_AGE = 0 +LT_VER_AGE = 1 # The library filename will be "libwallycore.so.$((current-age)).$((age)).$((revision))", # and the soname will be "libwallycore.so.$((current-age))". # Do NOT try to make the library version-info follow the project release version number! diff --git a/src/internal.c b/src/internal.c index 5fec53d50..451fdf4d0 100644 --- a/src/internal.c +++ b/src/internal.c @@ -20,11 +20,11 @@ static secp256k1_context *global_ctx = NULL; /* Global extended error code. Not thread-safe unless caller-overridden */ static int global_error = WALLY_OK; -int wally_get_build_version(uint32_t *value) +int wally_get_build_version(uint32_t *value_out) { - if (value) - *value = WALLY_BUILD_VER; - return value ? WALLY_OK : WALLY_EINVAL; + if (value_out) + *value_out = WALLY_BUILD_VER; + return value_out ? WALLY_OK : WALLY_EINVAL; } int pubkey_combine(secp256k1_pubkey *pubnonce, const secp256k1_pubkey *const *pubnonces, size_t n) diff --git a/src/wasm_package/package-lock.json b/src/wasm_package/package-lock.json index 238cb6cae..1caa9ff94 100644 --- a/src/wasm_package/package-lock.json +++ b/src/wasm_package/package-lock.json @@ -1,12 +1,12 @@ { "name": "wallycore", - "version": "1.4.0", + "version": "1.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wallycore", - "version": "1.4.0", + "version": "1.5.0", "license": "(MIT or BSD)", "devDependencies": { "buffer": "^6.0.3", diff --git a/src/wasm_package/package.json b/src/wasm_package/package.json index 3b3d2c30e..7a65a21a1 100644 --- a/src/wasm_package/package.json +++ b/src/wasm_package/package.json @@ -1,6 +1,6 @@ { "name": "wallycore", - "version": "1.4.0", + "version": "1.5.0", "description": "JavaScript bindings for libwally", "main": "src/index.js", "type": "module", diff --git a/src/wasm_package/src/const.js b/src/wasm_package/src/const.js index 24a7d1aef..fb9b48d59 100755 --- a/src/wasm_package/src/const.js +++ b/src/wasm_package/src/const.js @@ -109,7 +109,7 @@ export const WALLY_ADDRESS_VERSION_WIF_TESTNET = 0xEF; /** Wallet Import Format export const WALLY_BIP32_CHAIN_CODE_LEN = 32; export const WALLY_BIP32_TWEAK_SUM_LEN = 32; export const WALLY_BTC_MAX = 21000000; -export const WALLY_BUILD_VER = 0x10400; +export const WALLY_BUILD_VER = 0x10500; export const WALLY_CA_PREFIX_LIQUID = 0x0c; /** Liquid v1 confidential address prefix */ export const WALLY_CA_PREFIX_LIQUID_REGTEST = 0x04; /** Liquid v1 confidential address prefix for regtest */ export const WALLY_CA_PREFIX_LIQUID_TESTNET = 0x17; /** Liquid v1 confidential address prefix for testnet */ @@ -128,7 +128,7 @@ export const WALLY_MINISCRIPT_POLICY_TEMPLATE = 0x08; /** Only allow policy temp export const WALLY_MINISCRIPT_REQUIRE_CHECKSUM = 0x04; /** Require a checksum to be present */ export const WALLY_MINISCRIPT_TAPSCRIPT = 0x01; /** Tapscript, use x-only pubkeys */ export const WALLY_MINISCRIPT_UNIQUE_KEYPATHS = 0x10; /** For policy templates, ensure BIP32 derivation paths differ for identical keys */ -export const WALLY_MINOR_VER = 4; +export const WALLY_MINOR_VER = 5; export const WALLY_MS_ANY_BLINDING_KEY = 0xE00; /** SLIP-77, ELIP-150 or ELIP-151 blinding key present */ export const WALLY_MS_BLINDING_KEY_INDEX = 0xffffffff; /* Key index for confidential blinding key */ export const WALLY_MS_CANONICAL_NO_CHECKSUM = 0x01; /** Do not include a checksum */ @@ -223,7 +223,7 @@ export const WALLY_SIGHASH_NONE = 0x02; export const WALLY_SIGHASH_RANGEPROOF = 0x40 ; /* Liquid/Elements only */ export const WALLY_SIGHASH_SINGLE = 0x03; export const WALLY_SIGHASH_TR_IN_MASK = 0xc0; /* Taproot mask for determining input hash type */ -export const WALLY_SIGTYPE_MASK = 0xf; /* Mask for signature type in in flags */ +export const WALLY_SIGTYPE_MASK = 0xf; /* Mask for signature type in flags */ export const WALLY_SIGTYPE_PRE_SW = 0x1; /* Pre-segwit signature hash */ export const WALLY_SIGTYPE_SW_V0 = 0x2; /* Segwit v0 signature hash */ export const WALLY_SIGTYPE_SW_V1 = 0x3; /* Segwit v1 (taproot) signature hash */