pub trait Layer2ProtocolTrait {
// Required methods
fn initialize(&self) -> Result<(), Box<dyn Error + Send + Sync>>;
fn get_state(&self) -> Result<ProtocolState, Box<dyn Error + Send + Sync>>;
fn submit_transaction(
&self,
tx_data: &[u8],
) -> Result<String, Box<dyn Error + Send + Sync>>;
fn check_transaction_status(
&self,
tx_id: &str,
) -> Result<TransactionStatus, Box<dyn Error + Send + Sync>>;
fn sync_state(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>;
fn issue_asset(
&self,
params: AssetParams,
) -> Result<String, Box<dyn Error + Send + Sync>>;
fn transfer_asset(
&self,
transfer: AssetTransfer,
) -> Result<TransferResult, Box<dyn Error + Send + Sync>>;
fn verify_proof(
&self,
proof: Proof,
) -> Result<VerificationResult, Box<dyn Error + Send + Sync>>;
fn validate_state(
&self,
state_data: &[u8],
) -> Result<ValidationResult, Box<dyn Error + Send + Sync>>;
}Expand description
Legacy Layer2 protocol interface for synchronous implementations