Graphorin API reference v0.8.0
Graphorin API reference / @graphorin/channels / / ChannelAdapter
Interface: ChannelAdapter
Defined in: packages/channels/src/spi.ts:213
The adapter contract. One instance per channel account; the gateway drives the lifecycle (start on gateway start, stop on gateway stop) and calls deliver for outbound traffic.
Implementations live in application repositories and are validated against the conformance suite in @graphorin/channels/testkit.
Stable
Extended by
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
capabilities | readonly | ChannelCapabilities | - | packages/channels/src/spi.ts:216 |
id | readonly | string | Stable channel id; becomes ChannelIdentity.channelId on inbound. | packages/channels/src/spi.ts:215 |
Methods
deliver()
deliver(payload): Promise<DeliveryReceipt>;Defined in: packages/channels/src/spi.ts:225
Deliver one outbound payload. Throws ChannelDeliveryError after in-call retries are exhausted (D-14: no durable outbox).
Parameters
| Parameter | Type |
|---|---|
payload | DeliveryPayload |
Returns
Promise<DeliveryReceipt>
start()
start(ctx): Promise<void>;Defined in: packages/channels/src/spi.ts:218
Subscribe / start polling. Resolves once the adapter is receiving.
Parameters
| Parameter | Type |
|---|---|
ctx | ChannelRuntimeContext |
Returns
Promise<void>
stop()
stop(): Promise<void>;Defined in: packages/channels/src/spi.ts:220
Stop receiving; idempotent.
Returns
Promise<void>