@sphereon/ssi-sdk-ext.kms-azure-rest-client
Version:
Sphereon SSI-SDK plugin for Azure KeyVault Key Management System.
50 lines (46 loc) • 1.53 kB
TypeScript
import { TKeyType, ManagedKeyInfo, IKey, MinimalImportableKey } from '@veramo/core';
import { AbstractKeyManagementSystem } from '@veramo/key-manager';
interface AbstractKeyManagementSystemOptions {
applicationId: string;
vaultUrl: string;
apiKey: string;
}
declare class AzureKeyVaultKeyManagementSystemRestClient extends AbstractKeyManagementSystem {
private client;
private readonly id;
constructor(options: AbstractKeyManagementSystemOptions);
createKey(args: {
type: TKeyType;
meta?: KeyMetadata;
}): Promise<ManagedKeyInfo>;
private ecJwkToRawHexKey;
private mapKeyTypeCurveName;
keyTypeToDigestAlgorithm: (type: TKeyType) => "sha256" | "sha512";
sign(args: {
keyRef: Pick<IKey, 'kid'>;
data: Uint8Array;
[x: string]: any;
}): Promise<string>;
verify(args: {
keyRef: Pick<IKey, 'kid'>;
data: Uint8Array;
signature: string;
[x: string]: any;
}): Promise<Boolean>;
sharedSecret(args: {
myKeyRef: Pick<IKey, 'kid'>;
theirKey: Pick<IKey, 'publicKeyHex' | 'type'>;
}): Promise<string>;
importKey(args: Omit<MinimalImportableKey, 'kms'> & {
privateKeyPEM?: string;
}): Promise<ManagedKeyInfo>;
deleteKey({ kid }: {
kid: string;
}): Promise<boolean>;
listKeys(): Promise<ManagedKeyInfo[]>;
}
interface KeyMetadata {
algorithms?: string[];
[x: string]: any;
}
export { AzureKeyVaultKeyManagementSystemRestClient, type KeyMetadata };