import type { HexString } from '../types/index.js'; /** Pre/post execution hook committed to alongside the script. */ export interface Callback { /** Expected script hash for the callback, from a nested computeScriptHash() call. */ hash: HexString; /** Expected msg.sender when executeCallback() is invoked. */ caller: HexString; } /** * Offline reimplementation of `OnchainPM.computeScriptHash()`. * * Avoids a live RPC call so scripts can be built and hashed without a running * node. Matches the on-chain `pure` function exactly: * * ```solidity * keccak256(abi.encodePacked( * keccak256(abi.encodePacked(commands)), * _hashBitmapSlots(state, stateBitmap), * stateBitmap, // uint128 — 16 bytes packed * state.length, // uint256 — 32 bytes packed * keccak256(abi.encode(callbacks)) * )) * ``` * * **Key property**: state slots whose bitmap bit is 0 (runtime) are excluded * from the hash. Runtime values can therefore change at execution time without * invalidating the Merkle proof. * * Pass `callbacks = []` for standard (non-callback) workflows. */ export declare function computeScriptHash(commands: HexString[], state: HexString[], stateBitmap: bigint, callbacks: Callback[]): HexString; //# sourceMappingURL=scriptHash.d.ts.map