Addresses
An address on the Mavryk blockchain is a string whose suffix is the hash of the public key of a peer.
If that peer is a smart contract, the address starts with
KT1
.If the peer is a user account, the address starts with
tz1
,tz2
,tz3
, ortz4
.
The address
type represents a well-formed Mavryk address.
However, the type being well-formed does not automatically mean that the address is valid and identifies a real account.
Beware of failures if the address is invalid.
To create an address in LIGO, cast a string to the address
type, as in these examples:
const my_account: address =
"mv18Cw7psUrAAPBpXYd9CtCpHg9EgjHP9KTe" as address;