File: import-xkey.sh

package info (click to toggle)
python-bip32utils 0.0~git20170118.dd9c541-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 232 kB
  • sloc: python: 468; sh: 39; makefile: 3
file content (18 lines) | stat: -rwxr-xr-x 617 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

XPRV=$(bip32gen -i entropy -f vector1.bin -o xprv -F - m/0h)
echo "Extended private key for 'm/0h' is $XPRV"
echo $XPRV >xprv.asc

XPUB=$(bip32gen -i entropy -f vector1.bin -o xpub -F - m/0h)
echo "Extended public  key for 'm/0h' is $XPUB"
echo $XPUB >xpub.asc

ADDR=$(bip32gen -i entropy -f vector1.bin -o addr m/0h/1)
echo "Using entropy for 'm',    address of 'm/0h/1' is $ADDR"

ADDR2=$(bip32gen -i xprv -f xprv.asc -o addr 1)
echo "Using xprv    for 'm/0h', address of 'm/0h/1' is $ADDR2"

ADDR3=$(bip32gen -i xpub -f xpub.asc -o addr 1)
echo "Using xpub    for 'M/0h', address of 'M/0h/1' is $ADDR3"