/** * @file InkdClient.ts * @description Main client class for interacting with the Inkd Protocol. * Handles InkdToken minting, InkdVault inscriptions, and InkdRegistry operations. */ import type { PublicClient, WalletClient, Account, Chain, Transport } from "viem"; import { type IEncryptionProvider } from "./encryption"; import type { Address, InkdClientConfig, InkdTokenData, Inscription, ProtocolStats, MintOptions, InscribeOptions, InscribeResult, InscribeCostEstimate, TransactionResult } from "./types"; /** * The main Inkd Protocol client. * * @example * ```ts * import { InkdClient } from "@inkd/sdk"; * import { createWalletClient, createPublicClient, http } from "viem"; * import { baseSepolia } from "viem/chains"; * import { privateKeyToAccount } from "viem/accounts"; * * const inkd = new InkdClient({ * tokenAddress: "0x...", * vaultAddress: "0x...", * registryAddress: "0x...", * chainId: 84532, * }); * * inkd.connect(walletClient, publicClient); * await inkd.connectArweave("private-key"); * * // Mint an InkdToken * const { tokenId } = await inkd.mintToken(); * * // Inscribe data on it * const result = await inkd.inscribe(tokenId, Buffer.from("agent brain data"), { * contentType: "application/json", * name: "brain.json", * }); * ``` */ export declare class InkdClient { private config; private walletClient; private publicClient; private arweave; private encryption; constructor(config: InkdClientConfig); /** Connect wallet and public clients for on-chain interaction. */ connect(walletClient: WalletClient, publicClient: PublicClient): void; /** Connect Arweave storage client for file uploads. */ connectArweave(privateKey: string, irysUrl?: string, gateway?: string): Promise; /** Set a custom encryption provider (for Lit Protocol integration). */ setEncryptionProvider(provider: IEncryptionProvider): void; /** Mint a single InkdToken. Returns the new token ID. */ mintToken(options?: MintOptions): Promise; /** Batch mint multiple InkdTokens (max 10). */ private batchMintTokens; /** Inscribe data onto your InkdToken. Uploads to Arweave first. */ inscribe(tokenId: bigint, data: Buffer | Uint8Array | string, options?: InscribeOptions): Promise; /** Get all inscriptions on a token. */ getInscriptions(tokenId: bigint): Promise; /** Remove (soft-delete) an inscription. */ removeInscription(tokenId: bigint, index: number): Promise; /** Update an inscription with new data (creates a new version). */ updateInscription(tokenId: bigint, index: number, newData: Buffer | Uint8Array | string, contentType?: string): Promise; /** Grant temporary read access to a wallet. */ grantAccess(tokenId: bigint, wallet: Address, durationSeconds: number): Promise; /** Revoke read access from a wallet. */ revokeAccess(tokenId: bigint, wallet: Address): Promise; /** List an InkdToken for sale on the marketplace. */ listForSale(tokenId: bigint, price: bigint): Promise; /** Buy an InkdToken from the marketplace. */ buyToken(tokenId: bigint): Promise; /** Get token data for a specific InkdToken. */ getToken(tokenId: bigint): Promise; /** Get all InkdTokens owned by an address. */ getTokensByOwner(address: Address): Promise; /** Check if an address holds at least one InkdToken. */ hasInkdToken(address: Address): Promise; /** Estimate the cost of inscribing data. */ estimateInscribeCost(fileSize: number): Promise; /** Get protocol-wide statistics from the registry. */ getStats(): Promise; private requireWallet; private requirePublic; private requireArweave; private extractTokenIdFromLogs; private extractAllTokenIdsFromLogs; private extractInscriptionIndexFromLogs; } //# sourceMappingURL=InkdClient.d.ts.map