UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

29 lines 1.27 kB
import { Cache } from "../../utils/cache"; import { BaseReader } from "../base-reader"; import type { Profile, ProfileRaw } from "../.."; import type { EnsAddress, EthAddress, Reference } from "../../clients"; import type { ReaderDownloadOptions, ReaderOptions } from "../base-reader"; export type ProfileWithEns = Profile & { ens: EnsAddress | null; }; export type ProfileDownloadMode = "preview" | "full"; type PrefetchProfileData = Omit<Profile, "reference">; interface ProfileReaderOptions extends ReaderOptions { prefetchData?: PrefetchProfileData; } interface ProfileReaderDownloadOptions extends ReaderDownloadOptions { mode: ProfileDownloadMode; } export declare const PROFILE_TOPIC = "EthernaUserProfile"; export declare const ProfileCache: Cache<string, ProfileWithEns>; export declare class ProfileReader extends BaseReader<ProfileWithEns | null, EthAddress, ProfileRaw> { address: EthAddress; ensAddress: EnsAddress | null; private beeClient; constructor(address: EthAddress | EnsAddress, opts: ProfileReaderOptions); download(opts: ProfileReaderDownloadOptions): Promise<ProfileWithEns | null>; emptyProfile(reference: Reference): ProfileWithEns; private downloadProfile; } export {}; //# sourceMappingURL=reader.d.ts.map