iancoleman / bip39

A web tool for converting BIP39 mnemonic codes
https://iancoleman.io/bip39/
MIT License
3.41k stars 1.42k forks source link

Added support for Solana (SOL) #562

Open daflh opened 2 years ago

daflh commented 2 years ago

Uses 'm/44'/501'/0'/0' for the derivation path, same as in Sollet or Phantom wallet. Code based on used for Stellar. This should close #545

cryptoiskey commented 6 months ago

Any idea why this hasn't been added? I am getting a ton of people on my YouTube channel asking for this.

bpsib commented 6 months ago

It generates the wrong keys for me (copied my Mnemonic phrase from Trust Wallet).

bpsib commented 6 months ago

I have just solved this by finding the Solana entry in index.js and removing /0 from the line var path = `m/${purpose}'/${coin}'/${index}'/0'`;.

This is because Trust Wallet uses the derivation path m/44'/501'/0' rather than m/44'/501'/0'/0'.

Arian8j2 commented 5 months ago

You can also achieve your private key from solana-keygen cli itself, use this if your mnemonic phrase is from Trust Wallet: solana-keygen recover 'prompt://?key=0' -o my-tw-wallet.json

tavishg commented 4 months ago

I'm reading this as I try to find a tool to test various seedphrases +passphrase to quickly find a specific Solana public key. Doing this through Ledger is inefficient for this purpose. Any assistance would be appreciated. Can offer $50 USDC/USDT for solution.

thiagosouza commented 4 months ago

I'm reading this as I try to find a tool to test various seedphrases +passphrase to quickly find a specific Solana public key. Doing this through Ledger is inefficient for this purpose. Any assistance would be appreciated. Can offer $50 USDC/USDT for solution.

I can arrange you a script and teach u how to use it. It would be the best way of finding this wallet. We can schedule via Google meet and I do with you.

Tomorrow I can publish here a public version of the code. You try it. And if you need me, then I would charge 100 bucks for 2 hours.

see u. And good luck @tavishg

tavishg commented 4 months ago

I'm reading this as I try to find a tool to test various seedphrases +passphrase to quickly find a specific Solana public key. Doing this through Ledger is inefficient for this purpose. Any assistance would be appreciated. Can offer $50 USDC/USDT for solution.

I can arrange you a script and teach u how to use it. It would be the best way of finding this wallet. We can schedule via Google meet and I do with you.

Tomorrow I can publish here a public version of the code. You try it. And if you need me, then I would charge 100 bucks for 2 hours.

see u. And good luck @tavishg

Sorry for the late reply, this would be very helpful. Happy to discuss further @thiagosouza

cryptoalert15 commented 4 months ago

hello! any help? https://solana.stackexchange.com/questions/11597/not-able-to-restore-old-sollet-wallet-24-seed

thiagosouza commented 4 months ago

hello! any help? https://solana.stackexchange.com/questions/11597/not-able-to-restore-old-sollet-wallet-24-seed

I created this small script to check mnemonics combined with passwords so people and find wallets. Please take a look. https://github.com/thiagosouza/crypto-wallet/blob/feature/solana/solana.wallet.ts

cryptoalert15 commented 4 months ago

hello! any help? https://solana.stackexchange.com/questions/11597/not-able-to-restore-old-sollet-wallet-24-seed

I created this small script to check mnemonics combined with passwords so people and find wallets. Please take a look. https://github.com/thiagosouza/crypto-wallet/blob/feature/solana/solana.wallet.ts

hey sir! not sure how to run it(not familiar with ts things), i clone it - > then npm install , modified solana.wallet.ts vars mnemonic and passwords
if i run with node solana.wallet.ts i get that error:

(node:16551) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/Koln87Mu95jH/crypto-wallet-feature-solana/solana.wallet.ts:1
import { Keypair } from "@solana/web3.js";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

edit: i manage to run it with ts-node solana.wallet.ts , the script work as expected but still cannot find my addresses.. maybe i've saved wrong seed since beginning..

cryptoalert15 commented 3 months ago

hello! any help? https://solana.stackexchange.com/questions/11597/not-able-to-restore-old-sollet-wallet-24-seed

I created this small script to check mnemonics combined with passwords so people and find wallets. Please take a look. https://github.com/thiagosouza/crypto-wallet/blob/feature/solana/solana.wallet.ts

you script cannot check this derivation path m/501'/0'/0/0 , 12 seed give me right addresses on sollet extension (https://github.com/project-serum/spl-token-wallet derivation m/501'/0'/0/0) , but the 24 seed give me new addresses.. check getAccountFromSeedfrom https://github.com/project-serum/spl-token-wallet/pull/42/files, not sure what https://github.com/armaniferrante did there https://github.com/project-serum/spl-token-wallet/pull/42 too many changes..

avibrazil commented 3 weeks ago

I think this was not accepted because addresses generated are wrong or inconsistent.

The Account field apparently has no effect. Account=0 must generate addresses as m/44'/501'/0'/0', m/44'/501'/0'/1', m/44'/501'/0'/2' ... Account=1 must generate addresses as m/44'/501'/1'/0', m/44'/501'/1'/1', m/44'/501'/1'/2' …

But this is not what's happening with this patch. Account=0 is generating addresses as m/44'/501'/0'/0', m/44'/501'/1'/0', m/44'/501'/2'/0' ... Account=1 is generating exactly same addresses as Account=0, as m/44'/501'/0'/0', m/44'/501'/1'/0', m/44'/501'/2'/0' …