Core Lane can be used as a library to build custom sequencers, transaction processors, and state management tools. The library provides the core functionality for processing transactions, managing state, and interacting with Bitcoin.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lanelayer/core-lane/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Add Core Lane to yourCargo.toml:
Basic Usage
The library exports commonly used types and functions:Key Components
Core Lane’s library interface consists of three main components:State Management
StateManager: Persistent state storage for accounts, transactions, and intentsBundleStateManager: Staging area for batching state changes before committing
Transaction Execution
execute_transaction(): Process Core Lane transactions with full validationProcessingContext: Trait for providing execution context (state, Bitcoin client, network)
Bitcoin Integration
BitcoinRpcClient: Type-safe Bitcoin RPC client using corepccreate_bitcoin_rpc_client(): Factory function for creating RPC clients
Simple Example
Here’s a minimal example showing state management:Full Example with Bitcoin
For a complete example showing transaction execution with Bitcoin integration, see thesimple_sequencer example:
- Connecting to a Bitcoin RPC node
- Creating and managing state
- Building and signing transactions with Alloy
- Processing transactions through the execution engine
- Serializing and deserializing state
examples/simple_sequencer.rs in the repository for the full implementation.
Next Steps
- State Manager - Learn about state management and bundle operations
- Transaction Execution - Process transactions with full validation
- Bitcoin Client - Interact with Bitcoin RPC nodes