import { wrap, types as T } from './core.js'
import * as C from './const.js'

// Length functions for varlen buffers, based on the Python implementation in python_extra.py_in

const hex_to_bytes_len = hex => Math.floor(hex.length / 2)
const hex_n_to_bytes_len = (_hex, hex_len) => Math.floor(hex_len / 2)

const base58_to_bytes_len = (base58, flags) => base58_get_length(base58)
const base58_n_to_bytes_len = (base58, n, flags) => base58_n_get_length(base58, n)

const wif_to_public_key_len = (wif, _prefix) =>
    wif_is_uncompressed(wif) ? C.EC_PUBLIC_KEY_UNCOMPRESSED_LEN : C.EC_PUBLIC_KEY_LEN

const scriptpubkey_multisig_from_bytes_len = (pubkeys, _threshold, _flags) =>
    3 + Math.floor(pubkeys.length / C.EC_PUBLIC_KEY_LEN) * (C.EC_PUBLIC_KEY_LEN + 1)

const scriptsig_multisig_from_bytes_len = (script, sigs, _sighashes, _flags) => {
    const der_len = Math.floor(sigs.length / C.EC_SIGNATURE_LEN) * (C.EC_SIGNATURE_DER_MAX_LEN + 2)
        , script_len = script_push_from_bytes_len(script, 0)
    return 1 + der_len + script_len
}

const format_bitcoin_message_len = (msg, flags) => {
    if (flags & C.BITCOIN_MESSAGE_FLAG_HASH) {
        return C.SHA256_LEN
    } else {
        const msg_len = msg.length
        return 25 + msg_len + (msg_len < 253 ? 1 : 3)
    }
}

const script_push_from_bytes_len = (data, flags) => {
    if (flags & C.WALLY_SCRIPT_HASH160) {
        return C.HASH160_LEN + 1
    } else if (flags & C.WALLY_SCRIPT_SHA256) {
        return C.SHA256_LEN + 1
    } else {
        let push_len = data.length, opcode_len = 5
        for (const [l, op_len] in [[76, 1], [256, 2], [65536, 3]]) {
            if (push_len < l) {
                opcode_len = op_len
                break
            }
        }
        return push_len + opcode_len
    }
}

const scriptpubkey_csv_2of2_then_1_from_bytes_len = (_pubkeys, _csv_blocks, _flags) =>
    9 + 2 * (C.EC_PUBLIC_KEY_LEN + 1) + 4
const scriptpubkey_csv_2of2_then_1_from_bytes_opt_len = (_pubkeys, _csv_blocks, _flags) =>
    6 + 2 * (C.EC_PUBLIC_KEY_LEN + 1) + 4


const elements_pegout_script_from_bytes_len = (bh, mcs, pk, whl, _flag) =>
    elements_pegout_script_size(bh.length, mcs.length, pk.length, whl.length)

const elements_pegin_contract_script_from_bytes_len = (rs, _cs, _flag) =>
    rs.length

