Bitcoin Forum
June 20, 2024, 06:57:56 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: TX signature verification (derive z value with TX having mutiple inputs) on: December 04, 2021, 12:49:43 AM
I made a little debugging with bitcoin-java library, with the help of blockstream api, to obtain the full hex of the transaction, and obtained the following:

m=01000000022cce4dc9e7a2de90bacf13073c1b256c714c73f5f42f8d28d291ae40c58b0f21000000001976a914e3e67d92d6334b0274beb908067eddd09d37900d88acffffffff1e4f4d473a0488f3afccecf7e4facb09f1ef67975c6901af001663c79823437c0000000000ffffffff01d0390000000000001976a914232fc87e0fb5171b82bace360eed8e35ae59f05688ac0000000001000000

z=b7855748a719df6a358a6d4d83b47d6848403830481273eb81a1cde1a32343f8

So, if my m is correct, the mistake is in the 2nd input scriptSig field and the value.
2  Bitcoin / Development & Technical Discussion / Re: Is it possible to obtain the public key from any address? on: December 03, 2021, 11:58:55 PM
In the new P2TR (pay-to-taproot) single key address type, the bech32 decoded address is also a public key.
3  Bitcoin / Project Development / bitcoin-java, a new bitcoin library on: November 25, 2021, 12:06:29 AM
Hello,

I'm posting to divulge a new open-source Bitcoin library written in Java, including support for taproot single key transactions: https://github.com/bitcoin-education/bitcoin-java.

My main motivation to build this library was for educational purposes. Also, I was missing a lean bitcoin library written in Java, since I think bitcoinj too feature-heavy. I don't intend to include features that allow communication with nodes nor any online features in it. I think it will be another option for developers that want to build a wallet in Java or other JVM languages.

Current features of the library:
- Generate BIP39 mnemonic seeds
- Derive extended keys
- Generate Base58, Bech32 and Bech32m addresses
- Create and sign Segwit, and non Segwit transactions (multi and single sig)
- Create and sign taproot single-sig transactions
- and more...

Feedback, PRs, and issues are welcome and appreciated.

Website of the project, where I plan to post more examples using it:
https://www.bitcoineducation.site/
4  Bitcoin / Development & Technical Discussion / Re: How to get a masterKey faster. Need Java developer advice on: November 24, 2021, 03:41:12 AM
I've been working on this bitcoin java library recently: https://github.com/bitcoin-education/bitcoin-java

Instructions to install it on README.

Generating a master key should be fast and easy. With bitcoin-java library:

Code:
String mnemonicSeedString = MnemonicSeedGenerator.generateRandom(256).getSentence(); // 24 words mnemonic seed as String
MnemonicSeed mnemonicSeed = new MnemonicSeed(mnemonicSeedString); // as an object
ExtendedPrivateKey masterKey = mnemonicSeed.toMasterKey(password, ExtendedKeyPrefixes.MAINNET_PREFIX.getPrivatePrefix()); // masterkey
masterPrivateKey.ckd("0'/1/2'/2/1000000000", true, ExtendedKeyPrefixes.MAINNET_PREFIX.getPrivatePrefix()) //first parameter is the derivation path, choose at will. second parameter is true to derive a private extended key, false for public
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!