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
0 votes
1 answer
32 views

Incorrect Transaction ID being calculated for a p2wpkh transaction

RAW Signed transaction (signet) ...
0 votes
1 answer
901 views

How to properly use the rpc command `listunspent` with `bitcore-lib` to create a transaction and get the transaction hash?

I am trying to use the rpc command listunspent to get all the UTXOs relevant to an address, and then I am trying to pass it to a transaction, using bitcore-lib. Below is my code: const Client = ...
0 votes
1 answer
37 views

Raw Transaction decoding fails on signet but decodes fine in BlockCypher decoder

Type of transaction: p2wpkh transaction creating a multisig (p2wsh) on signet. Error:TX must have atleast one inputs. Output on online decoder { "addresses": [ "...
3 votes
2 answers
792 views

How to sign a transaction using BitcoinJ

I am having problem signing the transaction using BitcoinJ library without the Wallet instance, I only have the Transaction class instance and the ECKey in order to sign the transaction. Is there a ...
0 votes
1 answer
269 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 votes
2 answers
844 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 ...
3 votes
1 answer
381 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-...
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 ...
0 votes
1 answer
828 views

Litecoin - mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

I have manually a raw transaction using bit library in order to send a transaction using Litecoin testnet. After adjusting fee's and other network variables I got the following error that is stated in ...
2 votes
1 answer
656 views

What is a "serialized signed transaction"?

Shown in the gray area here, describing how to apply, I think, Segwit to a transaction (particularly a Bitcoin Cash tx). The last section is titled "serialized signed transaction" however ...
0 votes
1 answer
456 views

Manage multiple users wallets for web wallet service

This already summaries the issue I'm currently trying to figure out to calculate the transaction fee to prevent negative balance. (testnet) I tried using createrawtransaction answered. When I tried ...
1 vote
1 answer
755 views

NBitcoin: Get address out of raw block stream

OK, I am sure that this is a really dumb, rookie question, so sorry in advance... I am trying to read through the blockchain and display the receiving address(es) for all transactions in the chain. (...
1 vote
1 answer
169 views

get source address of a transaction

I have been conducting research on the web and Bitcoin Stack Exchange to find a method for obtaining the source address of a transaction. I have come across multiple answers, some suggesting the use ...
3 votes
1 answer
149 views

Processing bitcoin reward block's input transaction

I'm parsing the block response of my bitcoin node and everything is going ok. The only thing I don't understand is how to parse the input transaction of the block reward. This is the array that I see ...
0 votes
1 answer
179 views

Is there any online service/API to get the complete transaction in raw form?

Is there any online service or API that allows you to get the transaction in raw form, i.e. in "byte" format? I know it can be done through bitcoin core, however, I need some online service/...
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....
0 votes
1 answer
76 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 ...
3 votes
3 answers
873 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 ...
1 vote
1 answer
620 views

Is the any workable testnet3 Bitcoin solution for creating, signing, broadcast a normal transaction using Golang?

Currently I'm trying to create, sign & broadcast bitcoin transaction using btcsuite. For start, I've already had testnet3 address & its associated privatekey for testing. However, hunting ...
3 votes
1 answer
553 views

How can I define the change address of a transaction using createrawtransaction?

This question is almost the opposite of How to find the change / sender address given a txid? If I am making a transaction using createrawtransaction how can I define the change (sender) address?
2 votes
0 answers
2k views

Can't send raw transaction. Bitcoind error: {"code":-22,"message":"TX rejected"}

I have this raw transaction: ...
2 votes
0 answers
26 views

No inv messages from inbound nodes

I'm writing a tx relay-only node that can accept inbound connections and make outbound ones. Just for research. What I'm seeing that on inbound nodes the initial handshake completes and the connection ...
0 votes
0 answers
31 views

How to hash a message (tx message) to get message hash? [duplicate]

I am trying to create a raw TX and sign it. I know that to sign a transaction we need the message hash (here m) value which is double sha256 hash of something like this: 01000000 #Version 01 #Number ...
0 votes
0 answers
49 views

How do I create an p2pkh raw transaction using the latest Bitcoin core version? Any help? Thanks

Like the title says I need of help here, how can I create an p2pkh raw transaction using the latest version of Bitcoin core is it even possible? What are the required fields do I need to use the ...
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 ...
1 vote
1 answer
386 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 ...
2 votes
1 answer
72 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 ...
-1 votes
1 answer
88 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 ...
2 votes
1 answer
110 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 ...
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: ...
2 votes
0 answers
98 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 ...
1 vote
2 answers
345 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 ...
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 : ...
1 vote
1 answer
353 views

ScriptSig raw hex to sign raw tx

i have a p2sh address that is created using an uncompressed public key (from my ledger nano) and a compressed public key (bitcoincore wallet). It requires both signatures to send the funds. When i use ...
0 votes
1 answer
117 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": "...
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 ...
0 votes
1 answer
204 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
168 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 ...
1 vote
1 answer
84 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. ...
0 votes
2 answers
235 views

How to get BTC transfer amount from raw tx using bitcoinjs

Suppose I have following object console.log(bitcoinjs.Transaction.fromHex(rawTx)); The output Transaction { version: 2, locktime: 1655960, ins: [ { hash: <Buffer dc 4d aa 10 db ...
0 votes
1 answer
45 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.
2 votes
2 answers
381 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 ...
3 votes
1 answer
316 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): ...
1 vote
1 answer
605 views

How to calculate fee in BitcoinJS raw transaction?

I have a transaction with 3 inputs and 2 outputs. 1output is the recipient and the other output is change address. How should I calculate the fee and apply it to output?
1 vote
1 answer
117 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 ...
1 vote
1 answer
143 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
2 votes
2 answers
230 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
112 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,...
0 votes
1 answer
130 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 ...
1 vote
1 answer
223 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 ...

1
2 3 4 5
8