# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")


def swig_import_helper():
    import importlib
    pkg = __name__.rpartition('.')[0]
    mname = '.'.join((pkg, '_wallycore')).lstrip('.')
    try:
        return importlib.import_module(mname)
    except ImportError:
        return importlib.import_module('_wallycore')
_wallycore = swig_import_helper()
del swig_import_helper


try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


WALLY_OK = _wallycore.WALLY_OK
WALLY_ERROR = _wallycore.WALLY_ERROR
WALLY_EINVAL = _wallycore.WALLY_EINVAL
WALLY_ENOMEM = _wallycore.WALLY_ENOMEM
WALLY_MAJOR_VER = _wallycore.WALLY_MAJOR_VER
WALLY_MINOR_VER = _wallycore.WALLY_MINOR_VER
WALLY_PATCH_VER = _wallycore.WALLY_PATCH_VER
WALLY_BUILD_VER = _wallycore.WALLY_BUILD_VER

def init(flags):
    return _wallycore.init(flags)

def cleanup(flags):
    return _wallycore.cleanup(flags)

def get_build_version():
    return _wallycore.get_build_version()

def bzero(bytes):
    return _wallycore.bzero(bytes)

def free_string(str):
    return _wallycore.free_string(str)
WALLY_SECP_RANDOMIZE_LEN = _wallycore.WALLY_SECP_RANDOMIZE_LEN

def secp_randomize(bytes):
    return _wallycore.secp_randomize(bytes)

def hex_verify(hex):
    return _wallycore.hex_verify(hex)

def hex_n_verify(hex, hex_len):
    return _wallycore.hex_n_verify(hex, hex_len)

def hex_from_bytes(bytes):
    return _wallycore.hex_from_bytes(bytes)

def hex_to_bytes(hex, bytes_out):
    return _wallycore.hex_to_bytes(hex, bytes_out)

def hex_n_to_bytes(hex, hex_len, bytes_out):
    return _wallycore.hex_n_to_bytes(hex, hex_len, bytes_out)
BASE58_FLAG_CHECKSUM = _wallycore.BASE58_FLAG_CHECKSUM
BASE58_CHECKSUM_LEN = _wallycore.BASE58_CHECKSUM_LEN

def base58_from_bytes(bytes, flags):
    return _wallycore.base58_from_bytes(bytes, flags)

def base58_to_bytes(str_in, flags, bytes_out):
    return _wallycore.base58_to_bytes(str_in, flags, bytes_out)

def base58_n_to_bytes(str_in, str_len, flags, bytes_out):
    return _wallycore.base58_n_to_bytes(str_in, str_len, flags, bytes_out)

def base58_get_length(str_in):
    return _wallycore.base58_get_length(str_in)

def base58_n_get_length(str_in, str_len):
    return _wallycore.base58_n_get_length(str_in, str_len)

def base64_from_bytes(bytes, flags):
    return _wallycore.base64_from_bytes(bytes, flags)

def base64_to_bytes(str_in, flags, bytes_out):
    return _wallycore.base64_to_bytes(str_in, flags, bytes_out)

def base64_n_to_bytes(str_in, str_len, flags, bytes_out):
    return _wallycore.base64_n_to_bytes(str_in, str_len, flags, bytes_out)

def base64_get_maximum_length(str_in, flags):
    return _wallycore.base64_get_maximum_length(str_in, flags)

def base64_n_get_maximum_length(str_in, str_len, flags):
    return _wallycore.base64_n_get_maximum_length(str_in, str_len, flags)

def is_elements_build():
    return _wallycore.is_elements_build()
WALLY_WIF_FLAG_COMPRESSED = _wallycore.WALLY_WIF_FLAG_COMPRESSED
WALLY_WIF_FLAG_UNCOMPRESSED = _wallycore.WALLY_WIF_FLAG_UNCOMPRESSED
WALLY_CA_PREFIX_LIQUID = _wallycore.WALLY_CA_PREFIX_LIQUID
WALLY_CA_PREFIX_LIQUID_REGTEST = _wallycore.WALLY_CA_PREFIX_LIQUID_REGTEST
WALLY_CA_PREFIX_LIQUID_TESTNET = _wallycore.WALLY_CA_PREFIX_LIQUID_TESTNET
WALLY_NETWORK_NONE = _wallycore.WALLY_NETWORK_NONE
WALLY_NETWORK_BITCOIN_MAINNET = _wallycore.WALLY_NETWORK_BITCOIN_MAINNET
WALLY_NETWORK_BITCOIN_REGTEST = _wallycore.WALLY_NETWORK_BITCOIN_REGTEST
WALLY_NETWORK_BITCOIN_TESTNET = _wallycore.WALLY_NETWORK_BITCOIN_TESTNET
WALLY_NETWORK_LIQUID = _wallycore.WALLY_NETWORK_LIQUID
WALLY_NETWORK_LIQUID_REGTEST = _wallycore.WALLY_NETWORK_LIQUID_REGTEST
WALLY_NETWORK_LIQUID_TESTNET = _wallycore.WALLY_NETWORK_LIQUID_TESTNET
WALLY_ADDRESS_TYPE_P2PKH = _wallycore.WALLY_ADDRESS_TYPE_P2PKH
WALLY_ADDRESS_TYPE_P2SH_P2WPKH = _wallycore.WALLY_ADDRESS_TYPE_P2SH_P2WPKH
WALLY_ADDRESS_TYPE_P2WPKH = _wallycore.WALLY_ADDRESS_TYPE_P2WPKH
WALLY_ADDRESS_VERSION_P2PKH_MAINNET = _wallycore.WALLY_ADDRESS_VERSION_P2PKH_MAINNET
WALLY_ADDRESS_VERSION_P2PKH_TESTNET = _wallycore.WALLY_ADDRESS_VERSION_P2PKH_TESTNET
WALLY_ADDRESS_VERSION_P2PKH_LIQUID = _wallycore.WALLY_ADDRESS_VERSION_P2PKH_LIQUID
WALLY_ADDRESS_VERSION_P2PKH_LIQUID_REGTEST = _wallycore.WALLY_ADDRESS_VERSION_P2PKH_LIQUID_REGTEST
WALLY_ADDRESS_VERSION_P2PKH_LIQUID_TESTNET = _wallycore.WALLY_ADDRESS_VERSION_P2PKH_LIQUID_TESTNET
WALLY_ADDRESS_VERSION_P2SH_MAINNET = _wallycore.WALLY_ADDRESS_VERSION_P2SH_MAINNET
WALLY_ADDRESS_VERSION_P2SH_TESTNET = _wallycore.WALLY_ADDRESS_VERSION_P2SH_TESTNET
WALLY_ADDRESS_VERSION_P2SH_LIQUID = _wallycore.WALLY_ADDRESS_VERSION_P2SH_LIQUID
WALLY_ADDRESS_VERSION_P2SH_LIQUID_REGTEST = _wallycore.WALLY_ADDRESS_VERSION_P2SH_LIQUID_REGTEST
WALLY_ADDRESS_VERSION_P2SH_LIQUID_TESTNET = _wallycore.WALLY_ADDRESS_VERSION_P2SH_LIQUID_TESTNET
WALLY_ADDRESS_VERSION_WIF_MAINNET = _wallycore.WALLY_ADDRESS_VERSION_WIF_MAINNET
WALLY_ADDRESS_VERSION_WIF_TESTNET = _wallycore.WALLY_ADDRESS_VERSION_WIF_TESTNET
WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN = _wallycore.WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN
WALLY_ADDRESS_PUBKEY_MAX_LEN = _wallycore.WALLY_ADDRESS_PUBKEY_MAX_LEN
WALLY_SEGWIT_V0_ADDRESS_PUBKEY_MAX_LEN = _wallycore.WALLY_SEGWIT_V0_ADDRESS_PUBKEY_MAX_LEN
WALLY_SEGWIT_V1_ADDRESS_PUBKEY_LEN = _wallycore.WALLY_SEGWIT_V1_ADDRESS_PUBKEY_LEN

def addr_segwit_from_bytes(bytes, addr_family, flags):
    return _wallycore.addr_segwit_from_bytes(bytes, addr_family, flags)

def addr_segwit_to_bytes(addr, addr_family, flags, bytes_out):
    return _wallycore.addr_segwit_to_bytes(addr, addr_family, flags, bytes_out)

def addr_segwit_n_to_bytes(addr, addr_len, addr_family, addr_family_len, flags, bytes_out):
    return _wallycore.addr_segwit_n_to_bytes(addr, addr_len, addr_family, addr_family_len, flags, bytes_out)

def addr_segwit_get_version(addr, addr_family, flags):
    return _wallycore.addr_segwit_get_version(addr, addr_family, flags)

def addr_segwit_n_get_version(addr, addr_len, addr_family, addr_family_len, flags):
    return _wallycore.addr_segwit_n_get_version(addr, addr_len, addr_family, addr_family_len, flags)

def address_to_scriptpubkey(addr, network, bytes_out):
    return _wallycore.address_to_scriptpubkey(addr, network, bytes_out)

def scriptpubkey_to_address(scriptpubkey, network):
    return _wallycore.scriptpubkey_to_address(scriptpubkey, network)

def wif_from_bytes(priv_key, prefix, flags):
    return _wallycore.wif_from_bytes(priv_key, prefix, flags)

def wif_to_bytes(wif, prefix, flags, bytes_out):
    return _wallycore.wif_to_bytes(wif, prefix, flags, bytes_out)

def wif_is_uncompressed(wif):
    return _wallycore.wif_is_uncompressed(wif)

def wif_to_public_key(wif, prefix, bytes_out):
    return _wallycore.wif_to_public_key(wif, prefix, bytes_out)

def bip32_key_to_address(hdkey, flags, version):
    return _wallycore.bip32_key_to_address(hdkey, flags, version)

def bip32_key_to_addr_segwit(hdkey, addr_family, flags):
    return _wallycore.bip32_key_to_addr_segwit(hdkey, addr_family, flags)

def wif_to_address(wif, prefix, version):
    return _wallycore.wif_to_address(wif, prefix, version)

def confidential_addr_to_addr(address, prefix):
    return _wallycore.confidential_addr_to_addr(address, prefix)

def confidential_addr_to_ec_public_key(address, prefix, bytes_out):
    return _wallycore.confidential_addr_to_ec_public_key(address, prefix, bytes_out)

def confidential_addr_from_addr(address, prefix, pub_key):
    return _wallycore.confidential_addr_from_addr(address, prefix, pub_key)

def confidential_addr_to_addr_segwit(address, confidential_addr_family, addr_family):
    return _wallycore.confidential_addr_to_addr_segwit(address, confidential_addr_family, addr_family)

def confidential_addr_segwit_to_ec_public_key(address, confidential_addr_family, bytes_out):
    return _wallycore.confidential_addr_segwit_to_ec_public_key(address, confidential_addr_family, bytes_out)

def confidential_addr_from_addr_segwit(address, addr_family, confidential_addr_family, pub_key):
    return _wallycore.confidential_addr_from_addr_segwit(address, addr_family, confidential_addr_family, pub_key)
WALLY_HOST_COMMITMENT_LEN = _wallycore.WALLY_HOST_COMMITMENT_LEN

def ae_host_commit_from_bytes(entropy, flags, bytes_out):
    return _wallycore.ae_host_commit_from_bytes(entropy, flags, bytes_out)

def ae_signer_commit_from_bytes(priv_key, bytes, commitment, flags, s2c_opening_out):
    return _wallycore.ae_signer_commit_from_bytes(priv_key, bytes, commitment, flags, s2c_opening_out)

def ae_sig_from_bytes(priv_key, bytes, entropy, flags, bytes_out):
    return _wallycore.ae_sig_from_bytes(priv_key, bytes, entropy, flags, bytes_out)

def ae_verify(pub_key, bytes, entropy, s2c_opening, flags, sig):
    return _wallycore.ae_verify(pub_key, bytes, entropy, s2c_opening, flags, sig)
BIP32_ENTROPY_LEN_128 = _wallycore.BIP32_ENTROPY_LEN_128
BIP32_ENTROPY_LEN_256 = _wallycore.BIP32_ENTROPY_LEN_256
BIP32_ENTROPY_LEN_512 = _wallycore.BIP32_ENTROPY_LEN_512
BIP32_KEY_FINGERPRINT_LEN = _wallycore.BIP32_KEY_FINGERPRINT_LEN
BIP32_SERIALIZED_LEN = _wallycore.BIP32_SERIALIZED_LEN
BIP32_INITIAL_HARDENED_CHILD = _wallycore.BIP32_INITIAL_HARDENED_CHILD
BIP32_PATH_MAX_LEN = _wallycore.BIP32_PATH_MAX_LEN
WALLY_BIP32_CHAIN_CODE_LEN = _wallycore.WALLY_BIP32_CHAIN_CODE_LEN
WALLY_BIP32_TWEAK_SUM_LEN = _wallycore.WALLY_BIP32_TWEAK_SUM_LEN
BIP32_FLAG_KEY_PRIVATE = _wallycore.BIP32_FLAG_KEY_PRIVATE
BIP32_FLAG_KEY_PUBLIC = _wallycore.BIP32_FLAG_KEY_PUBLIC
BIP32_FLAG_SKIP_HASH = _wallycore.BIP32_FLAG_SKIP_HASH
BIP32_FLAG_KEY_TWEAK_SUM = _wallycore.BIP32_FLAG_KEY_TWEAK_SUM
BIP32_FLAG_STR_WILDCARD = _wallycore.BIP32_FLAG_STR_WILDCARD
BIP32_FLAG_STR_BARE = _wallycore.BIP32_FLAG_STR_BARE
BIP32_FLAG_ALLOW_UPPER = _wallycore.BIP32_FLAG_ALLOW_UPPER
BIP32_FLAG_STR_MULTIPATH = _wallycore.BIP32_FLAG_STR_MULTIPATH
BIP32_VER_MAIN_PUBLIC = _wallycore.BIP32_VER_MAIN_PUBLIC
BIP32_VER_MAIN_PRIVATE = _wallycore.BIP32_VER_MAIN_PRIVATE
BIP32_VER_TEST_PUBLIC = _wallycore.BIP32_VER_TEST_PUBLIC
BIP32_VER_TEST_PRIVATE = _wallycore.BIP32_VER_TEST_PRIVATE
BIP32_PATH_LEN_MASK = _wallycore.BIP32_PATH_LEN_MASK
BIP32_PATH_LEN_SHIFT = _wallycore.BIP32_PATH_LEN_SHIFT
BIP32_PATH_MULTI_MASK = _wallycore.BIP32_PATH_MULTI_MASK
BIP32_PATH_MULTI_SHIFT = _wallycore.BIP32_PATH_MULTI_SHIFT
BIP32_PATH_WILDCARD_MASK = _wallycore.BIP32_PATH_WILDCARD_MASK
BIP32_PATH_WILDCARD_SHIFT = _wallycore.BIP32_PATH_WILDCARD_SHIFT
BIP32_PATH_IS_BARE = _wallycore.BIP32_PATH_IS_BARE
BIP32_PATH_IS_HARDENED = _wallycore.BIP32_PATH_IS_HARDENED
BIP32_PATH_IS_WILDCARD = _wallycore.BIP32_PATH_IS_WILDCARD
BIP32_PATH_IS_MULTIPATH = _wallycore.BIP32_PATH_IS_MULTIPATH

def bip32_key_free(hdkey):
    return _wallycore.bip32_key_free(hdkey)

def bip32_key_init_alloc(version, depth, child_num, chain_code, pub_key, priv_key, hash160, parent160):
    return _wallycore.bip32_key_init_alloc(version, depth, child_num, chain_code, pub_key, priv_key, hash160, parent160)

def bip32_key_from_seed_custom_alloc(bytes, version, hmac_key, flags):
    return _wallycore.bip32_key_from_seed_custom_alloc(bytes, version, hmac_key, flags)

def bip32_key_from_seed_alloc(bytes, version, flags):
    return _wallycore.bip32_key_from_seed_alloc(bytes, version, flags)

def bip32_key_serialize(hdkey, flags, bytes_out):
    return _wallycore.bip32_key_serialize(hdkey, flags, bytes_out)

def bip32_key_unserialize_alloc(bytes):
    return _wallycore.bip32_key_unserialize_alloc(bytes)

def bip32_key_from_parent_alloc(hdkey, child_num, flags):
    return _wallycore.bip32_key_from_parent_alloc(hdkey, child_num, flags)

def bip32_key_from_parent_path_alloc(hdkey, child_path, flags):
    return _wallycore.bip32_key_from_parent_path_alloc(hdkey, child_path, flags)

def bip32_key_from_parent_path_str_alloc(hdkey, path_str, child_num, flags):
    return _wallycore.bip32_key_from_parent_path_str_alloc(hdkey, path_str, child_num, flags)

def bip32_key_from_parent_path_str_n_alloc(hdkey, path_str, path_str_len, child_num, flags):
    return _wallycore.bip32_key_from_parent_path_str_n_alloc(hdkey, path_str, path_str_len, child_num, flags)

def bip32_key_with_tweak_from_parent_path_alloc(hdkey, child_path, flags):
    return _wallycore.bip32_key_with_tweak_from_parent_path_alloc(hdkey, child_path, flags)

def bip32_key_to_base58(hdkey, flags):
    return _wallycore.bip32_key_to_base58(hdkey, flags)

def bip32_key_from_base58_alloc(base58):
    return _wallycore.bip32_key_from_base58_alloc(base58)

def bip32_key_from_base58_n_alloc(base58, base58_len):
    return _wallycore.bip32_key_from_base58_n_alloc(base58, base58_len)

def bip32_key_strip_private_key(hdkey):
    return _wallycore.bip32_key_strip_private_key(hdkey)

def bip32_key_get_fingerprint(hdkey, bytes_out):
    return _wallycore.bip32_key_get_fingerprint(hdkey, bytes_out)

def bip32_path_from_str_len(path_str, child_num, multi_index, flags):
    return _wallycore.bip32_path_from_str_len(path_str, child_num, multi_index, flags)

def bip32_path_from_str(path_str, child_num, multi_index, flags, child_path_out):
    return _wallycore.bip32_path_from_str(path_str, child_num, multi_index, flags, child_path_out)

def bip32_path_from_str_n_len(path_str, path_str_len, child_num, multi_index, flags):
    return _wallycore.bip32_path_from_str_n_len(path_str, path_str_len, child_num, multi_index, flags)

def bip32_path_from_str_n(path_str, path_str_len, child_num, multi_index, flags, child_path_out):
    return _wallycore.bip32_path_from_str_n(path_str, path_str_len, child_num, multi_index, flags, child_path_out)

def bip32_path_str_get_features(path_str):
    return _wallycore.bip32_path_str_get_features(path_str)

def bip32_path_str_n_get_features(path_str, path_str_len):
    return _wallycore.bip32_path_str_n_get_features(path_str, path_str_len)
LIBWALLY_CORE_BIP32_INT_H = _wallycore.LIBWALLY_CORE_BIP32_INT_H

def bip32_key_get_chain_code(hdkey, bytes_out):
    return _wallycore.bip32_key_get_chain_code(hdkey, bytes_out)

def bip32_key_get_parent160(hdkey, bytes_out):
    return _wallycore.bip32_key_get_parent160(hdkey, bytes_out)

def bip32_key_get_priv_key(hdkey, bytes_out):
    return _wallycore.bip32_key_get_priv_key(hdkey, bytes_out)

def bip32_key_get_hash160(hdkey, bytes_out):
    return _wallycore.bip32_key_get_hash160(hdkey, bytes_out)

def bip32_key_get_pub_key(hdkey, bytes_out):
    return _wallycore.bip32_key_get_pub_key(hdkey, bytes_out)

def bip32_key_get_pub_key_tweak_sum(hdkey, bytes_out):
    return _wallycore.bip32_key_get_pub_key_tweak_sum(hdkey, bytes_out)

def bip32_key_get_depth(hdkey):
    return _wallycore.bip32_key_get_depth(hdkey)

def bip32_key_get_child_num(hdkey):
    return _wallycore.bip32_key_get_child_num(hdkey)

def bip32_key_get_version(hdkey):
    return _wallycore.bip32_key_get_version(hdkey)
BIP38_KEY_NETWORK_MASK = _wallycore.BIP38_KEY_NETWORK_MASK
BIP38_KEY_MAINNET = _wallycore.BIP38_KEY_MAINNET
BIP38_KEY_TESTNET = _wallycore.BIP38_KEY_TESTNET
BIP38_KEY_COMPRESSED = _wallycore.BIP38_KEY_COMPRESSED
BIP38_KEY_EC_MULT = _wallycore.BIP38_KEY_EC_MULT
BIP38_KEY_QUICK_CHECK = _wallycore.BIP38_KEY_QUICK_CHECK
BIP38_KEY_RAW_MODE = _wallycore.BIP38_KEY_RAW_MODE
BIP38_KEY_SWAP_ORDER = _wallycore.BIP38_KEY_SWAP_ORDER
BIP38_SERIALIZED_LEN = _wallycore.BIP38_SERIALIZED_LEN

def bip38_raw_from_private_key(bytes, _pass, flags, bytes_out):
    return _wallycore.bip38_raw_from_private_key(bytes, _pass, flags, bytes_out)

def bip38_from_private_key(bytes, _pass, flags):
    return _wallycore.bip38_from_private_key(bytes, _pass, flags)

def bip38_raw_to_private_key(bytes, _pass, flags, bytes_out):
    return _wallycore.bip38_raw_to_private_key(bytes, _pass, flags, bytes_out)

def bip38_to_private_key(bip38, _pass, flags, bytes_out):
    return _wallycore.bip38_to_private_key(bip38, _pass, flags, bytes_out)

def bip38_raw_get_flags(bytes):
    return _wallycore.bip38_raw_get_flags(bytes)

def bip38_get_flags(bip38):
    return _wallycore.bip38_get_flags(bip38)
BIP39_ENTROPY_LEN_128 = _wallycore.BIP39_ENTROPY_LEN_128
BIP39_ENTROPY_LEN_160 = _wallycore.BIP39_ENTROPY_LEN_160
BIP39_ENTROPY_LEN_192 = _wallycore.BIP39_ENTROPY_LEN_192
BIP39_ENTROPY_LEN_224 = _wallycore.BIP39_ENTROPY_LEN_224
BIP39_ENTROPY_LEN_256 = _wallycore.BIP39_ENTROPY_LEN_256
BIP39_ENTROPY_LEN_288 = _wallycore.BIP39_ENTROPY_LEN_288
BIP39_ENTROPY_LEN_320 = _wallycore.BIP39_ENTROPY_LEN_320
BIP39_SEED_LEN_512 = _wallycore.BIP39_SEED_LEN_512
BIP39_ENTROPY_MAX_LEN = _wallycore.BIP39_ENTROPY_MAX_LEN
BIP39_WORDLIST_LEN = _wallycore.BIP39_WORDLIST_LEN

def bip39_get_languages():
    return _wallycore.bip39_get_languages()

def bip39_get_wordlist(lang):
    return _wallycore.bip39_get_wordlist(lang)

def bip39_get_word(w, index):
    return _wallycore.bip39_get_word(w, index)

def bip39_mnemonic_from_bytes(w, bytes):
    return _wallycore.bip39_mnemonic_from_bytes(w, bytes)

def bip39_mnemonic_to_bytes(w, mnemonic, bytes_out):
    return _wallycore.bip39_mnemonic_to_bytes(w, mnemonic, bytes_out)

def bip39_mnemonic_validate(w, mnemonic):
    return _wallycore.bip39_mnemonic_validate(w, mnemonic)

def bip39_mnemonic_to_seed(mnemonic, passphrase, bytes_out):
    return _wallycore.bip39_mnemonic_to_seed(mnemonic, passphrase, bytes_out)

def bip39_mnemonic_to_seed512(mnemonic, passphrase, bytes_out):
    return _wallycore.bip39_mnemonic_to_seed512(mnemonic, passphrase, bytes_out)

