/** * HederaCtx — the keyless heart of the server. * * Design contract: this server NEVER holds, reads, or asks for a private key. * - Read/query tools hit the public Mirror Node REST API (no auth). * - Write tools BUILD a transaction, freeze it, and return the unsigned bytes * (base64) plus a human summary. The caller signs & submits with their own * wallet / SDK / CLI. Nothing is ever executed from here. * * The only optional input is HEDERA_OPERATOR_ID — an *account id* (not a key) — * used as the default payer/treasury when building transactions. */ import { AccountId, Client, Transaction } from "@hashgraph/sdk"; import { type NetworkConfig } from "./networks.js"; export declare function resolveTxType(tx: Transaction): string; export interface BuildResult { /** Short transaction-type label, e.g. "TokenCreateTransaction" */ type: string; /** Frozen, unsigned transaction encoded as base64 */ base64: string; /** Generated transaction id (payer@valid-start) */ transactionId: string; } export declare class HederaCtx { readonly network: NetworkConfig; readonly operatorId?: AccountId; private _client?; constructor(); /** Node account ids for this network as SDK AccountId objects. */ get nodeAccountIds(): AccountId[]; /** * A network Client used only for offline operations (node list, fee schedules). * No operator/key is set — it is never used to execute anything. */ get client(): Client; /** Resolve the payer account: explicit arg → env operator → error. */ payer(payerAccountId?: string): AccountId; /** * Freeze a transaction for offline signing (build-only) and serialize to base64. * Sets a generated transaction id from the payer and the network's node accounts, * so the resulting bytes are valid to sign and submit as-is. */ build(tx: Transaction, payerAccountId?: string): BuildResult; /** Render a BuildResult as the standard tool response. */ render(result: BuildResult, summary: string): string; /** Build + render in one call. */ buildAndRender(tx: Transaction, summary: string, payerAccountId?: string): string; /** GET a Mirror Node REST path (keyless). `path` should start with "/api/v1/...". */ mirror(path: string): Promise; /** POST to a Mirror Node REST path (used for contracts/call eth_call reads). */ mirrorPost(path: string, body: unknown): Promise; explorerTx(txId: string): string; } /** Pretty-print any JSON payload for tool output. */ export declare function json(value: unknown): string;