@quarkid/kms-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Extrimian - KMS Core

This package exposes interfaces to be implemented by KMS concrete implementations like Extrimian KMS Client.

Interfaces and Enums

export interface KMSStorage {
    add(key: string, data: any): Promise<void>;
    get(key: string): Promise<any>;
    getAll(): Promise<Map<string, any>>;
    update(key: string, data: any);
    remove(key: string);
}
export interface IKeyPair {
    readonly privateKey: string;
    readonly publicKey: string;
}
export interface IKMS {
    create(suite: Suite): Promise<{ publicKeyJWK: IJWK }>;
    sign(suite: Suite, publicKeyJWK: IJWK, content: any): Promise<string>;
    signVC(suite: Suite,
        publicKeyJWK: IJWK,
        vc: any,
        did: string,
        verificationMethodId: string,
        purpose: Purpose): Promise<VerifiableCredential>;
    pack(publicKeyJWK: IJWK, toHexPublicKeys: string[], contentToSign: string): Promise<string>;
    unpack(publicKeyJWK: IJWK, packedContent: string): Promise<string>;
    export(publicKeyJWK: IJWK): Promise<any>;
    getPublicKeysBySuiteType(suite: Suite): Promise<IJWK[]>;
    getAllPublicKeys(): Promise<IJWK[]>;
}
export enum LANG {
    en = 'en',
    es = 'es',
    fr = 'fr',
    it = 'it',
}
export enum Suite {
    ES256k = "es256k",
    DIDComm = "didcomm",
    Bbsbls2020 = "bbsbls2020"
}

This package does not add functionality or features, it just exposes interfaces to be used by other packages.

Readme

Keywords

none

Package Sidebar

Install

npm i @quarkid/kms-core

Weekly Downloads

3

Version

1.0.1

License

Apache-2.0

Unpacked Size

49.1 kB

Total Files

75

Last publish

Collaborators

  • quarkid