pub struct DeterministicOutputsForOneContext {
pub context: String,
pub amount: u64,
pub ordered_amounts: OrderedListOfAmounts,
pub params: ChannelParameters,
}Expand description
A set of deterministic outputs for a specific pubkey and amount This represents all the deterministic blinded messages, secrets, and blinding factors for splitting a given amount into ecash outputs
Fields§
§context: StringThe context for these outputs: “sender”, “receiver”, or “funding”
amount: u64The total amount to allocate
ordered_amounts: OrderedListOfAmountsThe breakdown of amounts (largest-first)
params: ChannelParametersChannel parameters (includes shared_secret)
Implementations§
Source§impl DeterministicOutputsForOneContext
impl DeterministicOutputsForOneContext
Sourcepub fn new(
context: String,
amount: u64,
params: ChannelParameters,
) -> Result<Self>
pub fn new( context: String, amount: u64, params: ChannelParameters, ) -> Result<Self>
Create a new set of deterministic outputs
Sourcepub fn value_after_fees(&self) -> u64
pub fn value_after_fees(&self) -> u64
Calculate the value after stage 2 fees
Sourcepub fn get_secrets_with_blinding(
&self,
) -> Result<Vec<DeterministicSecretWithBlinding>, Error>
pub fn get_secrets_with_blinding( &self, ) -> Result<Vec<DeterministicSecretWithBlinding>, Error>
Get the secrets with blinding for these outputs Works for all contexts: “sender”, “receiver”, and “funding” Returns full DeterministicSecretWithBlinding objects (secret + blinding factor) Outputs are ordered smallest-first per Cashu protocol recommendation
Sourcepub fn get_blinded_messages(
&self,
override_keyset_id: Option<Id>,
) -> Result<Vec<BlindedMessage>, Error>
pub fn get_blinded_messages( &self, override_keyset_id: Option<Id>, ) -> Result<Vec<BlindedMessage>, Error>
Get the blinded messages for these outputs Works for all contexts: “sender”, “receiver”, and “funding” Outputs are ordered smallest-first per Cashu protocol recommendation
Trait Implementations§
Source§impl Clone for DeterministicOutputsForOneContext
impl Clone for DeterministicOutputsForOneContext
Source§fn clone(&self) -> DeterministicOutputsForOneContext
fn clone(&self) -> DeterministicOutputsForOneContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more