(not an issue) Electrum seed format example
See original GitHub issueEdit 2 (from junderw): I made an Electrum seed library: Here is the github and it can be installed with npm install electrum-mnemonic
Edit (from junderw): See my reply below for an example of segwit wallet as well
After wasting half a day and reading Electrum docs & sources, here’s an example how to work with electrum seed format:
const crypto = require('crypto');
const bitcoin = require('bitcoinjs-lib');
function mnemonic2seed(mnemonic, passphrase = '', iterations = 2048) {
return crypto.pbkdf2Sync(mnemonic, 'electrum' + passphrase, iterations, 64, 'sha512');
}
const root = bitcoin.bip32.fromSeed(mnemonic2seed("<SEED HERE>"));
let xpub = root.toBase58();
const index = 1;
const node = bitcoin.bip32.fromBase58(xpub);
const externalAddress = bitcoin.payments.p2pkh({
pubkey: node.derive(0).derive(index).publicKey,
}).address;
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Electrum Seed Version System
Electrum 2.0 derives keys and addresses from a hash of the UTF8 normalized seed phrase with no dependency on a fixed wordlist.
Read more >Restoring your standard wallet from seed - Bitcoin Electrum
Begin by creating a new wallet file as per this guide. Click on next to see the wallet type selection window: As you...
Read more >ELECTRUM SEED MYSTERY: MANUALLY EXTENDED ...
I'm just asking because you say that you have written down only the seed phrase, which is not enough if you don't have...
Read more >Electrum seed gives invalid mnemonic error · Issue #448
When I make a new Segwit (bech32) wallet in Electrum the seeds it generates are not considered valid. Is that expected behavior?
Read more >Seed phrase - Bitcoin Wiki
BIP39 is the most common standard used for seed phrases. One notable example is Electrum wallet, which is using its own standard, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a bit more complete and covers both legacy and segwit.
@Overtorment I made a library that normalizes as close to Python3 as possible.
I tried a few Japanese seeds and it works with Electrum… but it’s kinda scary to include non-english wordlists rn.
https://github.com/bitcoinjs/electrum-mnemonic