AccountId (Class)¶
A Kaspa account identifier.
Wraps a hex-encoded account id. Can be constructed from a hex string or obtained from an AccountDescriptor.
__new__
¶
__new__(id: str) -> AccountId
Create a new AccountId from a hex string.
| PARAMETER | DESCRIPTION |
|---|---|
id
|
Hex-encoded account id.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AccountId
|
A new AccountId instance.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
Exception
|
If the hex string is invalid. |
__repr__
¶
The detailed string representation.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The account id as a repr string.
TYPE:
|
__str__
¶
The hex string representation.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The account id as a hex string.
TYPE:
|
to_hex
¶
Get the hex string representation.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The account id as a hex string.
TYPE:
|