/**
* HTML Inscription Orchestration
*
* Handles the inscription of index.html as a 1-sat ordinal chain,
* similar to the versioning inscription pattern.
*
* Key features:
* - First deployment: Creates initial HTML ordinal using createOrdinals
* - Subsequent deployments: Spends previous HTML UTXO using sendOrdinals
* - Supports :-1 resolution for always fetching latest HTML
*
* Extracted from orchestrator.ts for better maintainability.
*/
import { PrivateKey } from '@bsv/sdk';
import type { FileReference, DependencyNode } from '../analysis/index.js';
import type { IndexerService } from '../../lib/service-providers/IndexerService.js';
import type { InscribedFile } from '../inscription/inscription.types.js';
import type { OrchestratorCallbacks } from '../orchestration/orchestration.types.js';
/**
* Result of HTML inscription
*/
export interface HtmlInscriptionResult {
entryPoint: InscribedFile;
finalHtmlOriginInscription: string;
txid?: string;
}
/**
* Prepares HTML content with all necessary rewrites and script injections
*
* @param fileRef - File reference from analysis
* @param filePath - Relative file path
* @param buildDir - Build directory
* @param urlMap - URL mapping for dependencies
* @param versioningOriginInscription - Optional versioning origin for version script
* @param serviceWorkerUrl - Optional service worker URL for SW registration
* @returns Prepared HTML content as Buffer
*/
export declare function prepareHtmlContent(fileRef: FileReference, filePath: string, buildDir: string, urlMap: Map, versioningOriginInscription?: string, serviceWorkerUrl?: string): Promise;
/**
* Creates the initial HTML ordinal inscription (first deployment)
*
* @param htmlContent - Prepared HTML content
* @param paymentKey - Private key for paying transaction fees
* @param indexer - Indexer service for broadcasting transaction
* @param destinationAddress - Destination address for the inscription
* @param satsPerKb - Satoshis per KB for fees
* @returns Inscribed file with origin outpoint
*/
export declare function createInitialHtmlOrdinal(htmlContent: Buffer, paymentKey: PrivateKey, indexer: IndexerService, destinationAddress: string, satsPerKb: number): Promise;
/**
* Updates the HTML ordinal by spending the previous HTML UTXO (subsequent deployments)
*
* @param htmlOriginInscription - The origin outpoint of the HTML inscription chain
* @param htmlContent - Prepared HTML content for this deployment
* @param paymentKey - Private key for paying transaction fees
* @param ordPk - Private key that owns the HTML ordinal (usually same as paymentKey)
* @param indexer - Indexer service for fetching UTXO and broadcasting
* @param destinationAddress - Destination address for the inscription
* @param satsPerKb - Satoshis per KB for fees
* @returns Inscribed file with new outpoint
*/
export declare function updateHtmlOrdinal(htmlOriginInscription: string, htmlContent: Buffer, paymentKey: PrivateKey, ordPk: PrivateKey, indexer: IndexerService, destinationAddress: string, satsPerKb: number): Promise;
/**
* Handles HTML inscription orchestration
*
* Determines whether to create a new HTML origin or update an existing one,
* prepares the content, and performs the inscription.
*
* @param htmlFiles - List of HTML file paths (should contain only index.html)
* @param graph - Dependency graph
* @param buildDir - Build directory
* @param urlMap - URL mapping for dependencies
* @param finalVersioningOriginInscription - Versioning origin inscription
* @param serviceWorkerUrl - Optional service worker URL
* @param htmlOriginInscription - Existing HTML origin (undefined for first deployment)
* @param paymentPk - Private key for payment
* @param indexer - Indexer service
* @param destinationAddress - Destination address
* @param satsPerKb - Satoshis per KB for fees
* @param dryRun - Whether this is a dry run
* @param version - Version string (for dry run mock txid)
* @param callbacks - Optional progress callbacks
* @returns HTML inscription result
*/
export declare function handleHtmlInscription(htmlFiles: string[], graph: Map, buildDir: string, urlMap: Map, finalVersioningOriginInscription: string | undefined, serviceWorkerUrl: string | undefined, htmlOriginInscription: string | undefined, paymentPk: PrivateKey, indexer: IndexerService, destinationAddress: string, satsPerKb: number | undefined, dryRun: boolean, version: string, callbacks?: OrchestratorCallbacks): Promise;
//# sourceMappingURL=inscriber.d.ts.map