import type { Web5Agent } from '@tbd54566975/web5-agent'; import type { DidMethodApi, DidResolverCache } from '@tbd54566975/dids'; import { VcApi } from './vc-api.js'; import { DwnApi } from './dwn-api.js'; import { DidApi } from './did-api.js'; import { AppStorage } from './app-storage.js'; /** * overrides to defaults configured for technical preview phase */ export type TechPreviewOptions = { /** overrides default dwnEndpoints provided for technical preview. see `Web5.#enqueueNextSync` */ dwnEndpoints?: string[]; }; /** * optional overrides that can be provided when calling {@link Web5.connect} */ export type Web5ConnectOptions = { /** a custom {@link Web5Agent}. Defaults to creating an embedded {@link Web5UserAgent} if one isnt provided */ web5Agent?: Web5Agent; /** additional {@link DidMethodApi}s that can be used to create and resolve DID methods. defaults to did:key and did:ion */ didMethodApis?: DidMethodApi[]; /** custom cache used to store DidResolutionResults. defaults to a {@link DidResolutionCache} */ didResolutionCache?: DidResolverCache; /** overrides to defaults configured for technical preview phase. See {@link TechPreviewOptions} */ techPreview?: TechPreviewOptions; }; export declare class Web5 { #private; appStorage: AppStorage; dwn: DwnApi; vc: VcApi; /** * Statically available DID functionality. can be used to create and resolve DIDs without calling {@link connect}. * By default, can create and resolve `did:key` and `did:ion`. DID resolution results are not cached unless `connect` * is called */ static did: DidApi; /** * DID functionality (e.g. creating and resolving DIDs) */ get did(): DidApi; private static APP_DID_KEY; private constructor(); /** * Connects to a {@link Web5Agent}. defaults to creating an embedded {@link Web5UserAgent} if one isn't provided * @param options - optional overrides * @returns */ static connect(options?: Web5ConnectOptions): Promise<{ web5: Web5; did: string; }>; /** * Dynamically selects up to 2 DWN endpoints that are provided * by default during the Tech Preview period. */ static getTechPreviewDwnEndpoints(): Promise; } //# sourceMappingURL=web5.d.ts.map