import { IbGib_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs"; import { Ib, IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs"; import { SyncData_V1, SyncSagaFrameOrigin, SyncIb_V1, SyncIbGib_V1, SyncSagaFrameDependencyGraph } from "./sync-types.mjs"; import { IbGibSpaceAny } from "../witness/space/space-base-v1.mjs"; import { SyncSagaConflictInfo } from "./sync-saga-message/sync-saga-message-types.mjs"; /** * Constructs the standard 'ib' string for a Sync frame. */ /** * Constructs the standard 'ib' string for a Sync frame. */ export declare function getSyncIb({ data, }: { data: SyncData_V1; }): Promise; /** * Parses a standard Sync 'ib' string. */ export declare function parseSyncIb({ ib, }: { ib: Ib; }): Promise; /** * @returns the name for a tempSpace in the sync */ export declare function getTempSpaceName(): Promise; /** * Creates an in-memory scratch space for sync saga transactions, avoiding * all disk I/O and lingering directories. */ export declare function createInMemoryTempSpace({ name, }?: { name?: string; }): Promise; /** * UNTESTED * * Checks if an {@link olderAddr} is the address of a past frame in the ibgib * with {@link newerAddr}. */ export declare function isPastFrame({ olderAddr, newerAddr, space, quietIfNewerMissing, }: { olderAddr: string; newerAddr: string; space: IbGibSpaceAny; quietIfNewerMissing?: boolean; }): Promise; /** * Gets a shallow dependency graph for a Sync Saga Frame. * * DOES NOT GET THE ENTIRE DEPENDENCY FRAME (INCLUDING PAST). * * Unlike standard `getDependencyGraph`, this does NOT traverse `ancestor` (history) or `past`. * It only retrieves the *content* of the current frame: * 1. The Frame itself. * 2. The Message Stone(s) (`rel8ns.msg`). * * This is used for efficient transmission of the "Current Step" without re-sending the entire history. */ export declare function getSyncSagaFrameDependencyGraph({ sagaIbGib, controlSpace, }: { sagaIbGib: SyncIbGib_V1; controlSpace: IbGibSpaceAny; }): Promise; /** * gets the {@link SyncSagaFrameDependencyGraph} for each step in the saga, * including the {@link sagaIbGib} passed in. * @returns ordered array of saga frame dependency graphs */ export declare function getFullSyncSagaHistory({ sagaIbGib, controlSpace, }: { sagaIbGib: SyncIbGib_V1; controlSpace: IbGibSpaceAny; }): Promise; /** * only validates this single frame. does not validate any dependencies or past. * @returns array of errors, empty if valid */ export declare function validateSyncSagaFrame({ sagaIbGib }: { sagaIbGib: SyncIbGib_V1; }): Promise; export declare function validateFullSyncSagaHistory({ history, }: { history: SyncSagaFrameDependencyGraph[]; }): Promise; export declare function putInSpace_dnasThenNonDnas({ ibGibs, space, }: { ibGibs: IbGib_V1[]; space: IbGibSpaceAny; }): Promise<{ payload_Dnas: IbGib_V1[]; payload_NonDnas: IbGib_V1[]; }>; /** * @see {@link SyncSagaFrameOrigin} */ export declare function getSyncSagaFrameOrigin({ sagaFrame, }: { sagaFrame: SyncIbGib_V1; }): SyncSagaFrameOrigin; /** * @returns the last delta frame's {@link SyncSagaMessageDeltaData_V1.conflicts} * in the given {@link sagaHistory}. * * ## intent * * we need to be able to get the final aggregated info on what happened with * conflicts and their resolutions. ATOW (02/02/2026) This exists in the final * delta frame in the saga. this is needed, e.g., in `getAllOrphanedAddresses` * * @see {@link getAllOrphanedAddresses} */ export declare function getFinalConflictsInfo({ sagaHistory, }: { sagaHistory: SyncSagaFrameDependencyGraph[]; }): Promise; export declare function getAllOrphanedAddresses({ sagaHistory, myTempSpace, }: { sagaHistory: SyncSagaFrameDependencyGraph[]; /** * we're getting at the graft info, which will be in the temp space that * the graft was performed in. */ myTempSpace: IbGibSpaceAny; }): Promise; /** * Derives a saga-specific session secret from the sender's master secret. * * Uses `KDF(senderSecret, sagaId)` via the `recursive_salt_wrap` strategy so * the session secret is: * - **Deterministic**: same inputs → same output (needed for the receiver to * independently reproduce the session keystone genesis). * - **Saga-bound**: different sagaId → completely different sessionSecret → * completely different session keystone S. * - **One-way**: knowing S cannot recover `senderSecret`. * * @param senderSecret - The sender's plaintext master secret (never transmitted). * @param sagaId - The unique UUID for this sync saga. * @returns The derived session secret string. */ export declare function deriveSessionSecret({ senderSecret, sagaId, }: { senderSecret: string; sagaId: string; }): Promise; /** * Extracts all unique domain ibgib addresses transferred across the given saga history. * * Traverses message stones in the saga frames, collecting payload addresses from * Ack (pushOfferInfos) and Delta frames (payloadAddrsDomain). */ export declare function getTransferredPayloadAddressesFromHistory({ sagaHistory, origin, }: { sagaHistory: SyncSagaFrameDependencyGraph[]; /** * If specified, filters frames originating from either 'sender' or 'receiver'. * If omitted, includes payload addresses from all frames in the history. */ origin?: SyncSagaFrameOrigin; }): IbGibAddr[]; //# sourceMappingURL=sync-helpers.d.mts.map