02:26:26 // create offline wallet... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/5b333339c9d7461b4be44d120e09a81d61e9a433) 02:28:06 I run this snippet of code twice, each time prints out a different primaryAddress. This doc -https://moneroecosystem.org/monero-javascript/global.html#createWalletKeys- says `primary address of the wallet to create (only provide if restoring from keys)`. Why can't I restore a wallet from just the private spend key? 02:31:14 I believe the address is comprised of both the "spend" and "view" keys. Further, IIRC, I believe you need both of those keys to actually spend the funds. 02:32:01 will.yijinin: I'll see if i can validate what I said 02:35:57 will.yijinin: The address of a user is the pair of public keys [spend and view]. Her private keys will be the correspond- 02:35:57 ing pair [of private keys]. <- from an old copy of "zero to monero" 02:39:30 > <@jetsteel:matrix.org> will.yijinin: The address of a user is the pair of public keys [spend and view]. Her private keys will be the correspond- 02:39:30 > ing pair [of private keys]. <- from an old copy of "zero to monero" 02:39:30 Thank you. I started to understand it. What I am wondering is why I cannot infer the public keys from the set of private keys? Why in this case is the public keys needed to restore the wallet? 02:48:54 will.yijinin: I've been gone for a few years (so my knowledge may be dated). But I rewrote code for generating monero addresses back then. Give me a few to find and review my notes and I'll be able to answer. 03:02:11 will.yijinin: So, if I am reading my old notes correctly, the main address is just the base58 encoding of the prefix, public spend key, public view key, and checksum. 03:02:55 will.yijinin: the public spend and view keys are just the private keys × G 03:07:40 will.yijinin: and the private view key is a hash of the private spend key. So, you should be able to generate the main address from the private spend key alone. (And subaddresses as well). 03:08:39 That's what I thought, just the private spend key to restore the wallet. But from experiment and from doc, it seems the primary address is required. 03:08:47 jetsteel: 03:16:57 will.yijinin: Help me understand better. You say a primary address is required. But a primary address can be created from the private spend key. So, logically, it is possible to do what you need with just a spend key. 03:20:28 jetsteel:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/335f4b9d2cea10ad13f0fdf2c8f7dace96a379f9) 03:20:50 This snippet of code generates a different primary address each run/ 03:21:48 will.yijinin: I think I may be answering the wrong question. Can you restate your question? Are you asking if it is possible, or asking what existing code does this already? Or asking how to get thr software to do this? 03:23:23 will.yijinin: I just sae your last post. Let me take another look. 03:40:21 will.yijinin: well, that is curious to me. I believe you are right that you can derive everything from the private sprnd key. At least, that was my experience a couple years back. I do not have experience with this js code base. So, I am not sure what you are seeing or why. We'll both have to wait for someone more knowledgeable. 03:47:23 will.yijinin: could you provide example input and output? (Obviously do **not** use real private keys...just a dummy one) Perhaps, that might offer a clue. .... 03:47:23 Like, use a dummy private key "11111...." or something. When you run it twice, what do you get back each time? 03:47:23 Are you able to step through the code with a debugger and see where the code starts to diverge from your expectations? 04:03:57 First I create a wallet:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/1f411f5af161878485fcbed2eb6f8ace6724c825) 04:04:05 jetsteel: 04:41:09 will.yijinin: I'll look some more later, but likely someone else will need to answer 05:14:12 To sign a transaction offiline, I follow the code from the doc: `https://github.com/monero-ecosystem/monero-javascript/blob/master/docs/developer_guide/view_only_offline.md`.... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/01776c35185801c13c9d0a0d275a107de38be5f3) 05:14:26 * To sign a transaction offiline, I follow the code from the doc: `https://github.com/monero-ecosystem/monero-javascript/blob/master/docs/developer_guide/view_only_offline.md`.... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/9684cfed5c531865872979036220e3590a48919f) 05:15:54 matrix folks when you edit messages it looks like a hot mess on the IRC side 05:59:03 > Will there be a (beta) release of that project soon? 05:59:03 dEBRUYNE: not realistically. it needs a full design and then to be built 06:01:11 will.yijinin: when creating the wallet, it needs to be passed `privateSpendKey: `:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/37e7b290090ff9ca09612d41e585935856f01b07) 06:01:29 looks like you're only passing it `privateSpendKey,` 06:17:43 I’m looking for help to design the web wallet tool if anyone knows interested designers 06:42:43 woodser:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/5d49092fe3ab553324e5507bf65b995a842319d4) 12:07:50 "looks like you're only passing..." <- For clarity, what should his code snippet look like in the example will.yijinin last gave? 12:08:41 woodser: ^ 12:14:31 * woodser[m] sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/e67e6b30f9d371fda1f9333557c64f44d3da481f 13:46:56 woodser: The snippet you gave uses the mnemonic. mathematically, a private spend key has all the information needed to recreate the wallet, correct? Can monerojs do that? 14:00:49 currently the wallet needs to be recreated with either the mnemonic or the private spend key, private view key, and primary address 14:33:35 woodser: Thanks. That is unexpected, though, considering the private view key and primary address can be derived from the private spend key. Do you know if there is a specific rationale for that? Or is it more "it was coded that way" and nobody has changed it? 14:35:27 there are non-deterministic keys too, where the private view key is unrelated to the spend key 14:51:04 hyc: I can see how that would necessitate optionally specifying the private view key. But I don't (yet) see the rationale for requiring the primary address when both keys have been provided. Also, IMO, such a function should operate using just the private spend key by implicitly or explicity deterministically generating the rest of the info. Would you agree? Or am I off? 14:58:16 Sanity checks maybe ? 14:59:12 I'd be fine with an empty (or zeroed) input being interpreted as "fill this in if you can, error out if you can't". 15:03:12 yeah I always wondered why we needed to provide the address 15:30:04 I was able to restore a wallet in monerojs from only the private spend key by removing sanity checks: 15:30:04 https://github.com/monero-ecosystem/monero-cpp/commit/fbfdd56545936474fc941339e358e05f0399afb1 15:30:04 https://github.com/monero-ecosystem/monero-javascript/commit/3ffdd46f0db8fd73dcc50fd589c189526649a79d 15:30:19 I can incorporate the changes in the next release if it makes sense and isn't unsafe, given the non-determinstic keys 16:10:38 woodser: Thanks. I would have had the same question will.yijinin had. Is your "sense and safety" concern regarding someone (who had a non-determinsitic view key) calling it and (by accident/bug/typo) generating a wallet with a deterministic view key? 17:37:58 Gentle reminder that we have loose consensus on the next hard-fork in early 2022:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/facd3ee4b7d4452390e264e861952ce939cf26fb) 17:38:10 Branch/feature complete is barely 30d away. 18:42:56 jetsteel when both private keys are provided, you can reconstruct the primary address because it's just a combination of the two corresponding public keys. The catch is you don't know whether it's mainnet/testnet/stagenet if you only have two public keys. 18:43:23 but usually it's just mainnet that matters anyway 19:10:04 sethsimmons> Branch/feature complete is barely 30d away. <= fork it 19:13:09 30d away, wait till we're all back from our new years hangovers before forking it 19:56:47 the question will be how much time hardware wallets will need to update to bp+ 20:04:35 probably about 3 months longer than we have 20:05:51 someone claimed supporting bp+ will be easier than clsag 20:06:58 actually yeah maybe 20:49:08 Is the latest PR the multisig vuln fix? 20:49:28 https://github.com/monero-project/monero/pull/8114 20:58:23 yep 21:01:12 jetsteel: yeah, my concern would be someone calling this function with a private spend key and deriving any unexpected keys. I'd be fine to support it if the risk is low