Questions tagged [raw-transaction]
This tag should be used for questions related to raw transactions, bitcoin transactions that have been serialized for network transmission.
373
questions
3
votes
1
answer
126
views
Function combinerawtransaction is not working
I have multiple partially signed transactions that I want to combine into one transaction. All those transactions were signed using the same key so it should be possible to combine all those partial ...
3
votes
1
answer
145
views
How can I recognize an OP_RETURN transaction looking only at the hex?
Looking at these two transactions for example: tx1 and tx2. tx1 is an OP_RETURN trasaction, tx2 is a normal transaction.
raw hex from tx1 (OP_RETURN): ...
3
votes
2
answers
2k
views
16: bad-txns-vin-empty. Code:-26
I am trying to push a raw transaction via BTC insight API, but I always get an error message:
16: bad-txns-vin-empty. Code:-26
Here is the raw transaction hex:
...
3
votes
2
answers
580
views
Unable to construct a correct raw transaction for bitcoin cash testnet
I am trying to construct a raw transaction for bitcoin cash testnet. I have made a lot of use out of this very nice answer to how to construct a raw transaction, but am still unable to construct a ...
3
votes
1
answer
677
views
How can I get the raw tx hex from bitcoind with the txid?
Is there any way to get the raw tx hex when I know the txid using bitcoind not third party. Currently I'm using a thirdparty (blockcypher) but now I want to switch to bitcoind.
3
votes
1
answer
1k
views
What's going on with address 1NZ9kxxUykiNSe61ZRNPLqWeVHVRnirGry?
Does anyone know what is going on here:
https://blockchain.info/address/1NZ9kxxUykiNSe61ZRNPLqWeVHVRnirGry
As far as I can tell, it looks like the "1NZ9..." address seems to be one one of those ...
3
votes
1
answer
5k
views
How exactly can I generate a transaction id?
I'd like to create a transaction object from scratch. I've read that the tx id for a transaction is the double SHA-256 hash of a serialized transaction, but havent been able to find details on exactly ...
3
votes
1
answer
2k
views
How can I tell what input address sent me coin? [duplicate]
Rather - how does SatoshiDice do it? I know it's not proper format and people advise against it, but how is it technically possible?
3
votes
1
answer
219
views
Validate raw transaction hex without broadcasting
I would like to check the validity of a raw transaction (i.e. whether it would be accepted by network nodes), without broadcasting the transaction to the network. I am interested in knowing what is ...
3
votes
1
answer
636
views
DLC funding transaction error: non-mandatory-script-verify-flag (Witness program hash mismatch) (code 64)
I'm attempting to construct a funding transaction for a DLC. So far I have created the following transaction which encodes entry of a bet for local/remote collateral of 1000/1000 sats and binary win/...
3
votes
1
answer
132
views
Could a transaction hex on testnet theoretically be valid on mainnet?
For all practical intents and purposes it seems a testnet tx hex could never be valid on mainnet because of the prev tx hex present for all inputs used in the tx. However, let's say that by some ...
3
votes
1
answer
725
views
What does the transaction version byte mean?
What does the transaction version byte mean and what would happen if it was 02 instead of 01?
Example:
...
3
votes
1
answer
2k
views
How to push a raw transaction using BitcoinJS (and Request)?
I'm using BitcoinJS to create a playground for Bitcoin transactions.
I have created the following Javascript file:
const request = require('request');
const proxiedRequest = request.defaults({proxy: "...
3
votes
1
answer
3k
views
How can I set the transaction fee when creating a transaction through Bitcoin-cli commands?
I want to run the following command via bitcoin-cli:
./bitcoin-cli sendfrom "10302c02147e2948cbejd9a2bd80d9691ef08a6a4d416c2bb602143a4anj06b90e" "32cjBTQkfLBp38ixj7hdjk0cc90VPPnwhQ" 3.04384215
(...
3
votes
2
answers
1k
views
How to check if raw transaction is signed?
I have a raw transaction and would like to check if signed or not. How can I do this.
I tried using bitcoind and verifying a transaction from be blockchain but it says its not complete.
$ bitcoin-...
3
votes
1
answer
2k
views
Error -25 when bitcoind sendrawtransaction
I am trying to send a bitcoin raw transaction, but always got such an error. what's the possible explaination?
bitcoind --testnet sendrawtransaction ...
3
votes
1
answer
436
views
Can't send raw transaction Bitcoin Core 0.19.1 - non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)
I wanted to send a raw testnet transaction and I was doing it like in the bitcoin documentation, but I still get this error:
non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(...
3
votes
3
answers
2k
views
How do you switch your bitcoinjs integrationfrom TransactionBuilder to transactions-psbt.js?
the code below works:
const btc = require('bitcoinjs-lib');
var tx = new btc.TransactionBuilder(net);
inputs.forEach(o => tx.addInput(o.txId, o.vout));
outputs.forEach(o => tx.addOutput(o....
3
votes
1
answer
564
views
What's the segwit transaction serialization "flag" field for?
According to bip 141, the segwit transaction serialization format (used to compute the wtxid) is:
[nVersion][marker][flag][txins][txouts][witness][nLockTime]
The bip mentions that the flag field ...
3
votes
1
answer
545
views
What happened to the "time" (and blocktime) field of raw transactions?
I have been calling the HTTP method getrawtransaction for a while now to retrieve raw transactions. It used to be, until recently, that I would get the time field with every transaction. However, in ...
3
votes
1
answer
607
views
Signing tx with OpenSSL, but fails when sending with bitcoin qt. How to debug?
I try to create a tx with 4 inputs, and sign it via cmdline and openssl on a cold storage machine. Then I want to send it via bitcoin qt (or blockchain.info). Signing with a single input and a single ...
3
votes
1
answer
2k
views
Receiving `error: {"code":-25,"message":""}` on sendrawtransaction with v0.9.3
I'm running a bitcoind regtest node. When trying to relay a transaction (created using bitcoin-ruby) I receive
error: {"code":-25,"message":""}
When I restart the node and relay the exact same ...
3
votes
1
answer
94
views
Tracking outgoing transactions & malleability attack
What is the best way (in terms of security or resources) to track my outgoing transactions through the RPC API?
I would like to be able to track them down using their tx id and also to have a ...
3
votes
2
answers
2k
views
How can I specify transaction fee size when creating a raw transaction?
Question: Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?
I get some unspent bitcoins
listunspent()
I grab the txid, vout, and ...
3
votes
2
answers
385
views
sendrawtransaction creates hash but does not propogate to the network
I'm on testnet, I've created a raw tx and I'm using bitcoind. I've confirmed that the hex is formed correctly and signrawtransaction returns complete:true.
After I've run bitcoind sendrawtransaction ...
3
votes
1
answer
807
views
How can I create a transaction that collects inputs from many addresses and sends them to one address in bitcoind?
I'm using bitcoind and would like to understand how to create transactions that send inputs from many specifically selected addresses (from my wallet) to one destination address. I want to do manually ...
3
votes
1
answer
139
views
How to properly combine PSBTs for CoinJoin?
I am trying to learn the workflow for manual Coinjoins using PSBTs. I was following Andy Chow's suggestions in another thread here Where he suggests:
1. Createpsbt (he suggests using ...
3
votes
1
answer
526
views
How to send money to set of recipients using bitcoinj
I am creating a wallet app using the bitcoinj library. I have a use-case where I need to send bitcoins to multiple recipients in one transaction. Currently, I am creating multiple send requests for ...
3
votes
1
answer
729
views
How to detect a rejected transaction?
If the nodes I connect to don't support the BIP 61 reject message, how do I know that my transaction was eventually rejected by the network (e.g. due to my bugs)? Is there any timeout or whatever ...
3
votes
1
answer
2k
views
Why I cannot get transaction from genesis block [duplicate]
When I run command
getrawtransaction
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
in my bitcoin-qt console (or bitcoind), I get
No information available about transaction (...
3
votes
1
answer
909
views
getrawtransaction in Bitcoin-Qt (0.8.5)
I am getting an error {"code"=>-5, "message"=>"No information available about transaction"} when issuing getrawtransaction.
I am aware that
since bitcoind/Bitcoin-qt 0.8, no transaction index is ...
3
votes
0
answers
1k
views
How to sign bitcoin raw transactions with Python offline
I have a raw bitcoin transaction created using createrawtransaction
unsigned_tx = "...
3
votes
1
answer
349
views
ZMQ Raw TX doesn't include all transactions
I'm running a Bitcore.io node and using their ZMQ hook but I've noticed that on livenet not all transactions are actually being sent. I've been comparing it to https://blockchain.info/unconfirmed-...
2
votes
3
answers
4k
views
Create OP_RETURN tx with Bitcoinjs-lib
I know how to create a basic TX:
var bitcoin = require('bitcoinjs-lib')
var tx = new bitcoin.Transaction()
// Add the input (who is paying) of the form [previous transaction hash, index of the ...
2
votes
2
answers
443
views
Breaking down a raw transaction:
Complete example:
...
2
votes
1
answer
82
views
Can a signed raw transaction's locktime be changed?
If I create a signed raw transaction with a locktime in the future, and give this raw transaction to somebody else, can they edit the locktime so that they recieve the bitcoin immediately?
For example,...
2
votes
1
answer
2k
views
How do I sign and send a raw transaction using BitcoinJ?
Transaction transaction = new Transaction(params);
// 遍历未花费列表,组装合适的item
double sum = 0;
String address = null;
List<Unspent> unspents = new ArrayList<>();
Map<...
2
votes
1
answer
863
views
How to decode raw transaction which has 00 in '#TxIn' slot?
These are two raw transactions I got from Testnet, using bitcoind -testnet.
...
2
votes
1
answer
692
views
What is the "sequence" and its details as referenced for the segwit application?
On the segwit page there is a reference that the "feffffff" is the "sequence". What does the "sequence" represent in relation to what? Does it always have to be "feffffff"? What happens if it's "...
2
votes
1
answer
245
views
rust-bitcoin Non-canonical DER signature
I am trying to create a raw transaction spending a P2PKH output using rust-bitcoin, but whenever I am pushing the transaction to the testnet I receive the following error mandatory-script-verify-flag-...
2
votes
1
answer
882
views
How to convert PSBT transaction (base64) to raw/serialized (hex) transaction?
Bitcoin Core's CLI has a converttopsbt command used to convert from raw transaction to PSBT transaction but how is it possible to convert from PSBT transaction to raw transaction using Bitcoin Core (...
2
votes
2
answers
220
views
Error while send transaction: Data push larger than necessary
Looks like transaction decodes fine. But when I use sendrawtransaction I got
Data push larger than necessary
What's wrong with this tx?
bitcoin-cli -testnet decoderawtransaction ...
2
votes
1
answer
733
views
What does allowhighfees in sendrawtransaction actually does?
lets say.
i have created a raw transaction with inputs = outputs aka setting 0 fees.
so when i do
bitcoin-cli sendrawtransaction <signed_hex> 1
1 is for allowhighfees
what it actually ...
2
votes
1
answer
952
views
creating OP_RETURN script on bitcoin core console. i.e. with the help of commands
I want to create a OP_RETURN script on bitcoin core console. Not using GUI, i.e. available on proofofexistence.com , Just as we create raw transaction and then sign it and then broadcast it, I am ...
2
votes
1
answer
4k
views
Are there any Python modules that decode raw transaction data?
I'm currently doing RPC calls to bitcoin-cli within python to get raw block data:
bitcoin-cli getblock BLOCKHASH False
I've already written a function that cuts off the block header and splits the ...
2
votes
1
answer
49
views
What is prepended to the front of a ScriptSig and ScriptPubKey of a P2PKH transction?
In some educational materials on bitcoin P2PKH transactions, I'll see 2 digits included in the front of what would be considered the ScriptSig. For example, what is the 8b in the front of the ...
2
votes
2
answers
116
views
What is the relationship between r in signature and the public key
I've been reading about ECDSA in here.
Step 11 says that
you only need the ‘x‘ value (20 bytes) for the signature, and that value will be called ‘R‘
Does that say that R is the x-coordinate of the ...
2
votes
1
answer
375
views
How can I get the destination address from raw transaction data?
I am writing a program that reads Bitcoin transactions from .blk files and performs some analysis on them. I would like to get the transaction destination addresses (like in some transaction explorers:...
2
votes
1
answer
112
views
Can I use uncompressed public keys in Bitcoin Cash transactions?
It have read that Bitcoin Cash uses BIP 143 to generate the signatures and that BIP 143 does not accept uncompressed public keys. Does that mean that you cannot send a Bitcoin Cash transaction using ...
2
votes
1
answer
219
views
how to spend an utxo when the corresponding scriptsig is longer than 256 bytes?
I am trying to spend an utxo sent to a p2sh address. The scriptsig (including the redeem script) is longer than 256 bytes. When the transaction is serialized there is only one byte to indicate the ...