// BEGIN AUTOGENERATED
export const addr_segwit_from_bytes = wrap('wally_addr_segwit_from_bytes', [T.Bytes, T.String, T.Int32, T.DestPtrPtr(T.String)]);
export const addr_segwit_get_version = wrap('wally_addr_segwit_get_version', [T.String, T.String, T.Int32, T.DestPtr(T.Int32)]);
export const addr_segwit_n_get_version = wrap('wally_addr_segwit_n_get_version', [T.String, T.Int32, T.String, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const addr_segwit_n_to_bytes = wrap('wally_addr_segwit_n_to_bytes', [T.String, T.Int32, T.String, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN, true)]);
export const addr_segwit_to_bytes = wrap('wally_addr_segwit_to_bytes', [T.String, T.String, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SEGWIT_ADDRESS_PUBKEY_MAX_LEN, true)]);
export const address_to_scriptpubkey = wrap('wally_address_to_scriptpubkey', [T.String, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_ADDRESS_PUBKEY_MAX_LEN, true)]);
export const ae_host_commit_from_bytes = wrap('wally_ae_host_commit_from_bytes', [T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_HOST_COMMITMENT_LEN)]);
export const ae_sig_from_bytes = wrap('wally_ae_sig_from_bytes', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.EC_SIGNATURE_LEN)]);
export const ae_signer_commit_from_bytes = wrap('wally_ae_signer_commit_from_bytes', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_S2C_OPENING_LEN)]);
export const ae_verify = wrap('wally_ae_verify', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32, T.Bytes]);
export const aes_cbc_get_maximum_length = wrap('wally_aes_cbc_get_maximum_length', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const aes_cbc_with_ecdh_key_get_maximum_length = wrap('wally_aes_cbc_with_ecdh_key_get_maximum_length', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const aes_len = wrap('wally_aes_len', [T.Bytes, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const asset_blinding_key_from_seed = wrap('wally_asset_blinding_key_from_seed', [T.Bytes, T.DestPtrSized(T.Bytes, C.HMAC_SHA512_LEN)]);
export const asset_blinding_key_to_abf = wrap('wally_asset_blinding_key_to_abf', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN)]);
export const asset_blinding_key_to_abf_vbf = wrap('wally_asset_blinding_key_to_abf_vbf', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_ABF_VBF_LEN)]);
export const asset_blinding_key_to_ec_private_key = wrap('wally_asset_blinding_key_to_ec_private_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PRIVATE_KEY_LEN)]);
export const asset_blinding_key_to_ec_public_key = wrap('wally_asset_blinding_key_to_ec_public_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const asset_blinding_key_to_vbf = wrap('wally_asset_blinding_key_to_vbf', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN)]);
export const asset_final_vbf = wrap('wally_asset_final_vbf', [T.Uint64Array, T.Int32, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN)]);
export const asset_generator_from_bytes = wrap('wally_asset_generator_from_bytes', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.ASSET_GENERATOR_LEN)]);
export const asset_pak_whitelistproof_len = wrap('wally_asset_pak_whitelistproof_len', [T.Bytes, T.Bytes, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.DestPtr(T.Int32)]);
export const asset_pak_whitelistproof_size = wrap('wally_asset_pak_whitelistproof_size', [T.Int32, T.DestPtr(T.Int32)]);
export const asset_rangeproof = wrap('wally_asset_rangeproof', [T.Int64, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int64, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.ASSET_RANGEPROOF_MAX_LEN, true)]);
export const asset_rangeproof_get_maximum_len = wrap('wally_asset_rangeproof_get_maximum_len', [T.Int64, T.Int32, T.DestPtr(T.Int32)]);
export const asset_rangeproof_with_nonce = wrap('wally_asset_rangeproof_with_nonce', [T.Int64, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int64, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.ASSET_RANGEPROOF_MAX_LEN, true)]);
export const asset_scalar_offset = wrap('wally_asset_scalar_offset', [T.Int64, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SCALAR_LEN)]);
export const asset_surjectionproof_len = wrap('wally_asset_surjectionproof_len', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtr(T.Int32)]);
export const asset_surjectionproof_size = wrap('wally_asset_surjectionproof_size', [T.Int32, T.DestPtr(T.Int32)]);
export const asset_unblind = wrap('wally_asset_unblind', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.ASSET_TAG_LEN), T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN), T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN), T.DestPtr(T.Int64)]);
export const asset_unblind_with_nonce = wrap('wally_asset_unblind_with_nonce', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.ASSET_TAG_LEN), T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN), T.DestPtrSized(T.Bytes, C.BLINDING_FACTOR_LEN), T.DestPtr(T.Int64)]);
export const asset_value_commitment = wrap('wally_asset_value_commitment', [T.Int64, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.ASSET_COMMITMENT_LEN)]);
export const base58_from_bytes = wrap('wally_base58_from_bytes', [T.Bytes, T.Int32, T.DestPtrPtr(T.String)]);
export const base58_get_length = wrap('wally_base58_get_length', [T.String, T.DestPtr(T.Int32)]);
export const base58_n_get_length = wrap('wally_base58_n_get_length', [T.String, T.Int32, T.DestPtr(T.Int32)]);
export const base64_from_bytes = wrap('wally_base64_from_bytes', [T.Bytes, T.Int32, T.DestPtrPtr(T.String)]);
export const base64_get_maximum_length = wrap('wally_base64_get_maximum_length', [T.String, T.Int32, T.DestPtr(T.Int32)]);
export const base64_n_get_maximum_length = wrap('wally_base64_n_get_maximum_length', [T.String, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const bip32_key_free = wrap('bip32_key_free', [T.OpaqueRef]);
export const bip32_key_from_base58 = wrap('bip32_key_from_base58_alloc', [T.String, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_base58_n = wrap('bip32_key_from_base58_n_alloc', [T.String, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_base58_n_noalloc = wrap('bip32_key_from_base58_n', [T.String, T.Int32, T.OpaqueRef]);
export const bip32_key_from_base58_noalloc = wrap('bip32_key_from_base58', [T.String, T.OpaqueRef]);
export const bip32_key_from_parent = wrap('bip32_key_from_parent_alloc', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_parent_noalloc = wrap('bip32_key_from_parent', [T.OpaqueRef, T.Int32, T.Int32, T.OpaqueRef]);
export const bip32_key_from_parent_path = wrap('bip32_key_from_parent_path_alloc', [T.OpaqueRef, T.Uint32Array, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_parent_path_noalloc = wrap('bip32_key_from_parent_path', [T.OpaqueRef, T.Uint32Array, T.Int32, T.OpaqueRef]);
export const bip32_key_from_parent_path_str = wrap('bip32_key_from_parent_path_str_alloc', [T.OpaqueRef, T.String, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_parent_path_str_n = wrap('bip32_key_from_parent_path_str_n_alloc', [T.OpaqueRef, T.String, T.Int32, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_parent_path_str_n_noalloc = wrap('bip32_key_from_parent_path_str_n', [T.OpaqueRef, T.String, T.Int32, T.Int32, T.Int32, T.OpaqueRef]);
export const bip32_key_from_parent_path_str_noalloc = wrap('bip32_key_from_parent_path_str', [T.OpaqueRef, T.String, T.Int32, T.Int32, T.OpaqueRef]);
export const bip32_key_from_seed = wrap('bip32_key_from_seed_alloc', [T.Bytes, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_seed_custom = wrap('bip32_key_from_seed_custom_alloc', [T.Bytes, T.Int32, T.Bytes, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_from_seed_custom_noalloc = wrap('bip32_key_from_seed_custom', [T.Bytes, T.Int32, T.Bytes, T.Int32, T.OpaqueRef]);
export const bip32_key_from_seed_noalloc = wrap('bip32_key_from_seed', [T.Bytes, T.Int32, T.Int32, T.OpaqueRef]);
export const bip32_key_get_chain_code = wrap('bip32_key_get_chain_code', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.WALLY_BIP32_CHAIN_CODE_LEN)]);
export const bip32_key_get_child_num = wrap('bip32_key_get_child_num', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const bip32_key_get_depth = wrap('bip32_key_get_depth', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const bip32_key_get_fingerprint = wrap('bip32_key_get_fingerprint', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.BIP32_KEY_FINGERPRINT_LEN)]);
export const bip32_key_get_hash160 = wrap('bip32_key_get_hash160', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.HASH160_LEN)]);
export const bip32_key_get_parent160 = wrap('bip32_key_get_parent160', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.HASH160_LEN)]);
export const bip32_key_get_priv_key = wrap('bip32_key_get_priv_key', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.EC_PRIVATE_KEY_LEN)]);
export const bip32_key_get_pub_key = wrap('bip32_key_get_pub_key', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const bip32_key_get_pub_key_tweak_sum = wrap('bip32_key_get_pub_key_tweak_sum', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.WALLY_BIP32_TWEAK_SUM_LEN)]);
export const bip32_key_get_version = wrap('bip32_key_get_version', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const bip32_key_init = wrap('bip32_key_init_alloc', [T.Int32, T.Int32, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_init_noalloc = wrap('bip32_key_init', [T.Int32, T.Int32, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.OpaqueRef]);
export const bip32_key_serialize = wrap('bip32_key_serialize', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.BIP32_SERIALIZED_LEN)]);
export const bip32_key_strip_private_key = wrap('bip32_key_strip_private_key', [T.OpaqueRef]);
export const bip32_key_to_addr_segwit = wrap('wally_bip32_key_to_addr_segwit', [T.OpaqueRef, T.String, T.Int32, T.DestPtrPtr(T.String)]);
export const bip32_key_to_address = wrap('wally_bip32_key_to_address', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrPtr(T.String)]);
export const bip32_key_to_base58 = wrap('bip32_key_to_base58', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const bip32_key_unserialize = wrap('bip32_key_unserialize_alloc', [T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_unserialize_noalloc = wrap('bip32_key_unserialize', [T.Bytes, T.OpaqueRef]);
export const bip32_key_with_tweak_from_parent_path = wrap('bip32_key_with_tweak_from_parent_path_alloc', [T.OpaqueRef, T.Uint32Array, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const bip32_key_with_tweak_from_parent_path_noalloc = wrap('bip32_key_with_tweak_from_parent_path', [T.OpaqueRef, T.Uint32Array, T.Int32, T.OpaqueRef]);
export const bip32_path_from_str_len = wrap('bip32_path_from_str_len', [T.String, T.Int32, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const bip32_path_from_str_n_len = wrap('bip32_path_from_str_n_len', [T.String, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const bip32_path_str_get_features = wrap('bip32_path_str_get_features', [T.String, T.DestPtr(T.Int32)]);
export const bip32_path_str_n_get_features = wrap('bip32_path_str_n_get_features', [T.String, T.Int32, T.DestPtr(T.Int32)]);
export const bip340_tagged_hash = wrap('wally_bip340_tagged_hash', [T.Bytes, T.String, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const bip341_control_block_verify = wrap('wally_bip341_control_block_verify', [T.Bytes]);
export const bip38_get_flags = wrap('bip38_get_flags', [T.String, T.DestPtr(T.Int32)]);
export const bip38_raw_get_flags = wrap('bip38_raw_get_flags', [T.Bytes, T.DestPtr(T.Int32)]);
export const bip39_get_languages = wrap('bip39_get_languages', [T.DestPtrPtr(T.String)]);
export const bip39_get_word = wrap('bip39_get_word', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const bip39_get_wordlist = wrap('bip39_get_wordlist', [T.String, T.DestPtrPtr(T.OpaqueRef)]);
export const bip39_mnemonic_from_bytes = wrap('bip39_mnemonic_from_bytes', [T.OpaqueRef, T.Bytes, T.DestPtrPtr(T.String)]);
export const bip39_mnemonic_to_bytes = wrap('bip39_mnemonic_to_bytes', [T.OpaqueRef, T.String, T.DestPtrVarLen(T.Bytes, C.BIP39_ENTROPY_MAX_LEN, true)]);
export const bip39_mnemonic_to_seed512 = wrap('bip39_mnemonic_to_seed512', [T.String, T.String, T.DestPtrSized(T.Bytes, C.BIP39_SEED_LEN_512)]);
export const bip39_mnemonic_validate = wrap('bip39_mnemonic_validate', [T.OpaqueRef, T.String]);
export const bip85_get_bip39_entropy = wrap('bip85_get_bip39_entropy', [T.OpaqueRef, T.String, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.HMAC_SHA512_LEN, true)]);
export const bip85_get_languages = wrap('bip85_get_languages', [T.DestPtrPtr(T.String)]);
export const bip85_get_rsa_entropy = wrap('bip85_get_rsa_entropy', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.HMAC_SHA512_LEN, true)]);
export const bzero = wrap('wally_bzero', [T.OpaqueRef, T.Int32]);
export const cleanup = wrap('wally_cleanup', [T.Int32]);
export const coinselect_assets = wrap('wally_coinselect_assets', [T.Uint64Array, T.Int64, T.Int64, T.Int32, T.DestPtrVarLen(T.Uint32Array, C.WALLY_CS_MAX_ASSETS, true)]);
export const confidential_addr_from_addr = wrap('wally_confidential_addr_from_addr', [T.String, T.Int32, T.Bytes, T.DestPtrPtr(T.String)]);
export const confidential_addr_from_addr_segwit = wrap('wally_confidential_addr_from_addr_segwit', [T.String, T.String, T.String, T.Bytes, T.DestPtrPtr(T.String)]);
export const confidential_addr_segwit_to_ec_public_key = wrap('wally_confidential_addr_segwit_to_ec_public_key', [T.String, T.String, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const confidential_addr_to_addr = wrap('wally_confidential_addr_to_addr', [T.String, T.Int32, T.DestPtrPtr(T.String)]);
export const confidential_addr_to_addr_segwit = wrap('wally_confidential_addr_to_addr_segwit', [T.String, T.String, T.String, T.DestPtrPtr(T.String)]);
export const confidential_addr_to_ec_public_key = wrap('wally_confidential_addr_to_ec_public_key', [T.String, T.Int32, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const descriptor_canonicalize = wrap('wally_descriptor_canonicalize', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_free = wrap('wally_descriptor_free', [T.OpaqueRef]);
export const descriptor_get_checksum = wrap('wally_descriptor_get_checksum', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_get_depth = wrap('wally_descriptor_get_depth', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_get_features = wrap('wally_descriptor_get_features', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_get_key = wrap('wally_descriptor_get_key', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_get_key_child_path_str_len = wrap('wally_descriptor_get_key_child_path_str_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const descriptor_get_key_features = wrap('wally_descriptor_get_key_features', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const descriptor_get_key_origin_fingerprint = wrap('wally_descriptor_get_key_origin_fingerprint', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.BIP32_KEY_FINGERPRINT_LEN)]);
export const descriptor_get_key_origin_path_str_len = wrap('wally_descriptor_get_key_origin_path_str_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const descriptor_get_network = wrap('wally_descriptor_get_network', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_get_num_keys = wrap('wally_descriptor_get_num_keys', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_get_num_paths = wrap('wally_descriptor_get_num_paths', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_get_num_variants = wrap('wally_descriptor_get_num_variants', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const descriptor_parse = wrap('wally_descriptor_parse', [T.String, T.OpaqueRef, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const descriptor_set_network = wrap('wally_descriptor_set_network', [T.OpaqueRef, T.Int32]);
export const descriptor_to_address = wrap('wally_descriptor_to_address', [T.OpaqueRef, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_to_addresses = wrap('wally_descriptor_to_addresses', [T.OpaqueRef, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrSized(T.String, T.USER_PROVIDED_LEN)]);
export const descriptor_to_script_get_maximum_length = wrap('wally_descriptor_to_script_get_maximum_length', [T.OpaqueRef, T.Int32, T.Int32, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const ec_private_key_bip341_tweak = wrap('wally_ec_private_key_bip341_tweak', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.EC_PRIVATE_KEY_LEN)]);
export const ec_private_key_verify = wrap('wally_ec_private_key_verify', [T.Bytes]);
export const ec_public_key_bip341_tweak = wrap('wally_ec_public_key_bip341_tweak', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const ec_public_key_decompress = wrap('wally_ec_public_key_decompress', [T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_UNCOMPRESSED_LEN)]);
export const ec_public_key_from_private_key = wrap('wally_ec_public_key_from_private_key', [T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const ec_public_key_negate = wrap('wally_ec_public_key_negate', [T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const ec_public_key_tweak = wrap('wally_ec_public_key_tweak', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const ec_public_key_verify = wrap('wally_ec_public_key_verify', [T.Bytes]);
export const ec_scalar_add = wrap('wally_ec_scalar_add', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SCALAR_LEN)]);
export const ec_scalar_multiply = wrap('wally_ec_scalar_multiply', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SCALAR_LEN)]);
export const ec_scalar_subtract = wrap('wally_ec_scalar_subtract', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SCALAR_LEN)]);
export const ec_scalar_verify = wrap('wally_ec_scalar_verify', [T.Bytes]);
export const ec_sig_from_bytes_aux_len = wrap('wally_ec_sig_from_bytes_aux_len', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const ec_sig_from_bytes_len = wrap('wally_ec_sig_from_bytes_len', [T.Bytes, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const ec_sig_from_der = wrap('wally_ec_sig_from_der', [T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SIGNATURE_LEN)]);
export const ec_sig_normalize = wrap('wally_ec_sig_normalize', [T.Bytes, T.DestPtrSized(T.Bytes, C.EC_SIGNATURE_LEN)]);
export const ec_sig_to_der = wrap('wally_ec_sig_to_der', [T.Bytes, T.DestPtrVarLen(T.Bytes, C.EC_SIGNATURE_DER_MAX_LEN, true)]);
export const ec_sig_to_public_key = wrap('wally_ec_sig_to_public_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const ec_sig_verify = wrap('wally_ec_sig_verify', [T.Bytes, T.Bytes, T.Int32, T.Bytes]);
export const ec_xonly_public_key_verify = wrap('wally_ec_xonly_public_key_verify', [T.Bytes]);
export const ecdh = wrap('wally_ecdh', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const ecdh_nonce_hash = wrap('wally_ecdh_nonce_hash', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const elements_pegin_contract_script_from_bytes = wrap('wally_elements_pegin_contract_script_from_bytes', [T.Bytes, T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, elements_pegin_contract_script_from_bytes_len, true)]);
export const elements_pegout_script_from_bytes = wrap('wally_elements_pegout_script_from_bytes', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, elements_pegout_script_from_bytes_len, true)]);
export const elements_pegout_script_size = wrap('wally_elements_pegout_script_size', [T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const elip150_private_key_to_ec_private_key = wrap('wally_elip150_private_key_to_ec_private_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PRIVATE_KEY_LEN)]);
export const elip150_private_key_to_ec_public_key = wrap('wally_elip150_private_key_to_ec_public_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const elip150_public_key_to_ec_public_key = wrap('wally_elip150_public_key_to_ec_public_key', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.EC_PUBLIC_KEY_LEN)]);
export const explicit_rangeproof = wrap('wally_explicit_rangeproof', [T.Int64, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrVarLen(T.Bytes, C.ASSET_EXPLICIT_RANGEPROOF_MAX_LEN, true)]);
export const explicit_rangeproof_verify = wrap('wally_explicit_rangeproof_verify', [T.Bytes, T.Int64, T.Bytes, T.Bytes]);
export const explicit_surjectionproof = wrap('wally_explicit_surjectionproof', [T.Bytes, T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.ASSET_EXPLICIT_SURJECTIONPROOF_LEN)]);
export const explicit_surjectionproof_verify = wrap('wally_explicit_surjectionproof_verify', [T.Bytes, T.Bytes, T.Bytes]);
export const format_bitcoin_message = wrap('wally_format_bitcoin_message', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, format_bitcoin_message_len, true)]);
export const free_string = wrap('wally_free_string', [T.OpaqueRef]);
export const get_build_version = wrap('wally_get_build_version', [T.DestPtr(T.Int32)]);
export const get_hash_prevouts = wrap('wally_get_hash_prevouts', [T.Bytes, T.Uint32Array, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const get_operations = wrap('wally_get_operations', [T.OpaqueRef]);
export const hash160 = wrap('wally_hash160', [T.Bytes, T.DestPtrSized(T.Bytes, C.HASH160_LEN)]);
export const hex_from_bytes = wrap('wally_hex_from_bytes', [T.Bytes, T.DestPtrPtr(T.String)]);
export const hex_n_to_bytes = wrap('wally_hex_n_to_bytes', [T.String, T.Int32, T.DestPtrVarLen(T.Bytes, hex_n_to_bytes_len, false)]);
export const hex_n_verify = wrap('wally_hex_n_verify', [T.String, T.Int32]);
export const hex_to_bytes = wrap('wally_hex_to_bytes', [T.String, T.DestPtrVarLen(T.Bytes, hex_to_bytes_len, false)]);
export const hex_verify = wrap('wally_hex_verify', [T.String]);
export const hmac_sha256 = wrap('wally_hmac_sha256', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.HMAC_SHA256_LEN)]);
export const hmac_sha512 = wrap('wally_hmac_sha512', [T.Bytes, T.Bytes, T.DestPtrSized(T.Bytes, C.HMAC_SHA512_LEN)]);
export const init = wrap('wally_init', [T.Int32]);
export const is_elements_build = wrap('wally_is_elements_build', [T.DestPtr(T.Int32)]);
export const keypath_bip32_verify = wrap('wally_keypath_bip32_verify', [T.Bytes, T.Bytes]);
export const keypath_get_fingerprint = wrap('wally_keypath_get_fingerprint', [T.Bytes, T.DestPtrSized(T.Bytes, C.BIP32_KEY_FINGERPRINT_LEN)]);
export const keypath_get_path_len = wrap('wally_keypath_get_path_len', [T.Bytes, T.DestPtr(T.Int32)]);
export const keypath_public_key_verify = wrap('wally_keypath_public_key_verify', [T.Bytes, T.Bytes]);
export const keypath_xonly_public_key_verify = wrap('wally_keypath_xonly_public_key_verify', [T.Bytes, T.Bytes]);
export const map_add = wrap('wally_map_add', [T.OpaqueRef, T.Bytes, T.Bytes]);
export const map_add_integer = wrap('wally_map_add_integer', [T.OpaqueRef, T.Int32, T.Bytes]);
export const map_assign = wrap('wally_map_assign', [T.OpaqueRef, T.OpaqueRef]);
export const map_clear = wrap('wally_map_clear', [T.OpaqueRef]);
export const map_combine = wrap('wally_map_combine', [T.OpaqueRef, T.OpaqueRef]);
export const map_find = wrap('wally_map_find', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const map_find_bip32_public_key_from = wrap('wally_map_find_bip32_public_key_from', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.DestPtr(T.Int32)]);
export const map_find_from = wrap('wally_map_find_from', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const map_find_integer = wrap('wally_map_find_integer', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const map_free = wrap('wally_map_free', [T.OpaqueRef]);
export const map_get_item_integer_key = wrap('wally_map_get_item_integer_key', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const map_get_item_key_length = wrap('wally_map_get_item_key_length', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const map_get_item_length = wrap('wally_map_get_item_length', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const map_get_num_items = wrap('wally_map_get_num_items', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const map_hash_preimage_verify = wrap('wally_map_hash_preimage_verify', [T.Bytes, T.Bytes]);
export const map_init = wrap('wally_map_init_alloc', [T.Int32, T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const map_init_noalloc = wrap('wally_map_init', [T.Int32, T.OpaqueRef, T.OpaqueRef]);
export const map_keypath_add = wrap('wally_map_keypath_add', [T.OpaqueRef, T.Bytes, T.Bytes, T.Uint32Array]);
export const map_keypath_bip32_init = wrap('wally_map_keypath_bip32_init_alloc', [T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const map_keypath_get_bip32_key_from = wrap('wally_map_keypath_get_bip32_key_from_alloc', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const map_keypath_get_bip32_key_from_noalloc = wrap('wally_map_keypath_get_bip32_key_from', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.OpaqueRef, T.DestPtr(T.Int32)]);
export const map_keypath_get_bip32_public_key_from = wrap('wally_map_keypath_get_bip32_public_key_from', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.OpaqueRef, T.DestPtr(T.Int32)]);
export const map_keypath_get_item_fingerprint = wrap('wally_map_keypath_get_item_fingerprint', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.BIP32_KEY_FINGERPRINT_LEN)]);
export const map_keypath_get_item_path_len = wrap('wally_map_keypath_get_item_path_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const map_keypath_public_key_init = wrap('wally_map_keypath_public_key_init_alloc', [T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const map_merkle_path_add = wrap('wally_map_merkle_path_add', [T.OpaqueRef, T.Bytes, T.Bytes]);
export const map_preimage_hash160_add = wrap('wally_map_preimage_hash160_add', [T.OpaqueRef, T.Bytes]);
export const map_preimage_init = wrap('wally_map_preimage_init_alloc', [T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const map_preimage_ripemd160_add = wrap('wally_map_preimage_ripemd160_add', [T.OpaqueRef, T.Bytes]);
export const map_preimage_sha256_add = wrap('wally_map_preimage_sha256_add', [T.OpaqueRef, T.Bytes]);
export const map_preimage_sha256d_add = wrap('wally_map_preimage_sha256d_add', [T.OpaqueRef, T.Bytes]);
export const map_remove = wrap('wally_map_remove', [T.OpaqueRef, T.Bytes]);
export const map_remove_integer = wrap('wally_map_remove_integer', [T.OpaqueRef, T.Int32]);
export const map_replace = wrap('wally_map_replace', [T.OpaqueRef, T.Bytes, T.Bytes]);
export const map_replace_integer = wrap('wally_map_replace_integer', [T.OpaqueRef, T.Int32, T.Bytes]);
export const map_sort = wrap('wally_map_sort', [T.OpaqueRef, T.Int32]);
export const merkle_path_xonly_public_key_verify = wrap('wally_merkle_path_xonly_public_key_verify', [T.Bytes, T.Bytes]);
export const pbkdf2_hmac_sha256 = wrap('wally_pbkdf2_hmac_sha256', [T.Bytes, T.Bytes, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.PBKDF2_HMAC_SHA256_LEN)]);
export const pbkdf2_hmac_sha512 = wrap('wally_pbkdf2_hmac_sha512', [T.Bytes, T.Bytes, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.PBKDF2_HMAC_SHA512_LEN)]);
export const psbt_add_global_scalar = wrap('wally_psbt_add_global_scalar', [T.OpaqueRef, T.Bytes]);
export const psbt_add_input_keypath = wrap('wally_psbt_add_input_keypath', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_add_input_signature = wrap('wally_psbt_add_input_signature', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes]);
export const psbt_add_input_taproot_keypath = wrap('wally_psbt_add_input_taproot_keypath', [T.OpaqueRef, T.Int32, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_add_output_keypath = wrap('wally_psbt_add_output_keypath', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_add_output_taproot_keypath = wrap('wally_psbt_add_output_taproot_keypath', [T.OpaqueRef, T.Int32, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_add_tx_input_at = wrap('wally_psbt_add_tx_input_at', [T.OpaqueRef, T.Int32, T.Int32, T.OpaqueRef]);
export const psbt_add_tx_output_at = wrap('wally_psbt_add_tx_output_at', [T.OpaqueRef, T.Int32, T.Int32, T.OpaqueRef]);
export const psbt_blind = wrap('wally_psbt_blind_alloc', [T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.Bytes, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_blind_noalloc = wrap('wally_psbt_blind', [T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.Bytes, T.Int32, T.Int32, T.OpaqueRef]);
export const psbt_clear_fallback_locktime = wrap('wally_psbt_clear_fallback_locktime', [T.OpaqueRef]);
export const psbt_clear_input_amount = wrap('wally_psbt_clear_input_amount', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_amount_rangeproof = wrap('wally_psbt_clear_input_amount_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_asset = wrap('wally_psbt_clear_input_asset', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_asset_surjectionproof = wrap('wally_psbt_clear_input_asset_surjectionproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_inflation_keys_blinding_rangeproof = wrap('wally_psbt_clear_input_inflation_keys_blinding_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_inflation_keys_commitment = wrap('wally_psbt_clear_input_inflation_keys_commitment', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_inflation_keys_rangeproof = wrap('wally_psbt_clear_input_inflation_keys_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_issuance_amount_blinding_rangeproof = wrap('wally_psbt_clear_input_issuance_amount_blinding_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_issuance_amount_commitment = wrap('wally_psbt_clear_input_issuance_amount_commitment', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_issuance_amount_rangeproof = wrap('wally_psbt_clear_input_issuance_amount_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_issuance_asset_entropy = wrap('wally_psbt_clear_input_issuance_asset_entropy', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_issuance_blinding_nonce = wrap('wally_psbt_clear_input_issuance_blinding_nonce', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_pegin_claim_script = wrap('wally_psbt_clear_input_pegin_claim_script', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_pegin_genesis_blockhash = wrap('wally_psbt_clear_input_pegin_genesis_blockhash', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_pegin_txout_proof = wrap('wally_psbt_clear_input_pegin_txout_proof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_required_lockheight = wrap('wally_psbt_clear_input_required_lockheight', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_required_locktime = wrap('wally_psbt_clear_input_required_locktime', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_sequence = wrap('wally_psbt_clear_input_sequence', [T.OpaqueRef, T.Int32]);
export const psbt_clear_input_utxo_rangeproof = wrap('wally_psbt_clear_input_utxo_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_amount = wrap('wally_psbt_clear_output_amount', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_asset = wrap('wally_psbt_clear_output_asset', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_asset_blinding_surjectionproof = wrap('wally_psbt_clear_output_asset_blinding_surjectionproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_asset_commitment = wrap('wally_psbt_clear_output_asset_commitment', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_asset_surjectionproof = wrap('wally_psbt_clear_output_asset_surjectionproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_blinder_index = wrap('wally_psbt_clear_output_blinder_index', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_blinding_public_key = wrap('wally_psbt_clear_output_blinding_public_key', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_ecdh_public_key = wrap('wally_psbt_clear_output_ecdh_public_key', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_value_blinding_rangeproof = wrap('wally_psbt_clear_output_value_blinding_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_value_commitment = wrap('wally_psbt_clear_output_value_commitment', [T.OpaqueRef, T.Int32]);
export const psbt_clear_output_value_rangeproof = wrap('wally_psbt_clear_output_value_rangeproof', [T.OpaqueRef, T.Int32]);
export const psbt_clone = wrap('wally_psbt_clone_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_combine = wrap('wally_psbt_combine', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_combine_ex = wrap('wally_psbt_combine_ex', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_extract = wrap('wally_psbt_extract', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_finalize = wrap('wally_psbt_finalize', [T.OpaqueRef, T.Int32]);
export const psbt_finalize_input = wrap('wally_psbt_finalize_input', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_find_global_scalar = wrap('wally_psbt_find_global_scalar', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_find_input_keypath = wrap('wally_psbt_find_input_keypath', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_find_input_signature = wrap('wally_psbt_find_input_signature', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_find_input_spending_utxo = wrap('wally_psbt_find_input_spending_utxo', [T.OpaqueRef, T.Bytes, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_find_input_unknown = wrap('wally_psbt_find_input_unknown', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_find_output_keypath = wrap('wally_psbt_find_output_keypath', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_find_output_unknown = wrap('wally_psbt_find_output_unknown', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_free = wrap('wally_psbt_free', [T.OpaqueRef]);
export const psbt_from_base64 = wrap('wally_psbt_from_base64', [T.String, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_from_base64_n = wrap('wally_psbt_from_base64_n', [T.String, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_from_bytes = wrap('wally_psbt_from_bytes', [T.Bytes, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_from_tx = wrap('wally_psbt_from_tx', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_generate_input_explicit_proofs = wrap('wally_psbt_generate_input_explicit_proofs', [T.OpaqueRef, T.Int32, T.Int64, T.Bytes, T.Bytes, T.Bytes, T.Bytes]);
export const psbt_get_fallback_locktime = wrap('wally_psbt_get_fallback_locktime', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_global_genesis_blockhash = wrap('wally_psbt_get_global_genesis_blockhash', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, C.SHA256_LEN, true)]);
export const psbt_get_global_scalar = wrap('wally_psbt_get_global_scalar', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_SCALAR_OFFSET_LEN)]);
export const psbt_get_global_scalars_size = wrap('wally_psbt_get_global_scalars_size', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_global_tx = wrap('wally_psbt_get_global_tx_alloc', [T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_id = wrap('wally_psbt_get_id', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_TXHASH_LEN)]);
export const psbt_get_input_amount = wrap('wally_psbt_get_input_amount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const psbt_get_input_amount_rangeproof_len = wrap('wally_psbt_get_input_amount_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_asset_len = wrap('wally_psbt_get_input_asset_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_asset_surjectionproof_len = wrap('wally_psbt_get_input_asset_surjectionproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_best_utxo = wrap('wally_psbt_get_input_best_utxo_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_input_best_utxo_noalloc = wrap('wally_psbt_get_input_best_utxo', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_input_bip32_key_from = wrap('wally_psbt_get_input_bip32_key_from_alloc', [T.OpaqueRef, T.Int32, T.Int32, T.Int32, T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_input_final_scriptsig_len = wrap('wally_psbt_get_input_final_scriptsig_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_final_witness = wrap('wally_psbt_get_input_final_witness_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_input_inflation_keys = wrap('wally_psbt_get_input_inflation_keys', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const psbt_get_input_inflation_keys_blinding_rangeproof_len = wrap('wally_psbt_get_input_inflation_keys_blinding_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_inflation_keys_commitment_len = wrap('wally_psbt_get_input_inflation_keys_commitment_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_inflation_keys_rangeproof_len = wrap('wally_psbt_get_input_inflation_keys_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_issuance_amount = wrap('wally_psbt_get_input_issuance_amount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const psbt_get_input_issuance_amount_blinding_rangeproof_len = wrap('wally_psbt_get_input_issuance_amount_blinding_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_issuance_amount_commitment_len = wrap('wally_psbt_get_input_issuance_amount_commitment_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_issuance_amount_rangeproof_len = wrap('wally_psbt_get_input_issuance_amount_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_issuance_asset_entropy_len = wrap('wally_psbt_get_input_issuance_asset_entropy_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_issuance_blinding_nonce_len = wrap('wally_psbt_get_input_issuance_blinding_nonce_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_keypath_len = wrap('wally_psbt_get_input_keypath_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_keypaths_size = wrap('wally_psbt_get_input_keypaths_size', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_output_index = wrap('wally_psbt_get_input_output_index', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_pegin_amount = wrap('wally_psbt_get_input_pegin_amount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const psbt_get_input_pegin_claim_script_len = wrap('wally_psbt_get_input_pegin_claim_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_pegin_genesis_blockhash_len = wrap('wally_psbt_get_input_pegin_genesis_blockhash_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_pegin_txout_proof_len = wrap('wally_psbt_get_input_pegin_txout_proof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_previous_txid = wrap('wally_psbt_get_input_previous_txid', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_TXHASH_LEN)]);
export const psbt_get_input_redeem_script_len = wrap('wally_psbt_get_input_redeem_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_required_lockheight = wrap('wally_psbt_get_input_required_lockheight', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_required_locktime = wrap('wally_psbt_get_input_required_locktime', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_scriptcode_len = wrap('wally_psbt_get_input_scriptcode_len', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_get_input_sequence = wrap('wally_psbt_get_input_sequence', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_sighash = wrap('wally_psbt_get_input_sighash', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_signature_hash = wrap('wally_psbt_get_input_signature_hash', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const psbt_get_input_signature_len = wrap('wally_psbt_get_input_signature_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_signature_type = wrap('wally_psbt_get_input_signature_type', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_signatures_size = wrap('wally_psbt_get_input_signatures_size', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_signing_script_len = wrap('wally_psbt_get_input_signing_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_taproot_internal_key_len = wrap('wally_psbt_get_input_taproot_internal_key_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_taproot_signature_len = wrap('wally_psbt_get_input_taproot_signature_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_unknown_len = wrap('wally_psbt_get_input_unknown_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_unknowns_size = wrap('wally_psbt_get_input_unknowns_size', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_utxo = wrap('wally_psbt_get_input_utxo_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_input_utxo_rangeproof_len = wrap('wally_psbt_get_input_utxo_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_witness_script_len = wrap('wally_psbt_get_input_witness_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_input_witness_utxo = wrap('wally_psbt_get_input_witness_utxo_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_get_length = wrap('wally_psbt_get_length', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_locktime = wrap('wally_psbt_get_locktime', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_num_inputs = wrap('wally_psbt_get_num_inputs', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_num_outputs = wrap('wally_psbt_get_num_outputs', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_output_amount = wrap('wally_psbt_get_output_amount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const psbt_get_output_asset_blinding_surjectionproof_len = wrap('wally_psbt_get_output_asset_blinding_surjectionproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_asset_commitment_len = wrap('wally_psbt_get_output_asset_commitment_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_asset_len = wrap('wally_psbt_get_output_asset_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_asset_surjectionproof_len = wrap('wally_psbt_get_output_asset_surjectionproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_blinder_index = wrap('wally_psbt_get_output_blinder_index', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_blinding_public_key_len = wrap('wally_psbt_get_output_blinding_public_key_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_blinding_status = wrap('wally_psbt_get_output_blinding_status', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_ecdh_public_key_len = wrap('wally_psbt_get_output_ecdh_public_key_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_keypath_len = wrap('wally_psbt_get_output_keypath_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_keypaths_size = wrap('wally_psbt_get_output_keypaths_size', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_redeem_script_len = wrap('wally_psbt_get_output_redeem_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_script_len = wrap('wally_psbt_get_output_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_taproot_internal_key_len = wrap('wally_psbt_get_output_taproot_internal_key_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_unknown_len = wrap('wally_psbt_get_output_unknown_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_unknowns_size = wrap('wally_psbt_get_output_unknowns_size', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_value_blinding_rangeproof_len = wrap('wally_psbt_get_output_value_blinding_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_value_commitment_len = wrap('wally_psbt_get_output_value_commitment_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_value_rangeproof_len = wrap('wally_psbt_get_output_value_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_output_witness_script_len = wrap('wally_psbt_get_output_witness_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_get_pset_modifiable_flags = wrap('wally_psbt_get_pset_modifiable_flags', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_tx_modifiable_flags = wrap('wally_psbt_get_tx_modifiable_flags', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_tx_version = wrap('wally_psbt_get_tx_version', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_get_version = wrap('wally_psbt_get_version', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_has_fallback_locktime = wrap('wally_psbt_has_fallback_locktime', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_has_global_genesis_blockhash = wrap('wally_psbt_has_global_genesis_blockhash', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_has_input_required_lockheight = wrap('wally_psbt_has_input_required_lockheight', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_has_input_required_locktime = wrap('wally_psbt_has_input_required_locktime', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_has_output_amount = wrap('wally_psbt_has_output_amount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_has_output_blinder_index = wrap('wally_psbt_has_output_blinder_index', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_init = wrap('wally_psbt_init_alloc', [T.Int32, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const psbt_input_add_signature = wrap('wally_psbt_input_add_signature', [T.OpaqueRef, T.Bytes, T.Bytes]);
export const psbt_input_clear_amount_rangeproof = wrap('wally_psbt_input_clear_amount_rangeproof', [T.OpaqueRef]);
export const psbt_input_clear_asset = wrap('wally_psbt_input_clear_asset', [T.OpaqueRef]);
export const psbt_input_clear_asset_surjectionproof = wrap('wally_psbt_input_clear_asset_surjectionproof', [T.OpaqueRef]);
export const psbt_input_clear_inflation_keys_blinding_rangeproof = wrap('wally_psbt_input_clear_inflation_keys_blinding_rangeproof', [T.OpaqueRef]);
export const psbt_input_clear_inflation_keys_commitment = wrap('wally_psbt_input_clear_inflation_keys_commitment', [T.OpaqueRef]);
export const psbt_input_clear_inflation_keys_rangeproof = wrap('wally_psbt_input_clear_inflation_keys_rangeproof', [T.OpaqueRef]);
export const psbt_input_clear_issuance_amount_blinding_rangeproof = wrap('wally_psbt_input_clear_issuance_amount_blinding_rangeproof', [T.OpaqueRef]);
export const psbt_input_clear_issuance_amount_commitment = wrap('wally_psbt_input_clear_issuance_amount_commitment', [T.OpaqueRef]);
export const psbt_input_clear_issuance_amount_rangeproof = wrap('wally_psbt_input_clear_issuance_amount_rangeproof', [T.OpaqueRef]);
export const psbt_input_clear_issuance_asset_entropy = wrap('wally_psbt_input_clear_issuance_asset_entropy', [T.OpaqueRef]);
export const psbt_input_clear_issuance_blinding_nonce = wrap('wally_psbt_input_clear_issuance_blinding_nonce', [T.OpaqueRef]);
export const psbt_input_clear_pegin_claim_script = wrap('wally_psbt_input_clear_pegin_claim_script', [T.OpaqueRef]);
export const psbt_input_clear_pegin_genesis_blockhash = wrap('wally_psbt_input_clear_pegin_genesis_blockhash', [T.OpaqueRef]);
export const psbt_input_clear_pegin_txout_proof = wrap('wally_psbt_input_clear_pegin_txout_proof', [T.OpaqueRef]);
export const psbt_input_clear_required_lockheight = wrap('wally_psbt_input_clear_required_lockheight', [T.OpaqueRef]);
export const psbt_input_clear_required_locktime = wrap('wally_psbt_input_clear_required_locktime', [T.OpaqueRef]);
export const psbt_input_clear_sequence = wrap('wally_psbt_input_clear_sequence', [T.OpaqueRef]);
export const psbt_input_clear_utxo_rangeproof = wrap('wally_psbt_input_clear_utxo_rangeproof', [T.OpaqueRef]);
export const psbt_input_find_keypath = wrap('wally_psbt_input_find_keypath', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_input_find_signature = wrap('wally_psbt_input_find_signature', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_input_find_unknown = wrap('wally_psbt_input_find_unknown', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_input_generate_explicit_proofs = wrap('wally_psbt_input_generate_explicit_proofs', [T.OpaqueRef, T.Int64, T.Bytes, T.Bytes, T.Bytes, T.Bytes]);
export const psbt_input_get_amount_rangeproof_len = wrap('wally_psbt_input_get_amount_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_asset_len = wrap('wally_psbt_input_get_asset_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_asset_surjectionproof_len = wrap('wally_psbt_input_get_asset_surjectionproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_inflation_keys_blinding_rangeproof_len = wrap('wally_psbt_input_get_inflation_keys_blinding_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_inflation_keys_commitment_len = wrap('wally_psbt_input_get_inflation_keys_commitment_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_inflation_keys_rangeproof_len = wrap('wally_psbt_input_get_inflation_keys_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_issuance_amount_blinding_rangeproof_len = wrap('wally_psbt_input_get_issuance_amount_blinding_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_issuance_amount_commitment_len = wrap('wally_psbt_input_get_issuance_amount_commitment_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_issuance_amount_rangeproof_len = wrap('wally_psbt_input_get_issuance_amount_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_issuance_asset_entropy_len = wrap('wally_psbt_input_get_issuance_asset_entropy_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_issuance_blinding_nonce_len = wrap('wally_psbt_input_get_issuance_blinding_nonce_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_pegin_claim_script_len = wrap('wally_psbt_input_get_pegin_claim_script_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_pegin_genesis_blockhash_len = wrap('wally_psbt_input_get_pegin_genesis_blockhash_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_pegin_txout_proof_len = wrap('wally_psbt_input_get_pegin_txout_proof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_get_utxo_rangeproof_len = wrap('wally_psbt_input_get_utxo_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_is_finalized = wrap('wally_psbt_input_is_finalized', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_input_keypath_add = wrap('wally_psbt_input_keypath_add', [T.OpaqueRef, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_input_set_amount = wrap('wally_psbt_input_set_amount', [T.OpaqueRef, T.Int64]);
export const psbt_input_set_amount_rangeproof = wrap('wally_psbt_input_set_amount_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_asset = wrap('wally_psbt_input_set_asset', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_asset_surjectionproof = wrap('wally_psbt_input_set_asset_surjectionproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_final_scriptsig = wrap('wally_psbt_input_set_final_scriptsig', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_final_witness = wrap('wally_psbt_input_set_final_witness', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_inflation_keys = wrap('wally_psbt_input_set_inflation_keys', [T.OpaqueRef, T.Int64]);
export const psbt_input_set_inflation_keys_blinding_rangeproof = wrap('wally_psbt_input_set_inflation_keys_blinding_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_inflation_keys_commitment = wrap('wally_psbt_input_set_inflation_keys_commitment', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_inflation_keys_rangeproof = wrap('wally_psbt_input_set_inflation_keys_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_issuance_amount = wrap('wally_psbt_input_set_issuance_amount', [T.OpaqueRef, T.Int64]);
export const psbt_input_set_issuance_amount_blinding_rangeproof = wrap('wally_psbt_input_set_issuance_amount_blinding_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_issuance_amount_commitment = wrap('wally_psbt_input_set_issuance_amount_commitment', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_issuance_amount_rangeproof = wrap('wally_psbt_input_set_issuance_amount_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_issuance_asset_entropy = wrap('wally_psbt_input_set_issuance_asset_entropy', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_issuance_blinding_nonce = wrap('wally_psbt_input_set_issuance_blinding_nonce', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_keypaths = wrap('wally_psbt_input_set_keypaths', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_output_index = wrap('wally_psbt_input_set_output_index', [T.OpaqueRef, T.Int32]);
export const psbt_input_set_pegin_amount = wrap('wally_psbt_input_set_pegin_amount', [T.OpaqueRef, T.Int64]);
export const psbt_input_set_pegin_claim_script = wrap('wally_psbt_input_set_pegin_claim_script', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_pegin_genesis_blockhash = wrap('wally_psbt_input_set_pegin_genesis_blockhash', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_pegin_tx = wrap('wally_psbt_input_set_pegin_tx', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_pegin_txout_proof = wrap('wally_psbt_input_set_pegin_txout_proof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_pegin_witness = wrap('wally_psbt_input_set_pegin_witness', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_previous_txid = wrap('wally_psbt_input_set_previous_txid', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_redeem_script = wrap('wally_psbt_input_set_redeem_script', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_required_lockheight = wrap('wally_psbt_input_set_required_lockheight', [T.OpaqueRef, T.Int32]);
export const psbt_input_set_required_locktime = wrap('wally_psbt_input_set_required_locktime', [T.OpaqueRef, T.Int32]);
export const psbt_input_set_sequence = wrap('wally_psbt_input_set_sequence', [T.OpaqueRef, T.Int32]);
export const psbt_input_set_sighash = wrap('wally_psbt_input_set_sighash', [T.OpaqueRef, T.Int32]);
export const psbt_input_set_signatures = wrap('wally_psbt_input_set_signatures', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_taproot_internal_key = wrap('wally_psbt_input_set_taproot_internal_key', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_taproot_signature = wrap('wally_psbt_input_set_taproot_signature', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_unknowns = wrap('wally_psbt_input_set_unknowns', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_utxo = wrap('wally_psbt_input_set_utxo', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_utxo_rangeproof = wrap('wally_psbt_input_set_utxo_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_witness_script = wrap('wally_psbt_input_set_witness_script', [T.OpaqueRef, T.Bytes]);
export const psbt_input_set_witness_utxo = wrap('wally_psbt_input_set_witness_utxo', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_input_set_witness_utxo_from_tx = wrap('wally_psbt_input_set_witness_utxo_from_tx', [T.OpaqueRef, T.OpaqueRef, T.Int32]);
export const psbt_input_taproot_keypath_add = wrap('wally_psbt_input_taproot_keypath_add', [T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_is_elements = wrap('wally_psbt_is_elements', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_is_finalized = wrap('wally_psbt_is_finalized', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_is_input_finalized = wrap('wally_psbt_is_input_finalized', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_output_clear_amount = wrap('wally_psbt_output_clear_amount', [T.OpaqueRef]);
export const psbt_output_clear_asset = wrap('wally_psbt_output_clear_asset', [T.OpaqueRef]);
export const psbt_output_clear_asset_blinding_surjectionproof = wrap('wally_psbt_output_clear_asset_blinding_surjectionproof', [T.OpaqueRef]);
export const psbt_output_clear_asset_commitment = wrap('wally_psbt_output_clear_asset_commitment', [T.OpaqueRef]);
export const psbt_output_clear_asset_surjectionproof = wrap('wally_psbt_output_clear_asset_surjectionproof', [T.OpaqueRef]);
export const psbt_output_clear_blinder_index = wrap('wally_psbt_output_clear_blinder_index', [T.OpaqueRef]);
export const psbt_output_clear_blinding_public_key = wrap('wally_psbt_output_clear_blinding_public_key', [T.OpaqueRef]);
export const psbt_output_clear_ecdh_public_key = wrap('wally_psbt_output_clear_ecdh_public_key', [T.OpaqueRef]);
export const psbt_output_clear_value_blinding_rangeproof = wrap('wally_psbt_output_clear_value_blinding_rangeproof', [T.OpaqueRef]);
export const psbt_output_clear_value_commitment = wrap('wally_psbt_output_clear_value_commitment', [T.OpaqueRef]);
export const psbt_output_clear_value_rangeproof = wrap('wally_psbt_output_clear_value_rangeproof', [T.OpaqueRef]);
export const psbt_output_find_keypath = wrap('wally_psbt_output_find_keypath', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_output_find_unknown = wrap('wally_psbt_output_find_unknown', [T.OpaqueRef, T.Bytes, T.DestPtr(T.Int32)]);
export const psbt_output_get_asset_blinding_surjectionproof_len = wrap('wally_psbt_output_get_asset_blinding_surjectionproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_asset_commitment_len = wrap('wally_psbt_output_get_asset_commitment_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_asset_len = wrap('wally_psbt_output_get_asset_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_asset_surjectionproof_len = wrap('wally_psbt_output_get_asset_surjectionproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_blinding_public_key_len = wrap('wally_psbt_output_get_blinding_public_key_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_blinding_status = wrap('wally_psbt_output_get_blinding_status', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const psbt_output_get_ecdh_public_key_len = wrap('wally_psbt_output_get_ecdh_public_key_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_value_blinding_rangeproof_len = wrap('wally_psbt_output_get_value_blinding_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_value_commitment_len = wrap('wally_psbt_output_get_value_commitment_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_get_value_rangeproof_len = wrap('wally_psbt_output_get_value_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const psbt_output_keypath_add = wrap('wally_psbt_output_keypath_add', [T.OpaqueRef, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_output_set_amount = wrap('wally_psbt_output_set_amount', [T.OpaqueRef, T.Int64]);
export const psbt_output_set_asset = wrap('wally_psbt_output_set_asset', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_asset_blinding_surjectionproof = wrap('wally_psbt_output_set_asset_blinding_surjectionproof', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_asset_commitment = wrap('wally_psbt_output_set_asset_commitment', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_asset_surjectionproof = wrap('wally_psbt_output_set_asset_surjectionproof', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_blinder_index = wrap('wally_psbt_output_set_blinder_index', [T.OpaqueRef, T.Int32]);
export const psbt_output_set_blinding_public_key = wrap('wally_psbt_output_set_blinding_public_key', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_ecdh_public_key = wrap('wally_psbt_output_set_ecdh_public_key', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_keypaths = wrap('wally_psbt_output_set_keypaths', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_output_set_redeem_script = wrap('wally_psbt_output_set_redeem_script', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_script = wrap('wally_psbt_output_set_script', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_taproot_internal_key = wrap('wally_psbt_output_set_taproot_internal_key', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_unknowns = wrap('wally_psbt_output_set_unknowns', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_output_set_value_blinding_rangeproof = wrap('wally_psbt_output_set_value_blinding_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_value_commitment = wrap('wally_psbt_output_set_value_commitment', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_value_rangeproof = wrap('wally_psbt_output_set_value_rangeproof', [T.OpaqueRef, T.Bytes]);
export const psbt_output_set_witness_script = wrap('wally_psbt_output_set_witness_script', [T.OpaqueRef, T.Bytes]);
export const psbt_output_taproot_keypath_add = wrap('wally_psbt_output_taproot_keypath_add', [T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Uint32Array]);
export const psbt_remove_input = wrap('wally_psbt_remove_input', [T.OpaqueRef, T.Int32]);
export const psbt_remove_output = wrap('wally_psbt_remove_output', [T.OpaqueRef, T.Int32]);
export const psbt_set_fallback_locktime = wrap('wally_psbt_set_fallback_locktime', [T.OpaqueRef, T.Int32]);
export const psbt_set_global_genesis_blockhash = wrap('wally_psbt_set_global_genesis_blockhash', [T.OpaqueRef, T.Bytes]);
export const psbt_set_global_scalars = wrap('wally_psbt_set_global_scalars', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_set_global_tx = wrap('wally_psbt_set_global_tx', [T.OpaqueRef, T.OpaqueRef]);
export const psbt_set_input_amount = wrap('wally_psbt_set_input_amount', [T.OpaqueRef, T.Int32, T.Int64]);
export const psbt_set_input_amount_rangeproof = wrap('wally_psbt_set_input_amount_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_asset = wrap('wally_psbt_set_input_asset', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_asset_surjectionproof = wrap('wally_psbt_set_input_asset_surjectionproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_final_scriptsig = wrap('wally_psbt_set_input_final_scriptsig', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_final_witness = wrap('wally_psbt_set_input_final_witness', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_inflation_keys = wrap('wally_psbt_set_input_inflation_keys', [T.OpaqueRef, T.Int32, T.Int64]);
export const psbt_set_input_inflation_keys_blinding_rangeproof = wrap('wally_psbt_set_input_inflation_keys_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_inflation_keys_commitment = wrap('wally_psbt_set_input_inflation_keys_commitment', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_inflation_keys_rangeproof = wrap('wally_psbt_set_input_inflation_keys_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_issuance_amount = wrap('wally_psbt_set_input_issuance_amount', [T.OpaqueRef, T.Int32, T.Int64]);
export const psbt_set_input_issuance_amount_blinding_rangeproof = wrap('wally_psbt_set_input_issuance_amount_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_issuance_amount_commitment = wrap('wally_psbt_set_input_issuance_amount_commitment', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_issuance_amount_rangeproof = wrap('wally_psbt_set_input_issuance_amount_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_issuance_asset_entropy = wrap('wally_psbt_set_input_issuance_asset_entropy', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_issuance_blinding_nonce = wrap('wally_psbt_set_input_issuance_blinding_nonce', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_keypaths = wrap('wally_psbt_set_input_keypaths', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_output_index = wrap('wally_psbt_set_input_output_index', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_input_pegin_amount = wrap('wally_psbt_set_input_pegin_amount', [T.OpaqueRef, T.Int32, T.Int64]);
export const psbt_set_input_pegin_claim_script = wrap('wally_psbt_set_input_pegin_claim_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_pegin_genesis_blockhash = wrap('wally_psbt_set_input_pegin_genesis_blockhash', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_pegin_txout_proof = wrap('wally_psbt_set_input_pegin_txout_proof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_previous_txid = wrap('wally_psbt_set_input_previous_txid', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_redeem_script = wrap('wally_psbt_set_input_redeem_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_required_lockheight = wrap('wally_psbt_set_input_required_lockheight', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_input_required_locktime = wrap('wally_psbt_set_input_required_locktime', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_input_sequence = wrap('wally_psbt_set_input_sequence', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_input_sighash = wrap('wally_psbt_set_input_sighash', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_input_signatures = wrap('wally_psbt_set_input_signatures', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_taproot_internal_key = wrap('wally_psbt_set_input_taproot_internal_key', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_taproot_signature = wrap('wally_psbt_set_input_taproot_signature', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_unknowns = wrap('wally_psbt_set_input_unknowns', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_utxo = wrap('wally_psbt_set_input_utxo', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_utxo_rangeproof = wrap('wally_psbt_set_input_utxo_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_witness_script = wrap('wally_psbt_set_input_witness_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_input_witness_utxo = wrap('wally_psbt_set_input_witness_utxo', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_input_witness_utxo_from_tx = wrap('wally_psbt_set_input_witness_utxo_from_tx', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.Int32]);
export const psbt_set_output_amount = wrap('wally_psbt_set_output_amount', [T.OpaqueRef, T.Int32, T.Int64]);
export const psbt_set_output_asset = wrap('wally_psbt_set_output_asset', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_asset_blinding_surjectionproof = wrap('wally_psbt_set_output_asset_blinding_surjectionproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_asset_commitment = wrap('wally_psbt_set_output_asset_commitment', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_asset_surjectionproof = wrap('wally_psbt_set_output_asset_surjectionproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_blinder_index = wrap('wally_psbt_set_output_blinder_index', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_set_output_blinding_public_key = wrap('wally_psbt_set_output_blinding_public_key', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_ecdh_public_key = wrap('wally_psbt_set_output_ecdh_public_key', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_keypaths = wrap('wally_psbt_set_output_keypaths', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_output_redeem_script = wrap('wally_psbt_set_output_redeem_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_script = wrap('wally_psbt_set_output_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_taproot_internal_key = wrap('wally_psbt_set_output_taproot_internal_key', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_unknowns = wrap('wally_psbt_set_output_unknowns', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const psbt_set_output_value_blinding_rangeproof = wrap('wally_psbt_set_output_value_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_value_commitment = wrap('wally_psbt_set_output_value_commitment', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_value_rangeproof = wrap('wally_psbt_set_output_value_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_output_witness_script = wrap('wally_psbt_set_output_witness_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const psbt_set_pset_modifiable_flags = wrap('wally_psbt_set_pset_modifiable_flags', [T.OpaqueRef, T.Int32]);
export const psbt_set_tx_modifiable_flags = wrap('wally_psbt_set_tx_modifiable_flags', [T.OpaqueRef, T.Int32]);
export const psbt_set_tx_version = wrap('wally_psbt_set_tx_version', [T.OpaqueRef, T.Int32]);
export const psbt_set_version = wrap('wally_psbt_set_version', [T.OpaqueRef, T.Int32, T.Int32]);
export const psbt_sign = wrap('wally_psbt_sign', [T.OpaqueRef, T.Bytes, T.Int32]);
export const psbt_sign_bip32 = wrap('wally_psbt_sign_bip32', [T.OpaqueRef, T.OpaqueRef, T.Int32]);
export const psbt_sign_input_bip32 = wrap('wally_psbt_sign_input_bip32', [T.OpaqueRef, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Int32]);
export const psbt_signing_cache_disable = wrap('wally_psbt_signing_cache_disable', [T.OpaqueRef]);
export const psbt_signing_cache_enable = wrap('wally_psbt_signing_cache_enable', [T.OpaqueRef, T.Int32]);
export const psbt_to_base64 = wrap('wally_psbt_to_base64', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const ripemd160 = wrap('wally_ripemd160', [T.Bytes, T.DestPtrSized(T.Bytes, C.RIPEMD160_LEN)]);
export const s2c_commitment_verify = wrap('wally_s2c_commitment_verify', [T.Bytes, T.Bytes, T.Bytes, T.Int32]);
export const s2c_sig_from_bytes = wrap('wally_s2c_sig_from_bytes', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_S2C_OPENING_LEN), T.DestPtrSized(T.Bytes, C.EC_SIGNATURE_LEN)]);
export const script_push_from_bytes = wrap('wally_script_push_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, script_push_from_bytes_len, true)]);
export const scriptpubkey_csv_2of2_then_1_from_bytes = wrap('wally_scriptpubkey_csv_2of2_then_1_from_bytes', [T.Bytes, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, scriptpubkey_csv_2of2_then_1_from_bytes_len, true)]);
export const scriptpubkey_csv_2of2_then_1_from_bytes_opt = wrap('wally_scriptpubkey_csv_2of2_then_1_from_bytes_opt', [T.Bytes, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, scriptpubkey_csv_2of2_then_1_from_bytes_opt_len, true)]);
export const scriptpubkey_csv_blocks_from_csv_2of2_then_1 = wrap('wally_scriptpubkey_csv_blocks_from_csv_2of2_then_1', [T.Bytes, T.DestPtr(T.Int32)]);
export const scriptpubkey_get_type = wrap('wally_scriptpubkey_get_type', [T.Bytes, T.DestPtr(T.Int32)]);
export const scriptpubkey_multisig_from_bytes = wrap('wally_scriptpubkey_multisig_from_bytes', [T.Bytes, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, scriptpubkey_multisig_from_bytes_len, true)]);
export const scriptpubkey_op_return_from_bytes = wrap('wally_scriptpubkey_op_return_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN, true)]);
export const scriptpubkey_p2pkh_from_bytes = wrap('wally_scriptpubkey_p2pkh_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTPUBKEY_P2PKH_LEN, true)]);
export const scriptpubkey_p2sh_from_bytes = wrap('wally_scriptpubkey_p2sh_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTPUBKEY_P2SH_LEN, true)]);
export const scriptpubkey_p2tr_from_bytes = wrap('wally_scriptpubkey_p2tr_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTPUBKEY_P2TR_LEN, true)]);
export const scriptpubkey_to_address = wrap('wally_scriptpubkey_to_address', [T.Bytes, T.Int32, T.DestPtrPtr(T.String)]);
export const scriptsig_multisig_from_bytes = wrap('wally_scriptsig_multisig_from_bytes', [T.Bytes, T.Bytes, T.Uint32Array, T.Int32, T.DestPtrVarLen(T.Bytes, scriptsig_multisig_from_bytes_len, true)]);
export const scriptsig_p2pkh_from_der = wrap('wally_scriptsig_p2pkh_from_der', [T.Bytes, T.Bytes, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTSIG_P2PKH_MAX_LEN, true)]);
export const scriptsig_p2pkh_from_sig = wrap('wally_scriptsig_p2pkh_from_sig', [T.Bytes, T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_SCRIPTSIG_P2PKH_MAX_LEN, true)]);
export const scrypt = wrap('wally_scrypt', [T.Bytes, T.Bytes, T.Int32, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, T.USER_PROVIDED_LEN)]);
export const secp_randomize = wrap('wally_secp_randomize', [T.Bytes]);
export const set_operations = wrap('wally_set_operations', [T.OpaqueRef]);
export const sha256 = wrap('wally_sha256', [T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const sha256_midstate = wrap('wally_sha256_midstate', [T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const sha256d = wrap('wally_sha256d', [T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const sha512 = wrap('wally_sha512', [T.Bytes, T.DestPtrSized(T.Bytes, C.SHA512_LEN)]);
export const symmetric_key_from_parent = wrap('wally_symmetric_key_from_parent', [T.Bytes, T.Int32, T.Bytes, T.DestPtrSized(T.Bytes, C.HMAC_SHA512_LEN)]);
export const symmetric_key_from_seed = wrap('wally_symmetric_key_from_seed', [T.Bytes, T.DestPtrSized(T.Bytes, C.HMAC_SHA512_LEN)]);
export const tx_add_elements_raw_input = wrap('wally_tx_add_elements_raw_input', [T.OpaqueRef, T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.OpaqueRef, T.Int32]);
export const tx_add_elements_raw_input_at = wrap('wally_tx_add_elements_raw_input_at', [T.OpaqueRef, T.Int32, T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.OpaqueRef, T.Int32]);
export const tx_add_elements_raw_output = wrap('wally_tx_add_elements_raw_output', [T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32]);
export const tx_add_elements_raw_output_at = wrap('wally_tx_add_elements_raw_output_at', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32]);
export const tx_add_input = wrap('wally_tx_add_input', [T.OpaqueRef, T.OpaqueRef]);
export const tx_add_input_at = wrap('wally_tx_add_input_at', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const tx_add_output = wrap('wally_tx_add_output', [T.OpaqueRef, T.OpaqueRef]);
export const tx_add_output_at = wrap('wally_tx_add_output_at', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const tx_add_raw_input = wrap('wally_tx_add_raw_input', [T.OpaqueRef, T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Int32]);
export const tx_add_raw_input_at = wrap('wally_tx_add_raw_input_at', [T.OpaqueRef, T.Int32, T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Int32]);
export const tx_add_raw_output = wrap('wally_tx_add_raw_output', [T.OpaqueRef, T.Int64, T.Bytes, T.Int32]);
export const tx_add_raw_output_at = wrap('wally_tx_add_raw_output_at', [T.OpaqueRef, T.Int32, T.Int64, T.Bytes, T.Int32]);
export const tx_clone = wrap('wally_tx_clone_alloc', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_confidential_value_from_satoshi = wrap('wally_tx_confidential_value_from_satoshi', [T.Int64, T.DestPtrSized(T.Bytes, C.WALLY_TX_ASSET_CT_VALUE_UNBLIND_LEN)]);
export const tx_confidential_value_to_satoshi = wrap('wally_tx_confidential_value_to_satoshi', [T.Bytes, T.DestPtr(T.Int64)]);
export const tx_elements_input_init = wrap('wally_tx_elements_input_init_alloc', [T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_elements_input_is_pegin = wrap('wally_tx_elements_input_is_pegin', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_elements_input_issuance_free = wrap('wally_tx_elements_input_issuance_free', [T.OpaqueRef]);
export const tx_elements_input_issuance_set = wrap('wally_tx_elements_input_issuance_set', [T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes]);
export const tx_elements_issuance_calculate_asset = wrap('wally_tx_elements_issuance_calculate_asset', [T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_elements_issuance_calculate_reissuance_token = wrap('wally_tx_elements_issuance_calculate_reissuance_token', [T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_elements_issuance_generate_entropy = wrap('wally_tx_elements_issuance_generate_entropy', [T.Bytes, T.Int32, T.Bytes, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_elements_output_commitment_free = wrap('wally_tx_elements_output_commitment_free', [T.OpaqueRef]);
export const tx_elements_output_commitment_set = wrap('wally_tx_elements_output_commitment_set', [T.OpaqueRef, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes]);
export const tx_elements_output_init = wrap('wally_tx_elements_output_init_alloc', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_elements_output_init_noalloc = wrap('wally_tx_elements_output_init', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.OpaqueRef]);
export const tx_free = wrap('wally_tx_free', [T.OpaqueRef]);
export const tx_from_bytes = wrap('wally_tx_from_bytes', [T.Bytes, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_from_hex = wrap('wally_tx_from_hex', [T.String, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_get_btc_signature_hash = wrap('wally_tx_get_btc_signature_hash', [T.OpaqueRef, T.Int32, T.Bytes, T.Int64, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_btc_taproot_signature_hash = wrap('wally_tx_get_btc_taproot_signature_hash', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.Uint64Array, T.Bytes, T.Int32, T.Int32, T.Bytes, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_elements_signature_hash = wrap('wally_tx_get_elements_signature_hash', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_elements_weight_discount = wrap('wally_tx_get_elements_weight_discount', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_hash_prevouts = wrap('wally_tx_get_hash_prevouts', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_input_blinding_nonce = wrap('wally_tx_get_input_blinding_nonce', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_input_entropy = wrap('wally_tx_get_input_entropy', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_input_index = wrap('wally_tx_get_input_index', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_inflation_keys_len = wrap('wally_tx_get_input_inflation_keys_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_inflation_keys_rangeproof_len = wrap('wally_tx_get_input_inflation_keys_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_issuance_amount_len = wrap('wally_tx_get_input_issuance_amount_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_issuance_amount_rangeproof_len = wrap('wally_tx_get_input_issuance_amount_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_script_len = wrap('wally_tx_get_input_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_sequence = wrap('wally_tx_get_input_sequence', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_signature_hash = wrap('wally_tx_get_input_signature_hash', [T.OpaqueRef, T.Int32, T.OpaqueRef, T.OpaqueRef, T.OpaqueRef, T.Bytes, T.Int32, T.Int32, T.Bytes, T.Bytes, T.Int32, T.Int32, T.OpaqueRef, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_input_txhash = wrap('wally_tx_get_input_txhash', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_TXHASH_LEN)]);
export const tx_get_input_witness_len = wrap('wally_tx_get_input_witness_len', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_input_witness_num_items = wrap('wally_tx_get_input_witness_num_items', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_length = wrap('wally_tx_get_length', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_locktime = wrap('wally_tx_get_locktime', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_num_inputs = wrap('wally_tx_get_num_inputs', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_num_outputs = wrap('wally_tx_get_num_outputs', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_output_asset = wrap('wally_tx_get_output_asset', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_TX_ASSET_CT_ASSET_LEN)]);
export const tx_get_output_nonce = wrap('wally_tx_get_output_nonce', [T.OpaqueRef, T.Int32, T.DestPtrSized(T.Bytes, C.WALLY_TX_ASSET_CT_NONCE_LEN)]);
export const tx_get_output_rangeproof_len = wrap('wally_tx_get_output_rangeproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_output_satoshi = wrap('wally_tx_get_output_satoshi', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int64)]);
export const tx_get_output_script_len = wrap('wally_tx_get_output_script_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_output_surjectionproof_len = wrap('wally_tx_get_output_surjectionproof_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_output_value_len = wrap('wally_tx_get_output_value_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_get_signature_hash = wrap('wally_tx_get_signature_hash', [T.OpaqueRef, T.Int32, T.Bytes, T.Bytes, T.Int32, T.Int64, T.Int32, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_get_total_output_satoshi = wrap('wally_tx_get_total_output_satoshi', [T.OpaqueRef, T.DestPtr(T.Int64)]);
export const tx_get_txid = wrap('wally_tx_get_txid', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.WALLY_TXHASH_LEN)]);
export const tx_get_version = wrap('wally_tx_get_version', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_vsize = wrap('wally_tx_get_vsize', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_weight = wrap('wally_tx_get_weight', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_get_witness_count = wrap('wally_tx_get_witness_count', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_init = wrap('wally_tx_init_alloc', [T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_input_clone = wrap('wally_tx_input_clone_alloc', [T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_input_clone_noalloc = wrap('wally_tx_input_clone', [T.OpaqueRef, T.OpaqueRef]);
export const tx_input_free = wrap('wally_tx_input_free', [T.OpaqueRef]);
export const tx_input_get_blinding_nonce = wrap('wally_tx_input_get_blinding_nonce', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_input_get_entropy = wrap('wally_tx_input_get_entropy', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.SHA256_LEN)]);
export const tx_input_get_index = wrap('wally_tx_input_get_index', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_inflation_keys_len = wrap('wally_tx_input_get_inflation_keys_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_inflation_keys_rangeproof_len = wrap('wally_tx_input_get_inflation_keys_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_issuance_amount_len = wrap('wally_tx_input_get_issuance_amount_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_issuance_amount_rangeproof_len = wrap('wally_tx_input_get_issuance_amount_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_script_len = wrap('wally_tx_input_get_script_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_sequence = wrap('wally_tx_input_get_sequence', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_get_txhash = wrap('wally_tx_input_get_txhash', [T.OpaqueRef, T.DestPtrSized(T.Bytes, C.WALLY_TXHASH_LEN)]);
export const tx_input_get_witness_len = wrap('wally_tx_input_get_witness_len', [T.OpaqueRef, T.Int32, T.DestPtr(T.Int32)]);
export const tx_input_get_witness_num_items = wrap('wally_tx_input_get_witness_num_items', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_input_init = wrap('wally_tx_input_init_alloc', [T.Bytes, T.Int32, T.Int32, T.Bytes, T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_input_set_blinding_nonce = wrap('wally_tx_input_set_blinding_nonce', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_entropy = wrap('wally_tx_input_set_entropy', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_index = wrap('wally_tx_input_set_index', [T.OpaqueRef, T.Int32]);
export const tx_input_set_inflation_keys = wrap('wally_tx_input_set_inflation_keys', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_inflation_keys_rangeproof = wrap('wally_tx_input_set_inflation_keys_rangeproof', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_issuance_amount = wrap('wally_tx_input_set_issuance_amount', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_issuance_amount_rangeproof = wrap('wally_tx_input_set_issuance_amount_rangeproof', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_script = wrap('wally_tx_input_set_script', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_sequence = wrap('wally_tx_input_set_sequence', [T.OpaqueRef, T.Int32]);
export const tx_input_set_txhash = wrap('wally_tx_input_set_txhash', [T.OpaqueRef, T.Bytes]);
export const tx_input_set_witness = wrap('wally_tx_input_set_witness', [T.OpaqueRef, T.OpaqueRef]);
export const tx_is_coinbase = wrap('wally_tx_is_coinbase', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_is_elements = wrap('wally_tx_is_elements', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_clone = wrap('wally_tx_output_clone_alloc', [T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_output_clone_noalloc = wrap('wally_tx_output_clone', [T.OpaqueRef, T.OpaqueRef]);
export const tx_output_free = wrap('wally_tx_output_free', [T.OpaqueRef]);
export const tx_output_get_asset_len = wrap('wally_tx_output_get_asset_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_get_nonce_len = wrap('wally_tx_output_get_nonce_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_get_rangeproof_len = wrap('wally_tx_output_get_rangeproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_get_satoshi = wrap('wally_tx_output_get_satoshi', [T.OpaqueRef, T.DestPtr(T.Int64)]);
export const tx_output_get_script_len = wrap('wally_tx_output_get_script_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_get_surjectionproof_len = wrap('wally_tx_output_get_surjectionproof_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_get_value_len = wrap('wally_tx_output_get_value_len', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_output_init = wrap('wally_tx_output_init_alloc', [T.Int64, T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_output_init_noalloc = wrap('wally_tx_output_init', [T.Int64, T.Bytes, T.OpaqueRef]);
export const tx_output_set_asset = wrap('wally_tx_output_set_asset', [T.OpaqueRef, T.Bytes]);
export const tx_output_set_nonce = wrap('wally_tx_output_set_nonce', [T.OpaqueRef, T.Bytes]);
export const tx_output_set_rangeproof = wrap('wally_tx_output_set_rangeproof', [T.OpaqueRef, T.Bytes]);
export const tx_output_set_satoshi = wrap('wally_tx_output_set_satoshi', [T.OpaqueRef, T.Int64]);
export const tx_output_set_script = wrap('wally_tx_output_set_script', [T.OpaqueRef, T.Bytes]);
export const tx_output_set_surjectionproof = wrap('wally_tx_output_set_surjectionproof', [T.OpaqueRef, T.Bytes]);
export const tx_output_set_value = wrap('wally_tx_output_set_value', [T.OpaqueRef, T.Bytes]);
export const tx_remove_input = wrap('wally_tx_remove_input', [T.OpaqueRef, T.Int32]);
export const tx_remove_output = wrap('wally_tx_remove_output', [T.OpaqueRef, T.Int32]);
export const tx_set_input_blinding_nonce = wrap('wally_tx_set_input_blinding_nonce', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_entropy = wrap('wally_tx_set_input_entropy', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_index = wrap('wally_tx_set_input_index', [T.OpaqueRef, T.Int32, T.Int32]);
export const tx_set_input_inflation_keys = wrap('wally_tx_set_input_inflation_keys', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_inflation_keys_rangeproof = wrap('wally_tx_set_input_inflation_keys_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_issuance_amount = wrap('wally_tx_set_input_issuance_amount', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_issuance_amount_rangeproof = wrap('wally_tx_set_input_issuance_amount_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_script = wrap('wally_tx_set_input_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_sequence = wrap('wally_tx_set_input_sequence', [T.OpaqueRef, T.Int32, T.Int32]);
export const tx_set_input_txhash = wrap('wally_tx_set_input_txhash', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_input_witness = wrap('wally_tx_set_input_witness', [T.OpaqueRef, T.Int32, T.OpaqueRef]);
export const tx_set_output_asset = wrap('wally_tx_set_output_asset', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_output_nonce = wrap('wally_tx_set_output_nonce', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_output_rangeproof = wrap('wally_tx_set_output_rangeproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_output_satoshi = wrap('wally_tx_set_output_satoshi', [T.OpaqueRef, T.Int32, T.Int64]);
export const tx_set_output_script = wrap('wally_tx_set_output_script', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_output_surjectionproof = wrap('wally_tx_set_output_surjectionproof', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_set_output_value = wrap('wally_tx_set_output_value', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_to_hex = wrap('wally_tx_to_hex', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const tx_vsize_from_weight = wrap('wally_tx_vsize_from_weight', [T.Int32, T.DestPtr(T.Int32)]);
export const tx_witness_stack_add = wrap('wally_tx_witness_stack_add', [T.OpaqueRef, T.Bytes]);
export const tx_witness_stack_add_dummy = wrap('wally_tx_witness_stack_add_dummy', [T.OpaqueRef, T.Int32]);
export const tx_witness_stack_clone = wrap('wally_tx_witness_stack_clone_alloc', [T.OpaqueRef, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_witness_stack_free = wrap('wally_tx_witness_stack_free', [T.OpaqueRef]);
export const tx_witness_stack_from_bytes = wrap('wally_tx_witness_stack_from_bytes', [T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_witness_stack_get_length = wrap('wally_tx_witness_stack_get_length', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_witness_stack_get_num_items = wrap('wally_tx_witness_stack_get_num_items', [T.OpaqueRef, T.DestPtr(T.Int32)]);
export const tx_witness_stack_init = wrap('wally_tx_witness_stack_init_alloc', [T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const tx_witness_stack_set = wrap('wally_tx_witness_stack_set', [T.OpaqueRef, T.Int32, T.Bytes]);
export const tx_witness_stack_set_dummy = wrap('wally_tx_witness_stack_set_dummy', [T.OpaqueRef, T.Int32, T.Int32]);
export const varbuff_get_length = wrap('wally_varbuff_get_length', [T.Bytes, T.DestPtr(T.Int32)]);
export const varint_get_length = wrap('wally_varint_get_length', [T.Int64, T.DestPtr(T.Int32)]);
export const wif_from_bytes = wrap('wally_wif_from_bytes', [T.Bytes, T.Int32, T.Int32, T.DestPtrPtr(T.String)]);
export const wif_is_uncompressed = wrap('wally_wif_is_uncompressed', [T.String, T.DestPtr(T.Int32)]);
export const wif_to_address = wrap('wally_wif_to_address', [T.String, T.Int32, T.Int32, T.DestPtrPtr(T.String)]);
export const wif_to_bytes = wrap('wally_wif_to_bytes', [T.String, T.Int32, T.Int32, T.DestPtrSized(T.Bytes, C.EC_PRIVATE_KEY_LEN)]);
export const wif_to_public_key = wrap('wally_wif_to_public_key', [T.String, T.Int32, T.DestPtrVarLen(T.Bytes, wif_to_public_key_len, false)]);
export const witness_multisig_from_bytes = wrap('wally_witness_multisig_from_bytes', [T.Bytes, T.Bytes, T.Uint32Array, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const witness_p2tr_from_sig = wrap('wally_witness_p2tr_from_sig', [T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const witness_p2wpkh_from_der = wrap('wally_witness_p2wpkh_from_der', [T.Bytes, T.Bytes, T.DestPtrPtr(T.OpaqueRef)]);
export const witness_p2wpkh_from_sig = wrap('wally_witness_p2wpkh_from_sig', [T.Bytes, T.Bytes, T.Int32, T.DestPtrPtr(T.OpaqueRef)]);
export const witness_program_from_bytes = wrap('wally_witness_program_from_bytes', [T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_WITNESSSCRIPT_MAX_LEN, true)]);
export const witness_program_from_bytes_and_version = wrap('wally_witness_program_from_bytes_and_version', [T.Bytes, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, C.WALLY_WITNESSSCRIPT_MAX_LEN, true)]);
export const aes = wrap('wally_aes', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, aes_len, false)]);
export const aes_cbc = wrap('wally_aes_cbc', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, aes_cbc_get_maximum_length, true)]);
export const aes_cbc_with_ecdh_key = wrap('wally_aes_cbc_with_ecdh_key', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrVarLen(T.Bytes, aes_cbc_with_ecdh_key_get_maximum_length, true)]);
export const asset_pak_whitelistproof = wrap('wally_asset_pak_whitelistproof', [T.Bytes, T.Bytes, T.Int32, T.Bytes, T.Bytes, T.Bytes, T.DestPtrVarLen(T.Bytes, asset_pak_whitelistproof_len, false)]);
export const asset_surjectionproof = wrap('wally_asset_surjectionproof', [T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.Bytes, T.DestPtrVarLen(T.Bytes, asset_surjectionproof_len, false)]);
export const base58_n_to_bytes = wrap('wally_base58_n_to_bytes', [T.String, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, base58_n_to_bytes_len, true)]);
export const base58_to_bytes = wrap('wally_base58_to_bytes', [T.String, T.Int32, T.DestPtrVarLen(T.Bytes, base58_to_bytes_len, true)]);
export const base64_n_to_bytes = wrap('wally_base64_n_to_bytes', [T.String, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, base64_n_get_maximum_length, true)]);
export const base64_to_bytes = wrap('wally_base64_to_bytes', [T.String, T.Int32, T.DestPtrVarLen(T.Bytes, base64_get_maximum_length, true)]);
export const bip32_path_from_str = wrap('bip32_path_from_str', [T.String, T.Int32, T.Int32, T.Int32, T.DestPtrVarLen(T.Uint32Array, bip32_path_from_str_len, false)]);
export const bip32_path_from_str_n = wrap('bip32_path_from_str_n', [T.String, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrVarLen(T.Uint32Array, bip32_path_from_str_n_len, false)]);
export const descriptor_get_key_child_path_str = wrap('wally_descriptor_get_key_child_path_str', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_get_key_origin_path_str = wrap('wally_descriptor_get_key_origin_path_str', [T.OpaqueRef, T.Int32, T.DestPtrPtr(T.String)]);
export const descriptor_to_script = wrap('wally_descriptor_to_script', [T.OpaqueRef, T.Int32, T.Int32, T.Int32, T.Int32, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, descriptor_to_script_get_maximum_length, true)]);
export const ec_sig_from_bytes = wrap('wally_ec_sig_from_bytes', [T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, ec_sig_from_bytes_len, false)]);
export const ec_sig_from_bytes_aux = wrap('wally_ec_sig_from_bytes_aux', [T.Bytes, T.Bytes, T.Bytes, T.Int32, T.DestPtrSized(T.Bytes, ec_sig_from_bytes_aux_len, false)]);
export const keypath_get_path = wrap('wally_keypath_get_path', [T.Bytes, T.DestPtrVarLen(T.Uint32Array, keypath_get_path_len, false)]);
export const map_get_item = wrap('wally_map_get_item', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, map_get_item_length, false)]);
export const map_get_item_key = wrap('wally_map_get_item_key', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, map_get_item_key_length, false)]);
export const map_keypath_get_item_path = wrap('wally_map_keypath_get_item_path', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Uint32Array, map_keypath_get_item_path_len, false)]);
export const psbt_get_input_amount_rangeproof = wrap('wally_psbt_get_input_amount_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_amount_rangeproof_len, false)]);
export const psbt_get_input_asset = wrap('wally_psbt_get_input_asset', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_asset_len, false)]);
export const psbt_get_input_asset_surjectionproof = wrap('wally_psbt_get_input_asset_surjectionproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_asset_surjectionproof_len, false)]);
export const psbt_get_input_final_scriptsig = wrap('wally_psbt_get_input_final_scriptsig', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_final_scriptsig_len, false)]);
export const psbt_get_input_inflation_keys_blinding_rangeproof = wrap('wally_psbt_get_input_inflation_keys_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_inflation_keys_blinding_rangeproof_len, false)]);
export const psbt_get_input_inflation_keys_commitment = wrap('wally_psbt_get_input_inflation_keys_commitment', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_inflation_keys_commitment_len, false)]);
export const psbt_get_input_inflation_keys_rangeproof = wrap('wally_psbt_get_input_inflation_keys_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_inflation_keys_rangeproof_len, false)]);
export const psbt_get_input_issuance_amount_blinding_rangeproof = wrap('wally_psbt_get_input_issuance_amount_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_issuance_amount_blinding_rangeproof_len, false)]);
export const psbt_get_input_issuance_amount_commitment = wrap('wally_psbt_get_input_issuance_amount_commitment', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_issuance_amount_commitment_len, false)]);
export const psbt_get_input_issuance_amount_rangeproof = wrap('wally_psbt_get_input_issuance_amount_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_issuance_amount_rangeproof_len, false)]);
export const psbt_get_input_issuance_asset_entropy = wrap('wally_psbt_get_input_issuance_asset_entropy', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_issuance_asset_entropy_len, false)]);
export const psbt_get_input_issuance_blinding_nonce = wrap('wally_psbt_get_input_issuance_blinding_nonce', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_issuance_blinding_nonce_len, false)]);
export const psbt_get_input_keypath = wrap('wally_psbt_get_input_keypath', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_keypath_len, false)]);
export const psbt_get_input_pegin_claim_script = wrap('wally_psbt_get_input_pegin_claim_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_pegin_claim_script_len, false)]);
export const psbt_get_input_pegin_genesis_blockhash = wrap('wally_psbt_get_input_pegin_genesis_blockhash', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_pegin_genesis_blockhash_len, false)]);
export const psbt_get_input_pegin_txout_proof = wrap('wally_psbt_get_input_pegin_txout_proof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_pegin_txout_proof_len, false)]);
export const psbt_get_input_redeem_script = wrap('wally_psbt_get_input_redeem_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_redeem_script_len, false)]);
export const psbt_get_input_scriptcode = wrap('wally_psbt_get_input_scriptcode', [T.OpaqueRef, T.Int32, T.Bytes, T.DestPtrVarLen(T.Bytes, psbt_get_input_scriptcode_len, false)]);
export const psbt_get_input_signature = wrap('wally_psbt_get_input_signature', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_signature_len, false)]);
export const psbt_get_input_signing_script = wrap('wally_psbt_get_input_signing_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_signing_script_len, false)]);
export const psbt_get_input_taproot_internal_key = wrap('wally_psbt_get_input_taproot_internal_key', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_taproot_internal_key_len, false)]);
export const psbt_get_input_taproot_signature = wrap('wally_psbt_get_input_taproot_signature', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_taproot_signature_len, false)]);
export const psbt_get_input_unknown = wrap('wally_psbt_get_input_unknown', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_unknown_len, false)]);
export const psbt_get_input_utxo_rangeproof = wrap('wally_psbt_get_input_utxo_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_utxo_rangeproof_len, false)]);
export const psbt_get_input_witness_script = wrap('wally_psbt_get_input_witness_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_input_witness_script_len, false)]);
export const psbt_get_output_asset = wrap('wally_psbt_get_output_asset', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_asset_len, false)]);
export const psbt_get_output_asset_blinding_surjectionproof = wrap('wally_psbt_get_output_asset_blinding_surjectionproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_asset_blinding_surjectionproof_len, false)]);
export const psbt_get_output_asset_commitment = wrap('wally_psbt_get_output_asset_commitment', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_asset_commitment_len, false)]);
export const psbt_get_output_asset_surjectionproof = wrap('wally_psbt_get_output_asset_surjectionproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_asset_surjectionproof_len, false)]);
export const psbt_get_output_blinding_public_key = wrap('wally_psbt_get_output_blinding_public_key', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_blinding_public_key_len, false)]);
export const psbt_get_output_ecdh_public_key = wrap('wally_psbt_get_output_ecdh_public_key', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_ecdh_public_key_len, false)]);
export const psbt_get_output_keypath = wrap('wally_psbt_get_output_keypath', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_keypath_len, false)]);
export const psbt_get_output_redeem_script = wrap('wally_psbt_get_output_redeem_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_redeem_script_len, false)]);
export const psbt_get_output_script = wrap('wally_psbt_get_output_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_script_len, false)]);
export const psbt_get_output_taproot_internal_key = wrap('wally_psbt_get_output_taproot_internal_key', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_taproot_internal_key_len, false)]);
export const psbt_get_output_unknown = wrap('wally_psbt_get_output_unknown', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_unknown_len, false)]);
export const psbt_get_output_value_blinding_rangeproof = wrap('wally_psbt_get_output_value_blinding_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_value_blinding_rangeproof_len, false)]);
export const psbt_get_output_value_commitment = wrap('wally_psbt_get_output_value_commitment', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_value_commitment_len, false)]);
export const psbt_get_output_value_rangeproof = wrap('wally_psbt_get_output_value_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_value_rangeproof_len, false)]);
export const psbt_get_output_witness_script = wrap('wally_psbt_get_output_witness_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_output_witness_script_len, false)]);
export const psbt_input_get_amount_rangeproof = wrap('wally_psbt_input_get_amount_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_amount_rangeproof_len, false)]);
export const psbt_input_get_asset = wrap('wally_psbt_input_get_asset', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_asset_len, false)]);
export const psbt_input_get_asset_surjectionproof = wrap('wally_psbt_input_get_asset_surjectionproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_asset_surjectionproof_len, false)]);
export const psbt_input_get_inflation_keys_blinding_rangeproof = wrap('wally_psbt_input_get_inflation_keys_blinding_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_inflation_keys_blinding_rangeproof_len, false)]);
export const psbt_input_get_inflation_keys_commitment = wrap('wally_psbt_input_get_inflation_keys_commitment', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_inflation_keys_commitment_len, false)]);
export const psbt_input_get_inflation_keys_rangeproof = wrap('wally_psbt_input_get_inflation_keys_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_inflation_keys_rangeproof_len, false)]);
export const psbt_input_get_issuance_amount_blinding_rangeproof = wrap('wally_psbt_input_get_issuance_amount_blinding_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_issuance_amount_blinding_rangeproof_len, false)]);
export const psbt_input_get_issuance_amount_commitment = wrap('wally_psbt_input_get_issuance_amount_commitment', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_issuance_amount_commitment_len, false)]);
export const psbt_input_get_issuance_amount_rangeproof = wrap('wally_psbt_input_get_issuance_amount_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_issuance_amount_rangeproof_len, false)]);
export const psbt_input_get_issuance_asset_entropy = wrap('wally_psbt_input_get_issuance_asset_entropy', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_issuance_asset_entropy_len, false)]);
export const psbt_input_get_issuance_blinding_nonce = wrap('wally_psbt_input_get_issuance_blinding_nonce', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_issuance_blinding_nonce_len, false)]);
export const psbt_input_get_pegin_claim_script = wrap('wally_psbt_input_get_pegin_claim_script', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_pegin_claim_script_len, false)]);
export const psbt_input_get_pegin_genesis_blockhash = wrap('wally_psbt_input_get_pegin_genesis_blockhash', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_pegin_genesis_blockhash_len, false)]);
export const psbt_input_get_pegin_txout_proof = wrap('wally_psbt_input_get_pegin_txout_proof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_pegin_txout_proof_len, false)]);
export const psbt_input_get_utxo_rangeproof = wrap('wally_psbt_input_get_utxo_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_input_get_utxo_rangeproof_len, false)]);
export const psbt_output_get_asset = wrap('wally_psbt_output_get_asset', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_asset_len, false)]);
export const psbt_output_get_asset_blinding_surjectionproof = wrap('wally_psbt_output_get_asset_blinding_surjectionproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_asset_blinding_surjectionproof_len, false)]);
export const psbt_output_get_asset_commitment = wrap('wally_psbt_output_get_asset_commitment', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_asset_commitment_len, false)]);
export const psbt_output_get_asset_surjectionproof = wrap('wally_psbt_output_get_asset_surjectionproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_asset_surjectionproof_len, false)]);
export const psbt_output_get_blinding_public_key = wrap('wally_psbt_output_get_blinding_public_key', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_blinding_public_key_len, false)]);
export const psbt_output_get_ecdh_public_key = wrap('wally_psbt_output_get_ecdh_public_key', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_ecdh_public_key_len, false)]);
export const psbt_output_get_value_blinding_rangeproof = wrap('wally_psbt_output_get_value_blinding_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_value_blinding_rangeproof_len, false)]);
export const psbt_output_get_value_commitment = wrap('wally_psbt_output_get_value_commitment', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_value_commitment_len, false)]);
export const psbt_output_get_value_rangeproof = wrap('wally_psbt_output_get_value_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, psbt_output_get_value_rangeproof_len, false)]);
export const psbt_to_bytes = wrap('wally_psbt_to_bytes', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, psbt_get_length, false)]);
export const tx_get_input_inflation_keys = wrap('wally_tx_get_input_inflation_keys', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_inflation_keys_len, false)]);
export const tx_get_input_inflation_keys_rangeproof = wrap('wally_tx_get_input_inflation_keys_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_inflation_keys_rangeproof_len, false)]);
export const tx_get_input_issuance_amount = wrap('wally_tx_get_input_issuance_amount', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_issuance_amount_len, false)]);
export const tx_get_input_issuance_amount_rangeproof = wrap('wally_tx_get_input_issuance_amount_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_issuance_amount_rangeproof_len, false)]);
export const tx_get_input_script = wrap('wally_tx_get_input_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_script_len, false)]);
export const tx_get_input_witness = wrap('wally_tx_get_input_witness', [T.OpaqueRef, T.Int32, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_input_witness_len, false)]);
export const tx_get_output_rangeproof = wrap('wally_tx_get_output_rangeproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_output_rangeproof_len, false)]);
export const tx_get_output_script = wrap('wally_tx_get_output_script', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_output_script_len, false)]);
export const tx_get_output_surjectionproof = wrap('wally_tx_get_output_surjectionproof', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_output_surjectionproof_len, false)]);
export const tx_get_output_value = wrap('wally_tx_get_output_value', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_output_value_len, false)]);
export const tx_input_get_inflation_keys = wrap('wally_tx_input_get_inflation_keys', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_input_get_inflation_keys_len, false)]);
export const tx_input_get_inflation_keys_rangeproof = wrap('wally_tx_input_get_inflation_keys_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_input_get_inflation_keys_rangeproof_len, false)]);
export const tx_input_get_issuance_amount = wrap('wally_tx_input_get_issuance_amount', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_input_get_issuance_amount_len, false)]);
export const tx_input_get_issuance_amount_rangeproof = wrap('wally_tx_input_get_issuance_amount_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_input_get_issuance_amount_rangeproof_len, false)]);
export const tx_input_get_script = wrap('wally_tx_input_get_script', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_input_get_script_len, false)]);
export const tx_input_get_witness = wrap('wally_tx_input_get_witness', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_input_get_witness_len, false)]);
export const tx_output_get_asset = wrap('wally_tx_output_get_asset', [T.OpaqueRef, T.DestPtrSized(T.Bytes, tx_output_get_asset_len, false)]);
export const tx_output_get_nonce = wrap('wally_tx_output_get_nonce', [T.OpaqueRef, T.DestPtrSized(T.Bytes, tx_output_get_nonce_len, false)]);
export const tx_output_get_rangeproof = wrap('wally_tx_output_get_rangeproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_output_get_rangeproof_len, false)]);
export const tx_output_get_script = wrap('wally_tx_output_get_script', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_output_get_script_len, false)]);
export const tx_output_get_surjectionproof = wrap('wally_tx_output_get_surjectionproof', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_output_get_surjectionproof_len, false)]);
export const tx_output_get_value = wrap('wally_tx_output_get_value', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_output_get_value_len, false)]);
export const tx_to_bytes = wrap('wally_tx_to_bytes', [T.OpaqueRef, T.Int32, T.DestPtrVarLen(T.Bytes, tx_get_length, false)]);
export const tx_witness_stack_to_bytes = wrap('wally_tx_witness_stack_to_bytes', [T.OpaqueRef, T.DestPtrVarLen(T.Bytes, tx_witness_stack_get_length, false)]);
export const varbuff_to_bytes = wrap('wally_varbuff_to_bytes', [T.Bytes, T.DestPtrVarLen(T.Bytes, varbuff_get_length, false)]);
export const varint_to_bytes = wrap('wally_varint_to_bytes', [T.Int64, T.DestPtrVarLen(T.Bytes, varint_get_length, false)]);
// END AUTOGENERATED
