import { SignedCredential, SdkOptions } from '../dto/shared.dto'; import { ParsedOptions } from '../shared/getOptionsFromEnvironment'; import { InitiateResponse as PhoneIssuerInitiateResponse, VerifyResponse as PhoneIssuerVerifyResponse } from '../services/PhoneIssuerService'; import { InitiateResponse as EmailIssuerInitiateResponse, VerifyResponse as EmailIssuerVerifyResponse } from '../services/EmailIssuerService'; import { BaseNetworkMember, StaticDependencies, ConstructorUserData } from './BaseNetworkMember'; /** * @deprecated, will be removed in SDK v7 */ export declare abstract class LegacyNetworkMember extends BaseNetworkMember { private readonly _phoneIssuer; private readonly _emailIssuer; constructor(userData: ConstructorUserData, dependencies: StaticDependencies, options: ParsedOptions); /** * @description Initiates the phone number verification flow * @deprecated * @param config - Configuration options * @param config.apiKey - They api access key to the issuer service * @param config.phoneNumber - The phone number to send the confirmation code to * @param config.isWhatsAppNumber - Whether the phone number is a WhatsApp number * @param config.id - The id of the request, this is for the caller to be able to identify the credential in the verify step * @param config.holder - The DID of the user who will recieve the VC (owner of the phone number) * @returns intitiate response data, including the status of the request */ initiatePhoneCredential({ apiKey, phoneNumber, isWhatsAppNumber, id, holder, }: { apiKey: string; phoneNumber: string; isWhatsAppNumber?: boolean; id: string; holder: string; }): Promise; /** * @description Finishes the phone number verification flow * @deprecated * @param config - Configuration options * @param config.apiKey - They api access key to the issuer service * @param config.code - The code the user recieved * @param config.id - The id of the request, must match the ID given in the initiate step * @param config.holder - The DID of the user who will recieve the VC (owner of the phone number) * @returns verify response data, including the issued VC(s) */ verifyPhoneCredential({ apiKey, code, id, holder, }: { apiKey: string; code: string; id: string; holder: string; }): Promise; /** * @description Initiates the email address verification flow * @deprecated * @param config - Configuration options * @param config.apiKey - They api access key to the issuer service * @param config.emailAddress - The email address to send the confirmation code to * @param config.id - The id of the request, this is for the caller to be able to identify the credential in the verify step * @param config.holder - The DID of the user who will recieve the VC (owner of the email address) * @returns intitiate response data, including the status of the request */ initiateEmailCredential({ apiKey, emailAddress, id, holder, }: { apiKey: string; emailAddress: string; id: string; holder: string; }): Promise; /** * @description Finishes the email address verification flow * @deprecated * @param config - Configuration options * @param config.apiKey - They api access key to the issuer service * @param config.code - The code the user recieved * @param config.id - The id of the request, must match the ID given in the initiate step * @param config.holder - The DID of the user who will recieve the VC (owner of the email address) * @returns verify response data, including the issued VC(s) */ verifyEmailCredential({ apiKey, code, id, holder, }: { apiKey: string; code: string; id: string; holder: string; }): Promise; getPublicKeyHexFromDidDocument(didDocument: any): any; /** * @description Creates DID and anchors it * 1. generate seed/keys * 2. build DID document * 3. sign DID document * 4. store DID document in IPFS * 5. anchor DID with DID document ID from IPFS * @param password - encryption key which will be used to encrypt randomly created seed/keys pair * @param inputOptions - optional parameter { registryUrl: 'https://affinity-registry.apse1.dev.affinidi.io' } * @returns * * did - hash from public key (your decentralized ID) * * encryptedSeed - seed is encrypted by provided password. Seed - it's a source to derive your keys */ static register(dependencies: StaticDependencies, inputOptions: SdkOptions, password: string): Promise<{ did: string; encryptedSeed: string; }>; static anchorDid(encryptedSeed: string, password: string, didDocument: any, nonce: number, inputOptions: SdkOptions): Promise<{ did: string; } | { did: string; }>; /** * @description Retrieves a VC based on signup information * @param idToken - idToken received from cognito * @returns an object with a flag, identifying whether new account was created, and initialized instance of SDK */ getSignupCredentials(idToken: string, inputOptions: SdkOptions): Promise; /** * @description Retrieves a VC based on signup information * @param idToken - idToken received from cognito * @returns an object with a flag, identifying whether new account was created, and initialized instance of SDK */ protected _getSignupCredentials(idToken: string, { basicOptions: { env, keyStorageUrl, issuerUrl }, accessApiKey }: ParsedOptions): Promise; }