import type { SuiClient, SuiTransactionBlockResponseOptions } from "@mysten/sui/client"; import { type SignTx, SuiClientBase, type WaitForTxOptions } from "@polymedia/suitcase-core"; import { type PolymediaProfile } from "./types.js"; /** * Helps fetching Polymedia Profile data from the network. * Keeps an internal cache to avoid wasteful RPC requests. */ export declare class ProfileClient extends SuiClientBase { readonly profilePkgId: string; readonly registryId: string; protected readonly cachedAddresses: Map; protected readonly cachedObjects: Map; constructor(args: { profilePkgId: string; registryId: string; suiClient: SuiClient; signTx: SignTx; waitForTxOptions?: WaitForTxOptions; txRespOptions?: SuiTransactionBlockResponseOptions; }); /** * Find the profile associated to a single address. */ getProfileByOwner(lookupAddress: string, useCache?: boolean): Promise; /** * Find the profiles associated to multiple addresses. */ getProfilesByOwner(lookupAddresses: Iterable, useCache?: boolean): Promise>; /** * Get a single profile by its object ID. */ getProfileById(objectId: string, useCache?: boolean): Promise; /** * Get multiple profiles by their object IDs. */ getProfilesById(lookupObjectIds: string[], useCache?: boolean): Promise>; /** * Check if an address has a profile associated to it. */ hasProfile(lookupAddress: string, useCache?: boolean): Promise; /** * Given one or more Sui addresses, find their associated profile object IDs. * Addresses that don't have a profile won't be included in the returned array. */ protected fetchProfileObjectIds(lookupAddresses: string[]): Promise>; /** * Fetch one or more Sui objects and return them as PolymediaProfile instances * Object IDs that don't exist or are not a Profile won't be included in the returned array. */ protected fetchProfileObjects(suiClient: SuiClient, lookupObjectIds: string[]): Promise; }