pub struct ValidationClient { /* private fields */ }Expand description
Client-side validation engine.
Receives consignments and seal consumption proofs, verifies them against local state and the cross-chain registry, and accepts or rejects state transitions.
Implementations§
Source§impl ValidationClient
impl ValidationClient
Sourcepub fn receive_consignment(
&mut self,
consignment: &Consignment,
anchor_chain: ChainId,
) -> ValidationResult
pub fn receive_consignment( &mut self, consignment: &Consignment, anchor_chain: ChainId, ) -> ValidationResult
Receive and validate a consignment from a peer.
This is the main entry point. It:
- Validates consignment structure
- Extracts commitments and verifies the chain
- Maps anchors to Rights and verifies seal consumption
- Updates local state if valid
Sourcepub fn verify_seal_consumption_event(
&mut self,
event: SealConsumptionEvent,
) -> Result<(), ValidationError>
pub fn verify_seal_consumption_event( &mut self, event: SealConsumptionEvent, ) -> Result<(), ValidationError>
Receive and verify a seal consumption event from any chain.
This is the cross-chain portability entry point. Any client can verify any chain’s seal consumption proof.
Sourcepub fn store(&self) -> &InMemoryStateStore
pub fn store(&self) -> &InMemoryStateStore
Get the state history store.
Sourcepub fn seal_registry(&self) -> &CrossChainSealRegistry
pub fn seal_registry(&self) -> &CrossChainSealRegistry
Get the cross-chain seal registry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ValidationClient
impl RefUnwindSafe for ValidationClient
impl Send for ValidationClient
impl Sync for ValidationClient
impl Unpin for ValidationClient
impl UnsafeUnpin for ValidationClient
impl UnwindSafe for ValidationClient
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