CashScript / cashscript

⚖️ Easily write and interact with Bitcoin Cash smart contracts
https://cashscript.org
MIT License
112 stars 79 forks source link

Use LibAuth secp256k1 global #129

Closed jimtendo closed 1 year ago

jimtendo commented 1 year ago

This is a minor change to use the LibAuth V2 secp256k1 global instance.

Previously, this was being instantiated with instantiateSecp256k1() each time this function was called. In situations where this function is being called in parallel, it can result in WebASM out of memory errors in browser.

NOTE: Apologies, my npm install kept failing so I wasn't able to run tests for this.

Some background: https://t.me/libauth_devs/31

Signed-off-by: James Zuccon zuccon@gmail.com

rkalis commented 1 year ago

As discussed in Discord, this unfortunately doesn't work, since we're still on Libauth v1. Will implement this whenever we update to Libauth v2.