minca
ApiSessionFunctions

Function: watchGrant()

function watchGrant(
   node, 
   grant, 
   on
): () => void;

Defined in: packages/core/src/session/connect.ts:601

Watches a node started under a grant: onExpired once its note runs out, onRevoked for each space where the home revoked its key.

Parameters

ParameterType
nodePick<P2PNode, "subscribe">
grantPick<Grant, "expiresAt">
on{ onExpired?: () => void; onRevoked?: (space) => void; }
on.onExpired?() => void
on.onRevoked?(space) => void

Returns

How to stop watching

() => void

On this page