ByronAddress

scalus.cardano.address.ByronAddress
See theByronAddress companion object
case class ByronAddress(bytes: ByteString) extends Address

Placeholder for Byron address - complex legacy format

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Address
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def attributesSize: Int

Calculate the size of Byron address attributes.

Calculate the size of Byron address attributes.

This matches Haskell's bootstrapAddressAttrsSize which calculates: derivationPathLength + unknownAttributesLength

Known attributes are:

  • Key 1: Derivation path (HD address payload)
  • Key 2: Network magic

Only derivation path (key 1) and unknown attributes (keys other than 1 and 2) are counted in the size. Network magic (key 2) is NOT counted.

Attributes

Returns

The total size of relevant attributes in bytes

def encode: Try[String]

Encode to appropriate string format

Encode to appropriate string format

Attributes

inline override def getNetwork: Option[Network]

Attributes

Definition Classes
def hasScript: Boolean

Check if address contains scripts

Check if address contains scripts

Attributes

def hrp: Try[String]

Get human-readable prefix if available

Get human-readable prefix if available

Attributes

def isEnterprise: Boolean

Check if this is an enterprise address

Check if this is an enterprise address

Attributes

Extract payment key hash from Byron address.

Extract payment key hash from Byron address.

Byron addresses contain an addrRoot which is the payment key hash. The CBOR structure is: [tag24(payload), crc32] The payload is: [addrRoot, addrAttributes, addrType]

This implementation extracts the addrRoot to match Haskell's bootstrapKeyHash.

Attributes

Get script hash if available

Get script hash if available

Attributes

def toBase58: String

Serialize to bytes

Serialize to bytes

Attributes

def toHex: String

Convert to hex string

Convert to hex string

Attributes

def typeId: Byte

Get type ID

Get type ID

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product