@3id/manager
Version:
32 lines (31 loc) • 1.75 kB
TypeScript
import type { AuthProvider, LinkProof } from '@ceramicnetwork/blockchain-utils-linking';
import { IDX } from '@ceramicstudio/idx';
import type { AlsoKnownAsAccount, BasicProfile } from '@ceramicstudio/idx-constants';
import { DagJWS, DIDProvider } from 'dids';
import type { LinksArray } from './types';
export declare class Migrate3IDV0 {
private idx;
private ceramic;
private user;
constructor(threeIdProvider: DIDProvider, idx: IDX);
/**
* Creates a legacy 3Box root seed
*/
static legacySeedCreate(authProvider: AuthProvider): Promise<Uint8Array>;
userDIDAuthenticated(): Promise<void>;
migrateAKALinks(did: string, profile?: any): Promise<void>;
migrate3BoxProfile(did: string): Promise<any>;
_twitterVerify(did: string, profile: any): Promise<AlsoKnownAsAccount | null>;
_githubVerify(did: string, profile: any): Promise<AlsoKnownAsAccount | null>;
}
export declare const legacyDIDLinkExist: (accountId: string) => Promise<string | null>;
export declare const get3BoxProfile: (did: string) => Promise<any>;
export declare const get3BoxLinkProof: (did: string) => Promise<LinkProof | null>;
export declare const get3BoxConfig: (did: string) => Promise<LinksArray>;
export declare const getLegacyDidDoc: (did: string) => Promise<any>;
export declare const willMigrationFail: (accountId: string, did: string) => Promise<boolean>;
export declare const transformProfile: (profile: any) => BasicProfile;
declare type LinkType = 'twitter' | 'github';
export declare const linkRequest: (type: LinkType, did: string, username: string) => Promise<string>;
export declare const linkVerify: (type: string, jws: DagJWS, verificationUrl: string) => Promise<string>;
export {};