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
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
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
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
6 votes
1 answer
459 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
  • 147
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
748 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
808 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
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
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 ...
fyquah95's user avatar
  • 205
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 ...
jchysk's user avatar
  • 133
3 votes
1 answer
850 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: ...
John's user avatar
  • 383
1 vote
1 answer
1k views

Does exist some library for decode/encode raw transaction?

I want to parse raw transaction into JSON then change some values and encode back to hex. JSON like this: { "addresses": [ "346vcZZ6QV4nr68fybMEuA7qxxQeyKWoPS" ], "block_height": -1, "...
Andr1i's user avatar
  • 131
1 vote
2 answers
168 views

Issues decoding the words to transaction hex

I had asked a question earlier about compressing the transaction hex as it was used in a project that involved sending text messages (160 characters limit per message): Compress transaction hex string ...
user avatar
1 vote
1 answer
619 views

OP_EQUALVERIFY: non-equal data

I'm trying to push the following transaction but keep getting OP_EQUALVERIFY: non-equal data Here's the transaction ...
Akhil F's user avatar
  • 315
0 votes
3 answers
654 views

Is there a way to create a tx completely offline? Maybe with a script or cli commands?

I mean generating the transaction itself offline, assuming I know in advance how much bitcoin a UTXO has. In other words, without querying the network for the UTXO balance. Then I also need to sign ...
Pineapple29's user avatar
0 votes
2 answers
359 views

Unable to createrawtransaction - “Input not found or already spent”

I need help. I have createrawtransaction as per the screenshot but then, unable to signrawtransactionwithkey, I have insert WIF Private Key and it state that "Input not found or already spent&...
Jsim's user avatar
  • 43
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
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,626
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
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
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
2 answers
296 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
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
4 votes
1 answer
273 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,646
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
865 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
3 votes
3 answers
874 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 ...
Arsenius's user avatar
  • 239
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 (...
Zergatul's user avatar
  • 958
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 ...
Shaul Kfir's user avatar
3 votes
1 answer
235 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 ...
FractalEncrypt's user avatar
3 votes
1 answer
911 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 ...
Nitish Upreti's user avatar
3 votes
1 answer
607 views

Creating a raw transaction from scratch/

I am currently learning bitcoin technology. So I came up around the term raw transaction. There are many tools to create a raw transaction but I want to do it all by myself. My Idea is to write a raw ...
madhurkant's user avatar
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?
Shamoon's user avatar
  • 2,849
2 votes
2 answers
3k views

Why raw Bitcoin transaction are in hex format?

Why are Bitcoin raw transactions in hexadecimal format? I am looking for scientific articles / books on this topic and I can't find anything, so my question is: why are they in hexadecimal and can ...
M A's user avatar
  • 89
2 votes
1 answer
2k views

How does one submit a transaction to the network using the blockchain.info API?

I am currently working on a project which makes use of the blockchain.info api (php). Could anybody please tell me how to use this api to submit transactions to the network?
user31070's user avatar
2 votes
1 answer
4k views

SignRawTransaction - What is scriptPubKey and redeemScript? [SOLVED] [closed]

Let me talk about how I got to the situation I'm in right now. I am using PHP and the JSON library to control bitcoind. And doing so..... I created a multisignature address requiring 2 of 3 ...
Bitcoin Dev Wannabee's user avatar
2 votes
1 answer
733 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:...
zigak's user avatar
  • 21
2 votes
1 answer
2k views

What does "16: mandatory-script-verify-flag-failed (Non-canonical DER signature)" error mean?

What can this error mean? I've read through the code for it, and several of my transactions have not met the criteria for the error, yet are still rejected. I've tried decoding via several means (...
Mine's user avatar
  • 1,406
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 ...
heyo's user avatar
  • 81
2 votes
1 answer
931 views

Single signature P2SH redeem script

How would one go about creating a single signature P2SH transaction? (Analogous to a "2 of 3 multisig P2SH" but instead I'm asking about a "1 of 1".) Would one wrap a standard P2PKH scriptPubKey ...
muanon's user avatar
  • 21
1 vote
2 answers
3k views

How to create a signed transaction offline using electrum?

I remember that on Electrum, it used to have a Preview button inside the Send tab. By clicking the Preview button I could export the unsigned transaction, and then sign it. I cannot find this button ...
bbnn's user avatar
  • 247
1 vote
2 answers
472 views

Compress transaction hex string

I realized transaction hex can be very long and you need it for broadcasting a tx using blockstream.info API: https://blockstream.info/testnet/api/tx https://github.com/Blockstream/esplora/blob/...
user avatar
1 vote
1 answer
386 views

Does createrawtransction accept scriptPubKey and redeemScript as inputs?

According to the built-in RPC documentation the signature for createrawtransaction is: createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}. Gavin in his example on 2-of-3 ...
Doug Peters's user avatar
  • 1,366
1 vote
1 answer
1k views

Unspendable outputs vs Black Hole address

On the Script page of the Bitcoin Wiki, in the "Provably Unspendable/Prunable Outputs" section, it gives an example of a script which would make that output of the transaction unspendable. In the ...
meshcollider's user avatar
  • 11.8k
1 vote
1 answer
3k views

Bitcoin offline transaction

Consider the following scenario: create an entire bitcoin raw transaction while offline (no access to the blockchain) only when you decided to broadcast it that you would need to get online Is ...
Mark Messa's user avatar
1 vote
1 answer
467 views

How to redeem Non-standard script Tx (testnet instance)

Th testnet TxID 8d897ca91774a7fafa086a3275e679248d6bffee015d3b2efefd5dab00df152d has the following scriptPubKey: scriptPubKey: "OP_DUP OP_HASH160 5f1426c2ce4a8e1abaa9dbe819b6303eb8a25a26 ...
Wizard Of Ozzie's user avatar
0 votes
1 answer
86 views

What fields of a coinbase transaction can be empty?

Is it correct to say: As the coinbase transaction doesn't need to identify an output, there is no need for the input scriptSig. Would a block be accepted in which the coinbase transaction has an ...
Lee's user avatar
  • 576
0 votes
2 answers
1k views

Sign transaction with multiple inputs using bitcoinj/peercoinj libraries

Good day for everyone! I have some troubles with adding signed Input to the transaction. Currently, I'm working with altCoin (fork peercoin) currency. I'm trying build the transaction in the ...
Timur Panzhiev's user avatar
0 votes
3 answers
3k views

Extract genesis block raw TX data

RPC does not return the raw transaction for the genesis block. I need to get this data for other coins to be able to add them to ABE. https://github.com/bitcoin-abe/bitcoin-abe/blob/master/Abe/...
NachoCheese's user avatar