From 568208e7b40ff614ab9b8c812e7970bde6570e2a Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Mon, 1 Jun 2020 21:24:35 +0300 Subject: [PATCH] Add in place functions to API.md --- API.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 6f7ec68..982fbb5 100644 --- a/API.md +++ b/API.md @@ -4,7 +4,14 @@ - Custom type for data output. It's possible pass Buffer or Object which inherits Uint8Array to function for data output. Of course length should match, or you can pass function which accept number of bytes and return instance with specified length. -- In place operations. Some functions doing in place operations. This done for less allocations, if you need new instance this can be easily done with creating it before pass to functions. For example: +- In place operations (follow [bitcoin-core/secp256k1](https://github.com/bitcoin-core/secp256k1) API): + + - `privateKeyNegate` + - `privateKeyTweakAdd` + - `privateKeyTweakMul` + - `signatureNormalize` + +If you need new instance this can be easily done with creating it before pass to functions. For example: ```js const newPrivateKey = secp256k1.privateKeyNegate(Buffer.from(privateKey))