---
title: "Class: Address"
canonical_url: "https://nimiq.dev/web-client/reference/classes/address"
---
# Class: Address

[@nimiq/core](../globals) / Address

Defined in: @nimiq/core/types/wasm/web.d.ts:667

An object representing a Nimiq address.
Offers methods to parse and format addresses from and to strings.

## Constructors

### Constructor

> **new Address**(`bytes`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:708

#### Parameters

##### bytes

`Uint8Array`

#### Returns

`Address`

## Properties

### NULL

> `readonly` `static` **NULL**: `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:728

The all-zeroes burn address.

## Methods

### __getClassname()

> **__getClassname**(): `string`

Defined in: @nimiq/core/types/wasm/web.d.ts:670

#### Returns

`string`

---

### [dispose]()

> **[dispose]**(): `void`

Defined in: @nimiq/core/types/wasm/web.d.ts:669

#### Returns

`void`

---

### compare()

> **compare**(`other`): `number`

Defined in: @nimiq/core/types/wasm/web.d.ts:677

Compares this address to the other address.

Returns -1 if this address is smaller than the other address, 0 if they are equal,
and 1 if this address is larger than the other address.

#### Parameters

##### other

`Address`

#### Returns

`number`

---

### equals()

> **equals**(`other`): `boolean`

Defined in: @nimiq/core/types/wasm/web.d.ts:685

Returns if this address is equal to the other address.

#### Parameters

##### other

`Address`

#### Returns

`boolean`

---

### free()

> **free**(): `void`

Defined in: @nimiq/core/types/wasm/web.d.ts:668

#### Returns

`void`

---

### serialize()

> **serialize**(): `Uint8Array`

Defined in: @nimiq/core/types/wasm/web.d.ts:712

Returns the byte representation of the address.

#### Returns

`Uint8Array`

---

### toHex()

> **toHex**(): `string`

Defined in: @nimiq/core/types/wasm/web.d.ts:716

Formats the address into hex format.

#### Returns

`string`

---

### toPlain()

> **toPlain**(): `string`

Defined in: @nimiq/core/types/wasm/web.d.ts:720

Formats the address into a plain string format.

#### Returns

`string`

---

### toUserFriendlyAddress()

> **toUserFriendlyAddress**(): `string`

Defined in: @nimiq/core/types/wasm/web.d.ts:724

Formats the address into user-friendly IBAN format.

#### Returns

`string`

---

### deserialize()

> `static` **deserialize**(`bytes`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:681

Deserializes an address from a byte array.

#### Parameters

##### bytes

`Uint8Array`

#### Returns

`Address`

---

### fromAny()

> `static` **fromAny**(`addr`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:691

Parses an address from an Address instance, a hex string representation, or a byte array.

Throws when an address cannot be parsed from the argument.

#### Parameters

##### addr

`string` | `Address` | `Uint8Array`<`ArrayBufferLike`>

#### Returns

`Address`

---

### fromPublicKeys()

> `static` **fromPublicKeys**(`public_keys`, `num_signers`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:695

Computes the multisig address of a list of signer public keys.

#### Parameters

##### public_keys

(`string` | `Uint8Array`<`ArrayBufferLike`> | [`PublicKey`](PublicKey))<span>



</span>



##### num_signers

`number`

#### Returns

`Address`

---

### fromString()

> `static` **fromString**(`str`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:701

Parses an address from a string representation, either user-friendly or hex format.

Throws when an address cannot be parsed from the string.

#### Parameters

##### str

`string`

#### Returns

`Address`

---

### fromUserFriendlyAddress()

> `static` **fromUserFriendlyAddress**(`str`): `Address`

Defined in: @nimiq/core/types/wasm/web.d.ts:707

Parses an address from its user-friendly string representation.

Throws when an address cannot be parsed from the string.

#### Parameters

##### str

`string`

#### Returns

`Address`


## Sitemap

See the full [sitemap](https://nimiq.dev/sitemap.md) for all pages.
