Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
1answer
39 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
33 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
37 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
65 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
67 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
73 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
52 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
90 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
42 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
32 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
135 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
48 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
46 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
73 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
127 views

How to sign bitcoin raw transactions with Python offline

I have a raw bitcoin transaction created using createrawtransaction unsigned_tx = "...
2
votes
1answer
40 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
42 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
544 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 ...
0
votes
1answer
311 views

How to sign rawtransaction with private key

How to sign raw transaction with private key. this is my raw transaction : ...
1
vote
1answer
255 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
117 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
61 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
100 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
160 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
517 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
69 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
82 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
560 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
111 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
175 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
292 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
93 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
171 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
229 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
422 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
258 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
118 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
57 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
178 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
171 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: ...
0
votes
2answers
112 views

Is there any python library could be used to decodescript in output

For example decode the ScriptPubKey like 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac to some data like ...
0
votes
1answer
72 views

Cryptocurrency: check if transaction is viable masternode output

I'm developing a tool for masternode automization similar to https://gincoin.io . I'm trying to figure out how to decode if transaction is viable for a masternode. From what I know the ...
0
votes
1answer
252 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, "...
0
votes
1answer
111 views

Bitcoin Pay-to-PubKeyHash (P2PKH) in multi-sig addresses

Can we send Pay-to-PubKeyHash (P2PKH) to an address which starts from 3 . I tried to send raw transaction to one of my coinbase address which starts from 3 but it send to completely different address ...
1
vote
1answer
170 views

how generate <sig> part of scriptSig in bitcoin transactions

I studied many links about bitcoin trxs and about generating scriptSig. Finally I couldn't understand how to make this part. for example I read this links: What is relation between scriptSig and ...
4
votes
2answers
178 views

what's the point of “n” in “vout”? getrawtransaction

It seems like "n" is the index, is that true? If that is the case, why is the "n" key necessary? Example: bitcoin-cli getrawtransaction ...
0
votes
1answer
171 views

What's the best way to store unspent transaction?

AFAIK, To send a raw transaction, which include both input and output. And What if we run it on the local node, we can simply fetch the unspent list by run bitcoin-cli listunspent, but If I just want ...