UNPKG

di-wings

Version:

Aviary Tech's common library for decentralized identity

59 lines 2.32 kB
import { Multikey } from './Multikey'; import type { DocumentLoader } from '../../common/interfaces'; import type { JsonWebKey2020 } from './JsonWebKey2020'; import { type DataIntegrityProof } from '../../vcs/v2/proofs/data-integrity'; export declare class Ed25519Signature2020LinkedDataProof { type: string; proofPurpose: string; verificationMethod: string; created: string; cryptosuite: string; proofValue?: string; challenge?: string; domain?: string; constructor(type: string, proofPurpose: string, cryptosuite: string, verificationMethod: string, created: string, proofValue?: string, challenge?: string, domain?: string); toJSON(): any; } export declare class Ed25519VerificationKey2020 { multikey: Multikey; constructor(id: string, controller: string, publicKeyMultibase: string, secretKeyMultibase?: string); get publicKey(): Uint8Array; get privateKey(): Uint8Array | undefined; get id(): string; get type(): string; get controller(): string; get publicKeyMultibase(): string; get secretKeyMultibase(): string | undefined; static generate(): Promise<Ed25519VerificationKey2020>; static from(options: { id?: string; controller?: string; publicKeyBase58: string; privateKeyBase58?: string; }): Ed25519VerificationKey2020; static fromBase58: (options: { id?: string; controller?: string; publicKeyBase58: string; privateKeyBase58?: string; }) => Promise<Ed25519VerificationKey2020>; static fromJWK: (k: JsonWebKey2020) => Promise<Ed25519VerificationKey2020>; sign(data: Uint8Array): Promise<Uint8Array>; verify(data: Uint8Array, signature: Uint8Array): Promise<boolean>; export(options?: { privateKey?: boolean; type: 'JsonWebKey2020'; }): Promise<JsonWebKey2020>; createProof(document: any, purpose: string, documentLoader: DocumentLoader, options?: { domain?: string; challenge?: string; }): Promise<{ context: string[]; proof: DataIntegrityProof; }>; verifyProof(proof: DataIntegrityProof, document: any, documentLoader: DocumentLoader): Promise<{ verified: boolean; errors?: string[]; }>; } //# sourceMappingURL=Ed25519VerificationKey2020.d.ts.map