Accounts and Addresses¶
| Class | What it is | From |
|---|---|---|
MoneroAccount, MoneroSubaddress | an account, with its balance and its subaddresses, and a subaddress with its own | get_accounts, get_subaddresses |
MoneroAccountTag | a tag that groups accounts | get_account_tags |
MoneroIntegratedAddress | an address with a payment ID | get_integrated_address, decode_integrated_address |
MoneroDecodedAddress, MoneroAddressType | an address, with its network and its type: standard, integrated or subaddress | |
MoneroAddressBookEntry | an address saved in the wallet, with its description | get_address_book_entries |
MoneroAccount ¶
Bases: SerializableStruct
Models a Monero account.
balance instance-attribute ¶
The account balance.
index instance-attribute ¶
The account index.
primary_address instance-attribute ¶
The account primary address.
subaddresses instance-attribute ¶
List of account subaddresses.
tag instance-attribute ¶
The account tag.
unlocked_balance instance-attribute ¶
The account unlocked balance.
__init__() ¶
Initialize a Monero account.
deserialize(json) staticmethod ¶
Deserialize a MoneroAccount from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAccount in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAccount | deserialized instance. |
MoneroSubaddress ¶
Bases: SerializableStruct
Models a Monero subaddress.
account_index instance-attribute ¶
The subaddress account index.
address instance-attribute ¶
Public address.
balance instance-attribute ¶
The subaddress balance.
index instance-attribute ¶
The subaddress index.
is_used instance-attribute ¶
Indicates if subaddress has been used in receiving funds.
label instance-attribute ¶
The subaddress label.
num_blocks_to_unlock instance-attribute ¶
Number of blocks to unlock received outputs.
num_unspent_outputs instance-attribute ¶
The number of unspent outputs in this subaddress.
unlocked_balance instance-attribute ¶
The subaddress unlocked balance.
__init__() ¶
Initialize a Monero subaddress.
deserialize(json) staticmethod ¶
Deserialize a MoneroSubaddress from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroSubaddress in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | deserialized instance. |
MoneroAccountTag ¶
Bases: SerializableStruct
Models a Monero account tag.
account_indices instance-attribute ¶
Account indices with this tag.
label instance-attribute ¶
The account tag label.
tag instance-attribute ¶
The account tag.
__init__(*args, **kwargs) ¶
__init__() -> None
__init__(tag: str, label: str) -> None
__init__(
tag: str, label: str, account_indices: list[int]
) -> None
Initialize a new Monero account tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag | str | Account tag. | required |
label | str | Account label. | required |
account_indices | list[int] | Account indices. | required |
deserialize(json) staticmethod ¶
Deserialize a MoneroAccountTag from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAccountTag in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAccountTag | deserialized instance. |
MoneroIntegratedAddress ¶
Bases: SerializableStruct
Models a Monero integrated address.
integrated_address instance-attribute ¶
The integrated address.
payment_id instance-attribute ¶
The payment id related to this integrated address.
standard_address instance-attribute ¶
The standard address related to this integrated address.
__init__() ¶
Initialize a Monero integrated address.
deserialize(json) staticmethod ¶
Deserialize a MoneroIntegratedAddress from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroIntegratedAddress in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | deserialized instance. |
MoneroDecodedAddress ¶
Bases: SerializableStruct
Maintains metadata for a decoded address.
address instance-attribute ¶
The decoded address.
address_type instance-attribute ¶
Type of the decoded address.
network_type instance-attribute ¶
Network type of the decoded address.
__init__(*args, **kwargs) ¶
__init__() -> None
__init__(
address: str,
address_type: MoneroAddressType,
network_type: MoneroNetworkType,
) -> None
__init__(): Initialize an empty Monero decoded address.__init__(address, address_type, network_type): Initialize a Monero decoded address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | The decoded address. | required |
address_type | MoneroAddressType | The type of the decoded address. | required |
network_type | MoneroNetworkType | Network type of the decoded address. | required |
deserialize(json) staticmethod ¶
Deserialize a MoneroDecodedAddress from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDecodedAddress in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDecodedAddress | deserialized instance. |
MoneroAddressType ¶
Bases: IntEnum
Models a Monero public address type.
INTEGRATED_ADDRESS = 1 class-attribute instance-attribute ¶
1 Indicates that the Monero address format is integrated.
PRIMARY_ADDRESS = 0 class-attribute instance-attribute ¶
0 Indicates that the Monero address format is standard, also known as primary.
SUBADDRESS = 2 class-attribute instance-attribute ¶
2 Indicates that the Monero address format is subaddress.
MoneroAddressBookEntry ¶
Bases: SerializableStruct
Monero address book entry model.
address instance-attribute ¶
The book entry address.
description instance-attribute ¶
The book entry description.
index instance-attribute ¶
The book entry index.
payment_id instance-attribute ¶
The book entry payment id.
__init__(*args, **kwargs) ¶
__init__() -> None
__init__(
index: int, address: str, description: str
) -> None
__init__(
index: int,
address: str,
description: str,
payment_id: str,
) -> None
__init__(): Initialize an empty Monero address book entry.__init__(index, address, description): Initialize a Monero address book entry.__init__(index, address, description, payment_id): Initialize a Monero address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | The book entry index. | required |
address | str | The book entry address. | required |
description | str | The book entry description. | required |
payment_id | str | The book entry payment id. | required |
deserialize(json) staticmethod ¶
Deserialize a MoneroAddressBookEntry from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAddressBookEntry in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAddressBookEntry | deserialized instance. |