Skip to content

Commit 29f1d8a

Browse files
committed
Merge branch 'feature-invoice'; v11.0.0
2 parents ab2b38d + 9eb23ba commit 29f1d8a

File tree

250 files changed

+17648
-1486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+17648
-1486
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "slip39/invoice/openzeppelin-contracts"]
2+
path = slip39/invoice/openzeppelin-contracts
3+
url = https://github.com/OpenZeppelin/openzeppelin-contracts.git

GNUmakefile

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else
4141
endif
4242

4343
# To see all pytest output, uncomment --capture=no, ...
44-
PYTESTOPTS = #-vv --doctest-modules # --capture=no # --log-cli-level=INFO
44+
PYTESTOPTS = --capture=no --log-cli-level=WARNING
4545

4646
PY3TEST = $(PY3) -m pytest $(PYTESTOPTS)
4747

@@ -77,8 +77,9 @@ test:
7777
$(PY3TEST)
7878

7979
analyze:
80-
flake8 -j 1 --max-line-length=200 \
81-
--ignore=W503,E201,E202,E127,E221,E223,E226,E231,E241,E242,E251,E265,E272,E274 \
80+
$(PY3) -m flake8 --color never -j 1 --max-line-length=250 \
81+
--exclude slip39/tabulate \
82+
--ignore=W503,E201,E202,E203,E127,E221,E223,E226,E231,E241,E242,E251,E265,E272,E274 \
8283
slip39
8384

8485
pylint:
@@ -127,6 +128,63 @@ slip39/layout/COVER.txt:
127128
# Any build dependencies that are dynamically generated, and may need updating from time to time
128129
deps: $(TXT) slip39/gui/SLIP-39.txt slip39/layout/COVER.txt
129130

131+
132+
#
133+
# Agent Keypairs, Product Licences
134+
#
135+
136+
GLOBAL_OPTIONS = -vv
137+
138+
CREDENTIALS = $(abspath $(HOME)/.crypto-licensing )
139+
140+
export CRYPTO_LIC_PASSWORD
141+
export CRYPTO_LIC_USERNAME
142+
143+
.PHONY: slip-39 perry-kundert
144+
products: slip-39 \
145+
perry-kundert \
146+
147+
slip-39:
148+
149+
perry-kundert: [email protected]
150+
perry-kundert: CRYPTO_LIC_PASSWORD=password
151+
perry-kundert: slip39/invoice/payments_test/perry-kundert.crypto-license
152+
perry-kundert: GRANTS="{\"crypto-licensing-server\": {\
153+
\"override\": { \
154+
\"rate\": \"0.1%\", \
155+
\"crypto\": { \
156+
\"ETH\": \"0xe4909b66FD66DA7d86114695A1256418580C8767\", \
157+
\"BTC\": \"bc1qygm3dlynmjxuflghr0hmq6r7wmff2jd5gtgz0q\" \
158+
}\
159+
}\
160+
}}"
161+
162+
163+
164+
# Create .crypto-keypair from seed; note: if the make rule fails, intermediate files are deleted.
165+
# We expect any password to be transmitted in CRYPTO_LIC_PASSWORD env. var.
166+
%.crypto-keypair: %.crypto-seed
167+
$(PY3) -m crypto_licensing $(GLOBAL_OPTIONS) \
168+
--extra $(dir $(basename $@ )) \
169+
--name $(notdir $(basename $@ )) \
170+
--reverse-save \
171+
registered \
172+
--username $(USERNAME) \
173+
--seed $$( cat $< )
174+
175+
# Create .crypto-license, signed by .crypto-keypair
176+
%.crypto-license : %.crypto-keypair
177+
$(PY3) -m crypto_licensing $(GLOBAL_OPTIONS) \
178+
--extra $(dir $(basename $@ )) \
179+
--name $(notdir $(basename $@ )) \
180+
--reverse-save \
181+
license \
182+
--username $(USERNAME) --no-registering \
183+
--client $(CLIENT) --client-pubkey $(CLIENT_PUBKEY) \
184+
--grant $(GRANTS) \
185+
--author $(AUTHOR) --domain $(DOMAIN) --product $(PRODUCT) $(LICENSE_OPTIONS)
186+
187+
130188
#
131189
# VirtualEnv build, install and activate
132190
#
@@ -167,7 +225,7 @@ dist/slip39-$(VERSION)-py3-none-any.whl: build-check FORCE
167225

168226
# Install from wheel, including all optional extra dependencies (except dev)
169227
install: dist/slip39-$(VERSION)-py3-none-any.whl FORCE
170-
$(PY3) -m pip install --force-reinstall $<[gui,wallet,serial]
228+
$(PY3) -m pip install --force-reinstall $<[all]
171229

172230
install-dev:
173231
$(PY3) -m pip install --upgrade -r requirements-dev.txt
@@ -527,6 +585,11 @@ dist/SLIP-39.app-checkids: SLIP-39.spec
527585
# For details on Signing Apps:
528586
# See: https://developer.apple.com/library/archive/technotes/tn2318/_index.html
529587

588+
# For PyInstaller-specific hints:
589+
# https://gist.github.com/txoof/0636835d3cc65245c6288b2374799c43
590+
# https://github.com/txoof/codesign
591+
# https://github.com/The-Nicholas-R-Barrow-Company-LLC/PyMacApp
592+
530593
# * In order for code signing to succeed, your code signing key(s) MUST have all of their dependent
531594
# (issuer) keys downloaded to your Keychain, from https://www.apple.com/certificateauthority.
532595
# - Use Keychain Access, right-click on your signing key and click Evaluate "...".
@@ -647,16 +710,17 @@ upload-check:
647710
|| ( echo -e "\n\n*** Missing Python modules; run:\n\n $(PY3) -m pip install --upgrade twine\n" \
648711
&& false )
649712
upload: upload-check wheel
650-
python3 -m twine upload --repository pypi dist/slip39-$(VERSION)*
713+
$(PY3) -m twine upload --repository pypi dist/slip39-$(VERSION)*
651714

652715
clean:
653716
@rm -rf MANIFEST *.png build dist auto *.egg-info $(shell find . -name '__pycache__' )
654717

655718

656-
# Run only tests with a prefix containing the target string, eg test-blah
719+
# Run only tests with a prefix containing the target string, eg test-api
657720
test-%:
658-
slip39/*$*_test.py
721+
$(PY3TEST) $(shell find slip39 -name '*$**_test.py')
659722

723+
# Run all tests with names matching the target string
660724
unit-%:
661725
$(PY3TEST) -k $*
662726

0 commit comments

Comments
 (0)