spark_rust/wallet/internal_handlers/traits/
timelock.rs

1use bitcoin::{secp256k1::PublicKey, Transaction};
2use frost_secp256k1_tr_unofficial::round1::SigningCommitments;
3use spark_protos::spark::{SigningJob, TreeNode};
4use tonic::async_trait;
5
6use crate::error::SparkSdkError;
7
8#[allow(dead_code)]
9#[async_trait]
10pub(crate) trait TimelockInternalHandlers {
11    async fn refresh_timelock_refund_tx(
12        &self,
13        leaf: &TreeNode,
14        signing_public_key: &PublicKey,
15    ) -> Result<(), SparkSdkError>;
16
17    async fn refresh_timelock_nodes(
18        &self,
19        nodes: &Vec<TreeNode>,
20        parent_nodes: &Vec<TreeNode>,
21        signing_public_key: &PublicKey,
22    ) -> Result<(), SparkSdkError>;
23
24    fn signing_job_from_tx(
25        &self,
26        new_tx: &Transaction,
27        signing_public_key: &PublicKey,
28    ) -> Result<(SigningJob, SigningCommitments), SparkSdkError>;
29}