Technology

The engineering behind M2 Protocol.

M2 Protocol combines low-latency networking, secure device identity and programmable settlement into a single, coherent stack purpose-built for autonomous machine-to-machine interactions.

M2 Protocol is engineered as a lean, observable and programmable stack for machine-to-machine communication and settlement.

Instead of abstract marketing claims, the protocol is designed around concrete runtime guarantees: predictable handshake and identity flows, low-latency encrypted channels, native value transfer between devices, and full traceability of every interaction.

Design Principles

M2 Protocol is engineered under a few non-negotiable principles

Deterministic behavior

Machines must be able to predict outcomes with zero ambiguity.

Minimal overhead

Every microsecond and every byte counts in M2M communication.

Observable by design

Every interaction can be traced, inspected and monitored.

Crypto-native

Value transfer is a first-class citizen, not an afterthought.

These principles shape every layer of the protocol, from device identity to settlement.

Device Identity & Registry

Every device in M2 Protocol is represented by a signed, verifiable identity. Registration does not require exposing private keys or raw hardware identifiers – only cryptographic proofs.

M2 ProtocolM2 CLI
# Register a new device in the M2 Registry
$ m2ctl device register \
--id device-001 \
--type sensor.temperature \
--location "lab-eu-01" \
--pubkey 0x9b31...fd72
[INFO] Device identity created
[INFO] Device ID: device-001
[INFO] Registry entry: m2://devices/device-001
[OK] Device successfully registered in M2 Protocol
device-001.yaml
device_id: device-001
type: sensor.temperature
location: lab-eu-01
capabilities:
  - m2.channel.telemetry
  - m2.channel.alerts
auth:
  method: ed25519
  public_key: 0x9b31...fd72

Channels & Runtime Flow

Devices don't communicate arbitrarily. Every interaction starts with a mutual handshake and the creation of a dedicated M2 channel.

M2 ProtocolCHANNEL FLOW
# Device A opens a secure channel with Device B
$ m2ctl channel open \
--from device-001 \
--to device-042 \
--purpose telemetry
[HANDSHAKE] device-001 → device-042
[HANDSHAKE] device-042 → device-001
[CHANNEL] id: ch-7f92c1e8
[CHANNEL] mode: encrypted
[OK] Channel ch-7f92c1e8 is now active
M2 ProtocolMESSAGE SEND
# Send a message through the active channel
$ m2ctl channel send \
--channel ch-7f92c1e8 \
--payload '{ "temp_c": 21.3, "status": "ok" }'
[TX] ch-7f92c1e8 payload size=42B
[ACK] device-042 confirmed receipt

Settlement Engine

M2 Protocol includes a built-in settlement layer, allowing machines to transfer value without human intervention.

M2 ProtocolSETTLEMENT
# Device-001 pays Device-042
$ m2ctl settlement pay \
--from device-001 \
--to device-042 \
--amount 12.5 \
--asset M2 \
--ref ch-7f92c1e8
[SETTLEMENT] Preparing payment...
[SETTLEMENT] Route: device-001 → m2-settlement-node-eu → device-042
[SETTLEMENT] On-chain tx: 0x8ad4...b91c
[OK] 12.5 M2 transferred to device-042
Transaction Details
{
  "tx_id": "0x8ad4...b91c",
  "from": "device-001",
  "to": "device-042",
  "amount": 12.5,
  "asset": "M2",
  "channel": "ch-7f92c1e8",
  "status": "confirmed"
}

Security & Verification

All traffic is authenticated and observable. Invalid devices never get past the handshake phase.

M2 ProtocolSECURITY ALERT
# Suspicious device attempting to connect
$ m2ctl channel open \
--from device-999 \
--to device-001 \
--purpose control
[HANDSHAKE] device-999 → device-001
[ERROR] Unknown device: device-999
[SECURITY] Event logged: HANDSHAKE_REJECTED
[DENY] Channel request refused
Security Event Log
[SECURITY] 2025-06-12T08:21:09Z HANDSHAKE_REJECTED device-999 reason=unregistered
[SECURITY] 2025-06-12T08:21:10Z ALERT_RAISED severity=low scope=edge-test-lab

Observability by Design

Every interaction across M2 Protocol can be traced – from the first handshake to settlement.

M2 ProtocolTRACE VIEWER
TRACE: m2-flow-10483
[1] device-001 → REGISTRY action=lookup target=device-042
[2] device-001 ↔ device-042 action=handshake result=accepted
[3] channel ch-7f92c1e8 action=open mode=encrypted
[4] channel ch-7f92c1e8 action=message type=telemetry size=42B
[5] settlement engine action=payment amount=12.5 M2 status=confirmed

Developer-Friendly by Default

M2 Protocol exposes a simple SDK so developers can integrate machine-to-machine flows directly into their applications.

TypeScript Example
import { M2Client } from "@m2/protocol";

const client = new M2Client({ deviceId: "device-001" });

await client.handshake("device-042");

const channel = await client.openChannel({
  to: "device-042",
  purpose: "telemetry",
});

await channel.send({
  temp_c: 21.3,
  status: "ok",
});

await client.settle({
  to: "device-042",
  amount: 12.5,
  asset: "M2",
  reference: channel.id,
});