Questions tagged [raw-transaction]

This tag should be used for questions related to raw transactions, bitcoin transactions that have been serialized for network transmission.

Filter by
Sorted by
Tagged with
41 votes
1 answer
5k views

My raw transaction destroyed 0.0284377 BTC. What did I do wrong?

Years ago I designed a .NET module which facilitates the transmission of BTC to my customers. It creates a binary representation of the desired transaction based on the material presented here and ...
Festus Martingale's user avatar
31 votes
2 answers
25k views

Redeeming a raw transaction step by step example required

I am looking, specifically, for a step by step example transaction of sending Bitcoin which uses an actual transaction (How To Redeem A Basic Txn, from a few years back, does a great job of outlining ...
Wizard Of Ozzie's user avatar
18 votes
3 answers
7k views

How to sign a transaction with multiple inputs?

I have been able to program an application in python that sends valid transactions that spend 1 input, but I really can't get it to work with 2 or more inputs. So my question is, how exactly is the ...
Nathan Parker's user avatar
11 votes
2 answers
2k views

How do I spend bitcoins from multiple wallets in a single transaction?

Using, e.g., the Bitcoin Core command line, how could I spend bitcoins from multiple wallets in a single transaction? This comment says: instead of sending the transaction to the network, you send ...
Geremia's user avatar
  • 4,596
10 votes
3 answers
16k views

Is it possible to create a transaction in pure python without needing to run bitcoin locally?

Lets say I have a bitcoin address that has 10 BTC sent to it. I also have the private key for this address Using Python (2 or 3) is there a way to create a signed transaction (which I believe is a ...
priestc's user avatar
  • 311
10 votes
1 answer
3k views

What does a segregated witness transaction look like?

I'd like to learn how segregated witness works, and I thought the raw transaction data would be a good place to start If this is the structure of current transactions: version | [inputcount] {[txid] ...
inersha's user avatar
  • 3,053
9 votes
4 answers
4k views

Is there a user-friendly tool for creating and signing raw transactions?

The title stands for itself. The only tool for doing so I know of is the bitcoind daemon, but it is for from user-friendly. A web-tool in JS would be ideal or a simple CLI tool with clear ...
Steven Roose's user avatar
  • 11.8k
9 votes
3 answers
3k views

Can an unconfirmed transaction that only Blockchain.info shows be manually re-broadcast?

Blockchain.info shows a transaction that was created by Blockchain.info/wallet but for whatever reason the transaction didn't confirm right away and appears to not be getting re-broadcast (perhaps ...
Stephen Gornick's user avatar
8 votes
3 answers
2k views

How to extract addresses from input in raw transaction

I need help to get input addresses from "vin" in offline mode. I don't know how https://live.blockcypher.com/btc/decodetx/ is doing it. Example raw transaction: txn id : ...
sujoshi's user avatar
  • 105
8 votes
3 answers
4k views

Reading Bitcoin Raw Transaction

I want to understand Bitcoin data structure. So i try to understand a raw transaction in json format. When i checked the blockchain.info API documentation, i see that input structure is defined for ...
Orçun Ertuğrul's user avatar
7 votes
2 answers
2k views

HTLC (Hash Time Lock Contract) using bitcoin-qt

Is it possible to manually create a HTLC using the bitcoin-qt command line? I know how to manually creating createrawtransaction/sendrawtransaction using the bitcoin-qt clients command line, and ...
oshirowanen's user avatar
7 votes
1 answer
4k views

What are the hex and asm field values in the JSON decoded from a raw transactions?

I used the command line bitcoin-cli decoderawtransaction <hex-value> and got back a JSON output (see below). However, I noticed there are hex and asm fields that are themselves hex values (at ...
Jane Wayne's user avatar
7 votes
1 answer
5k views

How to sign raw transaction given a private key and SHA hash (in java)

I have followed the instructions here to build my own bitcoin transaction. Redeeming a raw transaction step by step example required Currently my code can create a transaction and compute the SHA ...
alex676's user avatar
  • 73
7 votes
1 answer
718 views

Can I send almost 1MB transaction?

Block size is still limited to 1MB. As I understood, transaction size is no longer limited. So can I be sure that my transaction with 29000 outputs and reliable fee will be included into block? Or ...
Lizzy Bug's user avatar
7 votes
1 answer
7k views

How to decode raw tx hex programmatically

createrawtransaction(...) in testnet returns this hex: ...
Doug Peters's user avatar
  • 1,366
6 votes
1 answer
415 views

What is the different between CompactSize and VarInt encoding?

Pieter Wuille's definition of CompactSize encoding seems to match Greg Walker's definition of VarInt encoding, yet the BitcoinWiki claims that CompactSize is not to be confused with VarInt. What, if ...
drogos86's user avatar
  • 137
6 votes
2 answers
1k views

OP_RETURN data transaction

Looking at Dev Update #5 and in particular the OP_RETURN data function due to be included in 0.9 release, how is data returned during the transaction? Am I meant to create a new txout with no value ...
daentech's user avatar
  • 163
6 votes
2 answers
293 views

Double spend transactions flag the node as "bad"?

I'm playing with raw transactions. It's easy to send two signed valid transactions at the same time from the same output to different addresses (making a double-spend attack). My doubt is: if I make ...
Felipe's user avatar
  • 1,738
6 votes
2 answers
6k views

How to do mass payouts in my application to multiple addresses at once, or very quickly?

Let's say it's pay day--I've accumulated a lot of bitcoins, and sent them all to a single address. I now want to pay a lot of addresses from this "pool" of coins, say anywhere between 100 and 10,000 ...
timetofly's user avatar
  • 201
6 votes
1 answer
991 views

How would this normal raw transaction appear if it was a raw segwit transaction?

How would this raw bitcoin transaction appear if it was a raw segwit transaction? https://blockchain.info/tx/ff8766ec873ff55cc0ac17dee7b379a4efa2a5c83dabdd9a30287c7761ad55d5 This TX Raw is: ...
Mine's user avatar
  • 1,406
6 votes
2 answers
253 views

To combine or not to combine

If I have to make 10 payments of various amounts to different recipients: What is the best approach for the lowest tx fee? One transaction that will serve many (or all) logical payments (many inputs ...
Doug Peters's user avatar
  • 1,366
6 votes
1 answer
2k views

What is the exact difference between a Bitcoin and Bitcoin Cash raw transaction to address sighash_forkid?

Bitcoin Cash apparently uses sighash_forkid, such that if you don't implement that into your raw transactions, the bitcoin cash network won't accept it. How would one need to alter (what to add and ...
Mine's user avatar
  • 1,406
6 votes
1 answer
639 views

How to sign non-standard transaction

Consider Testnet transaction 7a438...de03e which has vout[0].scriptPubKey = OP_DUP OP_DROP OP_DUP OP_HASH160 039.....6fe OP_EQUALVERIFY OP_CHECKSIG The script is equivalent to a standard pay-to-...
kaoD's user avatar
  • 988
6 votes
2 answers
4k views

Are timestamps in transactions trustable?

I need to properly segment transactions by time. Are timestamps in transactions trustable? Can these be forged? I'm not sure if transaction timestamps are part of the protocol, but I'm particularly ...
aromero's user avatar
  • 163
6 votes
1 answer
593 views

Working example of raw transaction utilising Boolean (OP_IF, OP_ENDIF) scripting REQUIRED

I recently posted this Testnet TX (TxID 2d0daa01da8294a54178f8111eb2a02010c425fd15957d8baee8717edcfbe105) which successfully spends an output (TxID ...
Wizard Of Ozzie's user avatar
5 votes
2 answers
394 views

what's the point of "n" in "vout"? getrawtransaction

It seems like "n" is the index, is that true? If that is the case, why is the "n" key necessary? Example: bitcoin-cli getrawtransaction ...
sizzlecookie's user avatar
5 votes
2 answers
1k views

Is it possible to combine two separate transactions into one transaction by only using their signatures?

I have two valid txs and two valid signatures for those txs. Right now they look like: 1) A -> B 2) C -> D A and C are inputs & B and D are outputs. I want to be able to combine them ...
Jack Fraser's user avatar
5 votes
4 answers
841 views

Why is little endian used in transaction formatting and other parts of bitcoin?

I've noticed just from studying the raw hex values of transactions that many components are formatted in hexidecimal little endian. For example, the amount specified in an output will be formatted as ...
jiamijiang's user avatar
5 votes
1 answer
1k views

How do you spend a P2SH transaction?

I've been running into a lot of trouble getting a transaction to spend coins in a multisig address. I create the raw transaction When I go to sign, I get "Operation not valid with the correct stack ...
Drazisil's user avatar
  • 358
5 votes
1 answer
2k views

Signing a raw transaction with multiple inputs

So I am creating a simple P2PKH transaction and after I researched about this found few useful posts and answers here; I was able to successfully spend a a single P2PKH UTXO but it is really getting ...
Furqan Siddiqui's user avatar
5 votes
3 answers
6k views

Calculating "total received" and balance by an address

This is something which I think should be simple but it's driving me crazy. See for example this list of transactions associated with an address: https://blockchain.info/address/...
Ivan Voras's user avatar
5 votes
1 answer
2k views

Code sample to sign a transaction

I have the 32-bytes double hash of a transaction, a 32-bytes private key, and I would like to sign the hash using the private key. How do I do that using BouncyCastle (or anything, really), in C# or ...
Flavien's user avatar
  • 1,027
5 votes
1 answer
1k views

Problem with sendrawtransaction

When I use bitcoin-cli sendrawtransaction and only get -25 errors. I have tried to push the transaction using different blockchain explorer sites, but that didn't work. I have tried: ...
halftimepad's user avatar
  • 1,408
4 votes
2 answers
944 views

How does the variable length integer work?

I'm trying to write a script that constructs a serialized bitcoin transaction from scratch. But when it comes to the number of inputs, the field is a variable length integer. It's typically only 1 ...
inersha's user avatar
  • 3,053
4 votes
4 answers
3k views

How to decode very huge (!) raw transactions?

I'm parsing the blockchain to extract certain information I need for a script. One thing I do is parsing transactions. What I do is: getrawtransaction <tx> decoderawtransaction <rawtx> ...
q9f's user avatar
  • 1,444
4 votes
1 answer
857 views

How to tell which part of the previous tx I need to make the hash to sign for an old given tx?

I have recently been taught (here) how to create the hash to sign for a given "input script" for an existing transaction. I then sought to test my abilities and sought out a difficult ...
Mine's user avatar
  • 1,406
4 votes
1 answer
6k views

Signing a raw transaction with Python ECDSA (or OpenSSL)

I'm looking for specifics of Step15-17 from Redeeming a raw Tx Step By Step, which is essentially the step where the concatenated raw Tx structure is double sha256 hashed, and then signed with an ...
Wizard Of Ozzie's user avatar
4 votes
1 answer
248 views

Can a node broadcast a valid signed raw transaction while still syncing?

Built and signed a native bech32 UTXO, but when I attempt to broadcast from my testnet node using the command sendrawtransaction it returns "missing inputs". I don't have the private keys in my wallet,...
m1xolyd1an's user avatar
  • 5,626
4 votes
1 answer
2k views

Transaction's maximum size

Is there a maximum size for any given transaction? I just created this tx: http://blockexplorer.com/testnet/tx/194173dcc07b396433d5725abe76d52b10d42ebd3d1d10b465429f87fee12a52 and although it ...
Doug Peters's user avatar
  • 1,366
4 votes
1 answer
745 views

Why do my transactions show I received 1 satoshi?

My Multi-Bit client shows 1 satoshi sent to me in my receiving transactions, with 1 confirmation only. The receiving address is quite old too. Why is that showing up when I didn't send myself anything ...
Chloe's user avatar
  • 588
4 votes
1 answer
800 views

Parsing a SegWit transaction - what is the size of witness data?

I'm parsing s SegWit transaction, I got it done until i reach the witness data. How big is the witness data?
Albert S's user avatar
  • 1,630
4 votes
3 answers
3k views

2of2 multisig - redeem script required

Normally somebody who signs a multisig transaction also needs the redeem script or all the public keys used for the creation of the redeem script, alongside their own private key. No I was thinking, ...
Martin's user avatar
  • 227
4 votes
1 answer
4k views

Creating a raw transaction using Bitcoin Core v0.10.0 bitcoin-tx / createrawtransaction

I'm trying to create a raw transaction using Bitcoin Core v0.10.0 (on Windows 7 x64, and with txindex=1 optioned). Bitcoin Core v0.10.0 comes with a new Bitcoin-tx executable utility. The help menu ...
Wizard Of Ozzie's user avatar
4 votes
1 answer
5k views

How do I find the txid and vout values for an input I want to spend?

I was in the http://coinb.in/multisig/#newTransaction and wanted to make a input but it needed 2 values. Txid, How do I get that? TxIn/vout, Whats that and how do I get that?
tor's user avatar
  • 229
4 votes
2 answers
2k views

Broadcast raw transaction without input validation

What tool/software can I use to broadcast a raw transaction, which would not reject a transaction because of invalid or double spend? Bitcoind with RPC has a validation step which rejects any raw ...
Flavien's user avatar
  • 1,027
4 votes
1 answer
383 views

How widespread is OP_RETURN forwarding and mining (as of February 2014)?

As of now (February 2014), how easy is it to have a transaction which makes use of OP_RETURN data confirmed into a block? Do standard nodes forward such transactions yet? Have major mining pools ...
Quizzical's user avatar
  • 386
4 votes
1 answer
2k views

How are transaction fees calculated in raw-transactions?

So, after understanding how to create and send raw transactions on the basis of 'How to send from many bitcoin addresses to one bitcoin address?', in practice I still struggle with transaction fees. ...
Arsenius's user avatar
  • 239
4 votes
1 answer
2k views

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is ...
user2965346's user avatar
3 votes
1 answer
195 views

Relation between transaction data and transaction id

What is the relationship between transaction data and transaction id (which is used at mempool to generate Merkle root)? Note : when we query the getblock with verbosity 2, we get raw block in json ...
Ali's user avatar
  • 71
3 votes
1 answer
625 views

Transaction with OP_RETURN rejected by bitcoind 0.9

The raw transaction below is being rejected by bitcoind 0.9.1 (error: {"code":-22,"message":"TX rejected"}) ...
Flavien's user avatar
  • 1,027

1
2 3 4 5
8