Expand description
§tpcp-std
Async TPCP node for std environments, built on tokio and tokio-tungstenite.
Re-exports§
Modules§
Structs§
- AckInfo
- Acknowledgement metadata referencing the message being acknowledged.
- Agent
Identity - Describes a TPCP agent.
- Audio
Payload - Audio data payload.
- Binary
Payload - Generic binary data payload.
- CRDT
Sync Payload - CRDT state synchronization payload.
- Chunk
Info - Chunked-transfer metadata for large payloads.
- Image
Payload - Image data payload.
- LWWMap
- Last-Write-Wins CRDT map using BTreeMap (no_std compatible). Tie-breaking: timestamp > writer_id (lexicographic), matching Python’s LWWMap.
- Message
Header - Present on every TPCP message.
- TPCP
Envelope - Top-level TPCP message container.
- Telemetry
Payload - Industrial IoT sensor data payload.
- Telemetry
Reading - Single sensor telemetry reading.
- Text
Payload - Plain text content payload.
- Vector
Embedding Payload - Semantic vector embedding payload.
- Video
Payload - Video data payload.
Enums§
- Intent
- Intent identifies the purpose of a TPCP message. Wire-format values must match the canonical Python/TS SDK exactly.
Constants§
- BROADCAST_
ID - Reserved UUID for broadcast/multicast messages.
- PROTOCOL_
VERSION - TPCP protocol version implemented by this crate.
Functions§
- canonical_
json - Serializes a serde_json Value to canonical JSON with sorted keys. Matches Python’s json.dumps(sort_keys=True, separators=(‘,’,‘:’)).
- sign
- Signs a JSON payload with an Ed25519 private key. Returns standard base64-encoded signature (matches Python’s base64.b64encode()).
- verify
- Verifies a standard base64-encoded Ed25519 signature.