Skip to content
Snippets Groups Projects
  • Holger's avatar
    516be5a7
    Add Prefix class · 516be5a7
    Holger authored
    * add Prefix class for PasswordKey, Brainkey, Address, PublicKey, PrivateKey, Base58
    * New Class BitcoinAddress
    * Address class has now from_pubkey class method
    516be5a7
    History
    Add Prefix class
    Holger authored
    * add Prefix class for PasswordKey, Brainkey, Address, PublicKey, PrivateKey, Base58
    * New Class BitcoinAddress
    * Address class has now from_pubkey class method
prefix.py 285 B
# -*- coding: utf-8 -*-
class Prefix:
    """ This class is meant to allow changing the prefix.
        The prefix is used to link a public key to a specific blockchain.
    """

    prefix = "STM"

    def set_prefix(self, prefix):
        if prefix:
            self.prefix = prefix