Adapter Contract Specification
Version: 0.1.0-draftOverview
Adapters translate between NTL signals and external protocols. This document specifies the interface that all adapters MUST implement.Interface
ExternalPayload
The generic container for external protocol data:AdapterCapabilities
Adapters declare their capabilities:Health States
| State | Description | Behavior |
|---|---|---|
Healthy | Operating normally | Full throughput |
Degraded | Partial functionality | Reduced throughput, increased timeouts |
Unhealthy | Not functioning | Queues signals, emits health warnings |
Registration
Adapters MUST register with their node:- Appear in node health checks
- Are included in discovery signals
- Can be queried via the node management interface
Correlation Requirements
Adapters that support correlation (request-response patterns) MUST:- Generate a signal with a unique ID for each incoming request
- Hold the external connection open
- Match response signals by
correlation_id - Enforce a configurable timeout (default: 30 seconds)
- Return an appropriate error to the external client on timeout
Standard Adapters
The NTL reference implementation MUST include:| Adapter | Protocol | Module ID |
|---|---|---|
| Web2 | HTTP/1.1, HTTP/2, WebSocket, gRPC | web2-v1 |
| Web3 | EVM chains, DID verification | web3-v1 |
| Legacy | REST, SOAP (configuration-driven) | legacy-v1 |