Ayms/bitcoin-transactions

Question about parameters

Ayms opened this issue · 3 comments

Ayms commented

https://github.com/BTCPrivate/BitcoinPrivate/issues/122#issuecomment-371390794

Ayms, thanks for sharing to your tool. I'm still stuck with this multi-sig ZCL wallet that I can't import private keys from into BTCP electrum wallet. I tried your tx.js script, but there are a few variables that I don't understand, mainly previndex. Please help me to understand:

node tx.js BTCP create `
prevtx=(is this the transaction ID from the previous address (below on the next line)? Need clarification please)
prevaddr=(the address where ZCL would have been sent from prior to this address (probably chronological?))
prevamount= (I assume it would be the amount of the last transaction [prevaddr=] from the line above)
previndex=(I have no clue. Can't find on any block explorer. need major clarification)
privkey= (I assume the private key of the address (below on the next line?)
addr=(the address where my ZCL balance was before the snapshot?)
fees= (info found on block explorer or electrum wallet details)
amount= (info found on block explorer or electrum wallet details)

Thank you immensely for any clarity you can offer.

Ayms commented

Did you see the drawings: https://github.com/Ayms/bitcoin-transactions#quick-start-guide ?

prevtx=(is this the transaction ID from the previous address (below on the next line)? Need clarification please)

yes, to be more precise: is ONE of the transaction ID from the previous address (if you have several you must create several transactions or use the multiple inputs)

where the address(es) is/are those where were your ZCL before the fork, you can see them with a ZCL explorer

prevaddr=(the address where ZCL would have been sent from prior to this address (probably chronological?))

No, see above, the address corresponding to one of the ouputs of prevtx where your ZCL were before the fork

prevamount= (I assume it would be the amount of the last transaction [prevaddr=] from the line above)

Yes the exact amount corresponding to the output of prevaddr in prevtx

previndex=(I have no clue. Can't find on any block explorer. need major clarification)

the place of the output corresponding in prevaddr in prevtx (starts with 0, see the drawing)

you can see it with a ZCL explorer again, just display the tx and count the outputs until you reach yours

privkey= (I assume the private key of the address (below on the next line?)

No, the privkey corresponding to prevaddr (ie your ZCL privkey, which is in fact the very same for BTCP)

addr=(the address where my ZCL balance was before the snapshot?)

No, the addr where you want to move/send the coins

fees= (info found on block explorer or electrum wallet details)

No, you decide them according to the size of the transaction (the tool gives you this info), don't go below 1 satoshi per byte

amount= (info found on block explorer or electrum wallet details)

Don't put this parameter, the use is in case you don't want to transfer the total of prevamount (minus the fees) to the destination address, which is in fact a kind of unlikely

It looks like you are kind of inverting everything, prev stuff refers to where your ZCL were before the fork (and therefore where your BTCP are now), addr is the destination where you want to move your BTCP (don't make mistake here, you are the only one to know this, then make sure your move the coins to a correct address)

You can email me the details if it's not clear and/or to make an example

Ayms commented

I missed the first part, since it's a multisig address privkey must be privkey1-privkey2-redeem where the privkeys correspond to the addresses in the redeem script

Maybe better that you email me for this first use/example

Ayms commented

Solved via private emails