pub enum CpfpInput {
P2wpkh {
txid: String,
vout: u32,
value: u64,
pubkey: String,
},
P2tr {
txid: String,
vout: u32,
value: u64,
pubkey: String,
},
Custom {
txid: String,
vout: u32,
value: u64,
script_pubkey_hex: String,
signed_input_weight: u64,
},
}Expand description
A funding UTXO that pays the on-chain fees of a unilateral exit.
Variants§
P2wpkh
A P2WPKH (native segwit v0) UTXO controlled by pubkey (33-byte
compressed, hex).
P2tr
A P2TR (taproot, key-path) UTXO. pubkey (x-only or compressed, hex) is
the internal (untweaked, BIP86 key-path) public key whose secret signs
the input, not the tweaked on-chain output key. The SDK applies the BIP86
taproot tweak itself to derive the funding scriptPubKey, so passing the
already-tweaked output key here produces a scriptPubKey that does not match
the UTXO and the built transaction is rejected at broadcast.
Custom
Any witness-program script, signed via a custom CpfpSigner. Legacy
(non-SegWit) scripts are rejected. signed_input_weight (weight units)
is an upper bound on the input’s signed weight, so the fee stays exact,
or slightly conservative if the real signature is shorter.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CpfpInput
impl<'de> Deserialize<'de> for CpfpInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CpfpInput
impl RefUnwindSafe for CpfpInput
impl Send for CpfpInput
impl Sync for CpfpInput
impl Unpin for CpfpInput
impl UnsafeUnpin for CpfpInput
impl UnwindSafe for CpfpInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request