You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement DelayedPaymentBasepoint and DelayedPaymentKey wrappers to explicitly specify those types of keys in functions and structs allowing the language to verify what key is being used and enable idiomatic derivation of one key from another.
let per_commitment_key = ignore_error!(SecretKey::from_slice(&secret));
2990
2991
let per_commitment_point = PublicKey::from_secret_key(&self.onchain_tx_handler.secp_ctx,&per_commitment_key);
2991
2992
let revocation_pubkey = chan_utils::derive_public_revocation_key(&self.onchain_tx_handler.secp_ctx,&per_commitment_point,&self.holder_revocation_basepoint);
2992
-
let delayed_key = chan_utils::derive_public_key(&self.onchain_tx_handler.secp_ctx,&PublicKey::from_secret_key(&self.onchain_tx_handler.secp_ctx,&per_commitment_key),&self.counterparty_commitment_params.counterparty_delayed_payment_base_key);
2993
+
let delayed_key = DelayedPaymentKey::from_basepoint(&self.onchain_tx_handler.secp_ctx,&self.counterparty_commitment_params.counterparty_delayed_payment_base_key,&PublicKey::from_secret_key(&self.onchain_tx_handler.secp_ctx,&per_commitment_key));
2993
2994
2994
2995
let revokeable_redeemscript = chan_utils::get_revokeable_redeemscript(&revocation_pubkey,self.counterparty_commitment_params.on_counterparty_tx_csv,&delayed_key);
2995
2996
let revokeable_p2wsh = revokeable_redeemscript.to_v0_p2wsh();
let delayed_key = DelayedPaymentKey::from_basepoint(&self.onchain_tx_handler.secp_ctx,&self.counterparty_commitment_params.counterparty_delayed_payment_base_key,&per_commitment_point);
3109
+
3109
3110
let revokeable_p2wsh = chan_utils::get_revokeable_redeemscript(&revocation_pubkey,
0 commit comments