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
3
votes
1answer
26 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 ...
1
vote
1answer
23 views

How to implement getrawmempool?

I’m trying to get all transaction ids in the memory pool as json array. I just finish downloading bitcoin core and do now know where to begin. Any help would be appreciated!!
0
votes
2answers
33 views

Why same output address is invalid in a transaction on Bitcoin Core?

I'm studying Bitcoin Core currently. I found incomprehensible code, that shows making a transaction is rejected if there are same output addresses in a transaction. See Fig1, Fig2 Origin source code ...
1
vote
3answers
46 views

Is there a convention for how to order UTXOs in a transaction with multiple inputs?

I am not sure it matters to produce a correctly formatted transaction, but I am playing around with a wallet that does not keep its own private keys, but produces the raw txs to sign and want to give ...
3
votes
1answer
33 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,...
0
votes
1answer
21 views

How many bytes long should nSequence be?

When I look at the following raw transaction from: https://blockstream.info/tx/a175425ee2f3c01acc97ef32ab1082db14eaa94e5af4c54f02f3b01dec72558e?expand ...
1
vote
0answers
32 views

How to add money to my Bitcoin Wallet and send my first Raw Transaction with OP_RETURN using bitcoin-cli

Background So after reading these two articles (Learning Bitcoin from the Command Line and Mastering Bitcoin), I am trying to piece together how I can get my first transaction with OP_RETURN data ...
1
vote
1answer
60 views

How to sign a raw multisig transaction from an external private key

I am creating a 2-of-3 multisig wallet, where the 2 hot keys are external HSM devices. I am using Bcoin to create my transactions. After the transactions are created, I will send the raw transaction ...
0
votes
0answers
35 views

Bitcoin multisignature addresses

Suppose we have a multisignature address "abc" with 100 coins in bitcoin regtest network, I want to that 100 coins in 10 slots that is i want spend 10 coins at a particular interval. I tried the ...
0
votes
0answers
46 views

Bitcoin Transaction Generation: Signature Verification Error

I have the following raw transaction (basic P2PKH) which I am trying to send to the Bitcoin Testnet 3: ...
1
vote
1answer
82 views

Create a 2-of-3 multisig raw transaction

I would like to create a Bitcoin transaction with a single input and a single 2-of-3 multisig output that pays 1 BTC to any 2 of the following 3 keys: ...
0
votes
2answers
75 views

Raw SegWit TX look solid and verifies, but is rejected. Need help figuring out why

Consider the following transaction expressed as hex: ...
0
votes
1answer
89 views

Two transactions are signed by different private keys, and the value of “R” for these two transactions is the same?

Everyone knows an error in the Blockchain when the same value of "R" can be calculated and find out the private key of the transaction: ECDSA Signature and the "z" value But I have a ...
0
votes
0answers
54 views

HTLC in blockchain regtest mode by creating transactions manually

I am trying to create a htlc smart contract manually by writing a script and finding the hex using the btcc compiler. Now node A has to create a transaction using that hex and lock money in that p2sh ...
0
votes
1answer
117 views

Bitcoin raw transaction with manually created redeem script

I am running bitcoin in regtest mode with 2 nodes bitcoinNode1 and bitcoinNode2.I have created a redeem script by writing the opcodes and converted into hex form using btcc. HP-ProBook-440-G4:~$ btcc ...
1
vote
0answers
43 views

Parse signature and public key from scriptsig in an input transaction of bitcoin protocol [duplicate]

I'm interested in bitcoin protocol and checking validation of a transaction. in a TX message, we can see one or more than one input transaction and every input transaction has a previous transaction ...
0
votes
1answer
35 views

How to code bitcoin transaction for shopping cart

I have written website shopping cart software using MySQL and PHP and I need to add a way for users to pay with Bitcoin. This seems like a basic need for developers in general, but I'm having ...
1
vote
1answer
172 views

Multisig scripts hashing (p2sh): difference between legacy and segwit

Some time ago I noticed that, given the same inputs, addmultisigaddress and createmultisig Bitcoin core's methods were generating different p2sh (addresses). I asked around and a user from the ...
1
vote
1answer
54 views

Accurately calculate fees to sweep all coins

We have an instance of bitcoin core running a watch only wallet. This wallet receives a lot of transactions that we need to (once a day) sweep and split into other personal wallets. The distribution ...
1
vote
0answers
51 views

Error mandatory-script-verify-flag-failed (Signature is found in scriptCode)

I found a few questions with the specific error, but couldn't find also the appropriate answer. So, here I am. I am working on regtest in a Python library that create transactions and then use JSON-...
3
votes
1answer
77 views

Could a transaction hex on testnet theoretically be valid on mainnet?

For all practical intents and purposes it seems a testnet tx hex could never be valid on mainnet because of the prev tx hex present for all inputs used in the tx. However, let's say that by some ...
1
vote
0answers
153 views

How to sign bitcoin raw transactions with Python offline

I have a raw bitcoin transaction created using createrawtransaction unsigned_tx = "...
2
votes
1answer
41 views

Why does witness use count instead of length?

In legacy transaction (without SegWit) the scriptSig is easily parsed by knowing the length of it (a CompactInt value) and without needing to read the script in place. However in SegWit transaction ...
0
votes
1answer
46 views

LedgerJS - How to P2SH sign multiple transactions from multiple wallets in 1 function call?

First some explanation I have made 2 raw transactions via Electrum using my Nano S Ledger as seed and exported them to .txn files. let rawTx1 = "...
7
votes
1answer
550 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 ...
1
vote
1answer
376 views

How to sign rawtransaction with private key

How to sign raw transaction with private key. this is my raw transaction : ...
1
vote
1answer
294 views

Bitcoin Script: mandatory-script-verify-flag-failed Script failed an OP_EQUALVERIFY operation

