Closed minhanh1234 closed 3 days ago
prolly like this:
from hdwallet import BIP44HDWallet
from hdwallet.cryptocurrencies import RippleMainnet
from hdwallet.derivations import BIP44Derivation
from hdwallet.symbols import XRP
from .BaseGeneratorService import BaseGeneratorService
class XRPGeneratorService(BaseGeneratorService):
def __init__(self, mnemonic, language):
super().__init__(XRP, mnemonic, language)
def generate(self, derivation_id: int = 0):
bip44_hdwallet: BIP44HDWallet = BIP44HDWallet(cryptocurrency=RippleMainnet)
bip44_hdwallet.from_mnemonic(
mnemonic=self.mnemonic, language=self.language, passphrase=self.passphrase
)
bip44_hdwallet.clean_derivation()
bip44_derivation: BIP44Derivation = BIP44Derivation(
cryptocurrency=RippleMainnet, account=0, change=False, address=derivation_id
)
bip44_hdwallet.from_path(path=bip44_derivation)
return bip44_hdwallet
how can i use your script to generate Ripple (XRP wallet address) base of 12 seed phrase word?
Ripple | XRP | Yes | No | No | 144 | m/44'/144'/0'/0/0