mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-22 23:25:22 +01:00
feat: refund multi sig
This commit is contained in:
@@ -161,6 +161,7 @@ pub async fn create_request(
|
||||
refund_keys: None,
|
||||
num_sigs: Some(num_sigs),
|
||||
sig_flag: SigFlag::SigInputs,
|
||||
num_sigs_refund: None,
|
||||
};
|
||||
|
||||
// Try to parse the hash
|
||||
@@ -186,6 +187,7 @@ pub async fn create_request(
|
||||
refund_keys: None,
|
||||
num_sigs: Some(num_sigs),
|
||||
sig_flag: SigFlag::SigInputs,
|
||||
num_sigs_refund: None,
|
||||
};
|
||||
|
||||
// Create HTLC conditions with the hash and pubkeys in conditions
|
||||
@@ -203,6 +205,7 @@ pub async fn create_request(
|
||||
refund_keys: None,
|
||||
num_sigs: Some(num_sigs),
|
||||
sig_flag: SigFlag::SigInputs,
|
||||
num_sigs_refund: None,
|
||||
}),
|
||||
))
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ pub async fn send(
|
||||
refund_keys,
|
||||
sub_command_args.required_sigs,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -155,8 +156,8 @@ pub async fn send(
|
||||
refund_keys,
|
||||
sub_command_args.required_sigs,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
None,
|
||||
)?;
|
||||
|
||||
Some(SpendingConditions::new_htlc_hash(hash, Some(conditions))?)
|
||||
}
|
||||
@@ -187,8 +188,8 @@ pub async fn send(
|
||||
refund_keys,
|
||||
sub_command_args.required_sigs,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
None,
|
||||
)?;
|
||||
|
||||
Some(SpendingConditions::P2PKConditions {
|
||||
data: data_pubkey,
|
||||
|
||||
Reference in New Issue
Block a user