As of May 31, 2023, we have updated our Code of Conduct.

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
5 votes
4 answers
749 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
1 vote
1 answer
39 views

Transaction keep beeing rejected "non-mandatory-script-verify-flag"

I'm developping Bitcoin integration for Microsoft Dynamics Business Central to offer enterprise capability to apply Bitcoin receivable and payable to accounting. To send a transaction, I'm using ...
Maxime CATY's user avatar
2 votes
1 answer
51 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 ...
jiamijiang's user avatar
-1 votes
1 answer
31 views

"Signature must be zero for failed CHECK(MULTI)SIG operation"

I want to broadcast signed transaction but I get this error how can I solve this I get this everytime. "Signature must be zero for failed CHECK(MULTI)SIG operation" RAW hex ...
K. Khurshudyan's user avatar
2 votes
1 answer
65 views

Create offline bitcoin tx for p2pkh address in a user-friendly way?

You created vanity p2pkh-addresses in the past, you have access to the private keys (WIF) and addresses (1...). Now you want to spend the funds securely and in an offline way (you do not want to ...
hodddl's user avatar
  • 101
2 votes
0 answers
54 views

Create and spend P2WSH that locks coins with OP_CHECKLOCKTIMEVERIFY

I'm attempting to create a P2SWH address with a script that locks the coins for some time. And then I want to spend those coins from that address. I've read a lot, some of the most relevant: BIP173 ...
wazint's user avatar
  • 21
0 votes
1 answer
72 views

parse bitcoin addresses from transactions received through the P2P protocol using python

I'm trying to extract public keys and transaction amounts from tx commands using python. Everyone on this stack exchange has been extremely helpful, but I think it's time to try and leverage a library ...
bitcoinluvr6969's user avatar
3 votes
1 answer
172 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
1 vote
1 answer
49 views

Submitblock input parameters similar to getblock?

I have installed Bitcoin Core on my laptop. Now open bitcoin daemon and do following: First i run getbestblockhash to get the last block hash on the Blockchain. We call this hash as BestBlockHash. ...
Ali's user avatar
  • 71
0 votes
0 answers
69 views

Spend from multiple P2SH addresses with Bitcoin Core

I have P2SH wallet keys from block io backup. The keys and the redeem script example: BIP32 Public Key: xpub661MyMwAqRbcGWq****************************************...
notarobot's user avatar
0 votes
1 answer
20 views

Can we have more than one address in transaction inputs and outputs addresses attribute?

In the transaction data of bitcoin can we have more than one address element in adresses attribute of inputs and outputs of a transaction.
Sherjil Malik's user avatar
1 vote
2 answers
94 views

Decode a signing raw transaction

I'm trying to compare raw_transaction with a sign_raw_transaction. is there any way to do that ? ( Using rpc commande if possible) What i want to do is : create raw_transaction signing it compare the ...
Userbn's user avatar
  • 113
3 votes
1 answer
152 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): ...
luisschwab's user avatar
1 vote
1 answer
76 views

Parsing blk.dat file fails, is this block legitimate?

I'm parsing in blocks from my local blk*.dat files, using this excellent website as a guide. All goes well until file blk00976.dat, block ...
Lee's user avatar
  • 356
1 vote
1 answer
75 views

Can I create a P2PK tx?

Is it still possible to send to a pub key directly? How would I construct such a tx in raw hex, and would the mempool accept it? Thanks
Paul Otto's user avatar
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,...
Cannabijoy's user avatar
0 votes
1 answer
73 views

Should an offline address generated from private key send funds to wallet?

I'm trying to use the python package python-bitcoinlib to send a timelock transaction on testnet. The github has two examples to create an address, and then use that address to send the bitcoin to ...
Cannabijoy's user avatar
1 vote
1 answer
100 views

Structure of a bitcoin transaction, in particular the link to the previous transaction

I'm reading 'Blockchain and distributed ledgers' by Alexander Lipton and Adrien Treccani. I'm trying to understand how individual transactions are linked together. On page 338, they give the 'details ...
Neil D's user avatar
  • 113
0 votes
1 answer
178 views

Using the Bitcoin Crate to Sign a Segwit Transaction

