Messaging Basics
Bootstrap an ECCP account, connect a client, and verify your first encrypted exchange.
Getting Started
ECCP works best when the roles stay clear: Layer 1 defines the contract, Layer 2 hosts the node, Layer 3 handles user experience, and Layer 4 adds optional ecosystem surfaces.
What You Need
- An ECCP-capable homeserver, either hosted by your team or provided by a trusted operator
- One client, such as PrivChat for mainstream UX or exine for operator-focused workflows
- A stable device identity so end-to-end keys survive session refreshes
Create the First Account
An ECCP account is always attached to a homeserver namespace. The provider can be public, private, invite-only, or self-hosted.
Bash snippet
Bash
curl -X POST https://chat.example.org/_eccp/client/v1/register \
-H "Content-Type: application/json" \
-d '{
"username": "ada",
"display_name": "Ada",
"password": "replace-me",
"device_name": "Ada Laptop"
}'Verify Device Identity
When the account is created, the client generates device keys and starts the first X25519 handshake. ECCP keeps account credentials and device identity separate so rotating a password does not silently replace your cryptographic state.
Send the First Encrypted Event
TypeScript snippet
TypeScript
import { ECCPClient } from "@eccp/sdk";
const client = new ECCPClient({
baseUrl: "https://chat.example.org",
accessToken: process.env.ECCP_ACCESS_TOKEN!
});
const room = await client.rooms.create({
visibility: "private",
name: "First encrypted room"
});
await client.rooms.send(room.id, {
type: "m.room.encrypted",
algorithm: "eccp.megolm.v1",
body: "Handshake complete."
});Check Cross-Device Sync
Open the same account on a second client and confirm that:
- The room appears without manual import.
- The device list is visible.
- The message history decrypts after key exchange completes.
Next Steps
- Continue to the Private Rooms guide for day-to-day room handling.
- Read the Protocol Concepts guide before building on Layer 1.
- Use the Federation guide when you are ready to connect your node to peers.