Skip to content

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

PropertyModifierTypeDescriptionDefined in
capabilitiesreadonlyChannelCapabilities-packages/channels/src/spi.ts:216
idreadonlystringStable channel id; becomes ChannelIdentity.channelId on inbound.packages/channels/src/spi.ts:215

Methods

deliver()

ts
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

ParameterType
payloadDeliveryPayload

Returns

Promise&lt;DeliveryReceipt&gt;


start()

ts
start(ctx): Promise<void>;

Defined in: packages/channels/src/spi.ts:218

Subscribe / start polling. Resolves once the adapter is receiving.

Parameters

ParameterType
ctxChannelRuntimeContext

Returns

Promise&lt;void&gt;


stop()

ts
stop(): Promise<void>;

Defined in: packages/channels/src/spi.ts:220

Stop receiving; idempotent.

Returns

Promise&lt;void&gt;