def bip85_get_languages():
    return _wallycore.bip85_get_languages()

def bip85_get_bip39_entropy(hdkey, lang, num_words, index, bytes_out):
    return _wallycore.bip85_get_bip39_entropy(hdkey, lang, num_words, index, bytes_out)

def bip85_get_rsa_entropy(hdkey, key_bits, index, bytes_out):
    return _wallycore.bip85_get_rsa_entropy(hdkey, key_bits, index, bytes_out)
WALLY_CS_MAX_ASSETS = _wallycore.WALLY_CS_MAX_ASSETS

def coinselect_assets(values, target, attempts, io_ratio, indices_out):
    return _wallycore.coinselect_assets(values, target, attempts, io_ratio, indices_out)

def scrypt(_pass, salt, cost, block_size, parallelism, bytes_out):
    return _wallycore.scrypt(_pass, salt, cost, block_size, parallelism, bytes_out)
AES_BLOCK_LEN = _wallycore.AES_BLOCK_LEN
AES_KEY_LEN_128 = _wallycore.AES_KEY_LEN_128
AES_KEY_LEN_192 = _wallycore.AES_KEY_LEN_192
AES_KEY_LEN_256 = _wallycore.AES_KEY_LEN_256
AES_FLAG_ENCRYPT = _wallycore.AES_FLAG_ENCRYPT
AES_FLAG_DECRYPT = _wallycore.AES_FLAG_DECRYPT

def aes_len(key, bytes, flags):
    return _wallycore.aes_len(key, bytes, flags)

def aes(key, bytes, flags, bytes_out):
    return _wallycore.aes(key, bytes, flags, bytes_out)

def aes_cbc_get_maximum_length(key, iv, bytes, flags):
    return _wallycore.aes_cbc_get_maximum_length(key, iv, bytes, flags)

def aes_cbc(key, iv, bytes, flags, bytes_out):
    return _wallycore.aes_cbc(key, iv, bytes, flags, bytes_out)
SHA256_LEN = _wallycore.SHA256_LEN
SHA512_LEN = _wallycore.SHA512_LEN

def sha256(bytes, bytes_out):
    return _wallycore.sha256(bytes, bytes_out)

def sha256_midstate(bytes, bytes_out):
    return _wallycore.sha256_midstate(bytes, bytes_out)

def sha256d(bytes, bytes_out):
    return _wallycore.sha256d(bytes, bytes_out)

def sha512(bytes, bytes_out):
    return _wallycore.sha512(bytes, bytes_out)

def bip340_tagged_hash(bytes, tag, bytes_out):
    return _wallycore.bip340_tagged_hash(bytes, tag, bytes_out)
RIPEMD160_LEN = _wallycore.RIPEMD160_LEN

def ripemd160(bytes, bytes_out):
    return _wallycore.ripemd160(bytes, bytes_out)
HASH160_LEN = _wallycore.HASH160_LEN

def hash160(bytes, bytes_out):
    return _wallycore.hash160(bytes, bytes_out)
HMAC_SHA256_LEN = _wallycore.HMAC_SHA256_LEN
HMAC_SHA512_LEN = _wallycore.HMAC_SHA512_LEN

def hmac_sha256(key, bytes, bytes_out):
    return _wallycore.hmac_sha256(key, bytes, bytes_out)

def hmac_sha512(key, bytes, bytes_out):
    return _wallycore.hmac_sha512(key, bytes, bytes_out)
PBKDF2_HMAC_SHA256_LEN = _wallycore.PBKDF2_HMAC_SHA256_LEN
PBKDF2_HMAC_SHA512_LEN = _wallycore.PBKDF2_HMAC_SHA512_LEN

def pbkdf2_hmac_sha256(_pass, salt, flags, cost, bytes_out):
    return _wallycore.pbkdf2_hmac_sha256(_pass, salt, flags, cost, bytes_out)

def pbkdf2_hmac_sha512(_pass, salt, flags, cost, bytes_out):
    return _wallycore.pbkdf2_hmac_sha512(_pass, salt, flags, cost, bytes_out)
EC_PRIVATE_KEY_LEN = _wallycore.EC_PRIVATE_KEY_LEN
EC_PUBLIC_KEY_LEN = _wallycore.EC_PUBLIC_KEY_LEN
EC_XONLY_PUBLIC_KEY_LEN = _wallycore.EC_XONLY_PUBLIC_KEY_LEN
EC_PUBLIC_KEY_UNCOMPRESSED_LEN = _wallycore.EC_PUBLIC_KEY_UNCOMPRESSED_LEN
EC_MESSAGE_HASH_LEN = _wallycore.EC_MESSAGE_HASH_LEN
EC_SIGNATURE_LEN = _wallycore.EC_SIGNATURE_LEN
EC_SIGNATURE_RECOVERABLE_LEN = _wallycore.EC_SIGNATURE_RECOVERABLE_LEN
EC_SIGNATURE_DER_MAX_LEN = _wallycore.EC_SIGNATURE_DER_MAX_LEN
EC_SIGNATURE_DER_MAX_LOW_R_LEN = _wallycore.EC_SIGNATURE_DER_MAX_LOW_R_LEN
EC_SCALAR_LEN = _wallycore.EC_SCALAR_LEN
EC_FLAG_ECDSA = _wallycore.EC_FLAG_ECDSA
EC_FLAG_SCHNORR = _wallycore.EC_FLAG_SCHNORR
EC_FLAG_GRIND_R = _wallycore.EC_FLAG_GRIND_R
EC_FLAG_RECOVERABLE = _wallycore.EC_FLAG_RECOVERABLE
EC_FLAG_ELEMENTS = _wallycore.EC_FLAG_ELEMENTS
EC_FLAGS_ALL = _wallycore.EC_FLAGS_ALL

def ec_private_key_verify(priv_key):
    return _wallycore.ec_private_key_verify(priv_key)

def ec_public_key_verify(pub_key):
    return _wallycore.ec_public_key_verify(pub_key)

def ec_xonly_public_key_verify(pub_key):
    return _wallycore.ec_xonly_public_key_verify(pub_key)

def ec_public_key_from_private_key(priv_key, bytes_out):
    return _wallycore.ec_public_key_from_private_key(priv_key, bytes_out)

def ec_public_key_decompress(pub_key, bytes_out):
    return _wallycore.ec_public_key_decompress(pub_key, bytes_out)

def ec_public_key_negate(pub_key, bytes_out):
    return _wallycore.ec_public_key_negate(pub_key, bytes_out)

def ec_public_key_tweak(pub_key, tweak, bytes_out):
    return _wallycore.ec_public_key_tweak(pub_key, tweak, bytes_out)

def ec_public_key_bip341_tweak(pub_key, merkle_root, flags, bytes_out):
    return _wallycore.ec_public_key_bip341_tweak(pub_key, merkle_root, flags, bytes_out)

def ec_private_key_bip341_tweak(priv_key, merkle_root, flags, bytes_out):
    return _wallycore.ec_private_key_bip341_tweak(priv_key, merkle_root, flags, bytes_out)

def ec_sig_from_bytes_len(priv_key, bytes, flags):
    return _wallycore.ec_sig_from_bytes_len(priv_key, bytes, flags)

def ec_sig_from_bytes(priv_key, bytes, flags, bytes_out):
    return _wallycore.ec_sig_from_bytes(priv_key, bytes, flags, bytes_out)

def ec_sig_from_bytes_aux_len(priv_key, bytes, aux_rand, flags):
    return _wallycore.ec_sig_from_bytes_aux_len(priv_key, bytes, aux_rand, flags)

def ec_sig_from_bytes_aux(priv_key, bytes, aux_rand, flags, bytes_out):
    return _wallycore.ec_sig_from_bytes_aux(priv_key, bytes, aux_rand, flags, bytes_out)

def ec_sig_normalize(sig, bytes_out):
    return _wallycore.ec_sig_normalize(sig, bytes_out)

def ec_sig_to_der(sig, bytes_out):
    return _wallycore.ec_sig_to_der(sig, bytes_out)

def ec_sig_from_der(bytes, bytes_out):
    return _wallycore.ec_sig_from_der(bytes, bytes_out)

def ec_sig_verify(pub_key, bytes, flags, sig):
    return _wallycore.ec_sig_verify(pub_key, bytes, flags, sig)

def ec_sig_to_public_key(bytes, sig, bytes_out):
    return _wallycore.ec_sig_to_public_key(bytes, sig, bytes_out)

def ec_scalar_verify(scalar):
    return _wallycore.ec_scalar_verify(scalar)

def ec_scalar_add(scalar, operand, bytes_out):
    return _wallycore.ec_scalar_add(scalar, operand, bytes_out)

def ec_scalar_subtract(scalar, operand, bytes_out):
    return _wallycore.ec_scalar_subtract(scalar, operand, bytes_out)

def ec_scalar_multiply(scalar, operand, bytes_out):
    return _wallycore.ec_scalar_multiply(scalar, operand, bytes_out)
BITCOIN_MESSAGE_MAX_LEN = _wallycore.BITCOIN_MESSAGE_MAX_LEN
BITCOIN_MESSAGE_FLAG_HASH = _wallycore.BITCOIN_MESSAGE_FLAG_HASH

def format_bitcoin_message(bytes, flags, bytes_out):
    return _wallycore.format_bitcoin_message(bytes, flags, bytes_out)

def ecdh(pub_key, priv_key, bytes_out):
    return _wallycore.ecdh(pub_key, priv_key, bytes_out)
WALLY_S2C_DATA_LEN = _wallycore.WALLY_S2C_DATA_LEN
WALLY_S2C_OPENING_LEN = _wallycore.WALLY_S2C_OPENING_LEN

def s2c_sig_from_bytes(priv_key, bytes, s2c_data, flags, s2c_opening_out, bytes_out):
    return _wallycore.s2c_sig_from_bytes(priv_key, bytes, s2c_data, flags, s2c_opening_out, bytes_out)

def s2c_commitment_verify(sig, s2c_data, s2c_opening, flags):
    return _wallycore.s2c_commitment_verify(sig, s2c_data, s2c_opening, flags)

def aes_cbc_with_ecdh_key_get_maximum_length(priv_key, iv, bytes, pub_key, label, flags):
    return _wallycore.aes_cbc_with_ecdh_key_get_maximum_length(priv_key, iv, bytes, pub_key, label, flags)

def aes_cbc_with_ecdh_key(priv_key, iv, bytes, pub_key, label, flags, bytes_out):
    return _wallycore.aes_cbc_with_ecdh_key(priv_key, iv, bytes, pub_key, label, flags, bytes_out)
WALLY_MINISCRIPT_TAPSCRIPT = _wallycore.WALLY_MINISCRIPT_TAPSCRIPT
WALLY_MINISCRIPT_ONLY = _wallycore.WALLY_MINISCRIPT_ONLY
WALLY_MINISCRIPT_REQUIRE_CHECKSUM = _wallycore.WALLY_MINISCRIPT_REQUIRE_CHECKSUM
WALLY_MINISCRIPT_POLICY_TEMPLATE = _wallycore.WALLY_MINISCRIPT_POLICY_TEMPLATE
WALLY_MINISCRIPT_UNIQUE_KEYPATHS = _wallycore.WALLY_MINISCRIPT_UNIQUE_KEYPATHS
WALLY_MINISCRIPT_AS_ELEMENTS = _wallycore.WALLY_MINISCRIPT_AS_ELEMENTS
WALLY_MINISCRIPT_DEPTH_MASK = _wallycore.WALLY_MINISCRIPT_DEPTH_MASK
WALLY_MINISCRIPT_DEPTH_SHIFT = _wallycore.WALLY_MINISCRIPT_DEPTH_SHIFT
WALLY_MS_IS_RANGED = _wallycore.WALLY_MS_IS_RANGED
WALLY_MS_IS_MULTIPATH = _wallycore.WALLY_MS_IS_MULTIPATH
WALLY_MS_IS_PRIVATE = _wallycore.WALLY_MS_IS_PRIVATE
WALLY_MS_IS_UNCOMPRESSED = _wallycore.WALLY_MS_IS_UNCOMPRESSED
WALLY_MS_IS_RAW = _wallycore.WALLY_MS_IS_RAW
WALLY_MS_IS_DESCRIPTOR = _wallycore.WALLY_MS_IS_DESCRIPTOR
WALLY_MS_IS_X_ONLY = _wallycore.WALLY_MS_IS_X_ONLY
WALLY_MS_IS_PARENTED = _wallycore.WALLY_MS_IS_PARENTED
WALLY_MS_IS_ELEMENTS = _wallycore.WALLY_MS_IS_ELEMENTS
WALLY_MS_IS_SLIP77 = _wallycore.WALLY_MS_IS_SLIP77
WALLY_MS_IS_ELIP150 = _wallycore.WALLY_MS_IS_ELIP150
WALLY_MS_IS_ELIP151 = _wallycore.WALLY_MS_IS_ELIP151
WALLY_MS_ANY_BLINDING_KEY = _wallycore.WALLY_MS_ANY_BLINDING_KEY
WALLY_MS_CANONICAL_NO_CHECKSUM = _wallycore.WALLY_MS_CANONICAL_NO_CHECKSUM
WALLY_MS_BLINDING_KEY_INDEX = _wallycore.WALLY_MS_BLINDING_KEY_INDEX

def descriptor_parse(descriptor, vars_in, network, flags):
    return _wallycore.descriptor_parse(descriptor, vars_in, network, flags)

def descriptor_free(descriptor):
    return _wallycore.descriptor_free(descriptor)

def descriptor_canonicalize(descriptor, flags):
    return _wallycore.descriptor_canonicalize(descriptor, flags)

def descriptor_get_checksum(descriptor, flags):
    return _wallycore.descriptor_get_checksum(descriptor, flags)

def descriptor_get_network(descriptor):
    return _wallycore.descriptor_get_network(descriptor)

def descriptor_set_network(descriptor, network):
    return _wallycore.descriptor_set_network(descriptor, network)

def descriptor_get_features(descriptor):
    return _wallycore.descriptor_get_features(descriptor)

def descriptor_get_num_variants(descriptor):
    return _wallycore.descriptor_get_num_variants(descriptor)

def descriptor_get_num_paths(descriptor):
    return _wallycore.descriptor_get_num_paths(descriptor)

def descriptor_get_depth(descriptor):
    return _wallycore.descriptor_get_depth(descriptor)

def descriptor_get_num_keys(descriptor):
    return _wallycore.descriptor_get_num_keys(descriptor)

def descriptor_get_key(descriptor, index):
    return _wallycore.descriptor_get_key(descriptor, index)

def descriptor_get_key_features(descriptor, index):
    return _wallycore.descriptor_get_key_features(descriptor, index)

def descriptor_get_key_child_path_str_len(descriptor, index):
    return _wallycore.descriptor_get_key_child_path_str_len(descriptor, index)

def descriptor_get_key_child_path_str(descriptor, index):
    return _wallycore.descriptor_get_key_child_path_str(descriptor, index)

def descriptor_get_key_origin_fingerprint(descriptor, index, bytes_out):
    return _wallycore.descriptor_get_key_origin_fingerprint(descriptor, index, bytes_out)

def descriptor_get_key_origin_path_str_len(descriptor, index):
    return _wallycore.descriptor_get_key_origin_path_str_len(descriptor, index)

def descriptor_get_key_origin_path_str(descriptor, index):
    return _wallycore.descriptor_get_key_origin_path_str(descriptor, index)

def descriptor_to_script_get_maximum_length(descriptor, depth, index, variant, multi_index, child_num, flags):
    return _wallycore.descriptor_to_script_get_maximum_length(descriptor, depth, index, variant, multi_index, child_num, flags)

def descriptor_to_script(descriptor, depth, index, variant, multi_index, child_num, flags, bytes_out):
    return _wallycore.descriptor_to_script(descriptor, depth, index, variant, multi_index, child_num, flags, bytes_out)

def descriptor_to_address(descriptor, variant, multi_index, child_num, flags):
    return _wallycore.descriptor_to_address(descriptor, variant, multi_index, child_num, flags)

def descriptor_to_addresses(descriptor, variant, multi_index, child_num, flags, output):
    return _wallycore.descriptor_to_addresses(descriptor, variant, multi_index, child_num, flags, output)

def map_init_alloc(allocation_len, verify_fn):
    return _wallycore.map_init_alloc(allocation_len, verify_fn)

def map_free(map_in):
    return _wallycore.map_free(map_in)

def map_clear(map_in):
    return _wallycore.map_clear(map_in)

def map_add(map_in, key, value):
    return _wallycore.map_add(map_in, key, value)

def map_add_integer(map_in, key, value):
    return _wallycore.map_add_integer(map_in, key, value)

def map_replace(map_in, key, value):
    return _wallycore.map_replace(map_in, key, value)

def map_replace_integer(map_in, key, value):
    return _wallycore.map_replace_integer(map_in, key, value)

def map_remove(map_in, key):
    return _wallycore.map_remove(map_in, key)

def map_remove_integer(map_in, key):
    return _wallycore.map_remove_integer(map_in, key)

def map_find_from(map_in, index, key):
    return _wallycore.map_find_from(map_in, index, key)

def map_find(map_in, key):
    return _wallycore.map_find(map_in, key)

def map_find_integer(map_in, key):
    return _wallycore.map_find_integer(map_in, key)

def map_get_num_items(map_in):
    return _wallycore.map_get_num_items(map_in)

def map_get_item_key_length(map_in, index):
    return _wallycore.map_get_item_key_length(map_in, index)

def map_get_item_key(map_in, index, bytes_out):
    return _wallycore.map_get_item_key(map_in, index, bytes_out)

def map_get_item_integer_key(map_in, index):
    return _wallycore.map_get_item_integer_key(map_in, index)

def map_get_item_length(map_in, index):
    return _wallycore.map_get_item_length(map_in, index)

def map_get_item(map_in, index, bytes_out):
    return _wallycore.map_get_item(map_in, index, bytes_out)

def map_sort(map_in, flags):
    return _wallycore.map_sort(map_in, flags)

def map_combine(map_in, source):
    return _wallycore.map_combine(map_in, source)

def map_assign(map_in, source):
    return _wallycore.map_assign(map_in, source)

def map_find_bip32_public_key_from(map_in, index, hdkey):
    return _wallycore.map_find_bip32_public_key_from(map_in, index, hdkey)

def map_keypath_get_bip32_key_from_alloc(map_in, index, hdkey):
    return _wallycore.map_keypath_get_bip32_key_from_alloc(map_in, index, hdkey)

def keypath_bip32_verify(key, val):
    return _wallycore.keypath_bip32_verify(key, val)

def keypath_public_key_verify(key, val):
    return _wallycore.keypath_public_key_verify(key, val)

def keypath_xonly_public_key_verify(key, val):
    return _wallycore.keypath_xonly_public_key_verify(key, val)

def merkle_path_xonly_public_key_verify(key, val):
    return _wallycore.merkle_path_xonly_public_key_verify(key, val)

def bip341_control_block_verify(bytes):
    return _wallycore.bip341_control_block_verify(bytes)

def map_keypath_bip32_init_alloc(allocation_len):
    return _wallycore.map_keypath_bip32_init_alloc(allocation_len)

def map_keypath_public_key_init_alloc(allocation_len):
    return _wallycore.map_keypath_public_key_init_alloc(allocation_len)

def map_keypath_add(map_in, pub_key, fingerprint, child_path):
    return _wallycore.map_keypath_add(map_in, pub_key, fingerprint, child_path)

def map_merkle_path_add(map_in, pub_key, merkle_hashes):
    return _wallycore.map_merkle_path_add(map_in, pub_key, merkle_hashes)

def keypath_get_fingerprint(val, bytes_out):
    return _wallycore.keypath_get_fingerprint(val, bytes_out)

def map_keypath_get_item_fingerprint(map_in, index, bytes_out):
    return _wallycore.map_keypath_get_item_fingerprint(map_in, index, bytes_out)

def keypath_get_path_len(val):
    return _wallycore.keypath_get_path_len(val)

def map_keypath_get_item_path_len(map_in, index):
    return _wallycore.map_keypath_get_item_path_len(map_in, index)

def keypath_get_path(val, child_path_out):
    return _wallycore.keypath_get_path(val, child_path_out)

def map_keypath_get_item_path(map_in, index, child_path_out):
    return _wallycore.map_keypath_get_item_path(map_in, index, child_path_out)

def map_hash_preimage_verify(key, val):
    return _wallycore.map_hash_preimage_verify(key, val)

def map_preimage_init_alloc(allocation_len):
    return _wallycore.map_preimage_init_alloc(allocation_len)

def map_preimage_ripemd160_add(map_in, value):
    return _wallycore.map_preimage_ripemd160_add(map_in, value)

def map_preimage_sha256_add(map_in, value):
    return _wallycore.map_preimage_sha256_add(map_in, value)

def map_preimage_hash160_add(map_in, value):
    return _wallycore.map_preimage_hash160_add(map_in, value)

def map_preimage_sha256d_add(map_in, value):
    return _wallycore.map_preimage_sha256d_add(map_in, value)
WALLY_PSBT_VERSION_0 = _wallycore.WALLY_PSBT_VERSION_0
WALLY_PSBT_VERSION_2 = _wallycore.WALLY_PSBT_VERSION_2
WALLY_PSBT_HIGHEST_VERSION = _wallycore.WALLY_PSBT_HIGHEST_VERSION
WALLY_PSBT_INIT_PSET = _wallycore.WALLY_PSBT_INIT_PSET
WALLY_PSBT_FLAG_NON_FINAL = _wallycore.WALLY_PSBT_FLAG_NON_FINAL
WALLY_PSBT_PROPRIETARY_TYPE = _wallycore.WALLY_PSBT_PROPRIETARY_TYPE
WALLY_PSBT_TXMOD_INPUTS = _wallycore.WALLY_PSBT_TXMOD_INPUTS
WALLY_PSBT_TXMOD_OUTPUTS = _wallycore.WALLY_PSBT_TXMOD_OUTPUTS
WALLY_PSBT_TXMOD_SINGLE = _wallycore.WALLY_PSBT_TXMOD_SINGLE
WALLY_PSET_TXMOD_RESERVED = _wallycore.WALLY_PSET_TXMOD_RESERVED
WALLY_PSBT_PARSE_FLAG_STRICT = _wallycore.WALLY_PSBT_PARSE_FLAG_STRICT
WALLY_PSBT_PARSE_FLAG_LOOSE = _wallycore.WALLY_PSBT_PARSE_FLAG_LOOSE
WALLY_PSBT_SERIALIZE_FLAG_REDUNDANT = _wallycore.WALLY_PSBT_SERIALIZE_FLAG_REDUNDANT
WALLY_PSBT_SERIALIZE_SIGS_ONLY = _wallycore.WALLY_PSBT_SERIALIZE_SIGS_ONLY
WALLY_PSBT_EXTRACT_FINAL = _wallycore.WALLY_PSBT_EXTRACT_FINAL
WALLY_PSBT_EXTRACT_NON_FINAL = _wallycore.WALLY_PSBT_EXTRACT_NON_FINAL
WALLY_PSBT_EXTRACT_OPT_FINAL = _wallycore.WALLY_PSBT_EXTRACT_OPT_FINAL
WALLY_PSBT_FINALIZE_NO_CLEAR = _wallycore.WALLY_PSBT_FINALIZE_NO_CLEAR
WALLY_PSBT_COMBINE_SIGS = _wallycore.WALLY_PSBT_COMBINE_SIGS
WALLY_PSBT_ID_BIP370 = _wallycore.WALLY_PSBT_ID_BIP370
WALLY_PSBT_ID_AS_V2 = _wallycore.WALLY_PSBT_ID_AS_V2
WALLY_PSBT_ID_USE_LOCKTIME = _wallycore.WALLY_PSBT_ID_USE_LOCKTIME
WALLY_PSET_BLINDED_NONE = _wallycore.WALLY_PSET_BLINDED_NONE
WALLY_PSET_BLINDED_REQUIRED = _wallycore.WALLY_PSET_BLINDED_REQUIRED
WALLY_PSET_BLINDED_PARTIAL = _wallycore.WALLY_PSET_BLINDED_PARTIAL
WALLY_PSET_BLINDED_FULL = _wallycore.WALLY_PSET_BLINDED_FULL
WALLY_PSET_BLIND_ALL = _wallycore.WALLY_PSET_BLIND_ALL
WALLY_SCALAR_OFFSET_LEN = _wallycore.WALLY_SCALAR_OFFSET_LEN

