import { TransformResult, Ib, IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs'; import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs'; import { GetIbGibOpts, GetIbGibResult, PutIbGibOpts, PutIbGibResult, DeleteIbGibOpts, DeleteIbGibResult, SpecialIbGibType, IbGibTimelineUpdateInfo } from '../../common/other/other-types.mjs'; import { TagIbGib_V1 } from '../../common/tag/tag-types.mjs'; import { SpaceLockScope, IbGibSpaceLockIbGib, SpaceId, IbGibSpaceLockOptions, TxId, IbGibSpaceResultIbGib, IbGibSpaceResultData, IbGibSpaceResultRel8ns, SpaceType, SpaceSubtype, IbGibSpaceData } from './space-types.mjs'; import { IbGibSpaceAny } from './space-base-v1.mjs'; import { RootData } from '../../common/root/root-types.mjs'; import { IbGibCacheService } from '../../common/cache/cache-types.mjs'; import { BootstrapIbGib } from './bootstrap/bootstrap-types.mjs'; /** * Two spaces can be equivalent if they point to the same area. * * @returns true if the "same" space */ export declare function isSameSpace({ a, b, mustHaveSameData, }: { a: IbGibSpaceAny; b: IbGibSpaceAny; /** * If true, then only same exact internal data will do. * Be careful if they have last modified timestamps. */ mustHaveSameData?: boolean; }): boolean; /** * wrapper for dealing with a space. * * @returns legacy `GetIbGibResult` */ export declare function getFromSpace({ addr, addrs, isDna, space, force, }: GetIbGibOpts): Promise; /** * Wrapper for saving ibgib in a given space. * * ## warnings * * The given space doesn't have to work this way. * This is a convenience for me ATOW. */ export declare function putInSpace({ ibGib, ibGibs, isDna, force, space, }: PutIbGibOpts): Promise; /** * Wrapper for removing ibgib from the a given space, else the current space. */ export declare function deleteFromSpace({ addr, isDna, space, }: DeleteIbGibOpts): Promise; /** * Convenience function for persisting a transform result, which has * a newIbGib and optionally intermediate ibGibs and/or dnas. * * it persists these ibgibs into the given space, else the current space. */ export declare function persistTransformResult({ resTransform, space, force, }: { resTransform: TransformResult; space: IbGibSpaceAny; force?: boolean; }): Promise; export declare function getSpecialRel8dIbGibs({ type, rel8nName, space, }: { type: SpecialIbGibType; rel8nName: string; space: IbGibSpaceAny; }): Promise; /** * Gets one of the app's special ibGibs, e.g., TagsIbGib. * * When initializing tags, this will generate some boilerplate tags. * I'm going to be doing roots here also, and who knows what else, but each * one will have its own initialize specifics. * * @param initialize initialize (i.e. create) ONLY IF IbGib not found. Used for initializing app (first run). * * @see {@link createSpecial} * @see {@link createSpecial_Tags} */ export declare function getSpecialIbGib({ type, initialize, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, fnGetInitializing, fnSetInitializing, dontWarnIfNotExist, }: { type: SpecialIbGibType; initialize?: boolean; space: IbGibSpaceAny; /** * Only required if `initialize` is true. */ zeroSpace?: IbGibSpaceAny; /** * Only required if `initialize` is true. */ fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; /** * Only required if `initialize` is true. */ fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; /** * Initialization lock getter function. */ fnGetInitializing?: () => boolean; /** * Initialization lock setter function. * * Because we don't want to initialize while we're initializing. */ fnSetInitializing?: (x: boolean) => void; /** * if true, won't warn about non-existent/non-initialized things. * useful if you are just checking to see if a special ibgib exists. */ dontWarnIfNotExist?: boolean; }): Promise; /** * Gets a config addr from the current space via the given key * as the space's rel8n name. * * For example, for `key = tags`, a space may look like: * * ```json * { * ib: space xyz, * gib: e89ff8a1c4954db28432007615a78952, * rel8ns: { * past: [space xyz^21cb29cc353f45a491d2b49ff2f130db], * ancestor: [space^gib], * tags: [tags^99b388355f8f4a979ca30ba284d3a686], // <<< rel8n with name specified by key * } * } * ``` * * @param key config key * @returns addr in config if exists, else undefined */ export declare function getConfigAddr({ key, space, dontWarn, }: { key: string; space: IbGibSpaceAny; /** * if true, won't warn about non-existent/non-initialized things. * useful if you are just checking to see if a special ibgib exists. */ dontWarn?: boolean; }): Promise; export declare function setConfigAddr({ key, addr, space, zeroSpace, fnUpdateBootstrap, }: { key: string; addr: string; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; }): Promise; export declare function getCurrentRoot({ space, }: { space: IbGibSpaceAny; }): Promise | undefined>; export declare function setCurrentRoot({ root, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { root: IbGib_V1; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Every tjp should be related to one of the roots in a space. * * You should NOT relate every ibgib frame of a given ibGib. */ export declare function rel8ToCurrentRoot({ ibGib, linked, rel8nName, space, fnBroadcast, zeroSpace, fnUpdateBootstrap, }: { ibGib: IbGib_V1; linked?: boolean; rel8nName?: string; space: IbGibSpaceAny; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; }): Promise; /** * used atow (11/2023) for latest ibgib indexing. * i dont know any use cases right now to use this explicitly. * used in {@link registerNewIbGib} */ export declare function createAndSaveNewMetaStone({ targetIbGib, space, }: { targetIbGib: IbGib_V1; space: IbGibSpaceAny; }): Promise; /** * Used for tracking tjpAddr -> latest ibGibAddr. * * * Call this when you create a new ibGib. * * Need to put this in another service at some point, but crunch crunch * like pacman's lunch. * * ## notes * * * atow (11/2023)the new implementation of this creates a metastone for * the incoming ibgib and broadcasts if a timeline is involved. * * double-checks if previous latest addr is actually older. */ export declare function registerNewIbGib({ ibGib, space, fnBroadcast, }: { ibGib: IbGib_V1; space: IbGibSpaceAny; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Performs a rel8 transform on the special ibgib corresponding to the incoming * `type`. * * ## special ibgibs * * much metadata configuration is stored via "special" ibgibs. Most of these are * tracked in a space's ibgib directly, and the space itself is tracked in the * bootstrap. So when storing configuration data, I usually create a new special * ibgib. this function performs the plumbing for the rel8 transform related to * that special ibgib. * * ## notes * * * special ibgib must exist in the space, i.e. previously initialized * * i'm using this atm for mainly the local ionic space, but sometimes * might be good in sync space, i dunno at this point. * * I've migrated a lot of local space behavior into this space-agnostic file. * * @returns new special ibgib addr */ export declare function rel8ToSpecialIbGib({ type, rel8nName, ibGibsToRel8, ibGibsToUnRel8, addrsToUnRel8, linked, severPast, deletePreviousSpecialIbGib, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { /** * the "name" of the special ibgib. * * This will drive deterministically what the special ibgib's `ib` will be, * among other things. */ type: SpecialIbGibType; /** * The rel8nName by which to rel8 the target incoming `ibGibsToRel8`. */ rel8nName: string; /** * multiple ibgibs to rel8 */ ibGibsToRel8?: IbGib_V1[]; /** * multiple ibgibs to UNrel8. * YOU CANNOT SET BOTH {@link ibGibsToUnRel8} AND {@link addrsToUnRel8} * There is no technical reason for this, I'm just too tired to implement * yagni overhead. * @see {@link addrsToUnRel8} */ ibGibsToUnRel8?: IbGib_V1[]; /** * alternatively just specify addrs to unrel8. * YOU CANNOT SET BOTH {@link ibGibsToUnRel8} AND {@link addrsToUnRel8} * There is no technical reason for this, I'm just too tired to implement * yagni overhead. * @see {@link ibGibsToUnRel8} */ addrsToUnRel8?: IbGibAddr[]; /** * If linked, then the rel8nName will only contain one address, i.e. the * last rel8d ibgib's address. * * This depends on your use case. */ linked?: boolean; /** * Clears out the special.rel8ns.past array to an empty array. * * {@see deletePreviousSpecialIbGib} for driving use case. */ severPast?: boolean; /** * Deletes the previous special ibGib. * * ## driving use case * * the latest ibGib is one that is completely ephemeral. It doesn't get attached * to the current root, and it only has the current instance. So we don't want to * keep around past incarnations. */ deletePreviousSpecialIbGib?: boolean; /** * The space in which the special ibgib resides. */ space: IbGibSpaceAny; /** * The default zero space that contains metaspace information, i.e. * bootstrap ibgib, space ibgibs, etc. */ zeroSpace: IbGibSpaceAny; /** * The function by which to update the bootstrap ibgib. * * This is necessary, because when you update a special ibgib, * the address of that special ibgib must be updated in the given * `space`. This will require an update to the space's address, which * itself is tracked in the bootstrap ibgib. */ fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; /** * Use this if you want to broadcast the new space's address after this * function performs the rel8 transform. */ fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function getTjpIbGib({ ibGib, naive, space, }: { ibGib: IbGib_V1; naive?: boolean; space: IbGibSpaceAny; }): Promise | undefined>; /** * Routing function to various `create_____` functions. * * @returns address of newly created special. */ export declare function createSpecial({ type, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { type: SpecialIbGibType; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Creates a new special ibgib, persists it and if not skipped, relates * it to the current root. * * @returns newly created ibgib (not just address) */ export declare function createSpecialIbGib({ type, skipRel8ToRoot, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { type: SpecialIbGibType; skipRel8ToRoot?: boolean; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Creates a new tags^gib instance (unique to current space), as well as * default initial tags, e.g. "home", "favorites", etc., and relates these * individual tags to the tags ibGib itself. * * Stores the tags ibGib's addr in config. */ export declare function createSpecial_Tags({ space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * 1. Creates a new tag ibgib with the given properties. * 2. Persists graph in given {@link space} * 3. Registers the new tag ibgib in that space, using the given * {@link fnUpdateBootstrap} and {@link fnBroadcast} functions. * 4. Relates the new tag to the special tags ibgib. * * @returns the new tag ibgib and new tags address. */ export declare function createTagIbGibAndSundry({ text, icon, description, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { text: string; icon?: string; description?: string; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise<{ newTagIbGib: TagIbGib_V1; newTagsAddr: string; }>; export declare function createSpecial_Roots({ space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function createSpecial_Robbots({ space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function createSpecial_Apps({ space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function createApp({ defaultAppData, defaultAppRel8ns, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { /** * object that contains all of the default "data" for the app. Data here * does not mean an app's data like other apps. In ibgib, data is * everywhere. This means particularly the defalut app ibGib's data, i.e. * `ibGib.data`. */ defaultAppData: any; defaultAppRel8ns: any; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Relates the given tag to the TagsIbGib, saves the generated * TagsIbGib and updates the settings to point to the new TagsIbGib. * * @param tagIbGib to add to Tags */ export declare function rel8TagToTagsIbGib({ tagIbGib, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { tagIbGib: IbGib_V1; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; /** * Throws an error if any duplicates found in either array. * * ## notes * * Only pass in ibGib or ibGibAddrs, not both. Warns if both are passed in though. * * @throws if both params are falsy or if addrs || mapped addrs contains duplicates. */ export declare function throwIfDuplicates({ ibGibs, ibGibAddrs, }: { ibGibs?: IbGib_V1[]; ibGibAddrs?: IbGibAddr[]; }): void; export declare function getSpaceLockAddr({ space, scope, }: { space: IbGibSpaceAny; scope: SpaceLockScope; }): IbGibAddr; /** * Executes some function `fn` against/in a given `space` while * performing lock plumbing in that space. * * By this, I mean that this function takes care of acquiring the lock, * attempting retries according to the parameters, and then unlocking * the space regardless of result/error. * * @returns result of inner `fn` with `TResult` */ export declare function execInSpaceWithLocking({ space, scope, secondsValid, maxDelayMs, fn, callerInstanceId, maxLockAttempts, }: { space: IbGibSpaceAny; scope: string; secondsValid: number; /** * If resource locked, will delay at max this ms. */ maxDelayMs?: number; fn: () => Promise; /** * for use differentiating among tabs. * * ## intent * the idea is the ibgibs service has an instance id and passes it in here. */ callerInstanceId?: string; /** * if given, will try to acquire lock at most this many times, else * will default to {@link DEFAULT_MAX_DELAY_RETRY_LOCK_ACQUIRE_ATTEMPTS}. */ maxLockAttempts?: number; }): Promise; /** * Gets the bootstrap ibgib in the given `zeroSpace`. * * @example * * ```json * { * "ib":"bootstrap", * "gib":"gib", * "data":{ * "defaultSpaceId":"d455d9a72807617634ccbf1e532b71037c45762f824ec85fcd9a4c2275562f33", * "spaceIds":["d455d9a72807617634ccbf1e532b71037c45762f824ec85fcd9a4c2275562f33"] * }, * "rel8ns":{ * "d455d9a72807617634ccbf1e532b71037c45762f824ec85fcd9a4c2275562f33":[ * "witness space IonicSpace_V1 oij d455d9a72807617634ccbf1e532b71037c45762f824ec85fcd9a4c2275562f33^B336251655E8C56B38E9E86F20E0E42E6C153785F1A0A798ADE6916E71CF055B" * ] * } * } * ``` * * @returns bootstrapIbGib if found, else null */ export declare function getValidatedBootstrapIbGib({ zeroSpace, }: { zeroSpace: IbGibSpaceAny; }): Promise; /** * So when loading the local user space, even if the class changes or default * constructors change, the internal `data` is loaded from file. */ export declare function getLocalSpace({ zeroSpace, bootstrapIbGib, localSpaceId, lock, callerInstanceId, fnDtoToSpace, localSpaceCacheSvc, }: { /** * A zero space is a space that is built with default settings that * is not specific to a user. * * This is the foundational space that all spaces share, out of which * a bootstrap ibgib can be found that will itself have rel8ns to other * spaces. * * ## notes * * This is what I was calling a zeroSpace, but that will in the future * mean a default space among a group of spaces. */ zeroSpace: IbGibSpaceAny; /** * bootstrap ibGib, if provided, which was found in the zero space. * The bootstrap ibgib should have a rel8n entry to the local space. * * ## future * * We will have multiple local spaces to choose from, with a default * being the one that we're referring to atow. */ bootstrapIbGib?: BootstrapIbGib; /** * If provided, will look for the space via this id in the bootstrap ibgib. * If not provided, will use the bootstrap ibgib's default spaceId. */ localSpaceId?: SpaceId; /** * If true, we will lock on getting the bootstrap ibgib (if needed), as * well as getting the user space. */ lock?: boolean; /** * for use differentiating among tabs. * * ## intent * the idea is the ibgibs service has an instance id and passes it in here. */ callerInstanceId: string; /** * function that turns the space dto into the space witness. * * ## intent * * When loading a space, the only part stored is the ibgib data. You still * need a function that hydrates a witness class with that data. */ fnDtoToSpace: (spaceDto: IbGib_V1) => Promise; /** * Optional caching service */ localSpaceCacheSvc?: IbGibCacheService; }): Promise; export declare function lockSpace({ space, scope, secondsValid, instanceId, }: IbGibSpaceLockOptions): Promise; export declare function unlockSpace({ space, scope, instanceId, }: IbGibSpaceLockOptions): Promise; /** * Updates the bootstrap^gib record in the default space data store * with the 'space' rel8n set to the `newSpaceAddr`. * * This way, if the app closes at this point, it will know to look at this * space when it loads. * * ## notes * * I'm probably typing this all over, but the bootstrap^gib is the * first record that the app looks at to know what space to load. * The space itself has configuration and has a proper gib hash * so it's verifiable. But the initial bootstrap^gib record is * NOT, since it only has 'gib' as its address (and thus its not hashed). * * In the future, this could be alleviated by asking other witnesses * "Hey what was my last bootstrap^gib hash", but there's no way to * do it beyond this without using some kind of authentication/secret(s) * that generate the record, i.e. encrypting bootstrap^gib cleverly. */ export declare function updateBootstrapIbGib({ space, zeroSpace, setSpaceAsDefault, createIfNotFound, }: { /** * space to add/replace in the bootstrap^gib ibgib. */ space: IbGibSpaceAny; /** * default "zero" space which contains a bootstrap^gib ibgib. */ zeroSpace?: IbGibSpaceAny; /** * set the space as the default local space in the bootstrap^gib ibgib. */ setSpaceAsDefault?: boolean; /** * If bootstrap not found, create a new one */ createIfNotFound?: boolean; }): Promise; /** * Persists a validated/mutated {@link BootstrapIbGib} record back into zeroSpace. */ export declare function persistBootstrapIbGibInZeroSpace({ zeroSpace, bootstrapIbGib, }: { zeroSpace: IbGibSpaceAny; bootstrapIbGib: BootstrapIbGib; }): Promise; /** * Deregisters a local user space (`spaceId`) from the `bootstrap^gib` primitive in `zeroSpace`. * * ## pre-checks * 1. Pre-check: Cannot delete if `bootstrapIbGib.data.spaceIds.length <= 1` (last space). * 2. Pre-check: Cannot delete if `spaceId === defaultSpaceId` (default space must be changed first). * 3. Pre-check: Verify `spaceId` is present in `bootstrapIbGib.data.spaceIds`. */ export declare function deregisterLocalSpaceFromBootstrap({ spaceId, zeroSpace, }: { spaceId: SpaceId; zeroSpace: IbGibSpaceAny; }): Promise; /** * Deletes the space's own ibGib record(s) from zeroSpace. */ export declare function deleteSpaceRecordFromZeroSpace({ spaceId, zeroSpace, }: { spaceId: SpaceId; zeroSpace: IbGibSpaceAny; }): Promise; export declare function getSpaceArgMetadata({ space }: { space: IbGibSpaceAny; }): string; export declare function getSpaceResultMetadata({ space }: { space: IbGibSpaceAny; }): string; /** * builds the space's ib based on either spaceData or space.data, depending on * what is passed in. if for some reason both are passed in, this does some * basic checking to be sure that they are the same data. * @returns generated spaceIb */ export declare function getSpaceIb({ space, spaceData, classname, }: { space?: IbGibSpaceAny; spaceData?: IbGibSpaceData; classname?: string; }): Ib; /** * determines if the given ib belongs to a space ibgib. * * atow (03/2024) checks to see if the ib starts with * * `${WITNESS_ATOM} ${SPACE_ATOM} ` */ export declare function isSpaceIb({ ib }: { ib: Ib; }): boolean; /** * atow (03/2024), (space-delimited) schema is... * * `${WITNESS_ATOM} ${SPACE_ATOM} ${classname} ${name} ${id} ${spaceType} ${spaceSubtype}` */ export declare function parseSpaceIb({ spaceIb, }: { spaceIb: Ib; }): { /** * currently this can be the classname OR undefined of the space. */ spaceClassname: string | undefined; /** * non-unique spaceName of the given space (i.e. most likely space.data.name) */ spaceName: string; /** * currently this returns EITHER SpaceId OR undefined. * * This is because of my using different schemas for local/outer spaces... * * (for better or worse) */ spaceId: SpaceId | undefined; /** * if undefined, by convention, this is a user space */ spaceType: SpaceType | undefined; /** * subtype, if applicable */ spaceSubtype: SpaceSubtype | undefined; }; /** * @deprecated * use `parseSpaceIb` */ export declare function getInfoFromSpaceIb({ spaceIb, }: { spaceIb: Ib; }): { /** * currently this can be SpaceId OR undefined. */ spaceClassname: string | undefined; /** * non-unique spaceName of the given space (i.e. most likely space.data.name) */ spaceName: string; /** * currently this returns EITHER SpaceId OR undefined. * * This is because of my using different schemas for local/outer spaces... * * (for better or worse) */ spaceId: SpaceId | undefined; }; /** * Helper function that generates a unique-ish id. * * atow this is just `return (await getUUID()).slice(0, DEFAULT_TX_ID_LENGTH);` * * ## notes * * The thinking is that it only has to be a couple characters in length * because this is supposed to only be a unique id within the scope of * a tx which has its own tjp (gib) used as the id for the entire communication * saga. * * @returns txId */ export declare function getNewTxId({ length, }?: { /** * length of txId * * @default DEFAULT_TX_ID_LENGTH */ length?: number; }): Promise; /** * wrapper for dealing with a space. * * convenience function for creating an arg ibgib to send to the given space * using Cmd/CmdModifiers for getting latest addrs. * * @returns space result ibgib from the given `space.witness` call. */ export declare function getLatestAddrs({ ibGibs, addrs, tjps, tjpAddrs, space, }: { ibGibs?: IbGib_V1[]; addrs?: IbGibAddr[]; tjps?: IbGib_V1[]; tjpAddrs?: IbGibAddr[]; space: IbGibSpaceAny; }): Promise>; /** * I'm making this because i want to archive on a special tags index ibgib. * But we can't allow archiving on any old special ibgib, like the 'roots' index. * so this checks to see if it's on the forbidden list (winging that atm), and if it * is then this throws. * * use this function inside of commands that act on ibgibs that are special. */ export declare function throwIfContextIsSpecial({ ibGib_Context, }: { ibGib_Context: IbGib_V1; }): void; export declare function trash({ ibGib_Context, rel8nName_Context, addr, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { ibGib_Context: IbGib_V1; rel8nName_Context: string; addr: IbGibAddr; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function archive({ ibGib_Context, rel8nName_Context, addr, space, zeroSpace, fnUpdateBootstrap, fnBroadcast, }: { ibGib_Context: IbGib_V1; rel8nName_Context: string; addr: IbGibAddr; space: IbGibSpaceAny; zeroSpace: IbGibSpaceAny; fnUpdateBootstrap?: (newSpace: IbGibSpaceAny) => Promise; fnBroadcast?: (info: IbGibTimelineUpdateInfo) => void; }): Promise; export declare function spaceNameIsValid(name: string): boolean; /** * wrapper for getting dependency graph from a space. * * NOTE: This calls the witness space with the command. This is NOT the * same as the logic helper in graph-helper.mts which performs the graph * traversal logic potentially in-memory or naively. */ export declare function getDependencyGraph({ space, ibGibAddrs, live, }: { space: IbGibSpaceAny; ibGibAddrs: IbGibAddr[]; live?: boolean; }): Promise<{ [addr: string]: IbGib_V1; } | null>; //# sourceMappingURL=space-helper.d.mts.map