Using ZWeb3 outside of Truffle

How can I use the ZWeb3 with a loaded private key outside of truffle?

So far I’ve tried to use this:

var provider = new HDWalletProvider(pk, kovanUrl);

let web3 = new Web3(provider);


But it didn’t work. I am trying to sign and send a tx using your helper libraries with a loaded private key.

Do you have any suggestions?


Assume you have looked at the ZWeb3 tests (I generally start with the documentation and the tests)

I can send a transaction to ganache-cli by initializing ZWeb3 using the HDWalletProvider.

var provider = new HDWalletProvider(privateKey, RPC);

Hi @tor

Can you advise why you are using ZWeb3 in this way so that I can understand what you are trying to do?