A simple chat application demonstrating the statement distribution protocol via smoldot light client.
- A running local relay chain with at least one parachain
- Chain specs for both the relay chain and parachain
If you have a running local network with polkadot-omni-node or polkadot-parachain:
./dev.shThe script automatically extracts chain specs, builds smoldot, and starts the dev server at http://localhost:5173.
- Start a local network
- Extract chain specs from running nodes
public/chain-specs/relay.jsonpublic/chain-specs/parachain.json
- Run the dev server
npm run dev
- Open http://localhost:5173 in your browser
- Wait for smoldot to connect to both chains
- Enter a topic (32-byte hex) or use the default
- Click "Subscribe"
- Send messages - they'll be distributed to all peers on the same topic
The app uses smoldot's statement store protocol:
statement_subscribeStatement- Subscribe to topics on a chainstatement_submit- Broadcast signed statements to the networkstatement_statement(notification) - Receive statements from other peers
Messages are signed with Ed25519 keys (stored in localStorage) and distributed peer-to-peer without central servers.