def psbt_input_set_previous_txid(input, txhash):
    return _wallycore.psbt_input_set_previous_txid(input, txhash)

def psbt_input_set_output_index(input, index):
    return _wallycore.psbt_input_set_output_index(input, index)

def psbt_input_set_sequence(input, sequence):
    return _wallycore.psbt_input_set_sequence(input, sequence)

def psbt_input_clear_sequence(input):
    return _wallycore.psbt_input_clear_sequence(input)

def psbt_input_set_utxo(input, utxo):
    return _wallycore.psbt_input_set_utxo(input, utxo)

def psbt_input_set_witness_utxo(input, witness_utxo):
    return _wallycore.psbt_input_set_witness_utxo(input, witness_utxo)

def psbt_input_set_witness_utxo_from_tx(input, utxo, index):
    return _wallycore.psbt_input_set_witness_utxo_from_tx(input, utxo, index)

def psbt_input_set_redeem_script(input, script):
    return _wallycore.psbt_input_set_redeem_script(input, script)

def psbt_input_set_witness_script(input, script):
    return _wallycore.psbt_input_set_witness_script(input, script)

def psbt_input_set_final_scriptsig(input, final_scriptsig):
    return _wallycore.psbt_input_set_final_scriptsig(input, final_scriptsig)

def psbt_input_set_final_witness(input, witness):
    return _wallycore.psbt_input_set_final_witness(input, witness)

def psbt_input_set_keypaths(input, map_in):
    return _wallycore.psbt_input_set_keypaths(input, map_in)

def psbt_input_find_keypath(input, pub_key):
    return _wallycore.psbt_input_find_keypath(input, pub_key)

def psbt_input_keypath_add(input, pub_key, fingerprint, child_path):
    return _wallycore.psbt_input_keypath_add(input, pub_key, fingerprint, child_path)

def psbt_input_taproot_keypath_add(input, pub_key, tapleaf_hashes, fingerprint, child_path):
    return _wallycore.psbt_input_taproot_keypath_add(input, pub_key, tapleaf_hashes, fingerprint, child_path)

def psbt_input_set_signatures(input, map_in):
    return _wallycore.psbt_input_set_signatures(input, map_in)

def psbt_input_set_taproot_signature(input, tap_sig):
    return _wallycore.psbt_input_set_taproot_signature(input, tap_sig)

def psbt_input_set_taproot_internal_key(input, pub_key):
    return _wallycore.psbt_input_set_taproot_internal_key(input, pub_key)

def psbt_input_find_signature(input, pub_key):
    return _wallycore.psbt_input_find_signature(input, pub_key)

def psbt_input_add_signature(input, pub_key, sig):
    return _wallycore.psbt_input_add_signature(input, pub_key, sig)

def psbt_input_set_unknowns(input, map_in):
    return _wallycore.psbt_input_set_unknowns(input, map_in)

def psbt_input_find_unknown(input, key):
    return _wallycore.psbt_input_find_unknown(input, key)

def psbt_input_set_sighash(input, sighash):
    return _wallycore.psbt_input_set_sighash(input, sighash)

def psbt_input_set_required_locktime(input, required_locktime):
    return _wallycore.psbt_input_set_required_locktime(input, required_locktime)

def psbt_input_clear_required_locktime(input):
    return _wallycore.psbt_input_clear_required_locktime(input)

def psbt_input_set_required_lockheight(input, required_lockheight):
    return _wallycore.psbt_input_set_required_lockheight(input, required_lockheight)

def psbt_input_clear_required_lockheight(input):
    return _wallycore.psbt_input_clear_required_lockheight(input)

def psbt_input_set_amount(input, amount):
    return _wallycore.psbt_input_set_amount(input, amount)

def psbt_input_get_amount_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_amount_rangeproof(input, bytes_out)

def psbt_input_get_amount_rangeproof_len(input):
    return _wallycore.psbt_input_get_amount_rangeproof_len(input)

def psbt_input_set_amount_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_amount_rangeproof(input, rangeproof)

def psbt_input_clear_amount_rangeproof(input):
    return _wallycore.psbt_input_clear_amount_rangeproof(input)

def psbt_input_get_asset(input, bytes_out):
    return _wallycore.psbt_input_get_asset(input, bytes_out)

def psbt_input_get_asset_len(input):
    return _wallycore.psbt_input_get_asset_len(input)

def psbt_input_set_asset(input, asset):
    return _wallycore.psbt_input_set_asset(input, asset)

def psbt_input_clear_asset(input):
    return _wallycore.psbt_input_clear_asset(input)

def psbt_input_get_asset_surjectionproof(input, bytes_out):
    return _wallycore.psbt_input_get_asset_surjectionproof(input, bytes_out)

def psbt_input_get_asset_surjectionproof_len(input):
    return _wallycore.psbt_input_get_asset_surjectionproof_len(input)

def psbt_input_set_asset_surjectionproof(input, surjectionproof):
    return _wallycore.psbt_input_set_asset_surjectionproof(input, surjectionproof)

def psbt_input_clear_asset_surjectionproof(input):
    return _wallycore.psbt_input_clear_asset_surjectionproof(input)

def psbt_input_set_issuance_amount(input, amount):
    return _wallycore.psbt_input_set_issuance_amount(input, amount)

def psbt_input_set_inflation_keys(input, value):
    return _wallycore.psbt_input_set_inflation_keys(input, value)

def psbt_input_set_pegin_amount(input, amount):
    return _wallycore.psbt_input_set_pegin_amount(input, amount)

def psbt_input_set_pegin_tx(input, tx):
    return _wallycore.psbt_input_set_pegin_tx(input, tx)

def psbt_input_set_pegin_witness(input, witness):
    return _wallycore.psbt_input_set_pegin_witness(input, witness)

def psbt_input_get_pegin_txout_proof(input, bytes_out):
    return _wallycore.psbt_input_get_pegin_txout_proof(input, bytes_out)

def psbt_input_get_pegin_txout_proof_len(input):
    return _wallycore.psbt_input_get_pegin_txout_proof_len(input)

def psbt_input_set_pegin_txout_proof(input, txout_proof):
    return _wallycore.psbt_input_set_pegin_txout_proof(input, txout_proof)

def psbt_input_clear_pegin_txout_proof(input):
    return _wallycore.psbt_input_clear_pegin_txout_proof(input)

def psbt_input_get_pegin_genesis_blockhash(input, bytes_out):
    return _wallycore.psbt_input_get_pegin_genesis_blockhash(input, bytes_out)

def psbt_input_get_pegin_genesis_blockhash_len(input):
    return _wallycore.psbt_input_get_pegin_genesis_blockhash_len(input)

def psbt_input_set_pegin_genesis_blockhash(input, genesis_blockhash):
    return _wallycore.psbt_input_set_pegin_genesis_blockhash(input, genesis_blockhash)

def psbt_input_clear_pegin_genesis_blockhash(input):
    return _wallycore.psbt_input_clear_pegin_genesis_blockhash(input)

def psbt_input_get_pegin_claim_script(input, bytes_out):
    return _wallycore.psbt_input_get_pegin_claim_script(input, bytes_out)

def psbt_input_get_pegin_claim_script_len(input):
    return _wallycore.psbt_input_get_pegin_claim_script_len(input)

def psbt_input_set_pegin_claim_script(input, script):
    return _wallycore.psbt_input_set_pegin_claim_script(input, script)

def psbt_input_clear_pegin_claim_script(input):
    return _wallycore.psbt_input_clear_pegin_claim_script(input)

def psbt_input_get_issuance_amount_commitment(input, bytes_out):
    return _wallycore.psbt_input_get_issuance_amount_commitment(input, bytes_out)

def psbt_input_get_issuance_amount_commitment_len(input):
    return _wallycore.psbt_input_get_issuance_amount_commitment_len(input)

def psbt_input_set_issuance_amount_commitment(input, commitment):
    return _wallycore.psbt_input_set_issuance_amount_commitment(input, commitment)

def psbt_input_clear_issuance_amount_commitment(input):
    return _wallycore.psbt_input_clear_issuance_amount_commitment(input)

def psbt_input_get_issuance_amount_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_issuance_amount_rangeproof(input, bytes_out)

def psbt_input_get_issuance_amount_rangeproof_len(input):
    return _wallycore.psbt_input_get_issuance_amount_rangeproof_len(input)

def psbt_input_set_issuance_amount_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_issuance_amount_rangeproof(input, rangeproof)

def psbt_input_clear_issuance_amount_rangeproof(input):
    return _wallycore.psbt_input_clear_issuance_amount_rangeproof(input)

def psbt_input_get_issuance_blinding_nonce(input, bytes_out):
    return _wallycore.psbt_input_get_issuance_blinding_nonce(input, bytes_out)

def psbt_input_get_issuance_blinding_nonce_len(input):
    return _wallycore.psbt_input_get_issuance_blinding_nonce_len(input)

def psbt_input_set_issuance_blinding_nonce(input, nonce):
    return _wallycore.psbt_input_set_issuance_blinding_nonce(input, nonce)

def psbt_input_clear_issuance_blinding_nonce(input):
    return _wallycore.psbt_input_clear_issuance_blinding_nonce(input)

def psbt_input_get_issuance_asset_entropy(input, bytes_out):
    return _wallycore.psbt_input_get_issuance_asset_entropy(input, bytes_out)

def psbt_input_get_issuance_asset_entropy_len(input):
    return _wallycore.psbt_input_get_issuance_asset_entropy_len(input)

def psbt_input_set_issuance_asset_entropy(input, entropy):
    return _wallycore.psbt_input_set_issuance_asset_entropy(input, entropy)

def psbt_input_clear_issuance_asset_entropy(input):
    return _wallycore.psbt_input_clear_issuance_asset_entropy(input)

def psbt_input_get_issuance_amount_blinding_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_issuance_amount_blinding_rangeproof(input, bytes_out)

def psbt_input_get_issuance_amount_blinding_rangeproof_len(input):
    return _wallycore.psbt_input_get_issuance_amount_blinding_rangeproof_len(input)

def psbt_input_set_issuance_amount_blinding_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_issuance_amount_blinding_rangeproof(input, rangeproof)

def psbt_input_clear_issuance_amount_blinding_rangeproof(input):
    return _wallycore.psbt_input_clear_issuance_amount_blinding_rangeproof(input)

def psbt_input_get_inflation_keys_commitment(input, bytes_out):
    return _wallycore.psbt_input_get_inflation_keys_commitment(input, bytes_out)

def psbt_input_get_inflation_keys_commitment_len(input):
    return _wallycore.psbt_input_get_inflation_keys_commitment_len(input)

def psbt_input_set_inflation_keys_commitment(input, commitment):
    return _wallycore.psbt_input_set_inflation_keys_commitment(input, commitment)

def psbt_input_clear_inflation_keys_commitment(input):
    return _wallycore.psbt_input_clear_inflation_keys_commitment(input)

def psbt_input_get_inflation_keys_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_inflation_keys_rangeproof(input, bytes_out)

def psbt_input_get_inflation_keys_rangeproof_len(input):
    return _wallycore.psbt_input_get_inflation_keys_rangeproof_len(input)

def psbt_input_set_inflation_keys_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_inflation_keys_rangeproof(input, rangeproof)

def psbt_input_clear_inflation_keys_rangeproof(input):
    return _wallycore.psbt_input_clear_inflation_keys_rangeproof(input)

def psbt_input_get_inflation_keys_blinding_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_inflation_keys_blinding_rangeproof(input, bytes_out)

def psbt_input_get_inflation_keys_blinding_rangeproof_len(input):
    return _wallycore.psbt_input_get_inflation_keys_blinding_rangeproof_len(input)

def psbt_input_set_inflation_keys_blinding_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_inflation_keys_blinding_rangeproof(input, rangeproof)

def psbt_input_clear_inflation_keys_blinding_rangeproof(input):
    return _wallycore.psbt_input_clear_inflation_keys_blinding_rangeproof(input)

def psbt_input_get_utxo_rangeproof(input, bytes_out):
    return _wallycore.psbt_input_get_utxo_rangeproof(input, bytes_out)

def psbt_input_get_utxo_rangeproof_len(input):
    return _wallycore.psbt_input_get_utxo_rangeproof_len(input)

def psbt_input_set_utxo_rangeproof(input, rangeproof):
    return _wallycore.psbt_input_set_utxo_rangeproof(input, rangeproof)

def psbt_input_clear_utxo_rangeproof(input):
    return _wallycore.psbt_input_clear_utxo_rangeproof(input)

def psbt_input_generate_explicit_proofs(input, satoshi, asset, abf, vbf, entropy):
    return _wallycore.psbt_input_generate_explicit_proofs(input, satoshi, asset, abf, vbf, entropy)

def psbt_input_is_finalized(input):
    return _wallycore.psbt_input_is_finalized(input)

def psbt_output_set_redeem_script(output, script):
    return _wallycore.psbt_output_set_redeem_script(output, script)

def psbt_output_set_witness_script(output, script):
    return _wallycore.psbt_output_set_witness_script(output, script)

def psbt_output_set_keypaths(output, map_in):
    return _wallycore.psbt_output_set_keypaths(output, map_in)

def psbt_output_find_keypath(output, pub_key):
    return _wallycore.psbt_output_find_keypath(output, pub_key)

def psbt_output_keypath_add(output, pub_key, fingerprint, child_path):
    return _wallycore.psbt_output_keypath_add(output, pub_key, fingerprint, child_path)

def psbt_output_taproot_keypath_add(output, pub_key, tapleaf_hashes, fingerprint, child_path):
    return _wallycore.psbt_output_taproot_keypath_add(output, pub_key, tapleaf_hashes, fingerprint, child_path)

def psbt_output_set_unknowns(output, map_in):
    return _wallycore.psbt_output_set_unknowns(output, map_in)

def psbt_output_find_unknown(output, key):
    return _wallycore.psbt_output_find_unknown(output, key)

def psbt_output_set_amount(output, amount):
    return _wallycore.psbt_output_set_amount(output, amount)

def psbt_output_clear_amount(output):
    return _wallycore.psbt_output_clear_amount(output)

def psbt_output_set_script(output, script):
    return _wallycore.psbt_output_set_script(output, script)

def psbt_output_set_taproot_internal_key(output, pub_key):
    return _wallycore.psbt_output_set_taproot_internal_key(output, pub_key)

def psbt_output_set_blinder_index(output, index):
    return _wallycore.psbt_output_set_blinder_index(output, index)

def psbt_output_clear_blinder_index(output):
    return _wallycore.psbt_output_clear_blinder_index(output)

def psbt_output_get_value_commitment(output, bytes_out):
    return _wallycore.psbt_output_get_value_commitment(output, bytes_out)

def psbt_output_get_value_commitment_len(output):
    return _wallycore.psbt_output_get_value_commitment_len(output)

def psbt_output_set_value_commitment(output, commitment):
    return _wallycore.psbt_output_set_value_commitment(output, commitment)

def psbt_output_clear_value_commitment(output):
    return _wallycore.psbt_output_clear_value_commitment(output)

def psbt_output_get_asset(output, bytes_out):
    return _wallycore.psbt_output_get_asset(output, bytes_out)

def psbt_output_get_asset_len(output):
    return _wallycore.psbt_output_get_asset_len(output)

def psbt_output_set_asset(output, asset):
    return _wallycore.psbt_output_set_asset(output, asset)

def psbt_output_clear_asset(output):
    return _wallycore.psbt_output_clear_asset(output)

def psbt_output_get_asset_commitment(output, bytes_out):
    return _wallycore.psbt_output_get_asset_commitment(output, bytes_out)

def psbt_output_get_asset_commitment_len(output):
    return _wallycore.psbt_output_get_asset_commitment_len(output)

def psbt_output_set_asset_commitment(output, commitment):
    return _wallycore.psbt_output_set_asset_commitment(output, commitment)

def psbt_output_clear_asset_commitment(output):
    return _wallycore.psbt_output_clear_asset_commitment(output)

def psbt_output_get_value_rangeproof(output, bytes_out):
    return _wallycore.psbt_output_get_value_rangeproof(output, bytes_out)

def psbt_output_get_value_rangeproof_len(output):
    return _wallycore.psbt_output_get_value_rangeproof_len(output)

def psbt_output_set_value_rangeproof(output, rangeproof):
    return _wallycore.psbt_output_set_value_rangeproof(output, rangeproof)

def psbt_output_clear_value_rangeproof(output):
    return _wallycore.psbt_output_clear_value_rangeproof(output)

def psbt_output_get_asset_surjectionproof(output, bytes_out):
    return _wallycore.psbt_output_get_asset_surjectionproof(output, bytes_out)

def psbt_output_get_asset_surjectionproof_len(output):
    return _wallycore.psbt_output_get_asset_surjectionproof_len(output)

def psbt_output_set_asset_surjectionproof(output, surjectionproof):
    return _wallycore.psbt_output_set_asset_surjectionproof(output, surjectionproof)

def psbt_output_clear_asset_surjectionproof(output):
    return _wallycore.psbt_output_clear_asset_surjectionproof(output)

def psbt_output_get_blinding_public_key(output, bytes_out):
    return _wallycore.psbt_output_get_blinding_public_key(output, bytes_out)

def psbt_output_get_blinding_public_key_len(output):
    return _wallycore.psbt_output_get_blinding_public_key_len(output)

def psbt_output_set_blinding_public_key(output, pub_key):
    return _wallycore.psbt_output_set_blinding_public_key(output, pub_key)

def psbt_output_clear_blinding_public_key(output):
    return _wallycore.psbt_output_clear_blinding_public_key(output)

def psbt_output_get_ecdh_public_key(output, bytes_out):
    return _wallycore.psbt_output_get_ecdh_public_key(output, bytes_out)

def psbt_output_get_ecdh_public_key_len(output):
    return _wallycore.psbt_output_get_ecdh_public_key_len(output)

def psbt_output_set_ecdh_public_key(output, pub_key):
    return _wallycore.psbt_output_set_ecdh_public_key(output, pub_key)

def psbt_output_clear_ecdh_public_key(output):
    return _wallycore.psbt_output_clear_ecdh_public_key(output)

def psbt_output_get_value_blinding_rangeproof(output, bytes_out):
    return _wallycore.psbt_output_get_value_blinding_rangeproof(output, bytes_out)

def psbt_output_get_value_blinding_rangeproof_len(output):
    return _wallycore.psbt_output_get_value_blinding_rangeproof_len(output)

def psbt_output_set_value_blinding_rangeproof(output, rangeproof):
    return _wallycore.psbt_output_set_value_blinding_rangeproof(output, rangeproof)

def psbt_output_clear_value_blinding_rangeproof(output):
    return _wallycore.psbt_output_clear_value_blinding_rangeproof(output)

def psbt_output_get_asset_blinding_surjectionproof(output, bytes_out):
    return _wallycore.psbt_output_get_asset_blinding_surjectionproof(output, bytes_out)

def psbt_output_get_asset_blinding_surjectionproof_len(output):
    return _wallycore.psbt_output_get_asset_blinding_surjectionproof_len(output)

def psbt_output_set_asset_blinding_surjectionproof(output, surjectionproof):
    return _wallycore.psbt_output_set_asset_blinding_surjectionproof(output, surjectionproof)

def psbt_output_clear_asset_blinding_surjectionproof(output):
    return _wallycore.psbt_output_clear_asset_blinding_surjectionproof(output)

def psbt_output_get_blinding_status(output, flags):
    return _wallycore.psbt_output_get_blinding_status(output, flags)

def psbt_init_alloc(version, inputs_allocation_len, outputs_allocation_len, global_unknowns_allocation_len, flags):
    return _wallycore.psbt_init_alloc(version, inputs_allocation_len, outputs_allocation_len, global_unknowns_allocation_len, flags)

def psbt_free(psbt):
    return _wallycore.psbt_free(psbt)

def psbt_set_version(psbt, flags, version):
    return _wallycore.psbt_set_version(psbt, flags, version)

def psbt_get_id(psbt, flags, bytes_out):
    return _wallycore.psbt_get_id(psbt, flags, bytes_out)

def psbt_get_locktime(psbt):
    return _wallycore.psbt_get_locktime(psbt)

def psbt_is_finalized(psbt):
    return _wallycore.psbt_is_finalized(psbt)

def psbt_is_input_finalized(psbt, index):
    return _wallycore.psbt_is_input_finalized(psbt, index)

def psbt_set_global_tx(psbt, tx):
    return _wallycore.psbt_set_global_tx(psbt, tx)

def psbt_set_tx_version(psbt, version):
    return _wallycore.psbt_set_tx_version(psbt, version)

def psbt_get_tx_version(psbt):
    return _wallycore.psbt_get_tx_version(psbt)

def psbt_set_fallback_locktime(psbt, locktime):
    return _wallycore.psbt_set_fallback_locktime(psbt, locktime)

def psbt_clear_fallback_locktime(psbt):
    return _wallycore.psbt_clear_fallback_locktime(psbt)

def psbt_set_tx_modifiable_flags(psbt, flags):
    return _wallycore.psbt_set_tx_modifiable_flags(psbt, flags)

def psbt_set_global_scalars(psbt, map_in):
    return _wallycore.psbt_set_global_scalars(psbt, map_in)

def psbt_add_global_scalar(psbt, scalar):
    return _wallycore.psbt_add_global_scalar(psbt, scalar)

def psbt_find_global_scalar(psbt, scalar):
    return _wallycore.psbt_find_global_scalar(psbt, scalar)

def psbt_set_pset_modifiable_flags(psbt, flags):
    return _wallycore.psbt_set_pset_modifiable_flags(psbt, flags)

def psbt_set_global_genesis_blockhash(psbt, genesis_blockhash):
    return _wallycore.psbt_set_global_genesis_blockhash(psbt, genesis_blockhash)

def psbt_has_global_genesis_blockhash(psbt):
    return _wallycore.psbt_has_global_genesis_blockhash(psbt)

def psbt_get_global_genesis_blockhash(psbt, bytes_out):
    return _wallycore.psbt_get_global_genesis_blockhash(psbt, bytes_out)

def psbt_find_input_spending_utxo(psbt, txhash, utxo_index):
    return _wallycore.psbt_find_input_spending_utxo(psbt, txhash, utxo_index)

def psbt_add_input_keypath(psbt, index, pub_key, fingerprint, child_path):
    return _wallycore.psbt_add_input_keypath(psbt, index, pub_key, fingerprint, child_path)

def psbt_add_input_taproot_keypath(psbt, index, flags, pub_key, tapleaf_hashes, fingerprint, child_path):
    return _wallycore.psbt_add_input_taproot_keypath(psbt, index, flags, pub_key, tapleaf_hashes, fingerprint, child_path)

def psbt_add_tx_input_at(psbt, index, flags, input):
    return _wallycore.psbt_add_tx_input_at(psbt, index, flags, input)

def psbt_remove_input(psbt, index):
    return _wallycore.psbt_remove_input(psbt, index)

def psbt_get_input_bip32_key_from_alloc(psbt, index, subindex, flags, hdkey):
    return _wallycore.psbt_get_input_bip32_key_from_alloc(psbt, index, subindex, flags, hdkey)

def psbt_get_input_signing_script_len(psbt, index):
    return _wallycore.psbt_get_input_signing_script_len(psbt, index)

def psbt_get_input_signing_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_signing_script(psbt, index, bytes_out)

def psbt_get_input_scriptcode_len(psbt, index, script):
    return _wallycore.psbt_get_input_scriptcode_len(psbt, index, script)

