/** * @module bin-helpers * * Centralized isomorphic helper functions for creating, hashing, persisting, * and registering BinIbGib_V1 binary stones. */ import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs'; import { MetaspaceService } from '../../witness/space/metaspace/metaspace-types.mjs'; import { IbGibSpaceAny } from '../../witness/space/space-base-v1.mjs'; import { BinIbGib_V1 } from './bin-types.mjs'; export interface CreateBinIbGibOpts { /** Raw binary data as Uint8Array or UTF-8 string */ data: Uint8Array | string; /** Optional extension (e.g. 'txt', 'png', etc.) without dot */ ext?: string; /** Optional encoding (e.g. 'base64') */ encoding?: string; /** Space to persist the binary stone to */ space?: IbGibSpaceAny; /** Metaspace to register the new ibgib with (and broadcast) */ metaspace?: MetaspaceService | any; } export interface CreateBinIbGibResult { binIbGib: BinIbGib_V1; binAddr: IbGibAddr; binHash: string; } /** * Creates a fully formed, content-addressed BinIbGib_V1 stone. * Computes SHA-256 binary hash, determines bin ib, computes the gib stone hash, * and optionally persists to the target space and registers with the metaspace. */ export declare function createBinIbGib({ data, ext, encoding, space, metaspace, }: CreateBinIbGibOpts): Promise; //# sourceMappingURL=bin-helpers.d.mts.map