Skip to main content

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

An Address's BCS serialized form is defined by the following:

address = 32OCTET
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​

Address

NextLexicographicalOpt()​

Returns the next digest in byte-increasing order, or None if the result would overflow.

public Address? NextLexicographicalOpt()

Returns​

Address?

ToBytes()​

public Byte[] ToBytes()

Returns​

Byte[]

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​

String

ToHex()​

Returns the string representation of this address in hex format with 0x prefix.

public string ToHex()

Returns​

String

ToRawHex()​

Returns the string representation of this address in hex format without 0x prefix.

public string ToRawHex()

Returns​

String

ToRawShortHex()​

Returns the shortest possible string representation of the address (i.e. with leading zeroes trimmed), without 0x prefix.

public string ToRawShortHex()

Returns​

String

ToShortHex()​

Returns the shortest possible string representation of the address (i.e. with leading zeroes trimmed).

public string ToShortHex()

Returns​

String

ToString()​

public override string ToString()

Returns​

String

Equals(Address)​

public bool Equals(Address? other)

Parameters​

other Address?

Returns​

Boolean

Equals(Object)​

public override bool Equals(object? obj)

Parameters​

obj Object?

Returns​

Boolean

GetHashCode()​

public override int GetHashCode()

Returns​

Int32

AuthenticatorState()​

public static Address AuthenticatorState()

Returns​

Address

Clock()​

public static Address Clock()

Returns​

Address

DenyList()​

public static Address DenyList()

Returns​

Address

Framework()​

public static Address Framework()

Returns​

Address

FromBytes(Byte[])​

public static Address FromBytes(Byte[] bytes)

Parameters​

bytes Byte[]

Returns​

Address

Exceptions​

SdkFfiException

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​

Address

Exceptions​

SdkFfiException

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​

Address

Exceptions​

SdkFfiException

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​

Address

Exceptions​

SdkFfiException

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​

Address

Exceptions​

SdkFfiException

GenesisBridge()​

public static Address GenesisBridge()

Returns​

Address

GenesisIotaBridge()​

public static Address GenesisIotaBridge()

Returns​

Address

Max()​

public static Address Max()

Returns​

Address

Random()​

public static Address Random()

Returns​

Address

RandomnessState()​

public static Address RandomnessState()

Returns​

Address

Stardust()​

public static Address Stardust()

Returns​

Address

Std()​

public static Address Std()

Returns​

Address

System()​

public static Address System()

Returns​

Address

SystemState()​

public static Address SystemState()

Returns​

Address

TransactionDenyRules()​

public static Address TransactionDenyRules()

Returns​

Address

Zero()​

public static Address Zero()

Returns​

Address