Adapter Layer Spec
Adapter Layer Specification - Chain Integration
Adapter Interface
Core Interface
pub trait ChainAdapter {
fn chain_id(&self) -> ChainId;
async fn get_balance(&self, address: &Address) -> Result<u64>;
async fn create_settlement(
&self,
tx: &SettlementTransaction,
) -> Result<SettlementTx>;
async fn submit_settlement(
&self,
settlement: &SettlementTx,
) -> Result<TxHash>;
async fn get_confirmation(
&self,
hash: &TxHash,
) -> Result<ConfirmationStatus>;
async fn estimate_fees(
&self,
settlement: &SettlementTx,
) -> Result<Fees>;
async fn get_latest_block(&self) -> Result<BlockNumber>;
}Ethereum Adapter
Implementation
Ethereum-Specific Features
Solana Adapter
Implementation
Solana-Specific Features
Bitcoin Adapter
Implementation
Bitcoin-Specific Features
Adapter Factory
Factory Pattern
Settlement Transaction Format
Format Definition
Common Fields
Error Handling
Error Types
Error Recovery
Testing
Test Adapter
Integration Tests
Performance
Optimization
Metrics
Security
Security Considerations
Threat Model
Conclusion
Last updated
