Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EThreeNode

Hierarchy

Index

Properties

accessTokenProvider

accessTokenProvider: IAccessTokenProvider

Instance of IAccessTokenProvider implementation. Using [[getToken]] to receive JWT.

cardCrypto

cardCrypto: ICardCrypto

Instance of implementation of ICardCrypto interface.

cardManager

cardManager: CardManager

Instance of CardManager. Used to create cards with user public keys.

cardVerifier

cardVerifier: VirgilCardVerifier

Instance of VirgilCardVerifier.

identity

identity: string

Unique identifier of current user. Received from JWT token.

Protected inProcess

inProcess: boolean = false

keyEntryStorage

keyEntryStorage: IKeyEntryStorage

Instance of IKeyEntryStorage implementation. Used for storing private keys.

Protected keyLoader

keyLoader: PrivateKeyLoader

virgilCrypto

virgilCrypto: ICrypto

Instance of implementation of ICrypto interface.

Methods

backupPrivateKey

  • backupPrivateKey(pwd: string): Promise<void>

changePassword

  • changePassword(oldPwd: string, newPwd: string): Promise<void>

cleanup

  • cleanup(): Promise<void>

decrypt

encrypt

hasLocalPrivateKey

  • hasLocalPrivateKey(): Promise<Boolean>

lookupPublicKeys

  • lookupPublicKeys(identity: string): Promise<IPublicKey>
  • lookupPublicKeys(identities: string[]): Promise<LookupResult>

register

  • register(keyPair?: IKeyPair): Promise<void>

resetPrivateKeyBackup

  • resetPrivateKeyBackup(pwd?: undefined | string): Promise<void>
  • Delete private key saved in Virgil Keyknox Storage.

    Parameters

    • Optional pwd: undefined | string

      User password for access to Virgil Keyknox Storage. If password omitted resets all Keyknox storage.

    Returns Promise<void>

restorePrivateKey

  • restorePrivateKey(pwd: string): Promise<void>

rotatePrivateKey

  • rotatePrivateKey(): Promise<void>

unregister

  • unregister(): Promise<void>
  • Unregister current user. Revokes public key in Virgil Cloud and deletes local private key.

    throws

    {RegisterRequiredError} If current user is not registered (i.e. there is no Virgil Card for this identity)

    throws

    {MultipleCardsError} If there is more than one Virgil Card for this identity

    Returns Promise<void>

Static initialize

  • Initialize a new instance of EThree which tied to specific user.

    Parameters

    • getToken: function

      Function that receive JWT.

        • (): Promise<string>
        • Returns Promise<string>

    • Default value options: EThreeInitializeOptions = {}

    Returns Promise<EThreeNode>