From a86b8abc34c314d115d9a5b12bc44145f3987a18 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Thu, 9 Apr 2026 15:04:55 +1200 Subject: [PATCH 01/12] tx: reject non-corresponding output as per bip341 Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/tx_io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tx_io.c b/src/tx_io.c index 229d86ffa..0256b71d1 100644 --- a/src/tx_io.c +++ b/src/tx_io.c @@ -606,7 +606,7 @@ static int legacy_signature_hash( !bytes_out || len != SHA256_LEN) return WALLY_EINVAL; - if (index >= tx->num_inputs || (sh_single && index >= tx->num_outputs)) { + if (index >= tx->num_inputs || (sh_single && index >= tx->num_outputs)) { memset(bytes_out, 0, SHA256_LEN); bytes_out[0] = 0x1; return WALLY_OK; @@ -832,7 +832,9 @@ static int bip341_signature_hash( const bool sh_anyprevout_anyscript = bip341_is_input_hash_type(sighash, WALLY_SIGHASH_ANYPREVOUTANYSCRIPT); cursor_io io; - if (index >= tx->num_inputs || (annex && *annex != 0x50)) + if (index >= tx->num_inputs || + (output_type == WALLY_SIGHASH_SINGLE && index >= tx->num_outputs) || + (annex && *annex != 0x50)) return WALLY_EINVAL; if (is_elements) { From 532842755da01aeefc56c2c3dba597008c003ff4 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Thu, 9 Apr 2026 21:17:25 +1200 Subject: [PATCH 02/12] tx: add missing check for NULL written param Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/transaction.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transaction.c b/src/transaction.c index ad3c42234..17f7277db 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -1857,6 +1857,8 @@ int wally_tx_get_weight(const struct wally_tx *tx, size_t *written) int wally_tx_vsize_from_weight(size_t weight, size_t *written) { + if (!written) + return WALLY_EINVAL; *written = (weight + 3) / 4; /* ceil(weight/4) */ return WALLY_OK; } From ccb26df08ce9c54af896252037f00ca5d35f7103 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Thu, 9 Apr 2026 21:55:54 +1200 Subject: [PATCH 03/12] blech32: ensure buffers are cleared if encoding fails Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/blech32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blech32.c b/src/blech32.c index 2ea189152..4ee8aa45b 100644 --- a/src/blech32.c +++ b/src/blech32.c @@ -321,8 +321,10 @@ int wally_confidential_addr_from_addr_segwit( memcpy(buf, pub_key, pub_key_len); written -= 2; /* ignore witnessVersion & hashSize */ written += EC_PUBLIC_KEY_LEN; - if (!blech32_addr_encode(result, confidential_addr_family, witver & 0xff, buf, written)) - return WALLY_ERROR; + if (!blech32_addr_encode(result, confidential_addr_family, witver & 0xff, buf, written)) { + ret = WALLY_ERROR; + goto done; + } *output = wally_strdup(result); ret = (*output) ? WALLY_OK : WALLY_ENOMEM; From 2b5fc0ec696ee58789fbf7ef73f701ba755b6a98 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Thu, 9 Apr 2026 23:44:46 +1200 Subject: [PATCH 04/12] tx: fix output clearing size on tx_input_init_alloc failure Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction.c b/src/transaction.c index 17f7277db..0b3f13f62 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -742,7 +742,7 @@ int wally_tx_input_init_alloc(const unsigned char *txhash, size_t txhash_len, script, script_len, witness, *output); if (ret != WALLY_OK) { - clear_and_free(*output, sizeof(struct wally_tx_output)); + clear_and_free(*output, sizeof(struct wally_tx_input)); *output = NULL; } return ret; From d9460a641b8eb7f3122679028c6c412d17d37350 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Fri, 10 Apr 2026 10:47:40 +1200 Subject: [PATCH 05/12] aes: ensure output buffer is valid, share validation code, add tests Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/aes.c | 69 +++++++++++++++++++++++++------------------- src/test/test_aes.py | 49 +++++++++++++++++++++++++++---- 2 files changed, 83 insertions(+), 35 deletions(-) diff --git a/src/aes.c b/src/aes.c index 3a6604218..f4ea03e6f 100644 --- a/src/aes.c +++ b/src/aes.c @@ -5,8 +5,6 @@ #include "ctaes/ctaes.h" #include "ctaes/ctaes.c" -#define ALL_OPS (AES_FLAG_ENCRYPT | AES_FLAG_DECRYPT) - static bool is_valid_key_len(size_t key_len) { return key_len == AES_KEY_LEN_128 || key_len == AES_KEY_LEN_192 || @@ -14,11 +12,15 @@ static bool is_valid_key_len(size_t key_len) } static bool are_valid_args(const unsigned char *key, size_t key_len, - const unsigned char *bytes, size_t bytes_len, uint32_t flags) + const unsigned char *bytes, size_t bytes_len, + uint32_t flags, size_t *written) { - return key && is_valid_key_len(key_len) && - (bytes != NULL || (bytes == NULL && bytes_len == 0 && (flags & AES_FLAG_ENCRYPT))) && - (flags == AES_FLAG_ENCRYPT || flags == AES_FLAG_DECRYPT); + if (written) + *written = 0; + if (!key || !is_valid_key_len(key_len) || BYTES_INVALID(bytes, bytes_len) || + (flags != AES_FLAG_ENCRYPT && flags != AES_FLAG_DECRYPT) || !written) + return false; + return true; } static void aes_enc(AES256_ctx *ctx, @@ -75,10 +77,8 @@ int wally_aes_len(const unsigned char *key, size_t key_len, const unsigned char *bytes, size_t bytes_len, uint32_t flags, size_t *written) { - if (written) - *written = 0; - if (!are_valid_args(key, key_len, bytes, bytes_len, flags) || - !bytes_len || bytes_len % AES_BLOCK_LEN || !written) + if (!are_valid_args(key, key_len, bytes, bytes_len, flags, written) || + !bytes_len || bytes_len % AES_BLOCK_LEN) return WALLY_EINVAL; *written = bytes_len; return WALLY_OK; @@ -90,8 +90,9 @@ int wally_aes(const unsigned char *key, size_t key_len, unsigned char *bytes_out, size_t len) { AES256_ctx ctx; + size_t written; - if (!are_valid_args(key, key_len, bytes, bytes_len, flags) || + if (!are_valid_args(key, key_len, bytes, bytes_len, flags, &written) || len % AES_BLOCK_LEN || !bytes_len || bytes_len % AES_BLOCK_LEN || !bytes_out || !len) return WALLY_EINVAL; @@ -105,43 +106,52 @@ int wally_aes(const unsigned char *key, size_t key_len, return WALLY_OK; } +static bool are_valid_aes_cbc_args(const unsigned char *key, size_t key_len, + const unsigned char *iv, size_t iv_len, + const unsigned char *bytes, size_t bytes_len, + uint32_t flags, + unsigned char *bytes_out, size_t len, + size_t *written) +{ + if (!are_valid_args(key, key_len, bytes, bytes_len, flags, written) || + !iv || iv_len != AES_BLOCK_LEN || BYTES_INVALID(bytes_out, len)) + return false; + + if (flags & AES_FLAG_ENCRYPT) { + if (len % AES_BLOCK_LEN) + return false; /* Output must be a block length multiple if given */ + } else { + if (bytes_len % AES_BLOCK_LEN) + return false; /* Input must be a block length multiple if given */ + } + return true; +} + int wally_aes_cbc_get_maximum_length(const unsigned char *key, size_t key_len, const unsigned char *iv, size_t iv_len, const unsigned char *bytes, size_t bytes_len, uint32_t flags, size_t *written) { - if (written) - *written = 0; - - if (!are_valid_args(key, key_len, bytes, bytes_len, flags) || - ((flags & AES_FLAG_DECRYPT) && (bytes_len % AES_BLOCK_LEN)) || - !iv || iv_len != AES_BLOCK_LEN || !written) + if (!are_valid_aes_cbc_args(key, key_len, iv, iv_len, bytes, bytes_len, + flags, NULL, 0, written)) return WALLY_EINVAL; - *written = ((bytes_len / AES_BLOCK_LEN) + 1) * AES_BLOCK_LEN; return WALLY_OK; } int wally_aes_cbc(const unsigned char *key, size_t key_len, const unsigned char *iv, size_t iv_len, - const unsigned char *bytes, size_t bytes_len, - uint32_t flags, - unsigned char *bytes_out, size_t len, - size_t *written) + const unsigned char *bytes, size_t bytes_len, uint32_t flags, + unsigned char *bytes_out, size_t len, size_t *written) { unsigned char buf[AES_BLOCK_LEN]; AES256_ctx ctx; size_t i, n, blocks; unsigned char remainder; - if (written) - *written = 0; - - if (!are_valid_args(key, key_len, bytes, bytes_len, flags) || - ((flags & AES_FLAG_ENCRYPT) && (len % AES_BLOCK_LEN)) || - ((flags & AES_FLAG_DECRYPT) && (bytes_len % AES_BLOCK_LEN)) || - !iv || iv_len != AES_BLOCK_LEN || !written) + if (!are_valid_aes_cbc_args(key, key_len, iv, iv_len, bytes, bytes_len, + flags, bytes_out, len, written)) return WALLY_EINVAL; blocks = bytes_len / AES_BLOCK_LEN; @@ -173,6 +183,7 @@ int wally_aes_cbc(const unsigned char *key, size_t key_len, goto finish; /* Inform caller how much space is needed */ if (!bytes_out) { + *written = 0; wally_clear_2(buf, sizeof(buf), &ctx, sizeof(ctx)); return WALLY_EINVAL; } diff --git a/src/test/test_aes.py b/src/test/test_aes.py index ff09b5a5a..577c4c4a8 100755 --- a/src/test/test_aes.py +++ b/src/test/test_aes.py @@ -80,17 +80,54 @@ def get_cbc_cases(self): return [lines[x:x+4] for x in range(0, len(lines), 4)] def test_aes_cbc(self): + out_buf, out_len = make_cbuffer('00' * 80) + E, D = self.ENCRYPT, self.DECRYPT + # Encryption/decryption cases for c in self.get_cbc_cases(): plain, key, iv, cypher = [make_cbuffer(s)[0] for s in c] - for p, f, o in [(plain, self.ENCRYPT, cypher), - (cypher, self.DECRYPT, plain)]: - - out_buf, out_len = make_cbuffer('00' * len(o)) + for p, f, o in [(plain, E, cypher), (cypher, D, plain)]: ret, written = wally_aes_cbc(key, len(key), iv, len(iv), - p, len(p), f, out_buf, out_len) + p or None, len(p), f, out_buf, out_len) self.assertEqual((ret, written), (0, len(o))) - self.assertEqual(h(out_buf), h(o)) + self.assertEqual(h(out_buf[:written]), h(o)) + # Passing a NULL output buffer with zero length returns the + # number of bytes required for encrypted/decrypted output + ret, written = wally_aes_cbc(key, len(key), iv, len(iv), + p or None, len(p), f, None, 0) + self.assertEqual((ret, written), (0, len(o))) + # wally_aes_cbc_get_maximum_length returns tha maximum + # number of bytes required. + ret, max_len = wally_aes_cbc_get_maximum_length(key, len(key), iv, len(iv), + p or None, len(p), f) + self.assertEqual(ret, 0) + self.assertTrue(max_len >= written and max_len % 16 == 0) + + # Invalid args + invalid_cases = [ + # NULL key + (None, len(key), iv, len(iv), cypher, len(cypher), D, out_buf, out_len), + # Empty key + (key, 0, iv, len(iv), cypher, len(cypher), D, out_buf, out_len), + # NULL IV + (key, len(key), None, len(iv), cypher, len(cypher), D, out_buf, out_len), + # Empty IV + (key, len(key), iv, 0, cypher, len(cypher), D, out_buf, out_len), + # NULL cyphertext + (key, len(key), iv, len(iv), None, len(cypher), D, out_buf, out_len), + # Empty cyphertext + (key, len(key), iv, len(iv), cypher, 0, D, out_buf, out_len), + # Invalid flags + (key, len(key), iv, len(iv), cypher, len(cypher), 3, out_buf, out_len), + # NULL out_buf + (key, len(key), iv, len(iv), cypher, len(cypher), D, None, out_len), + ] + for c in invalid_cases: + if c[-1] == out_len and c[-2] == out_buf: + ret, written = wally_aes_cbc_get_maximum_length(*c[:-2]) + self.assertEqual((ret, written), (WALLY_EINVAL, 0)) + ret, written = wally_aes_cbc(*c) + self.assertEqual((ret, written), (WALLY_EINVAL, 0)) def test_aes_cbc_with_ecdh_key(self): ENCRYPT, DECRYPT, _ = 1, 2, True From c93c0d8be77454318eb0b981eff5a6a144abb04f Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 14 Apr 2026 00:34:04 +1200 Subject: [PATCH 06/12] map: fix incorrect clear when reinserting an integer after removing bytes Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo --- src/map.c | 8 ++++---- src/test/test_map.py | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/map.c b/src/map.c index 332cf0a75..084d84572 100644 --- a/src/map.c +++ b/src/map.c @@ -252,14 +252,14 @@ int map_add(struct wally_map *map_in, struct wally_map_item *new_item = map_in->items + map_in->num_items; if (!key) { - /* Integer key */ - if (new_item->key) - clear_and_free_bytes(&new_item->key, &new_item->key_len); + new_item->key = NULL; /* Integer key */ } else if (!clone_bytes(&new_item->key, key, key_len)) return WALLY_ENOMEM; /* Failed to allocate byte key */ new_item->key_len = key_len; - if (val) { + if (!val) { + new_item->value = NULL; + } else { if (take_value) new_item->value = (unsigned char *)val; else if (!clone_bytes(&new_item->value, val, val_len)) { diff --git a/src/test/test_map.py b/src/test/test_map.py index 4fc45e0ec..b62899120 100644 --- a/src/test/test_map.py +++ b/src/test/test_map.py @@ -194,6 +194,15 @@ def test_map(self): self.assertEqual(wally_map_free(m), WALLY_OK) + # Test re-adding an integer after removing bytes + m = pointer(wally_map()) + self.assertEqual(wally_map_init_alloc(0, None, m), WALLY_OK) + self.assertEqual(wally_map_add(*[m, *cases[0]]), WALLY_OK) + self.assertEqual(wally_map_add(*[m, *cases[1]]), WALLY_OK) + self.assertEqual(wally_map_remove(m, cases[0][0], cases[0][1]), WALLY_OK) + self.assertEqual(wally_map_add_integer(m, 1, cases[0][0], cases[0][1]), WALLY_OK) + self.assertEqual(wally_map_free(m), WALLY_OK) + def test_keypath_map(self): """Test keypath map functions""" # From 096dc37f0729f326304a96b29525763fb5d350b0 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 14 Apr 2026 01:15:38 +1200 Subject: [PATCH 07/12] update CHANGES.md for release 1.5.3 --- CHANGES.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bcb6e8f9d..8c5eb16f7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,27 @@ # Changes +## Version 1.5.3 + +### Added +- bip32: Add updated BIP checks to bip32_key_unserialize(). +- build: Add support for fuzzing wally API calls. + +### Fixed +- psbt: corectly handle allocation failures in psbt_set_global_tx(). +- tx: Avoid quadratic behaviour parsing txs with a huge number of witnesses. +- tx: Fix parsing Liquid transactions with short commitments. +- tx: Reject non-corresponding output as per bip341 when signing. +- map: Fix incorrect clear when reinserting an integer after removing bytes. +- js: Bump webpack, serialize-javascript and terser-webpack-plugin dependencies. +- Various minor code and build fixes. + ## Version 1.5.2 ### Added -- taproot: add bip341_control_block_verify(). +- taproot: Add bip341_control_block_verify(). ### Changed -- map: ignore duplicates in map_merkle_path_add() for consistency. +- map: Ignore duplicates in map_merkle_path_add() for consistency. ### Fixed - build: Fix building with the Elements ABI disabled. From 43b97bed2e5b6347a909bfd1113242528826a8a2 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 14 Apr 2026 01:21:46 +1200 Subject: [PATCH 08/12] Bump version to 1.5.3 --- README.md | 2 +- _CMakeLists.txt | 2 +- configure.ac | 2 +- docs/source/conf.py | 2 +- include/wally_core.h | 4 ++-- setup.py | 2 +- src/wasm_package/package-lock.json | 4 ++-- src/wasm_package/package.json | 2 +- src/wasm_package/src/const.js | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 337dfe8c2..5c1ce3ab2 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ installed. For non-development use, you can install wally from PyPI with `pip` as follows: ``` -pip install wallycore==1.5.2 +pip install wallycore==1.5.3 ``` For development, you can build and install wally using: diff --git a/_CMakeLists.txt b/_CMakeLists.txt index 170f7ef15..007729f56 100644 --- a/_CMakeLists.txt +++ b/_CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.18) project( libwallycore - VERSION 1.5.2 + VERSION 1.5.3 DESCRIPTION "A collection of useful primitives for cryptocurrency wallets" LANGUAGES C ) diff --git a/configure.ac b/configure.ac index 57caee518..a4637cc93 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([libwallycore],[1.5.2]) +AC_INIT([libwallycore],[1.5.3]) 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 bd28993a9..7ce9c7eb4 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.5.2' +version = u'1.5.3' # The full version, including alpha/beta/rc tags. release = version diff --git a/include/wally_core.h b/include/wally_core.h index 880e37a16..916105128 100644 --- a/include/wally_core.h +++ b/include/wally_core.h @@ -31,8 +31,8 @@ extern "C" { /** Library version */ #define WALLY_MAJOR_VER 1 #define WALLY_MINOR_VER 5 -#define WALLY_PATCH_VER 2 -#define WALLY_BUILD_VER 0x10502 +#define WALLY_PATCH_VER 3 +#define WALLY_BUILD_VER 0x10503 /** * Initialize wally. diff --git a/setup.py b/setup.py index cb11f602f..87a259aae 100644 --- a/setup.py +++ b/setup.py @@ -172,7 +172,7 @@ def _call(args, cwd=ABS_PATH): kwargs = { 'name': 'wallycore', - 'version': '1.5.2', + 'version': '1.5.3', 'description': 'libwally Bitcoin library', 'long_description': 'Python bindings for the libwally Bitcoin library', 'url': 'https://github.com/ElementsProject/libwally-core', diff --git a/src/wasm_package/package-lock.json b/src/wasm_package/package-lock.json index 9a60a935b..5a6f83e3b 100644 --- a/src/wasm_package/package-lock.json +++ b/src/wasm_package/package-lock.json @@ -1,12 +1,12 @@ { "name": "wallycore", - "version": "1.5.2", + "version": "1.5.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wallycore", - "version": "1.5.2", + "version": "1.5.3", "license": "(MIT or BSD)", "devDependencies": { "buffer": "^6.0.3", diff --git a/src/wasm_package/package.json b/src/wasm_package/package.json index 7b61274cc..fb82fd4c9 100644 --- a/src/wasm_package/package.json +++ b/src/wasm_package/package.json @@ -1,6 +1,6 @@ { "name": "wallycore", - "version": "1.5.2", + "version": "1.5.3", "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 aa463fe19..27e30dff2 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 = 0x10502; +export const WALLY_BUILD_VER = 0x10503; 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 */ @@ -153,7 +153,7 @@ export const WALLY_NETWORK_LIQUID_TESTNET = 0x05; /** Liquid v1 testnet */ export const WALLY_NETWORK_NONE = 0x00; /** Used for miniscript parsing only */ export const WALLY_NO_CODESEPARATOR = 0xffffffff; /* No BIP342 code separator position */ export const WALLY_OK = 0; /** Success */ -export const WALLY_PATCH_VER = 2; +export const WALLY_PATCH_VER = 3; export const WALLY_PSBT_COMBINE_SIGS = 0x1; /* Combine the signatures from a signature-only PSBT */ export const WALLY_PSBT_EXTRACT_FINAL = 0x0; /* Extract a final transaction; fail if any inputs aren't finalized */ export const WALLY_PSBT_EXTRACT_NON_FINAL = 0x1; /* Extract without any final scriptsig and witness */ From 070c213948343d80de5bca668736289389240db5 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Wed, 15 Apr 2026 21:48:26 +1200 Subject: [PATCH 09/12] js: allow null buffers for bytes inputs --- src/wasm_package/src/core.js | 7 ++++++- tools/build_wrappers.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wasm_package/src/core.js b/src/wasm_package/src/core.js index d1bbed447..c5063e153 100644 --- a/src/wasm_package/src/core.js +++ b/src/wasm_package/src/core.js @@ -46,6 +46,11 @@ const _wally_free_string = Module.cwrap('wally_free_string', 'number', ['number' types.IntArray = (IntArrayType, heap, wrap=x=>x) => ({ wasm_types: ['number', 'number'], to_wasm: int_arr => { + if (int_arr === null && IntArrayType == Uint8Array) { + return { + args: [null, 0] + } + } if (!Array.isArray(int_arr) && !(int_arr instanceof IntArrayType)) { throw new WallyArrayNumTypeError(int_arr, IntArrayType) } @@ -299,4 +304,4 @@ export function wrap(func_name, args_types) { cleanups.forEach(cleanup_fn => cleanup_fn()) } } -} \ No newline at end of file +} diff --git a/tools/build_wrappers.py b/tools/build_wrappers.py index 3f52d564c..359d3dd3c 100755 --- a/tools/build_wrappers.py +++ b/tools/build_wrappers.py @@ -396,7 +396,7 @@ def gen_wasm_package(funcs, all_funcs): # Input arrays (represented as two arguments - the first identified by this map, followed by a FOO_len argument) # map of C type -> (JS type, TypeScript argument type) typemap_arrays = { - 'const unsigned char*' : ('T.Bytes', 'Buffer|Uint8Array'), + 'const unsigned char*' : ('T.Bytes', 'Buffer|Uint8Array|null'), 'const uint32_t*' : ('T.Uint32Array', 'Uint32Array|number[]'), 'const uint64_t*' : ('T.Uint64Array', 'BigUint64Array|Array'), } From 019385e5d2c6168eb14ec5c918fb74b13cb94737 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Wed, 15 Apr 2026 21:49:58 +1200 Subject: [PATCH 10/12] js: regenerate wrappers --- src/wasm_package/src/index.d.ts | 600 ++++++++++++++++---------------- 1 file changed, 300 insertions(+), 300 deletions(-) diff --git a/src/wasm_package/src/index.d.ts b/src/wasm_package/src/index.d.ts index b34ed0c7a..f213c335a 100644 --- a/src/wasm_package/src/index.d.ts +++ b/src/wasm_package/src/index.d.ts @@ -20,42 +20,42 @@ export type Ref_wally_tx_witness_stack = OpaqueRef<'wally_tx_witness_stack'> | n export type Ref_wally_operations = OpaqueRef<'operations'>; // BEGIN AUTOGENERATED -export function addr_segwit_from_bytes(bytes: Buffer|Uint8Array, addr_family: string, flags: number): string; +export function addr_segwit_from_bytes(bytes: Buffer|Uint8Array|null, addr_family: string, flags: number): string; export function addr_segwit_get_version(addr: string, addr_family: string, flags: number): number; export function addr_segwit_n_get_version(addr: string, addr_len: number, addr_family: string, addr_family_len: number, flags: number): number; export function addr_segwit_n_to_bytes(addr: string, addr_len: number, addr_family: string, addr_family_len: number, flags: number): Buffer; export function addr_segwit_to_bytes(addr: string, addr_family: string, flags: number): Buffer; export function address_to_scriptpubkey(addr: string, network: number): Buffer; -export function ae_host_commit_from_bytes(entropy: Buffer|Uint8Array, flags: number): Buffer; -export function ae_sig_from_bytes(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, entropy: Buffer|Uint8Array, flags: number): Buffer; -export function ae_signer_commit_from_bytes(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, commitment: Buffer|Uint8Array, flags: number): Buffer; -export function ae_verify(pub_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, entropy: Buffer|Uint8Array, s2c_opening: Buffer|Uint8Array, flags: number, sig: Buffer|Uint8Array): void; -export function aes_cbc_get_maximum_length(key: Buffer|Uint8Array, iv: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): number; -export function aes_cbc_with_ecdh_key_get_maximum_length(priv_key: Buffer|Uint8Array, iv: Buffer|Uint8Array, bytes: Buffer|Uint8Array, pub_key: Buffer|Uint8Array, label: Buffer|Uint8Array, flags: number): number; -export function aes_len(key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): number; -export function asset_blinding_key_from_seed(bytes: Buffer|Uint8Array): Buffer; -export function asset_blinding_key_to_abf(bytes: Buffer|Uint8Array, hash_prevouts: Buffer|Uint8Array, output_index: number): Buffer; -export function asset_blinding_key_to_abf_vbf(bytes: Buffer|Uint8Array, hash_prevouts: Buffer|Uint8Array, output_index: number): Buffer; -export function asset_blinding_key_to_ec_private_key(bytes: Buffer|Uint8Array, script: Buffer|Uint8Array): Buffer; -export function asset_blinding_key_to_ec_public_key(bytes: Buffer|Uint8Array, script: Buffer|Uint8Array): Buffer; -export function asset_blinding_key_to_vbf(bytes: Buffer|Uint8Array, hash_prevouts: Buffer|Uint8Array, output_index: number): Buffer; -export function asset_final_vbf(values: BigUint64Array|Array, num_inputs: number, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array): Buffer; -export function asset_generator_from_bytes(asset: Buffer|Uint8Array, abf: Buffer|Uint8Array): Buffer; -export function asset_pak_whitelistproof_len(online_keys: Buffer|Uint8Array, offline_keys: Buffer|Uint8Array, key_index: number, sub_pubkey: Buffer|Uint8Array, online_priv_key: Buffer|Uint8Array, summed_key: Buffer|Uint8Array): number; +export function ae_host_commit_from_bytes(entropy: Buffer|Uint8Array|null, flags: number): Buffer; +export function ae_sig_from_bytes(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, flags: number): Buffer; +export function ae_signer_commit_from_bytes(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, flags: number): Buffer; +export function ae_verify(pub_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, s2c_opening: Buffer|Uint8Array|null, flags: number, sig: Buffer|Uint8Array|null): void; +export function aes_cbc_get_maximum_length(key: Buffer|Uint8Array|null, iv: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): number; +export function aes_cbc_with_ecdh_key_get_maximum_length(priv_key: Buffer|Uint8Array|null, iv: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, pub_key: Buffer|Uint8Array|null, label: Buffer|Uint8Array|null, flags: number): number; +export function aes_len(key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): number; +export function asset_blinding_key_from_seed(bytes: Buffer|Uint8Array|null): Buffer; +export function asset_blinding_key_to_abf(bytes: Buffer|Uint8Array|null, hash_prevouts: Buffer|Uint8Array|null, output_index: number): Buffer; +export function asset_blinding_key_to_abf_vbf(bytes: Buffer|Uint8Array|null, hash_prevouts: Buffer|Uint8Array|null, output_index: number): Buffer; +export function asset_blinding_key_to_ec_private_key(bytes: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null): Buffer; +export function asset_blinding_key_to_ec_public_key(bytes: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null): Buffer; +export function asset_blinding_key_to_vbf(bytes: Buffer|Uint8Array|null, hash_prevouts: Buffer|Uint8Array|null, output_index: number): Buffer; +export function asset_final_vbf(values: BigUint64Array|Array, num_inputs: number, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null): Buffer; +export function asset_generator_from_bytes(asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null): Buffer; +export function asset_pak_whitelistproof_len(online_keys: Buffer|Uint8Array|null, offline_keys: Buffer|Uint8Array|null, key_index: number, sub_pubkey: Buffer|Uint8Array|null, online_priv_key: Buffer|Uint8Array|null, summed_key: Buffer|Uint8Array|null): number; export function asset_pak_whitelistproof_size(num_keys: number): number; -export function asset_rangeproof(value: bigint, pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array, commitment: Buffer|Uint8Array, extra: Buffer|Uint8Array, generator: Buffer|Uint8Array, min_value: bigint, exp: number, min_bits: number): Buffer; +export function asset_rangeproof(value: bigint, pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, extra: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null, min_value: bigint, exp: number, min_bits: number): Buffer; export function asset_rangeproof_get_maximum_len(value: bigint, min_bits: number): number; -export function asset_rangeproof_with_nonce(value: bigint, nonce_hash: Buffer|Uint8Array, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array, commitment: Buffer|Uint8Array, extra: Buffer|Uint8Array, generator: Buffer|Uint8Array, min_value: bigint, exp: number, min_bits: number): Buffer; -export function asset_scalar_offset(value: bigint, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array): Buffer; -export function asset_surjectionproof_len(output_asset: Buffer|Uint8Array, output_abf: Buffer|Uint8Array, output_generator: Buffer|Uint8Array, bytes: Buffer|Uint8Array, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, generator: Buffer|Uint8Array): number; +export function asset_rangeproof_with_nonce(value: bigint, nonce_hash: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, extra: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null, min_value: bigint, exp: number, min_bits: number): Buffer; +export function asset_scalar_offset(value: bigint, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null): Buffer; +export function asset_surjectionproof_len(output_asset: Buffer|Uint8Array|null, output_abf: Buffer|Uint8Array|null, output_generator: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): number; export function asset_surjectionproof_size(num_inputs: number): number; -export function asset_unblind(pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array, proof: Buffer|Uint8Array, commitment: Buffer|Uint8Array, extra: Buffer|Uint8Array, generator: Buffer|Uint8Array): [asset_out: Buffer, abf_out: Buffer, vbf_out: Buffer, value_out: bigint]; -export function asset_unblind_with_nonce(nonce_hash: Buffer|Uint8Array, proof: Buffer|Uint8Array, commitment: Buffer|Uint8Array, extra: Buffer|Uint8Array, generator: Buffer|Uint8Array): [asset_out: Buffer, abf_out: Buffer, vbf_out: Buffer, value_out: bigint]; -export function asset_value_commitment(value: bigint, vbf: Buffer|Uint8Array, generator: Buffer|Uint8Array): Buffer; -export function base58_from_bytes(bytes: Buffer|Uint8Array, flags: number): string; +export function asset_unblind(pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null, proof: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, extra: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): [asset_out: Buffer, abf_out: Buffer, vbf_out: Buffer, value_out: bigint]; +export function asset_unblind_with_nonce(nonce_hash: Buffer|Uint8Array|null, proof: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, extra: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): [asset_out: Buffer, abf_out: Buffer, vbf_out: Buffer, value_out: bigint]; +export function asset_value_commitment(value: bigint, vbf: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): Buffer; +export function base58_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): string; export function base58_get_length(str_in: string): number; export function base58_n_get_length(str_in: string, str_len: number): number; -export function base64_from_bytes(bytes: Buffer|Uint8Array, flags: number): string; +export function base64_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): string; export function base64_get_maximum_length(str_in: string, flags: number): number; export function base64_n_get_maximum_length(str_in: string, str_len: number, flags: number): number; export function bip32_key_free(hdkey: Ref_ext_key): void; @@ -71,10 +71,10 @@ export function bip32_key_from_parent_path_str(hdkey: Ref_ext_key, path_str: str export function bip32_key_from_parent_path_str_n(hdkey: Ref_ext_key, path_str: string, path_str_len: number, child_num: number, flags: number): Ref_ext_key; export function bip32_key_from_parent_path_str_n_noalloc(hdkey: Ref_ext_key, path_str: string, path_str_len: number, child_num: number, flags: number, output: Ref_ext_key): void; export function bip32_key_from_parent_path_str_noalloc(hdkey: Ref_ext_key, path_str: string, child_num: number, flags: number, output: Ref_ext_key): void; -export function bip32_key_from_seed(bytes: Buffer|Uint8Array, version: number, flags: number): Ref_ext_key; -export function bip32_key_from_seed_custom(bytes: Buffer|Uint8Array, version: number, hmac_key: Buffer|Uint8Array, flags: number): Ref_ext_key; -export function bip32_key_from_seed_custom_noalloc(bytes: Buffer|Uint8Array, version: number, hmac_key: Buffer|Uint8Array, flags: number, output: Ref_ext_key): void; -export function bip32_key_from_seed_noalloc(bytes: Buffer|Uint8Array, version: number, flags: number, output: Ref_ext_key): void; +export function bip32_key_from_seed(bytes: Buffer|Uint8Array|null, version: number, flags: number): Ref_ext_key; +export function bip32_key_from_seed_custom(bytes: Buffer|Uint8Array|null, version: number, hmac_key: Buffer|Uint8Array|null, flags: number): Ref_ext_key; +export function bip32_key_from_seed_custom_noalloc(bytes: Buffer|Uint8Array|null, version: number, hmac_key: Buffer|Uint8Array|null, flags: number, output: Ref_ext_key): void; +export function bip32_key_from_seed_noalloc(bytes: Buffer|Uint8Array|null, version: number, flags: number, output: Ref_ext_key): void; export function bip32_key_get_chain_code(hdkey: Ref_ext_key): Buffer; export function bip32_key_get_child_num(hdkey: Ref_ext_key): number; export function bip32_key_get_depth(hdkey: Ref_ext_key): number; @@ -85,29 +85,29 @@ export function bip32_key_get_priv_key(hdkey: Ref_ext_key): Buffer; export function bip32_key_get_pub_key(hdkey: Ref_ext_key): Buffer; export function bip32_key_get_pub_key_tweak_sum(hdkey: Ref_ext_key): Buffer; export function bip32_key_get_version(hdkey: Ref_ext_key): number; -export function bip32_key_init(version: number, depth: number, child_num: number, chain_code: Buffer|Uint8Array, pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array, hash160: Buffer|Uint8Array, parent160: Buffer|Uint8Array): Ref_ext_key; -export function bip32_key_init_noalloc(version: number, depth: number, child_num: number, chain_code: Buffer|Uint8Array, pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array, hash160: Buffer|Uint8Array, parent160: Buffer|Uint8Array, output: Ref_ext_key): void; +export function bip32_key_init(version: number, depth: number, child_num: number, chain_code: Buffer|Uint8Array|null, pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null, hash160: Buffer|Uint8Array|null, parent160: Buffer|Uint8Array|null): Ref_ext_key; +export function bip32_key_init_noalloc(version: number, depth: number, child_num: number, chain_code: Buffer|Uint8Array|null, pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null, hash160: Buffer|Uint8Array|null, parent160: Buffer|Uint8Array|null, output: Ref_ext_key): void; export function bip32_key_serialize(hdkey: Ref_ext_key, flags: number): Buffer; export function bip32_key_strip_private_key(hdkey: Ref_ext_key): void; export function bip32_key_to_addr_segwit(hdkey: Ref_ext_key, addr_family: string, flags: number): string; export function bip32_key_to_address(hdkey: Ref_ext_key, flags: number, version: number): string; export function bip32_key_to_base58(hdkey: Ref_ext_key, flags: number): string; -export function bip32_key_unserialize(bytes: Buffer|Uint8Array): Ref_ext_key; -export function bip32_key_unserialize_noalloc(bytes: Buffer|Uint8Array, output: Ref_ext_key): void; +export function bip32_key_unserialize(bytes: Buffer|Uint8Array|null): Ref_ext_key; +export function bip32_key_unserialize_noalloc(bytes: Buffer|Uint8Array|null, output: Ref_ext_key): void; export function bip32_key_with_tweak_from_parent_path(hdkey: Ref_ext_key, child_path: Uint32Array|number[], flags: number): Ref_ext_key; export function bip32_key_with_tweak_from_parent_path_noalloc(hdkey: Ref_ext_key, child_path: Uint32Array|number[], flags: number, output: Ref_ext_key): void; export function bip32_path_from_str_len(path_str: string, child_num: number, multi_index: number, flags: number): number; export function bip32_path_from_str_n_len(path_str: string, path_str_len: number, child_num: number, multi_index: number, flags: number): number; export function bip32_path_str_get_features(path_str: string): number; export function bip32_path_str_n_get_features(path_str: string, path_str_len: number): number; -export function bip340_tagged_hash(bytes: Buffer|Uint8Array, tag: string): Buffer; -export function bip341_control_block_verify(bytes: Buffer|Uint8Array): void; +export function bip340_tagged_hash(bytes: Buffer|Uint8Array|null, tag: string): Buffer; +export function bip341_control_block_verify(bytes: Buffer|Uint8Array|null): void; export function bip38_get_flags(bip38: string): number; -export function bip38_raw_get_flags(bytes: Buffer|Uint8Array): number; +export function bip38_raw_get_flags(bytes: Buffer|Uint8Array|null): number; export function bip39_get_languages(): string; export function bip39_get_word(w: Ref_words, index: number): string; export function bip39_get_wordlist(lang: string): Ref_words; -export function bip39_mnemonic_from_bytes(w: Ref_words, bytes: Buffer|Uint8Array): string; +export function bip39_mnemonic_from_bytes(w: Ref_words, bytes: Buffer|Uint8Array|null): string; export function bip39_mnemonic_to_bytes(w: Ref_words, mnemonic: string): Buffer; export function bip39_mnemonic_to_seed512(mnemonic: string, passphrase: string): Buffer; export function bip39_mnemonic_validate(w: Ref_words, mnemonic: string): void; @@ -117,8 +117,8 @@ export function bip85_get_rsa_entropy(hdkey: Ref_ext_key, key_bits: number, inde export function bzero(bytes: Ref, bytes_len: number): void; export function cleanup(flags: number): void; export function coinselect_assets(values: BigUint64Array|Array, target: bigint, attempts: bigint, io_ratio: number): Uint32Array; -export function confidential_addr_from_addr(address: string, prefix: number, pub_key: Buffer|Uint8Array): string; -export function confidential_addr_from_addr_segwit(address: string, addr_family: string, confidential_addr_family: string, pub_key: Buffer|Uint8Array): string; +export function confidential_addr_from_addr(address: string, prefix: number, pub_key: Buffer|Uint8Array|null): string; +export function confidential_addr_from_addr_segwit(address: string, addr_family: string, confidential_addr_family: string, pub_key: Buffer|Uint8Array|null): string; export function confidential_addr_segwit_to_ec_public_key(address: string, confidential_addr_family: string): Buffer; export function confidential_addr_to_addr(address: string, prefix: number): string; export function confidential_addr_to_addr_segwit(address: string, confidential_addr_family: string, addr_family: string): string; @@ -142,76 +142,76 @@ export function descriptor_set_network(descriptor: Ref_wally_descriptor, network export function descriptor_to_address(descriptor: Ref_wally_descriptor, variant: number, multi_index: number, child_num: number, flags: number): string; export function descriptor_to_addresses(descriptor: Ref_wally_descriptor, variant: number, multi_index: number, child_num: number, flags: number, out_len: number): string; export function descriptor_to_script_get_maximum_length(descriptor: Ref_wally_descriptor, depth: number, index: number, variant: number, multi_index: number, child_num: number, flags: number): number; -export function ec_private_key_bip341_tweak(priv_key: Buffer|Uint8Array, merkle_root: Buffer|Uint8Array, flags: number): Buffer; -export function ec_private_key_verify(priv_key: Buffer|Uint8Array): void; -export function ec_public_key_bip341_tweak(pub_key: Buffer|Uint8Array, merkle_root: Buffer|Uint8Array, flags: number): Buffer; -export function ec_public_key_decompress(pub_key: Buffer|Uint8Array): Buffer; -export function ec_public_key_from_private_key(priv_key: Buffer|Uint8Array): Buffer; -export function ec_public_key_negate(pub_key: Buffer|Uint8Array): Buffer; -export function ec_public_key_tweak(pub_key: Buffer|Uint8Array, tweak: Buffer|Uint8Array): Buffer; -export function ec_public_key_verify(pub_key: Buffer|Uint8Array): void; -export function ec_scalar_add(scalar: Buffer|Uint8Array, operand: Buffer|Uint8Array): Buffer; -export function ec_scalar_multiply(scalar: Buffer|Uint8Array, operand: Buffer|Uint8Array): Buffer; -export function ec_scalar_subtract(scalar: Buffer|Uint8Array, operand: Buffer|Uint8Array): Buffer; -export function ec_scalar_verify(scalar: Buffer|Uint8Array): void; -export function ec_sig_from_bytes_aux_len(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, aux_rand: Buffer|Uint8Array, flags: number): number; -export function ec_sig_from_bytes_len(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): number; -export function ec_sig_from_der(bytes: Buffer|Uint8Array): Buffer; -export function ec_sig_normalize(sig: Buffer|Uint8Array): Buffer; -export function ec_sig_to_der(sig: Buffer|Uint8Array): Buffer; -export function ec_sig_to_public_key(bytes: Buffer|Uint8Array, sig: Buffer|Uint8Array): Buffer; -export function ec_sig_verify(pub_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number, sig: Buffer|Uint8Array): void; -export function ec_xonly_public_key_verify(pub_key: Buffer|Uint8Array): void; -export function ecdh(pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array): Buffer; -export function ecdh_nonce_hash(pub_key: Buffer|Uint8Array, priv_key: Buffer|Uint8Array): Buffer; -export function elements_pegin_contract_script_from_bytes(redeem_script: Buffer|Uint8Array, script: Buffer|Uint8Array, flags: number): Buffer; -export function elements_pegout_script_from_bytes(genesis_blockhash: Buffer|Uint8Array, mainchain_script: Buffer|Uint8Array, sub_pubkey: Buffer|Uint8Array, whitelistproof: Buffer|Uint8Array, flags: number): Buffer; +export function ec_private_key_bip341_tweak(priv_key: Buffer|Uint8Array|null, merkle_root: Buffer|Uint8Array|null, flags: number): Buffer; +export function ec_private_key_verify(priv_key: Buffer|Uint8Array|null): void; +export function ec_public_key_bip341_tweak(pub_key: Buffer|Uint8Array|null, merkle_root: Buffer|Uint8Array|null, flags: number): Buffer; +export function ec_public_key_decompress(pub_key: Buffer|Uint8Array|null): Buffer; +export function ec_public_key_from_private_key(priv_key: Buffer|Uint8Array|null): Buffer; +export function ec_public_key_negate(pub_key: Buffer|Uint8Array|null): Buffer; +export function ec_public_key_tweak(pub_key: Buffer|Uint8Array|null, tweak: Buffer|Uint8Array|null): Buffer; +export function ec_public_key_verify(pub_key: Buffer|Uint8Array|null): void; +export function ec_scalar_add(scalar: Buffer|Uint8Array|null, operand: Buffer|Uint8Array|null): Buffer; +export function ec_scalar_multiply(scalar: Buffer|Uint8Array|null, operand: Buffer|Uint8Array|null): Buffer; +export function ec_scalar_subtract(scalar: Buffer|Uint8Array|null, operand: Buffer|Uint8Array|null): Buffer; +export function ec_scalar_verify(scalar: Buffer|Uint8Array|null): void; +export function ec_sig_from_bytes_aux_len(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, aux_rand: Buffer|Uint8Array|null, flags: number): number; +export function ec_sig_from_bytes_len(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): number; +export function ec_sig_from_der(bytes: Buffer|Uint8Array|null): Buffer; +export function ec_sig_normalize(sig: Buffer|Uint8Array|null): Buffer; +export function ec_sig_to_der(sig: Buffer|Uint8Array|null): Buffer; +export function ec_sig_to_public_key(bytes: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null): Buffer; +export function ec_sig_verify(pub_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number, sig: Buffer|Uint8Array|null): void; +export function ec_xonly_public_key_verify(pub_key: Buffer|Uint8Array|null): void; +export function ecdh(pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null): Buffer; +export function ecdh_nonce_hash(pub_key: Buffer|Uint8Array|null, priv_key: Buffer|Uint8Array|null): Buffer; +export function elements_pegin_contract_script_from_bytes(redeem_script: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null, flags: number): Buffer; +export function elements_pegout_script_from_bytes(genesis_blockhash: Buffer|Uint8Array|null, mainchain_script: Buffer|Uint8Array|null, sub_pubkey: Buffer|Uint8Array|null, whitelistproof: Buffer|Uint8Array|null, flags: number): Buffer; export function elements_pegout_script_size(genesis_blockhash_len: number, mainchain_script_len: number, sub_pubkey_len: number, whitelistproof_len: number): number; -export function elip150_private_key_to_ec_private_key(bytes: Buffer|Uint8Array, script: Buffer|Uint8Array): Buffer; -export function elip150_private_key_to_ec_public_key(bytes: Buffer|Uint8Array, script: Buffer|Uint8Array): Buffer; -export function elip150_public_key_to_ec_public_key(bytes: Buffer|Uint8Array, script: Buffer|Uint8Array): Buffer; -export function explicit_rangeproof(value: bigint, nonce: Buffer|Uint8Array, vbf: Buffer|Uint8Array, commitment: Buffer|Uint8Array, generator: Buffer|Uint8Array): Buffer; -export function explicit_rangeproof_verify(rangeproof: Buffer|Uint8Array, value: bigint, commitment: Buffer|Uint8Array, generator: Buffer|Uint8Array): void; -export function explicit_surjectionproof(output_asset: Buffer|Uint8Array, output_abf: Buffer|Uint8Array, output_generator: Buffer|Uint8Array): Buffer; -export function explicit_surjectionproof_verify(surjectionproof: Buffer|Uint8Array, output_asset: Buffer|Uint8Array, output_generator: Buffer|Uint8Array): void; -export function format_bitcoin_message(bytes: Buffer|Uint8Array, flags: number): Buffer; +export function elip150_private_key_to_ec_private_key(bytes: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null): Buffer; +export function elip150_private_key_to_ec_public_key(bytes: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null): Buffer; +export function elip150_public_key_to_ec_public_key(bytes: Buffer|Uint8Array|null, script: Buffer|Uint8Array|null): Buffer; +export function explicit_rangeproof(value: bigint, nonce: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null, commitment: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): Buffer; +export function explicit_rangeproof_verify(rangeproof: Buffer|Uint8Array|null, value: bigint, commitment: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): void; +export function explicit_surjectionproof(output_asset: Buffer|Uint8Array|null, output_abf: Buffer|Uint8Array|null, output_generator: Buffer|Uint8Array|null): Buffer; +export function explicit_surjectionproof_verify(surjectionproof: Buffer|Uint8Array|null, output_asset: Buffer|Uint8Array|null, output_generator: Buffer|Uint8Array|null): void; +export function format_bitcoin_message(bytes: Buffer|Uint8Array|null, flags: number): Buffer; export function free_string(str: Ref): void; export function get_build_version(): number; -export function get_hash_prevouts(txhashes: Buffer|Uint8Array, utxo_indices: Uint32Array|number[]): Buffer; +export function get_hash_prevouts(txhashes: Buffer|Uint8Array|null, utxo_indices: Uint32Array|number[]): Buffer; export function get_operations(output: Ref_wally_operations): void; -export function hash160(bytes: Buffer|Uint8Array): Buffer; -export function hex_from_bytes(bytes: Buffer|Uint8Array): string; +export function hash160(bytes: Buffer|Uint8Array|null): Buffer; +export function hex_from_bytes(bytes: Buffer|Uint8Array|null): string; export function hex_n_to_bytes(hex: string, hex_len: number): Buffer; export function hex_n_verify(hex: string, hex_len: number): void; export function hex_to_bytes(hex: string): Buffer; export function hex_verify(hex: string): void; -export function hmac_sha256(key: Buffer|Uint8Array, bytes: Buffer|Uint8Array): Buffer; -export function hmac_sha512(key: Buffer|Uint8Array, bytes: Buffer|Uint8Array): Buffer; +export function hmac_sha256(key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null): Buffer; +export function hmac_sha512(key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null): Buffer; export function init(flags: number): void; export function is_elements_build(): number; -export function keypath_bip32_verify(key: Buffer|Uint8Array, val: Buffer|Uint8Array): void; -export function keypath_get_fingerprint(val: Buffer|Uint8Array): Buffer; -export function keypath_get_path_len(val: Buffer|Uint8Array): number; -export function keypath_public_key_verify(key: Buffer|Uint8Array, val: Buffer|Uint8Array): void; -export function keypath_xonly_public_key_verify(key: Buffer|Uint8Array, val: Buffer|Uint8Array): void; -export function map_add(map_in: Ref_wally_map, key: Buffer|Uint8Array, value: Buffer|Uint8Array): void; -export function map_add_integer(map_in: Ref_wally_map, key: number, value: Buffer|Uint8Array): void; +export function keypath_bip32_verify(key: Buffer|Uint8Array|null, val: Buffer|Uint8Array|null): void; +export function keypath_get_fingerprint(val: Buffer|Uint8Array|null): Buffer; +export function keypath_get_path_len(val: Buffer|Uint8Array|null): number; +export function keypath_public_key_verify(key: Buffer|Uint8Array|null, val: Buffer|Uint8Array|null): void; +export function keypath_xonly_public_key_verify(key: Buffer|Uint8Array|null, val: Buffer|Uint8Array|null): void; +export function map_add(map_in: Ref_wally_map, key: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null): void; +export function map_add_integer(map_in: Ref_wally_map, key: number, value: Buffer|Uint8Array|null): void; export function map_assign(map_in: Ref_wally_map, source: Ref_wally_map): void; export function map_clear(map_in: Ref_wally_map): void; export function map_combine(map_in: Ref_wally_map, source: Ref_wally_map): void; -export function map_find(map_in: Ref_wally_map, key: Buffer|Uint8Array): number; +export function map_find(map_in: Ref_wally_map, key: Buffer|Uint8Array|null): number; export function map_find_bip32_public_key_from(map_in: Ref_wally_map, index: number, hdkey: Ref_ext_key): number; -export function map_find_from(map_in: Ref_wally_map, index: number, key: Buffer|Uint8Array): number; +export function map_find_from(map_in: Ref_wally_map, index: number, key: Buffer|Uint8Array|null): number; export function map_find_integer(map_in: Ref_wally_map, key: number): number; export function map_free(map_in: Ref_wally_map): void; export function map_get_item_integer_key(map_in: Ref_wally_map, index: number): number; export function map_get_item_key_length(map_in: Ref_wally_map, index: number): number; export function map_get_item_length(map_in: Ref_wally_map, index: number): number; export function map_get_num_items(map_in: Ref_wally_map): number; -export function map_hash_preimage_verify(key: Buffer|Uint8Array, val: Buffer|Uint8Array): void; +export function map_hash_preimage_verify(key: Buffer|Uint8Array|null, val: Buffer|Uint8Array|null): void; export function map_init(allocation_len: number, verify_fn: Ref): Ref_wally_map; export function map_init_noalloc(allocation_len: number, verify_fn: Ref, output: Ref_wally_map): void; -export function map_keypath_add(map_in: Ref_wally_map, pub_key: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function map_keypath_add(map_in: Ref_wally_map, pub_key: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function map_keypath_bip32_init(allocation_len: number): Ref_wally_map; export function map_keypath_get_bip32_key_from(map_in: Ref_wally_map, index: number, hdkey: Ref_ext_key): Ref_ext_key; export function map_keypath_get_bip32_key_from_noalloc(map_in: Ref_wally_map, index: number, hdkey: Ref_ext_key, output: Ref_ext_key): number; @@ -219,30 +219,30 @@ export function map_keypath_get_bip32_public_key_from(map_in: Ref_wally_map, ind export function map_keypath_get_item_fingerprint(map_in: Ref_wally_map, index: number): Buffer; export function map_keypath_get_item_path_len(map_in: Ref_wally_map, index: number): number; export function map_keypath_public_key_init(allocation_len: number): Ref_wally_map; -export function map_merkle_path_add(map_in: Ref_wally_map, pub_key: Buffer|Uint8Array, merkle_hashes: Buffer|Uint8Array): void; -export function map_preimage_hash160_add(map_in: Ref_wally_map, value: Buffer|Uint8Array): void; +export function map_merkle_path_add(map_in: Ref_wally_map, pub_key: Buffer|Uint8Array|null, merkle_hashes: Buffer|Uint8Array|null): void; +export function map_preimage_hash160_add(map_in: Ref_wally_map, value: Buffer|Uint8Array|null): void; export function map_preimage_init(allocation_len: number): Ref_wally_map; -export function map_preimage_ripemd160_add(map_in: Ref_wally_map, value: Buffer|Uint8Array): void; -export function map_preimage_sha256_add(map_in: Ref_wally_map, value: Buffer|Uint8Array): void; -export function map_preimage_sha256d_add(map_in: Ref_wally_map, value: Buffer|Uint8Array): void; -export function map_remove(map_in: Ref_wally_map, key: Buffer|Uint8Array): void; +export function map_preimage_ripemd160_add(map_in: Ref_wally_map, value: Buffer|Uint8Array|null): void; +export function map_preimage_sha256_add(map_in: Ref_wally_map, value: Buffer|Uint8Array|null): void; +export function map_preimage_sha256d_add(map_in: Ref_wally_map, value: Buffer|Uint8Array|null): void; +export function map_remove(map_in: Ref_wally_map, key: Buffer|Uint8Array|null): void; export function map_remove_integer(map_in: Ref_wally_map, key: number): void; -export function map_replace(map_in: Ref_wally_map, key: Buffer|Uint8Array, value: Buffer|Uint8Array): void; -export function map_replace_integer(map_in: Ref_wally_map, key: number, value: Buffer|Uint8Array): void; +export function map_replace(map_in: Ref_wally_map, key: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null): void; +export function map_replace_integer(map_in: Ref_wally_map, key: number, value: Buffer|Uint8Array|null): void; export function map_sort(map_in: Ref_wally_map, flags: number): void; -export function merkle_path_xonly_public_key_verify(key: Buffer|Uint8Array, val: Buffer|Uint8Array): void; -export function pbkdf2_hmac_sha256(pass: Buffer|Uint8Array, salt: Buffer|Uint8Array, flags: number, cost: number): Buffer; -export function pbkdf2_hmac_sha512(pass: Buffer|Uint8Array, salt: Buffer|Uint8Array, flags: number, cost: number): Buffer; -export function psbt_add_global_scalar(psbt: Ref_wally_psbt, scalar: Buffer|Uint8Array): void; -export function psbt_add_input_keypath(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; -export function psbt_add_input_signature(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array): void; -export function psbt_add_input_taproot_keypath(psbt: Ref_wally_psbt, index: number, flags: number, pub_key: Buffer|Uint8Array, tapleaf_hashes: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; -export function psbt_add_output_keypath(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; -export function psbt_add_output_taproot_keypath(psbt: Ref_wally_psbt, index: number, flags: number, pub_key: Buffer|Uint8Array, tapleaf_hashes: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function merkle_path_xonly_public_key_verify(key: Buffer|Uint8Array|null, val: Buffer|Uint8Array|null): void; +export function pbkdf2_hmac_sha256(pass: Buffer|Uint8Array|null, salt: Buffer|Uint8Array|null, flags: number, cost: number): Buffer; +export function pbkdf2_hmac_sha512(pass: Buffer|Uint8Array|null, salt: Buffer|Uint8Array|null, flags: number, cost: number): Buffer; +export function psbt_add_global_scalar(psbt: Ref_wally_psbt, scalar: Buffer|Uint8Array|null): void; +export function psbt_add_input_keypath(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; +export function psbt_add_input_signature(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null): void; +export function psbt_add_input_taproot_keypath(psbt: Ref_wally_psbt, index: number, flags: number, pub_key: Buffer|Uint8Array|null, tapleaf_hashes: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; +export function psbt_add_output_keypath(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; +export function psbt_add_output_taproot_keypath(psbt: Ref_wally_psbt, index: number, flags: number, pub_key: Buffer|Uint8Array|null, tapleaf_hashes: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function psbt_add_tx_input_at(psbt: Ref_wally_psbt, index: number, flags: number, input: Ref_wally_tx_input): void; export function psbt_add_tx_output_at(psbt: Ref_wally_psbt, index: number, flags: number, output: Ref_wally_tx_output): void; -export function psbt_blind(psbt: Ref_wally_psbt, values: Ref_wally_map, vbfs: Ref_wally_map, assets: Ref_wally_map, abfs: Ref_wally_map, entropy: Buffer|Uint8Array, output_index: number, flags: number): Ref_wally_map; -export function psbt_blind_noalloc(psbt: Ref_wally_psbt, values: Ref_wally_map, vbfs: Ref_wally_map, assets: Ref_wally_map, abfs: Ref_wally_map, entropy: Buffer|Uint8Array, output_index: number, flags: number, output: Ref_wally_map): void; +export function psbt_blind(psbt: Ref_wally_psbt, values: Ref_wally_map, vbfs: Ref_wally_map, assets: Ref_wally_map, abfs: Ref_wally_map, entropy: Buffer|Uint8Array|null, output_index: number, flags: number): Ref_wally_map; +export function psbt_blind_noalloc(psbt: Ref_wally_psbt, values: Ref_wally_map, vbfs: Ref_wally_map, assets: Ref_wally_map, abfs: Ref_wally_map, entropy: Buffer|Uint8Array|null, output_index: number, flags: number, output: Ref_wally_map): void; export function psbt_clear_fallback_locktime(psbt: Ref_wally_psbt): void; export function psbt_clear_input_amount(psbt: Ref_wally_psbt, index: number): void; export function psbt_clear_input_amount_rangeproof(psbt: Ref_wally_psbt, index: number): void; @@ -280,19 +280,19 @@ export function psbt_combine_ex(psbt: Ref_wally_psbt, flags: number, source: Ref export function psbt_extract(psbt: Ref_wally_psbt, flags: number): Ref_wally_tx; export function psbt_finalize(psbt: Ref_wally_psbt, flags: number): void; export function psbt_finalize_input(psbt: Ref_wally_psbt, index: number, flags: number): void; -export function psbt_find_global_scalar(psbt: Ref_wally_psbt, scalar: Buffer|Uint8Array): number; -export function psbt_find_input_keypath(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array): number; -export function psbt_find_input_signature(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array): number; -export function psbt_find_input_spending_utxo(psbt: Ref_wally_psbt, txhash: Buffer|Uint8Array, utxo_index: number): number; -export function psbt_find_input_unknown(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array): number; -export function psbt_find_output_keypath(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array): number; -export function psbt_find_output_unknown(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array): number; +export function psbt_find_global_scalar(psbt: Ref_wally_psbt, scalar: Buffer|Uint8Array|null): number; +export function psbt_find_input_keypath(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array|null): number; +export function psbt_find_input_signature(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null): number; +export function psbt_find_input_spending_utxo(psbt: Ref_wally_psbt, txhash: Buffer|Uint8Array|null, utxo_index: number): number; +export function psbt_find_input_unknown(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array|null): number; +export function psbt_find_output_keypath(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array|null): number; +export function psbt_find_output_unknown(psbt: Ref_wally_psbt, index: number, key: Buffer|Uint8Array|null): number; export function psbt_free(psbt: Ref_wally_psbt): void; export function psbt_from_base64(str_in: string, flags: number): Ref_wally_psbt; export function psbt_from_base64_n(str_in: string, str_len: number, flags: number): Ref_wally_psbt; -export function psbt_from_bytes(bytes: Buffer|Uint8Array, flags: number): Ref_wally_psbt; +export function psbt_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Ref_wally_psbt; export function psbt_from_tx(tx: Ref_wally_tx, version: number, flags: number): Ref_wally_psbt; -export function psbt_generate_input_explicit_proofs(psbt: Ref_wally_psbt, index: number, satoshi: bigint, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array, entropy: Buffer|Uint8Array): void; +export function psbt_generate_input_explicit_proofs(psbt: Ref_wally_psbt, index: number, satoshi: bigint, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null): void; export function psbt_get_fallback_locktime(psbt: Ref_wally_psbt): number; export function psbt_get_global_genesis_blockhash(psbt: Ref_wally_psbt): Buffer; export function psbt_get_global_scalar(psbt: Ref_wally_psbt, index: number): Buffer; @@ -329,10 +329,10 @@ export function psbt_get_input_previous_txid(psbt: Ref_wally_psbt, index: number export function psbt_get_input_redeem_script_len(psbt: Ref_wally_psbt, index: number): number; export function psbt_get_input_required_lockheight(psbt: Ref_wally_psbt, index: number): number; export function psbt_get_input_required_locktime(psbt: Ref_wally_psbt, index: number): number; -export function psbt_get_input_scriptcode_len(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): number; +export function psbt_get_input_scriptcode_len(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): number; export function psbt_get_input_sequence(psbt: Ref_wally_psbt, index: number): number; export function psbt_get_input_sighash(psbt: Ref_wally_psbt, index: number): number; -export function psbt_get_input_signature_hash(psbt: Ref_wally_psbt, index: number, tx: Ref_wally_tx, script: Buffer|Uint8Array, flags: number): Buffer; +export function psbt_get_input_signature_hash(psbt: Ref_wally_psbt, index: number, tx: Ref_wally_tx, script: Buffer|Uint8Array|null, flags: number): Buffer; export function psbt_get_input_signature_len(psbt: Ref_wally_psbt, index: number, subindex: number): number; export function psbt_get_input_signature_type(psbt: Ref_wally_psbt, index: number): number; export function psbt_get_input_signatures_size(psbt: Ref_wally_psbt, index: number): number; @@ -380,7 +380,7 @@ export function psbt_has_input_required_locktime(psbt: Ref_wally_psbt, index: nu export function psbt_has_output_amount(psbt: Ref_wally_psbt, index: number): number; export function psbt_has_output_blinder_index(psbt: Ref_wally_psbt, index: number): number; export function psbt_init(version: number, inputs_allocation_len: number, outputs_allocation_len: number, global_unknowns_allocation_len: number, flags: number): Ref_wally_psbt; -export function psbt_input_add_signature(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array): void; +export function psbt_input_add_signature(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null): void; export function psbt_input_clear_amount_rangeproof(input: Ref_wally_psbt_input): void; export function psbt_input_clear_asset(input: Ref_wally_psbt_input): void; export function psbt_input_clear_asset_surjectionproof(input: Ref_wally_psbt_input): void; @@ -399,10 +399,10 @@ export function psbt_input_clear_required_lockheight(input: Ref_wally_psbt_input export function psbt_input_clear_required_locktime(input: Ref_wally_psbt_input): void; export function psbt_input_clear_sequence(input: Ref_wally_psbt_input): void; export function psbt_input_clear_utxo_rangeproof(input: Ref_wally_psbt_input): void; -export function psbt_input_find_keypath(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array): number; -export function psbt_input_find_signature(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array): number; -export function psbt_input_find_unknown(input: Ref_wally_psbt_input, key: Buffer|Uint8Array): number; -export function psbt_input_generate_explicit_proofs(input: Ref_wally_psbt_input, satoshi: bigint, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, vbf: Buffer|Uint8Array, entropy: Buffer|Uint8Array): void; +export function psbt_input_find_keypath(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null): number; +export function psbt_input_find_signature(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null): number; +export function psbt_input_find_unknown(input: Ref_wally_psbt_input, key: Buffer|Uint8Array|null): number; +export function psbt_input_generate_explicit_proofs(input: Ref_wally_psbt_input, satoshi: bigint, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, vbf: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null): void; export function psbt_input_get_amount_rangeproof_len(input: Ref_wally_psbt_input): number; export function psbt_input_get_asset_len(input: Ref_wally_psbt_input): number; export function psbt_input_get_asset_surjectionproof_len(input: Ref_wally_psbt_input): number; @@ -419,47 +419,47 @@ export function psbt_input_get_pegin_genesis_blockhash_len(input: Ref_wally_psbt export function psbt_input_get_pegin_txout_proof_len(input: Ref_wally_psbt_input): number; export function psbt_input_get_utxo_rangeproof_len(input: Ref_wally_psbt_input): number; export function psbt_input_is_finalized(input: Ref_wally_psbt_input): number; -export function psbt_input_keypath_add(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function psbt_input_keypath_add(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function psbt_input_set_amount(input: Ref_wally_psbt_input, amount: bigint): void; -export function psbt_input_set_amount_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; -export function psbt_input_set_asset(input: Ref_wally_psbt_input, asset: Buffer|Uint8Array): void; -export function psbt_input_set_asset_surjectionproof(input: Ref_wally_psbt_input, surjectionproof: Buffer|Uint8Array): void; -export function psbt_input_set_final_scriptsig(input: Ref_wally_psbt_input, final_scriptsig: Buffer|Uint8Array): void; +export function psbt_input_set_amount_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_asset(input: Ref_wally_psbt_input, asset: Buffer|Uint8Array|null): void; +export function psbt_input_set_asset_surjectionproof(input: Ref_wally_psbt_input, surjectionproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_final_scriptsig(input: Ref_wally_psbt_input, final_scriptsig: Buffer|Uint8Array|null): void; export function psbt_input_set_final_witness(input: Ref_wally_psbt_input, witness: Ref_wally_tx_witness_stack): void; export function psbt_input_set_inflation_keys(input: Ref_wally_psbt_input, value: bigint): void; -export function psbt_input_set_inflation_keys_blinding_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; -export function psbt_input_set_inflation_keys_commitment(input: Ref_wally_psbt_input, commitment: Buffer|Uint8Array): void; -export function psbt_input_set_inflation_keys_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; +export function psbt_input_set_inflation_keys_blinding_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_inflation_keys_commitment(input: Ref_wally_psbt_input, commitment: Buffer|Uint8Array|null): void; +export function psbt_input_set_inflation_keys_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; export function psbt_input_set_issuance_amount(input: Ref_wally_psbt_input, amount: bigint): void; -export function psbt_input_set_issuance_amount_blinding_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; -export function psbt_input_set_issuance_amount_commitment(input: Ref_wally_psbt_input, commitment: Buffer|Uint8Array): void; -export function psbt_input_set_issuance_amount_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; -export function psbt_input_set_issuance_asset_entropy(input: Ref_wally_psbt_input, entropy: Buffer|Uint8Array): void; -export function psbt_input_set_issuance_blinding_nonce(input: Ref_wally_psbt_input, nonce: Buffer|Uint8Array): void; +export function psbt_input_set_issuance_amount_blinding_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_issuance_amount_commitment(input: Ref_wally_psbt_input, commitment: Buffer|Uint8Array|null): void; +export function psbt_input_set_issuance_amount_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_issuance_asset_entropy(input: Ref_wally_psbt_input, entropy: Buffer|Uint8Array|null): void; +export function psbt_input_set_issuance_blinding_nonce(input: Ref_wally_psbt_input, nonce: Buffer|Uint8Array|null): void; export function psbt_input_set_keypaths(input: Ref_wally_psbt_input, map_in: Ref_wally_map): void; export function psbt_input_set_output_index(input: Ref_wally_psbt_input, index: number): void; export function psbt_input_set_pegin_amount(input: Ref_wally_psbt_input, amount: bigint): void; -export function psbt_input_set_pegin_claim_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array): void; -export function psbt_input_set_pegin_genesis_blockhash(input: Ref_wally_psbt_input, genesis_blockhash: Buffer|Uint8Array): void; +export function psbt_input_set_pegin_claim_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array|null): void; +export function psbt_input_set_pegin_genesis_blockhash(input: Ref_wally_psbt_input, genesis_blockhash: Buffer|Uint8Array|null): void; export function psbt_input_set_pegin_tx(input: Ref_wally_psbt_input, tx: Ref_wally_tx): void; -export function psbt_input_set_pegin_txout_proof(input: Ref_wally_psbt_input, txout_proof: Buffer|Uint8Array): void; +export function psbt_input_set_pegin_txout_proof(input: Ref_wally_psbt_input, txout_proof: Buffer|Uint8Array|null): void; export function psbt_input_set_pegin_witness(input: Ref_wally_psbt_input, witness: Ref_wally_tx_witness_stack): void; -export function psbt_input_set_previous_txid(input: Ref_wally_psbt_input, txhash: Buffer|Uint8Array): void; -export function psbt_input_set_redeem_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array): void; +export function psbt_input_set_previous_txid(input: Ref_wally_psbt_input, txhash: Buffer|Uint8Array|null): void; +export function psbt_input_set_redeem_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array|null): void; export function psbt_input_set_required_lockheight(input: Ref_wally_psbt_input, required_lockheight: number): void; export function psbt_input_set_required_locktime(input: Ref_wally_psbt_input, required_locktime: number): void; export function psbt_input_set_sequence(input: Ref_wally_psbt_input, sequence: number): void; export function psbt_input_set_sighash(input: Ref_wally_psbt_input, sighash: number): void; export function psbt_input_set_signatures(input: Ref_wally_psbt_input, map_in: Ref_wally_map): void; -export function psbt_input_set_taproot_internal_key(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array): void; -export function psbt_input_set_taproot_signature(input: Ref_wally_psbt_input, tap_sig: Buffer|Uint8Array): void; +export function psbt_input_set_taproot_internal_key(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null): void; +export function psbt_input_set_taproot_signature(input: Ref_wally_psbt_input, tap_sig: Buffer|Uint8Array|null): void; export function psbt_input_set_unknowns(input: Ref_wally_psbt_input, map_in: Ref_wally_map): void; export function psbt_input_set_utxo(input: Ref_wally_psbt_input, utxo: Ref_wally_tx): void; -export function psbt_input_set_utxo_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array): void; -export function psbt_input_set_witness_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array): void; +export function psbt_input_set_utxo_rangeproof(input: Ref_wally_psbt_input, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_input_set_witness_script(input: Ref_wally_psbt_input, script: Buffer|Uint8Array|null): void; export function psbt_input_set_witness_utxo(input: Ref_wally_psbt_input, witness_utxo: Ref_wally_tx_output): void; export function psbt_input_set_witness_utxo_from_tx(input: Ref_wally_psbt_input, utxo: Ref_wally_tx, index: number): void; -export function psbt_input_taproot_keypath_add(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array, tapleaf_hashes: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function psbt_input_taproot_keypath_add(input: Ref_wally_psbt_input, pub_key: Buffer|Uint8Array|null, tapleaf_hashes: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function psbt_is_elements(psbt: Ref_wally_psbt): number; export function psbt_is_finalized(psbt: Ref_wally_psbt): number; export function psbt_is_input_finalized(psbt: Ref_wally_psbt, index: number): number; @@ -474,8 +474,8 @@ export function psbt_output_clear_ecdh_public_key(output: Ref_wally_psbt_output) export function psbt_output_clear_value_blinding_rangeproof(output: Ref_wally_psbt_output): void; export function psbt_output_clear_value_commitment(output: Ref_wally_psbt_output): void; export function psbt_output_clear_value_rangeproof(output: Ref_wally_psbt_output): void; -export function psbt_output_find_keypath(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array): number; -export function psbt_output_find_unknown(output: Ref_wally_psbt_output, key: Buffer|Uint8Array): number; +export function psbt_output_find_keypath(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null): number; +export function psbt_output_find_unknown(output: Ref_wally_psbt_output, key: Buffer|Uint8Array|null): number; export function psbt_output_get_asset_blinding_surjectionproof_len(output: Ref_wally_psbt_output): number; export function psbt_output_get_asset_commitment_len(output: Ref_wally_psbt_output): number; export function psbt_output_get_asset_len(output: Ref_wally_psbt_output): number; @@ -486,153 +486,153 @@ export function psbt_output_get_ecdh_public_key_len(output: Ref_wally_psbt_outpu export function psbt_output_get_value_blinding_rangeproof_len(output: Ref_wally_psbt_output): number; export function psbt_output_get_value_commitment_len(output: Ref_wally_psbt_output): number; export function psbt_output_get_value_rangeproof_len(output: Ref_wally_psbt_output): number; -export function psbt_output_keypath_add(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function psbt_output_keypath_add(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function psbt_output_set_amount(output: Ref_wally_psbt_output, amount: bigint): void; -export function psbt_output_set_asset(output: Ref_wally_psbt_output, asset: Buffer|Uint8Array): void; -export function psbt_output_set_asset_blinding_surjectionproof(output: Ref_wally_psbt_output, surjectionproof: Buffer|Uint8Array): void; -export function psbt_output_set_asset_commitment(output: Ref_wally_psbt_output, commitment: Buffer|Uint8Array): void; -export function psbt_output_set_asset_surjectionproof(output: Ref_wally_psbt_output, surjectionproof: Buffer|Uint8Array): void; +export function psbt_output_set_asset(output: Ref_wally_psbt_output, asset: Buffer|Uint8Array|null): void; +export function psbt_output_set_asset_blinding_surjectionproof(output: Ref_wally_psbt_output, surjectionproof: Buffer|Uint8Array|null): void; +export function psbt_output_set_asset_commitment(output: Ref_wally_psbt_output, commitment: Buffer|Uint8Array|null): void; +export function psbt_output_set_asset_surjectionproof(output: Ref_wally_psbt_output, surjectionproof: Buffer|Uint8Array|null): void; export function psbt_output_set_blinder_index(output: Ref_wally_psbt_output, index: number): void; -export function psbt_output_set_blinding_public_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array): void; -export function psbt_output_set_ecdh_public_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array): void; +export function psbt_output_set_blinding_public_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null): void; +export function psbt_output_set_ecdh_public_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null): void; export function psbt_output_set_keypaths(output: Ref_wally_psbt_output, map_in: Ref_wally_map): void; -export function psbt_output_set_redeem_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array): void; -export function psbt_output_set_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array): void; -export function psbt_output_set_taproot_internal_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array): void; +export function psbt_output_set_redeem_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array|null): void; +export function psbt_output_set_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array|null): void; +export function psbt_output_set_taproot_internal_key(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null): void; export function psbt_output_set_unknowns(output: Ref_wally_psbt_output, map_in: Ref_wally_map): void; -export function psbt_output_set_value_blinding_rangeproof(output: Ref_wally_psbt_output, rangeproof: Buffer|Uint8Array): void; -export function psbt_output_set_value_commitment(output: Ref_wally_psbt_output, commitment: Buffer|Uint8Array): void; -export function psbt_output_set_value_rangeproof(output: Ref_wally_psbt_output, rangeproof: Buffer|Uint8Array): void; -export function psbt_output_set_witness_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array): void; -export function psbt_output_taproot_keypath_add(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array, tapleaf_hashes: Buffer|Uint8Array, fingerprint: Buffer|Uint8Array, child_path: Uint32Array|number[]): void; +export function psbt_output_set_value_blinding_rangeproof(output: Ref_wally_psbt_output, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_output_set_value_commitment(output: Ref_wally_psbt_output, commitment: Buffer|Uint8Array|null): void; +export function psbt_output_set_value_rangeproof(output: Ref_wally_psbt_output, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_output_set_witness_script(output: Ref_wally_psbt_output, script: Buffer|Uint8Array|null): void; +export function psbt_output_taproot_keypath_add(output: Ref_wally_psbt_output, pub_key: Buffer|Uint8Array|null, tapleaf_hashes: Buffer|Uint8Array|null, fingerprint: Buffer|Uint8Array|null, child_path: Uint32Array|number[]): void; export function psbt_remove_input(psbt: Ref_wally_psbt, index: number): void; export function psbt_remove_output(psbt: Ref_wally_psbt, index: number): void; export function psbt_set_fallback_locktime(psbt: Ref_wally_psbt, locktime: number): void; -export function psbt_set_global_genesis_blockhash(psbt: Ref_wally_psbt, genesis_blockhash: Buffer|Uint8Array): void; +export function psbt_set_global_genesis_blockhash(psbt: Ref_wally_psbt, genesis_blockhash: Buffer|Uint8Array|null): void; export function psbt_set_global_scalars(psbt: Ref_wally_psbt, map_in: Ref_wally_map): void; export function psbt_set_global_tx(psbt: Ref_wally_psbt, tx: Ref_wally_tx): void; export function psbt_set_input_amount(psbt: Ref_wally_psbt, index: number, amount: bigint): void; -export function psbt_set_input_amount_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_input_asset(psbt: Ref_wally_psbt, index: number, asset: Buffer|Uint8Array): void; -export function psbt_set_input_asset_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array): void; -export function psbt_set_input_final_scriptsig(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; +export function psbt_set_input_amount_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_asset(psbt: Ref_wally_psbt, index: number, asset: Buffer|Uint8Array|null): void; +export function psbt_set_input_asset_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_final_scriptsig(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; export function psbt_set_input_final_witness(psbt: Ref_wally_psbt, index: number, final_witness: Ref_wally_tx_witness_stack): void; export function psbt_set_input_inflation_keys(psbt: Ref_wally_psbt, index: number, amount: bigint): void; -export function psbt_set_input_inflation_keys_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_input_inflation_keys_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array): void; -export function psbt_set_input_inflation_keys_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; +export function psbt_set_input_inflation_keys_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_inflation_keys_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array|null): void; +export function psbt_set_input_inflation_keys_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; export function psbt_set_input_issuance_amount(psbt: Ref_wally_psbt, index: number, amount: bigint): void; -export function psbt_set_input_issuance_amount_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_input_issuance_amount_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array): void; -export function psbt_set_input_issuance_amount_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_input_issuance_asset_entropy(psbt: Ref_wally_psbt, index: number, entropy: Buffer|Uint8Array): void; -export function psbt_set_input_issuance_blinding_nonce(psbt: Ref_wally_psbt, index: number, nonce: Buffer|Uint8Array): void; +export function psbt_set_input_issuance_amount_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_issuance_amount_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array|null): void; +export function psbt_set_input_issuance_amount_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_issuance_asset_entropy(psbt: Ref_wally_psbt, index: number, entropy: Buffer|Uint8Array|null): void; +export function psbt_set_input_issuance_blinding_nonce(psbt: Ref_wally_psbt, index: number, nonce: Buffer|Uint8Array|null): void; export function psbt_set_input_keypaths(psbt: Ref_wally_psbt, index: number, map_in: Ref_wally_map): void; export function psbt_set_input_output_index(psbt: Ref_wally_psbt, index: number, output_index: number): void; export function psbt_set_input_pegin_amount(psbt: Ref_wally_psbt, index: number, amount: bigint): void; -export function psbt_set_input_pegin_claim_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; -export function psbt_set_input_pegin_genesis_blockhash(psbt: Ref_wally_psbt, index: number, genesis_blockhash: Buffer|Uint8Array): void; -export function psbt_set_input_pegin_txout_proof(psbt: Ref_wally_psbt, index: number, txout_proof: Buffer|Uint8Array): void; -export function psbt_set_input_previous_txid(psbt: Ref_wally_psbt, index: number, txhash: Buffer|Uint8Array): void; -export function psbt_set_input_redeem_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; +export function psbt_set_input_pegin_claim_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; +export function psbt_set_input_pegin_genesis_blockhash(psbt: Ref_wally_psbt, index: number, genesis_blockhash: Buffer|Uint8Array|null): void; +export function psbt_set_input_pegin_txout_proof(psbt: Ref_wally_psbt, index: number, txout_proof: Buffer|Uint8Array|null): void; +export function psbt_set_input_previous_txid(psbt: Ref_wally_psbt, index: number, txhash: Buffer|Uint8Array|null): void; +export function psbt_set_input_redeem_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; export function psbt_set_input_required_lockheight(psbt: Ref_wally_psbt, index: number, lockheight: number): void; export function psbt_set_input_required_locktime(psbt: Ref_wally_psbt, index: number, locktime: number): void; export function psbt_set_input_sequence(psbt: Ref_wally_psbt, index: number, sequence: number): void; export function psbt_set_input_sighash(psbt: Ref_wally_psbt, index: number, sighash: number): void; export function psbt_set_input_signatures(psbt: Ref_wally_psbt, index: number, map_in: Ref_wally_map): void; -export function psbt_set_input_taproot_internal_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array): void; -export function psbt_set_input_taproot_signature(psbt: Ref_wally_psbt, index: number, sig: Buffer|Uint8Array): void; +export function psbt_set_input_taproot_internal_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null): void; +export function psbt_set_input_taproot_signature(psbt: Ref_wally_psbt, index: number, sig: Buffer|Uint8Array|null): void; export function psbt_set_input_unknowns(psbt: Ref_wally_psbt, index: number, map_in: Ref_wally_map): void; export function psbt_set_input_utxo(psbt: Ref_wally_psbt, index: number, utxo: Ref_wally_tx): void; -export function psbt_set_input_utxo_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_input_witness_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; +export function psbt_set_input_utxo_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_input_witness_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; export function psbt_set_input_witness_utxo(psbt: Ref_wally_psbt, index: number, witness_utxo: Ref_wally_tx_output): void; export function psbt_set_input_witness_utxo_from_tx(psbt: Ref_wally_psbt, index: number, utxo: Ref_wally_tx, utxo_index: number): void; export function psbt_set_output_amount(psbt: Ref_wally_psbt, index: number, amount: bigint): void; -export function psbt_set_output_asset(psbt: Ref_wally_psbt, index: number, asset: Buffer|Uint8Array): void; -export function psbt_set_output_asset_blinding_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array): void; -export function psbt_set_output_asset_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array): void; -export function psbt_set_output_asset_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array): void; +export function psbt_set_output_asset(psbt: Ref_wally_psbt, index: number, asset: Buffer|Uint8Array|null): void; +export function psbt_set_output_asset_blinding_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array|null): void; +export function psbt_set_output_asset_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array|null): void; +export function psbt_set_output_asset_surjectionproof(psbt: Ref_wally_psbt, index: number, surjectionproof: Buffer|Uint8Array|null): void; export function psbt_set_output_blinder_index(psbt: Ref_wally_psbt, index: number, idx: number): void; -export function psbt_set_output_blinding_public_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array): void; -export function psbt_set_output_ecdh_public_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array): void; +export function psbt_set_output_blinding_public_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null): void; +export function psbt_set_output_ecdh_public_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null): void; export function psbt_set_output_keypaths(psbt: Ref_wally_psbt, index: number, map_in: Ref_wally_map): void; -export function psbt_set_output_redeem_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; -export function psbt_set_output_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; -export function psbt_set_output_taproot_internal_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array): void; +export function psbt_set_output_redeem_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; +export function psbt_set_output_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; +export function psbt_set_output_taproot_internal_key(psbt: Ref_wally_psbt, index: number, pub_key: Buffer|Uint8Array|null): void; export function psbt_set_output_unknowns(psbt: Ref_wally_psbt, index: number, map_in: Ref_wally_map): void; -export function psbt_set_output_value_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_output_value_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array): void; -export function psbt_set_output_value_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array): void; -export function psbt_set_output_witness_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): void; +export function psbt_set_output_value_blinding_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_output_value_commitment(psbt: Ref_wally_psbt, index: number, commitment: Buffer|Uint8Array|null): void; +export function psbt_set_output_value_rangeproof(psbt: Ref_wally_psbt, index: number, rangeproof: Buffer|Uint8Array|null): void; +export function psbt_set_output_witness_script(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): void; export function psbt_set_pset_modifiable_flags(psbt: Ref_wally_psbt, flags: number): void; export function psbt_set_tx_modifiable_flags(psbt: Ref_wally_psbt, flags: number): void; export function psbt_set_tx_version(psbt: Ref_wally_psbt, version: number): void; export function psbt_set_version(psbt: Ref_wally_psbt, flags: number, version: number): void; -export function psbt_sign(psbt: Ref_wally_psbt, key: Buffer|Uint8Array, flags: number): void; +export function psbt_sign(psbt: Ref_wally_psbt, key: Buffer|Uint8Array|null, flags: number): void; export function psbt_sign_bip32(psbt: Ref_wally_psbt, hdkey: Ref_ext_key, flags: number): void; -export function psbt_sign_input_bip32(psbt: Ref_wally_psbt, index: number, subindex: number, txhash: Buffer|Uint8Array, hdkey: Ref_ext_key, flags: number): void; +export function psbt_sign_input_bip32(psbt: Ref_wally_psbt, index: number, subindex: number, txhash: Buffer|Uint8Array|null, hdkey: Ref_ext_key, flags: number): void; export function psbt_signing_cache_disable(psbt: Ref_wally_psbt): void; export function psbt_signing_cache_enable(psbt: Ref_wally_psbt, flags: number): void; export function psbt_to_base64(psbt: Ref_wally_psbt, flags: number): string; -export function ripemd160(bytes: Buffer|Uint8Array): Buffer; -export function s2c_commitment_verify(sig: Buffer|Uint8Array, s2c_data: Buffer|Uint8Array, s2c_opening: Buffer|Uint8Array, flags: number): void; -export function s2c_sig_from_bytes(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, s2c_data: Buffer|Uint8Array, flags: number): [s2c_opening_out: Buffer, bytes_out: Buffer]; -export function script_push_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function scriptpubkey_csv_2of2_then_1_from_bytes(bytes: Buffer|Uint8Array, csv_blocks: number, flags: number): Buffer; -export function scriptpubkey_csv_2of2_then_1_from_bytes_opt(bytes: Buffer|Uint8Array, csv_blocks: number, flags: number): Buffer; -export function scriptpubkey_csv_blocks_from_csv_2of2_then_1(bytes: Buffer|Uint8Array): number; -export function scriptpubkey_get_type(bytes: Buffer|Uint8Array): number; -export function scriptpubkey_multisig_from_bytes(bytes: Buffer|Uint8Array, threshold: number, flags: number): Buffer; -export function scriptpubkey_op_return_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function scriptpubkey_p2pkh_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function scriptpubkey_p2sh_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function scriptpubkey_p2tr_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function scriptpubkey_to_address(scriptpubkey: Buffer|Uint8Array, network: number): string; -export function scriptsig_multisig_from_bytes(script: Buffer|Uint8Array, bytes: Buffer|Uint8Array, sighash: Uint32Array|number[], flags: number): Buffer; -export function scriptsig_p2pkh_from_der(pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array): Buffer; -export function scriptsig_p2pkh_from_sig(pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array, sighash: number): Buffer; -export function scrypt(pass: Buffer|Uint8Array, salt: Buffer|Uint8Array, cost: number, block_size: number, parallelism: number, out_len: number): Buffer; -export function secp_randomize(bytes: Buffer|Uint8Array): void; +export function ripemd160(bytes: Buffer|Uint8Array|null): Buffer; +export function s2c_commitment_verify(sig: Buffer|Uint8Array|null, s2c_data: Buffer|Uint8Array|null, s2c_opening: Buffer|Uint8Array|null, flags: number): void; +export function s2c_sig_from_bytes(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, s2c_data: Buffer|Uint8Array|null, flags: number): [s2c_opening_out: Buffer, bytes_out: Buffer]; +export function script_push_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function scriptpubkey_csv_2of2_then_1_from_bytes(bytes: Buffer|Uint8Array|null, csv_blocks: number, flags: number): Buffer; +export function scriptpubkey_csv_2of2_then_1_from_bytes_opt(bytes: Buffer|Uint8Array|null, csv_blocks: number, flags: number): Buffer; +export function scriptpubkey_csv_blocks_from_csv_2of2_then_1(bytes: Buffer|Uint8Array|null): number; +export function scriptpubkey_get_type(bytes: Buffer|Uint8Array|null): number; +export function scriptpubkey_multisig_from_bytes(bytes: Buffer|Uint8Array|null, threshold: number, flags: number): Buffer; +export function scriptpubkey_op_return_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function scriptpubkey_p2pkh_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function scriptpubkey_p2sh_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function scriptpubkey_p2tr_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function scriptpubkey_to_address(scriptpubkey: Buffer|Uint8Array|null, network: number): string; +export function scriptsig_multisig_from_bytes(script: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, sighash: Uint32Array|number[], flags: number): Buffer; +export function scriptsig_p2pkh_from_der(pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null): Buffer; +export function scriptsig_p2pkh_from_sig(pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null, sighash: number): Buffer; +export function scrypt(pass: Buffer|Uint8Array|null, salt: Buffer|Uint8Array|null, cost: number, block_size: number, parallelism: number, out_len: number): Buffer; +export function secp_randomize(bytes: Buffer|Uint8Array|null): void; export function set_operations(ops: Ref_wally_operations): void; -export function sha256(bytes: Buffer|Uint8Array): Buffer; -export function sha256_midstate(bytes: Buffer|Uint8Array): Buffer; -export function sha256d(bytes: Buffer|Uint8Array): Buffer; -export function sha512(bytes: Buffer|Uint8Array): Buffer; -export function symmetric_key_from_parent(bytes: Buffer|Uint8Array, version: number, label: Buffer|Uint8Array): Buffer; -export function symmetric_key_from_seed(bytes: Buffer|Uint8Array): Buffer; -export function tx_add_elements_raw_input(tx: Ref_wally_tx, txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array, entropy: Buffer|Uint8Array, issuance_amount: Buffer|Uint8Array, inflation_keys: Buffer|Uint8Array, issuance_amount_rangeproof: Buffer|Uint8Array, inflation_keys_rangeproof: Buffer|Uint8Array, pegin_witness: Ref_wally_tx_witness_stack, flags: number): void; -export function tx_add_elements_raw_input_at(tx: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array, entropy: Buffer|Uint8Array, issuance_amount: Buffer|Uint8Array, inflation_keys: Buffer|Uint8Array, issuance_amount_rangeproof: Buffer|Uint8Array, inflation_keys_rangeproof: Buffer|Uint8Array, pegin_witness: Ref_wally_tx_witness_stack, flags: number): void; -export function tx_add_elements_raw_output(tx: Ref_wally_tx, script: Buffer|Uint8Array, asset: Buffer|Uint8Array, value: Buffer|Uint8Array, nonce: Buffer|Uint8Array, surjectionproof: Buffer|Uint8Array, rangeproof: Buffer|Uint8Array, flags: number): void; -export function tx_add_elements_raw_output_at(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array, asset: Buffer|Uint8Array, value: Buffer|Uint8Array, nonce: Buffer|Uint8Array, surjectionproof: Buffer|Uint8Array, rangeproof: Buffer|Uint8Array, flags: number): void; +export function sha256(bytes: Buffer|Uint8Array|null): Buffer; +export function sha256_midstate(bytes: Buffer|Uint8Array|null): Buffer; +export function sha256d(bytes: Buffer|Uint8Array|null): Buffer; +export function sha512(bytes: Buffer|Uint8Array|null): Buffer; +export function symmetric_key_from_parent(bytes: Buffer|Uint8Array|null, version: number, label: Buffer|Uint8Array|null): Buffer; +export function symmetric_key_from_seed(bytes: Buffer|Uint8Array|null): Buffer; +export function tx_add_elements_raw_input(tx: Ref_wally_tx, txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, issuance_amount: Buffer|Uint8Array|null, inflation_keys: Buffer|Uint8Array|null, issuance_amount_rangeproof: Buffer|Uint8Array|null, inflation_keys_rangeproof: Buffer|Uint8Array|null, pegin_witness: Ref_wally_tx_witness_stack, flags: number): void; +export function tx_add_elements_raw_input_at(tx: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, issuance_amount: Buffer|Uint8Array|null, inflation_keys: Buffer|Uint8Array|null, issuance_amount_rangeproof: Buffer|Uint8Array|null, inflation_keys_rangeproof: Buffer|Uint8Array|null, pegin_witness: Ref_wally_tx_witness_stack, flags: number): void; +export function tx_add_elements_raw_output(tx: Ref_wally_tx, script: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, nonce: Buffer|Uint8Array|null, surjectionproof: Buffer|Uint8Array|null, rangeproof: Buffer|Uint8Array|null, flags: number): void; +export function tx_add_elements_raw_output_at(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, nonce: Buffer|Uint8Array|null, surjectionproof: Buffer|Uint8Array|null, rangeproof: Buffer|Uint8Array|null, flags: number): void; export function tx_add_input(tx: Ref_wally_tx, input: Ref_wally_tx_input): void; export function tx_add_input_at(tx: Ref_wally_tx, index: number, input: Ref_wally_tx_input): void; export function tx_add_output(tx: Ref_wally_tx, output: Ref_wally_tx_output): void; export function tx_add_output_at(tx: Ref_wally_tx, index: number, output: Ref_wally_tx_output): void; -export function tx_add_raw_input(tx: Ref_wally_tx, txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack, flags: number): void; -export function tx_add_raw_input_at(tx: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack, flags: number): void; -export function tx_add_raw_output(tx: Ref_wally_tx, satoshi: bigint, script: Buffer|Uint8Array, flags: number): void; -export function tx_add_raw_output_at(tx: Ref_wally_tx, index: number, satoshi: bigint, script: Buffer|Uint8Array, flags: number): void; +export function tx_add_raw_input(tx: Ref_wally_tx, txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack, flags: number): void; +export function tx_add_raw_input_at(tx: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack, flags: number): void; +export function tx_add_raw_output(tx: Ref_wally_tx, satoshi: bigint, script: Buffer|Uint8Array|null, flags: number): void; +export function tx_add_raw_output_at(tx: Ref_wally_tx, index: number, satoshi: bigint, script: Buffer|Uint8Array|null, flags: number): void; export function tx_clone(tx: Ref_wally_tx, flags: number): Ref_wally_tx; export function tx_confidential_value_from_satoshi(satoshi: bigint): Buffer; -export function tx_confidential_value_to_satoshi(value: Buffer|Uint8Array): bigint; -export function tx_elements_input_init(txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array, entropy: Buffer|Uint8Array, issuance_amount: Buffer|Uint8Array, inflation_keys: Buffer|Uint8Array, issuance_amount_rangeproof: Buffer|Uint8Array, inflation_keys_rangeproof: Buffer|Uint8Array, pegin_witness: Ref_wally_tx_witness_stack): Ref_wally_tx_input; +export function tx_confidential_value_to_satoshi(value: Buffer|Uint8Array|null): bigint; +export function tx_elements_input_init(txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack, nonce: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, issuance_amount: Buffer|Uint8Array|null, inflation_keys: Buffer|Uint8Array|null, issuance_amount_rangeproof: Buffer|Uint8Array|null, inflation_keys_rangeproof: Buffer|Uint8Array|null, pegin_witness: Ref_wally_tx_witness_stack): Ref_wally_tx_input; export function tx_elements_input_is_pegin(input: Ref_wally_tx_input): number; export function tx_elements_input_issuance_free(input: Ref_wally_tx_input): void; -export function tx_elements_input_issuance_set(input: Ref_wally_tx_input, nonce: Buffer|Uint8Array, entropy: Buffer|Uint8Array, issuance_amount: Buffer|Uint8Array, inflation_keys: Buffer|Uint8Array, issuance_amount_rangeproof: Buffer|Uint8Array, inflation_keys_rangeproof: Buffer|Uint8Array): void; -export function tx_elements_issuance_calculate_asset(entropy: Buffer|Uint8Array): Buffer; -export function tx_elements_issuance_calculate_reissuance_token(entropy: Buffer|Uint8Array, flags: number): Buffer; -export function tx_elements_issuance_generate_entropy(txhash: Buffer|Uint8Array, utxo_index: number, contract_hash: Buffer|Uint8Array): Buffer; +export function tx_elements_input_issuance_set(input: Ref_wally_tx_input, nonce: Buffer|Uint8Array|null, entropy: Buffer|Uint8Array|null, issuance_amount: Buffer|Uint8Array|null, inflation_keys: Buffer|Uint8Array|null, issuance_amount_rangeproof: Buffer|Uint8Array|null, inflation_keys_rangeproof: Buffer|Uint8Array|null): void; +export function tx_elements_issuance_calculate_asset(entropy: Buffer|Uint8Array|null): Buffer; +export function tx_elements_issuance_calculate_reissuance_token(entropy: Buffer|Uint8Array|null, flags: number): Buffer; +export function tx_elements_issuance_generate_entropy(txhash: Buffer|Uint8Array|null, utxo_index: number, contract_hash: Buffer|Uint8Array|null): Buffer; export function tx_elements_output_commitment_free(output: Ref_wally_tx_output): void; -export function tx_elements_output_commitment_set(output: Ref_wally_tx_output, asset: Buffer|Uint8Array, value: Buffer|Uint8Array, nonce: Buffer|Uint8Array, surjectionproof: Buffer|Uint8Array, rangeproof: Buffer|Uint8Array): void; -export function tx_elements_output_init(script: Buffer|Uint8Array, asset: Buffer|Uint8Array, value: Buffer|Uint8Array, nonce: Buffer|Uint8Array, surjectionproof: Buffer|Uint8Array, rangeproof: Buffer|Uint8Array): Ref_wally_tx_output; -export function tx_elements_output_init_noalloc(script: Buffer|Uint8Array, asset: Buffer|Uint8Array, value: Buffer|Uint8Array, nonce: Buffer|Uint8Array, surjectionproof: Buffer|Uint8Array, rangeproof: Buffer|Uint8Array, output: Ref_wally_tx_output): void; +export function tx_elements_output_commitment_set(output: Ref_wally_tx_output, asset: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, nonce: Buffer|Uint8Array|null, surjectionproof: Buffer|Uint8Array|null, rangeproof: Buffer|Uint8Array|null): void; +export function tx_elements_output_init(script: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, nonce: Buffer|Uint8Array|null, surjectionproof: Buffer|Uint8Array|null, rangeproof: Buffer|Uint8Array|null): Ref_wally_tx_output; +export function tx_elements_output_init_noalloc(script: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, nonce: Buffer|Uint8Array|null, surjectionproof: Buffer|Uint8Array|null, rangeproof: Buffer|Uint8Array|null, output: Ref_wally_tx_output): void; export function tx_free(tx: Ref_wally_tx): void; -export function tx_from_bytes(bytes: Buffer|Uint8Array, flags: number): Ref_wally_tx; +export function tx_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Ref_wally_tx; export function tx_from_hex(hex: string, flags: number): Ref_wally_tx; -export function tx_get_btc_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array, satoshi: bigint, sighash: number, flags: number): Buffer; -export function tx_get_btc_taproot_signature_hash(tx: Ref_wally_tx, index: number, scripts: Ref_wally_map, values: BigUint64Array|Array, tapleaf_script: Buffer|Uint8Array, key_version: number, codesep_position: number, annex: Buffer|Uint8Array, sighash: number, flags: number): Buffer; -export function tx_get_elements_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array, value: Buffer|Uint8Array, sighash: number, flags: number): Buffer; +export function tx_get_btc_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null, satoshi: bigint, sighash: number, flags: number): Buffer; +export function tx_get_btc_taproot_signature_hash(tx: Ref_wally_tx, index: number, scripts: Ref_wally_map, values: BigUint64Array|Array, tapleaf_script: Buffer|Uint8Array|null, key_version: number, codesep_position: number, annex: Buffer|Uint8Array|null, sighash: number, flags: number): Buffer; +export function tx_get_elements_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null, value: Buffer|Uint8Array|null, sighash: number, flags: number): Buffer; export function tx_get_elements_weight_discount(tx: Ref_wally_tx, flags: number): number; export function tx_get_hash_prevouts(tx: Ref_wally_tx, index: number, num_inputs: number): Buffer; export function tx_get_input_blinding_nonce(tx_in: Ref_wally_tx, index: number): Buffer; @@ -644,7 +644,7 @@ export function tx_get_input_issuance_amount_len(tx_in: Ref_wally_tx, index: num export function tx_get_input_issuance_amount_rangeproof_len(tx_in: Ref_wally_tx, index: number): number; export function tx_get_input_script_len(tx_in: Ref_wally_tx, index: number): number; export function tx_get_input_sequence(tx_in: Ref_wally_tx, index: number): number; -export function tx_get_input_signature_hash(tx: Ref_wally_tx, index: number, scripts: Ref_wally_map, assets: Ref_wally_map, values: Ref_wally_map, script: Buffer|Uint8Array, key_version: number, codesep_position: number, annex: Buffer|Uint8Array, genesis_blockhash: Buffer|Uint8Array, sighash: number, flags: number, cache: Ref_wally_map): Buffer; +export function tx_get_input_signature_hash(tx: Ref_wally_tx, index: number, scripts: Ref_wally_map, assets: Ref_wally_map, values: Ref_wally_map, script: Buffer|Uint8Array|null, key_version: number, codesep_position: number, annex: Buffer|Uint8Array|null, genesis_blockhash: Buffer|Uint8Array|null, sighash: number, flags: number, cache: Ref_wally_map): Buffer; export function tx_get_input_txhash(tx_in: Ref_wally_tx, index: number): Buffer; export function tx_get_input_witness_len(tx_in: Ref_wally_tx, index: number, wit_index: number): number; export function tx_get_input_witness_num_items(tx_in: Ref_wally_tx, index: number): number; @@ -659,7 +659,7 @@ export function tx_get_output_satoshi(tx_in: Ref_wally_tx, index: number): bigin export function tx_get_output_script_len(tx_in: Ref_wally_tx, index: number): number; export function tx_get_output_surjectionproof_len(tx_in: Ref_wally_tx, index: number): number; export function tx_get_output_value_len(tx_in: Ref_wally_tx, index: number): number; -export function tx_get_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array, extra: Buffer|Uint8Array, extra_offset: number, satoshi: bigint, sighash: number, tx_sighash: number, flags: number): Buffer; +export function tx_get_signature_hash(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null, extra: Buffer|Uint8Array|null, extra_offset: number, satoshi: bigint, sighash: number, tx_sighash: number, flags: number): Buffer; export function tx_get_total_output_satoshi(tx: Ref_wally_tx): bigint; export function tx_get_txid(tx: Ref_wally_tx): Buffer; export function tx_get_version(tx_in: Ref_wally_tx): number; @@ -682,17 +682,17 @@ export function tx_input_get_sequence(tx_input_in: Ref_wally_tx_input): number; export function tx_input_get_txhash(tx_input_in: Ref_wally_tx_input): Buffer; export function tx_input_get_witness_len(tx_input_in: Ref_wally_tx_input, index: number): number; export function tx_input_get_witness_num_items(tx_input_in: Ref_wally_tx_input): number; -export function tx_input_init(txhash: Buffer|Uint8Array, utxo_index: number, sequence: number, script: Buffer|Uint8Array, witness: Ref_wally_tx_witness_stack): Ref_wally_tx_input; -export function tx_input_set_blinding_nonce(tx_input_in: Ref_wally_tx_input, blinding_nonce: Buffer|Uint8Array): void; -export function tx_input_set_entropy(tx_input_in: Ref_wally_tx_input, entropy: Buffer|Uint8Array): void; +export function tx_input_init(txhash: Buffer|Uint8Array|null, utxo_index: number, sequence: number, script: Buffer|Uint8Array|null, witness: Ref_wally_tx_witness_stack): Ref_wally_tx_input; +export function tx_input_set_blinding_nonce(tx_input_in: Ref_wally_tx_input, blinding_nonce: Buffer|Uint8Array|null): void; +export function tx_input_set_entropy(tx_input_in: Ref_wally_tx_input, entropy: Buffer|Uint8Array|null): void; export function tx_input_set_index(tx_input: Ref_wally_tx_input, index: number): void; -export function tx_input_set_inflation_keys(tx_input_in: Ref_wally_tx_input, inflation_keys: Buffer|Uint8Array): void; -export function tx_input_set_inflation_keys_rangeproof(tx_input_in: Ref_wally_tx_input, inflation_keys_rangeproof: Buffer|Uint8Array): void; -export function tx_input_set_issuance_amount(tx_input_in: Ref_wally_tx_input, issuance_amount: Buffer|Uint8Array): void; -export function tx_input_set_issuance_amount_rangeproof(tx_input_in: Ref_wally_tx_input, issuance_amount_rangeproof: Buffer|Uint8Array): void; -export function tx_input_set_script(tx_input: Ref_wally_tx_input, script: Buffer|Uint8Array): void; +export function tx_input_set_inflation_keys(tx_input_in: Ref_wally_tx_input, inflation_keys: Buffer|Uint8Array|null): void; +export function tx_input_set_inflation_keys_rangeproof(tx_input_in: Ref_wally_tx_input, inflation_keys_rangeproof: Buffer|Uint8Array|null): void; +export function tx_input_set_issuance_amount(tx_input_in: Ref_wally_tx_input, issuance_amount: Buffer|Uint8Array|null): void; +export function tx_input_set_issuance_amount_rangeproof(tx_input_in: Ref_wally_tx_input, issuance_amount_rangeproof: Buffer|Uint8Array|null): void; +export function tx_input_set_script(tx_input: Ref_wally_tx_input, script: Buffer|Uint8Array|null): void; export function tx_input_set_sequence(tx_input: Ref_wally_tx_input, sequence: number): void; -export function tx_input_set_txhash(tx_input: Ref_wally_tx_input, txhash: Buffer|Uint8Array): void; +export function tx_input_set_txhash(tx_input: Ref_wally_tx_input, txhash: Buffer|Uint8Array|null): void; export function tx_input_set_witness(tx_input: Ref_wally_tx_input, witness: Ref_wally_tx_witness_stack): void; export function tx_is_coinbase(tx: Ref_wally_tx): number; export function tx_is_elements(tx: Ref_wally_tx): number; @@ -706,65 +706,65 @@ export function tx_output_get_satoshi(tx_output_in: Ref_wally_tx_output): bigint export function tx_output_get_script_len(tx_output_in: Ref_wally_tx_output): number; export function tx_output_get_surjectionproof_len(tx_output_in: Ref_wally_tx_output): number; export function tx_output_get_value_len(tx_output_in: Ref_wally_tx_output): number; -export function tx_output_init(satoshi: bigint, script: Buffer|Uint8Array): Ref_wally_tx_output; -export function tx_output_init_noalloc(satoshi: bigint, script: Buffer|Uint8Array, output: Ref_wally_tx_output): void; -export function tx_output_set_asset(tx_output_in: Ref_wally_tx_output, asset: Buffer|Uint8Array): void; -export function tx_output_set_nonce(tx_output_in: Ref_wally_tx_output, nonce: Buffer|Uint8Array): void; -export function tx_output_set_rangeproof(tx_output_in: Ref_wally_tx_output, rangeproof: Buffer|Uint8Array): void; +export function tx_output_init(satoshi: bigint, script: Buffer|Uint8Array|null): Ref_wally_tx_output; +export function tx_output_init_noalloc(satoshi: bigint, script: Buffer|Uint8Array|null, output: Ref_wally_tx_output): void; +export function tx_output_set_asset(tx_output_in: Ref_wally_tx_output, asset: Buffer|Uint8Array|null): void; +export function tx_output_set_nonce(tx_output_in: Ref_wally_tx_output, nonce: Buffer|Uint8Array|null): void; +export function tx_output_set_rangeproof(tx_output_in: Ref_wally_tx_output, rangeproof: Buffer|Uint8Array|null): void; export function tx_output_set_satoshi(tx_output_in: Ref_wally_tx_output, satoshi: bigint): void; -export function tx_output_set_script(tx_output_in: Ref_wally_tx_output, script: Buffer|Uint8Array): void; -export function tx_output_set_surjectionproof(tx_output_in: Ref_wally_tx_output, surjectionproof: Buffer|Uint8Array): void; -export function tx_output_set_value(tx_output_in: Ref_wally_tx_output, value: Buffer|Uint8Array): void; +export function tx_output_set_script(tx_output_in: Ref_wally_tx_output, script: Buffer|Uint8Array|null): void; +export function tx_output_set_surjectionproof(tx_output_in: Ref_wally_tx_output, surjectionproof: Buffer|Uint8Array|null): void; +export function tx_output_set_value(tx_output_in: Ref_wally_tx_output, value: Buffer|Uint8Array|null): void; export function tx_remove_input(tx: Ref_wally_tx, index: number): void; export function tx_remove_output(tx: Ref_wally_tx, index: number): void; -export function tx_set_input_blinding_nonce(tx_in: Ref_wally_tx, index: number, blinding_nonce: Buffer|Uint8Array): void; -export function tx_set_input_entropy(tx_in: Ref_wally_tx, index: number, entropy: Buffer|Uint8Array): void; +export function tx_set_input_blinding_nonce(tx_in: Ref_wally_tx, index: number, blinding_nonce: Buffer|Uint8Array|null): void; +export function tx_set_input_entropy(tx_in: Ref_wally_tx, index: number, entropy: Buffer|Uint8Array|null): void; export function tx_set_input_index(tx_in: Ref_wally_tx, index: number, index_in: number): void; -export function tx_set_input_inflation_keys(tx_in: Ref_wally_tx, index: number, inflation_keys: Buffer|Uint8Array): void; -export function tx_set_input_inflation_keys_rangeproof(tx_in: Ref_wally_tx, index: number, inflation_keys_rangeproof: Buffer|Uint8Array): void; -export function tx_set_input_issuance_amount(tx_in: Ref_wally_tx, index: number, issuance_amount: Buffer|Uint8Array): void; -export function tx_set_input_issuance_amount_rangeproof(tx_in: Ref_wally_tx, index: number, issuance_amount_rangeproof: Buffer|Uint8Array): void; -export function tx_set_input_script(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array): void; +export function tx_set_input_inflation_keys(tx_in: Ref_wally_tx, index: number, inflation_keys: Buffer|Uint8Array|null): void; +export function tx_set_input_inflation_keys_rangeproof(tx_in: Ref_wally_tx, index: number, inflation_keys_rangeproof: Buffer|Uint8Array|null): void; +export function tx_set_input_issuance_amount(tx_in: Ref_wally_tx, index: number, issuance_amount: Buffer|Uint8Array|null): void; +export function tx_set_input_issuance_amount_rangeproof(tx_in: Ref_wally_tx, index: number, issuance_amount_rangeproof: Buffer|Uint8Array|null): void; +export function tx_set_input_script(tx: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null): void; export function tx_set_input_sequence(tx_in: Ref_wally_tx, index: number, sequence: number): void; -export function tx_set_input_txhash(tx_in: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array): void; +export function tx_set_input_txhash(tx_in: Ref_wally_tx, index: number, txhash: Buffer|Uint8Array|null): void; export function tx_set_input_witness(tx: Ref_wally_tx, index: number, stack: Ref_wally_tx_witness_stack): void; -export function tx_set_output_asset(tx_in: Ref_wally_tx, index: number, asset: Buffer|Uint8Array): void; -export function tx_set_output_nonce(tx_in: Ref_wally_tx, index: number, nonce: Buffer|Uint8Array): void; -export function tx_set_output_rangeproof(tx_in: Ref_wally_tx, index: number, rangeproof: Buffer|Uint8Array): void; +export function tx_set_output_asset(tx_in: Ref_wally_tx, index: number, asset: Buffer|Uint8Array|null): void; +export function tx_set_output_nonce(tx_in: Ref_wally_tx, index: number, nonce: Buffer|Uint8Array|null): void; +export function tx_set_output_rangeproof(tx_in: Ref_wally_tx, index: number, rangeproof: Buffer|Uint8Array|null): void; export function tx_set_output_satoshi(tx_in: Ref_wally_tx, index: number, satoshi: bigint): void; -export function tx_set_output_script(tx_in: Ref_wally_tx, index: number, script: Buffer|Uint8Array): void; -export function tx_set_output_surjectionproof(tx_in: Ref_wally_tx, index: number, surjectionproof: Buffer|Uint8Array): void; -export function tx_set_output_value(tx_in: Ref_wally_tx, index: number, value: Buffer|Uint8Array): void; +export function tx_set_output_script(tx_in: Ref_wally_tx, index: number, script: Buffer|Uint8Array|null): void; +export function tx_set_output_surjectionproof(tx_in: Ref_wally_tx, index: number, surjectionproof: Buffer|Uint8Array|null): void; +export function tx_set_output_value(tx_in: Ref_wally_tx, index: number, value: Buffer|Uint8Array|null): void; export function tx_to_hex(tx: Ref_wally_tx, flags: number): string; export function tx_vsize_from_weight(weight: number): number; -export function tx_witness_stack_add(stack: Ref_wally_tx_witness_stack, witness: Buffer|Uint8Array): void; +export function tx_witness_stack_add(stack: Ref_wally_tx_witness_stack, witness: Buffer|Uint8Array|null): void; export function tx_witness_stack_add_dummy(stack: Ref_wally_tx_witness_stack, flags: number): void; export function tx_witness_stack_clone(stack: Ref_wally_tx_witness_stack): Ref_wally_tx_witness_stack; export function tx_witness_stack_free(stack: Ref_wally_tx_witness_stack): void; -export function tx_witness_stack_from_bytes(bytes: Buffer|Uint8Array): Ref_wally_tx_witness_stack; +export function tx_witness_stack_from_bytes(bytes: Buffer|Uint8Array|null): Ref_wally_tx_witness_stack; export function tx_witness_stack_get_length(stack: Ref_wally_tx_witness_stack): number; export function tx_witness_stack_get_num_items(stack: Ref_wally_tx_witness_stack): number; export function tx_witness_stack_init(allocation_len: number): Ref_wally_tx_witness_stack; -export function tx_witness_stack_set(stack: Ref_wally_tx_witness_stack, index: number, witness: Buffer|Uint8Array): void; +export function tx_witness_stack_set(stack: Ref_wally_tx_witness_stack, index: number, witness: Buffer|Uint8Array|null): void; export function tx_witness_stack_set_dummy(stack: Ref_wally_tx_witness_stack, index: number, flags: number): void; -export function varbuff_get_length(bytes: Buffer|Uint8Array): number; +export function varbuff_get_length(bytes: Buffer|Uint8Array|null): number; export function varint_get_length(value: bigint): number; -export function wif_from_bytes(priv_key: Buffer|Uint8Array, prefix: number, flags: number): string; +export function wif_from_bytes(priv_key: Buffer|Uint8Array|null, prefix: number, flags: number): string; export function wif_is_uncompressed(wif: string): number; export function wif_to_address(wif: string, prefix: number, version: number): string; export function wif_to_bytes(wif: string, prefix: number, flags: number): Buffer; export function wif_to_public_key(wif: string, prefix: number): Buffer; -export function witness_multisig_from_bytes(script: Buffer|Uint8Array, bytes: Buffer|Uint8Array, sighash: Uint32Array|number[], flags: number): Ref_wally_tx_witness_stack; -export function witness_p2tr_from_sig(sig: Buffer|Uint8Array): Ref_wally_tx_witness_stack; -export function witness_p2wpkh_from_der(pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array): Ref_wally_tx_witness_stack; -export function witness_p2wpkh_from_sig(pub_key: Buffer|Uint8Array, sig: Buffer|Uint8Array, sighash: number): Ref_wally_tx_witness_stack; -export function witness_program_from_bytes(bytes: Buffer|Uint8Array, flags: number): Buffer; -export function witness_program_from_bytes_and_version(bytes: Buffer|Uint8Array, version: number, flags: number): Buffer; -export function aes(key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): Buffer; -export function aes_cbc(key: Buffer|Uint8Array, iv: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): Buffer; -export function aes_cbc_with_ecdh_key(priv_key: Buffer|Uint8Array, iv: Buffer|Uint8Array, bytes: Buffer|Uint8Array, pub_key: Buffer|Uint8Array, label: Buffer|Uint8Array, flags: number): Buffer; -export function asset_pak_whitelistproof(online_keys: Buffer|Uint8Array, offline_keys: Buffer|Uint8Array, key_index: number, sub_pubkey: Buffer|Uint8Array, online_priv_key: Buffer|Uint8Array, summed_key: Buffer|Uint8Array): Buffer; -export function asset_surjectionproof(output_asset: Buffer|Uint8Array, output_abf: Buffer|Uint8Array, output_generator: Buffer|Uint8Array, bytes: Buffer|Uint8Array, asset: Buffer|Uint8Array, abf: Buffer|Uint8Array, generator: Buffer|Uint8Array): Buffer; +export function witness_multisig_from_bytes(script: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, sighash: Uint32Array|number[], flags: number): Ref_wally_tx_witness_stack; +export function witness_p2tr_from_sig(sig: Buffer|Uint8Array|null): Ref_wally_tx_witness_stack; +export function witness_p2wpkh_from_der(pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null): Ref_wally_tx_witness_stack; +export function witness_p2wpkh_from_sig(pub_key: Buffer|Uint8Array|null, sig: Buffer|Uint8Array|null, sighash: number): Ref_wally_tx_witness_stack; +export function witness_program_from_bytes(bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function witness_program_from_bytes_and_version(bytes: Buffer|Uint8Array|null, version: number, flags: number): Buffer; +export function aes(key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function aes_cbc(key: Buffer|Uint8Array|null, iv: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function aes_cbc_with_ecdh_key(priv_key: Buffer|Uint8Array|null, iv: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, pub_key: Buffer|Uint8Array|null, label: Buffer|Uint8Array|null, flags: number): Buffer; +export function asset_pak_whitelistproof(online_keys: Buffer|Uint8Array|null, offline_keys: Buffer|Uint8Array|null, key_index: number, sub_pubkey: Buffer|Uint8Array|null, online_priv_key: Buffer|Uint8Array|null, summed_key: Buffer|Uint8Array|null): Buffer; +export function asset_surjectionproof(output_asset: Buffer|Uint8Array|null, output_abf: Buffer|Uint8Array|null, output_generator: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, asset: Buffer|Uint8Array|null, abf: Buffer|Uint8Array|null, generator: Buffer|Uint8Array|null): Buffer; export function base58_n_to_bytes(str_in: string, str_len: number, flags: number): Buffer; export function base58_to_bytes(str_in: string, flags: number): Buffer; export function base64_n_to_bytes(str_in: string, str_len: number, flags: number): Buffer; @@ -774,9 +774,9 @@ export function bip32_path_from_str_n(path_str: string, path_str_len: number, ch export function descriptor_get_key_child_path_str(descriptor: Ref_wally_descriptor, index: number): string; export function descriptor_get_key_origin_path_str(descriptor: Ref_wally_descriptor, index: number): string; export function descriptor_to_script(descriptor: Ref_wally_descriptor, depth: number, index: number, variant: number, multi_index: number, child_num: number, flags: number): Buffer; -export function ec_sig_from_bytes(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, flags: number): Buffer; -export function ec_sig_from_bytes_aux(priv_key: Buffer|Uint8Array, bytes: Buffer|Uint8Array, aux_rand: Buffer|Uint8Array, flags: number): Buffer; -export function keypath_get_path(val: Buffer|Uint8Array): Uint32Array; +export function ec_sig_from_bytes(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, flags: number): Buffer; +export function ec_sig_from_bytes_aux(priv_key: Buffer|Uint8Array|null, bytes: Buffer|Uint8Array|null, aux_rand: Buffer|Uint8Array|null, flags: number): Buffer; +export function keypath_get_path(val: Buffer|Uint8Array|null): Uint32Array; export function map_get_item(map_in: Ref_wally_map, index: number): Buffer; export function map_get_item_key(map_in: Ref_wally_map, index: number): Buffer; export function map_keypath_get_item_path(map_in: Ref_wally_map, index: number): Uint32Array; @@ -797,7 +797,7 @@ export function psbt_get_input_pegin_claim_script(psbt: Ref_wally_psbt, index: n export function psbt_get_input_pegin_genesis_blockhash(psbt: Ref_wally_psbt, index: number): Buffer; export function psbt_get_input_pegin_txout_proof(psbt: Ref_wally_psbt, index: number): Buffer; export function psbt_get_input_redeem_script(psbt: Ref_wally_psbt, index: number): Buffer; -export function psbt_get_input_scriptcode(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array): Buffer; +export function psbt_get_input_scriptcode(psbt: Ref_wally_psbt, index: number, script: Buffer|Uint8Array|null): Buffer; export function psbt_get_input_signature(psbt: Ref_wally_psbt, index: number, subindex: number): Buffer; export function psbt_get_input_signing_script(psbt: Ref_wally_psbt, index: number): Buffer; export function psbt_get_input_taproot_internal_key(psbt: Ref_wally_psbt, index: number): Buffer; @@ -869,6 +869,6 @@ export function tx_output_get_surjectionproof(tx_output_in: Ref_wally_tx_output) export function tx_output_get_value(tx_output_in: Ref_wally_tx_output): Buffer; export function tx_to_bytes(tx: Ref_wally_tx, flags: number): Buffer; export function tx_witness_stack_to_bytes(stack: Ref_wally_tx_witness_stack): Buffer; -export function varbuff_to_bytes(bytes: Buffer|Uint8Array): Buffer; +export function varbuff_to_bytes(bytes: Buffer|Uint8Array|null): Buffer; export function varint_to_bytes(value: bigint): Buffer; // END AUTOGENERATED From dac66cfe2f7b32dccea84de86311b47bd5c9a888 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Wed, 15 Apr 2026 21:50:25 +1200 Subject: [PATCH 11/12] js: update aes test --- src/wasm_package/test/aes.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/wasm_package/test/aes.js b/src/wasm_package/test/aes.js index 40c6f127e..f8dd0ff15 100644 --- a/src/wasm_package/test/aes.js +++ b/src/wasm_package/test/aes.js @@ -79,17 +79,24 @@ test('AES ECB', t => { test('AES CBC', function (t) { for (let i = 0; i < cbc_lines.length / 4; ++i) { - const plain = Buffer.from(cbc_lines[i * 4].split("=")[1], 'hex') + var plain = Buffer.from(cbc_lines[i * 4].split("=")[1], 'hex') + if (plain.length == 0) { + plain = null + } const key = Buffer.from(cbc_lines[i * 4 + 1].split("=")[1], 'hex') const iv = Buffer.from(cbc_lines[i * 4 + 2].split("=")[1], 'hex') - const cypher = Buffer.from(cbc_lines[i * 4 + 3].split("=")[1], 'hex') + var cypher = Buffer.from(cbc_lines[i * 4 + 3].split("=")[1], 'hex') + if (cypher.length == 0) { + cypher = null + } + console.log(i); const encryptResult = wally.aes_cbc(key, iv, plain, wally.AES_FLAG_ENCRYPT) assert.deepEqual(encryptResult, cypher, - 'aes CBC encrypt(' + plain.toString('hex') + ')') + 'aes CBC encrypt(' + (plain ?? "null").toString('hex') + ')') const decryptResult = wally.aes_cbc(key, iv, cypher, wally.AES_FLAG_DECRYPT) - assert.deepEqual(decryptResult, plain, - 'aes CBC decrypt(' + cypher.toString('hex') + ')') + assert.deepEqual(decryptResult, plain ?? Buffer.from([]), + 'aes CBC decrypt(' + (cypher ?? "null").toString('hex') + ')') } -}) \ No newline at end of file +}) From 000137393a436d55a18971ca93a2d20a54d55437 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Wed, 15 Apr 2026 21:50:35 +1200 Subject: [PATCH 12/12] build: bump dso version for 1.5.3 Changes to the AES checking are technically an ABI change, although it is not expected that any user will be affected. --- src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index da75b96d9..08abbc504 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 = 8 +LT_VER_CURRENT = 9 # 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 = 2 +LT_VER_AGE = 3 # 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!