Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth/src/invitation/possession.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { verifyGraphProof } from './verifiedGraphProof.js'
import { type TeamLink } from 'team/types.js'
import { type TeamLink } from '../team/types.js'
import { redactKeys } from '@localfirst/crdx'
import { signatures, DEVICE_POSSESSION, type Base58, type Payload } from '@localfirst/crypto'
import { assert } from '@localfirst/shared'
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/invitation/validate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { verifyGraphProof } from './verifiedGraphProof.js'
import { type TeamLink } from 'team/types.js'
import { type TeamLink } from '../team/types.js'
import { INVITATION_PROOF, type Base58 } from '@localfirst/crypto'
import { deviceIdentityIsValid } from 'device/index.js'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/invitation/verifiedGraphProof.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { hash, signatures, type SignedMessage, type Payload } from '@localfirst/crypto'
import { type TeamLink } from 'team/types.js'
import { type TeamLink } from '../team/types.js'
import { pack, unpack } from 'msgpackr'
import { getLinkValidationOwner } from '@localfirst/crdx'

Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/lockbox/CheckedKeyStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type KeysetWithSecrets } from '@localfirst/crdx'
import { asymmetric, hash, type Payload } from '@localfirst/crypto'
import { assert } from '@localfirst/shared'
import { pack, unpack } from 'msgpackr'
import { isUnsafeScopeName } from 'team/unsafeScopeName.js'
import { isUnsafeScopeName } from '../team/unsafeScopeName.js'
import { keysetCommitment } from './keysetCommitment.js'
import { isLockboxCollection, snapshotLockbox } from './snapshot.js'
import { isKeyManifest, isRecipientManifest, type Lockbox } from './types.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/team/Team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import * as invitations from 'invitation/index.js'
import { type InvitationClaim, type ProofOfInvitation } from 'invitation/index.js'
import { normalize } from 'invitation/normalize.js'
import * as lockbox from 'lockbox/index.js'
import { CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { CheckedKeyStore } from '../lockbox/CheckedKeyStore.js'
import { type AddRoleInput, ADMIN, type Role } from 'role/index.js'
import { castServer } from 'server/castServer.js'
import { type Host, type Server } from 'server/types.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/team/decryptTeamGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
type TeamState,
} from './types.js'
import { assert, Logger } from '@localfirst/shared'
import { CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { CheckedKeyStore } from '../lockbox/CheckedKeyStore.js'

/**
* Decrypts a graph.
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/src/team/lockboxAuthorization.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommitmentIndex } from 'lockbox/commitmentIndex.js'
import { isLockboxCollection, isLockboxSnapshot } from 'lockbox/snapshot.js'
import { CommitmentIndex } from '../lockbox/commitmentIndex.js'
import { isLockboxCollection, isLockboxSnapshot } from '../lockbox/snapshot.js'
import { ROOT, type Keyset } from '@localfirst/crdx'
import { isBase58KeyOfLength } from '@localfirst/crypto'
import { type Logger } from '@localfirst/shared'
Expand Down
8 changes: 4 additions & 4 deletions packages/auth/src/team/selectors/keyMap.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type KeysetWithSecrets } from '@localfirst/crdx'
import { CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { CheckedKeyStore, type KeyMap } from '../../lockbox/CheckedKeyStore.js'
import { type TeamState } from 'team/types.js'

export type { KeyMap } from 'lockbox/CheckedKeyStore.js'

/** Select reachable keysets by scope and generation from the current state's deliveries. */
export const keyMap = (
state: TeamState,
deviceKeys: KeysetWithSecrets,
checkedKeys = new CheckedKeyStore()
) => checkedKeys.keyMap(state.lockboxes, deviceKeys)
): KeyMap => checkedKeys.keyMap(state.lockboxes, deviceKeys)

export { type KeyMap } from '../../lockbox/CheckedKeyStore.js'
2 changes: 1 addition & 1 deletion packages/auth/src/team/selectors/keys.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type KeyMetadata, type KeyScope, type KeysetWithSecrets } from '@localfirst/crdx'
import { keyMap } from './keyMap.js'
import { type CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { type CheckedKeyStore } from '../../lockbox/CheckedKeyStore.js'
import { type TeamState } from 'team/types.js'
import { assert } from '@localfirst/shared'

Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/team/selectors/teamKeyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type KeysetWithSecrets, createKeyring } from '@localfirst/crdx'
import { type TeamState } from 'team/types.js'
import { KeyType } from 'util/types.js'
import { keyMap } from './keyMap.js'
import { type CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { type CheckedKeyStore } from '../../lockbox/CheckedKeyStore.js'

const { TEAM } = KeyType

Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/team/selectors/visibleKeys.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type KeysetWithSecrets } from '@localfirst/crdx'
import { CheckedKeyStore } from 'lockbox/CheckedKeyStore.js'
import { CheckedKeyStore } from '../../lockbox/CheckedKeyStore.js'
import { type TeamState } from 'team/types.js'

/** Keysets reachable through the supplied state's lockboxes, excluding the starting keyset. */
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/src/team/transforms/collectLockboxes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { appendLockboxes } from 'lockbox/snapshot.js'
import { appendLockboxes } from '../../lockbox/snapshot.js'
import { type Logger } from '@localfirst/shared'
import { authorizedLockboxes, extendEstablishedCommitments } from 'team/lockboxAuthorization.js'
import { authorizedLockboxes, extendEstablishedCommitments } from '../lockboxAuthorization.js'
import {
isLockboxCarrierAction,
SignerKind,
Expand Down
2 changes: 1 addition & 1 deletion packages/crdx/src/graph/validationOwner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Hash } from 'util/types.js'
import { type Hash } from '../util/types.js'

type Owner = { hash: Hash }

Expand Down
Loading