Search code examples
javascriptblockchainwavesplatform

How to use Waves Transactions library in testnet?


I'm using Waves transactions library, I need to do some transaction testing using javascript and I would like to know how can I use it in testnet?


Solution

  • You will need two things:

    First, Some transactions have chainId as param. You need to pass 'T'. E.g:

    const burnTx = burn({assetId:'someId', amount:1000, chainId:'T'})
    

    Second, You send tx to testnet node. E.g:

    await broadcast(burnTx, ' https://testnodes.wavesnodes.com')