"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
exports.supportsScriptType = supportsScriptType;
exports.createOpReturnScript = createOpReturnScript;
exports.p2shP2pkOutputScript = p2shP2pkOutputScript;
const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
var RootWalletKeys_js_1 = require("./RootWalletKeys.js");
Object.defineProperty(exports, "RootWalletKeys", { enumerable: true, get: function () { return RootWalletKeys_js_1.RootWalletKeys; } });
var ReplayProtection_js_1 = require("./ReplayProtection.js");
Object.defineProperty(exports, "ReplayProtection", { enumerable: true, get: function () { return ReplayProtection_js_1.ReplayProtection; } });
var address_js_1 = require("./address.js");
Object.defineProperty(exports, "outputScript", { enumerable: true, get: function () { return address_js_1.outputScript; } });
Object.defineProperty(exports, "address", { enumerable: true, get: function () { return address_js_1.address; } });
var Dimensions_js_1 = require("./Dimensions.js");
Object.defineProperty(exports, "Dimensions", { enumerable: true, get: function () { return Dimensions_js_1.Dimensions; } });
var scriptType_js_1 = require("./scriptType.js");
Object.defineProperty(exports, "outputScriptTypes", { enumerable: true, get: function () { return scriptType_js_1.outputScriptTypes; } });
Object.defineProperty(exports, "inputScriptTypes", { enumerable: true, get: function () { return scriptType_js_1.inputScriptTypes; } });
var chains_js_1 = require("./chains.js");
Object.defineProperty(exports, "ChainCode", { enumerable: true, get: function () { return chains_js_1.ChainCode; } });
Object.defineProperty(exports, "chainCodes", { enumerable: true, get: function () { return chains_js_1.chainCodes; } });
Object.defineProperty(exports, "assertChainCode", { enumerable: true, get: function () { return chains_js_1.assertChainCode; } });
// Bitcoin-like PSBT (for all non-Zcash networks)
var BitGoPsbt_js_1 = require("./BitGoPsbt.js");
Object.defineProperty(exports, "BitGoPsbt", { enumerable: true, get: function () { return BitGoPsbt_js_1.BitGoPsbt; } });
Object.defineProperty(exports, "getWalletKeysFromPsbt", { enumerable: true, get: function () { return BitGoPsbt_js_1.getWalletKeysFromPsbt; } });
var BitGoKeySubtype_js_1 = require("./BitGoKeySubtype.js");
Object.defineProperty(exports, "BitGoKeySubtype", { enumerable: true, get: function () { return BitGoKeySubtype_js_1.BitGoKeySubtype; } });
// Zcash-specific PSBT subclass
var ZcashBitGoPsbt_js_1 = require("./ZcashBitGoPsbt.js");
Object.defineProperty(exports, "ZcashBitGoPsbt", { enumerable: true, get: function () { return ZcashBitGoPsbt_js_1.ZcashBitGoPsbt; } });
/**
 * Check if a network supports a given fixed-script wallet script type
 *
 * @param coin - Coin name (e.g., "btc", "ltc", "doge")
 * @param scriptType - Output script type or input script type to check
 * @returns `true` if the network supports the script type, `false` otherwise
 *
 * @example
 * ```typescript
 * // Bitcoin supports all script types
 * supportsScriptType("btc", "p2tr"); // true
 *
 * // Litecoin supports segwit but not taproot
 * supportsScriptType("ltc", "p2wsh"); // true
 * supportsScriptType("ltc", "p2tr"); // false
 *
 * // Dogecoin only supports legacy scripts
 * supportsScriptType("doge", "p2sh"); // true
 * supportsScriptType("doge", "p2wsh"); // false
 *
 * // Also works with input script types
 * supportsScriptType("btc", "p2trMusig2KeyPath"); // true
 * supportsScriptType("doge", "p2trLegacy"); // false
 * ```
 */
function supportsScriptType(coin, scriptType) {
    return wasm_utxo_js_1.FixedScriptWalletNamespace.supports_script_type(coin, scriptType);
}
/**
 * Create an OP_RETURN output script with optional data
 *
 * @param data - Optional data bytes to include in the OP_RETURN script
 * @returns The OP_RETURN script as a Uint8Array
 *
 * @example
 * ```typescript
 * // Empty OP_RETURN
 * const script = createOpReturnScript();
 *
 * // OP_RETURN with data
 * const data = new Uint8Array([1, 2, 3, 4]);
 * const script = createOpReturnScript(data);
 * ```
 */
function createOpReturnScript(data) {
    return wasm_utxo_js_1.FixedScriptWalletNamespace.create_op_return_script(data);
}
/**
 * Get the P2SH-P2PK output script for a compressed public key
 *
 * @param pubkey - The compressed public key bytes (33 bytes)
 * @returns The P2SH-P2PK output script as a Uint8Array
 */
function p2shP2pkOutputScript(pubkey) {
    return wasm_utxo_js_1.FixedScriptWalletNamespace.p2sh_p2pk_output_script(pubkey);
}