Using the Bitcoin crate, I'm trying to create a transaction programmatically in Rust that spends an output associated with a P2WPKH address. This is the relevant code snippet: fn sign_transaction<...
THLO's user avatar
  • 1
4 votes
1 answer
243 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
  • 117
0 votes
1 answer
120 views

testnet output address has no matching Script?

Here is my code to create a PSBT on the testnet: const bitcoin = require("bitcoinjs-lib") const privKey1 = "..." const address1 = "mkVPHMR5euGTcvpFj6tfyVERstDdH4RtQs" ...
jiamijiang's user avatar
0 votes
1 answer
112 views

How to submit nonstandard scriptPubKey transaction to bitcoind in regtest mode?

I'm trying to replicate an algebraic puzzle I saw in the scriptPubKey of a testnet transaction: OP_2DUP OP_ADD 6e OP_EQUAL I think the intent was for this output to be spendable by a scriptSig of ...
Dave M.'s user avatar
  • 147
0 votes
1 answer
82 views

sendrawtransaction on a non-synced node

This question is related to this post explaining how to use bitcoin-qt to generate a transaction. Once obtained, I'd like to dispatch it from my system which is running a non-synced node. When issuing ...
Jernej's user avatar
  • 97
0 votes
0 answers
151 views

Cant send raw transaction from golang with OP_EQUALVERIFY failed

I'm using btcsuite (especially this example) package to listen and send unspent inputs for specific address. Tx hash: 690059e82dcee13678c45f2c583207d357af254624f5037b4d4d12b39caf74ca From address: ...
nomvd's user avatar
  • 1
2 votes
2 answers
117 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 ...
KHJUAF403456ZS3K564WAEF's user avatar
1 vote
1 answer
121 views

How long is SIGHASH?

I am reading these two posts 1 2, and following step by step. I almost understand, but I still have some questions. Before signing, input script should be removed and replaced by pre locking script. ...
KHJUAF403456ZS3K564WAEF's user avatar
0 votes
1 answer
103 views

Why does my hash not line up with the one in the scriptPubKey?

