supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
454 stars 171 forks source link

PT constructor with node.js binding #224

Closed ilge-ustun closed 1 month ago

ilge-ustun commented 1 month ago

Hello! I'm using node.js bindings, and while new P1 and new P2 work well, I encounter problems with PT constructor:

const _p1: P1 = new blst.P1();
const p1: P1 = _p1.hash_to(...); // expected result
const p2: P2 = new blst.P2(...); // also works

const p: PT = new blst.PT(p1, p2); // Error: Illegal arguments for construction of _exports_PT

I also need the PT.one() value, and can't get it too.

Any idea or code examples for node.js where PT was used?

ilge-ustun commented 1 month ago

UPD: had to compile blst_wrap.cpp myself and it works