Skip to content

@aldea/sdk / Exports / Address

Class: Address

Aldea address

An address is a 20 byte blake3 hash of a public key. It is encoded as a string using Bech32m with the prefix addr.

Example:

addr1w9er02jhjq5yxzuc9n6fjqqq8nhqpuhsxe2kfp

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Address(hash): Address

Parameters

NameType
hashUint8Array

Returns

Address

Defined in

packages/core/dist/address.d.ts:14

Properties

hash

Readonly hash: Uint8Array

Defined in

packages/core/dist/address.d.ts:13

Methods

equals

equals(other): boolean

Parameters

NameType
otherAddress

Returns

boolean

Defined in

packages/core/dist/address.d.ts:27


toString

toString(): string

Encodes the Address into a string.

Returns

string

Defined in

packages/core/dist/address.d.ts:26


fromPubKey

fromPubKey(pubKey): Address

Returns an Address from the given PubKey.

Parameters

NameType
pubKeyPubKey

Returns

Address

Defined in

packages/core/dist/address.d.ts:18


fromString

fromString(str): Address

Returns an Address from the encoded string.

Parameters

NameType
strstring

Returns

Address

Defined in

packages/core/dist/address.d.ts:22