Closed xrash closed 9 months ago
Yupp, same for me.
@Denstden & @xrash Wasm file is not bundled with cjs, only with esm module .. In order to use SDK in cjs (node) you have to include wasm file at project root
@nohaapav how can we get access to the wasm file? Can you let me know the steps?
@nohaapav how can we get access to the wasm file? Can you let me know the steps?
I'll update doc regarding cjs usage this week.
@nohaapav is this fixed? I get the same error
@flipchan Hey, it was never broken, you just have to include wasm at project root in case u using cjs .. Hopefully i can prepare some step by step doc this week ..
@nohaapav There are four directories containing a file named 'hydra_dx_wasm_bg.wasm,' namely 'math-lbp/build,' 'math-omnipool/build,' 'math-stableswap/build,' and 'math-xyk/build.' To make my CJS project work correctly, which one of these should I copy to the project root directory?
When i copy the wasm file from the following directories: 'math-lbp/build,' 'math-omnipool/build,' 'math-stableswap/build,' and 'math-xyk/build.' It says O.pool_account_name is not a function.
Any updates on the documentation regarding CJS usage? @nohaapav
@nohaapav is this fixed? I get the same error
solved it, all good for me
How did you solve it ?
@michaeldev5 will publish the hydradx implemenation opensource soon, I'm using "@galacticcouncil/sdk": "^0.6.5",
with a clean npm cache, works
Try to upgrade to 1.1.5
or latest .. It should work with commonjs out of the box.
It works! Many thanks @nohaapav
@michaeldev5 seems like yarn.lock plays a prank on the new version bumps, here is an opensource implementation that ppl can use a reference: https://github.com/search?q=repo%3AXcmSend%2Fapp%20hydra&type=code
I added support for the latest version of the sdk
@nohaapav it was really nice the upgrade to v2 docs, it made my life easier, thanks
The only thing I did was running
npm install @galacticcouncil/sdk
and then running this code:I get the following error: