ByronAddressAttributes

class cometa.address.byron_address_attributes.ByronAddressAttributes(derivation_path=b'', magic=-1)[source]

Bases: object

Attributes specific to Byron-era addresses.

Byron addresses contain optional attributes used during the Byron era of Cardano. The derivation_path was used by legacy random wallets for key derivation, while the magic attribute serves as a network identifier for test networks.

Parameters:
  • derivation_path (bytes)

  • magic (int)

derivation_path: bytes = b''

Encrypted derivation path used by legacy wallets (maybe empty).

magic: int = -1

Network magic identifier (-1 if not associated with a specific network).

classmethod mainnet()[source]

Creates attributes for a mainnet Byron address.

Return type:

ByronAddressAttributes

__eq__(other)

Return self==value.

__hash__()

Return hash(self).

__init__(derivation_path=b'', magic=-1)
Parameters:
  • derivation_path (bytes)

  • magic (int)

Return type:

None

__repr__()

Return repr(self).

classmethod testnet(magic)[source]

Creates attributes for a testnet Byron address with the given network magic.

Parameters:

magic (int)

Return type:

ByronAddressAttributes

property has_network_magic: bool

Returns True if this address has a network magic (testnet).