/** * Versioning Contract Handler * * Handles deployment and interaction with the ReactOnchainVersioning smart contract */ import type { PrivateKey } from '@bsv/sdk'; export declare const VERSIONING_ENABLED = true; export interface VersioningContractInfo { outpoint: string; originOutpoint: string; appName: string; owner: string; } /** * Deploy a new versioning contract * * @param paymentKey - Private key for paying transaction fees * @param originOutpoint - The outpoint of the initial app deployment * @param appName - Name of the application * @param initialVersion - Optional initial version to set (e.g., "1.0.0") * @param initialDescription - Optional description for initial version * @param satsPerKb - Optional fee rate in satoshis per KB * @returns Contract outpoint (txid_vout) */ export declare function deployVersioningContract(paymentKey: PrivateKey, originOutpoint: string, appName: string, initialVersion?: string, initialDescription?: string, satsPerKb?: number): Promise; /** * Add a new version to an existing versioning contract * * @param contractOutpoint - The outpoint of the versioning contract * @param paymentKey - Private key (must be the contract owner) * @param version - Version string (e.g., "1.0.0") * @param appOutpoint - The outpoint of the new app deployment * @param description - Changelog or version description * @param satsPerKb - Fee rate in satoshis per KB */ export declare function addVersionToContract(contractOutpoint: string, paymentKey: PrivateKey, version: string, appOutpoint: string, description: string, satsPerKb?: number): Promise; /** * Get the outpoint for a specific version * * @param contractOutpoint - The outpoint of the versioning contract (will be resolved to latest) * @param version - Version string to query * @returns The outpoint (txid_vout) for that version, or null if not found */ export declare function getOutpointByVersion(contractOutpoint: string, version: string): Promise; /** * Get contract information (optional helper function) * * @param contractOutpoint - The outpoint of the versioning contract * @returns Contract information including origin outpoint and app name */ export declare function getContractInfo(contractOutpoint: string): Promise; /** * Get version history from contract * * @param contractOutpoint - The outpoint of the versioning contract * @returns Array of version data (newest first, up to last 100) */ export declare function getVersionHistory(contractOutpoint: string): Promise>; /** * Check if a version already exists in the contract * Throws an error if the version exists to prevent wasted inscription costs * * @param contractOutpoint - The outpoint of the versioning contract * @param version - Version string to check * @throws Error if version already exists in contract */ export declare function checkVersionExists(contractOutpoint: string, version: string): Promise; /** * Get specific version details from contract * * @param contractOutpoint - The outpoint of the versioning contract * @param version - Version string to query * @returns Version details including outpoint, description, and timestamp */ export declare function getVersionDetails(contractOutpoint: string, version: string): Promise<{ version: string; outpoint: string; description: string; timestamp: string; } | null>; //# sourceMappingURL=versioningContractHandler.d.ts.map