1 2016-09-09 01:19:13 <Diablo-D3> https://securelist.com/blog/research/75990/the-missing-piece-sophisticated-os-x-backdoor-discovered/
2 2016-09-09 01:26:11 <Qatz> Wonder if that also affects ppc systems
3 2016-09-09 03:03:53 <binaryc> Any recoemndations on libraries. Looking to build proof of concept Wallet / block explorer. R/postgres/C dev by trade. don't want any js/node. Any pointers appreciated/ Curretly playing with libbitcoin
4 2016-09-09 03:09:10 <luke-jr> why not contribute to an existing one?
5 2016-09-09 03:09:17 <luke-jr> Bitcoin Core is currently looking for a wallet maintainer
6 2016-09-09 03:10:24 <binaryc> eh, not quite there - should have titled myself datascientist/hack not dev :)
7 2016-09-09 03:12:34 <luke-jr> well, https://github.com/breadwallet/breadwallet-core exists, no idea if it's recommendable or not â˺
8 2016-09-09 03:23:38 <Diablo-D3> >breadwallet
9 2016-09-09 03:24:08 <Diablo-D3> fuck that
10 2016-09-09 03:24:09 <Diablo-D3> http://www.alleewillis.com/blog/wp-content/uploads/2009/10/bacon-wallet_0973.jpg
11 2016-09-09 03:24:51 <Diablo-D3> this is my jam
12 2016-09-09 03:43:41 <midnightmagic> breadwallet in the last source I read phones home to blockchain.info
13 2016-09-09 03:53:59 <Diablo-D3> the bacon wallet phones home to deliciousness
14 2016-09-09 07:41:50 <jonasschnelli> binaryc: also have a look at libbtc https://github.com/libbtc/libbtc
15 2016-09-09 07:42:03 <jonasschnelli> It has now basic p2p network support... an SPV client soon (working on it)
16 2016-09-09 16:09:56 <RainMan28> Hello. I am trying to have a script that would take an mpk and be able to generate new, unused addresses. Is there any open source solution for that? Thank you.
17 2016-09-09 16:33:10 <Chris_Stewart_5> RainMan28: What is an mpk?
18 2016-09-09 16:33:26 <RainMan28> Chris_Stewart_5: sorry, a master public key for an HD wallet
19 2016-09-09 16:33:51 <Chris_Stewart_5> RainMan28: See bitcore.io/playground, I think they have a tool on there for HD keys.
20 2016-09-09 16:38:26 <RainMan28> Chris_Stewart_5: thanks took a look at it but not sure how i can use it, does it require me to have bitcore installed on a server? thank you
21 2016-09-09 16:39:11 <Chris_Stewart_5> https://bitcore.io/playground/#/hdkeys
22 2016-09-09 16:39:29 <RainMan28> I go to HD Keys and enter in my master public key in the Root HD Public Key field, switch the tab to Livenet, but not sure what to do next
23 2016-09-09 16:39:38 <Chris_Stewart_5> I think if you place your key inside of the 'Root HD Public Key' field
24 2016-09-09 16:39:52 <Chris_Stewart_5> and then press the 'dice' button or whatever it is lol
25 2016-09-09 16:40:24 <Chris_Stewart_5> Is there an address generated at the bottom in the 'Address' field?
26 2016-09-09 16:40:49 <RainMan28> pressing the dice button replaces my HD Public Key with some random one and also creates a new HD Private Key.
27 2016-09-09 16:40:54 <Chris_Stewart_5> Hmm...
28 2016-09-09 16:41:10 <RainMan28> I don't see an address field, I just see a Derived Keys box below the Master Keys box
29 2016-09-09 16:41:20 <sipa> just change the path
30 2016-09-09 16:41:26 <sipa> and the keys are recomputed
31 2016-09-09 16:41:59 <sipa> the address field is at the bottom
32 2016-09-09 16:42:53 <Chris_Stewart_5> I tried pasting a master publilc key in and it doesn't genereate anything underneath it, even if i change the path
33 2016-09-09 16:43:07 <sipa> does the path contain ' symbols?
34 2016-09-09 16:43:10 <Chris_Stewart_5> unless I'm misusing it some how, try it with this key tpubD6NzVbkrYhZ4Y1XAAFyqaQ9HxBKUL7BNLyZbKq1Qo8uqqLoLUgGcb3zSdtMCwqCcSRUNvsjeT9SWuGQWrDuok8qgCYM4TNmG3AiF58HpiZ9
35 2016-09-09 16:43:44 <sipa> works fine here
36 2016-09-09 16:43:50 <sipa> just don't use a hardened path
37 2016-09-09 16:44:01 <Chris_Stewart_5> hardened is without the ' right?
38 2016-09-09 16:44:03 <RainMan28> I must not be seeing the address field. All I see is Root HD, Root HD Public Key, and then a section with Derived Keys and Path, and then on the right side a "console" column
39 2016-09-09 16:44:53 <sipa> Chris_Stewart_5: hardened is with the '
40 2016-09-09 16:45:06 <sipa> Chris_Stewart_5: and hardened derivation only works if you have the parent private key
41 2016-09-09 16:45:09 <RainMan28> I'm on the HD Keys page, not on the Address page, is that where I need to be?
42 2016-09-09 16:46:20 <RainMan28> I see the address field show up if I let it auto-generate its own root HD public key and root HD private key
43 2016-09-09 16:46:53 <Chris_Stewart_5> RainMan28: There is something funky with the UI though, I'm pasting in the master public key I had above, making sure the path is NOT hardened, then do I just press enter? Nothing is popping up for me.. maybe this is a browser issue
44 2016-09-09 16:47:05 <sipa> no, you don't need enter
45 2016-09-09 16:47:14 <sipa> remove the maste private key
46 2016-09-09 16:47:20 <sipa> and paste a master public key
47 2016-09-09 16:47:38 <sipa> and then type "m/0" in path or so
48 2016-09-09 16:48:05 <RainMan28> ah that generated an address
49 2016-09-09 16:48:23 <Chris_Stewart_5> ahhh, the idiot I am only removed the tick on the leaf node :-)
50 2016-09-09 16:48:34 <Chris_Stewart_5> I thought this should work haha m/44'/0'/0'/0/1337
51 2016-09-09 16:48:48 <Chris_Stewart_5> Thank you sipa, as always
52 2016-09-09 16:48:58 <sipa> it will, if you paste the xpub for m/44'/0'/0' :)
53 2016-09-09 16:49:05 <sipa> and then use m/0/1337 as path
54 2016-09-09 16:49:30 <RainMan28> sipa how can i make sure that it gives me the next available address, if i'm using a trezor wallet as the source of my mpk?
55 2016-09-09 16:49:45 <sipa> you can't
56 2016-09-09 16:49:57 <sipa> you need to keep track of which addresses you've given out already
57 2016-09-09 16:50:21 <Chris_Stewart_5> I think there would be some serious privacy concerns if that was possible
58 2016-09-09 16:51:39 <RainMan28> in my electrum wallet using the same mpk, i see 20 unused new addresses. Does the bitcore tool just get one randomly?
59 2016-09-09 16:52:03 <sipa> no, it gives you the one you're asking for
60 2016-09-09 16:52:22 <RainMan28> I know the blockchain.info API has a way of checking if an address is used and generate a new one that isn't unused, same with a tool by blockonomics.co, was wondering if there was a way to do something similar without using one of those services
61 2016-09-09 16:52:31 <sipa> no
62 2016-09-09 16:52:47 <sipa> and even they can't know whether the addresses have been given out already
63 2016-09-09 16:52:54 <sipa> only whether there have been payments to them
64 2016-09-09 16:53:26 <RainMan28> oh yeah
65 2016-09-09 16:53:36 <RainMan28> thats what I care about, only if payments have been received on them
66 2016-09-09 16:53:38 <RainMan28> not if they have been given out
67 2016-09-09 16:53:42 <sipa> how so?
68 2016-09-09 16:53:57 <sipa> that would result in giving you out the same ones again
69 2016-09-09 16:54:37 <RainMan28> I am trying to have a script that would get a new address, and immediately a payment would be sent to it, from myself, and next time I would just need a new unused address
70 2016-09-09 17:02:03 <RainMan28> sipa: in my use case i would just need an address that has not received a payment, would using the bitcore tool with a brand new wallet and just starting with address #1 be the best method?
71 2016-09-09 17:02:35 <sipa> first of all, you should not use a website for this
72 2016-09-09 17:02:58 <sipa> there are dozens of bip32 implementations
73 2016-09-09 17:03:05 <sipa> (the bip itself has a dozen links or so)
74 2016-09-09 17:12:19 <RainMan28> sipa: thank you. If I look at one of the unused addresses generated in electrum, I see m/44'/0'/0'/0/72 as the derivation for that address. If I use the same mpk on the bitcore tool and put in the path m/44/0/0/0/72 I see a different address. Is there a way to pull up the same address if I see its derivation in electrum?
75 2016-09-09 17:13:01 <sipa> yes
76 2016-09-09 17:13:16 <sipa> first compute the xpub for m/44'/0'/0'
77 2016-09-09 17:13:34 <sipa> then enter that as master public key, and compute m/0/72
78 2016-09-09 17:18:43 <RainMan28> sipa: I see thank you again. Do you know if https://github.com/jmcorgan/bip32utils would allow me to use a master public key from my trezor to generate new receive addresses?
79 2016-09-09 17:19:38 <sipa> i would be very surprised if it couldn't
80 2016-09-09 17:20:12 <RainMan28> thanks, I have read a few times that a trezor uses a different chain implementation but I don't fully understand that so I may just be misinformed
81 2016-09-09 17:20:28 <sipa> bip32 is generic
82 2016-09-09 17:21:04 <sipa> the different standards are about which derivation path to use
83 2016-09-09 17:24:51 <RainMan28> sipa: in bip32, under recurrent business-to-business transactions N(m/iH/0), I see this:
84 2016-09-09 17:24:54 <RainMan28> In case two business partners often transfer money, one can use the extended public key for the external chain of a specific account (M/i h/0) as a sort of "super address", allowing frequent transactions that cannot (easily) be associated, but without needing to request a new address for each payment.
85 2016-09-09 17:25:31 <RainMan28> in that implementation is there just one xpub that you send all payments to?
86 2016-09-09 17:26:43 <sipa> yes, the sender just derives consecutive keys from one xpub
87 2016-09-09 17:26:44 <waxwing> does anyone have any clues why bitcoind would fail to install here: https://travis-ci.org/JoinMarket-Org/joinmarket#L316 (on line 756 "which bitcoind" fails) ?
88 2016-09-09 17:27:24 <waxwing> it always worked up until say last month, and also i tried installing the same way on 1204 and 1404 and it seems to work fine. i can't figure out why travis would be different.
89 2016-09-09 17:27:40 <sipa> 'which bitcoind' will fail if it can't be found in the PATH
90 2016-09-09 17:28:22 <waxwing> sipa: well .. yes, that was kind of the point :)
91 2016-09-09 17:28:39 <sipa> so either your path is wrong, or bitcoind isn't installed where you think it is
92 2016-09-09 17:29:09 <waxwing> this is quite clear. however that's why i gave the circumstances/details above.
93 2016-09-09 17:30:06 <sipa> as far as i can see nothing in travis is installing bitcoind
94 2016-09-09 17:30:31 <waxwing> line 316-321?
95 2016-09-09 17:30:57 <sipa> oh, overlooked!
96 2016-09-09 17:31:18 <sipa> which version of ubuntu is that?
97 2016-09-09 17:31:29 <sipa> 12.04
98 2016-09-09 17:31:34 <sipa> that's no longer supported by the ppa
99 2016-09-09 17:31:57 <waxwing> right, that would make sense, except: i just tried on a 1204LTS box locally with the same commands, and it worked
100 2016-09-09 17:32:40 <waxwing> i can't quite figure out how i can ask travis to use 1404, i found this: https://docs.travis-ci.com/user/ci-environment/
101 2016-09-09 17:32:44 <sipa> i believe that on 12.04, the bitcoind 0.13 ppa package is literally just empty
102 2016-09-09 17:32:57 <sipa> so maybe you just had an older version installed on that box?
103 2016-09-09 17:32:57 <waxwing> ah dist: trusty
104 2016-09-09 17:33:11 <waxwing> sipa: well i did a which beforehand, but maybe i somehow confused myself
105 2016-09-09 17:34:20 <waxwing> i guess i could have had another repository or something? anyway, the mystery is solved if, as you say, 1204 is not supported, that fits all the facts.
106 2016-09-09 17:34:55 <waxwing> s/not/no longer/
107 2016-09-09 17:42:28 <waxwing> sipa: yep that fixed it, thanks for the prod :)
108 2016-09-09 19:17:02 <RainMan28> sipa, sorry to bug you again, but do you know if there is a way to use the bip32util to have it start with the same unused address I am seeing in my trezor/electrum wallet?
109 2016-09-09 19:17:54 <RainMan28> I've gotten bip32utils to generate an address from my xpub but electrum and my copay wallets don't ever see payments to the generated address because it is too far ahead (I am guessing)
110 2016-09-09 19:22:22 <RainMan28> sipa: would this mean that what I'm trying to do is not possible, found this in the bip32gen doc: bip32gen can generate address with given derivation from entropy, but can't generate from given xprivate key, it says: "When generating from xprv or xpub, keyspec must start with 0..9"
111 2016-09-09 19:27:04 <jonasschnelli> RainMan28: what are you trying to do?
112 2016-09-09 19:27:38 <jonasschnelli> Do you want to generate a particular key/pubkey/address at a given path with an xpriv?
113 2016-09-09 19:28:16 <RainMan28> jonasschnelli: have a wallet that was generated on my trezor, which I use with electrum. Trying to have the ability to use the master public key for that wallet and have a script which starts with the first unused address in that wallet and generates a new unused address each time its run
114 2016-09-09 19:28:57 <jonasschnelli> RainMan28: and you have your xpub exported from Trezor?
115 2016-09-09 19:29:02 <RainMan28> yes
116 2016-09-09 19:29:22 <jonasschnelli> And you know your last address from where it should start to "count upwards"?
117 2016-09-09 19:29:25 <RainMan28> yes
118 2016-09-09 19:29:37 <jonasschnelli> But you don't know the child key index or keypath of that last key?
119 2016-09-09 19:30:21 <RainMan28> I think I do...electrum shows the derivation of my first unused address as: m/44'/0'/0'/0/14
120 2016-09-09 19:30:34 <jonasschnelli> Okay.. this is easy.
121 2016-09-09 19:31:35 <jonasschnelli> RainMan28: I would use the bitcointool from https://github.com/libbtc/libbtc
122 2016-09-09 19:31:52 <jonasschnelli> something like this: ./bitcointool -c hdderive -p xpub6AHA9hZDN11k2ijHMeS5QqHx2KP9aMBRhTDqANMnwVtdyw2TDYRmF8PjpvwUFcL1Et8Hj59S3gTSMcUQ5gAqTz3Wd8EsMTmF3DChhqPQBnU -m m/0
123 2016-09-09 19:32:11 <jonasschnelli> you probably would need -m m/44h/0h/0h/0/15
124 2016-09-09 19:32:24 <jonasschnelli> h in the keypath is identical to ' (but better for the shell)
125 2016-09-09 19:33:22 <RainMan28> wow jonasschnelli
126 2016-09-09 19:33:30 <RainMan28> thank you so much, i can run this on ubuntu?
127 2016-09-09 19:33:46 <jonasschnelli> RainMan28: yeah. Just need to compile it.
128 2016-09-09 19:33:51 <jonasschnelli> git clone https://github.com/libbtc/libbtc
129 2016-09-09 19:33:54 <jonasschnelli> ./autogen.sh
130 2016-09-09 19:33:57 <jonasschnelli> ./configure
131 2016-09-09 19:33:58 <jonasschnelli> make
132 2016-09-09 19:34:13 <jonasschnelli> (make sure you have some build essentials)
133 2016-09-09 19:34:29 <jonasschnelli> sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config git
134 2016-09-09 19:34:56 <jonasschnelli> one you have called "make"... there should be an executable in the folder called ./bitcointool
135 2016-09-09 19:35:06 <RainMan28> and if i put that in a script, i just increment the 15 at the end of the command each time?
136 2016-09-09 19:35:15 <jonasschnelli> right..
137 2016-09-09 19:35:35 <jonasschnelli> the bitcointool is a normal binary which you can use like any other shell command.
138 2016-09-09 19:35:50 <jonasschnelli> I don't know what happens if you call "make install". :-)
139 2016-09-09 19:36:54 <RainMan28> jonasschnelli: thank you, will try that!
140 2016-09-09 19:37:55 <jonasschnelli> RainMan28: tell me how if it works for you or what I could improve
141 2016-09-09 19:38:36 <jonasschnelli> btw. make install works... it will copy the bitcointool to somewhere link /usr/local/bin
142 2016-09-09 19:38:50 <RainMan28> will do!
143 2016-09-09 19:55:08 <RainMan28> hi jonasschnelli, just tried it
144 2016-09-09 19:55:28 <RainMan28> not sure I'm doing it correctly but I'm not able to get the same address as I'm seeing in my electrum wallet with the same derivation path
145 2016-09-09 19:55:32 <RainMan28> http://disarmer.tk/upload/data/1/V9MTJA.txt
146 2016-09-09 19:56:11 <jonasschnelli> RainMan28: are you sure about the 1h in m/44h/0h/1h/0/7
147 2016-09-09 19:57:00 <RainMan28> jonasschnelli: on electrum it is showing the derivation for the address as: m/44'/0'/1'/0/7
148 2016-09-09 19:57:24 <jonasschnelli> RainMan28: ah. Wait, you need the xpriv in order to do that (not allowed with trezor)
149 2016-09-09 19:57:30 <jonasschnelli> How did you exported the xpub?
150 2016-09-09 19:57:41 <RainMan28> in electrum it shows the master public key
151 2016-09-09 19:57:42 <jonasschnelli> You need the xpub of m/44'/0'/1'
152 2016-09-09 19:58:01 <jonasschnelli> Can electrum export the xpub at m/44'/0'/1'?
153 2016-09-09 19:58:28 <jonasschnelli> Because with the xpub, you cannot derive keyindex with the ' ... like m/44'
154 2016-09-09 19:58:28 <RainMan28> not sure...can i use the bitcore online HD key tool to calculate that if i know the master xpub?
155 2016-09-09 19:58:43 <jonasschnelli> No. Its not possible.
156 2016-09-09 19:58:51 <jonasschnelli> The master xpub cannot derive the hardened keys.
157 2016-09-09 19:58:58 <jonasschnelli> Only the xpriv can.
158 2016-09-09 19:59:22 <jonasschnelli> for m/44'/0'/1'/0/7, most wallets keep the xpub at m/44'/0'/1' in order to derive keys without requiring the xpriv
159 2016-09-09 19:59:43 <jonasschnelli> If you only have the xpub from m, you screwed. :)
160 2016-09-09 20:00:01 <jonasschnelli> Either you need the xpriv from m or the xpub from m/44'/0'/1'
161 2016-09-09 20:00:01 <RainMan28> ah
162 2016-09-09 20:00:25 <jonasschnelli> I'm pretty sure Trezor can export the xpub at m/44'/0'/1'
163 2016-09-09 20:00:42 <sipa> it should, otherwise no software can derive its keys
164 2016-09-09 20:00:56 <jonasschnelli> Yes. I think here: https://coinsimple.com/support/how-can-i-accept-bitcoin-to-my-trezor-wallet-with-coinsimple/
165 2016-09-09 20:01:26 <RainMan28> in electrum if I get the xpub of Account #1, it says Derivation: 1 and then gives me the master xpub key
166 2016-09-09 20:01:34 <RainMan28> if I go to the main account in electrum it shows it as Derivation: 0
167 2016-09-09 20:01:48 <RainMan28> I was using the Derivation: 1 master public key in my btctool test
168 2016-09-09 20:01:55 <jonasschnelli> Maybe your xpub is the one from m/44'/0'/1'
169 2016-09-09 20:02:10 <jonasschnelli> try to derive m/0/14 (for address 14) with the bitcointool
170 2016-09-09 20:02:40 <RainMan28> OK
171 2016-09-09 20:03:32 <RainMan28> jonasschnelli: that worked!
172 2016-09-09 20:03:41 <jonasschnelli> Perfect. Then go write your script. :)
173 2016-09-09 20:04:09 <jonasschnelli> And I recommend you to not post xpubs in public IRC channels.
174 2016-09-09 20:04:31 <jonasschnelli> If you loose your xpub together with a single private key (non x), you will reveal all your keys.
175 2016-09-09 20:04:41 <jonasschnelli> And it can harm your privacy.
176 2016-09-09 20:04:41 <RainMan28> yes that was just a test one
177 2016-09-09 20:04:48 <jonasschnelli> Okay. Good to know. :)
178 2016-09-09 20:04:50 <RainMan28> thank you so much jonasschnelli
179 2016-09-09 20:04:55 <RainMan28> and you too sipa :)
180 2016-09-09 20:05:00 <sipa> yw
181 2016-09-09 20:05:37 <RainMan28> jonasschnelli: any idea on how to have a quick way to check a generated address to see if it has 0 balance? Thinking could have the script increment again if there's a balance on it
182 2016-09-09 20:06:14 <jonasschnelli> That would require a blockexplorer API call... or a full address indexed bitcoin-core (not available out of the box).
183 2016-09-09 20:06:27 <RainMan28> ah ok nevermind then
184 2016-09-09 20:06:35 <jonasschnelli> If you are happy to trust a blockexplorer, just use curl to call the URL
185 2016-09-09 20:07:11 <RainMan28> oh ok
186 2016-09-09 20:07:13 <RainMan28> and jonasschnelli if I was using the main account in that wallet where it says Derivation: 0 instead of Derivation: 1, then would I do m/44/0/0/7 ?
187 2016-09-09 20:07:45 <jonasschnelli> RainMan28: account 0 = m/44'/0'/0' and account 1 = m/44'/0'/1'
188 2016-09-09 20:07:46 <jonasschnelli> but..
189 2016-09-09 20:07:55 <jonasschnelli> the xpub you did export was from m/44'/0'/1' ...
190 2016-09-09 20:08:14 <jonasschnelli> so you can just derive m/0/n
191 2016-09-09 20:08:29 <jonasschnelli> which internally results in (m/44'/0'/1')/0/n
192 2016-09-09 20:08:36 <jonasschnelli> for account 1 and
193 2016-09-09 20:08:47 <jonasschnelli> (m/44'/0'/0')/0/n for your account 0 (guess main account)
194 2016-09-09 20:09:08 <jonasschnelli> So no difference in your script,.. just a different xpub
195 2016-09-09 20:10:46 <RainMan28> so address #14 on account 0 would be: m/44h/0h/0h/0/14 ?
196 2016-09-09 20:11:56 <jonasschnelli> no, the xpub you can export is already from m/44h/0h/0h
197 2016-09-09 20:12:03 <jonasschnelli> so only use -m 0/14
198 2016-09-09 20:12:08 <RainMan28> ah ok
199 2016-09-09 20:12:13 <jonasschnelli> sorry, should be -m m/0/14
200 2016-09-09 20:12:45 <jonasschnelli> the m in m/0/14 can also be a key further down in the chain...
201 2016-09-09 20:13:37 <RainMan28> ah ok
202 2016-09-09 20:14:03 <RainMan28> and jonasschnelli your idea about curl'ing a block explorer, we could do something like: curl https://blockexplorer.com/address/1Jna627qunfnXQB9R55WJnen4vGFJnXBns and then test to see if any transactions are showing on that output?
203 2016-09-09 20:14:41 <jonasschnelli> Yes. But an actual API where you can get JSON output
204 2016-09-09 20:14:48 <RainMan28> ah
205 2016-09-09 20:14:55 <jonasschnelli> https://blockexplorer.com/api-ref
206 2016-09-09 20:15:31 <jonasschnelli> https://blockexplorer.com/api/addr/1Jna627qunfnXQB9R55WJnen4vGFJnXBns
207 2016-09-09 20:19:21 <RainMan28> very cool jonasschnelli
208 2016-09-09 20:19:48 <RainMan28> looks like i need to test with /totalReceived and /unconfirmedBalance to make sure an address hasn't been used
209 2016-09-09 20:23:15 <jonasschnelli> RainMan28: Yes. Something like curl -s https://blockexplorer.com/api/addr/1Jna627qunfnXQB9R55WJnen4vGFJnXBns | jq -r '.balance'
210 2016-09-09 20:25:53 <RainMan28> jonasschnelli: oh i was just doing curl https://blockexplorer.com/api/addr/1HekFqpr1xLZKXdk54fteh9wBDiseG5fv1/unconfirmedBalance
211 2016-09-09 20:29:22 <jonasschnelli> RainMan28: Hah. Yes. Much simpler