/** * Copyright 2023 OwlMeans * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /// import { LDKeyPair } from 'crypto-ld'; import { JwsLinkedDataSignature } from '@digitalbazaar/jws-linked-data-signature'; export declare const KEY_TYPE = "EcdsaSecp256k1Signature2019"; export declare const VERIFICATION_KEY_TYPE = "EcdsaSecp256k1VerificationKey2019"; export declare class Secp256k1Key extends LDKeyPair implements Secp256k1CryptoKey { type: string; pubKey?: Uint8Array; pk?: Uint8Array; id: string; controller?: string; static SUITE_CONTEXT: string; constructor(options: Secp256k1KeyOptions); publicNode(): { id: string; type: string; controller: string; publicKeyHex: string | undefined; }; static generate(options?: Secp256k1KeyOptions): Promise; static from(options?: Secp256k1KeyOptions): Promise; fingerprint(): string; verifyFingerprint({ fingerprint }: { fingerprint: string; }): { error: unknown; verified: boolean; } | { verified: boolean; error?: undefined; }; signer(): { sign: (options?: SigningOption) => Promise; }; verifier(): { verify: (options?: SigningOption) => Promise; }; } interface SigningOption { data: { buffer: any; byteOffset: number; length: number; }; signature?: Uint8Array; } export declare class Secp256k1Signature extends JwsLinkedDataSignature { constructor(options: Secp256k1SignatureOptions); getVerificationMethod(): { id: string; type: string; controller: string; publicKeyHex: string | undefined; }; ensureSuiteContext(): void; } export interface Secp256k1CryptoKey { type: string; pubKey?: Uint8Array; pk?: Uint8Array; id: string; controller?: string; revoked?: string; } export interface Secp256k1KeyOptions { id: string; controller?: string; revoked?: string; pubKey?: Uint8Array; pk?: Uint8Array; } export interface Secp256k1SignatureOptions { key?: { id: string; signer: any; verifier: any; }; singer?: any; verifier?: any; proof?: any; date?: Date | string; useNativeCanonize?: boolean; canonizeOptions?: boolean; } export {}; //# sourceMappingURL=secp256k1.d.ts.map