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
| Parameter | Type |
|---|---|
node | Pick<P2PNode, "subscribe"> |
grant | Pick<Grant, "expiresAt"> |
on | { onExpired?: () => void; onRevoked?: (space) => void; } |
on.onExpired? | () => void |
on.onRevoked? | (space) => void |
Returns
How to stop watching
() => void