Skip to main content

Questions tagged [rust-bitcoin]

Filter by
Sorted by
Tagged with
2 votes
1 answer
41 views

Musig signature validation mismatch

I'm trying to understand the primitives of Taproot and Musig2 so I can implement them into my application. I'm using the rust-bitcoin library and have written a script to create a Taproot address from ...
Ethan Marcus's user avatar
2 votes
1 answer
88 views

Most efficient way to check if utxos are consumed in mempool txs using core rpc and rust

I try to concurrently monitor a bunch of signed but non published transactions. I want to detect asap if any of the inputs into these bond transactions have been used in another transaction in my ...
f321x's user avatar
  • 35
0 votes
0 answers
30 views

How to add prometheus support in my Bitcoin full node application in Rust

How can I implement prometheus client support in Rust in my bitcoin full node application, I was having trouble finding leads. A theoritical explanation on what I have to do, or some code snippets ...
lladane's user avatar
  • 13
0 votes
0 answers
91 views

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
100 views

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
154 views

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
614 views

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
355 views

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
978 views

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
404 views

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
  • 673
4 votes
2 answers
734 views

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
131 views

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
  • 177
1 vote
1 answer
369 views

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
172 views

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