(Solved) Error while building privacy.wasm from incognito-chain repo

This is what I did:

git clone https://github.com/incognitochain/incognito-chain
cd incognito-chain/wasm
chmod +x *.sh
./build.sh

And after some download messages, this is what I got:

package command-line-arguments
	imports github.com/incognitochain/incognito-chain/wasm/gomobile
	imports github.com/incognitochain/incognito-chain/metadata
	imports github.com/ethereum/go-ethereum/light
	imports github.com/ethereum/go-ethereum/core
	imports github.com/ethereum/go-ethereum/core/rawdb
	imports github.com/ethereum/go-ethereum/ethdb/leveldb: build constraints exclude all Go files in /home/josefabio/go/pkg/mod/github.com/ethereum/[email protected]/ethdb/leveldb
package command-line-arguments
	imports github.com/incognitochain/incognito-chain/wasm/gomobile
	imports github.com/incognitochain/incognito-chain/metadata
	imports github.com/ethereum/go-ethereum/light
	imports github.com/ethereum/go-ethereum/core
	imports github.com/ethereum/go-ethereum/core/rawdb
	imports github.com/prometheus/tsdb/fileutil
	imports golang.org/x/sys/unix: build constraints exclude all Go files in /home/josefabio/go/pkg/mod/golang.org/x/[email protected]/unix

Is the wasm build no longer mantained?

Greetings.
Following the Privacy-v2 upgrade, the privacy.wasm build has been moved to the Javascript SDK repository. You can check out https://github.com/incognitochain/incognito-chain-web-js/tree/privacy-v2/wasm
Hope it helps!

2 Likes

Thank you for the answer. Will this binary help me do trades with V3 or at least send transactions?
I’m in a position in which I’m desperately searching for a way to do trades using JS, I even tried doing a wrapper for the incognito-cli in the dev/v3 branch, but the it has errors: https://github.com/incognitochain/incognito-cli/issues/4.

Let me check and get back to you soon.

1 Like

I have just replied to your comments. Can you pull the new code and test it out again?

1 Like

Yes; although incognito-cli is much more actively used. If wrapping it works for you then that’s a fine solution.
We do develop a NodeJS interface to call the WASM binary. You just require the incognito-chain-web-js folder like here https://github.com/incognitochain/incognito-chain-web-js/blob/pdex-v3/lib/env/debug/preload.js. You could go from there though i’d imagine it could take more work than the above alternative.

1 Like