Address
Namespace: IotaSdk
Unique identifier for an Account on the IOTA blockchain.
An Address is a 32-byte pseudonymous identifier used to uniquely identify an account and
asset-ownership on the IOTA blockchain. Often, human-readable addresses are encoded in
hexadecimal with a 0x prefix. For example, this is a valid IOTA address:
0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331.
Deriving an Address
Addresses are cryptographically derived from a number of user account authenticators, the
simplest of which is an Ed25519PublicKey.
Deriving an address consists of the Blake2b256 hash of the sequence of bytes of its
corresponding authenticator, prefixed with a domain-separator (except ed25519, for compatibility
reasons). For each other authenticator, this domain-separator is the single byte-value of its
SignatureScheme flag. E.g. hash(signature schema flag || authenticator bytes).
Each authenticator has a method for deriving its Address as well as documentation for the
specifics of how the derivation is done. See Ed25519PublicKey::derive_address for an example.
Relationship to ObjectIds
ObjectIds and Addresses share the same 32-byte addressable space but are derived leveraging
different domain-separator values to ensure that, cryptographically, there won't be any overlap,
e.g. there can't be a valid Object who's ObjectId is equal to that of the Address of a
user account.
BCS
The BCS serialized form of this type is specified in
bcs-schema.abnf.
public class Address : IAddress, System.IEquatable`1[[IotaSdk.Address, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable
Inheritance Object → Address
Implements IAddress, IEquatable<Address>, IDisposable
Attributes NullableContextAttribute, NullableAttribute
Constructors
Address(UInt64)
public Address(ulong pointer)
Parameters
pointer UInt64
Methods
Destroy()
public void Destroy()
Dispose()
public void Dispose()
NextLexicographical()
Returns the next digest in byte-increasing order.
public Address NextLexicographical()
Returns
NextLexicographicalOpt()
Returns the next digest in byte-increasing order, or None if the result would overflow.
public Address? NextLexicographicalOpt()
Returns
ToBcs()
Convert this type to BCS encoded bytes.
public Byte[] ToBcs()
Returns
Exceptions
ToBytes()
public Byte[] ToBytes()
Returns
ToCanonicalString(Boolean)
Returns the string representation of this address using the canonical display, with or
without a 0x prefix.
public string ToCanonicalString(bool withPrefix)
Parameters
withPrefix Boolean
Returns
ToDisplayString()
Render this type as human-readable text.
Some types also print this through the binding's native string conversion; this method is the spelling every object type has.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.
public string ToDisplayString()
Returns
ToHex()
Returns the string representation of this address in hex format with 0x prefix.
public string ToHex()
Returns
ToJson()
Convert this type to a JSON encoded string.
public string ToJson()
Returns
Exceptions
ToRawHex()
Returns the string representation of this address in hex format without 0x prefix.
public string ToRawHex()
Returns
ToRawShortHex()
Returns the shortest possible string representation of the address (i.e. with leading zeroes
trimmed), without 0x prefix.
public string ToRawShortHex()
Returns
ToShortHex()
Returns the shortest possible string representation of the address (i.e. with leading zeroes trimmed).
public string ToShortHex()
Returns
ToString()
public override string ToString()
Returns
Equals(Address)
public bool Equals(Address? other)
Parameters
other Address?
Returns
Equals(Object)
public override bool Equals(object? obj)
Parameters
obj Object?
Returns
GetHashCode()
public override int GetHashCode()
Returns
AuthenticatorState()
public static Address AuthenticatorState()
Returns
Clock()
public static Address Clock()
Returns
DenyList()
public static Address DenyList()
Returns
Framework()
public static Address Framework()
Returns
FromBcs(Byte[])
Create this type from BCS encoded bytes.
public static Address FromBcs(Byte[] bcs)
Parameters
bcs Byte[]
Returns
Exceptions
FromBytes(Byte[])
public static Address FromBytes(Byte[] bytes)
Parameters
bytes Byte[]
Returns
Exceptions
FromHex(String)
Parses an Address from a full-length hex string (64 hex characters), with or without a 0x
prefix. Will return an error if the string is not exactly 64 hex characters long (excluding
the 0x prefix).
public static Address FromHex(string hex)
Parameters
hex String
Returns
Exceptions
FromJson(String)
Create this type from a JSON encoded string.
public static Address FromJson(string json)
Parameters
json String
Returns
Exceptions
FromPrefixedHex(String)
Parses an Address from a full-length hex string (64 hex characters), with a mandatory 0x
prefix. Will return an error if the string is not exactly 64 hex characters long (excluding
the 0x prefix).
public static Address FromPrefixedHex(string hex)
Parameters
hex String
Returns
Exceptions
FromPrefixedShortHex(String)
Parses an Address from a hex string with a mandatory 0x prefix. The string can be of
variable length; if it's shorter than 64 hex characters, it will be left-padded with 0s.
public static Address FromPrefixedShortHex(string hex)
Parameters
hex String
Returns
Exceptions
FromRawHex(String)
Parses an Address from a full-length hex string (64 hex characters), without a 0x prefix.
Will return an error if the string has a 0x prefix or is not exactly 64 hex characters
long.
public static Address FromRawHex(string hex)
Parameters
hex String
Returns
Exceptions
FromRawShortHex(String)
Parses an Address from a hex string without a 0x prefix.
The string can be of variable length; if it's shorter than 64 hex characters, it will be
left-padded with 0s. Will return an error if the string has a 0x prefix.
public static Address FromRawShortHex(string hex)
Parameters
hex String
Returns
Exceptions
FromShortHex(String)
Parses an Address from a hex string, with or without a 0x prefix. The string can be of
variable length; if it's shorter than 64 hex characters, it will be left-padded with 0s.
public static Address FromShortHex(string hex)
Parameters
hex String
Returns
Exceptions
GenesisBridge()
public static Address GenesisBridge()
Returns
GenesisIotaBridge()
public static Address GenesisIotaBridge()
Returns
Max()
public static Address Max()
Returns
Random()
public static Address Random()
Returns
RandomnessState()
public static Address RandomnessState()
Returns
Stardust()
public static Address Stardust()
Returns
Std()
public static Address Std()
Returns
System()
public static Address System()
Returns
SystemState()
public static Address SystemState()
Returns
TransactionDenyRules()
public static Address TransactionDenyRules()
Returns
Zero()
public static Address Zero()