Skip to main content

LockProvider

Trait LockProvider 

Source
pub trait LockProvider {
    // Required method
    fn lock_right(
        &self,
        right_id: Hash,
        commitment: Hash,
        owner: OwnershipProof,
        destination_chain: ChainId,
        destination_owner: OwnershipProof,
    ) -> Result<(CrossChainLockEvent, InclusionProof), CrossChainError>;
}
Expand description

Trait for locking a Right on a source chain.

Consumes the Right’s seal and returns the lock event data + inclusion proof.

Required Methods§

Source

fn lock_right( &self, right_id: Hash, commitment: Hash, owner: OwnershipProof, destination_chain: ChainId, destination_owner: OwnershipProof, ) -> Result<(CrossChainLockEvent, InclusionProof), CrossChainError>

Lock a Right for cross-chain transfer.

§Arguments
  • right_id — The unique identifier of the Right
  • commitment — The Right’s commitment hash
  • owner — Current owner’s ownership proof
  • destination_chain — Target chain ID
  • destination_owner — New owner on destination chain
§Returns

Lock event data and inclusion proof (chain-specific format)

Implementors§