import type { Page } from 'playwright'; export interface AvatarHost { id: string; name: string; } /** Published avatars whose Marketplace page can host a candidate, from smallest rendition to largest (sizes are read at run time). */ export declare const AVATAR_HOSTS: AvatarHost[]; /** The control column: Base Female, the platform's reference body (the gate's own control). */ export declare const CONTROL_ITEM: AvatarHost; export interface HostRendition { itemId: string; name: string; packageId: string; version: string; cid: string; bytes: number; } /** The pinned model rendition of a published item, from its Package manifest. Null when it cannot be read. */ export declare function hostRendition(apiBase: string, host: AvatarHost): Promise; /** Pad a GLB to exactly `length` bytes with a trailing unknown-type chunk. Null when it cannot fit (too big, or not 4-aligned). */ export declare function padToLength(glb: Uint8Array, length: number): Buffer | null; export interface HostChoice { host: HostRendition; considered: HostRendition[]; } /** * The smallest host rendition that can carry the candidate (or `forced` when the caller names one). Throws a one-line, * actionable message when none can. */ export declare function pickHost(apiBase: string, candidateBytes: number, forced?: string): Promise; export interface SwapState { swapped: boolean; hostCid: string | null; paddedBytes: number; } /** * Answer the host item page's model request with the candidate, on THIS page only. `webBase`'s page asks the backend to * resolve the host's Package (POST .../continuum/public/resolve) and then fetches the model by content hash from a CDN. */ export declare function installCandidateSwap(page: Page, candidate: Buffer, host: HostRendition): Promise; /** Serve another clip when the page asks for the walk clip (`/anims/walk.glb`), so the page's OWN retargeter and DynamicsLayer * play it: the Marketplace viewer only ever selects `walk`. */ export declare function installClipOverride(page: Page, body: Buffer): Promise; export declare const clipSha256: (b: Uint8Array) => string;