@microsoft/useragent-sdk
Version:
SDK for building decentralized identity wallets and enterprise agents.
48 lines (41 loc) • 1.28 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { KeyUse } from './KeyUseFactory';
import { KeyType } from './KeyTypeFactory';
import SecretKey from './SecretKey';
import PrivateKey from './PrivateKey';
import PublicKey from './PublicKey';
/**
* List of types for keys
*/
export type CryptographicKey = SecretKey | PrivateKey | PublicKey;
/**
* Represents a Key container in JWK format.
* A key container will hold different versions of JWK keys.
* Each key in the key container is the same type and usage
*/
export default interface IKeyContainer {
/**
* Key type
*/
kty: KeyType;
/**
* Intended use
*/
use: KeyUse | undefined;
/**
* Algorithm intended for use with this key
*/
alg: string | undefined;
/**
* Return all keys in the container
*/
keys: CryptographicKey[];
/**
* Get the default key from the key container
*/
getKey<T> (): T;
// add()
}