Questions tagged [signrawtransaction]

A command or procedure call provided by Bitcoin-Core that allows a raw transaction to be signed using keys provided or keys in the wallet.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

signing input for spend funds locked by this script

Please explain how to sign input for raw transaction with privet key corresponding to 1st or 2nd public key in this script "asm": "OP_IF 1694275749 OP_CHECKLOCKTIMEVERIFY OP_DROP ...
alnostru's user avatar
0 votes
0 answers
46 views

conditional spending from P2WSH address

What im doing wrong? Sinse I found out that Bitcoin is programmable money Im trying to use it potential. Using this site https://improvein.github.io/bitcoin-forge/?#/script/create I’ve created a ...
bitc's user avatar
  • 1
0 votes
1 answer
69 views

Transaction created using `bitcoin-cli` failed to decode

I am creating a rawtransaction using bitcoin-cli. After I create my transaction using 'bitcoin-cli createrawtransaction ' this returns and HEX of: ...
Gencehan ARPAÇAY's user avatar
2 votes
2 answers
248 views

How to recover and sweep P2PK coins

In an effort to recover some old dust, I've been working on a sweep script to be used on a bunch of old private keys with a little BTC locked inside multiple p2pk utxos. First I tried using python's ...
smk's user avatar
  • 29
-1 votes
1 answer
54 views

How to Sign Bitcoin Transaction from two or more children wallet in HD wallet

How can I handle a situation where I have bitcoin on two or more different wallets with a single phrase, how can I sign the two transactions to a friend. Example: I have 2BTC in a wallet address that ...
Topman's user avatar
  • 11
1 vote
1 answer
1k views

python-bitcoin-utils - sendrawtransaction RPC error: {"code":-25,"message":"bad-txns-inputs-missingorspent"} when trying to broadcast my tx?

I am trying to create a bitcoin transaction to send all of the funds from tb1qj6zz96g8xgrwpgmdlvmkrjlwzz54sf47086yc9 to tb1qxgm8j0cq7tnftef3t563psl56gtmzxanm5c9uy. ...
ChristianOConnor's user avatar
1 vote
1 answer
96 views

signrawtransactionwithwallet for a multisig-transaction, after getnewaddress

I created a descriptor wallet in bitcoin core 24. Next, I created a new address with using getnewaddress. I took pubkey of that address, and used it as one of the three pubkeys when generating a ...
Meglio's user avatar
  • 287
2 votes
1 answer
104 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,...
Cannabijoy's user avatar
1 vote
1 answer
146 views

Sign raw transaction with key

I'm upgrading my application from bitcoin core 21.0 to 23.0. In core 21.0 I created a raw transaction and sign it with my private key after I called dumpprivkey RPC. At core 23.0 I received this error ...
liorko's user avatar
  • 219
