Skip to content

Commit b6d21b9

Browse files
authored
Add in place functions to API.md (#168)
1 parent 90a04a2 commit b6d21b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

API.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44

55
- 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.
66

7-
- 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:
7+
- In place operations (follow [bitcoin-core/secp256k1](https://github.com/bitcoin-core/secp256k1) API):
8+
9+
- `privateKeyNegate`
10+
- `privateKeyTweakAdd`
11+
- `privateKeyTweakMul`
12+
- `signatureNormalize`
13+
14+
If you need new instance this can be easily done with creating it before pass to functions. For example:
815

916
```js
1017
const newPrivateKey = secp256k1.privateKeyNegate(Buffer.from(privateKey))

0 commit comments

Comments
 (0)