Real-Time Control of Distributed Batteries with Blockchain-Enabled Market Export Commitments