Connect physical data
to TWIX proof.
Any meter, gateway, sensor or application that can obtain a reading and sign bytes can submit TDAP records. TWIX does not require manufacturer support.
No API secret has to live on our server.
The device identity is its Ed25519 public key. The meter or gateway keeps the private key, builds the canonical record, hashes it and signs the raw 32-byte hash. The collector verifies the registered public key, sequence and previous-hash chain before accepting anything.
Register only the public identity.
In Admin → Devices, create a stable device ID and paste its 32-byte Ed25519 public key as base64url. Choose a visibility policy: public, hash_only (recommended default), or private. Batches are built from one visibility class at a time so a public proof cannot accidentally expose commitments from a restricted batch.
Device ID: meter:facility-a:main-001 Public key: n2E...base64url... Adapter: modbus Visibility: hash_only
Build the exact signed object.
{
"protocol": "twix-dap/0.1",
"device_id": "meter:facility-a:main-001",
"sequence": 1843,
"schema": "energy.meter.reading/1",
"measured_at": "2026-08-26T19:30:00Z",
"previous_hash": "d7ac...",
"payload": {
"value": "14832.771",
"unit": "kWh"
}
}Objects are key-sorted recursively, arrays retain order, whitespace is removed, and precision-sensitive decimal measurements are strings. JSON floating-point numbers are rejected by the reference collector.
Domain-separated commitment.
record_hash = SHA-256(
UTF8("TWIX-DAP-RECORD-v0.1") ||
0x00 ||
UTF8(canonical_record_json)
)
signature = Ed25519.sign(device_private_key, raw_32_byte_record_hash)The private key never appears in the API request.
POST the signed envelope.
curl -X POST https://validator.twixchain.com/api/ingest.php \ -H 'Content-Type: application/json' \ --data @signed-reading.json
{
"record": { "...": "canonical TDAP record" },
"record_hash": "64 lowercase hex characters",
"signature": "base64url Ed25519 signature"
}Success returns HTTP 201 with the accepted hash, collector receive time, sequence and visibility. Requests over 64 KiB are rejected. Replay/out-of-order sequence, bad previous hash, bad signature and unknown/expired devices are rejected.
Store the complete envelope anywhere you can afford to keep bytes.
The collector keeps a protected local copy for the reference implementation, but TDAP integrity does not depend on that specific disk. The exact signed envelope can be mirrored to ordinary shared hosting, S3-compatible object storage, Backblaze, a NAS, IPFS or archival media. When the bytes are retrieved later, the record hash, device signature and Merkle proof detect alteration.
The TWIX anchor preserves the commitment even if one storage host disappears. Verification still requires a surviving copy of the signed record/proof, so important data should be mirrored.
Cross-language implementations can test themselves.
Canonical JSON:
{"device_id":"meter:test:001","measured_at":"2026-08-26T20:00:00Z","payload":{"unit":"kWh","value":"14832.771"},"previous_hash":null,"protocol":"twix-dap/0.1","schema":"energy.meter.reading/1","sequence":1}
TDAP record hash:
3770ad8a5ff06fb05403926524dae336e3d1bf122ecdb145502822ab8ce03798Public endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/ingest.php | Signed device record ingestion |
| GET | /api/status.php | TWIX + platform status |
| GET | /api/metrics.php | Aggregate API health metrics |
| GET | /api/device.php?id=... | Device public identity |
| GET | /api/proof.php?hash=... | Public proof bundle when visibility permits |
| GET | /api/batch.php?root=... | Merkle batch and anchor state |
| GET | /api/openapi.json | OpenAPI 3.1 definition |
The meter does not need to know TWIX exists.
Read holding/input registers on a local gateway, scale according to meter documentation, then submit TDAP.
A gateway reads OBIS values, maps them to a TDAP schema and signs locally.
Subscribe to a trusted topic, normalize messages and sign them before ingestion.
Read building-management points through a gateway and attest selected measurements.
A Raspberry Pi/industrial gateway can count or parse local output and become the cryptographic device identity.
Poll a manufacturer/cloud API, preserve its source timestamp and add a gateway signature + collector timestamp.
Reference SDKs and integration examples
Never give a meter access to the validator key.
The meter agent runs as a separate process/user and owns only its device identity. On-chain anchoring uses a dedicated EVM signer. TWIX consensus remains independent if a meter, gateway, storage provider or API client fails.