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§
Sourcefn lock_right(
&self,
right_id: Hash,
commitment: Hash,
owner: OwnershipProof,
destination_chain: ChainId,
destination_owner: OwnershipProof,
) -> Result<(CrossChainLockEvent, InclusionProof), CrossChainError>
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 Rightcommitment— The Right’s commitment hashowner— Current owner’s ownership proofdestination_chain— Target chain IDdestination_owner— New owner on destination chain
§Returns
Lock event data and inclusion proof (chain-specific format)