@3id/manager
Version:
36 lines (35 loc) • 1.5 kB
TypeScript
import type { DIDProvider } from 'dids';
import type { AuthProvider, LinkProof } from '@ceramicnetwork/blockchain-utils-linking';
import CeramicClient from '@ceramicnetwork/http-client';
import { IDX } from '@ceramicstudio/idx';
import ThreeIdProvider from '3id-did-provider';
import { DIDStore, LinkCache } from './stores';
import type { AuthConfig, SeedConfig } from './types';
export declare class Manager {
authProvider: AuthProvider;
store: DIDStore;
cache: LinkCache;
idx: IDX;
ceramic: CeramicClient;
threeIdProviders: Record<string, ThreeIdProvider>;
constructor(authprovider: AuthProvider, opts: {
store?: DIDStore;
ceramic?: CeramicClient;
cache?: LinkCache;
});
createAccount(opts?: {
legacyDid?: string;
skipMigration?: boolean;
}): Promise<string>;
_initIdentity(config: AuthConfig | SeedConfig): Promise<string>;
_addAuthMethod(did: string, authSecretAdd: Uint8Array): Promise<void>;
_authCreate(): Promise<Uint8Array>;
setDid(did: string): Promise<ThreeIdProvider>;
setDidByAccountId(accountId: string): Promise<ThreeIdProvider>;
_addLink(did: string, linkProof?: LinkProof | null): Promise<void>;
addAuthAndLink(did: string): Promise<void>;
linkInNetwork(accountId: string): Promise<string | null>;
listDIDS(): Promise<Array<string>>;
didExist(did: string): Promise<boolean>;
didProvider(did: string): DIDProvider | undefined;
}