Skip to content

Graphorin API reference v0.8.0


Graphorin API reference / @graphorin/channels / / ChannelAccessController

Interface: ChannelAccessController

Defined in: packages/channels/src/access.ts:107

The access controller consumed by the gateway. approve and revoke are the operator surface (CLI / REST wiring is application-side).

Stable

Properties

PropertyModifierTypeDefined in
policyreadonlyChannelAccessPolicyKindpackages/channels/src/access.ts:108

Methods

approve()

ts
approve(channelId, code): Promise<
  | PairedPeerRecord
| null>;

Defined in: packages/channels/src/access.ts:116

Operator approval of a pairing code. One-time: consumes the request and durably pairs the peer. Returns null when the code is unknown or expired (an expired code is also deleted).

Parameters

ParameterType
channelIdstring
codestring

Returns

Promise< | PairedPeerRecord | null>


check()

ts
check(identity): Promise<ChannelAccessDecision>;

Defined in: packages/channels/src/access.ts:110

Evaluate one inbound identity. Deterministic given store state + clock.

Parameters

ParameterType
identityChannelIdentity

Returns

Promise&lt;ChannelAccessDecision&gt;


listPaired()

ts
listPaired(channelId?): Promise<readonly PairedPeerRecord[]>;

Defined in: packages/channels/src/access.ts:120

List durably paired peers (operator surface).

Parameters

ParameterType
channelId?string

Returns

Promise&lt;readonly PairedPeerRecord[]&gt;


revoke()

ts
revoke(peer): Promise<void>;

Defined in: packages/channels/src/access.ts:118

Remove a durably paired peer.

Parameters

ParameterType
peerPairingPeerRef

Returns

Promise&lt;void&gt;