1 vote
0 answers
170 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 = { ...
forhas's user avatar
  • 137
0 votes
0 answers
1k views

bad-txns-inputs-missingorspent

I want to sign btc transaction but when I want to broadcast trx to network even mainnet nor testnet, with both networks I got the same error.: bad-txns-inputs-missingorspent "error": { "...
Ahmad headr's user avatar
1 vote
0 answers
59 views

Is signrawtransactionwithkey secure?

is the node API signrawtransactionwithkey (as documented here https://developer.bitcoin.org/reference/rpc/index.html) secure or recommended? This API takes a private key, so i want to understand how ...
Damo's user avatar
  • 113
1 vote
0 answers
288 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 ...
FancyCookie's user avatar
1 vote
1 answer
90 views

How to get Y from X

Ok, so I get address generation now, and I understand that X is hashed, however for verification of a signature, we need the public point, (x,y) How would one get Y from X? Lets take an example, im ...
Raccoondude's user avatar
1 vote
1 answer
127 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 ...
noone392's user avatar
  • 422
2 votes
0 answers
137 views

Creating a complex raw transaction

I'm using createrawtransaction to get a complex transaction of 2 inputs and two outputs as discussed here: https://developer.bitcoin.org/examples/transactions.html bitcoin-cli -regtest ...
a56z's user avatar
  • 21
0 votes
1 answer
252 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 ...
bbnn's user avatar
  • 227
1 vote
1 answer
914 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 ...
bbnn's user avatar
  • 227
0 votes
0 answers
85 views

RPC to sign PSBT with private key

What is the PSBT related RPC which works similar to signrawtransactionwithkey ?
user avatar
1 vote
2 answers
3k views

How to create a signed transaction offline using electrum?

I remember that on Electrum, it used to have a Preview button inside the Send tab. By clicking the Preview button I could export the unsigned transaction, and then sign it. I cannot find this button ...
bbnn's user avatar
  • 227
2 votes
1 answer
301 views

rust-bitcoin Non-canonical DER signature

I am trying to create a raw transaction spending a P2PKH output using rust-bitcoin, but whenever I am pushing the transaction to the testnet I receive the following error mandatory-script-verify-flag-...
Jakob Abfalter's user avatar
0 votes
1 answer
704 views

Can we sign a psbt raw tx having multiple inputs created from BTC node with bitcoinjs lib?

Due to secruity reasons, unavailablity of private keys on my end and as per project requirements I need to build back end apis where I will provide a PSBT raw transaction hex (having multiple inputs) ...
Surinder kumar's user avatar
1 vote
2 answers
219 views

Partially Signing multisig rawtransaction returns redeemScript/witnessScript does not match scriptPubKey

I want to partially sign a rawtransactions using bitcoind through RPC but I am really stuck almost at the end of the process when I try to sign my manually created raw transaction and I spent many ...
Kevin Gravell's user avatar
1 vote
0 answers
115 views

How to use Digital Signature to Sign Unsigned Transaction?

so I was trying to sign my unsigned transaction: ...
coder123's user avatar
  • 113
0 votes
1 answer
597 views

Signing transaction offline - manual way vs. Electrum

Being inspired by the thread (Redeeming a raw transaction step by step example required) I wanted to understand transaction signatures on the byte level. So I created my own Linux scripts that: ...
citizenfu's user avatar
1 vote
1 answer
88 views

Can a regtest bitcoind node use SignRawTransactionWithKey + prevtxs for a mainnet raw transaction?

I want to know if a regtest nnode can sign a raw mainnet transaction with the signrawtransactionwithkey rpc provided that I pass the correct keys and prevtxs as the regtest node will not be aware of ...
Harmalarm's user avatar
3 votes
1 answer
458 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(...
M A's user avatar
  • 79
0 votes
1 answer
135 views

bitcoind multisig transaction not shown as multisig transaction / shown as "signed" by 2:3

Seems like there was a change in how multisig transactions are being created. Running a node using bitcoind v0.16.3 and another one using latest bitcoind (v.0.19.0.1). The multisig transaction created ...
t0berius's user avatar
5 votes
1 answer
2k 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 ...
Furqan Siddiqui's user avatar
4 votes
2 answers
2k views

How to send bitcoin from an offline Bitcoin Core that doesn't have a synced balance?

I am setting up a cold wallet. How can I generate a signed raw transaction from bitcoin core wallet that controls some bitcoins? PS: I generated the wallet using getnewaddress in console from the ...
bbnn's user avatar
  • 227
0 votes
0 answers
127 views

Sign a Partially Signed rawtransaction with bitcoinjs-lib

I was trying to figure out how to use the bitcoinjs-lib. I was thinking if I could sign a partially signed raw transaction in bitcoijs-lib. For example - If I have a hex String whose input1 is ...
Shubham Saxena's user avatar
1 vote
1 answer
137 views

Create a transaction from a wallet coins (UTXOs) with the bcoin library

I have a multisig setup where the signing is done through external HSM's. I am using Bcoin and its wallet to receive funds. What I am trying to do is to create a transaction and sign it with the HSMs. ...
madu's user avatar
  • 149
1 vote
1 answer
498 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 ...
Rozwrcd's user avatar
  • 49
2 votes
1 answer
179 views

How to combine separately signed inputs from different users?

With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)? Is this a viable solution for ...
user95756's user avatar
3 votes
0 answers
1k views

How to sign bitcoin raw transactions with Python offline

I have a raw bitcoin transaction created using createrawtransaction unsigned_tx = "...
Bongani Sibanda's user avatar
1 vote
2 answers
557 views

Could not sign Transaction with SignRawTransactionWithKey through the RPC (RegTest)

I am able to sign following transaction with Complete=true result, but when trying to decode signed transaction, it returns error "TX decode failed" both from DecodeRawTransaction and ...
Ali Harsini's user avatar
2 votes
1 answer
325 views

signrawtransaction is not a function on bitcoin core V0.17.1

I'm using npm bitcoin-core ^2.0.0 to get access to my bitcoind (v0.17.1 MAC) My code: let signedRawTx = await btcClient.signRawTransaction(rawTx, [], [privateKey], 'ALL'); I get an error message ...
jfjobidon's user avatar
  • 285
1 vote
1 answer
99 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,...
Izi Tors's user avatar
3 votes
1 answer
2k views

Signrawtransaction is not working on bitcoin core V0.17.1

I am having trouble signing a transaction on bitcoin core since it appears signrawtransaction no longer works. I get the following error message : signrawtransaction is deprecated and will be fully ...
jean's user avatar
  • 31
0 votes
1 answer
847 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 ...
Patoshi パトシ's user avatar
2 votes
1 answer
2k 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<...
Jon Chiang's user avatar
6 votes
1 answer
1k views

What exactly is hashed and signed in a segwit transaction

I have an unsigned raw segwit transaction on my regtest network: ...
JBaczuk's user avatar
  • 7,318
0 votes
1 answer
313 views

Sign Bitcoin transaction with several inputs using bitcoinj. Broadcasting of transaction failed

Good day! I'm working with low level API to make tx and sign it offline. But after all preparations I try to broadcast it and than i get an error from network: 16: mandatory-script-verify-flag-...
Timur Panzhiev's user avatar
1 vote
2 answers
130 views

Why are my Signature Scripts Different from my professors?

bob_addr = "1NWzVg38ggPoVGAG2VWt6ktdWMaV6S1pJk"#"1FMb8Jnn1jSh7yjDFfonC8xCCH3ittoEzB" bob_hashed_pubkey = base58check.b58decode(bob_addr)[1:] bob2_hashed_pubkey = b'\xec\x06\xb2\xbf\x18\xc8\x97\x06\...
A. McWilliams's user avatar
2 votes
0 answers
318 views

Multisig signrawtransaction fails

I have 3 private keys (a,b,c) which belong to an address (2 of 3) from which I want to spend funds using RPC commands. I´ve started with generating the redeemScript using createmultisig() and the pub ...
Michael's user avatar
  • 135
0 votes
1 answer
196 views

Error in creating bitcoin raw transaction

I am creating a raw transaction to send amount from from_address to to_address. While sending a transaction I got an error. I posted the detailed process of creating a raw transaction. Could anyone ...
merklexy's user avatar
  • 107
1 vote
1 answer
247 views

BitcoinLib SignRawTransaction JSON-RPC returns false when using private key

This is a repost of (JSON-RPC signrawtransaction returns false when using private keys) but I could not comment because of my reputation (new user). I've been using BitcoinLib via Litecoin Testnet ...
doohder's user avatar
  • 21
1 vote
1 answer
458 views

When and where to add extra information when signing P2SH raw transaction?

This post is quite long so in summary: I'm wondering where I can add extra information when signing a raw transaction (in this case a cleartext of a digest). I'm also wondering if Missing inputs (code ...
Jesper's user avatar
  • 111
0 votes
1 answer
865 views

How to sign a transaction using multi signature using bitcoind?

I created a multisignature address using bitcoin-cli createmultisig 2 '["...
merklexy's user avatar
  • 107
1 vote
0 answers
97 views

Using blockcypher BitcoinJs at clientside is secure or not?

I am trying to create new transaction using bitcoinjs at client side. Is it a secure way to create a transaction from Client side, which includes curl call. Scenario, if I start from creating the new ...
Kunal Birhade's user avatar