Closed pushdpopd closed 6 years ago
BIP49 P2WKH-in-P2SH transactions are a different example.
The Example which I used is wrong? I didn't notice. Could you give me some example or advice to fix this error? I want to develop litecoin testnet wallet with xpub format and P2SH address.
@dabura667 This example is worked for me perfectly. I really appreciate your help. thank you!
Hey, this doesn't work anymore.
Specifically the line
var scriptPubKey = bitcoin.script.scriptHash.output.encode(redeemScriptHash)
gives a TypeError: Cannot read property 'output' of undefined. Can you give an updated example?
Thanks
check the updated file.
the file link above is anchored to the most recent commit at the time.
if you look at it now it's updated
I want to create litecoin testnet transaction from P2SH inputs.
I read some example (ex: Create (and broadcast via 3PBP) a typical Transaction)
and, wrote the following code.
shown rawTx is:
01000000012258d399a6e2566bcfaa99fe4b65c3013d3b44aac41f67d22768b36016984962010000006a47304402206f1ade6b0870b430857edf1d9f826ef321658575cccc8ac29fa9c58e5d093bb402201dd137f25229c2b1e259c51eca36b604685fabf3cd54a48ba02595cafb8f1ccd0121030ae89c930c477a5e2a3d1360700edd9e1a6e52357492d12ec230e5f89190b7b9ffffffff0280969800000000001976a914cf56a629660e236e88915ee72529f825cc9dfccc88ac70235d050000000017a91439d379972c41d0f503804fe95c7e6ff85df09c1a8700000000
then I broadcasted the transaction by litecoind sendrawtransaction , but I receive the following error.
Is my network object is wrong?
How should I do to create valid transaction from P2SH inputs?
I'm using parameters defined in: ltcd/chaincfg/params.go
Any helps and comments are appreciated.