Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement conversion to arbitrary prefixes #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Dec 21, 2020

  1. implement conversion to arbitrary prefixes

    This commit adds an `prefix` argument to the `Address.cash_address` method.
    If not specified, it defaults to the current prefix if the object was
    instantiated  from string via a CashAddr, or to the "bitcoincash:" prefix if
    it was instantiated from string with a legacy address.
    
    Test plan:
    
    python3 -m tests.test
    PiRK committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    51dd1c5 View commit details
    Browse the repository at this point in the history
  2. support uppercase prefixes

    If the users specifies an uppercase prefix, the output should be entirely
    uppercase. Mixed-case prefixes are invalid.
    
    Note that the case is not recorded in the instance, when creating an Address
    from string. If the prefix is not explicitely specified and uppercase, the
    output from `Address.cash_address()` will always be lowercase.
    
    Test plan:
    python3 -m tests.test
    PiRK committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    bc8d6a9 View commit details
    Browse the repository at this point in the history