1import { mnemonicToSeedSync } from 'bip39';
2import { bip32 } from 'bitcoinjs-lib';
3import { publicToAddress } from './address';
5describe('#bufferedPublicKeyToAddress', () => {
6 // TODO: why does this seemingly work in the Mnemonic login flow, but not in a test?
7 it.skip('derives an address from a public key buffer', () => {
9 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten';
10 const hdpath = "m/44'/60'/0'/0/0";
11 const seed = mnemonicToSeedSync(mnemonic);
12 const hd = bip32.fromSeed(seed);
13 const wallet = hd.derivePath(hdpath);
15 const expected = 'foo';
17 expect(publicToAddress(wallet.publicKey)).toEqual(expected);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list