Skip to main content

IAddress

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 interface IAddress : System.IEquatable`1[[IotaSdk.Address, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Implements IEquatable<Address>
Attributes NullableContextAttribute

Methods​

NextLexicographical()​

Returns the next digest in byte-increasing order.

Address NextLexicographical()

Returns​

Address

NextLexicographicalOpt()​

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

Address? NextLexicographicalOpt()

Returns​

Address?

ToBcs()​

Convert this type to BCS encoded bytes.

Byte[] ToBcs()

Returns​

Byte[]

Exceptions​

SdkFfiException

ToBytes()​

Byte[] ToBytes()

Returns​

Byte[]

ToCanonicalString(Boolean)​

Returns the string representation of this address using the canonical display, with or without a 0x prefix.

string ToCanonicalString(bool withPrefix)

Parameters​

withPrefix Boolean

Returns​

String

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.

string ToDisplayString()

Returns​

String

ToHex()​

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

string ToHex()

Returns​

String

ToJson()​

Convert this type to a JSON encoded string.

string ToJson()

Returns​

String

Exceptions​

SdkFfiException

ToRawHex()​

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

string ToRawHex()

Returns​

String

ToRawShortHex()​

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

string ToRawShortHex()

Returns​

String

ToShortHex()​

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

string ToShortHex()

Returns​

String