@bitgo/secp256k1
Version:
Low-level cryptographic methods used in BitGo packages for the secp256k1 curve
30 lines • 1.79 kB
TypeScript
import { ECPairAPI, ECPairFactory, ECPairInterface } from 'ecpair';
import { BIP32API, BIP32Factory, BIP32Interface } from 'bip32';
import { MuSig } from '@brandonblack/musig';
declare const ecc: {
isPoint: (p: Uint8Array) => boolean;
isPrivate: (d: Uint8Array) => boolean;
isXOnlyPoint: (p: Uint8Array) => boolean;
xOnlyPointAddTweak: (p: Uint8Array, tweak: Uint8Array) => {
parity: 0 | 1;
xOnlyPubkey: Uint8Array;
} | null;
pointFromScalar: (sk: Uint8Array, compressed?: boolean) => Uint8Array | null;
pointCompress: (p: Uint8Array, compressed?: boolean) => Uint8Array;
pointMultiply: (a: Uint8Array, tweak: Uint8Array, compressed?: boolean) => Uint8Array | null;
pointAdd: (a: Uint8Array, b: Uint8Array, compressed?: boolean) => Uint8Array | null;
pointAddScalar: (p: Uint8Array, tweak: Uint8Array, compressed?: boolean) => Uint8Array | null;
privateAdd: (d: Uint8Array, tweak: Uint8Array) => Uint8Array | null;
privateNegate: (d: Uint8Array) => Uint8Array;
sign: (h: Uint8Array, d: Uint8Array, e?: Uint8Array) => Uint8Array;
signSchnorr: (h: Uint8Array, d: Uint8Array, e?: Uint8Array) => Uint8Array;
verify: (h: Uint8Array, Q: Uint8Array, signature: Uint8Array, strict?: boolean) => boolean;
recoverPublicKey: (h: Uint8Array, signature: Uint8Array, recovery: number, compressed?: boolean) => Uint8Array | null;
verifySchnorr: (h: Uint8Array, Q: Uint8Array, signature: Uint8Array) => boolean;
};
declare const ECPair: ECPairAPI;
declare const bip32: BIP32API;
declare const musig: MuSig;
import * as bip32utils from './bip32utils';
export { ecc, ECPair, ECPairAPI, ECPairFactory, ECPairInterface, bip32, BIP32API, BIP32Factory, BIP32Interface, musig, MuSig, bip32utils, };
//# sourceMappingURL=index.d.ts.map