diff --git a/types/secp256k1/index.d.ts b/types/secp256k1/index.d.ts index 686171565b..d5ec720a39 100644 --- a/types/secp256k1/index.d.ts +++ b/types/secp256k1/index.d.ts @@ -113,7 +113,7 @@ export function signatureImportLax(signature: Buffer): Buffer; * - Compose 32-byte scalar `s = k^-1 * (r * d + m)`. Reject nonce if `s` is zero. * - The signature is `(r, s)`. */ -export function sign(message: Buffer, privateKey: Buffer, options?: SignOptions): {signature: Buffer, recovery: number}; +export function ecdsaSign(message: Buffer, privateKey: Buffer, options?: SignOptions): {signature: Uint8Array, recovery: number}; /** * Verify an ECDSA signature. diff --git a/types/secp256k1/secp256k1-tests.ts b/types/secp256k1/secp256k1-tests.ts index 03754354b1..f1104765ad 100644 --- a/types/secp256k1/secp256k1-tests.ts +++ b/types/secp256k1/secp256k1-tests.ts @@ -1,4 +1,4 @@ -import { SignOptions, sign } from "secp256k1"; +import { SignOptions, ecdsaSign } from "secp256k1"; const opts: SignOptions = { data: Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]) @@ -8,4 +8,4 @@ const message = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); const prvKey = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); -sign(message, prvKey, opts); +ecdsaSign(message, prvKey, opts);