def psbt_get_input_scriptcode(psbt, index, script, bytes_out):
    return _wallycore.psbt_get_input_scriptcode(psbt, index, script, bytes_out)

def psbt_get_input_signature_hash(psbt, index, tx, script, flags, bytes_out):
    return _wallycore.psbt_get_input_signature_hash(psbt, index, tx, script, flags, bytes_out)

def psbt_add_output_keypath(psbt, index, pub_key, fingerprint, child_path):
    return _wallycore.psbt_add_output_keypath(psbt, index, pub_key, fingerprint, child_path)

def psbt_add_output_taproot_keypath(psbt, index, flags, pub_key, tapleaf_hashes, fingerprint, child_path):
    return _wallycore.psbt_add_output_taproot_keypath(psbt, index, flags, pub_key, tapleaf_hashes, fingerprint, child_path)

def psbt_add_tx_output_at(psbt, index, flags, output):
    return _wallycore.psbt_add_tx_output_at(psbt, index, flags, output)

def psbt_remove_output(psbt, index):
    return _wallycore.psbt_remove_output(psbt, index)

def psbt_from_bytes(bytes, flags):
    return _wallycore.psbt_from_bytes(bytes, flags)

def psbt_get_length(psbt, flags):
    return _wallycore.psbt_get_length(psbt, flags)

def psbt_to_bytes(psbt, flags, bytes_out):
    return _wallycore.psbt_to_bytes(psbt, flags, bytes_out)

def psbt_from_base64(str_in, flags):
    return _wallycore.psbt_from_base64(str_in, flags)

def psbt_from_base64_n(str_in, str_len, flags):
    return _wallycore.psbt_from_base64_n(str_in, str_len, flags)

def psbt_to_base64(psbt, flags):
    return _wallycore.psbt_to_base64(psbt, flags)

def psbt_from_tx(tx, version, flags):
    return _wallycore.psbt_from_tx(tx, version, flags)

def psbt_combine(psbt, source):
    return _wallycore.psbt_combine(psbt, source)

def psbt_combine_ex(psbt, flags, source):
    return _wallycore.psbt_combine_ex(psbt, flags, source)

def psbt_clone_alloc(psbt, flags):
    return _wallycore.psbt_clone_alloc(psbt, flags)

def psbt_blind_alloc(psbt, values, vbfs, assets, abfs, entropy, output_index, flags):
    return _wallycore.psbt_blind_alloc(psbt, values, vbfs, assets, abfs, entropy, output_index, flags)

def psbt_signing_cache_enable(psbt, flags):
    return _wallycore.psbt_signing_cache_enable(psbt, flags)

def psbt_signing_cache_disable(psbt):
    return _wallycore.psbt_signing_cache_disable(psbt)

def psbt_sign(psbt, key, flags):
    return _wallycore.psbt_sign(psbt, key, flags)

def psbt_sign_bip32(psbt, hdkey, flags):
    return _wallycore.psbt_sign_bip32(psbt, hdkey, flags)

def psbt_sign_input_bip32(psbt, index, subindex, txhash, hdkey, flags):
    return _wallycore.psbt_sign_input_bip32(psbt, index, subindex, txhash, hdkey, flags)

def psbt_finalize(psbt, flags):
    return _wallycore.psbt_finalize(psbt, flags)

def psbt_finalize_input(psbt, index, flags):
    return _wallycore.psbt_finalize_input(psbt, index, flags)

def psbt_extract(psbt, flags):
    return _wallycore.psbt_extract(psbt, flags)

def psbt_is_elements(psbt):
    return _wallycore.psbt_is_elements(psbt)
LIBWALLY_CORE_PSBT_MEMBERS_H = _wallycore.LIBWALLY_CORE_PSBT_MEMBERS_H

def psbt_get_global_tx_alloc(psbt):
    return _wallycore.psbt_get_global_tx_alloc(psbt)

def psbt_get_version(psbt):
    return _wallycore.psbt_get_version(psbt)

def psbt_get_num_inputs(psbt):
    return _wallycore.psbt_get_num_inputs(psbt)

def psbt_get_num_outputs(psbt):
    return _wallycore.psbt_get_num_outputs(psbt)

def psbt_get_fallback_locktime(psbt):
    return _wallycore.psbt_get_fallback_locktime(psbt)

def psbt_has_fallback_locktime(psbt):
    return _wallycore.psbt_has_fallback_locktime(psbt)

def psbt_get_tx_modifiable_flags(psbt):
    return _wallycore.psbt_get_tx_modifiable_flags(psbt)

def psbt_get_global_scalars_size(psbt):
    return _wallycore.psbt_get_global_scalars_size(psbt)

def psbt_get_global_scalar(psbt, index, bytes_out):
    return _wallycore.psbt_get_global_scalar(psbt, index, bytes_out)

def psbt_get_pset_modifiable_flags(psbt):
    return _wallycore.psbt_get_pset_modifiable_flags(psbt)

def psbt_get_input_utxo_alloc(psbt, index):
    return _wallycore.psbt_get_input_utxo_alloc(psbt, index)

def psbt_get_input_witness_utxo_alloc(psbt, index):
    return _wallycore.psbt_get_input_witness_utxo_alloc(psbt, index)

def psbt_get_input_best_utxo_alloc(psbt, index):
    return _wallycore.psbt_get_input_best_utxo_alloc(psbt, index)

def psbt_get_input_redeem_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_redeem_script(psbt, index, bytes_out)

def psbt_get_input_redeem_script_len(psbt, index):
    return _wallycore.psbt_get_input_redeem_script_len(psbt, index)

def psbt_get_input_witness_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_witness_script(psbt, index, bytes_out)

def psbt_get_input_witness_script_len(psbt, index):
    return _wallycore.psbt_get_input_witness_script_len(psbt, index)

