@microsoft/useragent-sdk
Version:
SDK for building decentralized identity wallets and enterprise agents.
37 lines (36 loc) • 941 B
TypeScript
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 declare 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;
}