Attributes
Members list
Type members
Classlikes
CBOR decoder for Address, as at protocol version 9 and later
CBOR decoder for Address, as at protocol version 9 and later
Attributes
- Supertypes
- Self type
CBOR encoder for Address
CBOR encoder for Address
Attributes
- Supertypes
- Self type
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Create a Shelley address from payment and stake credentials
Create a Shelley address from payment and stake credentials
Attributes
Create a Shelley-era address from a payment credential with no delegation
Create a Shelley-era address from a payment credential with no delegation
This is an enterprise address.
Attributes
Parse address from bech32 string
Parse address from bech32 string
Attributes
Parse a bech32 address a node already holds, see fromBytesLenient.
Parse address from scalus.uplc.builtin.ByteString
Parse address from scalus.uplc.builtin.ByteString
Value parameters
- bs
-
Raw address bytes
Attributes
- Returns
-
Parsed address
- Throws
-
java.lang.IllegalArgumentException
If the byte string is empty or does not match any known address format
Parse address from raw bytes, as a node reads one in a new transaction (protocol version 9 and later). This is the ledger's decodeAddr.
Parse address from raw bytes, as a node reads one in a new transaction (protocol version 9 and later). This is the ledger's decodeAddr.
A pointer number may be written with zero groups in front, up to the bytes its width needs; toBytes writes it back without them, as the node holds it.
Value parameters
- bytes
-
Raw address bytes including header
Attributes
- Returns
-
Parsed address or failure with descriptive error
Parse address from raw bytes, as a node reads one at protocolVersion.
Parse address from raw bytes, as a node reads one at protocolVersion.
The version only changes how a pointer address reads (see Pointer.fromBytes): before version 9 a pointer that does not fit the ledger's widths reads as Pointer(Slot(0), 0, 0), and before version 7 bytes after the pointer are dropped. From version 9 both fail.
Value parameters
- bytes
-
Raw address bytes including header
- protocolVersion
-
The protocol version of the transaction or block the address is in
Attributes
- Returns
-
Parsed address or failure with descriptive error
Parse an address a node already holds, such as the address of an output in its UTxO set, as the ledger's decompactAddr reads one.
Parse an address a node already holds, such as the address of an output in its UTxO set, as the ledger's decompactAddr reads one.
A pointer reads as before protocol version 7: one that does not fit the ledger's widths reads as Pointer(Slot(0), 0, 0), and bytes after it are dropped. An output written before version 9 can have such a pointer, so use this for an address that chain data gives, as a provider's UTxO does. An address a user gives is checked with fromBytes instead, as a node checks it in a new transaction.
Attributes
Parse address from any string format (bech32 or base58).
Parse address from any string format (bech32 or base58).
Tries Bech32 first (for Shelley-era addresses), then Base58 (for Byron addresses).
Value parameters
- str
-
The address string to parse
Attributes
- Returns
-
The parsed Address
- Throws
-
IllegalArgumentException
if the string is not a valid address in any supported format
Givens
Givens
CBOR decoder for Address, as at protocol version 9 and later
CBOR decoder for Address, as at protocol version 9 and later
Attributes
CBOR encoder for Address
CBOR encoder for Address
Attributes
Pretty prints any Address - delegates to specific type instances
Pretty prints any Address - delegates to specific type instances
Attributes
Extensions
Extensions
String interpolator for parsing bech32 Cardano addresses.
String interpolator for parsing bech32 Cardano addresses.
Attributes
- Example
-
import scalus.cardano.address.Address.addr val mainnetAddr = addr"addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer..." val testnetAddr = addr"addr_test1qz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer..." val stakeAddr = addr"stake1uyehkck0lajq8gr28t9uxnuvgcqrc6070x3k9r8048z8y5gh6ffgw"
String interpolator for parsing bech32 Cardano stake addresses.
String interpolator for parsing bech32 Cardano stake addresses.
Attributes
- Example
-
import scalus.cardano.address.Address.stake val mainnetStake = stake"stake1uyehkck0lajq8gr28t9uxnuvgcqrc6070x3k9r8048z8y5gh6ffgw" val testnetStake = stake"stake_test1uqfu74w3wh4gfzu8m6e7j987h4lq9r3t7ef5gaw497uu85qsqfy27"