#ifndef LIGHTNING_PLUGINS_SPENDER_SPLICE_H
#define LIGHTNING_PLUGINS_SPENDER_SPLICE_H
#include "config.h"
#include <common/amount.h>
#include <plugins/libplugin.h>
extern const struct plugin_command splice_commands[];
extern const size_t num_splice_commands;
enum splice_cmd_state {
SPLICE_CMD_NONE = 0,
SPLICE_CMD_INIT,
SPLICE_CMD_UPDATE,
SPLICE_CMD_UPDATE_NEEDS_CHANGES,
SPLICE_CMD_UPDATE_DONE,
SPLICE_CMD_RECVED_SIGS,
SPLICE_CMD_PENDING,
SPLICE_CMD_DONE,
};
struct splice_cmd_action_state {
enum splice_cmd_state state;
};
struct splice_cmd {
struct command *cmd;
const char *script;
struct splice_script_result **actions;
struct splice_cmd_action_state **states;
struct wally_psbt *psbt;
bool dryrun;
bool wetrun;
u32 feerate_per_kw;
bool force_feerate;
int wallet_inputs_to_signed;
struct bitcoin_txid final_txid;
bool fee_calculated;
struct amount_sat initial_funds;
struct amount_sat emergency_sat;
char *debug_log;
int debug_counter;
struct amount_sat needed_funds;
};
#endif