aa-schnorr-multisig-sdk
Version:
Account Abstraction Schnorr Multi-Signatures SDK
26 lines (25 loc) • 1.49 kB
TypeScript
import type { PublicNonces } from "../types";
import { Key, SchnorrSignature } from "../types";
import type { HashFunction } from "../core/types";
import type { SignatureOutput } from "../types/signature";
import { FinalPublicNonce } from "../types/signature";
export declare class Schnorrkel {
#private;
private _setNonce;
private clearNonces;
private getMappedPublicNonces;
private getMappedNonces;
private getMultisigOutput;
static getCombinedPublicKey(publicKeys: Key[]): Key;
static getCombinedAddress(publicKeys: Key[]): string;
generatePublicNonces(privateKey: Key): PublicNonces;
getPublicNonces(privateKey: Key): PublicNonces;
hasNonce(privateKey: Key): boolean;
multiSigSign(privateKey: Key, msg: string, publicKeys: Key[], publicNonces: PublicNonces[], hashFn?: HashFunction | null): SignatureOutput;
multiSigSignHash(privateKey: Key, hash: string, publicKeys: Key[], publicNonces: PublicNonces[]): SignatureOutput;
static sign(privateKey: Key, msg: string, hashFn?: HashFunction | null): SignatureOutput;
static signHash(privateKey: Key, hash: string): SignatureOutput;
static sumSigs(signatures: SchnorrSignature[]): SchnorrSignature;
static verify(signature: SchnorrSignature, msg: string, finalPublicNonce: FinalPublicNonce, publicKey: Key, hashFn?: HashFunction | null): boolean;
static verifyHash(signature: SchnorrSignature, hash: string, finalPublicNonce: FinalPublicNonce, publicKey: Key): boolean;
}