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
0answers
24 views

Decoding raw transaction [closed]

I have several raw transaction hashes that when I go to decode on blockchain it says; Trying to access beyond buffer length What does this mean? I got these hashes from an encoded UTC file i sent to ...
1
vote
0answers
24 views

Is there an API to create transactions in the Bitcoin blockchain with only a private key?

Is there an API to create transactions in the Bitcoin blockchain with only a private key? I am new to working with the Bitcoin and using its API. So, I have searched the API documentation. And here is ...
0
votes
0answers
19 views

Transaction with multi input in concept

As a developer I know how to create a transaction with one input and one or multi outputs. I know after we created a transaction with some of predefined parameters, we have to hash it and then we ...
0
votes
2answers
43 views

Why is 'script' used in a transaction instead of the output address?

I see transactions contain script for each output, but this "script" seems to be deterministically derived from the address associated with the output. Why does the bitcoin protocol opt for the use ...
1
vote
2answers
303 views

Why raw Bitcoin transaction are in hex format?

Why are Bitcoin raw transactions in hexadecimal format? I am looking for scientific articles / books on this topic and I can't find anything, so my question is: why are they in hexadecimal and can ...
0
votes
1answer
31 views

Bitcoin core - creating transaction from UI without broadcasting it

I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction. Is there a way to do that? I assume that ...
0
votes
1answer
36 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?
0
votes
1answer
39 views

Send bitcoin with bitcoin core without syncing to network

I want to use bitcoin-core just for sending bitcoin from my address to another destination address. i don't need the huge history information of blockchain. In fact, I want to run a light-weight ...
0
votes
1answer
25 views

How do I calculate the sum of transaction inputs?

I am attempting to calculate the mining fee of a transaction, given it's unsigned transaction hex by taking difference between the sum of the inputs and outputs. I also have access to an array of ...
0
votes
1answer
28 views

how to sign a multiple output transaction

currently i m using below code,how to add multiple address to address. let transaction = new bitcore.Transaction() transaction .from(txoSet) .to( ...
0
votes
1answer
32 views

How to spend the change in a BIP32 super account?

I am developing my own wallet in python for which I have already implemented BIP32 and BIP39. According to BIP32 documentation, change should be stored in different addresses as well as payments ...
0
votes
0answers
20 views

Blockcypher make_tx_signatures “Bad Signature” error

I am having trouble to sign a transaction on Blockcypher Test Network (using python): import requests from blockcypher ( import send_faucet_coins, create_unsigned_tx, make_tx_signatures, ...
0
votes
2answers
72 views

Creating a custom transactions

I am currently learning how to create raw transactions. I can already create standard using bitcoin core (0.19.1), but when I wanted to create with custom opcode like this: asm: OP_HASH160 ...
2
votes
1answer
57 views

Can't send raw transaction Bitcoin Core 0.19.1 - non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

I wanted to send a raw testnet transaction and I was doing it like in the bitcoin documentation, but I still get this error: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(...
0
votes
1answer
56 views

getting public key from any raw transaction - what to take care of?

i need to retrieve public key of transaction sender. now i know there are 03 compressed pubkeys and 04 uncompressed ones. but how is this working with segwit and multisig addresses? can you please ...
0
votes
2answers
36 views

Can I build a raw segwit transaction with no segwit inputs?

I am trying to build a segwit transaction between a regular p2pkh address and a p2sh 2-of-2 multi-signature address. I have successfully transacted back and forth between these two addresses before (...
1
vote
0answers
59 views

Missing input returned from sendrawtransaction on P2SH multisig?

I'm playing around on regtest to build a flow for P2SH multisig. I'm getting "missing inputs" back from the sendrawtransaction RPC call, but I see inputs when I put it in a decoder. They each have a ...
0
votes
1answer
36 views

How do people using thin clients know the correct merkle path of transactions they've sent without knowing the full block?

User A send a transaction to user B. Those transactions are bundled together into a merkle tree. User A and B can both use the transaction plus the merkle root, plus the merkle path to prove the ...
2
votes
1answer
48 views

How to properly combine PSBTs for CoinJoin?

I am trying to learn the workflow for manual Coinjoins using PSBTs. I was following Andy Chow's suggestions in another thread here Where he suggests: 1. Createpsbt (he suggests using ...
0
votes
2answers
114 views

Creating a unconfirmed bitcoin transaction

I know that it's sounds ridiculous, but i need to create an unconfirmed bitcoin transaction that will be unconfirmed for 2+ hours.I came to a conclusion that i need to create a 0 fee transactions but ...
0
votes
0answers
38 views

Creating and broadcasting a bitcoin transaction

I would like to create a bitcoin transaction with no fee . So i tried by creating a raw transaction using some online services and by coding it using node.js and bitcore library , but I did not get ...
3
votes
3answers
394 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....
1
vote
1answer
73 views

Transaction fails to validate (Error running script)

I've created a transaction on the TESTNET and am trying to push it via BlockCyphers facility at: https://live.blockcypher.com/btc-testnet/pushtx/ when I make the attempt, I get the following error: ...
0
votes
1answer
55 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 ...
4
votes
1answer
563 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
62 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
63 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
57 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
70 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
25 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
136 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
142 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
37 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
75 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
183 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
92 views

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

Consider the following transaction expressed as hex: ...
1
vote
1answer
160 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
63 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
273 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
60 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
59 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
323 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
79 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
94 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
85 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
268 views

How to sign bitcoin raw transactions with Python offline

I have a raw bitcoin transaction created using createrawtransaction unsigned_tx = "...
2
votes
1answer
53 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
86 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
572 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
648 views

How to sign rawtransaction with private key

How to sign raw transaction with private key. this is my raw transaction : ...

1
2 3 4 5 6