di-wings
Version:
Aviary Tech's common library for decentralized identity
42 lines • 1.52 kB
TypeScript
import type { IJWK } from "..";
import { Ed25519VerificationKey2018 } from "../keypairs/Ed25519VerificationKey2018.js";
import { Secp256k1KeyPair } from "../keypairs/Secp256k1KeyPair.js";
import { X25519KeyAgreementKey2019 } from "../keypairs/X25519KeyAgreementKey2019.js";
import type { Multikey } from "./Multikey.js";
export interface JsonWebKey2020 {
id: string;
type: string;
controller: string;
publicKeyJwk: IJWK;
privateKeyJwk?: IJWK;
setJWA?: () => void;
export?: (options: {
privateKey?: boolean;
}) => Promise<JsonWebKey2020>;
exportAsLD?: (options: {
privateKey?: boolean;
}) => Promise<Multikey>;
}
export declare class JsonWebKeyPair implements JsonWebKey2020 {
id: string;
type: 'JsonWebKey2020';
controller: string;
publicKeyJwk: IJWK;
privateKeyJwk?: IJWK;
JWA?: string;
constructor(id: string, controller: string, publicKeyJwk?: IJWK, privateKeyJwk?: IJWK);
setJWA(): void;
static from: (k: Multikey, options?: any) => Promise<any>;
static fromJWK: (k: JsonWebKey2020) => Promise<JsonWebKeyPair>;
static generate: (options?: any) => Promise<Secp256k1KeyPair | X25519KeyAgreementKey2019 | Ed25519VerificationKey2018>;
export(options?: {
privateKey?: boolean;
}): Promise<JsonWebKey2020>;
/**
* export as the Linked Data non JWK variant
*/
exportAsLD(options?: {
privateKey?: boolean;
}): Promise<Multikey>;
}
//# sourceMappingURL=JsonWebKey2020.d.ts.map