def psbt_get_input_final_scriptsig(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_final_scriptsig(psbt, index, bytes_out)

def psbt_get_input_final_scriptsig_len(psbt, index):
    return _wallycore.psbt_get_input_final_scriptsig_len(psbt, index)

def psbt_get_input_final_witness_alloc(psbt, index):
    return _wallycore.psbt_get_input_final_witness_alloc(psbt, index)

def psbt_get_input_keypaths_size(psbt, index):
    return _wallycore.psbt_get_input_keypaths_size(psbt, index)

def psbt_find_input_keypath(psbt, index, key):
    return _wallycore.psbt_find_input_keypath(psbt, index, key)

def psbt_get_input_keypath(psbt, index, subindex, bytes_out):
    return _wallycore.psbt_get_input_keypath(psbt, index, subindex, bytes_out)

def psbt_get_input_keypath_len(psbt, index, subindex):
    return _wallycore.psbt_get_input_keypath_len(psbt, index, subindex)

def psbt_get_input_signatures_size(psbt, index):
    return _wallycore.psbt_get_input_signatures_size(psbt, index)

def psbt_find_input_signature(psbt, index, pub_key):
    return _wallycore.psbt_find_input_signature(psbt, index, pub_key)

def psbt_get_input_signature(psbt, index, subindex, bytes_out):
    return _wallycore.psbt_get_input_signature(psbt, index, subindex, bytes_out)

def psbt_get_input_signature_len(psbt, index, subindex):
    return _wallycore.psbt_get_input_signature_len(psbt, index, subindex)

def psbt_get_input_taproot_signature(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_taproot_signature(psbt, index, bytes_out)

def psbt_get_input_taproot_signature_len(psbt, index):
    return _wallycore.psbt_get_input_taproot_signature_len(psbt, index)

def psbt_get_input_taproot_internal_key(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_taproot_internal_key(psbt, index, bytes_out)

def psbt_get_input_taproot_internal_key_len(psbt, index):
    return _wallycore.psbt_get_input_taproot_internal_key_len(psbt, index)

def psbt_get_input_unknowns_size(psbt, index):
    return _wallycore.psbt_get_input_unknowns_size(psbt, index)

def psbt_find_input_unknown(psbt, index, key):
    return _wallycore.psbt_find_input_unknown(psbt, index, key)

def psbt_get_input_unknown(psbt, index, subindex, bytes_out):
    return _wallycore.psbt_get_input_unknown(psbt, index, subindex, bytes_out)

def psbt_get_input_unknown_len(psbt, index, subindex):
    return _wallycore.psbt_get_input_unknown_len(psbt, index, subindex)

def psbt_get_input_sighash(psbt, index):
    return _wallycore.psbt_get_input_sighash(psbt, index)

def psbt_get_input_signature_type(psbt, index):
    return _wallycore.psbt_get_input_signature_type(psbt, index)

def psbt_get_input_previous_txid(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_previous_txid(psbt, index, bytes_out)

def psbt_get_input_output_index(psbt, index):
    return _wallycore.psbt_get_input_output_index(psbt, index)

def psbt_get_input_sequence(psbt, index):
    return _wallycore.psbt_get_input_sequence(psbt, index)

def psbt_get_input_required_locktime(psbt, index):
    return _wallycore.psbt_get_input_required_locktime(psbt, index)

def psbt_get_input_required_lockheight(psbt, index):
    return _wallycore.psbt_get_input_required_lockheight(psbt, index)

def psbt_set_input_utxo(psbt, index, utxo):
    return _wallycore.psbt_set_input_utxo(psbt, index, utxo)

def psbt_set_input_witness_utxo(psbt, index, witness_utxo):
    return _wallycore.psbt_set_input_witness_utxo(psbt, index, witness_utxo)

def psbt_set_input_witness_utxo_from_tx(psbt, index, utxo, utxo_index):
    return _wallycore.psbt_set_input_witness_utxo_from_tx(psbt, index, utxo, utxo_index)

def psbt_set_input_redeem_script(psbt, index, script):
    return _wallycore.psbt_set_input_redeem_script(psbt, index, script)

def psbt_set_input_witness_script(psbt, index, script):
    return _wallycore.psbt_set_input_witness_script(psbt, index, script)

def psbt_set_input_final_scriptsig(psbt, index, script):
    return _wallycore.psbt_set_input_final_scriptsig(psbt, index, script)

def psbt_set_input_final_witness(psbt, index, final_witness):
    return _wallycore.psbt_set_input_final_witness(psbt, index, final_witness)

def psbt_set_input_keypaths(psbt, index, map_in):
    return _wallycore.psbt_set_input_keypaths(psbt, index, map_in)

def psbt_set_input_signatures(psbt, index, map_in):
    return _wallycore.psbt_set_input_signatures(psbt, index, map_in)

def psbt_set_input_taproot_signature(psbt, index, sig):
    return _wallycore.psbt_set_input_taproot_signature(psbt, index, sig)

def psbt_set_input_taproot_internal_key(psbt, index, pub_key):
    return _wallycore.psbt_set_input_taproot_internal_key(psbt, index, pub_key)

def psbt_add_input_signature(psbt, index, pub_key, sig):
    return _wallycore.psbt_add_input_signature(psbt, index, pub_key, sig)

def psbt_set_input_unknowns(psbt, index, map_in):
    return _wallycore.psbt_set_input_unknowns(psbt, index, map_in)

def psbt_set_input_sighash(psbt, index, sighash):
    return _wallycore.psbt_set_input_sighash(psbt, index, sighash)

def psbt_set_input_previous_txid(psbt, index, txhash):
    return _wallycore.psbt_set_input_previous_txid(psbt, index, txhash)

def psbt_set_input_output_index(psbt, index, output_index):
    return _wallycore.psbt_set_input_output_index(psbt, index, output_index)

def psbt_set_input_sequence(psbt, index, sequence):
    return _wallycore.psbt_set_input_sequence(psbt, index, sequence)

def psbt_clear_input_sequence(psbt, index):
    return _wallycore.psbt_clear_input_sequence(psbt, index)

def psbt_set_input_required_locktime(psbt, index, locktime):
    return _wallycore.psbt_set_input_required_locktime(psbt, index, locktime)

def psbt_clear_input_required_locktime(psbt, index):
    return _wallycore.psbt_clear_input_required_locktime(psbt, index)

def psbt_has_input_required_locktime(psbt, index):
    return _wallycore.psbt_has_input_required_locktime(psbt, index)

def psbt_set_input_required_lockheight(psbt, index, lockheight):
    return _wallycore.psbt_set_input_required_lockheight(psbt, index, lockheight)

def psbt_clear_input_required_lockheight(psbt, index):
    return _wallycore.psbt_clear_input_required_lockheight(psbt, index)

def psbt_has_input_required_lockheight(psbt, index):
    return _wallycore.psbt_has_input_required_lockheight(psbt, index)

def psbt_get_input_amount(psbt, index):
    return _wallycore.psbt_get_input_amount(psbt, index)

def psbt_get_input_amount_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_amount_rangeproof(psbt, index, bytes_out)

def psbt_get_input_amount_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_amount_rangeproof_len(psbt, index)

def psbt_get_input_asset(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_asset(psbt, index, bytes_out)

def psbt_get_input_asset_len(psbt, index):
    return _wallycore.psbt_get_input_asset_len(psbt, index)

def psbt_get_input_asset_surjectionproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_asset_surjectionproof(psbt, index, bytes_out)

def psbt_get_input_asset_surjectionproof_len(psbt, index):
    return _wallycore.psbt_get_input_asset_surjectionproof_len(psbt, index)

def psbt_get_input_issuance_amount(psbt, index):
    return _wallycore.psbt_get_input_issuance_amount(psbt, index)

def psbt_get_input_inflation_keys(psbt, index):
    return _wallycore.psbt_get_input_inflation_keys(psbt, index)

def psbt_get_input_pegin_amount(psbt, index):
    return _wallycore.psbt_get_input_pegin_amount(psbt, index)

def psbt_get_input_pegin_txout_proof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_pegin_txout_proof(psbt, index, bytes_out)

def psbt_get_input_pegin_txout_proof_len(psbt, index):
    return _wallycore.psbt_get_input_pegin_txout_proof_len(psbt, index)

def psbt_get_input_pegin_genesis_blockhash(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_pegin_genesis_blockhash(psbt, index, bytes_out)

def psbt_get_input_pegin_genesis_blockhash_len(psbt, index):
    return _wallycore.psbt_get_input_pegin_genesis_blockhash_len(psbt, index)

def psbt_get_input_pegin_claim_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_pegin_claim_script(psbt, index, bytes_out)

def psbt_get_input_pegin_claim_script_len(psbt, index):
    return _wallycore.psbt_get_input_pegin_claim_script_len(psbt, index)

def psbt_get_input_issuance_amount_commitment(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_issuance_amount_commitment(psbt, index, bytes_out)

def psbt_get_input_issuance_amount_commitment_len(psbt, index):
    return _wallycore.psbt_get_input_issuance_amount_commitment_len(psbt, index)

def psbt_get_input_issuance_amount_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_issuance_amount_rangeproof(psbt, index, bytes_out)

def psbt_get_input_issuance_amount_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_issuance_amount_rangeproof_len(psbt, index)

def psbt_get_input_issuance_blinding_nonce(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_issuance_blinding_nonce(psbt, index, bytes_out)

def psbt_get_input_issuance_blinding_nonce_len(psbt, index):
    return _wallycore.psbt_get_input_issuance_blinding_nonce_len(psbt, index)

def psbt_get_input_issuance_asset_entropy(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_issuance_asset_entropy(psbt, index, bytes_out)

def psbt_get_input_issuance_asset_entropy_len(psbt, index):
    return _wallycore.psbt_get_input_issuance_asset_entropy_len(psbt, index)

def psbt_get_input_issuance_amount_blinding_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_issuance_amount_blinding_rangeproof(psbt, index, bytes_out)

def psbt_get_input_issuance_amount_blinding_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_issuance_amount_blinding_rangeproof_len(psbt, index)

def psbt_get_input_inflation_keys_commitment(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_inflation_keys_commitment(psbt, index, bytes_out)

def psbt_get_input_inflation_keys_commitment_len(psbt, index):
    return _wallycore.psbt_get_input_inflation_keys_commitment_len(psbt, index)

def psbt_get_input_inflation_keys_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_inflation_keys_rangeproof(psbt, index, bytes_out)

def psbt_get_input_inflation_keys_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_inflation_keys_rangeproof_len(psbt, index)

def psbt_get_input_inflation_keys_blinding_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_inflation_keys_blinding_rangeproof(psbt, index, bytes_out)

def psbt_get_input_inflation_keys_blinding_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_inflation_keys_blinding_rangeproof_len(psbt, index)

def psbt_get_input_utxo_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_input_utxo_rangeproof(psbt, index, bytes_out)

def psbt_get_input_utxo_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_input_utxo_rangeproof_len(psbt, index)

def psbt_set_input_amount(psbt, index, amount):
    return _wallycore.psbt_set_input_amount(psbt, index, amount)

def psbt_clear_input_amount(psbt, index):
    return _wallycore.psbt_clear_input_amount(psbt, index)

def psbt_set_input_amount_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_amount_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_amount_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_amount_rangeproof(psbt, index)

def psbt_set_input_asset(psbt, index, asset):
    return _wallycore.psbt_set_input_asset(psbt, index, asset)

def psbt_clear_input_asset(psbt, index):
    return _wallycore.psbt_clear_input_asset(psbt, index)

def psbt_set_input_asset_surjectionproof(psbt, index, surjectionproof):
    return _wallycore.psbt_set_input_asset_surjectionproof(psbt, index, surjectionproof)

def psbt_clear_input_asset_surjectionproof(psbt, index):
    return _wallycore.psbt_clear_input_asset_surjectionproof(psbt, index)

def psbt_set_input_issuance_amount(psbt, index, amount):
    return _wallycore.psbt_set_input_issuance_amount(psbt, index, amount)

def psbt_set_input_inflation_keys(psbt, index, amount):
    return _wallycore.psbt_set_input_inflation_keys(psbt, index, amount)

def psbt_set_input_pegin_amount(psbt, index, amount):
    return _wallycore.psbt_set_input_pegin_amount(psbt, index, amount)

def psbt_set_input_pegin_txout_proof(psbt, index, txout_proof):
    return _wallycore.psbt_set_input_pegin_txout_proof(psbt, index, txout_proof)

def psbt_clear_input_pegin_txout_proof(psbt, index):
    return _wallycore.psbt_clear_input_pegin_txout_proof(psbt, index)

def psbt_set_input_pegin_genesis_blockhash(psbt, index, genesis_blockhash):
    return _wallycore.psbt_set_input_pegin_genesis_blockhash(psbt, index, genesis_blockhash)

def psbt_clear_input_pegin_genesis_blockhash(psbt, index):
    return _wallycore.psbt_clear_input_pegin_genesis_blockhash(psbt, index)

def psbt_set_input_pegin_claim_script(psbt, index, script):
    return _wallycore.psbt_set_input_pegin_claim_script(psbt, index, script)

def psbt_clear_input_pegin_claim_script(psbt, index):
    return _wallycore.psbt_clear_input_pegin_claim_script(psbt, index)

def psbt_set_input_issuance_amount_commitment(psbt, index, commitment):
    return _wallycore.psbt_set_input_issuance_amount_commitment(psbt, index, commitment)

def psbt_clear_input_issuance_amount_commitment(psbt, index):
    return _wallycore.psbt_clear_input_issuance_amount_commitment(psbt, index)

def psbt_set_input_issuance_amount_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_issuance_amount_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_issuance_amount_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_issuance_amount_rangeproof(psbt, index)

def psbt_set_input_issuance_blinding_nonce(psbt, index, nonce):
    return _wallycore.psbt_set_input_issuance_blinding_nonce(psbt, index, nonce)

def psbt_clear_input_issuance_blinding_nonce(psbt, index):
    return _wallycore.psbt_clear_input_issuance_blinding_nonce(psbt, index)

def psbt_set_input_issuance_asset_entropy(psbt, index, entropy):
    return _wallycore.psbt_set_input_issuance_asset_entropy(psbt, index, entropy)

def psbt_clear_input_issuance_asset_entropy(psbt, index):
    return _wallycore.psbt_clear_input_issuance_asset_entropy(psbt, index)

def psbt_set_input_issuance_amount_blinding_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_issuance_amount_blinding_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_issuance_amount_blinding_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_issuance_amount_blinding_rangeproof(psbt, index)

def psbt_set_input_inflation_keys_commitment(psbt, index, commitment):
    return _wallycore.psbt_set_input_inflation_keys_commitment(psbt, index, commitment)

def psbt_clear_input_inflation_keys_commitment(psbt, index):
    return _wallycore.psbt_clear_input_inflation_keys_commitment(psbt, index)

def psbt_set_input_inflation_keys_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_inflation_keys_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_inflation_keys_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_inflation_keys_rangeproof(psbt, index)

def psbt_set_input_inflation_keys_blinding_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_inflation_keys_blinding_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_inflation_keys_blinding_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_inflation_keys_blinding_rangeproof(psbt, index)

def psbt_set_input_utxo_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_input_utxo_rangeproof(psbt, index, rangeproof)

def psbt_clear_input_utxo_rangeproof(psbt, index):
    return _wallycore.psbt_clear_input_utxo_rangeproof(psbt, index)

def psbt_generate_input_explicit_proofs(psbt, index, satoshi, asset, abf, vbf, entropy):
    return _wallycore.psbt_generate_input_explicit_proofs(psbt, index, satoshi, asset, abf, vbf, entropy)

def psbt_get_output_redeem_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_redeem_script(psbt, index, bytes_out)

def psbt_get_output_redeem_script_len(psbt, index):
    return _wallycore.psbt_get_output_redeem_script_len(psbt, index)

def psbt_get_output_witness_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_witness_script(psbt, index, bytes_out)

def psbt_get_output_witness_script_len(psbt, index):
    return _wallycore.psbt_get_output_witness_script_len(psbt, index)

def psbt_get_output_keypaths_size(psbt, index):
    return _wallycore.psbt_get_output_keypaths_size(psbt, index)

def psbt_find_output_keypath(psbt, index, key):
    return _wallycore.psbt_find_output_keypath(psbt, index, key)

def psbt_get_output_keypath(psbt, index, subindex, bytes_out):
    return _wallycore.psbt_get_output_keypath(psbt, index, subindex, bytes_out)

def psbt_get_output_keypath_len(psbt, index, subindex):
    return _wallycore.psbt_get_output_keypath_len(psbt, index, subindex)

def psbt_get_output_unknowns_size(psbt, index):
    return _wallycore.psbt_get_output_unknowns_size(psbt, index)

def psbt_find_output_unknown(psbt, index, key):
    return _wallycore.psbt_find_output_unknown(psbt, index, key)

def psbt_get_output_unknown(psbt, index, subindex, bytes_out):
    return _wallycore.psbt_get_output_unknown(psbt, index, subindex, bytes_out)

def psbt_get_output_unknown_len(psbt, index, subindex):
    return _wallycore.psbt_get_output_unknown_len(psbt, index, subindex)

def psbt_get_output_script(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_script(psbt, index, bytes_out)

def psbt_get_output_script_len(psbt, index):
    return _wallycore.psbt_get_output_script_len(psbt, index)

def psbt_get_output_amount(psbt, index):
    return _wallycore.psbt_get_output_amount(psbt, index)

def psbt_has_output_amount(psbt, index):
    return _wallycore.psbt_has_output_amount(psbt, index)

def psbt_get_output_taproot_internal_key(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_taproot_internal_key(psbt, index, bytes_out)

def psbt_get_output_taproot_internal_key_len(psbt, index):
    return _wallycore.psbt_get_output_taproot_internal_key_len(psbt, index)

def psbt_set_output_redeem_script(psbt, index, script):
    return _wallycore.psbt_set_output_redeem_script(psbt, index, script)

def psbt_set_output_witness_script(psbt, index, script):
    return _wallycore.psbt_set_output_witness_script(psbt, index, script)

def psbt_set_output_keypaths(psbt, index, map_in):
    return _wallycore.psbt_set_output_keypaths(psbt, index, map_in)

def psbt_set_output_unknowns(psbt, index, map_in):
    return _wallycore.psbt_set_output_unknowns(psbt, index, map_in)

def psbt_set_output_script(psbt, index, script):
    return _wallycore.psbt_set_output_script(psbt, index, script)

def psbt_set_output_amount(psbt, index, amount):
    return _wallycore.psbt_set_output_amount(psbt, index, amount)

def psbt_clear_output_amount(psbt, index):
    return _wallycore.psbt_clear_output_amount(psbt, index)

def psbt_set_output_taproot_internal_key(psbt, index, pub_key):
    return _wallycore.psbt_set_output_taproot_internal_key(psbt, index, pub_key)

def psbt_get_output_blinder_index(psbt, index):
    return _wallycore.psbt_get_output_blinder_index(psbt, index)

def psbt_has_output_blinder_index(psbt, index):
    return _wallycore.psbt_has_output_blinder_index(psbt, index)

def psbt_get_output_value_commitment(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_value_commitment(psbt, index, bytes_out)

def psbt_get_output_value_commitment_len(psbt, index):
    return _wallycore.psbt_get_output_value_commitment_len(psbt, index)

def psbt_get_output_asset(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_asset(psbt, index, bytes_out)

def psbt_get_output_asset_len(psbt, index):
    return _wallycore.psbt_get_output_asset_len(psbt, index)

def psbt_get_output_asset_commitment(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_asset_commitment(psbt, index, bytes_out)

def psbt_get_output_asset_commitment_len(psbt, index):
    return _wallycore.psbt_get_output_asset_commitment_len(psbt, index)

def psbt_get_output_value_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_value_rangeproof(psbt, index, bytes_out)

def psbt_get_output_value_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_output_value_rangeproof_len(psbt, index)

def psbt_get_output_asset_surjectionproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_asset_surjectionproof(psbt, index, bytes_out)

def psbt_get_output_asset_surjectionproof_len(psbt, index):
    return _wallycore.psbt_get_output_asset_surjectionproof_len(psbt, index)

def psbt_get_output_blinding_public_key(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_blinding_public_key(psbt, index, bytes_out)

def psbt_get_output_blinding_public_key_len(psbt, index):
    return _wallycore.psbt_get_output_blinding_public_key_len(psbt, index)

def psbt_get_output_ecdh_public_key(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_ecdh_public_key(psbt, index, bytes_out)

def psbt_get_output_ecdh_public_key_len(psbt, index):
    return _wallycore.psbt_get_output_ecdh_public_key_len(psbt, index)

def psbt_get_output_value_blinding_rangeproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_value_blinding_rangeproof(psbt, index, bytes_out)

def psbt_get_output_value_blinding_rangeproof_len(psbt, index):
    return _wallycore.psbt_get_output_value_blinding_rangeproof_len(psbt, index)

def psbt_get_output_asset_blinding_surjectionproof(psbt, index, bytes_out):
    return _wallycore.psbt_get_output_asset_blinding_surjectionproof(psbt, index, bytes_out)

def psbt_get_output_asset_blinding_surjectionproof_len(psbt, index):
    return _wallycore.psbt_get_output_asset_blinding_surjectionproof_len(psbt, index)

def psbt_set_output_blinder_index(psbt, index, idx):
    return _wallycore.psbt_set_output_blinder_index(psbt, index, idx)

def psbt_clear_output_blinder_index(psbt, index):
    return _wallycore.psbt_clear_output_blinder_index(psbt, index)

def psbt_set_output_value_commitment(psbt, index, commitment):
    return _wallycore.psbt_set_output_value_commitment(psbt, index, commitment)

def psbt_clear_output_value_commitment(psbt, index):
    return _wallycore.psbt_clear_output_value_commitment(psbt, index)

def psbt_set_output_asset(psbt, index, asset):
    return _wallycore.psbt_set_output_asset(psbt, index, asset)

def psbt_clear_output_asset(psbt, index):
    return _wallycore.psbt_clear_output_asset(psbt, index)

def psbt_set_output_asset_commitment(psbt, index, commitment):
    return _wallycore.psbt_set_output_asset_commitment(psbt, index, commitment)

def psbt_clear_output_asset_commitment(psbt, index):
    return _wallycore.psbt_clear_output_asset_commitment(psbt, index)

def psbt_set_output_value_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_output_value_rangeproof(psbt, index, rangeproof)

def psbt_clear_output_value_rangeproof(psbt, index):
    return _wallycore.psbt_clear_output_value_rangeproof(psbt, index)

def psbt_set_output_asset_surjectionproof(psbt, index, surjectionproof):
    return _wallycore.psbt_set_output_asset_surjectionproof(psbt, index, surjectionproof)

def psbt_clear_output_asset_surjectionproof(psbt, index):
    return _wallycore.psbt_clear_output_asset_surjectionproof(psbt, index)

def psbt_set_output_blinding_public_key(psbt, index, pub_key):
    return _wallycore.psbt_set_output_blinding_public_key(psbt, index, pub_key)

def psbt_clear_output_blinding_public_key(psbt, index):
    return _wallycore.psbt_clear_output_blinding_public_key(psbt, index)

def psbt_set_output_ecdh_public_key(psbt, index, pub_key):
    return _wallycore.psbt_set_output_ecdh_public_key(psbt, index, pub_key)

def psbt_clear_output_ecdh_public_key(psbt, index):
    return _wallycore.psbt_clear_output_ecdh_public_key(psbt, index)

def psbt_set_output_value_blinding_rangeproof(psbt, index, rangeproof):
    return _wallycore.psbt_set_output_value_blinding_rangeproof(psbt, index, rangeproof)

def psbt_clear_output_value_blinding_rangeproof(psbt, index):
    return _wallycore.psbt_clear_output_value_blinding_rangeproof(psbt, index)

def psbt_set_output_asset_blinding_surjectionproof(psbt, index, surjectionproof):
    return _wallycore.psbt_set_output_asset_blinding_surjectionproof(psbt, index, surjectionproof)

def psbt_clear_output_asset_blinding_surjectionproof(psbt, index):
    return _wallycore.psbt_clear_output_asset_blinding_surjectionproof(psbt, index)

def psbt_get_output_blinding_status(output, index, flags):
    return _wallycore.psbt_get_output_blinding_status(output, index, flags)
WALLY_SCRIPT_TYPE_UNKNOWN = _wallycore.WALLY_SCRIPT_TYPE_UNKNOWN
WALLY_SCRIPT_TYPE_OP_RETURN = _wallycore.WALLY_SCRIPT_TYPE_OP_RETURN
WALLY_SCRIPT_TYPE_P2PKH = _wallycore.WALLY_SCRIPT_TYPE_P2PKH
WALLY_SCRIPT_TYPE_P2SH = _wallycore.WALLY_SCRIPT_TYPE_P2SH
WALLY_SCRIPT_TYPE_P2WPKH = _wallycore.WALLY_SCRIPT_TYPE_P2WPKH
WALLY_SCRIPT_TYPE_P2WSH = _wallycore.WALLY_SCRIPT_TYPE_P2WSH
WALLY_SCRIPT_TYPE_MULTISIG = _wallycore.WALLY_SCRIPT_TYPE_MULTISIG
WALLY_SCRIPT_TYPE_P2TR = _wallycore.WALLY_SCRIPT_TYPE_P2TR
WALLY_SCRIPT_TYPE_CSV2OF2_1 = _wallycore.WALLY_SCRIPT_TYPE_CSV2OF2_1
WALLY_SCRIPT_TYPE_CSV2OF2_1_OPT = _wallycore.WALLY_SCRIPT_TYPE_CSV2OF2_1_OPT
WALLY_SCRIPTPUBKEY_P2PKH_LEN = _wallycore.WALLY_SCRIPTPUBKEY_P2PKH_LEN
WALLY_SCRIPTPUBKEY_P2SH_LEN = _wallycore.WALLY_SCRIPTPUBKEY_P2SH_LEN
WALLY_SCRIPTPUBKEY_P2WPKH_LEN = _wallycore.WALLY_SCRIPTPUBKEY_P2WPKH_LEN
WALLY_SCRIPTPUBKEY_P2WSH_LEN = _wallycore.WALLY_SCRIPTPUBKEY_P2WSH_LEN
WALLY_SCRIPTPUBKEY_P2TR_LEN = _wallycore.WALLY_SCRIPTPUBKEY_P2TR_LEN
WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN = _wallycore.WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN
WALLY_MAX_OP_RETURN_LEN = _wallycore.WALLY_MAX_OP_RETURN_LEN
WALLY_SCRIPTSIG_P2PKH_MAX_LEN = _wallycore.WALLY_SCRIPTSIG_P2PKH_MAX_LEN
WALLY_SCRIPTSIG_MAX_LEN = _wallycore.WALLY_SCRIPTSIG_MAX_LEN
WALLY_WITNESSSCRIPT_MAX_LEN = _wallycore.WALLY_WITNESSSCRIPT_MAX_LEN
WALLY_SCRIPT_VARINT_MAX_SIZE = _wallycore.WALLY_SCRIPT_VARINT_MAX_SIZE
WALLY_SCRIPT_HASH160 = _wallycore.WALLY_SCRIPT_HASH160
WALLY_SCRIPT_SHA256 = _wallycore.WALLY_SCRIPT_SHA256
WALLY_SCRIPT_AS_PUSH = _wallycore.WALLY_SCRIPT_AS_PUSH
WALLY_SCRIPT_MULTISIG_SORTED = _wallycore.WALLY_SCRIPT_MULTISIG_SORTED
OP_0 = _wallycore.OP_0
OP_FALSE = _wallycore.OP_FALSE
OP_PUSHDATA1 = _wallycore.OP_PUSHDATA1
OP_PUSHDATA2 = _wallycore.OP_PUSHDATA2
OP_PUSHDATA4 = _wallycore.OP_PUSHDATA4
OP_1NEGATE = _wallycore.OP_1NEGATE
OP_RESERVED = _wallycore.OP_RESERVED
OP_1 = _wallycore.OP_1
OP_TRUE = _wallycore.OP_TRUE
OP_2 = _wallycore.OP_2
OP_3 = _wallycore.OP_3
OP_4 = _wallycore.OP_4
OP_5 = _wallycore.OP_5
OP_6 = _wallycore.OP_6
OP_7 = _wallycore.OP_7
OP_8 = _wallycore.OP_8
OP_9 = _wallycore.OP_9
OP_10 = _wallycore.OP_10
OP_11 = _wallycore.OP_11
OP_12 = _wallycore.OP_12
OP_13 = _wallycore.OP_13
OP_14 = _wallycore.OP_14
OP_15 = _wallycore.OP_15
OP_16 = _wallycore.OP_16
OP_NOP = _wallycore.OP_NOP
OP_VER = _wallycore.OP_VER
OP_IF = _wallycore.OP_IF
OP_NOTIF = _wallycore.OP_NOTIF
OP_VERIF = _wallycore.OP_VERIF
OP_VERNOTIF = _wallycore.OP_VERNOTIF
OP_ELSE = _wallycore.OP_ELSE
OP_ENDIF = _wallycore.OP_ENDIF
OP_VERIFY = _wallycore.OP_VERIFY
OP_RETURN = _wallycore.OP_RETURN
OP_TOALTSTACK = _wallycore.OP_TOALTSTACK
OP_FROMALTSTACK = _wallycore.OP_FROMALTSTACK
OP_2DROP = _wallycore.OP_2DROP
OP_2DUP = _wallycore.OP_2DUP
OP_3DUP = _wallycore.OP_3DUP
OP_2OVER = _wallycore.OP_2OVER
OP_2ROT = _wallycore.OP_2ROT
OP_2SWAP = _wallycore.OP_2SWAP
OP_IFDUP = _wallycore.OP_IFDUP
OP_DEPTH = _wallycore.OP_DEPTH
OP_DROP = _wallycore.OP_DROP
OP_DUP = _wallycore.OP_DUP
OP_NIP = _wallycore.OP_NIP
OP_OVER = _wallycore.OP_OVER
OP_PICK = _wallycore.OP_PICK
OP_ROLL = _wallycore.OP_ROLL
OP_ROT = _wallycore.OP_ROT
OP_SWAP = _wallycore.OP_SWAP
OP_TUCK = _wallycore.OP_TUCK
OP_CAT = _wallycore.OP_CAT
OP_SUBSTR = _wallycore.OP_SUBSTR
OP_LEFT = _wallycore.OP_LEFT
OP_RIGHT = _wallycore.OP_RIGHT
OP_SIZE = _wallycore.OP_SIZE
OP_INVERT = _wallycore.OP_INVERT
OP_AND = _wallycore.OP_AND
OP_OR = _wallycore.OP_OR
OP_XOR = _wallycore.OP_XOR
OP_EQUAL = _wallycore.OP_EQUAL
OP_EQUALVERIFY = _wallycore.OP_EQUALVERIFY
OP_RESERVED1 = _wallycore.OP_RESERVED1
OP_RESERVED2 = _wallycore.OP_RESERVED2
OP_1ADD = _wallycore.OP_1ADD
OP_1SUB = _wallycore.OP_1SUB
OP_2MUL = _wallycore.OP_2MUL
OP_2DIV = _wallycore.OP_2DIV
OP_NEGATE = _wallycore.OP_NEGATE
OP_ABS = _wallycore.OP_ABS
OP_NOT = _wallycore.OP_NOT
OP_0NOTEQUAL = _wallycore.OP_0NOTEQUAL
OP_ADD = _wallycore.OP_ADD
OP_SUB = _wallycore.OP_SUB
OP_MUL = _wallycore.OP_MUL
OP_DIV = _wallycore.OP_DIV
OP_MOD = _wallycore.OP_MOD
OP_LSHIFT = _wallycore.OP_LSHIFT
OP_RSHIFT = _wallycore.OP_RSHIFT
OP_BOOLAND = _wallycore.OP_BOOLAND
OP_BOOLOR = _wallycore.OP_BOOLOR
OP_NUMEQUAL = _wallycore.OP_NUMEQUAL
OP_NUMEQUALVERIFY = _wallycore.OP_NUMEQUALVERIFY
OP_NUMNOTEQUAL = _wallycore.OP_NUMNOTEQUAL
OP_LESSTHAN = _wallycore.OP_LESSTHAN
OP_GREATERTHAN = _wallycore.OP_GREATERTHAN
OP_LESSTHANOREQUAL = _wallycore.OP_LESSTHANOREQUAL
OP_GREATERTHANOREQUAL = _wallycore.OP_GREATERTHANOREQUAL
OP_MIN = _wallycore.OP_MIN
OP_MAX = _wallycore.OP_MAX
OP_WITHIN = _wallycore.OP_WITHIN
OP_RIPEMD160 = _wallycore.OP_RIPEMD160
OP_SHA1 = _wallycore.OP_SHA1
OP_SHA256 = _wallycore.OP_SHA256
OP_HASH160 = _wallycore.OP_HASH160
OP_HASH256 = _wallycore.OP_HASH256
OP_CODESEPARATOR = _wallycore.OP_CODESEPARATOR
OP_CHECKSIG = _wallycore.OP_CHECKSIG
OP_CHECKSIGVERIFY = _wallycore.OP_CHECKSIGVERIFY
OP_CHECKMULTISIG = _wallycore.OP_CHECKMULTISIG
OP_CHECKMULTISIGVERIFY = _wallycore.OP_CHECKMULTISIGVERIFY
OP_NOP1 = _wallycore.OP_NOP1
OP_CHECKLOCKTIMEVERIFY = _wallycore.OP_CHECKLOCKTIMEVERIFY
OP_NOP2 = _wallycore.OP_NOP2
OP_CHECKSEQUENCEVERIFY = _wallycore.OP_CHECKSEQUENCEVERIFY
OP_NOP3 = _wallycore.OP_NOP3
OP_NOP4 = _wallycore.OP_NOP4
OP_NOP5 = _wallycore.OP_NOP5
OP_NOP6 = _wallycore.OP_NOP6
OP_NOP7 = _wallycore.OP_NOP7
OP_NOP8 = _wallycore.OP_NOP8
OP_NOP9 = _wallycore.OP_NOP9
OP_NOP10 = _wallycore.OP_NOP10
OP_INVALIDOPCODE = _wallycore.OP_INVALIDOPCODE

def scriptpubkey_get_type(bytes):
    return _wallycore.scriptpubkey_get_type(bytes)

def scriptpubkey_p2pkh_from_bytes(bytes, flags, bytes_out):
    return _wallycore.scriptpubkey_p2pkh_from_bytes(bytes, flags, bytes_out)

def scriptsig_p2pkh_from_sig(pub_key, sig, sighash, bytes_out):
    return _wallycore.scriptsig_p2pkh_from_sig(pub_key, sig, sighash, bytes_out)

def witness_p2wpkh_from_sig(pub_key, sig, sighash, witness):
    return _wallycore.witness_p2wpkh_from_sig(pub_key, sig, sighash, witness)

def scriptsig_p2pkh_from_der(pub_key, sig, bytes_out):
    return _wallycore.scriptsig_p2pkh_from_der(pub_key, sig, bytes_out)

def witness_p2wpkh_from_der(pub_key, sig, witness):
    return _wallycore.witness_p2wpkh_from_der(pub_key, sig, witness)

def scriptpubkey_p2tr_from_bytes(bytes, flags, bytes_out):
    return _wallycore.scriptpubkey_p2tr_from_bytes(bytes, flags, bytes_out)

def witness_p2tr_from_sig(sig, witness):
    return _wallycore.witness_p2tr_from_sig(sig, witness)

def scriptpubkey_op_return_from_bytes(bytes, flags, bytes_out):
    return _wallycore.scriptpubkey_op_return_from_bytes(bytes, flags, bytes_out)

def scriptpubkey_p2sh_from_bytes(bytes, flags, bytes_out):
    return _wallycore.scriptpubkey_p2sh_from_bytes(bytes, flags, bytes_out)

def scriptpubkey_multisig_from_bytes(bytes, threshold, flags, bytes_out):
    return _wallycore.scriptpubkey_multisig_from_bytes(bytes, threshold, flags, bytes_out)

def scriptsig_multisig_from_bytes(script, bytes, sighash, flags, bytes_out):
    return _wallycore.scriptsig_multisig_from_bytes(script, bytes, sighash, flags, bytes_out)

def witness_multisig_from_bytes(script, bytes, sighash, flags, witness):
    return _wallycore.witness_multisig_from_bytes(script, bytes, sighash, flags, witness)

def scriptpubkey_csv_2of2_then_1_from_bytes(bytes, csv_blocks, flags, bytes_out):
    return _wallycore.scriptpubkey_csv_2of2_then_1_from_bytes(bytes, csv_blocks, flags, bytes_out)

def scriptpubkey_csv_2of2_then_1_from_bytes_opt(bytes, csv_blocks, flags, bytes_out):
    return _wallycore.scriptpubkey_csv_2of2_then_1_from_bytes_opt(bytes, csv_blocks, flags, bytes_out)

def scriptpubkey_csv_blocks_from_csv_2of2_then_1(bytes):
    return _wallycore.scriptpubkey_csv_blocks_from_csv_2of2_then_1(bytes)

def script_push_from_bytes(bytes, flags, bytes_out):
    return _wallycore.script_push_from_bytes(bytes, flags, bytes_out)

def varint_get_length(value):
    return _wallycore.varint_get_length(value)

def varint_to_bytes(value, bytes_out):
    return _wallycore.varint_to_bytes(value, bytes_out)

def varbuff_get_length(bytes):
    return _wallycore.varbuff_get_length(bytes)

def varbuff_to_bytes(bytes, bytes_out):
    return _wallycore.varbuff_to_bytes(bytes, bytes_out)

def witness_program_from_bytes(bytes, flags, bytes_out):
    return _wallycore.witness_program_from_bytes(bytes, flags, bytes_out)

def witness_program_from_bytes_and_version(bytes, version, flags, bytes_out):
    return _wallycore.witness_program_from_bytes_and_version(bytes, version, flags, bytes_out)

def elements_pegout_script_size(genesis_blockhash_len, mainchain_script_len, sub_pubkey_len, whitelistproof_len):
    return _wallycore.elements_pegout_script_size(genesis_blockhash_len, mainchain_script_len, sub_pubkey_len, whitelistproof_len)

def elements_pegout_script_from_bytes(genesis_blockhash, mainchain_script, sub_pubkey, whitelistproof, flags, bytes_out):
    return _wallycore.elements_pegout_script_from_bytes(genesis_blockhash, mainchain_script, sub_pubkey, whitelistproof, flags, bytes_out)

def elements_pegin_contract_script_from_bytes(redeem_script, script, flags, bytes_out):
    return _wallycore.elements_pegin_contract_script_from_bytes(redeem_script, script, flags, bytes_out)

def symmetric_key_from_seed(bytes, bytes_out):
    return _wallycore.symmetric_key_from_seed(bytes, bytes_out)

def symmetric_key_from_parent(bytes, version, label, bytes_out):
    return _wallycore.symmetric_key_from_parent(bytes, version, label, bytes_out)
WALLY_TX_SEQUENCE_FINAL = _wallycore.WALLY_TX_SEQUENCE_FINAL
WALLY_TX_VERSION_1 = _wallycore.WALLY_TX_VERSION_1
WALLY_TX_VERSION_2 = _wallycore.WALLY_TX_VERSION_2
WALLY_TX_IS_ELEMENTS = _wallycore.WALLY_TX_IS_ELEMENTS
WALLY_TX_IS_ISSUANCE = _wallycore.WALLY_TX_IS_ISSUANCE
WALLY_TX_IS_PEGIN = _wallycore.WALLY_TX_IS_PEGIN
WALLY_TX_IS_COINBASE = _wallycore.WALLY_TX_IS_COINBASE
WALLY_SATOSHI_PER_BTC = _wallycore.WALLY_SATOSHI_PER_BTC
WALLY_BTC_MAX = _wallycore.WALLY_BTC_MAX
WALLY_TXHASH_LEN = _wallycore.WALLY_TXHASH_LEN
WALLY_TX_FLAG_USE_WITNESS = _wallycore.WALLY_TX_FLAG_USE_WITNESS
WALLY_TX_FLAG_USE_ELEMENTS = _wallycore.WALLY_TX_FLAG_USE_ELEMENTS
WALLY_TX_FLAG_ALLOW_PARTIAL = _wallycore.WALLY_TX_FLAG_ALLOW_PARTIAL
WALLY_TX_FLAG_PRE_BIP144 = _wallycore.WALLY_TX_FLAG_PRE_BIP144
WALLY_TX_FLAG_BLINDED_INITIAL_ISSUANCE = _wallycore.WALLY_TX_FLAG_BLINDED_INITIAL_ISSUANCE
WALLY_TX_CLONE_FLAG_NON_FINAL = _wallycore.WALLY_TX_CLONE_FLAG_NON_FINAL
WALLY_TX_DUMMY_NULL = _wallycore.WALLY_TX_DUMMY_NULL
WALLY_TX_DUMMY_SIG = _wallycore.WALLY_TX_DUMMY_SIG
WALLY_TX_DUMMY_SIG_LOW_R = _wallycore.WALLY_TX_DUMMY_SIG_LOW_R
WALLY_SIGHASH_DEFAULT = _wallycore.WALLY_SIGHASH_DEFAULT
WALLY_SIGHASH_ALL = _wallycore.WALLY_SIGHASH_ALL
WALLY_SIGHASH_NONE = _wallycore.WALLY_SIGHASH_NONE
WALLY_SIGHASH_SINGLE = _wallycore.WALLY_SIGHASH_SINGLE
WALLY_SIGHASH_FORKID = _wallycore.WALLY_SIGHASH_FORKID
WALLY_SIGHASH_RANGEPROOF = _wallycore.WALLY_SIGHASH_RANGEPROOF
WALLY_SIGHASH_ANYPREVOUT = _wallycore.WALLY_SIGHASH_ANYPREVOUT
WALLY_SIGHASH_ANYPREVOUTANYSCRIPT = _wallycore.WALLY_SIGHASH_ANYPREVOUTANYSCRIPT
WALLY_SIGHASH_ANYONECANPAY = _wallycore.WALLY_SIGHASH_ANYONECANPAY
WALLY_SIGHASH_MASK = _wallycore.WALLY_SIGHASH_MASK
WALLY_SIGHASH_TR_IN_MASK = _wallycore.WALLY_SIGHASH_TR_IN_MASK
WALLY_SIGTYPE_PRE_SW = _wallycore.WALLY_SIGTYPE_PRE_SW
WALLY_SIGTYPE_SW_V0 = _wallycore.WALLY_SIGTYPE_SW_V0
WALLY_SIGTYPE_SW_V1 = _wallycore.WALLY_SIGTYPE_SW_V1
WALLY_SIGTYPE_MASK = _wallycore.WALLY_SIGTYPE_MASK
WALLY_TX_ASSET_CT_EMPTY_PREFIX = _wallycore.WALLY_TX_ASSET_CT_EMPTY_PREFIX
WALLY_TX_ASSET_CT_EXPLICIT_PREFIX = _wallycore.WALLY_TX_ASSET_CT_EXPLICIT_PREFIX
WALLY_TX_ASSET_CT_VALUE_PREFIX_A = _wallycore.WALLY_TX_ASSET_CT_VALUE_PREFIX_A
WALLY_TX_ASSET_CT_VALUE_PREFIX_B = _wallycore.WALLY_TX_ASSET_CT_VALUE_PREFIX_B
WALLY_TX_ASSET_CT_ASSET_PREFIX_A = _wallycore.WALLY_TX_ASSET_CT_ASSET_PREFIX_A
WALLY_TX_ASSET_CT_ASSET_PREFIX_B = _wallycore.WALLY_TX_ASSET_CT_ASSET_PREFIX_B
WALLY_TX_ASSET_CT_NONCE_PREFIX_A = _wallycore.WALLY_TX_ASSET_CT_NONCE_PREFIX_A
WALLY_TX_ASSET_CT_NONCE_PREFIX_B = _wallycore.WALLY_TX_ASSET_CT_NONCE_PREFIX_B
WALLY_TX_ASSET_TAG_LEN = _wallycore.WALLY_TX_ASSET_TAG_LEN
WALLY_TX_ASSET_CT_VALUE_LEN = _wallycore.WALLY_TX_ASSET_CT_VALUE_LEN
WALLY_TX_ASSET_CT_VALUE_UNBLIND_LEN = _wallycore.WALLY_TX_ASSET_CT_VALUE_UNBLIND_LEN
WALLY_TX_ASSET_CT_ASSET_LEN = _wallycore.WALLY_TX_ASSET_CT_ASSET_LEN
WALLY_TX_ASSET_CT_NONCE_LEN = _wallycore.WALLY_TX_ASSET_CT_NONCE_LEN
WALLY_TX_ASSET_CT_LEN = _wallycore.WALLY_TX_ASSET_CT_LEN
WALLY_TX_ISSUANCE_FLAG = _wallycore.WALLY_TX_ISSUANCE_FLAG
WALLY_TX_PEGIN_FLAG = _wallycore.WALLY_TX_PEGIN_FLAG
WALLY_TX_INDEX_MASK = _wallycore.WALLY_TX_INDEX_MASK
WALLY_NO_CODESEPARATOR = _wallycore.WALLY_NO_CODESEPARATOR

def tx_witness_stack_init_alloc(allocation_len):
    return _wallycore.tx_witness_stack_init_alloc(allocation_len)

def tx_witness_stack_clone_alloc(stack):
    return _wallycore.tx_witness_stack_clone_alloc(stack)

def tx_witness_stack_get_num_items(stack):
    return _wallycore.tx_witness_stack_get_num_items(stack)

def tx_witness_stack_add(stack, witness):
    return _wallycore.tx_witness_stack_add(stack, witness)

def tx_witness_stack_add_dummy(stack, flags):
    return _wallycore.tx_witness_stack_add_dummy(stack, flags)

def tx_witness_stack_set(stack, index, witness):
    return _wallycore.tx_witness_stack_set(stack, index, witness)

def tx_witness_stack_set_dummy(stack, index, flags):
    return _wallycore.tx_witness_stack_set_dummy(stack, index, flags)

def tx_witness_stack_from_bytes(bytes):
    return _wallycore.tx_witness_stack_from_bytes(bytes)

def tx_witness_stack_get_length(stack):
    return _wallycore.tx_witness_stack_get_length(stack)

def tx_witness_stack_to_bytes(stack, bytes_out):
    return _wallycore.tx_witness_stack_to_bytes(stack, bytes_out)

def tx_witness_stack_free(stack):
    return _wallycore.tx_witness_stack_free(stack)

def tx_input_init_alloc(txhash, utxo_index, sequence, script, witness):
    return _wallycore.tx_input_init_alloc(txhash, utxo_index, sequence, script, witness)

def tx_input_clone_alloc(tx_input_in, input):
    return _wallycore.tx_input_clone_alloc(tx_input_in, input)

def tx_input_free(input):
    return _wallycore.tx_input_free(input)

def tx_output_init_alloc(satoshi, script):
    return _wallycore.tx_output_init_alloc(satoshi, script)

def tx_output_clone_alloc(tx_output_in):
    return _wallycore.tx_output_clone_alloc(tx_output_in)

def tx_output_free(output):
    return _wallycore.tx_output_free(output)

def tx_init_alloc(version, locktime, inputs_allocation_len, outputs_allocation_len):
    return _wallycore.tx_init_alloc(version, locktime, inputs_allocation_len, outputs_allocation_len)

def tx_clone_alloc(tx, flags):
    return _wallycore.tx_clone_alloc(tx, flags)

def tx_add_input(tx, input):
    return _wallycore.tx_add_input(tx, input)

def tx_add_input_at(tx, index, input):
    return _wallycore.tx_add_input_at(tx, index, input)

def tx_add_raw_input(tx, txhash, utxo_index, sequence, script, witness, flags):
    return _wallycore.tx_add_raw_input(tx, txhash, utxo_index, sequence, script, witness, flags)

def tx_add_raw_input_at(tx, index, txhash, utxo_index, sequence, script, witness, flags):
    return _wallycore.tx_add_raw_input_at(tx, index, txhash, utxo_index, sequence, script, witness, flags)

def tx_remove_input(tx, index):
    return _wallycore.tx_remove_input(tx, index)

def tx_set_input_script(tx, index, script):
    return _wallycore.tx_set_input_script(tx, index, script)

def tx_set_input_witness(tx, index, stack):
    return _wallycore.tx_set_input_witness(tx, index, stack)

def tx_add_output(tx, output):
    return _wallycore.tx_add_output(tx, output)

def tx_add_output_at(tx, index, output):
    return _wallycore.tx_add_output_at(tx, index, output)

def tx_add_raw_output(tx, satoshi, script, flags):
    return _wallycore.tx_add_raw_output(tx, satoshi, script, flags)

def tx_add_raw_output_at(tx, index, satoshi, script, flags):
    return _wallycore.tx_add_raw_output_at(tx, index, satoshi, script, flags)

def tx_remove_output(tx, index):
    return _wallycore.tx_remove_output(tx, index)

def tx_get_witness_count(tx):
    return _wallycore.tx_get_witness_count(tx)

def tx_free(tx):
    return _wallycore.tx_free(tx)

def tx_get_txid(tx, bytes_out):
    return _wallycore.tx_get_txid(tx, bytes_out)

def get_hash_prevouts(txhashes, utxo_indices, bytes_out):
    return _wallycore.get_hash_prevouts(txhashes, utxo_indices, bytes_out)

def tx_get_hash_prevouts(tx, index, num_inputs, bytes_out):
    return _wallycore.tx_get_hash_prevouts(tx, index, num_inputs, bytes_out)

def tx_get_length(tx, flags):
    return _wallycore.tx_get_length(tx, flags)

def tx_from_bytes(bytes, flags):
    return _wallycore.tx_from_bytes(bytes, flags)

def tx_from_hex(hex, flags):
    return _wallycore.tx_from_hex(hex, flags)

def tx_to_bytes(tx, flags, bytes_out):
    return _wallycore.tx_to_bytes(tx, flags, bytes_out)

def tx_to_hex(tx, flags):
    return _wallycore.tx_to_hex(tx, flags)

def tx_get_weight(tx):
    return _wallycore.tx_get_weight(tx)

def tx_get_vsize(tx):
    return _wallycore.tx_get_vsize(tx)

def tx_vsize_from_weight(weight):
    return _wallycore.tx_vsize_from_weight(weight)

def tx_get_total_output_satoshi(tx):
    return _wallycore.tx_get_total_output_satoshi(tx)

def tx_get_btc_signature_hash(tx, index, script, satoshi, sighash, flags, bytes_out):
    return _wallycore.tx_get_btc_signature_hash(tx, index, script, satoshi, sighash, flags, bytes_out)

def tx_get_btc_taproot_signature_hash(tx, index, scripts, values, tapleaf_script, key_version, codesep_position, annex, sighash, flags, bytes_out):
    return _wallycore.tx_get_btc_taproot_signature_hash(tx, index, scripts, values, tapleaf_script, key_version, codesep_position, annex, sighash, flags, bytes_out)

def tx_get_signature_hash(tx, index, script, extra, extra_offset, satoshi, sighash, tx_sighash, flags, bytes_out):
    return _wallycore.tx_get_signature_hash(tx, index, script, extra, extra_offset, satoshi, sighash, tx_sighash, flags, bytes_out)

def tx_get_input_signature_hash(tx, index, scripts, assets, values, script, key_version, codesep_position, annex, genesis_blockhash, sighash, flags, cache, bytes_out):
    return _wallycore.tx_get_input_signature_hash(tx, index, scripts, assets, values, script, key_version, codesep_position, annex, genesis_blockhash, sighash, flags, cache, bytes_out)

def tx_is_coinbase(tx):
    return _wallycore.tx_is_coinbase(tx)

def tx_get_elements_weight_discount(tx, flags):
    return _wallycore.tx_get_elements_weight_discount(tx, flags)

def tx_elements_input_issuance_set(input, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof):
    return _wallycore.tx_elements_input_issuance_set(input, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof)

def tx_elements_input_issuance_free(input):
    return _wallycore.tx_elements_input_issuance_free(input)

def tx_elements_input_init_alloc(txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness):
    return _wallycore.tx_elements_input_init_alloc(txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness)

def tx_elements_input_is_pegin(input):
    return _wallycore.tx_elements_input_is_pegin(input)

def tx_elements_output_commitment_set(output, asset, value, nonce, surjectionproof, rangeproof):
    return _wallycore.tx_elements_output_commitment_set(output, asset, value, nonce, surjectionproof, rangeproof)

def tx_elements_output_commitment_free(output):
    return _wallycore.tx_elements_output_commitment_free(output)

def tx_elements_output_init_alloc(script, asset, value, nonce, surjectionproof, rangeproof):
    return _wallycore.tx_elements_output_init_alloc(script, asset, value, nonce, surjectionproof, rangeproof)

def tx_add_elements_raw_input(tx, txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness, flags):
    return _wallycore.tx_add_elements_raw_input(tx, txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness, flags)

def tx_add_elements_raw_input_at(tx, index, txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness, flags):
    return _wallycore.tx_add_elements_raw_input_at(tx, index, txhash, utxo_index, sequence, script, witness, nonce, entropy, issuance_amount, inflation_keys, issuance_amount_rangeproof, inflation_keys_rangeproof, pegin_witness, flags)

def tx_add_elements_raw_output(tx, script, asset, value, nonce, surjectionproof, rangeproof, flags):
    return _wallycore.tx_add_elements_raw_output(tx, script, asset, value, nonce, surjectionproof, rangeproof, flags)

def tx_add_elements_raw_output_at(tx, index, script, asset, value, nonce, surjectionproof, rangeproof, flags):
    return _wallycore.tx_add_elements_raw_output_at(tx, index, script, asset, value, nonce, surjectionproof, rangeproof, flags)

def tx_is_elements(tx):
    return _wallycore.tx_is_elements(tx)

def tx_confidential_value_from_satoshi(satoshi, bytes_out):
    return _wallycore.tx_confidential_value_from_satoshi(satoshi, bytes_out)

def tx_confidential_value_to_satoshi(value):
    return _wallycore.tx_confidential_value_to_satoshi(value)

def tx_get_elements_signature_hash(tx, index, script, value, sighash, flags, bytes_out):
    return _wallycore.tx_get_elements_signature_hash(tx, index, script, value, sighash, flags, bytes_out)

def tx_elements_issuance_generate_entropy(txhash, utxo_index, contract_hash, bytes_out):
    return _wallycore.tx_elements_issuance_generate_entropy(txhash, utxo_index, contract_hash, bytes_out)

def tx_elements_issuance_calculate_asset(entropy, bytes_out):
    return _wallycore.tx_elements_issuance_calculate_asset(entropy, bytes_out)

def tx_elements_issuance_calculate_reissuance_token(entropy, flags, bytes_out):
    return _wallycore.tx_elements_issuance_calculate_reissuance_token(entropy, flags, bytes_out)
LIBWALLY_CORE_TRANSACTION_MEMBERS_H = _wallycore.LIBWALLY_CORE_TRANSACTION_MEMBERS_H

def tx_input_get_txhash(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_txhash(tx_input_in, bytes_out)

def tx_input_get_script(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_script(tx_input_in, bytes_out)

def tx_input_get_script_len(tx_input_in):
    return _wallycore.tx_input_get_script_len(tx_input_in)

def tx_input_get_witness_num_items(tx_input_in):
    return _wallycore.tx_input_get_witness_num_items(tx_input_in)

def tx_input_get_witness(tx_input_in, index, bytes_out):
    return _wallycore.tx_input_get_witness(tx_input_in, index, bytes_out)

def tx_input_get_witness_len(tx_input_in, index):
    return _wallycore.tx_input_get_witness_len(tx_input_in, index)

def tx_input_get_index(tx_input_in):
    return _wallycore.tx_input_get_index(tx_input_in)

def tx_input_get_sequence(tx_input_in):
    return _wallycore.tx_input_get_sequence(tx_input_in)

def tx_input_set_txhash(tx_input, txhash):
    return _wallycore.tx_input_set_txhash(tx_input, txhash)

def tx_input_set_script(tx_input, script):
    return _wallycore.tx_input_set_script(tx_input, script)

def tx_input_set_witness(tx_input, witness):
    return _wallycore.tx_input_set_witness(tx_input, witness)

def tx_input_set_index(tx_input, index):
    return _wallycore.tx_input_set_index(tx_input, index)

def tx_input_set_sequence(tx_input, sequence):
    return _wallycore.tx_input_set_sequence(tx_input, sequence)

def tx_input_get_blinding_nonce(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_blinding_nonce(tx_input_in, bytes_out)

def tx_input_get_entropy(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_entropy(tx_input_in, bytes_out)

def tx_input_get_issuance_amount(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_issuance_amount(tx_input_in, bytes_out)

def tx_input_get_issuance_amount_len(tx_input_in):
    return _wallycore.tx_input_get_issuance_amount_len(tx_input_in)

def tx_input_get_inflation_keys(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_inflation_keys(tx_input_in, bytes_out)

def tx_input_get_inflation_keys_len(tx_input_in):
    return _wallycore.tx_input_get_inflation_keys_len(tx_input_in)

def tx_input_get_issuance_amount_rangeproof(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_issuance_amount_rangeproof(tx_input_in, bytes_out)

def tx_input_get_issuance_amount_rangeproof_len(tx_input_in):
    return _wallycore.tx_input_get_issuance_amount_rangeproof_len(tx_input_in)

def tx_input_get_inflation_keys_rangeproof(tx_input_in, bytes_out):
    return _wallycore.tx_input_get_inflation_keys_rangeproof(tx_input_in, bytes_out)

def tx_input_get_inflation_keys_rangeproof_len(tx_input_in):
    return _wallycore.tx_input_get_inflation_keys_rangeproof_len(tx_input_in)

def tx_input_set_blinding_nonce(tx_input_in, blinding_nonce):
    return _wallycore.tx_input_set_blinding_nonce(tx_input_in, blinding_nonce)

def tx_input_set_entropy(tx_input_in, entropy):
    return _wallycore.tx_input_set_entropy(tx_input_in, entropy)

def tx_input_set_inflation_keys(tx_input_in, inflation_keys):
    return _wallycore.tx_input_set_inflation_keys(tx_input_in, inflation_keys)

def tx_input_set_inflation_keys_rangeproof(tx_input_in, inflation_keys_rangeproof):
    return _wallycore.tx_input_set_inflation_keys_rangeproof(tx_input_in, inflation_keys_rangeproof)

def tx_input_set_issuance_amount(tx_input_in, issuance_amount):
    return _wallycore.tx_input_set_issuance_amount(tx_input_in, issuance_amount)

def tx_input_set_issuance_amount_rangeproof(tx_input_in, issuance_amount_rangeproof):
    return _wallycore.tx_input_set_issuance_amount_rangeproof(tx_input_in, issuance_amount_rangeproof)

def tx_output_get_script(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_script(tx_output_in, bytes_out)

def tx_output_get_script_len(tx_output_in):
    return _wallycore.tx_output_get_script_len(tx_output_in)

def tx_output_get_satoshi(tx_output_in):
    return _wallycore.tx_output_get_satoshi(tx_output_in)

def tx_output_set_script(tx_output_in, script):
    return _wallycore.tx_output_set_script(tx_output_in, script)

def tx_output_set_satoshi(tx_output_in, satoshi):
    return _wallycore.tx_output_set_satoshi(tx_output_in, satoshi)

def tx_output_get_asset(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_asset(tx_output_in, bytes_out)

def tx_output_get_asset_len(tx_output_in):
    return _wallycore.tx_output_get_asset_len(tx_output_in)

def tx_output_get_value(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_value(tx_output_in, bytes_out)

def tx_output_get_value_len(tx_output_in):
    return _wallycore.tx_output_get_value_len(tx_output_in)

def tx_output_get_nonce(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_nonce(tx_output_in, bytes_out)

def tx_output_get_nonce_len(tx_output_in):
    return _wallycore.tx_output_get_nonce_len(tx_output_in)

def tx_output_get_surjectionproof(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_surjectionproof(tx_output_in, bytes_out)

def tx_output_get_surjectionproof_len(tx_output_in):
    return _wallycore.tx_output_get_surjectionproof_len(tx_output_in)

def tx_output_get_rangeproof(tx_output_in, bytes_out):
    return _wallycore.tx_output_get_rangeproof(tx_output_in, bytes_out)

def tx_output_get_rangeproof_len(tx_output_in):
    return _wallycore.tx_output_get_rangeproof_len(tx_output_in)

def tx_output_set_asset(tx_output_in, asset):
    return _wallycore.tx_output_set_asset(tx_output_in, asset)

def tx_output_set_value(tx_output_in, value):
    return _wallycore.tx_output_set_value(tx_output_in, value)

def tx_output_set_nonce(tx_output_in, nonce):
    return _wallycore.tx_output_set_nonce(tx_output_in, nonce)

def tx_output_set_surjectionproof(tx_output_in, surjectionproof):
    return _wallycore.tx_output_set_surjectionproof(tx_output_in, surjectionproof)

def tx_output_set_rangeproof(tx_output_in, rangeproof):
    return _wallycore.tx_output_set_rangeproof(tx_output_in, rangeproof)

def tx_get_version(tx_in):
    return _wallycore.tx_get_version(tx_in)

def tx_get_locktime(tx_in):
    return _wallycore.tx_get_locktime(tx_in)

def tx_get_num_inputs(tx_in):
    return _wallycore.tx_get_num_inputs(tx_in)

def tx_get_num_outputs(tx_in):
    return _wallycore.tx_get_num_outputs(tx_in)

def tx_get_input_txhash(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_txhash(tx_in, index, bytes_out)

def tx_get_input_script(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_script(tx_in, index, bytes_out)

def tx_get_input_script_len(tx_in, index):
    return _wallycore.tx_get_input_script_len(tx_in, index)

def tx_get_input_witness_num_items(tx_in, index):
    return _wallycore.tx_get_input_witness_num_items(tx_in, index)

def tx_get_input_witness(tx_in, index, wit_index, bytes_out):
    return _wallycore.tx_get_input_witness(tx_in, index, wit_index, bytes_out)

def tx_get_input_witness_len(tx_in, index, wit_index):
    return _wallycore.tx_get_input_witness_len(tx_in, index, wit_index)

def tx_get_input_index(tx_in, index):
    return _wallycore.tx_get_input_index(tx_in, index)

def tx_get_input_sequence(tx_in, index):
    return _wallycore.tx_get_input_sequence(tx_in, index)

def tx_set_input_index(tx_in, index, index_in):
    return _wallycore.tx_set_input_index(tx_in, index, index_in)

def tx_set_input_sequence(tx_in, index, sequence):
    return _wallycore.tx_set_input_sequence(tx_in, index, sequence)

def tx_set_input_txhash(tx_in, index, txhash):
    return _wallycore.tx_set_input_txhash(tx_in, index, txhash)

def tx_get_input_blinding_nonce(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_blinding_nonce(tx_in, index, bytes_out)

def tx_get_input_entropy(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_entropy(tx_in, index, bytes_out)

def tx_get_input_issuance_amount(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_issuance_amount(tx_in, index, bytes_out)

def tx_get_input_issuance_amount_len(tx_in, index):
    return _wallycore.tx_get_input_issuance_amount_len(tx_in, index)

def tx_get_input_inflation_keys(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_inflation_keys(tx_in, index, bytes_out)

def tx_get_input_inflation_keys_len(tx_in, index):
    return _wallycore.tx_get_input_inflation_keys_len(tx_in, index)

def tx_get_input_issuance_amount_rangeproof(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_issuance_amount_rangeproof(tx_in, index, bytes_out)

def tx_get_input_issuance_amount_rangeproof_len(tx_in, index):
    return _wallycore.tx_get_input_issuance_amount_rangeproof_len(tx_in, index)

def tx_get_input_inflation_keys_rangeproof(tx_in, index, bytes_out):
    return _wallycore.tx_get_input_inflation_keys_rangeproof(tx_in, index, bytes_out)

def tx_get_input_inflation_keys_rangeproof_len(tx_in, index):
    return _wallycore.tx_get_input_inflation_keys_rangeproof_len(tx_in, index)

def tx_set_input_blinding_nonce(tx_in, index, blinding_nonce):
    return _wallycore.tx_set_input_blinding_nonce(tx_in, index, blinding_nonce)

def tx_set_input_entropy(tx_in, index, entropy):
    return _wallycore.tx_set_input_entropy(tx_in, index, entropy)

def tx_set_input_inflation_keys(tx_in, index, inflation_keys):
    return _wallycore.tx_set_input_inflation_keys(tx_in, index, inflation_keys)

def tx_set_input_inflation_keys_rangeproof(tx_in, index, inflation_keys_rangeproof):
    return _wallycore.tx_set_input_inflation_keys_rangeproof(tx_in, index, inflation_keys_rangeproof)

def tx_set_input_issuance_amount(tx_in, index, issuance_amount):
    return _wallycore.tx_set_input_issuance_amount(tx_in, index, issuance_amount)

def tx_set_input_issuance_amount_rangeproof(tx_in, index, issuance_amount_rangeproof):
    return _wallycore.tx_set_input_issuance_amount_rangeproof(tx_in, index, issuance_amount_rangeproof)

def tx_get_output_script(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_script(tx_in, index, bytes_out)

def tx_get_output_script_len(tx_in, index):
    return _wallycore.tx_get_output_script_len(tx_in, index)

def tx_get_output_satoshi(tx_in, index):
    return _wallycore.tx_get_output_satoshi(tx_in, index)

def tx_set_output_script(tx_in, index, script):
    return _wallycore.tx_set_output_script(tx_in, index, script)

def tx_set_output_satoshi(tx_in, index, satoshi):
    return _wallycore.tx_set_output_satoshi(tx_in, index, satoshi)

def tx_get_output_asset(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_asset(tx_in, index, bytes_out)

def tx_get_output_value(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_value(tx_in, index, bytes_out)

def tx_get_output_value_len(tx_in, index):
    return _wallycore.tx_get_output_value_len(tx_in, index)

def tx_get_output_nonce(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_nonce(tx_in, index, bytes_out)

def tx_get_output_surjectionproof(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_surjectionproof(tx_in, index, bytes_out)

def tx_get_output_surjectionproof_len(tx_in, index):
    return _wallycore.tx_get_output_surjectionproof_len(tx_in, index)

def tx_get_output_rangeproof(tx_in, index, bytes_out):
    return _wallycore.tx_get_output_rangeproof(tx_in, index, bytes_out)

def tx_get_output_rangeproof_len(tx_in, index):
    return _wallycore.tx_get_output_rangeproof_len(tx_in, index)

def tx_set_output_asset(tx_in, index, asset):
    return _wallycore.tx_set_output_asset(tx_in, index, asset)

def tx_set_output_value(tx_in, index, value):
    return _wallycore.tx_set_output_value(tx_in, index, value)

def tx_set_output_nonce(tx_in, index, nonce):
    return _wallycore.tx_set_output_nonce(tx_in, index, nonce)

def tx_set_output_surjectionproof(tx_in, index, surjectionproof):
    return _wallycore.tx_set_output_surjectionproof(tx_in, index, surjectionproof)

def tx_set_output_rangeproof(tx_in, index, rangeproof):
    return _wallycore.tx_set_output_rangeproof(tx_in, index, rangeproof)
ASSET_TAG_LEN = _wallycore.ASSET_TAG_LEN
BLINDING_FACTOR_LEN = _wallycore.BLINDING_FACTOR_LEN
ASSET_GENERATOR_LEN = _wallycore.ASSET_GENERATOR_LEN
ASSET_COMMITMENT_LEN = _wallycore.ASSET_COMMITMENT_LEN
ASSET_RANGEPROOF_MAX_LEN = _wallycore.ASSET_RANGEPROOF_MAX_LEN
ASSET_EXPLICIT_RANGEPROOF_MAX_LEN = _wallycore.ASSET_EXPLICIT_RANGEPROOF_MAX_LEN
ASSET_SURJECTIONPROOF_MAX_LEN = _wallycore.ASSET_SURJECTIONPROOF_MAX_LEN
ASSET_EXPLICIT_SURJECTIONPROOF_LEN = _wallycore.ASSET_EXPLICIT_SURJECTIONPROOF_LEN

def asset_generator_from_bytes(asset, abf, bytes_out):
    return _wallycore.asset_generator_from_bytes(asset, abf, bytes_out)

def ecdh_nonce_hash(pub_key, priv_key, bytes_out):
    return _wallycore.ecdh_nonce_hash(pub_key, priv_key, bytes_out)

def asset_final_vbf(values, num_inputs, abf, vbf, bytes_out):
    return _wallycore.asset_final_vbf(values, num_inputs, abf, vbf, bytes_out)

def asset_scalar_offset(value, abf, vbf, bytes_out):
    return _wallycore.asset_scalar_offset(value, abf, vbf, bytes_out)

def asset_value_commitment(value, vbf, generator, bytes_out):
    return _wallycore.asset_value_commitment(value, vbf, generator, bytes_out)

def asset_rangeproof_get_maximum_len(value, min_bits):
    return _wallycore.asset_rangeproof_get_maximum_len(value, min_bits)

def asset_rangeproof_with_nonce(value, nonce_hash, asset, abf, vbf, commitment, extra, generator, min_value, exp, min_bits, bytes_out):
    return _wallycore.asset_rangeproof_with_nonce(value, nonce_hash, asset, abf, vbf, commitment, extra, generator, min_value, exp, min_bits, bytes_out)

def asset_rangeproof(value, pub_key, priv_key, asset, abf, vbf, commitment, extra, generator, min_value, exp, min_bits, bytes_out):
    return _wallycore.asset_rangeproof(value, pub_key, priv_key, asset, abf, vbf, commitment, extra, generator, min_value, exp, min_bits, bytes_out)

def explicit_rangeproof(value, nonce, vbf, commitment, generator, bytes_out):
    return _wallycore.explicit_rangeproof(value, nonce, vbf, commitment, generator, bytes_out)

def explicit_rangeproof_verify(rangeproof, value, commitment, generator):
    return _wallycore.explicit_rangeproof_verify(rangeproof, value, commitment, generator)

def asset_surjectionproof_size(num_inputs):
    return _wallycore.asset_surjectionproof_size(num_inputs)

def asset_surjectionproof_len(output_asset, output_abf, output_generator, bytes, asset, abf, generator):
    return _wallycore.asset_surjectionproof_len(output_asset, output_abf, output_generator, bytes, asset, abf, generator)

def asset_surjectionproof(output_asset, output_abf, output_generator, bytes, asset, abf, generator, bytes_out):
    return _wallycore.asset_surjectionproof(output_asset, output_abf, output_generator, bytes, asset, abf, generator, bytes_out)

def explicit_surjectionproof(output_asset, output_abf, output_generator, bytes_out):
    return _wallycore.explicit_surjectionproof(output_asset, output_abf, output_generator, bytes_out)

def explicit_surjectionproof_verify(surjectionproof, output_asset, output_generator):
    return _wallycore.explicit_surjectionproof_verify(surjectionproof, output_asset, output_generator)

def asset_unblind_with_nonce(nonce_hash, proof, commitment, extra, generator, asset_out, abf_out, vbf_out):
    return _wallycore.asset_unblind_with_nonce(nonce_hash, proof, commitment, extra, generator, asset_out, abf_out, vbf_out)

def asset_unblind(pub_key, priv_key, proof, commitment, extra, generator, asset_out, abf_out, vbf_out):
    return _wallycore.asset_unblind(pub_key, priv_key, proof, commitment, extra, generator, asset_out, abf_out, vbf_out)

def asset_blinding_key_from_seed(bytes, bytes_out):
    return _wallycore.asset_blinding_key_from_seed(bytes, bytes_out)

def asset_blinding_key_to_ec_private_key(bytes, script, bytes_out):
    return _wallycore.asset_blinding_key_to_ec_private_key(bytes, script, bytes_out)

def asset_blinding_key_to_ec_public_key(bytes, script, bytes_out):
    return _wallycore.asset_blinding_key_to_ec_public_key(bytes, script, bytes_out)

def elip150_private_key_to_ec_private_key(bytes, script, bytes_out):
    return _wallycore.elip150_private_key_to_ec_private_key(bytes, script, bytes_out)

def elip150_private_key_to_ec_public_key(bytes, script, bytes_out):
    return _wallycore.elip150_private_key_to_ec_public_key(bytes, script, bytes_out)

def elip150_public_key_to_ec_public_key(bytes, script, bytes_out):
    return _wallycore.elip150_public_key_to_ec_public_key(bytes, script, bytes_out)
WALLY_ABF_VBF_LEN = _wallycore.WALLY_ABF_VBF_LEN

def asset_blinding_key_to_abf_vbf(bytes, hash_prevouts, output_index, bytes_out):
    return _wallycore.asset_blinding_key_to_abf_vbf(bytes, hash_prevouts, output_index, bytes_out)

def asset_blinding_key_to_abf(bytes, hash_prevouts, output_index, bytes_out):
    return _wallycore.asset_blinding_key_to_abf(bytes, hash_prevouts, output_index, bytes_out)

def asset_blinding_key_to_vbf(bytes, hash_prevouts, output_index, bytes_out):
    return _wallycore.asset_blinding_key_to_vbf(bytes, hash_prevouts, output_index, bytes_out)

def asset_pak_whitelistproof_size(num_keys):
    return _wallycore.asset_pak_whitelistproof_size(num_keys)

def asset_pak_whitelistproof(online_keys, offline_keys, key_index, sub_pubkey, online_priv_key, summed_key, bytes_out):
    return _wallycore.asset_pak_whitelistproof(online_keys, offline_keys, key_index, sub_pubkey, online_priv_key, summed_key, bytes_out)

def asset_pak_whitelistproof_len(online_keys, offline_keys, key_index, sub_pubkey, online_priv_key, summed_key):
    return _wallycore.asset_pak_whitelistproof_len(online_keys, offline_keys, key_index, sub_pubkey, online_priv_key, summed_key)


# Support functions for the SWIG python wrapper

def _wrap_bin(fn, length, resize=False):
    """ Wrap functions that take an output buffer to create/return it """
    def wrapped(*args):
        n = length(*args) if callable(length) else length
        buf = bytearray(n)
        ret = fn(*list(args)+[buf])
        if resize:
            # Truncate buf to bytes written if needed. Also assert the
            # wrapper allocated enough space for the returned value to fit.
            assert ret <= n, f'{fn.__name__}: {ret} > {n}'
            return buf[0:ret] if ret != n else buf
        if ret is not None:
            assert ret == n
        return buf
    return wrapped

def _wrap_int_array(fn, length, resize=False):
    """ Wrap functions that take an output integer array to create/return it """
    def wrapped(*args):
        n = length(*args) if callable(length) else length
        out = [None] * n
        ret = fn(*list(args)+[out])
        if resize:
            # Truncate as per _wrap_bin
            assert ret <= n
            return out[0:ret] if ret != n else out
        if ret is not None:
            assert ret == n
        return out
    return wrapped

def _wrap_with_defaults(fn, min_args, max_args, def_value):
    """ Wrap functions that take argument defaults """
    def wrapped(*args):
        args = list(args)
        n = len(args)
        assert n >= min_args
        r = max_args - n
        return fn(*args+[def_value]*r)
    return wrapped

# Length calculation functions TODO: Implement these in the C API
def hex_to_bytes_len(hex_str):
    return len(hex_str) // 2

def hex_n_to_bytes_len(hex_str, n):
    return n // 2

def base58_to_bytes_len(base58, flags):
    return base58_get_length(base58)

def base58_n_to_bytes_len(base58, n, flags):
    return base58_n_get_length(base58, n)

def format_bitcoin_message_len(msg, flags):
    if flags & BITCOIN_MESSAGE_FLAG_HASH:
        return SHA256_LEN
    msg_len = len(msg)
    return 25 + msg_len + (1 if msg_len < 253 else 3)

def script_push_from_bytes_len(data, flags):
    if flags & WALLY_SCRIPT_HASH160:
        return HASH160_LEN + 1
    elif flags & WALLY_SCRIPT_SHA256:
        return SHA256_LEN + 1
    push_len, opcode_len = len(data), 5
    for l, op_len in [(76, 1), (256, 2), (65536, 3)]:
        if push_len < l:
            opcode_len = op_len
            break
    return push_len + opcode_len

def scriptpubkey_csv_2of2_then_1_from_bytes_opt_len(pubkeys, csv_blocks, flags):
    # TODO: If we expose scriptint functions we can calc the real length here
    # instead of hardcoding 4 (largest push for the max csv_blocks of 0xffff)
    return 6 + 2 * (EC_PUBLIC_KEY_LEN + 1) + 4

def scriptpubkey_csv_2of2_then_1_from_bytes_len(pubkeys, csv_blocks, flags):
    # TODO: See scriptpubkey_csv_2of2_then_1_from_bytes_opt_len
    return 9 + 2 * (EC_PUBLIC_KEY_LEN + 1) + 4

def scriptpubkey_multisig_from_bytes_len(pubkeys, threshold, flags):
    return 3 + (len(pubkeys) // EC_PUBLIC_KEY_LEN) * (EC_PUBLIC_KEY_LEN + 1)

def scriptsig_multisig_from_bytes_len(script, sigs, sighashes, flags):
    der_len = (len(sigs) // EC_SIGNATURE_LEN) * (EC_SIGNATURE_DER_MAX_LEN + 2)
    script_len = script_push_from_bytes_len(script, 0)
    return 1 + der_len + script_len

def wif_to_public_key_len(wif, prefix):
    return EC_PUBLIC_KEY_UNCOMPRESSED_LEN if wif_is_uncompressed(wif) else EC_PUBLIC_KEY_LEN

if is_elements_build():
    def elements_pegout_script_from_bytes_len(bh, mcs, pk, whl, flags):
        return elements_pegout_script_size(len(bh), len(mcs), len(pk), len(whl))

    def elements_pegin_contract_script_from_bytes_len(rs, cs, flags):
        return len(rs)

# Work around SWIG wrapping unisgned constants
# See https://github.com/swig/swig/issues/1287
BIP32_INITIAL_HARDENED_CHILD = 0x80000000
WALLY_PSET_BLIND_ALL = 0xffffffff
WALLY_SATOSHI_MAX = WALLY_BTC_MAX * WALLY_SATOSHI_PER_BTC
WALLY_TX_SEQUENCE_FINAL = 0xffffffff
WALLY_NO_CODESEPARATOR = 0xffffffff

# BEGIN AUTOGENERATED
addr_segwit_n_to_bytes = _wrap_bin(addr_segwit_n_to_bytes, WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN, resize=True)
addr_segwit_to_bytes = _wrap_bin(addr_segwit_to_bytes, WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN, resize=True)
address_to_scriptpubkey = _wrap_bin(address_to_scriptpubkey, WALLY_ADDRESS_PUBKEY_MAX_LEN, resize=True)
ae_host_commit_from_bytes = _wrap_bin(ae_host_commit_from_bytes, WALLY_HOST_COMMITMENT_LEN)
ae_sig_from_bytes = _wrap_bin(ae_sig_from_bytes, EC_SIGNATURE_LEN)
ae_signer_commit_from_bytes = _wrap_bin(ae_signer_commit_from_bytes, WALLY_S2C_OPENING_LEN)
aes = _wrap_bin(aes, aes_len)
aes_cbc = _wrap_bin(aes_cbc, aes_cbc_get_maximum_length, resize=True)
aes_cbc_with_ecdh_key = _wrap_bin(aes_cbc_with_ecdh_key, aes_cbc_with_ecdh_key_get_maximum_length, resize=True)
base58_n_to_bytes = _wrap_bin(base58_n_to_bytes, base58_n_to_bytes_len, resize=True)
base58_to_bytes = _wrap_bin(base58_to_bytes, base58_to_bytes_len, resize=True)
base64_n_to_bytes = _wrap_bin(base64_n_to_bytes, base64_n_get_maximum_length, resize=True)
base64_to_bytes = _wrap_bin(base64_to_bytes, base64_get_maximum_length, resize=True)
bip32_key_from_base58 = bip32_key_from_base58_alloc
bip32_key_from_base58_n = bip32_key_from_base58_n_alloc
bip32_key_from_parent = bip32_key_from_parent_alloc
bip32_key_from_parent_path = bip32_key_from_parent_path_alloc
bip32_key_from_parent_path_str = bip32_key_from_parent_path_str_alloc
bip32_key_from_parent_path_str_n = bip32_key_from_parent_path_str_n_alloc
bip32_key_from_seed = bip32_key_from_seed_alloc
bip32_key_from_seed_custom = bip32_key_from_seed_custom_alloc
bip32_key_get_chain_code = _wrap_bin(bip32_key_get_chain_code, WALLY_BIP32_CHAIN_CODE_LEN)
bip32_key_get_fingerprint = _wrap_bin(bip32_key_get_fingerprint, BIP32_KEY_FINGERPRINT_LEN)
bip32_key_get_hash160 = _wrap_bin(bip32_key_get_hash160, HASH160_LEN)
bip32_key_get_parent160 = _wrap_bin(bip32_key_get_parent160, HASH160_LEN)
bip32_key_get_priv_key = _wrap_bin(bip32_key_get_priv_key, EC_PRIVATE_KEY_LEN)
bip32_key_get_pub_key = _wrap_bin(bip32_key_get_pub_key, EC_PUBLIC_KEY_LEN)
bip32_key_init = bip32_key_init_alloc
bip32_key_serialize = _wrap_bin(bip32_key_serialize, BIP32_SERIALIZED_LEN)
bip32_key_unserialize = bip32_key_unserialize_alloc
bip32_path_from_str = _wrap_int_array(bip32_path_from_str, bip32_path_from_str_len)
bip32_path_from_str_n = _wrap_int_array(bip32_path_from_str_n, bip32_path_from_str_n_len)
bip340_tagged_hash = _wrap_bin(bip340_tagged_hash, SHA256_LEN)
bip38_raw_from_private_key = _wrap_bin(bip38_raw_from_private_key, BIP38_SERIALIZED_LEN)
bip38_raw_to_private_key = _wrap_bin(bip38_raw_to_private_key, EC_PRIVATE_KEY_LEN)
bip38_to_private_key = _wrap_bin(bip38_to_private_key, EC_PRIVATE_KEY_LEN)
bip39_mnemonic_to_bytes = _wrap_bin(bip39_mnemonic_to_bytes, BIP39_ENTROPY_MAX_LEN, resize=True)
bip39_mnemonic_to_seed512 = _wrap_bin(bip39_mnemonic_to_seed512, BIP39_SEED_LEN_512)
bip85_get_bip39_entropy = _wrap_bin(bip85_get_bip39_entropy, HMAC_SHA512_LEN, resize=True)
bip85_get_rsa_entropy = _wrap_bin(bip85_get_rsa_entropy, HMAC_SHA512_LEN, resize=True)
descriptor_get_key_origin_fingerprint = _wrap_bin(descriptor_get_key_origin_fingerprint, BIP32_KEY_FINGERPRINT_LEN)
descriptor_to_script = _wrap_bin(descriptor_to_script, descriptor_to_script_get_maximum_length, resize=True)
ec_private_key_bip341_tweak = _wrap_bin(ec_private_key_bip341_tweak, EC_PRIVATE_KEY_LEN)
ec_public_key_bip341_tweak = _wrap_bin(ec_public_key_bip341_tweak, EC_PUBLIC_KEY_LEN)
ec_public_key_decompress = _wrap_bin(ec_public_key_decompress, EC_PUBLIC_KEY_UNCOMPRESSED_LEN)
ec_public_key_from_private_key = _wrap_bin(ec_public_key_from_private_key, EC_PUBLIC_KEY_LEN)
ec_public_key_negate = _wrap_bin(ec_public_key_negate, EC_PUBLIC_KEY_LEN)
ec_public_key_tweak = _wrap_bin(ec_public_key_tweak, EC_PUBLIC_KEY_LEN)
ec_scalar_add = _wrap_bin(ec_scalar_add, EC_SCALAR_LEN)
ec_scalar_multiply = _wrap_bin(ec_scalar_multiply, EC_SCALAR_LEN)
ec_scalar_subtract = _wrap_bin(ec_scalar_subtract, EC_SCALAR_LEN)
ec_sig_from_bytes = _wrap_bin(ec_sig_from_bytes, ec_sig_from_bytes_len)
ec_sig_from_bytes_aux = _wrap_bin(ec_sig_from_bytes_aux, ec_sig_from_bytes_aux_len)
ec_sig_from_der = _wrap_bin(ec_sig_from_der, EC_SIGNATURE_LEN)
ec_sig_normalize = _wrap_bin(ec_sig_normalize, EC_SIGNATURE_LEN)
ec_sig_to_der = _wrap_bin(ec_sig_to_der, EC_SIGNATURE_DER_MAX_LEN, resize=True)
ec_sig_to_public_key = _wrap_bin(ec_sig_to_public_key, EC_PUBLIC_KEY_LEN)
ecdh = _wrap_bin(ecdh, SHA256_LEN)
format_bitcoin_message = _wrap_bin(format_bitcoin_message, format_bitcoin_message_len, resize=True)
get_hash_prevouts = _wrap_bin(get_hash_prevouts, SHA256_LEN)
hash160 = _wrap_bin(hash160, HASH160_LEN)
hex_n_to_bytes = _wrap_bin(hex_n_to_bytes, hex_n_to_bytes_len)
hex_to_bytes = _wrap_bin(hex_to_bytes, hex_to_bytes_len)
hmac_sha256 = _wrap_bin(hmac_sha256, HMAC_SHA256_LEN)
hmac_sha512 = _wrap_bin(hmac_sha512, HMAC_SHA512_LEN)
keypath_get_fingerprint = _wrap_bin(keypath_get_fingerprint, BIP32_KEY_FINGERPRINT_LEN)
keypath_get_path = _wrap_int_array(keypath_get_path, keypath_get_path_len)
map_get_item = _wrap_bin(map_get_item, map_get_item_length)
map_get_item_key = _wrap_bin(map_get_item_key, map_get_item_key_length)
map_init = map_init_alloc
map_keypath_bip32_init = map_keypath_bip32_init_alloc
map_keypath_get_bip32_key_from = map_keypath_get_bip32_key_from_alloc
map_keypath_get_item_fingerprint = _wrap_bin(map_keypath_get_item_fingerprint, BIP32_KEY_FINGERPRINT_LEN)
map_keypath_get_item_path = _wrap_int_array(map_keypath_get_item_path, map_keypath_get_item_path_len)
map_keypath_public_key_init = map_keypath_public_key_init_alloc
map_preimage_init = map_preimage_init_alloc
pbkdf2_hmac_sha256 = _wrap_bin(pbkdf2_hmac_sha256, PBKDF2_HMAC_SHA256_LEN)
pbkdf2_hmac_sha512 = _wrap_bin(pbkdf2_hmac_sha512, PBKDF2_HMAC_SHA512_LEN)
psbt_clone = psbt_clone_alloc
psbt_get_global_tx = psbt_get_global_tx_alloc
psbt_get_id = _wrap_bin(psbt_get_id, WALLY_TXHASH_LEN)
psbt_get_input_best_utxo = psbt_get_input_best_utxo_alloc
psbt_get_input_bip32_key_from = psbt_get_input_bip32_key_from_alloc
psbt_get_input_final_scriptsig = _wrap_bin(psbt_get_input_final_scriptsig, psbt_get_input_final_scriptsig_len)
psbt_get_input_final_witness = psbt_get_input_final_witness_alloc
psbt_get_input_keypath = _wrap_bin(psbt_get_input_keypath, psbt_get_input_keypath_len)
psbt_get_input_previous_txid = _wrap_bin(psbt_get_input_previous_txid, WALLY_TXHASH_LEN)
psbt_get_input_redeem_script = _wrap_bin(psbt_get_input_redeem_script, psbt_get_input_redeem_script_len)
psbt_get_input_scriptcode = _wrap_bin(psbt_get_input_scriptcode, psbt_get_input_scriptcode_len)
psbt_get_input_signature = _wrap_bin(psbt_get_input_signature, psbt_get_input_signature_len)
psbt_get_input_signature_hash = _wrap_bin(psbt_get_input_signature_hash, SHA256_LEN)
psbt_get_input_signing_script = _wrap_bin(psbt_get_input_signing_script, psbt_get_input_signing_script_len)
psbt_get_input_taproot_internal_key = _wrap_bin(psbt_get_input_taproot_internal_key, psbt_get_input_taproot_internal_key_len)
psbt_get_input_taproot_signature = _wrap_bin(psbt_get_input_taproot_signature, psbt_get_input_taproot_signature_len)
psbt_get_input_unknown = _wrap_bin(psbt_get_input_unknown, psbt_get_input_unknown_len)
psbt_get_input_utxo = psbt_get_input_utxo_alloc
psbt_get_input_witness_script = _wrap_bin(psbt_get_input_witness_script, psbt_get_input_witness_script_len)
psbt_get_input_witness_utxo = psbt_get_input_witness_utxo_alloc
psbt_get_output_keypath = _wrap_bin(psbt_get_output_keypath, psbt_get_output_keypath_len)
psbt_get_output_redeem_script = _wrap_bin(psbt_get_output_redeem_script, psbt_get_output_redeem_script_len)
psbt_get_output_script = _wrap_bin(psbt_get_output_script, psbt_get_output_script_len)
psbt_get_output_taproot_internal_key = _wrap_bin(psbt_get_output_taproot_internal_key, psbt_get_output_taproot_internal_key_len)
psbt_get_output_unknown = _wrap_bin(psbt_get_output_unknown, psbt_get_output_unknown_len)
psbt_get_output_witness_script = _wrap_bin(psbt_get_output_witness_script, psbt_get_output_witness_script_len)
psbt_init = psbt_init_alloc
psbt_to_bytes = _wrap_bin(psbt_to_bytes, psbt_get_length)
ripemd160 = _wrap_bin(ripemd160, RIPEMD160_LEN)
script_push_from_bytes = _wrap_bin(script_push_from_bytes, script_push_from_bytes_len, resize=True)
scriptpubkey_csv_2of2_then_1_from_bytes = _wrap_bin(scriptpubkey_csv_2of2_then_1_from_bytes, scriptpubkey_csv_2of2_then_1_from_bytes_len, resize=True)
scriptpubkey_csv_2of2_then_1_from_bytes_opt = _wrap_bin(scriptpubkey_csv_2of2_then_1_from_bytes_opt, scriptpubkey_csv_2of2_then_1_from_bytes_opt_len, resize=True)
scriptpubkey_multisig_from_bytes = _wrap_bin(scriptpubkey_multisig_from_bytes, scriptpubkey_multisig_from_bytes_len, resize=True)
scriptpubkey_op_return_from_bytes = _wrap_bin(scriptpubkey_op_return_from_bytes, WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN, resize=True)
scriptpubkey_p2pkh_from_bytes = _wrap_bin(scriptpubkey_p2pkh_from_bytes, WALLY_SCRIPTPUBKEY_P2PKH_LEN, resize=True)
scriptpubkey_p2sh_from_bytes = _wrap_bin(scriptpubkey_p2sh_from_bytes, WALLY_SCRIPTPUBKEY_P2SH_LEN, resize=True)
scriptpubkey_p2tr_from_bytes = _wrap_bin(scriptpubkey_p2tr_from_bytes, WALLY_SCRIPTPUBKEY_P2TR_LEN, resize=True)
scriptsig_multisig_from_bytes = _wrap_bin(scriptsig_multisig_from_bytes, scriptsig_multisig_from_bytes_len, resize=True)
scriptsig_p2pkh_from_der = _wrap_bin(scriptsig_p2pkh_from_der, WALLY_SCRIPTSIG_P2PKH_MAX_LEN, resize=True)
scriptsig_p2pkh_from_sig = _wrap_bin(scriptsig_p2pkh_from_sig, WALLY_SCRIPTSIG_P2PKH_MAX_LEN, resize=True)
sha256 = _wrap_bin(sha256, SHA256_LEN)
sha256_midstate = _wrap_bin(sha256_midstate, SHA256_LEN)
sha256d = _wrap_bin(sha256d, SHA256_LEN)
sha512 = _wrap_bin(sha512, SHA512_LEN)
symmetric_key_from_parent = _wrap_bin(symmetric_key_from_parent, HMAC_SHA512_LEN)
symmetric_key_from_seed = _wrap_bin(symmetric_key_from_seed, HMAC_SHA512_LEN)
tx_clone = tx_clone_alloc
tx_get_btc_signature_hash = _wrap_bin(tx_get_btc_signature_hash, SHA256_LEN)
tx_get_btc_taproot_signature_hash = _wrap_bin(tx_get_btc_taproot_signature_hash, SHA256_LEN)
tx_get_hash_prevouts = _wrap_bin(tx_get_hash_prevouts, SHA256_LEN)
tx_get_input_script = _wrap_bin(tx_get_input_script, tx_get_input_script_len)
tx_get_input_signature_hash = _wrap_bin(tx_get_input_signature_hash, SHA256_LEN)
tx_get_input_txhash = _wrap_bin(tx_get_input_txhash, WALLY_TXHASH_LEN)
tx_get_input_witness = _wrap_bin(tx_get_input_witness, tx_get_input_witness_len)
tx_get_output_script = _wrap_bin(tx_get_output_script, tx_get_output_script_len)
tx_get_signature_hash = _wrap_bin(tx_get_signature_hash, SHA256_LEN)
tx_get_txid = _wrap_bin(tx_get_txid, WALLY_TXHASH_LEN)
tx_init = tx_init_alloc
tx_input_clone = tx_input_clone_alloc
tx_input_get_script = _wrap_bin(tx_input_get_script, tx_input_get_script_len)
tx_input_get_txhash = _wrap_bin(tx_input_get_txhash, WALLY_TXHASH_LEN)
tx_input_get_witness = _wrap_bin(tx_input_get_witness, tx_input_get_witness_len)
tx_input_init = tx_input_init_alloc
tx_output_clone = tx_output_clone_alloc
tx_output_get_script = _wrap_bin(tx_output_get_script, tx_output_get_script_len)
tx_output_init = tx_output_init_alloc
tx_to_bytes = _wrap_bin(tx_to_bytes, tx_get_length)
tx_witness_stack_clone = tx_witness_stack_clone_alloc
tx_witness_stack_init = tx_witness_stack_init_alloc
tx_witness_stack_to_bytes = _wrap_bin(tx_witness_stack_to_bytes, tx_witness_stack_get_length)
varbuff_to_bytes = _wrap_bin(varbuff_to_bytes, varbuff_get_length)
varint_to_bytes = _wrap_bin(varint_to_bytes, varint_get_length)
wif_to_bytes = _wrap_bin(wif_to_bytes, EC_PRIVATE_KEY_LEN)
wif_to_public_key = _wrap_bin(wif_to_public_key, wif_to_public_key_len)
witness_program_from_bytes = _wrap_bin(witness_program_from_bytes, WALLY_WITNESSSCRIPT_MAX_LEN, resize=True)
witness_program_from_bytes_and_version = _wrap_bin(witness_program_from_bytes_and_version, WALLY_WITNESSSCRIPT_MAX_LEN, resize=True)
if is_elements_build():
    asset_blinding_key_from_seed = _wrap_bin(asset_blinding_key_from_seed, HMAC_SHA512_LEN)
    asset_blinding_key_to_abf = _wrap_bin(asset_blinding_key_to_abf, BLINDING_FACTOR_LEN)
    asset_blinding_key_to_abf_vbf = _wrap_bin(asset_blinding_key_to_abf_vbf, WALLY_ABF_VBF_LEN)
    asset_blinding_key_to_ec_private_key = _wrap_bin(asset_blinding_key_to_ec_private_key, EC_PRIVATE_KEY_LEN)
    asset_blinding_key_to_ec_public_key = _wrap_bin(asset_blinding_key_to_ec_public_key, EC_PUBLIC_KEY_LEN)
    asset_blinding_key_to_vbf = _wrap_bin(asset_blinding_key_to_vbf, BLINDING_FACTOR_LEN)
    asset_final_vbf = _wrap_bin(asset_final_vbf, BLINDING_FACTOR_LEN)
    asset_generator_from_bytes = _wrap_bin(asset_generator_from_bytes, ASSET_GENERATOR_LEN)
    asset_pak_whitelistproof = _wrap_bin(asset_pak_whitelistproof, asset_pak_whitelistproof_len)
    asset_rangeproof = _wrap_bin(asset_rangeproof, ASSET_RANGEPROOF_MAX_LEN, resize=True)
    asset_rangeproof_with_nonce = _wrap_bin(asset_rangeproof_with_nonce, ASSET_RANGEPROOF_MAX_LEN, resize=True)
    asset_scalar_offset = _wrap_bin(asset_scalar_offset, EC_SCALAR_LEN)
    asset_surjectionproof = _wrap_bin(asset_surjectionproof, asset_surjectionproof_len)
    asset_value_commitment = _wrap_bin(asset_value_commitment, ASSET_COMMITMENT_LEN)
    bip32_key_get_pub_key_tweak_sum = _wrap_bin(bip32_key_get_pub_key_tweak_sum, WALLY_BIP32_TWEAK_SUM_LEN)
    bip32_key_with_tweak_from_parent_path = bip32_key_with_tweak_from_parent_path_alloc
    coinselect_assets = _wrap_int_array(coinselect_assets, WALLY_CS_MAX_ASSETS, resize=True)
    confidential_addr_segwit_to_ec_public_key = _wrap_bin(confidential_addr_segwit_to_ec_public_key, EC_PUBLIC_KEY_LEN)
    confidential_addr_to_ec_public_key = _wrap_bin(confidential_addr_to_ec_public_key, EC_PUBLIC_KEY_LEN)
    ecdh_nonce_hash = _wrap_bin(ecdh_nonce_hash, SHA256_LEN)
    elements_pegin_contract_script_from_bytes = _wrap_bin(elements_pegin_contract_script_from_bytes, elements_pegin_contract_script_from_bytes_len, resize=True)
    elements_pegout_script_from_bytes = _wrap_bin(elements_pegout_script_from_bytes, elements_pegout_script_from_bytes_len, resize=True)
    elip150_private_key_to_ec_private_key = _wrap_bin(elip150_private_key_to_ec_private_key, EC_PRIVATE_KEY_LEN)
    elip150_private_key_to_ec_public_key = _wrap_bin(elip150_private_key_to_ec_public_key, EC_PUBLIC_KEY_LEN)
    elip150_public_key_to_ec_public_key = _wrap_bin(elip150_public_key_to_ec_public_key, EC_PUBLIC_KEY_LEN)
    explicit_rangeproof = _wrap_bin(explicit_rangeproof, ASSET_EXPLICIT_RANGEPROOF_MAX_LEN, resize=True)
    explicit_surjectionproof = _wrap_bin(explicit_surjectionproof, ASSET_EXPLICIT_SURJECTIONPROOF_LEN)
    psbt_blind = psbt_blind_alloc
    psbt_get_global_genesis_blockhash = _wrap_bin(psbt_get_global_genesis_blockhash, SHA256_LEN, resize=True)
    psbt_get_global_scalar = _wrap_bin(psbt_get_global_scalar, WALLY_SCALAR_OFFSET_LEN)
    psbt_get_input_amount_rangeproof = _wrap_bin(psbt_get_input_amount_rangeproof, psbt_get_input_amount_rangeproof_len)
    psbt_get_input_asset = _wrap_bin(psbt_get_input_asset, psbt_get_input_asset_len)
    psbt_get_input_asset_surjectionproof = _wrap_bin(psbt_get_input_asset_surjectionproof, psbt_get_input_asset_surjectionproof_len)
    psbt_get_input_inflation_keys_blinding_rangeproof = _wrap_bin(psbt_get_input_inflation_keys_blinding_rangeproof, psbt_get_input_inflation_keys_blinding_rangeproof_len)
    psbt_get_input_inflation_keys_commitment = _wrap_bin(psbt_get_input_inflation_keys_commitment, psbt_get_input_inflation_keys_commitment_len)
    psbt_get_input_inflation_keys_rangeproof = _wrap_bin(psbt_get_input_inflation_keys_rangeproof, psbt_get_input_inflation_keys_rangeproof_len)
    psbt_get_input_issuance_amount_blinding_rangeproof = _wrap_bin(psbt_get_input_issuance_amount_blinding_rangeproof, psbt_get_input_issuance_amount_blinding_rangeproof_len)
    psbt_get_input_issuance_amount_commitment = _wrap_bin(psbt_get_input_issuance_amount_commitment, psbt_get_input_issuance_amount_commitment_len)
    psbt_get_input_issuance_amount_rangeproof = _wrap_bin(psbt_get_input_issuance_amount_rangeproof, psbt_get_input_issuance_amount_rangeproof_len)
    psbt_get_input_issuance_asset_entropy = _wrap_bin(psbt_get_input_issuance_asset_entropy, psbt_get_input_issuance_asset_entropy_len)
    psbt_get_input_issuance_blinding_nonce = _wrap_bin(psbt_get_input_issuance_blinding_nonce, psbt_get_input_issuance_blinding_nonce_len)
    psbt_get_input_pegin_claim_script = _wrap_bin(psbt_get_input_pegin_claim_script, psbt_get_input_pegin_claim_script_len)
    psbt_get_input_pegin_genesis_blockhash = _wrap_bin(psbt_get_input_pegin_genesis_blockhash, psbt_get_input_pegin_genesis_blockhash_len)
    psbt_get_input_pegin_txout_proof = _wrap_bin(psbt_get_input_pegin_txout_proof, psbt_get_input_pegin_txout_proof_len)
    psbt_get_input_utxo_rangeproof = _wrap_bin(psbt_get_input_utxo_rangeproof, psbt_get_input_utxo_rangeproof_len)
    psbt_get_output_asset = _wrap_bin(psbt_get_output_asset, psbt_get_output_asset_len)
    psbt_get_output_asset_blinding_surjectionproof = _wrap_bin(psbt_get_output_asset_blinding_surjectionproof, psbt_get_output_asset_blinding_surjectionproof_len)
    psbt_get_output_asset_commitment = _wrap_bin(psbt_get_output_asset_commitment, psbt_get_output_asset_commitment_len)
    psbt_get_output_asset_surjectionproof = _wrap_bin(psbt_get_output_asset_surjectionproof, psbt_get_output_asset_surjectionproof_len)
    psbt_get_output_blinding_public_key = _wrap_bin(psbt_get_output_blinding_public_key, psbt_get_output_blinding_public_key_len)
    psbt_get_output_ecdh_public_key = _wrap_bin(psbt_get_output_ecdh_public_key, psbt_get_output_ecdh_public_key_len)
    psbt_get_output_value_blinding_rangeproof = _wrap_bin(psbt_get_output_value_blinding_rangeproof, psbt_get_output_value_blinding_rangeproof_len)
    psbt_get_output_value_commitment = _wrap_bin(psbt_get_output_value_commitment, psbt_get_output_value_commitment_len)
    psbt_get_output_value_rangeproof = _wrap_bin(psbt_get_output_value_rangeproof, psbt_get_output_value_rangeproof_len)
    psbt_input_get_amount_rangeproof = _wrap_bin(psbt_input_get_amount_rangeproof, psbt_input_get_amount_rangeproof_len)
    psbt_input_get_asset = _wrap_bin(psbt_input_get_asset, psbt_input_get_asset_len)
    psbt_input_get_asset_surjectionproof = _wrap_bin(psbt_input_get_asset_surjectionproof, psbt_input_get_asset_surjectionproof_len)
    psbt_input_get_inflation_keys_blinding_rangeproof = _wrap_bin(psbt_input_get_inflation_keys_blinding_rangeproof, psbt_input_get_inflation_keys_blinding_rangeproof_len)
    psbt_input_get_inflation_keys_commitment = _wrap_bin(psbt_input_get_inflation_keys_commitment, psbt_input_get_inflation_keys_commitment_len)
    psbt_input_get_inflation_keys_rangeproof = _wrap_bin(psbt_input_get_inflation_keys_rangeproof, psbt_input_get_inflation_keys_rangeproof_len)
    psbt_input_get_issuance_amount_blinding_rangeproof = _wrap_bin(psbt_input_get_issuance_amount_blinding_rangeproof, psbt_input_get_issuance_amount_blinding_rangeproof_len)
    psbt_input_get_issuance_amount_commitment = _wrap_bin(psbt_input_get_issuance_amount_commitment, psbt_input_get_issuance_amount_commitment_len)
    psbt_input_get_issuance_amount_rangeproof = _wrap_bin(psbt_input_get_issuance_amount_rangeproof, psbt_input_get_issuance_amount_rangeproof_len)
    psbt_input_get_issuance_asset_entropy = _wrap_bin(psbt_input_get_issuance_asset_entropy, psbt_input_get_issuance_asset_entropy_len)
    psbt_input_get_issuance_blinding_nonce = _wrap_bin(psbt_input_get_issuance_blinding_nonce, psbt_input_get_issuance_blinding_nonce_len)
    psbt_input_get_pegin_claim_script = _wrap_bin(psbt_input_get_pegin_claim_script, psbt_input_get_pegin_claim_script_len)
    psbt_input_get_pegin_genesis_blockhash = _wrap_bin(psbt_input_get_pegin_genesis_blockhash, psbt_input_get_pegin_genesis_blockhash_len)
    psbt_input_get_pegin_txout_proof = _wrap_bin(psbt_input_get_pegin_txout_proof, psbt_input_get_pegin_txout_proof_len)
    psbt_input_get_utxo_rangeproof = _wrap_bin(psbt_input_get_utxo_rangeproof, psbt_input_get_utxo_rangeproof_len)
    psbt_output_get_asset = _wrap_bin(psbt_output_get_asset, psbt_output_get_asset_len)
    psbt_output_get_asset_blinding_surjectionproof = _wrap_bin(psbt_output_get_asset_blinding_surjectionproof, psbt_output_get_asset_blinding_surjectionproof_len)
    psbt_output_get_asset_commitment = _wrap_bin(psbt_output_get_asset_commitment, psbt_output_get_asset_commitment_len)
    psbt_output_get_asset_surjectionproof = _wrap_bin(psbt_output_get_asset_surjectionproof, psbt_output_get_asset_surjectionproof_len)
    psbt_output_get_blinding_public_key = _wrap_bin(psbt_output_get_blinding_public_key, psbt_output_get_blinding_public_key_len)
    psbt_output_get_ecdh_public_key = _wrap_bin(psbt_output_get_ecdh_public_key, psbt_output_get_ecdh_public_key_len)
    psbt_output_get_value_blinding_rangeproof = _wrap_bin(psbt_output_get_value_blinding_rangeproof, psbt_output_get_value_blinding_rangeproof_len)
    psbt_output_get_value_commitment = _wrap_bin(psbt_output_get_value_commitment, psbt_output_get_value_commitment_len)
    psbt_output_get_value_rangeproof = _wrap_bin(psbt_output_get_value_rangeproof, psbt_output_get_value_rangeproof_len)
    tx_confidential_value_from_satoshi = _wrap_bin(tx_confidential_value_from_satoshi, WALLY_TX_ASSET_CT_VALUE_UNBLIND_LEN)
    tx_elements_input_init = tx_elements_input_init_alloc
    tx_elements_issuance_calculate_asset = _wrap_bin(tx_elements_issuance_calculate_asset, SHA256_LEN)
    tx_elements_issuance_calculate_reissuance_token = _wrap_bin(tx_elements_issuance_calculate_reissuance_token, SHA256_LEN)
    tx_elements_issuance_generate_entropy = _wrap_bin(tx_elements_issuance_generate_entropy, SHA256_LEN)
    tx_elements_output_init = tx_elements_output_init_alloc
    tx_get_elements_signature_hash = _wrap_bin(tx_get_elements_signature_hash, SHA256_LEN)
    tx_get_input_blinding_nonce = _wrap_bin(tx_get_input_blinding_nonce, SHA256_LEN)
    tx_get_input_entropy = _wrap_bin(tx_get_input_entropy, SHA256_LEN)
    tx_get_input_inflation_keys = _wrap_bin(tx_get_input_inflation_keys, tx_get_input_inflation_keys_len)
    tx_get_input_inflation_keys_rangeproof = _wrap_bin(tx_get_input_inflation_keys_rangeproof, tx_get_input_inflation_keys_rangeproof_len)
    tx_get_input_issuance_amount = _wrap_bin(tx_get_input_issuance_amount, tx_get_input_issuance_amount_len)
    tx_get_input_issuance_amount_rangeproof = _wrap_bin(tx_get_input_issuance_amount_rangeproof, tx_get_input_issuance_amount_rangeproof_len)
    tx_get_output_asset = _wrap_bin(tx_get_output_asset, WALLY_TX_ASSET_CT_ASSET_LEN)
    tx_get_output_nonce = _wrap_bin(tx_get_output_nonce, WALLY_TX_ASSET_CT_NONCE_LEN)
    tx_get_output_rangeproof = _wrap_bin(tx_get_output_rangeproof, tx_get_output_rangeproof_len)
    tx_get_output_surjectionproof = _wrap_bin(tx_get_output_surjectionproof, tx_get_output_surjectionproof_len)
    tx_get_output_value = _wrap_bin(tx_get_output_value, tx_get_output_value_len)
    tx_input_get_blinding_nonce = _wrap_bin(tx_input_get_blinding_nonce, SHA256_LEN)
    tx_input_get_entropy = _wrap_bin(tx_input_get_entropy, SHA256_LEN)
    tx_input_get_inflation_keys = _wrap_bin(tx_input_get_inflation_keys, tx_input_get_inflation_keys_len)
    tx_input_get_inflation_keys_rangeproof = _wrap_bin(tx_input_get_inflation_keys_rangeproof, tx_input_get_inflation_keys_rangeproof_len)
    tx_input_get_issuance_amount = _wrap_bin(tx_input_get_issuance_amount, tx_input_get_issuance_amount_len)
    tx_input_get_issuance_amount_rangeproof = _wrap_bin(tx_input_get_issuance_amount_rangeproof, tx_input_get_issuance_amount_rangeproof_len)
    tx_output_get_asset = _wrap_bin(tx_output_get_asset, tx_output_get_asset_len)
    tx_output_get_nonce = _wrap_bin(tx_output_get_nonce, tx_output_get_nonce_len)
    tx_output_get_rangeproof = _wrap_bin(tx_output_get_rangeproof, tx_output_get_rangeproof_len)
    tx_output_get_surjectionproof = _wrap_bin(tx_output_get_surjectionproof, tx_output_get_surjectionproof_len)
    tx_output_get_value = _wrap_bin(tx_output_get_value, tx_output_get_value_len)
# END AUTOGENERATED

# Manual wrappers for multi-valued buffer returns
def _s2c_sig_from_bytes_fn(fn):
    def wrapped(*args):
        buffers = [bytearray(WALLY_S2C_OPENING_LEN), bytearray(EC_SIGNATURE_LEN)]
        fn(*list(args) + buffers)
        return buffers[0], buffers[1]
    return wrapped
s2c_sig_from_bytes = _s2c_sig_from_bytes_fn(s2c_sig_from_bytes)

if is_elements_build():
    tx_elements_input_init = _wrap_with_defaults(tx_elements_input_init, 4, 12, None)
    tx_elements_output_init = _wrap_with_defaults(tx_elements_output_init, 3, 6, None)

    def _asset_unblind_fn(fn):
        def wrapped(*args):
            buffers = [bytearray(ASSET_TAG_LEN) for _ in range(3)]
            ret = fn(*list(args) + buffers)
            return ret, buffers[0], buffers[1], buffers[2]
        return wrapped
    asset_unblind_with_nonce = _asset_unblind_fn(asset_unblind_with_nonce)
    asset_unblind = _asset_unblind_fn(asset_unblind)

# Convenience helpers
def base58check_from_bytes(buf):
    return base58_from_bytes(buf, BASE58_FLAG_CHECKSUM)

def base58check_to_bytes(base58):
    return base58_to_bytes(base58, BASE58_FLAG_CHECKSUM)

def tx_witness_stack_create(witnesses):
    """ Create a witness stack from a list of witness programs """
    witness_stack = tx_witness_stack_init(len(witnesses))
    for witness_script in witnesses:
        tx_witness_stack_add(witness_stack, witness_script)
    return witness_stack

def map_to_dict(m):
    """ Create a Python dict from a wally_map """
    ret, i, n = dict(), 0, map_get_num_items(m)
    while i < n:
        key_len = map_get_item_key_length(m, i)
        if key_len:
            key = bytes(map_get_item_key(m, i))
        else:
            key = map_get_item_integer_key(m, i)
        ret[key] = map_get_item(m, i)
        i += 1
    return ret

def map_from_dict(d):
    """ Create a wally_map from a Python dict """
    ret = map_init(len(d), None)
    for k, v in d.items():
        fn = map_add_integer if type(k) is int else map_add
        fn(ret, k, v)
    return ret

# Backwards compatibility for ABI changes
psbt_from_bytes = _wrap_with_defaults(psbt_from_bytes, 1, 2, 0)
psbt_from_base64 = _wrap_with_defaults(psbt_from_base64, 1, 2, 0)
psbt_extract = _wrap_with_defaults(psbt_extract, 1, 2, 0)
psbt_finalize = _wrap_with_defaults(psbt_finalize, 1, 2, 0)
