--- Log opened Thu Mar 24 00:00:35 2022 00:22 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 00:22 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:20 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:20 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:36 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:36 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:59 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:59 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 02:11 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 02:11 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 02:20 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 02:20 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 02:35 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 02:35 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 02:46 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 02:46 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 03:06 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 03:06 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 03:43 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 03:43 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 04:15 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 04:15 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 04:22 -!- enick_544 [~afilini-m@2001:bc8:1828:245::2] has quit [Quit: Bridge terminating on SIGTERM] 04:22 -!- enick_87 [~afilini-m@2001:bc8:1828:245::2] has joined #bitcoin-rust 04:48 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 04:48 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 05:01 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:01 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 05:12 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:12 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 05:26 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:26 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 05:38 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:38 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 05:59 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:59 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 06:15 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 06:15 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 06:31 -!- DeanWeen is now known as DeanGuss 06:31 -!- DeanGuss [~dean@nonplayercharacter.me] has quit [Changing host] 06:31 -!- DeanGuss [~dean@user/deanguss] has joined #bitcoin-rust 06:38 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 06:38 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 07:21 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 07:21 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 07:51 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 07:51 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 08:06 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 08:07 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 08:15 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 08:16 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 08:32 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 08:32 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 08:42 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 08:42 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 08:57 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 08:57 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 09:51 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 09:52 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 10:16 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 10:16 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 10:35 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 10:36 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 10:53 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 10:53 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 11:17 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 11:17 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 11:29 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 11:30 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 12:49 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 12:49 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 13:22 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 13:23 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 13:40 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 13:40 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 13:46 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 13:47 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 14:32 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 14:33 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 14:56 -!- ls55 [sid489830@helmsley.irccloud.com] has joined #bitcoin-rust 15:10 < jeremyrubin> btw sanket1729 are you familiar with loop {break v;} in rust? i learned about it recently and i think it could clean up some loop assert things we have https://doc.rust-lang.org/rust-by-example/flow_control/loop/return.html 15:14 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 15:14 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 15:14 < jeremyrubin> if we do another RC 907/908/909 should all be tiny changes to sneak in 15:18 < jeremyrubin> 909 in particular is nice because it lets us work with the TapTree::from_inner of our builder that uses huffman, and also get the info into a TaprootSpendInfo 15:32 -!- shesek_ is now known as shesek 16:15 -!- shesek [~shesek@user/shesek] has quit [Remote host closed the connection] 16:16 -!- shesek [~shesek@user/shesek] has joined #bitcoin-rust 16:45 < ls55> Is there a way to create a `pub struct ExtendedPubKey` from a `secp256k1::key::PublicKey` ? 16:48 < ls55> Maybe `let xpub = ExtendedPubKey::decode(&pubkey.serialize());` ? 17:06 < ls55> No, this throws an error: `Err value: WrongExtendedKeyLength(33)` 17:51 < shesek> it is not directly convertible, an ExtendedPubKey also has a 32 bytes chain code associated with it 17:52 < shesek> one would typically take a 512 bit hash and use the left half as the key and right half as the chain code 19:35 -!- shesek [~shesek@user/shesek] has quit [Remote host closed the connection] 19:36 -!- shesek [~shesek@user/shesek] has joined #bitcoin-rust 19:51 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 19:54 -!- shesek [~shesek@user/shesek] has quit [Ping timeout: 256 seconds] 20:12 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 20:12 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 20:29 < ls55> Thanks. Makes sense. 20:30 < ls55> ``` 20:30 < ls55> let key_pair = KeyPair::new(&secp, &mut secp256k1::rand::thread_rng()); 20:30 < ls55> let secret_key = SecretKey::from_keypair(&key_pair); 20:30 < ls55> let pub_key = PublicKey::from_keypair(&key_pair); 20:30 < ls55> let xpriv = ExtendedPrivKey::new_master(network, &p_r.secret_bytes()).unwrap(); 20:30 < ls55> ``` 20:30 < ls55> Given the code above. It is possible to create an xpriv only from a private key (`secret_key`). 20:30 < ls55> Would it be possible to create an `ExtendedPubKey` (using only` pub_key`, without access to `xpriv` or` secret_key`) that generates the same addresses as `xpriv`? 20:43 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 20:43 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 21:16 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 21:16 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 21:21 < ls55> Basically, it would be to generate addresses from a public master key instead of using the master private key. 21:28 < ls55> * master public key 21:37 < jeremyrubin> You can do hardened derivation only with access to xpriv 21:37 < jeremyrubin> You can do public derivation with only pub 21:44 < ls55> If I don't intend to do hardened derivation (e.g.: `xpub.../*`), is there a way to derive BIP 32 addresses from a `secp256k1::key::PublicKey` (using it as master public key) ? 21:54 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 21:54 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 22:11 < jeremyrubin> yes 22:11 < jeremyrubin> well idk about BIP-32 22:12 < jeremyrubin> but you can do a derivation of sorts if you just need that 22:12 < jeremyrubin> IDK if you can derive from just a Pk 22:26 < ls55> Thanks. Makes sense. Maybe `bitcoin::util::bip32 pub struct ExtendedPubKey` doesn't have the interface to use it as a master public key. At least, that's what it seems. 22:56 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 22:57 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 23:59 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 23:59 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust --- Log closed Fri Mar 25 00:00:37 2022