@types/secp256k1
Advanced tools
Comparing version 3.5.1 to 3.5.2
@@ -11,4 +11,4 @@ // Type definitions for secp256k1 3.5 | ||
/** Nonce generator. By default it is rfc6979 */ | ||
noncefn?: (message: Buffer, privateKey: Buffer, algo: Buffer | null, | ||
data: Buffer | null, attempt: number) => Buffer; | ||
noncefn?: (message: Uint8Array, privateKey: Uint8Array, algo: Uint8Array | null, | ||
data: Uint8Array | null, attempt: number) => Uint8Array; | ||
@@ -20,9 +20,16 @@ /** | ||
*/ | ||
data?: Buffer; | ||
data?: Uint8Array; | ||
} | ||
export interface ecdhOptions { | ||
data?: Uint8Array; | ||
xbuf?: Uint8Array; | ||
ybuf?: Uint8Array; | ||
hashfn?: (x: Uint8Array, y: Uint8Array, data: Uint8Array) => Uint8Array; | ||
} | ||
/** | ||
* Verify an ECDSA privateKey. | ||
*/ | ||
export function privateKeyVerify(privateKey: Buffer): boolean; | ||
export function privateKeyVerify(privateKey: Uint8Array): boolean; | ||
@@ -32,3 +39,3 @@ /** | ||
*/ | ||
export function privateKeyExport(privateKey: Buffer, compressed?: boolean): Buffer; | ||
export function privateKeyExport(privateKey: Uint8Array, compressed?: boolean): Uint8Array; | ||
@@ -38,3 +45,3 @@ /** | ||
*/ | ||
export function privateKeyImport(privateKey: Buffer): Buffer; | ||
export function privateKeyImport(privateKey: Uint8Array): Uint8Array; | ||
@@ -44,3 +51,3 @@ /** | ||
*/ | ||
export function privateKeyNegate(privateKey: Buffer): Buffer; | ||
export function privateKeyNegate(privateKey: Uint8Array): Uint8Array; | ||
@@ -50,3 +57,3 @@ /** | ||
*/ | ||
export function privateKeyModInverse(privateKey: Buffer): Buffer; | ||
export function privateKeyModInverse(privateKey: Uint8Array): Uint8Array; | ||
@@ -56,3 +63,3 @@ /** | ||
*/ | ||
export function privateKeyTweakAdd(privateKey: Buffer, tweak: Buffer): Buffer; | ||
export function privateKeyTweakAdd(privateKey: Uint8Array, tweak: Uint8Array): Uint8Array; | ||
@@ -62,3 +69,3 @@ /** | ||
*/ | ||
export function privateKeyTweakMul(privateKey: Buffer, tweak: Buffer): Buffer; | ||
export function privateKeyTweakMul(privateKey: Uint8Array, tweak: Uint8Array): Uint8Array; | ||
@@ -68,3 +75,3 @@ /** | ||
*/ | ||
export function publicKeyCreate(privateKey: Buffer, compressed?: boolean): Buffer; | ||
export function publicKeyCreate(privateKey: Uint8Array, compressed?: boolean): Uint8Array; | ||
@@ -74,3 +81,3 @@ /** | ||
*/ | ||
export function publicKeyConvert(publicKey: Buffer, compressed?: boolean): Buffer; | ||
export function publicKeyConvert(publicKey: Uint8Array, compressed?: boolean): Uint8Array; | ||
@@ -80,3 +87,3 @@ /** | ||
*/ | ||
export function publicKeyVerify(publicKey: Buffer): boolean; | ||
export function publicKeyVerify(publicKey: Uint8Array): boolean; | ||
@@ -86,3 +93,3 @@ /** | ||
*/ | ||
export function publicKeyTweakAdd(publicKey: Buffer, tweak: Buffer, compressed?: boolean): Buffer; | ||
export function publicKeyTweakAdd(publicKey: Uint8Array, tweak: Uint8Array, compressed?: boolean): Uint8Array; | ||
@@ -92,3 +99,3 @@ /** | ||
*/ | ||
export function publicKeyTweakMul(publicKey: Buffer, tweak: Buffer, compressed?: boolean): Buffer; | ||
export function publicKeyTweakMul(publicKey: Uint8Array, tweak: Uint8Array, compressed?: boolean): Uint8Array; | ||
@@ -98,3 +105,3 @@ /** | ||
*/ | ||
export function publicKeyCombine(publicKeys: Buffer[], compressed?: boolean): Buffer; | ||
export function publicKeyCombine(publicKeys: Uint8Array[], compressed?: boolean): Uint8Array; | ||
@@ -104,3 +111,3 @@ /** | ||
*/ | ||
export function signatureNormalize(signature: Buffer): Buffer; | ||
export function signatureNormalize(signature: Uint8Array): Uint8Array; | ||
@@ -110,3 +117,3 @@ /** | ||
*/ | ||
export function signatureExport(signature: Buffer): Buffer; | ||
export function signatureExport(signature: Uint8Array): Uint8Array; | ||
@@ -116,10 +123,5 @@ /** | ||
*/ | ||
export function signatureImport(signature: Buffer): Buffer; | ||
export function signatureImport(signature: Uint8Array): Uint8Array; | ||
/** | ||
* Same as `signatureImport` but not follow by BIP66. | ||
*/ | ||
export function signatureImportLax(signature: Buffer): Buffer; | ||
/** | ||
* Create an ECDSA signature. Always return low-S signature. | ||
@@ -133,3 +135,3 @@ * | ||
*/ | ||
export function ecdsaSign(message: Buffer, privateKey: Buffer, options?: SignOptions): {signature: Uint8Array, recovery: number}; | ||
export function ecdsaSign(message: Uint8Array, privateKey: Uint8Array, options?: SignOptions): {signature: Uint8Array, recovery: number}; | ||
@@ -147,3 +149,3 @@ /** | ||
*/ | ||
export function verify(message: Buffer, signature: Buffer, publicKey: Buffer): boolean; | ||
export function ecdsaVerify(message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): boolean; | ||
@@ -153,3 +155,3 @@ /** | ||
*/ | ||
export function recover(message: Buffer, signature: Buffer, recovery: number, compressed?: boolean): Buffer; | ||
export function ecdsaRecover(message: Uint8Array, signature: Uint8Array, recovery: number, compressed?: boolean): Uint8Array; | ||
@@ -159,7 +161,2 @@ /** | ||
*/ | ||
export function ecdh(publicKey: Buffer, privateKey: Buffer): Buffer; | ||
/** | ||
* Compute an EC Diffie-Hellman secret and return public key as result. | ||
*/ | ||
export function ecdhUnsafe(publicKey: Buffer, privateKey: Buffer, compressed?: boolean): Buffer; | ||
export function ecdh(publicKey: Uint8Array, privateKey: Uint8Array, opt?: ecdhOptions): Uint8Array; |
{ | ||
"name": "@types/secp256k1", | ||
"version": "3.5.1", | ||
"version": "3.5.2", | ||
"description": "TypeScript definitions for secp256k1", | ||
@@ -24,4 +24,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "917bb8ed096265815d16fd8aa2c0453e9cce2609c83eef9047e5d7cbf4de8f18", | ||
"typesPublisherContentHash": "3fc09736de5f2702e222b4628fe92a1678f1feda603abf8178d468daa9cad969", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 27 Jan 2020 22:31:33 GMT | ||
* Last updated: Thu, 30 Jan 2020 21:23:43 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7020
117