import { Hex } from 'viem'; import { T as TCloudConfig, a as TCloudClient, a3 as SpendAuth } from './client-CaPP4njg.js'; import '@tangle-network/sandbox'; /** * tcloud/shielded — Ephemeral wallet generation, SpendAuth signing, private inference. * * import { TCloud } from 'tcloud' * const client = TCloud.shielded() // anonymous, no API key */ interface ShieldedWallet { /** Ephemeral spending private key (hex) */ privateKey: Hex; /** Derived address */ address: string; /** Credit account commitment */ commitment: Hex; /** Random salt */ salt: Hex; } /** Generate a new ephemeral shielded wallet */ declare function generateWallet(): ShieldedWallet; /** Sign a SpendAuth for a request */ declare function signSpendAuth(wallet: ShieldedWallet, params: { serviceId: bigint; jobIndex: number; amount: bigint; operator: Hex; nonce: bigint; expiry: bigint; chainId: number; creditsAddress: Hex; }): Promise; /** Estimate cost in tsUSD base units (6 decimals) */ declare function estimateCost(inputTokens: number, maxOutputTokens: number, inputPricePerM?: number, outputPricePerM?: number): bigint; interface AutoReplenishOptions { minBalance: bigint; replenishAmount: bigint; checkIntervalMs?: number; fundingSource: 'relayer' | 'direct'; relayerUrl?: string; fundingWalletKey?: Hex; tokenAddress?: Hex; } /** * Create a shielded TCloudClient that signs SpendAuth automatically. * Every request is anonymous — no API key, no identity. */ declare function createShieldedClient(config?: TCloudConfig & { wallet?: ShieldedWallet; operatorAddress?: Hex; chainId?: number; creditsAddress?: Hex; serviceId?: bigint; autoReplenish?: AutoReplenishOptions; }): TCloudClient & { wallet: ShieldedWallet; stopAutoReplenish: () => void; }; export { type AutoReplenishOptions, type ShieldedWallet, SpendAuth, createShieldedClient, estimateCost, generateWallet, signSpendAuth };