Generic private key interface

Hierarchy

  • PrivateKey

Properties

bytes: Uint8Array
equals: ((key: PrivateKey) => boolean)

Type declaration

export: ((password: string, format?: string) => Promise<string>)

Type declaration

    • (password: string, format?: string): Promise<string>
    • Exports the password protected key in the format specified.

      Parameters

      • password: string
      • Optional format: string

      Returns Promise<string>

hash: (() => Promise<Uint8Array>)

Type declaration

id: (() => Promise<string>)

Type declaration

    • (): Promise<string>
    • Gets the ID of the key.

      The key id is the base58 encoding of the SHA-256 multihash of its public key. The public key is a protobuf encoding containing a type and the DER encoding of the PKCS SubjectPublicKeyInfo.

      Returns Promise<string>

marshal: (() => Uint8Array)

Type declaration

public: PublicKey
sign: ((data: Uint8Array) => Promise<Uint8Array>)

Type declaration