UNPKG

@transmute/bls12381-key-pair

Version:
32 lines (31 loc) 1.19 kB
import { JsonWebKey2020, Bls12381G1Key2020 } from './types'; import { LdKeyPairInstance } from '@transmute/ld-key-pair'; export declare class Bls12381G1KeyPair implements LdKeyPairInstance { id: string; type: string; controller: string; publicKey: Uint8Array; privateKey?: Uint8Array; static fingerprintFromPublicKey(importableType: JsonWebKey2020 | Bls12381G1Key2020): Promise<string>; static generate: ({ secureRandom, }: { secureRandom: () => Uint8Array; }) => Promise<Bls12381G1KeyPair>; static from: (k: JsonWebKey2020 | Bls12381G1Key2020) => Promise<Bls12381G1KeyPair>; static fromFingerprint({ fingerprint }: { fingerprint: string; }): Promise<Bls12381G1KeyPair>; constructor(opts: { id: string; type: string; controller: string; publicKey: Uint8Array; privateKey?: Uint8Array; }); fingerprint(): Promise<string>; export(options?: { privateKey?: boolean; type: 'JsonWebKey2020' | 'Bls12381G1Key2020'; }): Promise<JsonWebKey2020 | Bls12381G1Key2020>; signer(type?: 'Bbs'): any; verifier(type?: 'Bbs'): any; }