Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [rust-bitcoin]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers

Got non-mandatory-script-verify-flag (Invalid Schnorr signature) error message when spend a taproot transation

I'm trying to spend an Taproot address via a key spend path with musig2 lib in Rust. This address is aggregated with 2 owners. But I still got this message when I broadcast the hex transaction to ...
Trí Lương's user avatar
-1 votes
2 answers

Bitcoin wallet in Rust

Could not find any resources on how to build a simple bitcoin wallet in Rust? Please share some relevant resources or repositories.
lladane's user avatar
  • 13
1 vote
1 answer

How can I add more OP_RETURN outputs to a PSBT transaction?

I want to fund a PSBT transaction that I created with Bitcoin rust. It looks like there is no such function to do that as the Creator is the only one that can set the inputs and outputs. There is an ...
David 天宇 Wong's user avatar
3 votes
2 answers

Undefined opcodes in bitcoin core defined as "Synonyms for OP_RETURN" in rust-bitcoin

In rust-bitcoin, opcodes past the 0xba opcode are named as such: OP_RETURN_187, OP_RETURN_188, ..., OP_RETURN_254. Their description is all the same: Synonym for OP_RETURN. The definition for ...
thunderbiscuit's user avatar
3 votes
2 answers

Code for computing SigHash for various input types

I am looking for code examples (in rust-bitcoin, but even in Python) of how to calculate sighash for various input types. Specifically, I need to calculate the sighashes for M of N multisig unlocking ...
Alec Matusis's user avatar
3 votes
1 answer

Why is the Bitcoin Core HWI written in Python? If it was rewritten in Rust should the Python HWI still be maintained?

Why is/was the Bitcoin Core HWI written in Python? What have the challenges been of having the HWI written in Python? There seems to be interest and rationale(s) to write another HWI in Rust. Would ...
Michael Folkson's user avatar
2 votes
1 answer

Having issues properly generating a p2pkh address in Rust code. (for research purposes not for real use)

I have followed the steps to generate a p2pkh compressed base58 address and am consistently checking it to find that I get an invalid checksum. I am using this python code to check the address: (...
Poseidon's user avatar
  • 643
4 votes
2 answers

Signing taproot key-path transaction from rust-bitcoin

I'm trying to make a taproot HTLC using rust-bitcoin for an atomic swap protocol. My plan is that in the "happy case" of my protocol, the coins are spent with the key-path, and then there is ...
rijndael's user avatar
2 votes
1 answer

What is OP_RETURN_252?

The first scriptsig opcode in this coinbase transaction is OP_RETURN_252, followed a bit later by a OP_RETURN_188. These don't show in this list of opcodes. Digging the internet, I found this rust lib ...
RooSoft's user avatar
  • 157
1 vote
1 answer

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<...
THLO's user avatar
  • 11
3 votes
1 answer

How do you commit to the previous output's amount when signing a segwit input with rust-bitcoin?

I'm trying to sign a segwit transaction in rust-bitcoin. To start with, my transaction setup looks as follows: let previous_output = OutPoint::new(Txid::from_hex("...
arik's user avatar
  • 218