Skip to content

Commit e4f3315

Browse files
committed
Invoice contents are generated, and conversions obtained from Oracle
1 parent ca307a2 commit e4f3315

File tree

16 files changed

+737
-295
lines changed

16 files changed

+737
-295
lines changed

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test:
7878

7979
analyze:
8080
flake8 -j 1 --max-line-length=250 \
81-
--ignore=W503,E201,E202,E127,E221,E223,E226,E231,E241,E242,E251,E265,E272,E274 \
81+
--ignore=W503,E201,E202,E203,E127,E221,E223,E226,E231,E241,E242,E251,E265,E272,E274 \
8282
slip39
8383

8484
pylint:

requirements-invoice.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ eth-account >=0.7.0,<0.8
22
py-solc-x >=1.1.1,<1.2
33
pycryptodome >=3.16, <4
44
requests >=2.20, <3
5-
tabulate >=0.9, <1
5+
tabulate >=0.9.1,<1
66
crypto-licensing >=3.0.3
77
dkimpy[ed25519] >=1.0.5,<2
88

slip39/api.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def address_format( cls, crypto, format=None ):
388388

389389
@classmethod
390390
def supported( cls, crypto ):
391-
"""Validates that the specified cryptocurrency is supported and returns the normalized short name
391+
"""Validates that the specified cryptocurrency is supported and returns the normalized "symbol"
392392
for it, or raises an a ValueError. Eg. "Ethereum" --> "ETH"
393393
394394
"""
@@ -614,8 +614,13 @@ def bech32_address( self ):
614614
return self.hdwallet.p2wpkh_address()
615615

616616
@property
617-
def crypto( self ):
617+
def name( self ):
618+
return self.hdwallet._cryptocurrency.NAME
619+
620+
@property
621+
def symbol( self ):
618622
return self.hdwallet._cryptocurrency.SYMBOL
623+
crypto = symbol
619624

620625
@property
621626
def path( self ) -> str:

slip39/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
# contract to get current market values. This prevents us from needing to "trust" anyone to obtain
176176
# current prices for cryptocurrencies -- if you have access to an Ethereum blockchain (either
177177
# locally or via an HTTPS API like Alchemy), then we can securely and reliably get current prices.
178-
# To avoid conflicts, we upper-case symbols, lower-case full names.
178+
# To avoid conflicts, by convention we upper-case symbols, lower-case full names.
179179
INVOICE_CURRENCY = "USD"
180180
INVOICE_PROXIES = {
181181
"USD": "USDC",

slip39/invoice/Cryptos/BNB_32.png

2.73 KB
Loading

slip39/invoice/Cryptos/BTC_32.png

3.1 KB
Loading

slip39/invoice/Cryptos/CRO_32.png

2.93 KB
Loading

slip39/invoice/Cryptos/DOGE_32.png

2.99 KB
Loading

slip39/invoice/Cryptos/ETH_32.png

3.06 KB
Loading

slip39/invoice/Cryptos/LTC_32.png

3.15 KB
Loading

0 commit comments

Comments
 (0)