Documentation ¶
Index ¶
- Constants
- Variables
- type Address
- func FromBLSPubKey(pubKey []byte) (address Address)
- func FromBase58(base58String string) (address Address, err error)
- func FromBytes(bytes []byte) (result Address, consumedBytes int, err error)
- func FromED25519PubKey(key ed25519.PublicKey) (address Address)
- func Parse(marshalUtil *marshalutil.MarshalUtil) (Address, error)
- func Random() (address Address)
- func RandomOfType(versionByte Version) Address
- type Digest
- type Version
Constants ¶
const ( // VersionED25519 represents the address version that uses ED25519 signatures. VersionED25519 = byte(1) // VersionBLS represents the address version that uses BLS signatures. VersionBLS = byte(2) )
const Length = 33
Length contains the length of an address (digest length = 32 + version byte length = 1).
Variables ¶
var Empty = Address{}
Empty represents the 0-value of an address and therefore represents the "empty" address value
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address represents an address in the IOTA ledger.
func FromBLSPubKey ¶
FromBLSPubKey creates an address from marshaled BLS public key unmarshaled BLS public key conforms to interface kyber.Point
func FromBase58 ¶
FromBase58 creates an address from a base58 encoded string.
func FromED25519PubKey ¶
FromED25519PubKey creates an address from an ed25519 public key.
func Parse ¶
func Parse(marshalUtil *marshalutil.MarshalUtil) (Address, error)
Parse is a wrapper for simplified unmarshaling of a byte stream using the marshalUtil package.
func Random ¶
func Random() (address Address)
Random creates a random address, which can for example be used in unit tests. first byte (version) is also random
func RandomOfType ¶
RandomOfType creates a random address with the given Version.
func (*Address) Digest ¶
Digest returns the digest part of an address (i.e. the hashed version of the ed25519 public key)-