Skip to main content

Crate tpcp_std

Crate tpcp_std 

Source
Expand description

§tpcp-std

Async TPCP node for std environments, built on tokio and tokio-tungstenite.

Re-exports§

pub use node::TPCPNode;
pub use dlq::DLQ;

Modules§

dlq
identity
lwwmap
node
schema

Structs§

AckInfo
Acknowledgement metadata referencing the message being acknowledged.
AgentIdentity
Describes a TPCP agent.
AudioPayload
Audio data payload.
BinaryPayload
Generic binary data payload.
CRDTSyncPayload
CRDT state synchronization payload.
ChunkInfo
Chunked-transfer metadata for large payloads.
ImagePayload
Image data payload.
LWWMap
Last-Write-Wins CRDT map using BTreeMap (no_std compatible). Tie-breaking: timestamp > writer_id (lexicographic), matching Python’s LWWMap.
MessageHeader
Present on every TPCP message.
TPCPEnvelope
Top-level TPCP message container.
TelemetryPayload
Industrial IoT sensor data payload.
TelemetryReading
Single sensor telemetry reading.
TextPayload
Plain text content payload.
VectorEmbeddingPayload
Semantic vector embedding payload.
VideoPayload
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.