Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MutableKeyStore

exports

Hierarchy

  • KeyStore
    • MutableKeyStore

Implemented by

Index

Methods

clearKeysInKeyring

  • clearKeysInKeyring(): void
  • Remove all keys from the keyring.

    Returns void

getEncryptKeys

  • getEncryptKeys(): any[]
  • Get all the encryption keys.

    remarks

    Current implementation doesn't include encryption keys. This is included to appease the implemented Keystore interface.

    Returns any[]

    An array of encryption keys.

getFingerprint

  • getFingerprint(): string
  • Get the first private key's fingerprint.

    Returns string

    The first private key's fingerprint.

getKeyId

  • getKeyId(key: any): string
  • Get a key's keyId.

    Parameters

    • key: any

      The key to fetch the keyId from.

    Returns string

    The key's keyId.

getKeysForId

  • getKeysForId(keyId: string): any[]
  • Get keys from the keyring using their keyId.

    Parameters

    • keyId: string

      The keyId of the keys to be fetched from the keyring.

    Returns any[]

    An array of the keys with that keyId.

getPrivateKey

  • getPrivateKey(): any
  • Get the first private key.

    Returns any

    The first private key.

getPrivateKeyForId

  • getPrivateKeyForId(keyId: string): any
  • Get a private key from the keyring using it's keyId.

    Parameters

    • keyId: string

      The keyId of the private key to be fetched from the keyring.

    Returns any

    The private key with that keyId.

getPrivateKeyId

  • getPrivateKeyId(): string
  • Get the first private key's keyID.

    Returns string

    The first private key's keyId.

getPrivateKeys

  • getPrivateKeys(): any[]
  • Get all private keys.

    Returns any[]

    An array of all private keys.

getPublicKeyForId

  • getPublicKeyForId(keyId: string): any
  • Get a public key from the keyring using it's keyId.

    Parameters

    • keyId: string

      The keyId of the public key to be fetched from the keyring.

    Returns any

    The public key with that keyId.

getPublicKeyForSubkeyId

  • getPublicKeyForSubkeyId(subkeyId: string): any
  • Get a public key from the keyring using it's subkeyId.

    Parameters

    • subkeyId: string

      The subkeyId of the public key to be fetched from the keyring.

    Returns any

    The public key with that subkeyId.

getPublicKeys

  • getPublicKeys(): any[]
  • Get all the public keys.

    Returns any[]

    An array of public keys.

getPublicKeysForAddress

  • getPublicKeysForAddress(address: string): any[]
  • Get public keys from the keyring using their address.

    Parameters

    • address: string

      The address of the public keys to be fetched from the keyring.

    Returns any[]

    An array of the public keys with that address.

getTrustedActiveKeys

  • getTrustedActiveKeys(): any[]
  • Get all the trusted active keys.

    Returns any[]

    An array of trusted active keys.

getTrustedKeys

  • getTrustedKeys(): any[]
  • Get all the trusted keys.

    Returns any[]

    An array of trusted keys.

importKeyPair

  • importKeyPair(publicKey: any, privateKey: any): Promise<void>
  • Add a key pair to keyring.

    async
    throws

    Error

    Parameters

    • publicKey: any

      The public key to be added to the keyring.

    • privateKey: any

      The private key to be added to the keyring.

    Returns Promise<void>

importPrivateKey

  • importPrivateKey(privateKey: any): Promise<void>
  • Add private key to keyring.

    async
    throws

    Error

    Parameters

    • privateKey: any

      The private key to be added to the keyring.

    Returns Promise<void>

importPublicKey

  • importPublicKey(publicKey: any): Promise<void>
  • Add public key to keyring.

    async
    throws

    Error

    Parameters

    • publicKey: any

      The public key to be added to the keyring.

    Returns Promise<void>

isEncryptedPrivateKey

  • isEncryptedPrivateKey(privateKey: any): Promise<boolean>
  • Verify that a private key is encrypted.

    async

    Parameters

    • privateKey: any

      The private key to verify.

    Returns Promise<boolean>

    true - If private key is encrypted.

isValidKey

  • isValidKey(key: any): Promise<boolean>
  • Test if the input is a valid key.

    async

    Parameters

    • key: any

      The input to be validated.

    Returns Promise<boolean>

    true - If the input is a valid key.

loadKeyring

  • loadKeyring(): void
  • Instantiate the keyring in the keystore.

    async

    Returns void

removeKeysForId

  • removeKeysForId(keyId: string): any[]
  • Remove a public key from the keyring using it's keyId.

    Parameters

    • keyId: string

      The keyId of the keys to be removed from the keyring.

    Returns any[]

    An array of the removed keys.

removePublicKey

  • removePublicKey(publicKey: any): any
  • Remove a public key from the keyring.

    Parameters

    • publicKey: any

      The public key to be removed from the keyring.

    Returns any

    The removed public key.

removePublicKeyForId

  • removePublicKeyForId(keyId: string): any
  • Remove a public key from the keyring using it's keyId.

    Parameters

    • keyId: string

      The keyId of the public key to be removed from the keyring.

    Returns any

    The removed public key.

sign

  • sign(plainText: string): Promise<any>
  • Sign message using private key.

    async

    Parameters

    • plainText: string

      The message to be signed.

    Returns Promise<any>

    The generated signature.

Generated using TypeDoc