コンテンツにスキップ

Address⚓︎

Address
Represents a Symbol address.

Extends⚓︎

Constructors⚓︎

new Address()⚓︎

new Address(addressInput): Address

Creates a Symbol address.

Parameters⚓︎

Parameter Type Description
addressInput string | Uint8Array<ArrayBufferLike> | Address Input string, byte array or address.

Returns⚓︎

Address

Overrides⚓︎

ByteArray.constructor

Properties⚓︎

Property Modifier Type Description Inherited from
bytes public Uint8Array Underlying bytes. ByteArray.bytes
ENCODED_SIZE static number Length of encoded address string. -
NAME static string Byte array name (required because constructor.name is dropped during minification). ByteArray.NAME
SIZE static number Byte size of raw address. -

Methods⚓︎

toJson()⚓︎

toJson(): string

Address.toJson
Returns representation of this object that can be stored in JSON.

Returns⚓︎

string

JSON-safe representation of this object.

Inherited from⚓︎

ByteArray.toJson


toNamespaceId()⚓︎

toNamespaceId(): 
  | undefined
  | NamespaceId

Address.toNamespaceId
Attempts to convert this address into a namespace id.

Returns⚓︎

| undefined | NamespaceId

Namespace id if this adresss is an alias, undefined otherwise.


toString()⚓︎

toString(): string

Address.toString
Returns string representation of this object.

Returns⚓︎

string

String representation of this object

Inherited from⚓︎

ByteArray.toString


fromDecodedAddressHexString()⚓︎

static fromDecodedAddressHexString(hexString): Address

Address.fromDecodedAddressHexString
Creates an address from a decoded address hex string (typically from REST).

Parameters⚓︎

Parameter Type Description
hexString string Decoded address hex string.

Returns⚓︎

Address

Equivalent address.


fromNamespaceId()⚓︎

static fromNamespaceId(namespaceId, networkIdentifier): Address

Address.fromNamespaceId
Creates an address from a namespace id.

Parameters⚓︎

Parameter Type Description
namespaceId NamespaceId Namespace id.
networkIdentifier number Network identifier byte.

Returns⚓︎

Address

Address referencing namespace id.