I got some btc in testnet, here are the outputs. this is the UTXO that i get my btc { "value": 17.24756333, "n": 1, "scriptPubKey": { "asm": "...
KHJUAF403456ZS3K564WAEF's user avatar
1 vote
1 answer
76 views

How to show the Op codes of scriptPubKey?

I've been learning about bitcoin and creating raw transactions. In the example I saw in a video when they use the command decoderawtransaction it outputs: ... "scriptPubKey": { &...
Pedro's user avatar
  • 13
0 votes
1 answer
52 views

problem sending relative locktime (OP_CSV) transaction

i tried making a relative timelocked transaction with 1 block timelock (spendable after 1 confirmation) funding tx: 0fda5412da2a2615361914fad007aac73154746108d44c04529e78f6c4424655 address: ...
Antoni's user avatar
  • 257
0 votes
1 answer
616 views

How to calculate R, S, and Z from raw bitcoin transaction with witness?

How can I calculate the R, S, and Z values from a raw bitcoin transaction? I can extract them with rscan.py, but that doesn't work for new transactions.
Ramin Najafi's user avatar
1 vote
0 answers
146 views

Send transaction with 2 inputs and 2 outputs using Blockcypher

I'm using a node.js client of Blockcypher in order to broadcast a Bitcoin transaction. My code: const originWalletBalance = getBalance(originAddress) const fee = calculateFee() const txBody = { ...
forhas's user avatar
  • 137
-10 votes
1 answer
433 views

Can I be rewarded for discovering, creating, and proving bugs on Bitcoin?

There has never been a remittance history to this address. https://www.blockchain.com/btc/address/1JqPFnGPhHhy54zJKmC1MPiczzgFjCmzE9 public key : ...
user121477's user avatar
0 votes
1 answer
513 views

sign native P2WPKH with bitcoinjs-lib (signing sighash) (non-mandatory-script-verify-flag)

i experimented a lot with p2wsh multisig configurations with bitcoinjs-lib. but when i tried to sign a standard native segwit p2wpkh to p2wpkh transaction everything goes ok except for bitcoin-cli ...
Antoni's user avatar
  • 257
-1 votes
2 answers
53 views

How value of btc to be send is written in raw transaction?

I am currently learning about bitcoin, and I came up to this: https://medium.datadriveninvestor.com/bitcoin-raw-transaction-breakdown-c0a5a3aa8688 to know more about raw tx. What I cannot understand ...
madhurkant's user avatar
2 votes
1 answer
273 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
0 votes
1 answer
103 views

problem with unlocking P2WSH

i made a P2WSH address with bitcoinjs-lib from a script. the same script results in the same address with bitcoin core. I made an unlocking script and tested the combination with btcdeb and everything ...
Antoni's user avatar
  • 257
1 vote
0 answers
137 views

Transfer all funds to another wallet with node.js

I have a segwit address (starts with bc...) and its private key, that holds some BTC value. Using node.js I would like to transfer all my funds to another address. This should be pretty straight ...
forhas's user avatar
  • 137
0 votes
3 answers
396 views

Bitcoin - How to identify if transaction is Segwit

Below is my logic to parse transaction from Bitcoin blk files Pull Version by getting uint32 Read next 2 bytes. If they are 0,1 then it is SegWit Else read again for varint to pull input count If ...
Ankit's user avatar
  • 29
0 votes
1 answer
124 views

Help decoding transaction on bitcoin testnet

I'm trying to learn more about bitcoin and I'm trying to decode a transaction I made to myself on testnet and I can't seem to figure out a couple of things Here is the output of getrawtransaction: ...
btcnewb's user avatar
0 votes
2 answers
115 views

non-mandatory-script-verify-flag (unknown error) with a script that runs ok in btcdeb

after learning a lot about script (and playing with them on the testnet) i made a way longer script. $ btc decodescript 7455886f94935688789352885279935b88946e935b88945187 { "asm": "...
Antoni's user avatar
  • 257
1 vote
2 answers
122 views

unlock non standard script

i transferred some coins to a testnet address 2MwP5KwNRsQV5cf3T7VcFU4Vhj2LcUeMiLM with a locking script just to play with scripts. the locking script is OP_1 OP_2 OP_ADD (always evaluates to true). ...
Antoni's user avatar
  • 257
3 votes
1 answer
221 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 ...
satirn's user avatar
  • 308
0 votes
0 answers
81 views

What is the best site/tool/way for finding the RSZ values of a bitcoin transaction? [duplicate]

The two most popular sites for doing this are down which are https://2coin.org/ and https://2xoin.com/getRSZfromRawTX/ with no indication they'll ever return to be usable. Can anyone here link any ...
coaxel 's user avatar
3 votes
1 answer
651 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/...
satirn's user avatar
  • 308
0 votes
1 answer
138 views

Why is signature S value is unnecessarily high not safe?

I get frequent warning when sending RawTX to PushTX message (Non-canonical signature: S value is unnecessarily high) Why is signature S with a large value dangerous (that is, when the first HEX ...
Dew Debra's user avatar
1 vote
0 answers
256 views

How do you sign an unsigned transaction using Electrum in a multisig setup?

I am experimenting with multisig in testNet between Electrum and Caravan by Unchained Capital. I created a 2-of-2 multisig in Electrum with BIP 39 seeds. I then created a watch-only wallet in Caravan ...
FancyCookie's user avatar
0 votes
2 answers
525 views

Error 400 when pushing tx hex to mempool.space's API

I am using the code syntax provided by mempool.space for a POST transaction request from their website here: https://mempool.space/api const mempoolJS = require("@mempool/mempool.js") const ...
jiamijiang's user avatar
1 vote
1 answer
156 views

Get raw transaction from tx id without txindex=1

I'm trying to get the raw transaction hex string of a transaction that I know the id from. I would like to do that without using txindex=1. As I assume the transaction is unspent (and confirmed) I'm ...
user44941's user avatar
0 votes
1 answer
642 views

How can I get RawTX transactions?

I used to be able to get RawTX transactions on the Blockchain using the link: https://blockchain.info/tx/60183ab915f2f4b0190605f98bd0e9f8eafe13a1c902b3ae87ecd0dfc8a599a0?format=hex But the site ...
Dew Debra's user avatar
1 vote
1 answer
679 views

What is "Witness"?

What really is "Witness"? I saw this data in blockchain and can not identify what it really is. Here is the dump of transaction for example. TX hash = ...
Denis Leonov's user avatar

1
2 3 4 5
8