Skip to content

Commit b5b4fc0

Browse files
committed
New Cryptocurrency: Ripple XRP wallet protocol added.
1 parent 5d21692 commit b5b4fc0

File tree

4 files changed

+45
-40
lines changed

4 files changed

+45
-40
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ This library simplifies the process of creating a new hierarchical deterministic
337337
| Rapids | `RPD` | Yes | No | No | 320 | `m/44'/320'/0'/0/0` |
338338
| Ravencoin | `RVN` | Yes | No | No | 175 | `m/44'/175'/0'/0/0` |
339339
| Reddcoin | `RDD` | Yes | No | No | 4 | `m/44'/4'/0'/0/0` |
340+
| Ripple | `XRP` | Yes | No | No | 144 | `m/44'/144'/0'/0/0` |
340341
| Rubycoin | `RBY` | Yes | No | No | 16 | `m/44'/16'/0'/0/0` |
341342
| Safecoin | `SAFE` | Yes | No | No | 19165 | `m/44'/19165'/0'/0/0` |
342343
| Saluscoin | `SLS` | Yes | No | No | 572 | `m/44'/572'/0'/0/0` |

hdwallet/cryptocurrencies.py

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4911,6 +4911,46 @@ class ReddcoinMainnet(Cryptocurrency):
49114911
WIF_SECRET_KEY = 0xbd
49124912

49134913

4914+
class RippleMainnet(Cryptocurrency):
4915+
4916+
NAME = "Ripple"
4917+
SYMBOL = "XRP"
4918+
NETWORK = "mainnet"
4919+
SOURCE_CODE = None
4920+
COIN_TYPE = CoinType({
4921+
"INDEX": 144,
4922+
"HARDENED": True
4923+
})
4924+
4925+
SCRIPT_ADDRESS = 0x00
4926+
PUBLIC_KEY_ADDRESS = 0x00
4927+
SEGWIT_ADDRESS = SegwitAddress({
4928+
"HRP": None,
4929+
"VERSION": 0x00
4930+
})
4931+
4932+
EXTENDED_PRIVATE_KEY = ExtendedPrivateKey({
4933+
"P2PKH": 0x488ade4,
4934+
"P2SH": 0x488ade4,
4935+
"P2WPKH": None,
4936+
"P2WPKH_IN_P2SH": None,
4937+
"P2WSH": None,
4938+
"P2WSH_IN_P2SH": None
4939+
})
4940+
EXTENDED_PUBLIC_KEY = ExtendedPublicKey({
4941+
"P2PKH": 0x488b21e,
4942+
"P2SH": 0x488b21e,
4943+
"P2WPKH": None,
4944+
"P2WPKH_IN_P2SH": None,
4945+
"P2WSH": None,
4946+
"P2WSH_IN_P2SH": None
4947+
})
4948+
4949+
MASSAGE_PREFIX = None
4950+
DEFAULT_PATH = f"m/44'/{str(COIN_TYPE)}/0'/0/0"
4951+
WIF_SECRET_KEY = 0x80
4952+
4953+
49144954
class RubycoinMainnet(Cryptocurrency):
49154955

49164956
NAME = "Rubycoin"
@@ -6193,46 +6233,6 @@ class WincoinMainnet(Cryptocurrency):
61936233
WIF_SECRET_KEY = 0xc9
61946234

61956235

6196-
class RippleMainnet(Cryptocurrency):
6197-
6198-
NAME = "Ripple"
6199-
SYMBOL = "XRP"
6200-
NETWORK = "mainnet"
6201-
SOURCE_CODE = None
6202-
COIN_TYPE = CoinType({
6203-
"INDEX": 144,
6204-
"HARDENED": True
6205-
})
6206-
6207-
SCRIPT_ADDRESS = 0x00
6208-
PUBLIC_KEY_ADDRESS = 0x00
6209-
SEGWIT_ADDRESS = SegwitAddress({
6210-
"HRP": None,
6211-
"VERSION": 0x00
6212-
})
6213-
6214-
EXTENDED_PRIVATE_KEY = ExtendedPrivateKey({
6215-
"P2PKH": 0x488ade4,
6216-
"P2SH": 0x488ade4,
6217-
"P2WPKH": None,
6218-
"P2WPKH_IN_P2SH": None,
6219-
"P2WSH": None,
6220-
"P2WSH_IN_P2SH": None
6221-
})
6222-
EXTENDED_PUBLIC_KEY = ExtendedPublicKey({
6223-
"P2PKH": 0x488b21e,
6224-
"P2SH": 0x488b21e,
6225-
"P2WPKH": None,
6226-
"P2WPKH_IN_P2SH": None,
6227-
"P2WSH": None,
6228-
"P2WSH_IN_P2SH": None
6229-
})
6230-
6231-
MASSAGE_PREFIX = None
6232-
DEFAULT_PATH = f"m/44'/{str(COIN_TYPE)}/0'/0/0"
6233-
WIF_SECRET_KEY = 0x80
6234-
6235-
62366236
class XUEZMainnet(Cryptocurrency):
62376237

62386238
NAME = "XUEZ"

hdwallet/symbols.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@
276276
XUEZ = "XUEZ"
277277
# XinFin
278278
XDC = "XDC"
279+
# Ripple
280+
XRP = "XRP"
279281
#Ycash
280282
YEC = "YEC"
281283
# ZClassic
@@ -425,6 +427,7 @@
425427
"WC",
426428
"XUEZ",
427429
"XDC",
430+
"XRP",
428431
"YEC",
429432
"ZCL",
430433
"ZEC", "ZECTEST",

tests/test_symbols.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def test_symbols():
160160
assert WC == "WC"
161161
assert XUEZ == "XUEZ"
162162
assert XDC == "XDC"
163+
assert XRP == "XRP"
163164
assert YEC == "YEC"
164165
assert ZCL == "ZCL"
165166
assert ZEC == "ZEC"

0 commit comments

Comments
 (0)