pub struct MultiOracleTrie { /* private fields */ }Expand description
Data structure used to store adaptor signature information for numerical outcome DLC with t of n oracles where at least t oracles need to sign the same outcome for the contract to be able to close.
Implementations§
Source§impl MultiOracleTrie
impl MultiOracleTrie
Sourcepub fn dump(&self) -> MultiOracleTrieDump
pub fn dump(&self) -> MultiOracleTrieDump
Dump the trie information.
Sourcepub fn from_dump(dump: MultiOracleTrieDump) -> MultiOracleTrie
pub fn from_dump(dump: MultiOracleTrieDump) -> MultiOracleTrie
Recover a MultiOracleTrie from a dump.
Trait Implementations§
Source§impl Clone for MultiOracleTrie
impl Clone for MultiOracleTrie
Source§fn clone(&self) -> MultiOracleTrie
fn clone(&self) -> MultiOracleTrie
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, MultiOracleTrieIter<'a>> for MultiOracleTrie
impl<'a> DlcTrie<'a, MultiOracleTrieIter<'a>> for MultiOracleTrie
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) -> MultiOracleTrieIter<'a> ⓘ
fn iter(&'a self) -> MultiOracleTrieIter<'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 MultiOracleTrie
impl RefUnwindSafe for MultiOracleTrie
impl Send for MultiOracleTrie
impl Sync for MultiOracleTrie
impl Unpin for MultiOracleTrie
impl UnwindSafe for MultiOracleTrie
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