Skip to content

Commit e77c2f8

Browse files
authored
Merge pull request #2109 from jasonandjay/ecc-alternative
Update readme
2 parents c6105c4 + 96cb427 commit e77c2f8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ Which you can then import as an ESM module:
102102
<script type="module">import "/scripts/bitcoinjs-lib.js"</script>
103103
````
104104

105+
#### Using Taproot:
106+
When utilizing Taproot features with bitcoinjs-lib, you may need to include an additional ECC (Elliptic Curve Cryptography) library. The commonly used `tiny-secp256k1` library, however, might lead to compatibility issues due to its reliance on WASM (WebAssembly). The following alternatives may be used instead, though they may be significantly slower for high volume of signing and pubkey deriving operations.
107+
108+
#### Alternatives for ECC Library:
109+
1. `@bitcoinjs-lib/tiny-secp256k1-asmjs`
110+
A version of `tiny-secp256k1` compiled to ASM.js directly from the WASM version, potentially better supported in browsers. This is the slowest option.
111+
2. `@bitcoinerlab/secp256k1`
112+
Another alternative library for ECC functionality. This requires access to the global `BigInt` primitive.
113+
For advantages and detailed comparison of these libraries, visit: [tiny-secp256k1 GitHub page](https://github.com/bitcoinjs/tiny-secp256k1).
114+
105115
**NOTE**: We use Node Maintenance LTS features, if you need strict ES5, use [`--transform babelify`](https://github.com/babel/babelify) in conjunction with your `browserify` step (using an [`es2015`](https://babeljs.io/docs/plugins/preset-es2015/) preset).
106116

107117
**WARNING**: iOS devices have [problems](https://github.com/feross/buffer/issues/136), use at least [buffer@5.0.5](https://github.com/feross/buffer/pull/155) or greater, and enforce the test suites (for `Buffer`, and any other dependency) pass before use.

0 commit comments

Comments
 (0)