Closed lenhatquang97 closed 1 year ago
What's the output pk script for cf908186b974a9ad818ac47dc77633ec57f1bfdbf20537db3cb09335c16c9c25:0
? And what does the unsignedCommitTx
look like? Your example code is missing the relevant parts
Are you also sure you want uncompressed for your pubkey used to make the sigscript?
@guggero output pk script is 76a91488fc282bfeebc8361ef36e2372f94922e3fd427088ac because it's only one output.
And in unsignedCommitTx, you can see the details in https://github.com/lenhatquang97/bitcoin_nft in branch Quang, with file named inscribe.go with this link: https://github.com/lenhatquang97/bitcoin_nft/blob/Quang/src/nft/inscribe.go
@chappjc So to make the sigscript, compressed pubkey should be used?
@chappjc So to make the sigscript, compressed pubkey should be used?
The decision was made when the address was generated. The question is, why do you say false
here https://github.com/lenhatquang97/bitcoin_nft/blob/433d39b9fcb5e41d8838fb455454e8cc6f99ef9e/src/nft/inscribe.go#LL57C36-L57C36
That pk script is a legacy script. But you're trying to spend it with a Tapscript witness? It looks to me like you're mixing different concepts. At least I couldn't make heads or tails of the code you linked...
I close this issue, because I have reproduced this bug to a simpler example https://github.com/btcsuite/btcwallet/issues/865
Hello everyone, I am trying to create a transaction using btcwallet.
Situation
I am using simnet based on https://gist.github.com/davecgh/2992ed85d41307e794f6. My transactions have two inputs and one outputs. I have even signed the transaction but I failed to send the transaction. I don't know what is the main root cause for this transaction?
Problem
-25: TX rejected: failed to validate input 11290e0b3fb37c00c72ffc0930035db395b468a6246045bdb8283135c72c82df:0 which references output cf908186b974a9ad818ac47dc77633ec57f1bfdbf20537db3cb09335c16c9c25:0 - OP_EQUALVERIFY failed (input witness [], input script bytes 483045022100aba979ee4183b9d45b97f4f9604b22e8f8b75e7bcbbebd33d337ebe18b1b8f7402201b994861db4e09628898cb830a06556b96b8ece607ee8754b70305ca283fe020014104bbcea8ef034bd4df764f6339248091e454268446256d851aed3c50f0cf8dd74cd7e1ea97dd5f3d750e09d4dce3798744d8466c8f976dae0e77a0350ba015ea68, prev output script bytes 76a91488fc282bfeebc8361ef36e2372f94922e3fd427088ac)
Source code
In the source code below: client means btcwallet rpcclient and I have connected to this.
SignInputTx, SignOutputTx
Logic for sending raw transactions