minca
ApiCoreInterfaces

Interface: AccessHistory

Defined in: packages/core/src/space/roles.ts:314

Properties

PropertyModifierTypeDescriptionDefined in
currentreadonlyAccessStateWho holds what once everything held is replayedpackages/core/src/space/roles.ts:316

Methods

at()

at(seen, within?): AccessState | null;

Defined in: packages/core/src/space/roles.ts:327

The state as of what seen names and saw, counting the changes valid in the whole history, or with within valid among what both name. Null until all of it is here.

Parameters

ParameterType
seenreadonly string[]
within?readonly string[]

Returns

AccessState | null


extend()

extend(event): AccessHistory | null;

Defined in: packages/core/src/space/roles.ts:359

The history with one more change, exactly as replaying all gives; null when only a whole replay can say

Parameters

ParameterType
eventAccessEvent

Returns

AccessHistory | null


forked()

forked(writer, collection): 
  | {
  event: string;
  from: number;
}
  | null;

Defined in: packages/core/src/space/roles.ts:351

Where a key's line for a collection forked, as the lowest place any applied change proves

Parameters

ParameterType
writerstring
collectionstring

Returns

| { event: string; from: number; } | null


forks()

forks(): readonly ForkedLine[];

Defined in: packages/core/src/space/roles.ts:353

Every key whose line for a collection forked, and from where

Returns

readonly ForkedLine[]


heads()

heads(): readonly string[];

Defined in: packages/core/src/space/roles.ts:320

The latest applied changes, which a new record's seen names: no revokes or fork proofs

Returns

readonly string[]


headsFor()

headsFor(keys, max): readonly string[];

Defined in: packages/core/src/space/roles.ts:322

At most max heads: first ones that saw the latest change to each of keys, then the most recent

Parameters

ParameterType
keysreadonly string[]
maxnumber

Returns

readonly string[]


judge()

judge(
   record, 
   needs, 
   within?
): RecordVerdict;

Defined in: packages/core/src/space/roles.ts:335

Whether a record stands: its key not revoked or forked past what covers it, needs met as of what it saw and as of the changes that stand, and no unseen removal of its account taking it. With within, for a version another cites, only changes the citer saw can take it away.

Parameters

ParameterTypeDescription
record{ collection?: string; id: string; line?: number; root: string; seen: readonly string[]; writer?: string; }-
record.collection?string-
record.idstring-
record.line?number-
record.rootstring-
record.seenreadonly string[]-
record.writer?stringThe key that signed it, its collection, and its place in that key's line there
needsNeeds-
within?readonly string[]-

Returns

RecordVerdict


knownInvite()

knownInvite(inviteKey): boolean;

Defined in: packages/core/src/space/roles.ts:357

Whether any change held opens an invite with this key

Parameters

ParameterType
inviteKeystring

Returns

boolean


named()

named(did): boolean;

Defined in: packages/core/src/space/roles.ts:355

Whether any founder, constitution or assignment names an account: it only grows

Parameters

ParameterType
didstring

Returns

boolean


revoked()

revoked(key, root): readonly string[];

Defined in: packages/core/src/space/roles.ts:349

The applied changes by an account that revoked one of its keys

Parameters

ParameterType
keystring
rootstring

Returns

readonly string[]


seenAs()

seenAs(seen): AccessState | null;

Defined in: packages/core/src/space/roles.ts:329

The state as its writer saw it: what seen names and saw, judged among themselves alone

Parameters

ParameterType
seenreadonly string[]

Returns

AccessState | null


status()

status(id): EventStatus | null;

Defined in: packages/core/src/space/roles.ts:318

What became of one change

Parameters

ParameterType
idstring

Returns

EventStatus | null

On this page