Skip to content

Instantly share code, notes, and snippets.

@kfiresmith
Last active December 29, 2017 20:58
Show Gist options
  • Save kfiresmith/89d3c3f4cfd6458e18dfb7f56967651a to your computer and use it in GitHub Desktop.
Save kfiresmith/89d3c3f4cfd6458e18dfb7f56967651a to your computer and use it in GitHub Desktop.
stellar_generate_and_print.py
#Use Python SDK from StellarCN to quickly generate deterministic wallets/keypairs
from stellar_base.utils import StellarMnemonic
from stellar_base.keypair import Keypair
sm = StellarMnemonic()
m = sm.generate()
print('\n' "Secret word list for deterministic seed:")
print(" " + m)
kp = Keypair.deterministic(m, lang='english')
publickey = kp.address().decode()
seed = kp.seed().decode()
print('\n' "Public key / funds address:")
print(" " + publickey)
print('\n' "Secret seed:")
print(" " + seed)
@kfiresmith
Copy link
Author

kfiresmith commented Dec 29, 2017

Running this script dumps a prettified output wallet/keypair and seed wordlist like so:

Secret word list for deterministic seed:
orchard fan alcohol palm jaguar cool invest maple eager foster pencil cluster

Public key / funds address:
GDPQMHV67HIU6UNR5NUGNUBHZL7QNATANQQGCUZKRAL5Y7GGS3RAFTQF

Secret seed:
SBEXDW5KLZL3ZVIDRZFX4XMKTG7W4R2WQB36WWUUGQCXVFOIP5D5QE5S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment