Skip to content

AccountId (Class)

A Kaspa account identifier.

Wraps a hex-encoded account id. Can be constructed from a hex string or obtained from an AccountDescriptor.

__eq__

__eq__(other: object) -> bool

__new__

__new__(id: str) -> AccountId

Create a new AccountId from a hex string.

PARAMETER DESCRIPTION
id

Hex-encoded account id.

TYPE: str

RETURNS DESCRIPTION
AccountId

A new AccountId instance.

TYPE: AccountId

RAISES DESCRIPTION
Exception

If the hex string is invalid.

__repr__

__repr__() -> str

The detailed string representation.

RETURNS DESCRIPTION
str

The account id as a repr string.

TYPE: str

__str__

__str__() -> str

The hex string representation.

RETURNS DESCRIPTION
str

The account id as a hex string.

TYPE: str

to_hex

to_hex() -> str

Get the hex string representation.

RETURNS DESCRIPTION
str

The account id as a hex string.

TYPE: str