LiopClient class acts as the primary dispatch coordinator for Agent Nodes in the Logic-Injection-on-Origin Protocol. It manages transport negotiation across heterogeneous topologies (direct HTTP/JSON-RPC gateways, authenticated perimeter proxies, and sovereign P2P gRPC channels), executes cryptographic handshakes, and dispatches WebAssembly or JavaScript logic modules to remote Data Nodes.
Unlike traditional Model Context Protocol (MCP) clients that pull massive raw datasets across the network via polling or streaming endpoints, LiopClient packages analytical intent into isolated micro-modules and transmits them directly to where the data resides.
Constructor & Configuration
The constructor configures the transport-level TLS credentials applied to all underlying gRPC connections.Constructor Parameters
LiopTlsOptions
Cryptographic credentials for mutual TLS (mTLS) or server verification over gRPC transport.
Connecting to the Mesh (connect)
The connect() method establishes identity, provisions machine-to-machine (M2M) OAuth 2.1 tokens, and mounts either a direct point-to-point gRPC channel or a distributed libp2p node.
Connection Options
string
Target endpoint in
host:port format. When specified, creates a direct high-speed LiopRpcClient targeting that endpoint. When omitted, LiopClient routes requests dynamically through the peer-to-peer DHT.object
Advanced connection settings covering authentication and peer-to-peer discovery.
Capability Discovery & Tool Invocations
LiopClient unifies tool discovery and execution under standard MCP schema shapes while enforcing post-quantum transport security under the hood.
In-Situ Logic Injection (WASM Bytecode)
For zero-data-movement pipelines, pass compiled WebAssembly bytecode directly via the optional second argument ofcallTool(). The remote enclave validates the bytecode through Guardian AST before executing it in an isolated V8 sandbox.
Mathematical Verification (ZK-Receipts)
Every analytical payload executed by a compliant LIOP Data Node generates a cryptographic ZK-Receipt. The client verifier automatically inspects receipts returned duringcallTool(), supporting all three protocol modes:
- Mode 0 (Version 1): HMAC-SHA256 session commitment negotiated via ML-KEM-768.
- Mode 2 (Version 2): Groth16 Zero-Knowledge SNARK proof over the BN254 pairing-friendly elliptic curve.
- Mode 3 (Version 2.1): Dual-layer hybrid receipt combining a Groth16 BN254 mathematical proof with an ML-DSA-65 post-quantum digital signature.
Pre-Flight Hardware TEE Attestation
When communicating with confidential virtual machines on untrusted cloud hosts, verify hardware root-of-trust evidence before initiating cryptographic handshakes:- AMD SEV-SNP: Inspects 1,184-byte
snp_report_theaders, checksREPORT_DATAat byte offset0x50againstSHA-256(publicKey || nonce), verifies VCEK certificate signatures, and ensures debug mode is disabled. - AWS Nitro Enclaves: Decodes CBOR-encoded
COSE_Sign1documents, checks PCR registers (PCR0,PCR1,PCR2), validatesuser_databinding, and verifies certificates up to AWS Nitro Root CA.
Low-Level gRPC Transport (LiopRpcClient)
For applications that need fine-grained control over gRPC channels, metadata streaming, or token injection without spawning a P2P node, use LiopRpcClient directly:
gRPC Channel Invariants
LiopRpcClient configures symmetric channel options to ensure long-running analytical queries do not drop across stateful NATs or corporate firewalls:
Public Methods Reference
Error Handling & Exception Catalog
LiopClient throws structured exceptions when security policies, authentication checks, or sandbox boundaries reject an execution.