bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pure-js backport of `xOnlyPointFromPoint()`..?

Overtorment opened this issue · comments

For a project utilizing ver 1.1.6 Id like to use xOnlyPointFromPoint() which is available only on higher versions.
Cant bumptiny because it doenst work in my environment (React Native).

xOnlyPointFromPointis needed by BIP47 (payment codes).

Is there any way to hack a pure-js implementation, or backport it to v1 branch..?

Thanks!

It's essentially buffer.slice(1, 33) 🤣

xonly pubkey is literally "just take the x value"

Found ts implementation

export function xOnlyPointFromPoint(p: Uint8Array): Uint8Array {

I dont know how I overlooked it looking the first time 🤦