/** * Base Identity Client using Ports & Adapters pattern * * Uses AccountProvider (ReadClient + Signer + TxSender) instead of monolithic adapter * Supports prepareCalls for server-side preparation and client-side signing */ import type { AccountProvider, PreparedCall } from './types'; import type { Address } from 'viem'; import type { MetadataEntry } from '../types'; export declare class BaseIdentityClient { protected accountProvider: AccountProvider; protected contractAddress: Address; constructor(accountProvider: AccountProvider, contractAddress: Address); /** * Prepare a register call (server-side, no signing) * Returns PreparedCall that can be serialized and sent to client */ prepareRegisterCall(tokenUri: string, metadata?: MetadataEntry[]): Promise; /** * Register agent (requires AccountProvider with TxSender) */ registerWithMetadata(tokenUri: string, metadata?: MetadataEntry[]): Promise<{ agentId: bigint; txHash: string; }>; private stringToBytes; private bytesToHex; private extractAgentIdFromReceipt; /** * Set the token URI for an agent * Note: This is an implementation-specific extension (not in base spec). * Assumes implementation exposes setAgentUri with owner/operator checks. * @param agentId - The agent's ID * @param uri - New URI string */ setAgentUri(agentId: bigint, uri: string): Promise<{ txHash: string; }>; /** * Set on-chain metadata for an agent * Spec: function setMetadata(uint256 agentId, string key, bytes value) * @param agentId - The agent's ID * @param key - Metadata key * @param value - Metadata value */ setMetadata(agentId: bigint, key: string, value: string): Promise<{ txHash: string; }>; /** * Get the owner of an agent * Spec: Standard ERC-721 ownerOf function * @param agentId - The agent's ID */ getOwner(agentId: bigint): Promise; /** * Get the token URI for an agent * Spec: Standard ERC-721 tokenURI function * @param agentId - The agent's ID */ getTokenURI(agentId: bigint): Promise; } //# sourceMappingURL=BaseIdentityClient.d.ts.map