/** * On-chain spawn — register the leviathan via Metaplex Agent Registry. * * One transaction creates an MPL Core asset (the agent's NFT) AND attaches * an Agent Identity PDA. The Core asset's Asset-Signer PDA becomes the * leviathan's autonomous wallet (no private key — only this asset can sign for it). * * Reference: https://developers.metaplex.com/agents/mint-an-agent */ import { Keypair } from '@solana/web3.js'; import { CLAWD_MINT, DEFAULT_AGENT_NFT_METADATA } from '../config.js'; export interface SpawnOnchainInput { /** Solana keypair from identity/wallet.ts. This pays for the spawn and owns the agent. */ payerKeypair: Keypair; /** Display name (callsign). */ name: string; /** Public description shown in the agent registry. */ description: string; /** Spawn prompt — the seed instruction. Stored off-chain via the Metaplex API. */ spawnPrompt: string; /** Pubkey of the human creator. */ creator: string; /** RPC endpoint URL. */ rpcUrl: string; /** Optional pre-uploaded NFT metadata JSON URI. If absent, we ship a default Arweave-style URI. */ nftMetadataUri?: string; /** Network — 'mainnet' or 'devnet'. */ network?: 'mainnet' | 'devnet'; /** Optional service endpoints the agent exposes. */ services?: { name: string; endpoint: string; version?: string; }[]; } export interface SpawnOnchainResult { /** The MPL Core asset address — the agent's permanent on-chain identity. */ assetAddress: string; /** Asset Signer PDA — the agent's wallet that holds SOL/USDC/$CLAWD. */ assetSignerPda: string; /** Spawn transaction signature. */ signature: string; /** Network it was spawned on. */ network: 'solana-mainnet' | 'solana-devnet'; } /** Spawn a leviathan on-chain. One atomic tx → Core asset + Agent Identity PDA. */ export declare function spawnOnchain(input: SpawnOnchainInput): Promise; /** * Fetch the on-chain agent record + its asset-signer wallet. Used by survival/monitor and the CLI. */ export declare function readAgent(rpcUrl: string, assetAddress: string): Promise<{ asset: import("@metaplex-foundation/mpl-core").AssetV1; identity: any; assetSignerPda: string; registrationUri: any; }>; /** $CLAWD mint constant — re-exported for convenience. */ export { CLAWD_MINT, DEFAULT_AGENT_NFT_METADATA };