Ayms/bitcoin-transactions

Erro create transaction testnet

Closed this issue · 1 comments

I am using the following command

node tx.js BTC create prevtx=7063d3b9b5b295c8467047023d9daa3c09876a2a505e092725fce2f38385184e prevaddr=mxuJGtqst8dU2DMPNjciz9VWWHRRps7dwv prevamount=0.113628 privkey=tprv8ZgxMBicQKsPduXaaGVR64VQjHwWDL9NsgJirL1JZKN2zPdGBPnedVXGQhsuvF3K1Ydba9FoZj8nAQHx5SQS9qtD4Gwm4T64i5N2N3RZnES addr=msAka8AGvxRZbDrTHSkhjh6Eu5THuad7Fp amount=0.003

Return erro!

Version BTC create Destination address 0.003 Warning !!!! You are sending the funds to a P2SH address, make sure that you control it, especially if it's a BIP141 segwit address --- With your network fees the advised amount is: undefined false Something is wrong with your numbers, please check them with the testamount command

What is the configuration for BTC testnet?

Ayms commented

You forgot to put previndex and fees in the command:

node tx.js BTC create prevtx=7063d3b9b5b295c8467047023d9daa3c09876a2a505e092725fce2f38385184e prevaddr=mxuJGtqst8dU2DMPNjciz9VWWHRRps7dwv prevamount=0.113628 previndex=0 privkey=tprv8ZgxMBicQKsPduXaaGVR64VQjHwWDL9NsgJirL1JZKN2zPdGBPnedVXGQhsuvF3K1Ydba9FoZj8nAQHx5SQS9qtD4Gwm4T64i5N2N3RZnES addr=msAka8AGvxRZbDrTHSkhjh6Eu5THuad7Fp fees=0.00001 amount=0.003

Testnet is not implemented in the tool, but if you use the corresponding BTC addresses (ie convert testnet addresses to mainnet 1/3 addresses) it will at least provide you the correct transaction body to paste in a testnet explorer