Interface: AccessHistory
Defined in: packages/core/src/space/roles.ts:314
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
current | readonly | AccessState | Who holds what once everything held is replayed | packages/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
| Parameter | Type |
|---|---|
seen | readonly 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
| Parameter | Type |
|---|---|
event | AccessEvent |
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
| Parameter | Type |
|---|---|
writer | string |
collection | string |
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
| Parameter | Type |
|---|---|
keys | readonly string[] |
max | number |
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
| Parameter | Type | Description |
|---|---|---|
record | { collection?: string; id: string; line?: number; root: string; seen: readonly string[]; writer?: string; } | - |
record.collection? | string | - |
record.id | string | - |
record.line? | number | - |
record.root | string | - |
record.seen | readonly string[] | - |
record.writer? | string | The key that signed it, its collection, and its place in that key's line there |
needs | Needs | - |
within? | readonly string[] | - |
Returns
knownInvite()
knownInvite(inviteKey): boolean;Defined in: packages/core/src/space/roles.ts:357
Whether any change held opens an invite with this key
Parameters
| Parameter | Type |
|---|---|
inviteKey | string |
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
| Parameter | Type |
|---|---|
did | string |
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
| Parameter | Type |
|---|---|
key | string |
root | string |
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
| Parameter | Type |
|---|---|
seen | readonly string[] |
Returns
AccessState | null
status()
status(id): EventStatus | null;Defined in: packages/core/src/space/roles.ts:318
What became of one change
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
EventStatus | null