Skip to content

Commit b5bd4e1

Browse files
committed
Begin working toward licensing
o Add anonymous flag for avoiding public crypto addresses on cards o Improved sizing/layout of 256-bit SLIP-39 mnemonics o Begin moving custom Exceptions to slip39/exceptions
1 parent 71bfac5 commit b5bd4e1

16 files changed

+387
-137
lines changed

README.org

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,11 @@ slip39 --help 2>&1 | sed 's/^/: /' # (just for output formatting)
437437
: [-c CRYPTOCURRENCY] [-p PATH] [-j JSON] [-w WALLET]
438438
: [--wallet-hint WALLET_HINT] [--wallet-format WALLET_FORMAT]
439439
: [-s SECRET] [-e ENTROPY] [--show] [--no-show] [--bits BITS]
440-
: [--using-bip39] [--passphrase PASSPHRASE] [-C CARD] [--no-card]
441-
: [--paper PAPER] [--cover] [--no-cover] [--identifier IDENTIFIER]
442-
: [--extendable] [--no-extendable] [--text]
443-
: [--watermark WATERMARK] [--double-sided] [--no-double-sided]
444-
: [--single-sided]
440+
: [--using-bip39] [--anonymous] [--passphrase PASSPHRASE]
441+
: [-C CARD] [--no-card] [--paper PAPER] [--cover] [--no-cover]
442+
: [--identifier IDENTIFIER] [--extendable] [--no-extendable]
443+
: [--text] [--watermark WATERMARK] [--double-sided]
444+
: [--no-double-sided] [--single-sided]
445445
: [names ...]
446446
:
447447
: Create and output SLIP-39 encoded Seeds and Paper Wallets to a PDF file.
@@ -504,6 +504,8 @@ slip39 --help 2>&1 | sed 's/^/: /' # (just for output formatting)
504504
: --using-bip39 Generate Seed from secret Entropy using BIP-39
505505
: generation algorithm (encode as BIP-39 Mnemonics,
506506
: encrypted using --passphrase)
507+
: --anonymous SLIP-39 mnemonic cards include cryptocurrency public
508+
: addresses and QR codes (default: False)
507509
: --passphrase PASSPHRASE
508510
: Encrypt the master secret w/ this passphrase, '-'
509511
: reads it from stdin (default: None/'')
@@ -1173,6 +1175,7 @@ create_details = slip39.create(
11731175
| groups | Like groups, w/ <members> = ["<mnemonics>", ...] |
11741176
| accounts | Resultant { "path": Account, ...} |
11751177
| using_bip39 | Generate Seed from Entropy via BIP-39 generation algorithm |
1178+
| anonymous | Avoid including cryptocurrency public addresses and QR codes |
11761179
| card_format | 'index', '(<h>,<w>),<margin>', ... |
11771180
| paper_format | 'Letter', ... |
11781181
| orientation | Force an orientation (default: portrait, landscape) |
@@ -1212,6 +1215,7 @@ pdf_binary = pdf.output()
12121215
| master_secret | A Seed secret (only appropriate if exactly one name supplied) |
12131216
| passphrase | A SLIP-39 passphrase (not Trezor compatible; use "hidden wallet" phrase on device instead) |
12141217
| using_bip39 | Generate Seed from Entropy via BIP-39 generation algorithm |
1218+
| anonymous | Avoid including cryptocurrency public addresses and QR codes |
12151219
| group | A dict of {"<group>":(<required>, <members>), ...} |
12161220
| group_threshold | How many groups are required to recover the Seed |
12171221
| cryptocurrency | A sequence of [ "<crypto>", "<crypto>:<derivation>", ... ] w/ optional ranges |

README.pdf

177 Bytes
Binary file not shown.

README.txt

Lines changed: 122 additions & 120 deletions
Large diffs are not rendered by default.

images/SLIP39-Example.pdf

-3.45 KB
Binary file not shown.

slip39/defaults.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
QUARTER_LETTER = (10.5/4,7+3/4), 1/8 # noqa: E241 (actually 4/letter, 5/legal)
5757
PHOTO_CARD = (3+1/2, 5+1/2), 1/16 # prints on 4x6 photo paper w/ 1/4" default outer border
5858

59+
# Whether we should avoid printing Cryptocurrency addresses, QR codes
60+
ANONYMOUS = False
61+
5962
# SLIP-39 Mnemonic Card Sizes
6063
CARD = 'business'
6164
CARD_SIZES = dict(
@@ -110,7 +113,7 @@
110113

111114
MNEM_ROWS_COLS = {
112115
20: ( 7, 3), # 128-bit seed
113-
33: (11, 3), # 256-bit seed
116+
33: ( 9, 4), # 256-bit seed
114117
59: (12, 5), # 512-bit seed, eg. from BIP-39 (Unsupported on Trezor)
115118
}
116119

slip39/exceptions.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
#
3+
# Python-slip39 -- Ethereum SLIP-39 Account Generation and Recovery
4+
#
5+
# Copyright (c) 2025, Dominion Research & Development Corp.
6+
#
7+
# Python-slip39 is free software: you can redistribute it and/or modify it under
8+
# the terms of the GNU General Public License as published by the Free Software
9+
# Foundation, either version 3 of the License, or (at your option) any later
10+
# version. It is also available under alternative (eg. Commercial) licenses, at
11+
# your option. See the LICENSE file at the top of the source tree.
12+
#
13+
# Python-slip39 is distributed in the hope that it will be useful, but WITHOUT
14+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16+
#
17+
18+
from hdwallet.exceptions import SymbolError
19+
20+
21+
class SLIP39Error( Exception ):
22+
pass
23+
24+
25+
class ConversionError( SLIP39Error ):
26+
pass
27+

slip39/gui/SLIP-39-ANONYMOUS.org

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#+title: Anonymous
2+
#+OPTIONS: toc:nil title:nil author:nil
3+
4+
#+BEGIN_ABSTRACT
5+
If you prefer your SLIP-39 cards to NOT include your Cryptocurrency public addresses and their QR
6+
codes, select Anonymous.
7+
#+END_ABSTRACT
8+
9+
* Anonymous
10+
11+
SLIP-39 Cards Mnemonics will be larger, covering the area where the QR codes would have appeared.
12+
13+
** Paper Wallets
14+
15+
If Cryptocurrency "Paper Wallet" are printed, they will of course include public address information.

slip39/gui/SLIP-39-ANONYMOUS.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
If you prefer your SLIP-39 cards to NOT include your Cryptocurrency
2+
public addresses and their QR codes, select Anonymous.
3+
4+
5+
1 Anonymous
6+
═══════════
7+
8+
SLIP-39 Cards Mnemonics will be larger, covering the area where the QR
9+
codes would have appeared.
10+
11+
12+
1.1 Paper Wallets
13+
─────────────────
14+
15+
If Cryptocurrency "Paper Wallet" are printed, they will of course
16+
include public address information.

slip39/gui/SLIP-39-CRYPTO.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ compatible) displayed are:
1414
SegWit m/49'/ 2'/0'/0/0 M…
1515
Legacy m/44'/ 2'/0'/0/0 L…
1616
Recover DOGE Legacy m/44'/ 3'/0'/0/0 D…
17-
Pro BSC Legacy m/44'/ 60'/0'/0/0 0x… Beta
17+
Pro BNB Legacy m/44'/714'/0'/0/0 0x… Beta
1818
Pro XRP Legacy m/44'/144'/0'/0/0 r…
1919
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2020

@@ -35,6 +35,6 @@ are derived from this Seed.
3535
2 Cryptocurrencies In Beta Testing
3636
══════════════════════════════════
3737

38-
XRP and BSC wallet addresses are also supported, if desired (currently
38+
XRP and BNB wallet addresses are also supported, if desired (currently
3939
in Beta testing quality). Generated Paper Wallets should be /tested/
4040
to ensure that generated and recovered private keys are valid.

slip39/gui/SLIP-39-PASSPHRASE.org

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ often makes the Seed unrecoverable, because the Passphrase can be so easily lost
77

88
SLIP-39 Mnemonic Card Groups are *much* more reliable (to recover) and secure (against accidental
99
disclosure); a Passphrase is *not* recommended. Leave it empty!
10-
1110
#+END_ABSTRACT
1211

1312
* BIP-39 Passphrase

0 commit comments

Comments
 (0)