mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
follow secp256k1@4.0.0 api change (#41642)
This commit is contained in:
Vendored
+1
-1
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user