/** * @module meta-stone helper/util/etc. functions * * this is where you will find helper functions like those that generate * and parse ibs for meta-stone. */ import { Ib, IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs'; import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs'; import { MetaStoneData_V1, MetaStoneRel8ns_V1, MetaStoneIbGib_V1, MetaStoneIbInfo } from './meta-stone-types.mjs'; export declare function validateCommonMetaStoneIb({ ib, }: { ib: Ib; }): string[]; export declare function validateCommonMetaStoneData({ data, }: { data?: MetaStoneData_V1; }): string[]; export declare function validateCommonMetaStoneRel8ns({ rel8ns, }: { rel8ns?: MetaStoneRel8ns_V1; }): string[]; /** * performs validation on the ib, data and rel8ns, as well as validates the * ibgib intrinsically (i.e. ensures the gib hash is correct) * @returns errors array if any found, otherwise undefined (if no errors) */ export declare function validateCommonMetaStoneIbGib({ ibGib, }: { ibGib: MetaStoneIbGib_V1; }): Promise; /** * validates the given `data` and builds the ib based on that data. * * _NOTE: This is **NOT** the function to use to build a metastone based a target ibgib._ * * @returns ib shaped for metastone (atow 11/2023 has tjpGib,n,timestampInTicks) */ export declare function getMetaStoneIb({ data, classname, }: { data: MetaStoneData_V1; classname?: string; }): Ib; /** * Current schema is `${META_STONE_ATOM} ${data.targetData.tjpGib} ${data.targetData.n} ${targetTimestampInTicks}`; * * NOTE this ib is space-delimited */ export declare function parseMetaStoneIb({ ib, }: { ib: Ib; }): MetaStoneIbInfo; /** * metastone ibgibs are for things like helping to keep track of the latest * ibgib in a timeline (similar to the HEAD pointer in e.g. git). * * @returns true if `addr` is for a metastone ibgib, else false */ export declare function isMetaStone({ addr, ibGib, }: { addr?: IbGibAddr; ibGib?: IbGib_V1; }): boolean; /** * factory function that generates a metastone (constant) ibgib based on the * given `ibGib`. */ export declare function newUpMetaStone({ targetIbGib, }: { targetIbGib: IbGib_V1; }): Promise; //# sourceMappingURL=meta-stone-helper.d.mts.map