minca
ApiSessionFunctions

Function: grantStore()

function grantStore(storage?, key?): object;

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

Where an app keeps its grants between visits: one per account, each made out to a key of its own, so two accounts never show peers one key.

Parameters

ParameterTypeDefault value
storage?KeyValueStore | null...
key?string'minca.grants'

Returns

forget

forget: (did) => void;

Parameters

ParameterType
didstring

Returns

void

get

get: (did) => KeptGrant | null;

Parameters

ParameterType
didstring

Returns

KeptGrant | null

list

list: () => readonly KeptGrant[] = all;

Every account, the one connected first first; an expired grant stays, to show and renew

Returns

readonly KeptGrant[]

save()

save(grant, keyName): void;

Parameters

ParameterType
grantGrant
keyNamestring

Returns

void

On this page