import { type Keyring, type KeysetWithSecrets, type MaybePartlyDecryptedGraph } from '@localfirst/crdx'; import { type TeamAction, type TeamContext, type TeamGraph } from './types.js'; /** * Decrypts a graph. * * This is a team-specific version of `decryptGraph` from crdx. When we're communicating with a * peer, we can't just use a single set of team keys to decrypt everything, because there might be * key rotations in links that we receive that we will need to decrypt subsequent links. When that * happens, each team member gets the new keys in a lockbox that's stored on the chain. So we need * to recurse through the chain, updating the keys if necessary before continuing to decrypt * further. */ export declare const decryptTeamGraph: ({ encryptedGraph, teamKeys, deviceKeys, }: { encryptedGraph: MaybePartlyDecryptedGraph; /** * We need the first-generation team keys to get started. If the team keys have been rotated, we * will find them in lockboxes that we can get to with our device keys. */ teamKeys: KeysetWithSecrets | KeysetWithSecrets[] | Keyring; /** * We need our device keys so that we can get the latest team keys from the graph if they've been * rotated. */ deviceKeys: KeysetWithSecrets; }) => TeamGraph; //# sourceMappingURL=decryptTeamGraph.d.ts.map