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
1 vote
1 answer
39 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 ...
  • 113
0 votes
0 answers
67 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<...
  • 1
1 vote
1 answer
115 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 ...
0 votes
1 answer
44 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" ...
0 votes
1 answer
52 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 ...
  • 147
0 votes
0 answers
58 views

Create signature for raw bitcoin transaction by hand using Swift

I have a bitcoinWalletAddress in bitcoin testnet (starting with tb1) publicKey already in hex format privateKey in P2WPKH format looking like cTS... By following this guide and this one I created ...
  • 1
0 votes
1 answer
46 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 ...
  • 87
0 votes
0 answers
87 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: ...
  • 1
0 votes
1 answer
50 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 ...
1 vote
1 answer
81 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. ...
0 votes
1 answer
60 views

Q's about P2WPKH

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": "...
1 vote
1 answer
42 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": { &...
  • 13
0 votes
1 answer
34 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: ...
  • 247
0 votes
1 answer
310 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.
1 vote
0 answers
76 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 = { ...
  • 137
-10 votes
1 answer
273 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 : ...
0 votes
1 answer
247 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 ...
  • 247
-1 votes
2 answers
41 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 ...
2 votes
1 answer
132 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 ...
0 votes
1 answer
64 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 ...
  • 247
1 vote
0 answers
94 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 ...
  • 137
0 votes
3 answers
284 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 ...
  • 29
0 votes
1 answer
80 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: ...
0 votes
2 answers
60 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": "...
  • 247
0 votes
0 answers
45 views

and multiple pieces of witness data to an input

I found an address on the test chain with 1.3 btc. it was a p2sh-p2wsh address and wanted to unlock it. it didnt work with bitcoin-cli because it only accepts a string of hex encoded witness script. i ...
  • 247
1 vote
2 answers
83 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). ...
  • 247
2 votes
1 answer
138 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 ...
  • 198
0 votes
0 answers
68 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 ...
0 votes
0 answers
405 views

Decode Raw Bitcoin Hexadecimal Transaction

I have been using this excellent site one amongst many that offer to Decode Raw Bitcoin Hexadecimal Transaction....https://live.blockcypher.com/btc/decodetx/ Well, the site was down for a bit and that ...
3 votes
1 answer
320 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/...
  • 198
0 votes
1 answer
83 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 ...
1 vote
0 answers
153 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 ...
0 votes
2 answers
194 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 ...
1 vote
1 answer
98 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 ...
0 votes
1 answer
228 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 ...
1 vote
1 answer
333 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 = ...
2 votes
1 answer
190 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:...
  • 21
0 votes
0 answers
35 views

how to get every inputs signature from a raw hex bitcoin transaction using python? [duplicate]

I have this raw transaction : ...
1 vote
1 answer
480 views

Broadcasting a raw transactions on bitcoin network

I have made a raw transaction (based on Bitcoin rules) for my own for sending on Bitcoin network. I would like to submit it on the Bitcoin network. How can I do it ? (preferably command line based).
1 vote
1 answer
238 views

Creating Witness Signature: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

So I am trying to do my own witness signatures as described in bip143. I have code that correctly verifies the example signature, so I thought I had a hold of the basic signing and verification. I ...
  • 412
0 votes
1 answer
88 views

When generating witness for bip143, how do you choose WHAT outpoint to use?

in bip 143 for creating a witness signature it describes what needs to be serialized/signed. One thing that the doc seems to be missing is how to determine WHICH outpoint to use. So in these ...
  • 412
1 vote
1 answer
99 views

convert from public address format to raw transaction format

So I am trying to full understand how to decode transactions. In the dev docs it discusses a raw transaction: https://developer.bitcoin.org/reference/transactions.html in the paragraph "TxOut: A ...
  • 412
1 vote
1 answer
95 views

signed raw transaction does not conform?

I have become fairly familiar with constructing raw transaction. One thing I can't understand is after a raw transaction comes back from a signing, it doesn't look like it conforms to the transaction ...
  • 412
0 votes
0 answers
436 views

Need help with (Script failed an OP_EQUALVERIFY operation)

This is a repost of a question which i posted directly on the repository of bitcoinjs-lib, which you can see here I'm getting the following error when trying to push transactions: Err: ...
0 votes
1 answer
86 views

Bitcoin core trying to sign a transaction loaded from psbt file, but getting "could not sign any more inputs" error

I am trying to sign a transaction loaded from psbt file, but I'm getting could not sign any more inputs error. I did it successfully on the first try. However I cannot do it any more now. I changed my ...
  • 227
1 vote
1 answer
443 views

What is the difference between signrawtransactionwithwallet vs signrawtransactionwithkey in signing unsigned raw transaction?

I have a bitcoin address generated in bitcoin-core (offline computer) I imported that one address into electrum as a watch-only wallet (online computer) From electrum I created an unsigned transaction ...
  • 227
1 vote
1 answer
139 views

Error validating a transaction with blockcypher

I've created a testnet transaction using blockcypher API (https://api.blockcypher.com/v1/btc/test3/txs/new) and then signed the transaction using the signer (go lang). And then sent signed transaction ...
  • 13
0 votes
0 answers
46 views

Automatically forward bitcoins from address A to Address C At 0 confirmations?

I run a bitcoin full node,at that node i have an Address A. Assuming that Address A receive an Amount from Address B.(i can get UTXO information from blockchain.info API) How can I automaticlly resend ...
  • 1
3 votes
1 answer
103 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 ...
0 votes
1 answer
116 views

How are the unlocking script + locking script executed?

I just wanted to verify the input of transaction 7de75. The related output is index 10 of transaction 00f64. The locking script defined in 76a91 (index 10) is: OP_DUP OP_HASH160 ...

1
2 3 4 5
8