"bitcoinjs.ECPubKey.fromHex" not found

109 Views Asked by At

Currently I am creating Bitcoin Library in C# that related to my company use cases based on bitcoinjs-lib. I realized the function ECPubKey.fromHex written my company source code shown as follows is not found in bitcoinjs library.

var ecPubKey = bitcoinjs.ECPubKey.fromHex(key)

When I going through bitcoinjs-lib, their CHANGELOG has mentioned as below

_added_
- export `ECPair`, a merged replacement for `ECKey`/`ECPubKey`, invalid types will throw via `typeforce`

_removed_
- export `ECPubKey`, use new export `ECPair` instead

However, I search through ecpair.js file but fromHex function is still not found.

Here is the source code for ecpair.js

1

There are 1 best solutions below

0
On

I found it in version 1.0.2 and the function is written there.