• Stars
    star
    762
  • Rank 59,625 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐍 Mnemonic code for generating deterministic keys, BIP39

python-mnemonic

Reference implementation of BIP-0039: Mnemonic code for generating deterministic keys

Abstract

This BIP describes the implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets.

It consists of two parts: generating the mnenomic, and converting it into a binary seed. This seed can be later used to generate deterministic wallets using BIP-0032 or similar methods.

BIP Paper

See https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki for full specification

Installation

To install this library and its dependencies use:

pip install mnemonic

Usage examples

Import library into python project via:

from mnemonic import Mnemonic

Initialize class instance, picking from available dictionaries:

  • english
  • chinese_simplified
  • chinese_traditional
  • french
  • italian
  • japanese
  • korean
  • spanish
mnemo = Mnemonic(language)
mnemo = Mnemonic("english")

Generate word list given the strength (128 - 256):

words = mnemo.generate(strength=256)

Given the word list and custom passphrase (empty in example), generate seed:

seed = mnemo.to_seed(words, passphrase="")

Given the word list, calculate original entropy:

entropy = mnemo.to_entropy(words)

More Repositories

1

trezor-firmware

🔒 Trezor Firmware Monorepo
C
1,286
star
2

trezor-suite

🍬 Trezor Suite Monorepo
TypeScript
619
star
3

blockbook

📘 Trezor address/account balance backend
Go
585
star
4

trezor-crypto

🔒 Don't use this repo, use the new monorepo instead:
C
493
star
5

trezor-core

🔒 Don't use this repo, use the new monorepo instead:
Python
353
star
6

connect

🔗 A platform for easy integration of Trezor into 3rd party services
JavaScript
350
star
7

trezor-mcu

🔒 Don't use this repo, use the new monorepo instead:
C
318
star
8

cython-hidapi

🐍 Python wrapper for the HIDAPI
Cython
255
star
9

trezord-go

😈 Trezor Communication Daemon (written in Go)
C
226
star
10

python-trezor

🐍 Don't use this repo, use the new monorepo instead:
Python
203
star
11

trezor-hardware

🔧 Hardware design of Trezor
171
star
12

python-shamir-mnemonic

Python
155
star
13

trezor.js

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/connect instead
JavaScript
95
star
14

trezor-common

🔒 Don't post issues/PRs to here, use the new monorepo:
Python
89
star
15

trezor-android

📱 TREZOR Communication Library for Android
Java
78
star
16

hd-wallet

💰 High-performance Bitcoin HD Wallet in Javascript
JavaScript
56
star
17

trezor-password-manager

Password Management via TREZOR
SCSS
42
star
18

data

📦 Data files for Trezor
HTML
39
star
19

trezor-wallet

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
JavaScript
29
star
20

trezor-user-env

Development tool for Trezor developers
Python
24
star
21

trezor-link

Javascript module for integrating TREZOR into Node.js and web applications.
TypeScript
18
star
22

connect-explorer

Connect Examples
JavaScript
12
star
23

trezor-suite-guide

User Guide present in Trezor Suite
11
star
24

rng-test

🎲 Random Number Generator (RNG) tests
C
10
star
25

community

👫 TREZOR Developer Community Discussion
9
star
26

trezor-ui-components

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
JavaScript
9
star
27

trezor-storage

🔒 Don't use this repo, use the new monorepo instead:
C
9
star
28

coinjoin-backend

Python
6
star
29

omni-trezor

OMNI Wallet for Trezor
JavaScript
6
star
30

ui

🍺 User Interface Mockups and Experiments
HTML
6
star
31

trezor-rollout

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
JavaScript
5
star
32

trezor-test-scenarios

Python
5
star
33

trezor-core-ui

HTML
5
star
34

trezor-storage-test

🔒 Don't use this repo, use the new monorepo instead:
Python
4
star
35

trezor-onboarding

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
TypeScript
4
star
36

.github

4
star
37

trezor-flags

JavaScript
4
star
38

trezor-translations-manager

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
JavaScript
3
star
39

trezor-blockchain-link

⚠️ OBSOLETE. DO NOT USE! Use https://github.com/trezor/trezor-suite instead
TypeScript
3
star
40

upysize

Tool for decreasing the size of compiled micropython code
Python
3
star
41

trezor-docker-images

Collection of docker images and configurations used across various trezor projects.
Dockerfile
2
star
42

binsize

Tool to analyze the size of a binary from .elf file
Python
2
star
43

definitions

Python
1
star