pub struct MultiOracleTrieWithDiff {
pub multi_trie: MultiTrie<RangeInfo>,
pub oracle_numeric_infos: OracleNumericInfo,
}
Expand description
Data structure used to store adaptor signature information for numerical outcome DLC with multiple oracles where some difference between the outcomes of each oracle can be supported.
Fields§
§multi_trie: MultiTrie<RangeInfo>
The underlying trie of trie
oracle_numeric_infos: OracleNumericInfo
Information on the numeric representation used by each oracle.
Implementations§
Source§impl MultiOracleTrieWithDiff
impl MultiOracleTrieWithDiff
Sourcepub fn dump(&self) -> MultiOracleTrieWithDiffDump
pub fn dump(&self) -> MultiOracleTrieWithDiffDump
Dump the content of the trie for the purpose of serialization.
Sourcepub fn from_dump(dump: MultiOracleTrieWithDiffDump) -> MultiOracleTrieWithDiff
pub fn from_dump(dump: MultiOracleTrieWithDiffDump) -> MultiOracleTrieWithDiff
Restore a trie from a dump.
Trait Implementations§
Source§impl Clone for MultiOracleTrieWithDiff
impl Clone for MultiOracleTrieWithDiff
Source§fn clone(&self) -> MultiOracleTrieWithDiff
fn clone(&self) -> MultiOracleTrieWithDiff
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> DlcTrie<'a, MultiOracleTrieWithDiffIter<'a>> for MultiOracleTrieWithDiff
impl<'a> DlcTrie<'a, MultiOracleTrieWithDiffIter<'a>> for MultiOracleTrieWithDiff
Source§fn generate(
&mut self,
adaptor_index_start: usize,
outcomes: &[RangePayout],
) -> Result<Vec<TrieIterInfo>, Error>
fn generate( &mut self, adaptor_index_start: usize, outcomes: &[RangePayout], ) -> Result<Vec<TrieIterInfo>, Error>
Generate the trie using the provided outcomes and oracle information,
calling the provided callback with the CET index and adaptor point for
each adaptor signature.
Source§fn iter(&'a self) -> MultiOracleTrieWithDiffIter<'a> ⓘ
fn iter(&'a self) -> MultiOracleTrieWithDiffIter<'a> ⓘ
Returns an iterator to this trie.
Source§fn generate_verify(
&'a mut self,
secp: &Secp256k1<All>,
fund_pubkey: &PublicKey,
funding_script_pubkey: &Script,
fund_output_value: Amount,
outcomes: &[RangePayout],
cets: &[Transaction],
precomputed_points: &[Vec<Vec<PublicKey>>],
adaptor_sigs: &[EcdsaAdaptorSignature],
adaptor_index_start: usize,
) -> Result<usize, Error>
fn generate_verify( &'a mut self, secp: &Secp256k1<All>, fund_pubkey: &PublicKey, funding_script_pubkey: &Script, fund_output_value: Amount, outcomes: &[RangePayout], cets: &[Transaction], precomputed_points: &[Vec<Vec<PublicKey>>], adaptor_sigs: &[EcdsaAdaptorSignature], adaptor_index_start: usize, ) -> Result<usize, Error>
Generate the trie while verifying the provided adaptor signatures.
Source§fn generate_sign(
&'a mut self,
secp: &Secp256k1<All>,
fund_privkey: &SecretKey,
funding_script_pubkey: &Script,
fund_output_value: Amount,
outcomes: &[RangePayout],
cets: &[Transaction],
precomputed_points: &[Vec<Vec<PublicKey>>],
adaptor_index_start: usize,
) -> Result<Vec<EcdsaAdaptorSignature>, Error>
fn generate_sign( &'a mut self, secp: &Secp256k1<All>, fund_privkey: &SecretKey, funding_script_pubkey: &Script, fund_output_value: Amount, outcomes: &[RangePayout], cets: &[Transaction], precomputed_points: &[Vec<Vec<PublicKey>>], adaptor_index_start: usize, ) -> Result<Vec<EcdsaAdaptorSignature>, Error>
Generate the trie while creating the set of adaptor signatures.
Source§fn verify(
&'a self,
secp: &Secp256k1<All>,
fund_pubkey: &PublicKey,
funding_script_pubkey: &Script,
fund_output_value: Amount,
adaptor_sigs: &[EcdsaAdaptorSignature],
cets: &[Transaction],
precomputed_points: &[Vec<Vec<PublicKey>>],
) -> Result<usize, Error>
fn verify( &'a self, secp: &Secp256k1<All>, fund_pubkey: &PublicKey, funding_script_pubkey: &Script, fund_output_value: Amount, adaptor_sigs: &[EcdsaAdaptorSignature], cets: &[Transaction], precomputed_points: &[Vec<Vec<PublicKey>>], ) -> Result<usize, Error>
Verify that the provided signatures are valid with respect to the
information stored in the trie.
Auto Trait Implementations§
impl Freeze for MultiOracleTrieWithDiff
impl RefUnwindSafe for MultiOracleTrieWithDiff
impl Send for MultiOracleTrieWithDiff
impl Sync for MultiOracleTrieWithDiff
impl Unpin for MultiOracleTrieWithDiff
impl UnwindSafe for MultiOracleTrieWithDiff
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
Mutably borrows from an owned value. Read more