I try to spend a P2SH transaction (in regtest) with a timelockscript of 200 blocks. I got the following error: mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation) (...
0
votes
1answer
132 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 = ...
1
vote
1answer
70 views

Open source, how can I view “Transaction Create a new transaction” and “Sign Transaction”?

Not long ago I saw on the site github.com the very first Nakamoto code: https://github.com/livegnik/BitCoin-v0.01-ALPHA Running bitcoin.exe, I did not find the console. If the program is open source,...
1
vote
1answer
113 views

What's the segwit transaction serialization “flag” field for?

According to bip 141, the segwit transaction serialization format (used to compute the wtxid) is: [nVersion][marker][flag][txins][txouts][witness][nLockTime] The bip mentions that the flag field ...
0
votes
1answer
187 views

Creating a raw bitcoin transaction and signing it with the private key using php and javascript

I have a full bitcoin core node setup and would like to use it to just "broadcast" my signed transactions. But what is required to make a raw transaction using PHP and Javascript? The variables I have ...
1
vote
0answers
40 views

Determining the byte size of multisig transaction beforehand knowing the details of the transaction [duplicate]

If I know the m of n values of the multisig, the # of inputs (all of which are from the multisig and require m signatures) and outputs and the redeem script, how can I determine the size of the ...
0
votes
1answer
30 views

Can I receive detailed tx data via command line using only a lightclient?

I recently tried to sync the Bitcoin blockchain, but my laptop does not have enough space on it. I want to be able to analyze UTXOs and raw transaction data. Will a lightclient allow me to do this?
1
vote
1answer
626 views

How do I sign and send a raw transaction using BitcoinJ?

Transaction transaction = new Transaction(params); // 遍历未花费列表,组装合适的item double sum = 0; String address = null; List<Unspent> unspents = new ArrayList<>(); Map<...
2
votes
1answer
76 views

ScriptSig Conversion in Python

I'm trying to convert a scriptsig into bytes so that I can better extract R & S values, but when I try and convert, I'm missing some of elements that should be there, like x30 for example. ...
0
votes
1answer
84 views

nSequence win OP_CSV in child tx must be equal to nSeq parent tx?

When I create OP_CSV transaction I need to set nSequence to the same number (in blocks) e.g. 3 OP_CHECKSEQUENCEVERIFY nSequence = 3 But when I trying to spend this tx (after 3 blocks confirmation)...
1
vote
1answer
608 views

Script evaluated without error but finished with a false/empty top stack element

I'm trying to spend coins from this tx https://tchain.btc.com/ad7a1ed858eecdd146d9c932779aecae4b33f068d29cf794fad6de20f5a5d449 The scriptpubkey is simple: 1 OP_CHECKSEQUENCEVERIFY OP_DROP ...
2
votes
2answers
116 views

Error while send transaction: Data push larger than necessary

Looks like transaction decodes fine. But when I use sendrawtransaction I got Data push larger than necessary What's wrong with this tx? bitcoin-cli -testnet decoderawtransaction ...
0
votes
1answer
63 views

Signature generation

I am trying to unwrap bitcoin transaction generation process. A bit confused about signing part. My understanding is the transaction is sha256'd, then sha256'd one more time, then ECDSA'd. Based ...
0
votes
1answer
194 views

How to retrieve transactions in realtime from bitcoind .dat files

I want to get all the data from blocks as they get updated on my local node. Abe offers very poor performance, and fast-dat-parser creates other .dat files and doesn't have enough documentation for me ...
1
vote
1answer
338 views

P2SH-P2WPKH - has always segwit UTXOs?

I've been reading a lot of docs on BTC transaction structure, and find it really confusing when it comes to SegWit story. So, the very first thing is, if I've P2SH-P2WPKH address, does it mean that ...
1
vote
1answer
102 views

MultiSig address transaction high fee with no change

I was testing MultiSig transaction on testnet with raw transactions. I sent a transaction of 0.0012 from MultiSig 2-2 to a bitcoin address: https://live.blockcypher.com/btc-testnet/tx/...
0
votes
1answer
194 views

How to add a signature to a transaction which I can broadcast

I am using ledger and multi sig to sign a transaction I got signature hash where both party signed the transaction. How can I attached this signature to the transaction so that I can broadcast it to ...
1
vote
1answer
254 views

Differentiating Output Script (scriptPubKey) Types

I am working on a little script to breakdown the data inside coinbase transactions. This is largely to improve my understanding of legacy and SegWit transactions (Given coinbase transactions have less ...
5
votes
3answers
491 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 : ...
0
votes
1answer
263 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 ...
0
votes
1answer
129 views

Error when sending transaction: “Signature is found in scriptCode”

I'm trying to send transaction with scriptSig: OP_PUSHDATA<Sig> OP_PUSHDATA<Data1> OP_PUSHDATA<Data2> OP_PUSHDATA<Data3> OP_PUSHDATA<RedeemScript> But I get error: ...
0
votes
1answer
59 views

What does postfic in the wallet transaction id mean

It's known the txid is always a 32 byte hex sequence for example ceca9c54d1a2f9122326a871a3b0b20b725540137e80cb50da663a404f7849a8, but when inpecting the transaction in a wallet it shows it with a ...
0
votes
1answer
201 views

Sending P2SH transaction with non-standard script

I'm trying to send transaction with script: ScriptSig: OP_PUSHDATA<Sig> OP_PUSHDATA<Data1> OP_PUSHDATA<Data2> OP_PUSHDATA<Data3> OP_PUSHDATA<RedeemScript> Since the ...
0
votes
1answer
179 views

Why the PUSHDATA is 65 in the first transaction in blk00000.dat?

https://www.blockchain.com/btc/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b?show_adv=true The raw script is in the first transaction is: ...