Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get addresses for LocalCryptos chain addresses ? #36

Open
danyhm opened this issue May 14, 2020 · 12 comments
Open

how to get addresses for LocalCryptos chain addresses ? #36

danyhm opened this issue May 14, 2020 · 12 comments

Comments

@danyhm
Copy link

danyhm commented May 14, 2020

Hello,
in LocalCryptos (formerly LocalEthereum) the wallet backup is a json format which includes Coins with the following format
{"token":"BTC","export":{"wallet_version":"1.0","timestamp":1589471278},"first_address":{"address":"3A1mws7jvLBbXVH..........","wallet_address_n":0},"chain_private_key":"db99....."}

how can i get the chain addresses and chain private keys?

@dan-da
Copy link
Owner

dan-da commented May 14, 2020

I would think you would use the chain_private_key value, except the prefix "db99..." looks funny to me, so it may not be an extended private key. Anyway, you could try:

$ ./hd-wallet-derive.php --coin=eth --key=<chain_private_key> -g

If that generates addresses, then check if the first one matches the value of first_address. If it doesn't match, then you may need to try a different bip39 path. afaik, ethereum uses the path: m/44'/60'/0'/0.

If it doesn't generate addresses, or you get completely lost, you could possibly try creating an empty/dummy account on localcryptos, back it up, and post json here, for me to try. Just never, ever add any funds to the dummy account though.

@danyhm
Copy link
Author

danyhm commented May 14, 2020

@dan-da thanks for the reply
here is the content of the dummy JSON backup file

[{"token":"ETH","export":{"wallet_version":"1.0","timestamp":1589481143},"first_address":{"address":"0x938e58c131d35e0a491bee31c27b90424d999c02","wallet_address_n":0},"chain_private_key":"081083b120f7aba8523c7caa7c6d297d2742dc3d99f5345f3427c3b0b519f6a2"},{"token":"BTC","export":{"wallet_version":"1.0","timestamp":1589481143},"first_address":{"address":"3DVRjDxP8es5SzK72jiMXoXQ7KzxDtqocb","wallet_address_n":0},"chain_private_key":"1628e4588a8c5d570aac603c8f9104d21d2680bdf52f77a926bea91985d6123c"}]

@dan-da
Copy link
Owner

dan-da commented May 14, 2020

Well, I tried, but no luck yet. First of all, the chain_private_key is a raw seed value, which hd-wallet-derive doesn't support yet.

So instead I went to iancoleman's bip39 tool, chose ethereum, and pasted the chain_private_key value in the Bip39 Seed field. This generates keys and addresses according to bip44. Unfortunately, the first address did not match the first_address in the json, ie 0x938e58c131d35e0a491bee31c27b90424d999c02.

So then I switched to the bip32 tab, which allows entering custom paths, and tried altering the bip44 path a couple ways, but still no match.

So basically, I think you need to contact localcryptos support and ask them what bip32 path they use for their wallet. Once you have it, you should be able to plug it into iancoleman's tool as outlined above.

Anyway, I'm going to leave this issue open as a reminder to implement raw seed support.

@danyhm
Copy link
Author

danyhm commented May 14, 2020

thanks a lot, I already contacted them and will update this as soon as i get a reply

@dan-da
Copy link
Owner

dan-da commented May 14, 2020

ok, yeah seems a big oversight to me that the backup file does not include the bip32 path.

@danyhm
Copy link
Author

danyhm commented May 16, 2020

Just to update,
LocalCryptos staff said their format is non standard and I have to use their own tool available @
https://github.com/LocalCryptos/LocalCryptosWalletBackupExplorer/releases

@dan-da
Copy link
Owner

dan-da commented May 16, 2020

LocalCryptos staff said their format is non standard and I have to use their own tool

that's a big red flag. If it were me, I would run, not walk to get my assets out of there.

At least their code is on github, but even still, why not use a standard that enables users to restore to another wallet if they wish? That kind of lockin seems borderline malicious.

I took a quick look at their code in https://github.com/LocalCryptos/LocalCryptosWalletBackupExplorer/blob/master/src/components/StepThree/Explore/index.js

At first glance, I don't see see use of a bip32 path, so I'm really not sure what they are doing. It would require some study.

@localcryptosMichael
Copy link

Hello.

LocalCryptos doesn't have a HD/BIP32 wallet. We use a simple deterministic method of ratcheting keys instead. The algorithm we use isn't complex. You can read about it here if you like.

If you would like to export the private keys for your address to import to another wallet, you have two options:

(a) If you only need the private key for one address, use the LocalCryptos webapp. You can go to your wallet and click "Export private key" next to the address.

(b) You can put your wallet backup into this tool (follow the steps under "How do I use this?") and then export a list of all your addresses and keys.

Note that for Bitcoin wallets, you will need to use a SegWit-compatible Bitcoin wallet. Addresses in LocalCryptos use P2SH-wrapped P2WPKH addresses (in Electrum you can add the prefix p2wpkh-p2sh: to the WIF private key).

@Rayo2010x
Copy link

Localcryptos has a bug in its withdrawal process. Three day ago I tried to withdraw all my BTC and the transaction still remains as "Pending". The transaction was never broadcasted because it never reached the Mempool. Now I have no access to my BTC and the support team of Localcryptos never answer.
Option (a) is now unavailable to me in the platform.
I have 36 addresses with BTC in Localcryptos, 34 out of 36 are marked as "UTxOs". Using option (b) I can find only the other 2 addresses but not the remaining 34 UTxOs.
Please your help.

@Rayo2010x
Copy link

@localcryptosMichael localcryptosMichael,pleae your help

@localcryptosMichael
Copy link

localcryptosMichael commented Jan 15, 2022

@localcryptosMichael localcryptosMichael,pleae your help

Hey Rayo2010x, I'm sure our customer support team can provide you guidance here and figure out why your transaction is stuck. Please write to us here. This GitHub issue isn't the place for LocalCryptos support. If you already have a support ticket number, let me know, privately, and I'll take a look at it immediately.

@Rayo2010x
Copy link

Thank you @localcryptosMichael, I have just resolved the problem by myself. Localcryptos support never answered to me.
Nevertheless, I would like to know why Option (b) doesn't work for addresses marked as UTxOs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants