pub struct CardanoTransactionsProofsV2 {
pub certificate_hash: String,
pub certified_transactions: Option<MkSetProofMessagePart<CardanoTransactionMessagePart>>,
pub non_certified_transactions: Vec<String>,
pub latest_block_number: BlockNumber,
pub security_parameter: BlockNumberOffset,
}unstable only.Expand description
A cryptographic proof for a set of Cardano transactions
Fields§
§certificate_hash: StringHash of the certificate that validates this proof Merkle root
certified_transactions: Option<MkSetProofMessagePart<CardanoTransactionMessagePart>>Transactions that have been certified
non_certified_transactions: Vec<String>Hashes of the transactions that could not be certified
latest_block_number: BlockNumberLatest block number that has been certified by the associated Mithril certificate
security_parameter: BlockNumberOffsetSecurity parameter that has been certified by the associated Mithril certificate
Implementations§
Source§impl CardanoTransactionsProofsV2Message
impl CardanoTransactionsProofsV2Message
Sourcepub fn transactions_hashes(&self) -> Vec<String>
pub fn transactions_hashes(&self) -> Vec<String>
Hashes of the Cardano transactions that have been certified
Source§impl CardanoTransactionsProofsV2Message
impl CardanoTransactionsProofsV2Message
Sourcepub fn new(
certificate_hash: &str,
certified_transactions: Option<MkSetProofMessagePart<CardanoTransactionMessagePart>>,
non_certified_transactions: Vec<String>,
latest_block_number: BlockNumber,
security_parameter: BlockNumberOffset,
) -> CardanoTransactionsProofsV2Message
pub fn new( certificate_hash: &str, certified_transactions: Option<MkSetProofMessagePart<CardanoTransactionMessagePart>>, non_certified_transactions: Vec<String>, latest_block_number: BlockNumber, security_parameter: BlockNumberOffset, ) -> CardanoTransactionsProofsV2Message
Create a new ProofsV2CardanoTransactionsMessage
Sourcepub fn verify(
&self,
) -> Result<VerifiedCardanoTransactionsV2, VerifyProofsV2Error>
pub fn verify( &self, ) -> Result<VerifiedCardanoTransactionsV2, VerifyProofsV2Error>
Verify that all the certified transactions proofs are valid
The following checks will be executed:
1 - Check that each Merkle proof is valid
2 - Check that all proofs share the same Merkle root
3 - Assert that there’s at least one certified transaction
If every check is okay, the hex encoded Merkle root of the proof will be returned.
Trait Implementations§
Source§impl Clone for CardanoTransactionsProofsV2Message
impl Clone for CardanoTransactionsProofsV2Message
Source§fn clone(&self) -> CardanoTransactionsProofsV2Message
fn clone(&self) -> CardanoTransactionsProofsV2Message
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for CardanoTransactionsProofsV2Message
impl<'de> Deserialize<'de> for CardanoTransactionsProofsV2Message
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardanoTransactionsProofsV2Message, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardanoTransactionsProofsV2Message, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Dummy for CardanoTransactionsProofsV2Message
impl Dummy for CardanoTransactionsProofsV2Message
Source§fn dummy() -> CardanoTransactionsProofsV2Message
fn dummy() -> CardanoTransactionsProofsV2Message
Return a dummy CardanoTransactionsProofsV2Message (test-only).
Source§impl Serialize for CardanoTransactionsProofsV2Message
impl Serialize for CardanoTransactionsProofsV2Message
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CardanoTransactionsProofsV2Message
Auto Trait Implementations§
impl Freeze for CardanoTransactionsProofsV2Message
impl RefUnwindSafe for CardanoTransactionsProofsV2Message
impl Send for CardanoTransactionsProofsV2Message
impl Sync for CardanoTransactionsProofsV2Message
impl Unpin for CardanoTransactionsProofsV2Message
impl UnsafeUnpin for CardanoTransactionsProofsV2Message
impl UnwindSafe for CardanoTransactionsProofsV2Message
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 more