content: // This file is automatically generated, so please do not edit it.
  // @generated by `flutter_rust_bridge`@ 2.9.0.
  
  // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
  
  import 'api/btc_ln.dart';
  import 'api/chain_swap.dart';
  import 'api/error.dart';
  import 'api/fees.dart';
  import 'api/lbtc_ln.dart';
  import 'api/lnurl.dart';
  import 'api/types.dart';
  import 'dart:async';
  import 'dart:convert';
  import 'dart:ffi' as ffi;
  import 'frb_generated.dart';
  import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart';
  
  abstract class BoltzCoreApiImplPlatform extends BaseApiImpl<BoltzCoreWire> {
    BoltzCoreApiImplPlatform({
      required super.handler,
      required super.wire,
      required super.generalizedFrbRustBinding,
      required super.portManager,
    });
  
    @protected
    String dco_decode_String(dynamic raw);
  
    @protected
    BoltzError dco_decode_boltz_error(dynamic raw);
  
    @protected
    bool dco_decode_bool(dynamic raw);
  
    @protected
    BoltzError dco_decode_box_autoadd_boltz_error(dynamic raw);
  
    @protected
    BtcLnSwap dco_decode_box_autoadd_btc_ln_swap(dynamic raw);
  
    @protected
    BtcSwapScriptStr dco_decode_box_autoadd_btc_swap_script_str(dynamic raw);
  
    @protected
    ChainSwap dco_decode_box_autoadd_chain_swap(dynamic raw);
  
    @protected
    Fees dco_decode_box_autoadd_fees(dynamic raw);
  
    @protected
    KeyPair dco_decode_box_autoadd_key_pair(dynamic raw);
  
    @protected
    LBtcSwapScriptStr dco_decode_box_autoadd_l_btc_swap_script_str(dynamic raw);
  
    @protected
    LbtcLnSwap dco_decode_box_autoadd_lbtc_ln_swap(dynamic raw);
  
    @protected
    Lnurl dco_decode_box_autoadd_lnurl(dynamic raw);
  
    @protected
    PreImage dco_decode_box_autoadd_pre_image(dynamic raw);
  
    @protected
    Side dco_decode_box_autoadd_side(dynamic raw);
  
    @protected
    TxFee dco_decode_box_autoadd_tx_fee(dynamic raw);
  
    @protected
    BtcLnSwap dco_decode_btc_ln_swap(dynamic raw);
  
    @protected
    BtcSwapScriptStr dco_decode_btc_swap_script_str(dynamic raw);
  
    @protected
    Chain dco_decode_chain(dynamic raw);
  
    @protected
    ChainFeesAndLimits dco_decode_chain_fees_and_limits(dynamic raw);
  
    @protected
    ChainSwap dco_decode_chain_swap(dynamic raw);
  
    @protected
    ChainSwapDirection dco_decode_chain_swap_direction(dynamic raw);
  
    @protected
    ChainSwapFees dco_decode_chain_swap_fees(dynamic raw);
  
    @protected
    DecodedInvoice dco_decode_decoded_invoice(dynamic raw);
  
    @protected
    double dco_decode_f_64(dynamic raw);
  
    @protected
    Fees dco_decode_fees(dynamic raw);
  
    @protected
    int dco_decode_i_32(dynamic raw);
  
    @protected
    KeyPair dco_decode_key_pair(dynamic raw);
  
    @protected
    LBtcSwapScriptStr dco_decode_l_btc_swap_script_str(dynamic raw);
  
    @protected
    LbtcLnSwap dco_decode_lbtc_ln_swap(dynamic raw);
  
    @protected
    Uint8List dco_decode_list_prim_u_8_strict(dynamic raw);
  
    @protected
    Lnurl dco_decode_lnurl(dynamic raw);
  
    @protected
    MinerFees dco_decode_miner_fees(dynamic raw);
  
    @protected
    String? dco_decode_opt_String(dynamic raw);
  
    @protected
    Side? dco_decode_opt_box_autoadd_side(dynamic raw);
  
    @protected
    PreImage dco_decode_pre_image(dynamic raw);
  
    @protected
    RevSwapFees dco_decode_rev_swap_fees(dynamic raw);
  
    @protected
    ReverseFeesAndLimits dco_decode_reverse_fees_and_limits(dynamic raw);
  
    @protected
    Side dco_decode_side(dynamic raw);
  
    @protected
    SubSwapFees dco_decode_sub_swap_fees(dynamic raw);
  
    @protected
    SubmarineFeesAndLimits dco_decode_submarine_fees_and_limits(dynamic raw);
  
    @protected
    SwapLimits dco_decode_swap_limits(dynamic raw);
  
    @protected
    SwapTxKind dco_decode_swap_tx_kind(dynamic raw);
  
    @protected
    SwapType dco_decode_swap_type(dynamic raw);
  
    @protected
    TxFee dco_decode_tx_fee(dynamic raw);
  
    @protected
    int dco_decode_u_32(dynamic raw);
  
    @protected
    BigInt dco_decode_u_64(dynamic raw);
  
    @protected
    int dco_decode_u_8(dynamic raw);
  
    @protected
    void dco_decode_unit(dynamic raw);
  
    @protected
    BigInt dco_decode_usize(dynamic raw);
  
    @protected
    String sse_decode_String(SseDeserializer deserializer);
  
    @protected
    BoltzError sse_decode_boltz_error(SseDeserializer deserializer);
  
    @protected
    bool sse_decode_bool(SseDeserializer deserializer);
  
    @protected
    BoltzError sse_decode_box_autoadd_boltz_error(SseDeserializer deserializer);
  
    @protected
    BtcLnSwap sse_decode_box_autoadd_btc_ln_swap(SseDeserializer deserializer);
  
    @protected
    BtcSwapScriptStr sse_decode_box_autoadd_btc_swap_script_str(
        SseDeserializer deserializer);
  
    @protected
    ChainSwap sse_decode_box_autoadd_chain_swap(SseDeserializer deserializer);
  
    @protected
    Fees sse_decode_box_autoadd_fees(SseDeserializer deserializer);
  
    @protected
    KeyPair sse_decode_box_autoadd_key_pair(SseDeserializer deserializer);
  
    @protected
    LBtcSwapScriptStr sse_decode_box_autoadd_l_btc_swap_script_str(
        SseDeserializer deserializer);
  
    @protected
    LbtcLnSwap sse_decode_box_autoadd_lbtc_ln_swap(SseDeserializer deserializer);
  
    @protected
    Lnurl sse_decode_box_autoadd_lnurl(SseDeserializer deserializer);
  
    @protected
    PreImage sse_decode_box_autoadd_pre_image(SseDeserializer deserializer);
  
    @protected
    Side sse_decode_box_autoadd_side(SseDeserializer deserializer);
  
    @protected
    TxFee sse_decode_box_autoadd_tx_fee(SseDeserializer deserializer);
  
    @protected
    BtcLnSwap sse_decode_btc_ln_swap(SseDeserializer deserializer);
  
    @protected
    BtcSwapScriptStr sse_decode_btc_swap_script_str(SseDeserializer deserializer);
  
    @protected
    Chain sse_decode_chain(SseDeserializer deserializer);
  
    @protected
    ChainFeesAndLimits sse_decode_chain_fees_and_limits(
        SseDeserializer deserializer);
  
    @protected
    ChainSwap sse_decode_chain_swap(SseDeserializer deserializer);
  
    @protected
    ChainSwapDirection sse_decode_chain_swap_direction(
        SseDeserializer deserializer);
  
    @protected
    ChainSwapFees sse_decode_chain_swap_fees(SseDeserializer deserializer);
  
    @protected
    DecodedInvoice sse_decode_decoded_invoice(SseDeserializer deserializer);
  
    @protected
    double sse_decode_f_64(SseDeserializer deserializer);
  
    @protected
    Fees sse_decode_fees(SseDeserializer deserializer);
  
    @protected
    int sse_decode_i_32(SseDeserializer deserializer);
  
    @protected
    KeyPair sse_decode_key_pair(SseDeserializer deserializer);
  
    @protected
    LBtcSwapScriptStr sse_decode_l_btc_swap_script_str(
        SseDeserializer deserializer);
  
    @protected
    LbtcLnSwap sse_decode_lbtc_ln_swap(SseDeserializer deserializer);
  
    @protected
    Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer);
  
    @protected
    Lnurl sse_decode_lnurl(SseDeserializer deserializer);
  
    @protected
    MinerFees sse_decode_miner_fees(SseDeserializer deserializer);
  
    @protected
    String? sse_decode_opt_String(SseDeserializer deserializer);
  
    @protected
    Side? sse_decode_opt_box_autoadd_side(SseDeserializer deserializer);
  
    @protected
    PreImage sse_decode_pre_image(SseDeserializer deserializer);
  
    @protected
    RevSwapFees sse_decode_rev_swap_fees(SseDeserializer deserializer);
  
    @protected
    ReverseFeesAndLimits sse_decode_reverse_fees_and_limits(
        SseDeserializer deserializer);
  
    @protected
    Side sse_decode_side(SseDeserializer deserializer);
  
    @protected
    SubSwapFees sse_decode_sub_swap_fees(SseDeserializer deserializer);
  
    @protected
    SubmarineFeesAndLimits sse_decode_submarine_fees_and_limits(
        SseDeserializer deserializer);
  
    @protected
    SwapLimits sse_decode_swap_limits(SseDeserializer deserializer);
  
    @protected
    SwapTxKind sse_decode_swap_tx_kind(SseDeserializer deserializer);
  
    @protected
    SwapType sse_decode_swap_type(SseDeserializer deserializer);
  
    @protected
    TxFee sse_decode_tx_fee(SseDeserializer deserializer);
  
    @protected
    int sse_decode_u_32(SseDeserializer deserializer);
  
    @protected
    BigInt sse_decode_u_64(SseDeserializer deserializer);
  
    @protected
    int sse_decode_u_8(SseDeserializer deserializer);
  
    @protected
    void sse_decode_unit(SseDeserializer deserializer);
  
    @protected
    BigInt sse_decode_usize(SseDeserializer deserializer);
  
    @protected
    ffi.Pointer<wire_cst_list_prim_u_8_strict> cst_encode_String(String raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return cst_encode_list_prim_u_8_strict(utf8.encoder.convert(raw));
    }
  
    @protected
    ffi.Pointer<wire_cst_boltz_error> cst_encode_box_autoadd_boltz_error(
        BoltzError raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_boltz_error();
      cst_api_fill_to_wire_boltz_error(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_btc_ln_swap> cst_encode_box_autoadd_btc_ln_swap(
        BtcLnSwap raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_btc_ln_swap();
      cst_api_fill_to_wire_btc_ln_swap(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_btc_swap_script_str>
        cst_encode_box_autoadd_btc_swap_script_str(BtcSwapScriptStr raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_btc_swap_script_str();
      cst_api_fill_to_wire_btc_swap_script_str(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_chain_swap> cst_encode_box_autoadd_chain_swap(
        ChainSwap raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_chain_swap();
      cst_api_fill_to_wire_chain_swap(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_fees> cst_encode_box_autoadd_fees(Fees raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_fees();
      cst_api_fill_to_wire_fees(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_key_pair> cst_encode_box_autoadd_key_pair(KeyPair raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_key_pair();
      cst_api_fill_to_wire_key_pair(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_l_btc_swap_script_str>
        cst_encode_box_autoadd_l_btc_swap_script_str(LBtcSwapScriptStr raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_l_btc_swap_script_str();
      cst_api_fill_to_wire_l_btc_swap_script_str(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_lbtc_ln_swap> cst_encode_box_autoadd_lbtc_ln_swap(
        LbtcLnSwap raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_lbtc_ln_swap();
      cst_api_fill_to_wire_lbtc_ln_swap(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_lnurl> cst_encode_box_autoadd_lnurl(Lnurl raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_lnurl();
      cst_api_fill_to_wire_lnurl(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_pre_image> cst_encode_box_autoadd_pre_image(
        PreImage raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_pre_image();
      cst_api_fill_to_wire_pre_image(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<ffi.Int32> cst_encode_box_autoadd_side(Side raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return wire.cst_new_box_autoadd_side(cst_encode_side(raw));
    }
  
    @protected
    ffi.Pointer<wire_cst_tx_fee> cst_encode_box_autoadd_tx_fee(TxFee raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ptr = wire.cst_new_box_autoadd_tx_fee();
      cst_api_fill_to_wire_tx_fee(raw, ptr.ref);
      return ptr;
    }
  
    @protected
    ffi.Pointer<wire_cst_list_prim_u_8_strict> cst_encode_list_prim_u_8_strict(
        Uint8List raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      final ans = wire.cst_new_list_prim_u_8_strict(raw.length);
      ans.ref.ptr.asTypedList(raw.length).setAll(0, raw);
      return ans;
    }
  
    @protected
    ffi.Pointer<wire_cst_list_prim_u_8_strict> cst_encode_opt_String(
        String? raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return raw == null ? ffi.nullptr : cst_encode_String(raw);
    }
  
    @protected
    ffi.Pointer<ffi.Int32> cst_encode_opt_box_autoadd_side(Side? raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return raw == null ? ffi.nullptr : cst_encode_box_autoadd_side(raw);
    }
  
    @protected
    int cst_encode_u_64(BigInt raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return raw.toSigned(64).toInt();
    }
  
    @protected
    int cst_encode_usize(BigInt raw) {
      // Codec=Cst (C-struct based), see doc to use other codecs
      return raw.toSigned(64).toInt();
    }
  
    @protected
    void cst_api_fill_to_wire_boltz_error(
        BoltzError apiObj, wire_cst_boltz_error wireObj) {
      wireObj.kind = cst_encode_String(apiObj.kind);
      wireObj.message = cst_encode_String(apiObj.message);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_boltz_error(
        BoltzError apiObj, ffi.Pointer<wire_cst_boltz_error> wireObj) {
      cst_api_fill_to_wire_boltz_error(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_btc_ln_swap(
        BtcLnSwap apiObj, ffi.Pointer<wire_cst_btc_ln_swap> wireObj) {
      cst_api_fill_to_wire_btc_ln_swap(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_btc_swap_script_str(
        BtcSwapScriptStr apiObj,
        ffi.Pointer<wire_cst_btc_swap_script_str> wireObj) {
      cst_api_fill_to_wire_btc_swap_script_str(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_chain_swap(
        ChainSwap apiObj, ffi.Pointer<wire_cst_chain_swap> wireObj) {
      cst_api_fill_to_wire_chain_swap(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_fees(
        Fees apiObj, ffi.Pointer<wire_cst_fees> wireObj) {
      cst_api_fill_to_wire_fees(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_key_pair(
        KeyPair apiObj, ffi.Pointer<wire_cst_key_pair> wireObj) {
      cst_api_fill_to_wire_key_pair(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_l_btc_swap_script_str(
        LBtcSwapScriptStr apiObj,
        ffi.Pointer<wire_cst_l_btc_swap_script_str> wireObj) {
      cst_api_fill_to_wire_l_btc_swap_script_str(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_lbtc_ln_swap(
        LbtcLnSwap apiObj, ffi.Pointer<wire_cst_lbtc_ln_swap> wireObj) {
      cst_api_fill_to_wire_lbtc_ln_swap(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_lnurl(
        Lnurl apiObj, ffi.Pointer<wire_cst_lnurl> wireObj) {
      cst_api_fill_to_wire_lnurl(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_pre_image(
        PreImage apiObj, ffi.Pointer<wire_cst_pre_image> wireObj) {
      cst_api_fill_to_wire_pre_image(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_box_autoadd_tx_fee(
        TxFee apiObj, ffi.Pointer<wire_cst_tx_fee> wireObj) {
      cst_api_fill_to_wire_tx_fee(apiObj, wireObj.ref);
    }
  
    @protected
    void cst_api_fill_to_wire_btc_ln_swap(
        BtcLnSwap apiObj, wire_cst_btc_ln_swap wireObj) {
      wireObj.id = cst_encode_String(apiObj.id);
      wireObj.kind = cst_encode_swap_type(apiObj.kind);
      wireObj.network = cst_encode_chain(apiObj.network);
      cst_api_fill_to_wire_key_pair(apiObj.keys, wireObj.keys);
      wireObj.key_index = cst_encode_u_64(apiObj.keyIndex);
      cst_api_fill_to_wire_pre_image(apiObj.preimage, wireObj.preimage);
      cst_api_fill_to_wire_btc_swap_script_str(
          apiObj.swapScript, wireObj.swap_script);
      wireObj.invoice = cst_encode_String(apiObj.invoice);
      wireObj.script_address = cst_encode_String(apiObj.scriptAddress);
      wireObj.out_amount = cst_encode_u_64(apiObj.outAmount);
      wireObj.electrum_url = cst_encode_String(apiObj.electrumUrl);
      wireObj.boltz_url = cst_encode_String(apiObj.boltzUrl);
      wireObj.referral_id = cst_encode_opt_String(apiObj.referralId);
    }
  
    @protected
    void cst_api_fill_to_wire_btc_swap_script_str(
        BtcSwapScriptStr apiObj, wire_cst_btc_swap_script_str wireObj) {
      wireObj.swap_type = cst_encode_swap_type(apiObj.swapType);
      wireObj.funding_addrs = cst_encode_opt_String(apiObj.fundingAddrs);
      wireObj.hashlock = cst_encode_String(apiObj.hashlock);
      wireObj.receiver_pubkey = cst_encode_String(apiObj.receiverPubkey);
      wireObj.locktime = cst_encode_u_32(apiObj.locktime);
      wireObj.sender_pubkey = cst_encode_String(apiObj.senderPubkey);
      wireObj.side = cst_encode_opt_box_autoadd_side(apiObj.side);
    }
  
    @protected
    void cst_api_fill_to_wire_chain_fees_and_limits(
        ChainFeesAndLimits apiObj, wire_cst_chain_fees_and_limits wireObj) {
      cst_api_fill_to_wire_swap_limits(apiObj.btcLimits, wireObj.btc_limits);
      cst_api_fill_to_wire_swap_limits(apiObj.lbtcLimits, wireObj.lbtc_limits);
      cst_api_fill_to_wire_chain_swap_fees(apiObj.btcFees, wireObj.btc_fees);
      cst_api_fill_to_wire_chain_swap_fees(apiObj.lbtcFees, wireObj.lbtc_fees);
    }
  
    @protected
    void cst_api_fill_to_wire_chain_swap(
        ChainSwap apiObj, wire_cst_chain_swap wireObj) {
      wireObj.id = cst_encode_String(apiObj.id);
      wireObj.is_testnet = cst_encode_bool(apiObj.isTestnet);
      wireObj.direction = cst_encode_chain_swap_direction(apiObj.direction);
      cst_api_fill_to_wire_key_pair(apiObj.refundKeys, wireObj.refund_keys);
      wireObj.refund_index = cst_encode_u_64(apiObj.refundIndex);
      cst_api_fill_to_wire_key_pair(apiObj.claimKeys, wireObj.claim_keys);
      wireObj.claim_index = cst_encode_u_64(apiObj.claimIndex);
      cst_api_fill_to_wire_pre_image(apiObj.preimage, wireObj.preimage);
      cst_api_fill_to_wire_btc_swap_script_str(
          apiObj.btcScriptStr, wireObj.btc_script_str);
      cst_api_fill_to_wire_l_btc_swap_script_str(
          apiObj.lbtcScriptStr, wireObj.lbtc_script_str);
      wireObj.script_address = cst_encode_String(apiObj.scriptAddress);
      wireObj.out_amount = cst_encode_u_64(apiObj.outAmount);
      wireObj.btc_electrum_url = cst_encode_String(apiObj.btcElectrumUrl);
      wireObj.lbtc_electrum_url = cst_encode_String(apiObj.lbtcElectrumUrl);
      wireObj.boltz_url = cst_encode_String(apiObj.boltzUrl);
      wireObj.referral_id = cst_encode_opt_String(apiObj.referralId);
      wireObj.blinding_key = cst_encode_String(apiObj.blindingKey);
    }
  
    @protected
    void cst_api_fill_to_wire_chain_swap_fees(
        ChainSwapFees apiObj, wire_cst_chain_swap_fees wireObj) {
      wireObj.percentage = cst_encode_f_64(apiObj.percentage);
      wireObj.user_lockup = cst_encode_u_64(apiObj.userLockup);
      wireObj.user_claim = cst_encode_u_64(apiObj.userClaim);
      wireObj.server = cst_encode_u_64(apiObj.server);
    }
  
    @protected
    void cst_api_fill_to_wire_decoded_invoice(
        DecodedInvoice apiObj, wire_cst_decoded_invoice wireObj) {
      wireObj.msats = cst_encode_u_64(apiObj.msats);
      wireObj.expiry = cst_encode_u_64(apiObj.expiry);
      wireObj.expires_in = cst_encode_u_64(apiObj.expiresIn);
      wireObj.expires_at = cst_encode_u_64(apiObj.expiresAt);
      wireObj.is_expired = cst_encode_bool(apiObj.isExpired);
      wireObj.network = cst_encode_String(apiObj.network);
      wireObj.cltv_exp_delta = cst_encode_u_64(apiObj.cltvExpDelta);
      wireObj.bip21 = cst_encode_opt_String(apiObj.bip21);
      wireObj.preimage_hash = cst_encode_String(apiObj.preimageHash);
      wireObj.description = cst_encode_String(apiObj.description);
    }
  
    @protected
    void cst_api_fill_to_wire_fees(Fees apiObj, wire_cst_fees wireObj) {
      wireObj.boltz_url = cst_encode_String(apiObj.boltzUrl);
    }
  
    @protected
    void cst_api_fill_to_wire_key_pair(
        KeyPair apiObj, wire_cst_key_pair wireObj) {
      wireObj.secret_key = cst_encode_String(apiObj.secretKey);
      wireObj.public_key = cst_encode_String(apiObj.publicKey);
    }
  
    @protected
    void cst_api_fill_to_wire_l_btc_swap_script_str(
        LBtcSwapScriptStr apiObj, wire_cst_l_btc_swap_script_str wireObj) {
      wireObj.swap_type = cst_encode_swap_type(apiObj.swapType);
      wireObj.funding_addrs = cst_encode_opt_String(apiObj.fundingAddrs);
      wireObj.hashlock = cst_encode_String(apiObj.hashlock);
      wireObj.receiver_pubkey = cst_encode_String(apiObj.receiverPubkey);
      wireObj.locktime = cst_encode_u_32(apiObj.locktime);
      wireObj.sender_pubkey = cst_encode_String(apiObj.senderPubkey);
      wireObj.blinding_key = cst_encode_String(apiObj.blindingKey);
      wireObj.side = cst_encode_opt_box_autoadd_side(apiObj.side);
    }
  
    @protected
    void cst_api_fill_to_wire_lbtc_ln_swap(
        LbtcLnSwap apiObj, wire_cst_lbtc_ln_swap wireObj) {
      wireObj.id = cst_encode_String(apiObj.id);
      wireObj.kind = cst_encode_swap_type(apiObj.kind);
      wireObj.network = cst_encode_chain(apiObj.network);
      cst_api_fill_to_wire_key_pair(apiObj.keys, wireObj.keys);
      wireObj.key_index = cst_encode_u_64(apiObj.keyIndex);
      cst_api_fill_to_wire_pre_image(apiObj.preimage, wireObj.preimage);
      cst_api_fill_to_wire_l_btc_swap_script_str(
          apiObj.swapScript, wireObj.swap_script);
      wireObj.invoice = cst_encode_String(apiObj.invoice);
      wireObj.out_amount = cst_encode_u_64(apiObj.outAmount);
      wireObj.script_address = cst_encode_String(apiObj.scriptAddress);
      wireObj.blinding_key = cst_encode_String(apiObj.blindingKey);
      wireObj.electrum_url = cst_encode_String(apiObj.electrumUrl);
      wireObj.boltz_url = cst_encode_String(apiObj.boltzUrl);
      wireObj.referral_id = cst_encode_opt_String(apiObj.referralId);
    }
  
    @protected
    void cst_api_fill_to_wire_lnurl(Lnurl apiObj, wire_cst_lnurl wireObj) {
      wireObj.value = cst_encode_String(apiObj.value);
    }
  
    @protected
    void cst_api_fill_to_wire_miner_fees(
        MinerFees apiObj, wire_cst_miner_fees wireObj) {
      wireObj.lockup = cst_encode_u_64(apiObj.lockup);
      wireObj.claim = cst_encode_u_64(apiObj.claim);
    }
  
    @protected
    void cst_api_fill_to_wire_pre_image(
        PreImage apiObj, wire_cst_pre_image wireObj) {
      wireObj.value = cst_encode_String(apiObj.value);
      wireObj.sha256 = cst_encode_String(apiObj.sha256);
      wireObj.hash160 = cst_encode_String(apiObj.hash160);
    }
  
    @protected
    void cst_api_fill_to_wire_rev_swap_fees(
        RevSwapFees apiObj, wire_cst_rev_swap_fees wireObj) {
      wireObj.percentage = cst_encode_f_64(apiObj.percentage);
      cst_api_fill_to_wire_miner_fees(apiObj.minerFees, wireObj.miner_fees);
    }
  
    @protected
    void cst_api_fill_to_wire_reverse_fees_and_limits(
        ReverseFeesAndLimits apiObj, wire_cst_reverse_fees_and_limits wireObj) {
      cst_api_fill_to_wire_swap_limits(apiObj.btcLimits, wireObj.btc_limits);
      cst_api_fill_to_wire_swap_limits(apiObj.lbtcLimits, wireObj.lbtc_limits);
      cst_api_fill_to_wire_rev_swap_fees(apiObj.btcFees, wireObj.btc_fees);
      cst_api_fill_to_wire_rev_swap_fees(apiObj.lbtcFees, wireObj.lbtc_fees);
    }
  
    @protected
    void cst_api_fill_to_wire_sub_swap_fees(
        SubSwapFees apiObj, wire_cst_sub_swap_fees wireObj) {
      wireObj.percentage = cst_encode_f_64(apiObj.percentage);
      wireObj.miner_fees = cst_encode_u_64(apiObj.minerFees);
    }
  
    @protected
    void cst_api_fill_to_wire_submarine_fees_and_limits(
        SubmarineFeesAndLimits apiObj,
        wire_cst_submarine_fees_and_limits wireObj) {
      cst_api_fill_to_wire_swap_limits(apiObj.btcLimits, wireObj.btc_limits);
      cst_api_fill_to_wire_swap_limits(apiObj.lbtcLimits, wireObj.lbtc_limits);
      cst_api_fill_to_wire_sub_swap_fees(apiObj.btcFees, wireObj.btc_fees);
      cst_api_fill_to_wire_sub_swap_fees(apiObj.lbtcFees, wireObj.lbtc_fees);
    }
  
    @protected
    void cst_api_fill_to_wire_swap_limits(
        SwapLimits apiObj, wire_cst_swap_limits wireObj) {
      wireObj.minimal = cst_encode_u_64(apiObj.minimal);
      wireObj.maximal = cst_encode_u_64(apiObj.maximal);
    }
  
    @protected
    void cst_api_fill_to_wire_tx_fee(TxFee apiObj, wire_cst_tx_fee wireObj) {
      if (apiObj is TxFee_Absolute) {
        var pre_field0 = cst_encode_u_64(apiObj.field0);
        wireObj.tag = 0;
        wireObj.kind.Absolute.field0 = pre_field0;
        return;
      }
      if (apiObj is TxFee_Relative) {
        var pre_field0 = cst_encode_f_64(apiObj.field0);
        wireObj.tag = 1;
        wireObj.kind.Relative.field0 = pre_field0;
        return;
      }
    }
  
    @protected
    bool cst_encode_bool(bool raw);
  
    @protected
    int cst_encode_chain(Chain raw);
  
    @protected
    int cst_encode_chain_swap_direction(ChainSwapDirection raw);
  
    @protected
    double cst_encode_f_64(double raw);
  
    @protected
    int cst_encode_i_32(int raw);
  
    @protected
    int cst_encode_side(Side raw);
  
    @protected
    int cst_encode_swap_tx_kind(SwapTxKind raw);
  
    @protected
    int cst_encode_swap_type(SwapType raw);
  
    @protected
    int cst_encode_u_32(int raw);
  
    @protected
    int cst_encode_u_8(int raw);
  
    @protected
    void cst_encode_unit(void raw);
  
    @protected
    void sse_encode_String(String self, SseSerializer serializer);
  
    @protected
    void sse_encode_boltz_error(BoltzError self, SseSerializer serializer);
  
    @protected
    void sse_encode_bool(bool self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_boltz_error(
        BoltzError self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_btc_ln_swap(
        BtcLnSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_btc_swap_script_str(
        BtcSwapScriptStr self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_chain_swap(
        ChainSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_fees(Fees self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_key_pair(KeyPair self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_l_btc_swap_script_str(
        LBtcSwapScriptStr self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_lbtc_ln_swap(
        LbtcLnSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_lnurl(Lnurl self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_pre_image(
        PreImage self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_side(Side self, SseSerializer serializer);
  
    @protected
    void sse_encode_box_autoadd_tx_fee(TxFee self, SseSerializer serializer);
  
    @protected
    void sse_encode_btc_ln_swap(BtcLnSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_btc_swap_script_str(
        BtcSwapScriptStr self, SseSerializer serializer);
  
    @protected
    void sse_encode_chain(Chain self, SseSerializer serializer);
  
    @protected
    void sse_encode_chain_fees_and_limits(
        ChainFeesAndLimits self, SseSerializer serializer);
  
    @protected
    void sse_encode_chain_swap(ChainSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_chain_swap_direction(
        ChainSwapDirection self, SseSerializer serializer);
  
    @protected
    void sse_encode_chain_swap_fees(ChainSwapFees self, SseSerializer serializer);
  
    @protected
    void sse_encode_decoded_invoice(
        DecodedInvoice self, SseSerializer serializer);
  
    @protected
    void sse_encode_f_64(double self, SseSerializer serializer);
  
    @protected
    void sse_encode_fees(Fees self, SseSerializer serializer);
  
    @protected
    void sse_encode_i_32(int self, SseSerializer serializer);
  
    @protected
    void sse_encode_key_pair(KeyPair self, SseSerializer serializer);
  
    @protected
    void sse_encode_l_btc_swap_script_str(
        LBtcSwapScriptStr self, SseSerializer serializer);
  
    @protected
    void sse_encode_lbtc_ln_swap(LbtcLnSwap self, SseSerializer serializer);
  
    @protected
    void sse_encode_list_prim_u_8_strict(
        Uint8List self, SseSerializer serializer);
  
    @protected
    void sse_encode_lnurl(Lnurl self, SseSerializer serializer);
  
    @protected
    void sse_encode_miner_fees(MinerFees self, SseSerializer serializer);
  
    @protected
    void sse_encode_opt_String(String? self, SseSerializer serializer);
  
    @protected
    void sse_encode_opt_box_autoadd_side(Side? self, SseSerializer serializer);
  
    @protected
    void sse_encode_pre_image(PreImage self, SseSerializer serializer);
  
    @protected
    void sse_encode_rev_swap_fees(RevSwapFees self, SseSerializer serializer);
  
    @protected
    void sse_encode_reverse_fees_and_limits(
        ReverseFeesAndLimits self, SseSerializer serializer);
  
    @protected
    void sse_encode_side(Side self, SseSerializer serializer);
  
    @protected
    void sse_encode_sub_swap_fees(SubSwapFees self, SseSerializer serializer);
  
    @protected
    void sse_encode_submarine_fees_and_limits(
        SubmarineFeesAndLimits self, SseSerializer serializer);
  
    @protected
    void sse_encode_swap_limits(SwapLimits self, SseSerializer serializer);
  
    @protected
    void sse_encode_swap_tx_kind(SwapTxKind self, SseSerializer serializer);
  
    @protected
    void sse_encode_swap_type(SwapType self, SseSerializer serializer);
  
    @protected
    void sse_encode_tx_fee(TxFee self, SseSerializer serializer);
  
    @protected
    void sse_encode_u_32(int self, SseSerializer serializer);
  
    @protected
    void sse_encode_u_64(BigInt self, SseSerializer serializer);
  
    @protected
    void sse_encode_u_8(int self, SseSerializer serializer);
  
    @protected
    void sse_encode_unit(void self, SseSerializer serializer);
  
    @protected
    void sse_encode_usize(BigInt self, SseSerializer serializer);
  }
  
  // Section: wire_class
  
  // ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names
  // AUTO GENERATED FILE, DO NOT EDIT.
  //
  // Generated by `package:ffigen`.
  // ignore_for_file: type=lint
  
  /// generated by flutter_rust_bridge
  class BoltzCoreWire implements BaseWire {
    factory BoltzCoreWire.fromExternalLibrary(ExternalLibrary lib) =>
        BoltzCoreWire(lib.ffiDynamicLibrary);
  
    /// Holds the symbol lookup function.
    final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
        _lookup;
  
    /// The symbols are looked up in [dynamicLibrary].
    BoltzCoreWire(ffi.DynamicLibrary dynamicLibrary)
        : _lookup = dynamicLibrary.lookup;
  
    /// The symbols are looked up with [lookup].
    BoltzCoreWire.fromLookup(
        ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
            lookup)
        : _lookup = lookup;
  
    void store_dart_post_cobject(
      DartPostCObjectFnType ptr,
    ) {
      return _store_dart_post_cobject(
        ptr,
      );
    }
  
    late final _store_dart_post_cobjectPtr =
        _lookup<ffi.NativeFunction<ffi.Void Function(DartPostCObjectFnType)>>(
            'store_dart_post_cobject');
    late final _store_dart_post_cobject = _store_dart_post_cobjectPtr
        .asFunction<void Function(DartPostCObjectFnType)>();
  
    void wire__crate__api__error__boltz_error_detail(
      int port_,
      ffi.Pointer<wire_cst_boltz_error> that,
    ) {
      return _wire__crate__api__error__boltz_error_detail(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__error__boltz_error_detailPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_boltz_error>)>>(
        'frbgen_boltz_wire__crate__api__error__boltz_error_detail');
    late final _wire__crate__api__error__boltz_error_detail =
        _wire__crate__api__error__boltz_error_detailPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_boltz_error>)>();
  
    void wire__crate__api__error__boltz_error_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> kind,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> message,
    ) {
      return _wire__crate__api__error__boltz_error_new(
        port_,
        kind,
        message,
      );
    }
  
    late final _wire__crate__api__error__boltz_error_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__error__boltz_error_new');
    late final _wire__crate__api__error__boltz_error_new =
        _wire__crate__api__error__boltz_error_newPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltz(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltz(
        port_,
        that,
        signed_hex,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltzPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64,
                        ffi.Pointer<wire_cst_btc_ln_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
            'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltz');
    late final _wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltz =
        _wire__crate__api__btc_ln__btc_ln_swap_broadcast_boltzPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_broadcast_local(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_broadcast_local(
        port_,
        that,
        signed_hex,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_broadcast_localPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64,
                        ffi.Pointer<wire_cst_btc_ln_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
            'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_broadcast_local');
    late final _wire__crate__api__btc_ln__btc_ln_swap_broadcast_local =
        _wire__crate__api__btc_ln__btc_ln_swap_broadcast_localPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_claim(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_claim(
        port_,
        that,
        out_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_claimPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_btc_ln_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_claim');
    late final _wire__crate__api__btc_ln__btc_ln_swap_claim =
        _wire__crate__api__btc_ln__btc_ln_swap_claimPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_btc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_claim_tx_size(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      bool is_cooperative,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_claim_tx_size(
        port_,
        that,
        is_cooperative,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_claim_tx_sizePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>, ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_claim_tx_size');
    late final _wire__crate__api__btc_ln__btc_ln_swap_claim_tx_size =
        _wire__crate__api__btc_ln__btc_ln_swap_claim_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>, bool)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarine(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarine(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarinePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>)>>(
            'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarine');
    late final _wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarine =
        _wire__crate__api__btc_ln__btc_ln_swap_coop_close_submarinePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_from_json(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> json_str,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_from_json(
        port_,
        json_str,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_from_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_from_json');
    late final _wire__crate__api__btc_ln__btc_ln_swap_from_json =
        _wire__crate__api__btc_ln__btc_ln_swap_from_jsonPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimage(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimage(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimagePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>)>>(
            'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimage');
    late final _wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimage =
        _wire__crate__api__btc_ln__btc_ln_swap_get_completed_submarine_preimagePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_get_preimage(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_get_preimage(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_get_preimagePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_get_preimage');
    late final _wire__crate__api__btc_ln__btc_ln_swap_get_preimage =
        _wire__crate__api__btc_ln__btc_ln_swap_get_preimagePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> id,
      int kind,
      int network,
      ffi.Pointer<wire_cst_key_pair> keys,
      int key_index,
      ffi.Pointer<wire_cst_pre_image> preimage,
      ffi.Pointer<wire_cst_btc_swap_script_str> swap_script,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> script_address,
      int out_amount,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_new(
        port_,
        id,
        kind,
        network,
        keys,
        key_index,
        preimage,
        swap_script,
        invoice,
        script_address,
        out_amount,
        electrum_url,
        boltz_url,
        referral_id,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_key_pair>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_pre_image>,
                    ffi.Pointer<wire_cst_btc_swap_script_str>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_new');
    late final _wire__crate__api__btc_ln__btc_ln_swap_new =
        _wire__crate__api__btc_ln__btc_ln_swap_newPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                int,
                ffi.Pointer<wire_cst_key_pair>,
                int,
                ffi.Pointer<wire_cst_pre_image>,
                ffi.Pointer<wire_cst_btc_swap_script_str>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_new_reverse(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int index,
      int out_amount,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      int network,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> description,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_new_reverse(
        port_,
        mnemonic,
        passphrase,
        index,
        out_amount,
        out_address,
        network,
        electrum_url,
        boltz_url,
        description,
        referral_id,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_new_reversePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_new_reverse');
    late final _wire__crate__api__btc_ln__btc_ln_swap_new_reverse =
        _wire__crate__api__btc_ln__btc_ln_swap_new_reversePtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_new_submarine(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int index,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice,
      int network,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_new_submarine(
        port_,
        mnemonic,
        passphrase,
        index,
        invoice,
        network,
        electrum_url,
        boltz_url,
        referral_id,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_new_submarinePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_new_submarine');
    late final _wire__crate__api__btc_ln__btc_ln_swap_new_submarine =
        _wire__crate__api__btc_ln__btc_ln_swap_new_submarinePtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_refund(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_refund(
        port_,
        that,
        out_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_refundPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_btc_ln_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_refund');
    late final _wire__crate__api__btc_ln__btc_ln_swap_refund =
        _wire__crate__api__btc_ln__btc_ln_swap_refundPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_btc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_refund_tx_size(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
      bool is_cooperative,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_refund_tx_size(
        port_,
        that,
        is_cooperative,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_refund_tx_sizePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>, ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_refund_tx_size');
    late final _wire__crate__api__btc_ln__btc_ln_swap_refund_tx_size =
        _wire__crate__api__btc_ln__btc_ln_swap_refund_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>, bool)>();
  
    void wire__crate__api__btc_ln__btc_ln_swap_to_json(
      int port_,
      ffi.Pointer<wire_cst_btc_ln_swap> that,
    ) {
      return _wire__crate__api__btc_ln__btc_ln_swap_to_json(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__btc_ln__btc_ln_swap_to_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_btc_ln_swap>)>>(
        'frbgen_boltz_wire__crate__api__btc_ln__btc_ln_swap_to_json');
    late final _wire__crate__api__btc_ln__btc_ln_swap_to_json =
        _wire__crate__api__btc_ln__btc_ln_swap_to_jsonPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_btc_ln_swap>)>();
  
    void wire__crate__api__types__btc_swap_script_str_new(
      int port_,
      int swap_type,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> funding_addrs,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> hashlock,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> receiver_pubkey,
      int locktime,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> sender_pubkey,
      ffi.Pointer<ffi.Int32> side,
    ) {
      return _wire__crate__api__types__btc_swap_script_str_new(
        port_,
        swap_type,
        funding_addrs,
        hashlock,
        receiver_pubkey,
        locktime,
        sender_pubkey,
        side,
      );
    }
  
    late final _wire__crate__api__types__btc_swap_script_str_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<ffi.Int32>)>>(
        'frbgen_boltz_wire__crate__api__types__btc_swap_script_str_new');
    late final _wire__crate__api__types__btc_swap_script_str_new =
        _wire__crate__api__types__btc_swap_script_str_newPtr.asFunction<
            void Function(
                int,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<ffi.Int32>)>();
  
    void wire__crate__api__chain_swap__chain_swap_broadcast_boltz(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
      int kind,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_broadcast_boltz(
        port_,
        that,
        signed_hex,
        kind,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_broadcast_boltzPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_chain_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>, ffi.Int32)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_broadcast_boltz');
    late final _wire__crate__api__chain_swap__chain_swap_broadcast_boltz =
        _wire__crate__api__chain_swap__chain_swap_broadcast_boltzPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>, int)>();
  
    void wire__crate__api__chain_swap__chain_swap_broadcast_local(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
      int kind,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_broadcast_local(
        port_,
        that,
        signed_hex,
        kind,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_broadcast_localPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_chain_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>, ffi.Int32)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_broadcast_local');
    late final _wire__crate__api__chain_swap__chain_swap_broadcast_local =
        _wire__crate__api__chain_swap__chain_swap_broadcast_localPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>, int)>();
  
    void wire__crate__api__chain_swap__chain_swap_claim(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_claim(
        port_,
        that,
        out_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_claimPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_chain_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_claim');
    late final _wire__crate__api__chain_swap__chain_swap_claim =
        _wire__crate__api__chain_swap__chain_swap_claimPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__chain_swap__chain_swap_claim_tx_size(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      bool try_cooperate,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_claim_tx_size(
        port_,
        that,
        out_address,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_claim_tx_sizePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_chain_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>, ffi.Bool)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_claim_tx_size');
    late final _wire__crate__api__chain_swap__chain_swap_claim_tx_size =
        _wire__crate__api__chain_swap__chain_swap_claim_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>, bool)>();
  
    void wire__crate__api__chain_swap__chain_swap_from_json(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> json_str,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_from_json(
        port_,
        json_str,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_from_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_from_json');
    late final _wire__crate__api__chain_swap__chain_swap_from_json =
        _wire__crate__api__chain_swap__chain_swap_from_jsonPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__chain_swap__chain_swap_get_server_lockup(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_get_server_lockup(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_get_server_lockupPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_chain_swap>)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_get_server_lockup');
    late final _wire__crate__api__chain_swap__chain_swap_get_server_lockup =
        _wire__crate__api__chain_swap__chain_swap_get_server_lockupPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_chain_swap>)>();
  
    void wire__crate__api__chain_swap__chain_swap_get_user_lockup(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_get_user_lockup(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_get_user_lockupPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_chain_swap>)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_get_user_lockup');
    late final _wire__crate__api__chain_swap__chain_swap_get_user_lockup =
        _wire__crate__api__chain_swap__chain_swap_get_user_lockupPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_chain_swap>)>();
  
    void wire__crate__api__chain_swap__chain_swap_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> id,
      bool is_testnet,
      int direction,
      ffi.Pointer<wire_cst_key_pair> refund_keys,
      int refund_index,
      ffi.Pointer<wire_cst_key_pair> claim_keys,
      int claim_index,
      ffi.Pointer<wire_cst_pre_image> preimage,
      ffi.Pointer<wire_cst_btc_swap_script_str> btc_script_str,
      ffi.Pointer<wire_cst_l_btc_swap_script_str> lbtc_script_str,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> script_address,
      int out_amount,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> btc_electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> lbtc_electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_new(
        port_,
        id,
        is_testnet,
        direction,
        refund_keys,
        refund_index,
        claim_keys,
        claim_index,
        preimage,
        btc_script_str,
        lbtc_script_str,
        script_address,
        out_amount,
        btc_electrum_url,
        lbtc_electrum_url,
        boltz_url,
        referral_id,
        blinding_key,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Bool,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_key_pair>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_key_pair>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_pre_image>,
                    ffi.Pointer<wire_cst_btc_swap_script_str>,
                    ffi.Pointer<wire_cst_l_btc_swap_script_str>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_new');
    late final _wire__crate__api__chain_swap__chain_swap_new =
        _wire__crate__api__chain_swap__chain_swap_newPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                bool,
                int,
                ffi.Pointer<wire_cst_key_pair>,
                int,
                ffi.Pointer<wire_cst_key_pair>,
                int,
                ffi.Pointer<wire_cst_pre_image>,
                ffi.Pointer<wire_cst_btc_swap_script_str>,
                ffi.Pointer<wire_cst_l_btc_swap_script_str>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__chain_swap__chain_swap_new_swap(
      int port_,
      int direction,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int index,
      int amount,
      bool is_testnet,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> btc_electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> lbtc_electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_new_swap(
        port_,
        direction,
        mnemonic,
        passphrase,
        index,
        amount,
        is_testnet,
        btc_electrum_url,
        lbtc_electrum_url,
        boltz_url,
        referral_id,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_new_swapPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Uint64,
                    ffi.Bool,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_new_swap');
    late final _wire__crate__api__chain_swap__chain_swap_new_swap =
        _wire__crate__api__chain_swap__chain_swap_new_swapPtr.asFunction<
            void Function(
                int,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                int,
                bool,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__chain_swap__chain_swap_refund(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> refund_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_refund(
        port_,
        that,
        refund_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_refundPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_chain_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund');
    late final _wire__crate__api__chain_swap__chain_swap_refund =
        _wire__crate__api__chain_swap__chain_swap_refundPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__chain_swap__chain_swap_refund_tx_size(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> refund_address,
      bool try_cooperate,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_refund_tx_size(
        port_,
        that,
        refund_address,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_refund_tx_sizePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_chain_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>, ffi.Bool)>>(
            'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund_tx_size');
    late final _wire__crate__api__chain_swap__chain_swap_refund_tx_size =
        _wire__crate__api__chain_swap__chain_swap_refund_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_chain_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>, bool)>();
  
    void wire__crate__api__chain_swap__chain_swap_to_json(
      int port_,
      ffi.Pointer<wire_cst_chain_swap> that,
    ) {
      return _wire__crate__api__chain_swap__chain_swap_to_json(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__chain_swap__chain_swap_to_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_chain_swap>)>>(
        'frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json');
    late final _wire__crate__api__chain_swap__chain_swap_to_json =
        _wire__crate__api__chain_swap__chain_swap_to_jsonPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_chain_swap>)>();
  
    void wire__crate__api__types__decoded_invoice_from_string(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> s,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
    ) {
      return _wire__crate__api__types__decoded_invoice_from_string(
        port_,
        s,
        boltz_url,
      );
    }
  
    late final _wire__crate__api__types__decoded_invoice_from_stringPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__types__decoded_invoice_from_string');
    late final _wire__crate__api__types__decoded_invoice_from_string =
        _wire__crate__api__types__decoded_invoice_from_stringPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__fees__fees_chain(
      int port_,
      ffi.Pointer<wire_cst_fees> that,
    ) {
      return _wire__crate__api__fees__fees_chain(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__fees__fees_chainPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_fees>)>>(
        'frbgen_boltz_wire__crate__api__fees__fees_chain');
    late final _wire__crate__api__fees__fees_chain =
        _wire__crate__api__fees__fees_chainPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_fees>)>();
  
    void wire__crate__api__fees__fees_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
    ) {
      return _wire__crate__api__fees__fees_new(
        port_,
        boltz_url,
      );
    }
  
    late final _wire__crate__api__fees__fees_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__fees__fees_new');
    late final _wire__crate__api__fees__fees_new =
        _wire__crate__api__fees__fees_newPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__fees__fees_reverse(
      int port_,
      ffi.Pointer<wire_cst_fees> that,
    ) {
      return _wire__crate__api__fees__fees_reverse(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__fees__fees_reversePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_fees>)>>(
        'frbgen_boltz_wire__crate__api__fees__fees_reverse');
    late final _wire__crate__api__fees__fees_reverse =
        _wire__crate__api__fees__fees_reversePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_fees>)>();
  
    void wire__crate__api__fees__fees_submarine(
      int port_,
      ffi.Pointer<wire_cst_fees> that,
    ) {
      return _wire__crate__api__fees__fees_submarine(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__fees__fees_submarinePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_fees>)>>(
        'frbgen_boltz_wire__crate__api__fees__fees_submarine');
    late final _wire__crate__api__fees__fees_submarine =
        _wire__crate__api__fees__fees_submarinePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_fees>)>();
  
    void wire__crate__api__types__key_pair_generate(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int network,
      int index,
      int swap_type,
    ) {
      return _wire__crate__api__types__key_pair_generate(
        port_,
        mnemonic,
        passphrase,
        network,
        index,
        swap_type,
      );
    }
  
    late final _wire__crate__api__types__key_pair_generatePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Uint64,
                    ffi.Int32)>>(
        'frbgen_boltz_wire__crate__api__types__key_pair_generate');
    late final _wire__crate__api__types__key_pair_generate =
        _wire__crate__api__types__key_pair_generatePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>, int, int, int)>();
  
    void wire__crate__api__types__key_pair_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> secret_key,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> public_key,
    ) {
      return _wire__crate__api__types__key_pair_new(
        port_,
        secret_key,
        public_key,
      );
    }
  
    late final _wire__crate__api__types__key_pair_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__types__key_pair_new');
    late final _wire__crate__api__types__key_pair_new =
        _wire__crate__api__types__key_pair_newPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__types__l_btc_swap_script_str_new(
      int port_,
      int swap_type,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> funding_addrs,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> hashlock,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> receiver_pubkey,
      int locktime,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> sender_pubkey,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key,
      ffi.Pointer<ffi.Int32> side,
    ) {
      return _wire__crate__api__types__l_btc_swap_script_str_new(
        port_,
        swap_type,
        funding_addrs,
        hashlock,
        receiver_pubkey,
        locktime,
        sender_pubkey,
        blinding_key,
        side,
      );
    }
  
    late final _wire__crate__api__types__l_btc_swap_script_str_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<ffi.Int32>)>>(
        'frbgen_boltz_wire__crate__api__types__l_btc_swap_script_str_new');
    late final _wire__crate__api__types__l_btc_swap_script_str_new =
        _wire__crate__api__types__l_btc_swap_script_str_newPtr.asFunction<
            void Function(
                int,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<ffi.Int32>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltz(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltz(
        port_,
        that,
        signed_hex,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltzPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64,
                        ffi.Pointer<wire_cst_lbtc_ln_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltz');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltz =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_boltzPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_local(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> signed_hex,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_local(
        port_,
        that,
        signed_hex,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_localPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64,
                        ffi.Pointer<wire_cst_lbtc_ln_swap>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_local');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_local =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_broadcast_localPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_claim(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim(
        port_,
        that,
        out_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_claimPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_lbtc_ln_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_claim');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_claimPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_lbtc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_size(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      bool is_cooperative,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_size(
        port_,
        that,
        is_cooperative,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_sizePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64,
                        ffi.Pointer<wire_cst_lbtc_ln_swap>, ffi.Bool)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_size');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_size =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_claim_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>, bool)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarine(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarine(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarinePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_lbtc_ln_swap>)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarine');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarine =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_coop_close_submarinePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_from_json(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> json_str,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_from_json(
        port_,
        json_str,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_from_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_from_json');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_from_json =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_from_jsonPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimage(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimage(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimagePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64, ffi.Pointer<wire_cst_lbtc_ln_swap>)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimage');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimage =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_completed_submarine_preimagePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimage(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimage(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimagePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_lbtc_ln_swap>)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimage');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimage =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_get_preimagePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> id,
      int kind,
      int network,
      ffi.Pointer<wire_cst_key_pair> keys,
      int key_index,
      ffi.Pointer<wire_cst_pre_image> preimage,
      ffi.Pointer<wire_cst_l_btc_swap_script_str> swap_script,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice,
      int out_amount,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_new(
        port_,
        id,
        kind,
        network,
        keys,
        key_index,
        preimage,
        swap_script,
        invoice,
        out_amount,
        out_address,
        blinding_key,
        electrum_url,
        boltz_url,
        referral_id,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_key_pair>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_pre_image>,
                    ffi.Pointer<wire_cst_l_btc_swap_script_str>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_new');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_new =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_newPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                int,
                ffi.Pointer<wire_cst_key_pair>,
                int,
                ffi.Pointer<wire_cst_pre_image>,
                ffi.Pointer<wire_cst_l_btc_swap_script_str>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reverse(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int index,
      int out_amount,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      int network,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> description,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reverse(
        port_,
        mnemonic,
        passphrase,
        index,
        out_amount,
        out_address,
        network,
        electrum_url,
        boltz_url,
        description,
        referral_id,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reversePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Uint64,
                    ffi.Uint64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Int32,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reverse');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reverse =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_reversePtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarine(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> mnemonic,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> passphrase,
      int index,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice,
      int network,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarine(
        port_,
        mnemonic,
        passphrase,
        index,
        invoice,
        network,
        electrum_url,
        boltz_url,
        referral_id,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarinePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(
                        ffi.Int64,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                        ffi.Uint64,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                        ffi.Int32,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                        ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarine');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarine =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_new_submarinePtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_refund(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> out_address,
      ffi.Pointer<wire_cst_tx_fee> miner_fee,
      bool try_cooperate,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund(
        port_,
        that,
        out_address,
        miner_fee,
        try_cooperate,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_refundPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_lbtc_ln_swap>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_tx_fee>,
                    ffi.Bool)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_refund');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_refundPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_lbtc_ln_swap>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_tx_fee>,
                bool)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_size(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
      bool is_cooperative,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_size(
        port_,
        that,
        is_cooperative,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_sizePtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64,
                        ffi.Pointer<wire_cst_lbtc_ln_swap>, ffi.Bool)>>(
            'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_size');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_size =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_refund_tx_sizePtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>, bool)>();
  
    void wire__crate__api__lbtc_ln__lbtc_ln_swap_to_json(
      int port_,
      ffi.Pointer<wire_cst_lbtc_ln_swap> that,
    ) {
      return _wire__crate__api__lbtc_ln__lbtc_ln_swap_to_json(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_to_jsonPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_lbtc_ln_swap>)>>(
        'frbgen_boltz_wire__crate__api__lbtc_ln__lbtc_ln_swap_to_json');
    late final _wire__crate__api__lbtc_ln__lbtc_ln_swap_to_json =
        _wire__crate__api__lbtc_ln__lbtc_ln_swap_to_jsonPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lbtc_ln_swap>)>();
  
    void wire__crate__api__lnurl__lnurl_fetch_invoice(
      int port_,
      ffi.Pointer<wire_cst_lnurl> that,
      int msats,
    ) {
      return _wire__crate__api__lnurl__lnurl_fetch_invoice(
        port_,
        that,
        msats,
      );
    }
  
    late final _wire__crate__api__lnurl__lnurl_fetch_invoicePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_lnurl>, ffi.Uint64)>>(
        'frbgen_boltz_wire__crate__api__lnurl__lnurl_fetch_invoice');
    late final _wire__crate__api__lnurl__lnurl_fetch_invoice =
        _wire__crate__api__lnurl__lnurl_fetch_invoicePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lnurl>, int)>();
  
    void wire__crate__api__lnurl__lnurl_get_voucher_max_amount(
      int port_,
      ffi.Pointer<wire_cst_lnurl> that,
    ) {
      return _wire__crate__api__lnurl__lnurl_get_voucher_max_amount(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lnurl__lnurl_get_voucher_max_amountPtr =
        _lookup<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_lnurl>)>>(
            'frbgen_boltz_wire__crate__api__lnurl__lnurl_get_voucher_max_amount');
    late final _wire__crate__api__lnurl__lnurl_get_voucher_max_amount =
        _wire__crate__api__lnurl__lnurl_get_voucher_max_amountPtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lnurl>)>();
  
    void wire__crate__api__lnurl__lnurl_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> value,
    ) {
      return _wire__crate__api__lnurl__lnurl_new(
        port_,
        value,
      );
    }
  
    late final _wire__crate__api__lnurl__lnurl_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__lnurl__lnurl_new');
    late final _wire__crate__api__lnurl__lnurl_new =
        _wire__crate__api__lnurl__lnurl_newPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__lnurl__lnurl_validate(
      int port_,
      ffi.Pointer<wire_cst_lnurl> that,
    ) {
      return _wire__crate__api__lnurl__lnurl_validate(
        port_,
        that,
      );
    }
  
    late final _wire__crate__api__lnurl__lnurl_validatePtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_lnurl>)>>(
        'frbgen_boltz_wire__crate__api__lnurl__lnurl_validate');
    late final _wire__crate__api__lnurl__lnurl_validate =
        _wire__crate__api__lnurl__lnurl_validatePtr
            .asFunction<void Function(int, ffi.Pointer<wire_cst_lnurl>)>();
  
    void wire__crate__api__lnurl__lnurl_withdraw(
      int port_,
      ffi.Pointer<wire_cst_lnurl> that,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice,
    ) {
      return _wire__crate__api__lnurl__lnurl_withdraw(
        port_,
        that,
        invoice,
      );
    }
  
    late final _wire__crate__api__lnurl__lnurl_withdrawPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_lnurl>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__lnurl__lnurl_withdraw');
    late final _wire__crate__api__lnurl__lnurl_withdraw =
        _wire__crate__api__lnurl__lnurl_withdrawPtr.asFunction<
            void Function(int, ffi.Pointer<wire_cst_lnurl>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    void wire__crate__api__types__pre_image_generate(
      int port_,
    ) {
      return _wire__crate__api__types__pre_image_generate(
        port_,
      );
    }
  
    late final _wire__crate__api__types__pre_image_generatePtr =
        _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
            'frbgen_boltz_wire__crate__api__types__pre_image_generate');
    late final _wire__crate__api__types__pre_image_generate =
        _wire__crate__api__types__pre_image_generatePtr
            .asFunction<void Function(int)>();
  
    void wire__crate__api__types__pre_image_new(
      int port_,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> value,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> sha256,
      ffi.Pointer<wire_cst_list_prim_u_8_strict> hash160,
    ) {
      return _wire__crate__api__types__pre_image_new(
        port_,
        value,
        sha256,
        hash160,
      );
    }
  
    late final _wire__crate__api__types__pre_image_newPtr = _lookup<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Int64,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                    ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
        'frbgen_boltz_wire__crate__api__types__pre_image_new');
    late final _wire__crate__api__types__pre_image_new =
        _wire__crate__api__types__pre_image_newPtr.asFunction<
            void Function(
                int,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>,
                ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
  
    ffi.Pointer<wire_cst_boltz_error> cst_new_box_autoadd_boltz_error() {
      return _cst_new_box_autoadd_boltz_error();
    }
  
    late final _cst_new_box_autoadd_boltz_errorPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_boltz_error> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_boltz_error');
    late final _cst_new_box_autoadd_boltz_error =
        _cst_new_box_autoadd_boltz_errorPtr
            .asFunction<ffi.Pointer<wire_cst_boltz_error> Function()>();
  
    ffi.Pointer<wire_cst_btc_ln_swap> cst_new_box_autoadd_btc_ln_swap() {
      return _cst_new_box_autoadd_btc_ln_swap();
    }
  
    late final _cst_new_box_autoadd_btc_ln_swapPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_btc_ln_swap> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_btc_ln_swap');
    late final _cst_new_box_autoadd_btc_ln_swap =
        _cst_new_box_autoadd_btc_ln_swapPtr
            .asFunction<ffi.Pointer<wire_cst_btc_ln_swap> Function()>();
  
    ffi.Pointer<wire_cst_btc_swap_script_str>
        cst_new_box_autoadd_btc_swap_script_str() {
      return _cst_new_box_autoadd_btc_swap_script_str();
    }
  
    late final _cst_new_box_autoadd_btc_swap_script_strPtr = _lookup<
            ffi.NativeFunction<
                ffi.Pointer<wire_cst_btc_swap_script_str> Function()>>(
        'frbgen_boltz_cst_new_box_autoadd_btc_swap_script_str');
    late final _cst_new_box_autoadd_btc_swap_script_str =
        _cst_new_box_autoadd_btc_swap_script_strPtr
            .asFunction<ffi.Pointer<wire_cst_btc_swap_script_str> Function()>();
  
    ffi.Pointer<wire_cst_chain_swap> cst_new_box_autoadd_chain_swap() {
      return _cst_new_box_autoadd_chain_swap();
    }
  
    late final _cst_new_box_autoadd_chain_swapPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_chain_swap> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_chain_swap');
    late final _cst_new_box_autoadd_chain_swap =
        _cst_new_box_autoadd_chain_swapPtr
            .asFunction<ffi.Pointer<wire_cst_chain_swap> Function()>();
  
    ffi.Pointer<wire_cst_fees> cst_new_box_autoadd_fees() {
      return _cst_new_box_autoadd_fees();
    }
  
    late final _cst_new_box_autoadd_feesPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_fees> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_fees');
    late final _cst_new_box_autoadd_fees = _cst_new_box_autoadd_feesPtr
        .asFunction<ffi.Pointer<wire_cst_fees> Function()>();
  
    ffi.Pointer<wire_cst_key_pair> cst_new_box_autoadd_key_pair() {
      return _cst_new_box_autoadd_key_pair();
    }
  
    late final _cst_new_box_autoadd_key_pairPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_key_pair> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_key_pair');
    late final _cst_new_box_autoadd_key_pair = _cst_new_box_autoadd_key_pairPtr
        .asFunction<ffi.Pointer<wire_cst_key_pair> Function()>();
  
    ffi.Pointer<wire_cst_l_btc_swap_script_str>
        cst_new_box_autoadd_l_btc_swap_script_str() {
      return _cst_new_box_autoadd_l_btc_swap_script_str();
    }
  
    late final _cst_new_box_autoadd_l_btc_swap_script_strPtr = _lookup<
            ffi.NativeFunction<
                ffi.Pointer<wire_cst_l_btc_swap_script_str> Function()>>(
        'frbgen_boltz_cst_new_box_autoadd_l_btc_swap_script_str');
    late final _cst_new_box_autoadd_l_btc_swap_script_str =
        _cst_new_box_autoadd_l_btc_swap_script_strPtr
            .asFunction<ffi.Pointer<wire_cst_l_btc_swap_script_str> Function()>();
  
    ffi.Pointer<wire_cst_lbtc_ln_swap> cst_new_box_autoadd_lbtc_ln_swap() {
      return _cst_new_box_autoadd_lbtc_ln_swap();
    }
  
    late final _cst_new_box_autoadd_lbtc_ln_swapPtr = _lookup<
            ffi.NativeFunction<ffi.Pointer<wire_cst_lbtc_ln_swap> Function()>>(
        'frbgen_boltz_cst_new_box_autoadd_lbtc_ln_swap');
    late final _cst_new_box_autoadd_lbtc_ln_swap =
        _cst_new_box_autoadd_lbtc_ln_swapPtr
            .asFunction<ffi.Pointer<wire_cst_lbtc_ln_swap> Function()>();
  
    ffi.Pointer<wire_cst_lnurl> cst_new_box_autoadd_lnurl() {
      return _cst_new_box_autoadd_lnurl();
    }
  
    late final _cst_new_box_autoadd_lnurlPtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_lnurl> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_lnurl');
    late final _cst_new_box_autoadd_lnurl = _cst_new_box_autoadd_lnurlPtr
        .asFunction<ffi.Pointer<wire_cst_lnurl> Function()>();
  
    ffi.Pointer<wire_cst_pre_image> cst_new_box_autoadd_pre_image() {
      return _cst_new_box_autoadd_pre_image();
    }
  
    late final _cst_new_box_autoadd_pre_imagePtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_pre_image> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_pre_image');
    late final _cst_new_box_autoadd_pre_image = _cst_new_box_autoadd_pre_imagePtr
        .asFunction<ffi.Pointer<wire_cst_pre_image> Function()>();
  
    ffi.Pointer<ffi.Int32> cst_new_box_autoadd_side(
      int value,
    ) {
      return _cst_new_box_autoadd_side(
        value,
      );
    }
  
    late final _cst_new_box_autoadd_sidePtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<ffi.Int32> Function(ffi.Int32)>>(
            'frbgen_boltz_cst_new_box_autoadd_side');
    late final _cst_new_box_autoadd_side = _cst_new_box_autoadd_sidePtr
        .asFunction<ffi.Pointer<ffi.Int32> Function(int)>();
  
    ffi.Pointer<wire_cst_tx_fee> cst_new_box_autoadd_tx_fee() {
      return _cst_new_box_autoadd_tx_fee();
    }
  
    late final _cst_new_box_autoadd_tx_feePtr =
        _lookup<ffi.NativeFunction<ffi.Pointer<wire_cst_tx_fee> Function()>>(
            'frbgen_boltz_cst_new_box_autoadd_tx_fee');
    late final _cst_new_box_autoadd_tx_fee = _cst_new_box_autoadd_tx_feePtr
        .asFunction<ffi.Pointer<wire_cst_tx_fee> Function()>();
  
    ffi.Pointer<wire_cst_list_prim_u_8_strict> cst_new_list_prim_u_8_strict(
      int len,
    ) {
      return _cst_new_list_prim_u_8_strict(
        len,
      );
    }
  
    late final _cst_new_list_prim_u_8_strictPtr = _lookup<
        ffi.NativeFunction<
            ffi.Pointer<wire_cst_list_prim_u_8_strict> Function(
                ffi.Int32)>>('frbgen_boltz_cst_new_list_prim_u_8_strict');
    late final _cst_new_list_prim_u_8_strict = _cst_new_list_prim_u_8_strictPtr
        .asFunction<ffi.Pointer<wire_cst_list_prim_u_8_strict> Function(int)>();
  
    int dummy_method_to_enforce_bundling() {
      return _dummy_method_to_enforce_bundling();
    }
  
    late final _dummy_method_to_enforce_bundlingPtr =
        _lookup<ffi.NativeFunction<ffi.Int64 Function()>>(
            'dummy_method_to_enforce_bundling');
    late final _dummy_method_to_enforce_bundling =
        _dummy_method_to_enforce_bundlingPtr.asFunction<int Function()>();
  }
  
  typedef DartPort = ffi.Int64;
  typedef DartDartPort = int;
  typedef DartPostCObjectFnTypeFunction = ffi.Bool Function(
      DartPort port_id, ffi.Pointer<ffi.Void> message);
  typedef DartDartPostCObjectFnTypeFunction = bool Function(
      DartDartPort port_id, ffi.Pointer<ffi.Void> message);
  typedef DartPostCObjectFnType
      = ffi.Pointer<ffi.NativeFunction<DartPostCObjectFnTypeFunction>>;
  
  final class wire_cst_list_prim_u_8_strict extends ffi.Struct {
    external ffi.Pointer<ffi.Uint8> ptr;
  
    @ffi.Int32()
    external int len;
  }
  
  final class wire_cst_boltz_error extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> kind;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> message;
  }
  
  final class wire_cst_key_pair extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> secret_key;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> public_key;
  }
  
  final class wire_cst_pre_image extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> value;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> sha256;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> hash160;
  }
  
  final class wire_cst_btc_swap_script_str extends ffi.Struct {
    @ffi.Int32()
    external int swap_type;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> funding_addrs;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> hashlock;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> receiver_pubkey;
  
    @ffi.Uint32()
    external int locktime;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> sender_pubkey;
  
    external ffi.Pointer<ffi.Int32> side;
  }
  
  final class wire_cst_btc_ln_swap extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> id;
  
    @ffi.Int32()
    external int kind;
  
    @ffi.Int32()
    external int network;
  
    external wire_cst_key_pair keys;
  
    @ffi.Uint64()
    external int key_index;
  
    external wire_cst_pre_image preimage;
  
    external wire_cst_btc_swap_script_str swap_script;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> script_address;
  
    @ffi.Uint64()
    external int out_amount;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id;
  }
  
  final class wire_cst_TxFee_Absolute extends ffi.Struct {
    @ffi.Uint64()
    external int field0;
  }
  
  final class wire_cst_TxFee_Relative extends ffi.Struct {
    @ffi.Double()
    external double field0;
  }
  
  final class TxFeeKind extends ffi.Union {
    external wire_cst_TxFee_Absolute Absolute;
  
    external wire_cst_TxFee_Relative Relative;
  }
  
  final class wire_cst_tx_fee extends ffi.Struct {
    @ffi.Int32()
    external int tag;
  
    external TxFeeKind kind;
  }
  
  final class wire_cst_l_btc_swap_script_str extends ffi.Struct {
    @ffi.Int32()
    external int swap_type;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> funding_addrs;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> hashlock;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> receiver_pubkey;
  
    @ffi.Uint32()
    external int locktime;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> sender_pubkey;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key;
  
    external ffi.Pointer<ffi.Int32> side;
  }
  
  final class wire_cst_chain_swap extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> id;
  
    @ffi.Bool()
    external bool is_testnet;
  
    @ffi.Int32()
    external int direction;
  
    external wire_cst_key_pair refund_keys;
  
    @ffi.Uint64()
    external int refund_index;
  
    external wire_cst_key_pair claim_keys;
  
    @ffi.Uint64()
    external int claim_index;
  
    external wire_cst_pre_image preimage;
  
    external wire_cst_btc_swap_script_str btc_script_str;
  
    external wire_cst_l_btc_swap_script_str lbtc_script_str;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> script_address;
  
    @ffi.Uint64()
    external int out_amount;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> btc_electrum_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> lbtc_electrum_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key;
  }
  
  final class wire_cst_fees extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url;
  }
  
  final class wire_cst_lbtc_ln_swap extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> id;
  
    @ffi.Int32()
    external int kind;
  
    @ffi.Int32()
    external int network;
  
    external wire_cst_key_pair keys;
  
    @ffi.Uint64()
    external int key_index;
  
    external wire_cst_pre_image preimage;
  
    external wire_cst_l_btc_swap_script_str swap_script;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> invoice;
  
    @ffi.Uint64()
    external int out_amount;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> script_address;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> blinding_key;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> electrum_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> boltz_url;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> referral_id;
  }
  
  final class wire_cst_lnurl extends ffi.Struct {
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> value;
  }
  
  final class wire_cst_swap_limits extends ffi.Struct {
    @ffi.Uint64()
    external int minimal;
  
    @ffi.Uint64()
    external int maximal;
  }
  
  final class wire_cst_chain_swap_fees extends ffi.Struct {
    @ffi.Double()
    external double percentage;
  
    @ffi.Uint64()
    external int user_lockup;
  
    @ffi.Uint64()
    external int user_claim;
  
    @ffi.Uint64()
    external int server;
  }
  
  final class wire_cst_chain_fees_and_limits extends ffi.Struct {
    external wire_cst_swap_limits btc_limits;
  
    external wire_cst_swap_limits lbtc_limits;
  
    external wire_cst_chain_swap_fees btc_fees;
  
    external wire_cst_chain_swap_fees lbtc_fees;
  }
  
  final class wire_cst_decoded_invoice extends ffi.Struct {
    @ffi.Uint64()
    external int msats;
  
    @ffi.Uint64()
    external int expiry;
  
    @ffi.Uint64()
    external int expires_in;
  
    @ffi.Uint64()
    external int expires_at;
  
    @ffi.Bool()
    external bool is_expired;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> network;
  
    @ffi.Uint64()
    external int cltv_exp_delta;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> bip21;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> preimage_hash;
  
    external ffi.Pointer<wire_cst_list_prim_u_8_strict> description;
  }
  
  final class wire_cst_miner_fees extends ffi.Struct {
    @ffi.Uint64()
    external int lockup;
  
    @ffi.Uint64()
    external int claim;
  }
  
  final class wire_cst_rev_swap_fees extends ffi.Struct {
    @ffi.Double()
    external double percentage;
  
    external wire_cst_miner_fees miner_fees;
  }
  
  final class wire_cst_reverse_fees_and_limits extends ffi.Struct {
    external wire_cst_swap_limits btc_limits;
  
    external wire_cst_swap_limits lbtc_limits;
  
    external wire_cst_rev_swap_fees btc_fees;
  
    external wire_cst_rev_swap_fees lbtc_fees;
  }
  
  final class wire_cst_sub_swap_fees extends ffi.Struct {
    @ffi.Double()
    external double percentage;
  
    @ffi.Uint64()
    external int miner_fees;
  }
  
  final class wire_cst_submarine_fees_and_limits extends ffi.Struct {
    external wire_cst_swap_limits btc_limits;
  
    external wire_cst_swap_limits lbtc_limits;
  
    external wire_cst_sub_swap_fees btc_fees;
  
    external wire_cst_sub_swap_fees lbtc_fees;
  }
  