Interface PrivateKey<Type>

Generic private key interface

interface PrivateKey<Type> {
    bytes: Uint8Array;
    public: PublicKey<Type>;
    equals(key): boolean;
    export(password, format?): Promise<string>;
    hash(): Uint8Array | Promise<Uint8Array>;
    id(): Promise<string>;
    marshal(): Uint8Array;
    sign(data): Uint8Array | Promise<Uint8Array>;
}

Type Parameters

Implemented by

    Properties

    bytes: Uint8Array
    public: PublicKey<Type>

    Methods

    • 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>