Wallet Data Model¶
MoneroWalletConfig ¶
Bases: SerializableStruct
Configures a wallet to create.
account_lookahead: int | None instance-attribute ¶
Account index look ahead.
is_multisig: bool | None instance-attribute ¶
Indicates if the wallet is a multisignature wallet.
is_trusted_daemon: bool | None instance-attribute ¶
Indicates whether the configured daemon connection should be treated as trusted.
language: str | None instance-attribute ¶
The wallet language.
network_type: MoneroNetworkType | None instance-attribute ¶
The wallet network type.
password: str | None instance-attribute ¶
The wallet password.
path: str | None instance-attribute ¶
The wallet path on file system.
primary_address: str | None instance-attribute ¶
The wallet standard address.
private_spend_key: str | None instance-attribute ¶
The wallet private spend key.
private_view_key: str | None instance-attribute ¶
The wallet private view key.
regtest: bool | None instance-attribute ¶
Indicates if wallet is regtest.
restore_height: int | None instance-attribute ¶
The wallet restore height.
save_current: bool | None instance-attribute ¶
Save the wallet.
seed: str | None instance-attribute ¶
The wallet mnemonic.
seed_offset: str | None instance-attribute ¶
The wallet custom seed offset.
server: MoneroRpcConnection | None instance-attribute ¶
The wallet RPC connection.
subaddress_lookahead: int | None instance-attribute ¶
Subaddress index look ahead.
copy() ¶
deserialize(config_json) staticmethod ¶
Deserialize a Monero wallet config from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_json | str | JSON string. | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletConfig | The deserialized wallet config. |
MoneroSyncResult ¶
Bases: SerializableStruct
Models a result of syncing a wallet.
num_blocks_fetched: int instance-attribute ¶
Number of blocks fetched.
received_money: bool instance-attribute ¶
Indicates if money was received.
deserialize(json) staticmethod ¶
Deserialize a MoneroSyncResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroSyncResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroSyncResult | deserialized instance. |
MoneroSubaddress ¶
Bases: SerializableStruct
Models a Monero subaddress.
account_index: int | None instance-attribute ¶
The subaddress account index.
address: str | None instance-attribute ¶
Public address.
balance: int | None instance-attribute ¶
The subaddress balance.
index: int | None instance-attribute ¶
The subaddress index.
is_used: bool | None instance-attribute ¶
Indicates if subaddress has been used in receiving funds.
label: str | None instance-attribute ¶
The subaddress label.
num_blocks_to_unlock: int | None instance-attribute ¶
Number of blocks to unlock receveid outputs.
num_unspent_outputs: int | None instance-attribute ¶
The number of unspent outputs in this subaddress.
unlocked_balance: int | None 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. |
MoneroAccount ¶
Bases: SerializableStruct
Models a Monero account.
balance: int | None instance-attribute ¶
The account balance.
index: int | None instance-attribute ¶
The account index.
primary_address: str | None instance-attribute ¶
The account primary address.
subaddresses: list[MoneroSubaddress] instance-attribute ¶
List of account subaddresses.
tag: str | None instance-attribute ¶
The account tag.
unlocked_balance: int | None 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. |
MoneroDestination ¶
Bases: SerializableStruct
Models an outgoing transfer destination.
address: str | None instance-attribute ¶
Address of the receiver.
amount: int | None instance-attribute ¶
Amount sent to this destination.
copy() ¶
Copy current outgoing transfer destination.
Returns:
| Type | Description |
|---|---|
MoneroDestination | outgoing transfer destination copy. |
deserialize(json) staticmethod ¶
Deserialize a MoneroDestination from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDestination in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDestination | deserialized instance. |
MoneroTransfer ¶
Bases: SerializableStruct
Models a base transfer of funds to or from the wallet.
account_index: int | None instance-attribute ¶
Index of the account related to this transfer.
amount: int | None instance-attribute ¶
Transfer amount in atomic-units.
tx: MoneroTxWallet instance-attribute ¶
Related wallet transaction.
__init__() ¶
Initialize a Monero transfer.
copy() ¶
is_incoming() ¶
Indicates if it is an incoming transfer (True) or not (False). Default None.
Returns:
| Type | Description |
|---|---|
bool | None |
|
is_outgoing() ¶
Indicates if it is an outgoing transfer (True) or not (False). Default None.
Returns:
| Type | Description |
|---|---|
bool | None |
|
merge(other) ¶
Merge current transfer with another one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroTransfer | other transfer to merge with. | required |
MoneroIncomingTransfer ¶
Bases: MoneroTransfer
Models an incoming transfer of funds to the wallet.
address: str | None instance-attribute ¶
The address that received funds within this transfer.
num_suggested_confirmations: int | None instance-attribute ¶
The number of suggested confirmations before moving funds.
subaddress_index: int | None instance-attribute ¶
The subaddress index that received funds within this transfer.
__init__() ¶
Initialize a Monero incoming transfer.
__lt__(other) ¶
Compare this incoming transfer to another by ascending tx height, then account index, then subaddress index (see IncomingTransferComparator).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroIncomingTransfer | transfer to compare against. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
copy() ¶
Copy current incoming transfer.
Returns:
| Type | Description |
|---|---|
MoneroIncomingTransfer | incoming transfer copy. |
deserialize(json) staticmethod ¶
Deserialize a MoneroIncomingTransfer from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroIncomingTransfer in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroIncomingTransfer | deserialized instance. |
MoneroOutgoingTransfer ¶
Bases: MoneroTransfer
Models an outgoing transfer of funds from the wallet.
addresses: list[str] instance-attribute ¶
Addresses from which the transfer originated.
destinations: list[MoneroDestination] instance-attribute ¶
Outgoing transfer destinations.
subaddress_indices: list[int] instance-attribute ¶
Subaddresses from which the transfer originated.
copy() ¶
Copy current outgoing transfer.
Returns:
| Type | Description |
|---|---|
MoneroOutgoingTransfer | outgoing transfer copy. |
deserialize(json) staticmethod ¶
Deserialize a MoneroOutgoingTransfer from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutgoingTransfer in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutgoingTransfer | deserialized instance. |
MoneroTransferQuery ¶
Bases: MoneroTransfer
Configures a query to retrieve transfers.
All transfers are returned except those that do not meet the criteria defined in this query.
address: str | None instance-attribute ¶
Select transfers involving particular address. Empty for all.
addresses: list[str] instance-attribute ¶
Select transfers involving particular addresses. Empty for all.
destinations: list[MoneroDestination] instance-attribute ¶
Select transfers involving particular destinations. Empty for all.
has_destinations: bool | None instance-attribute ¶
Filter transfers with or without destinations. None for all.
incoming: bool | None instance-attribute ¶
Filter incoming or outgoing transfers. None for all.
outgoing: bool | None instance-attribute ¶
Filter incoming or outgoing transfers. None for all.
subaddress_index: int | None instance-attribute ¶
Filter by subaddress index. None for all.
subaddress_indices: list[int] instance-attribute ¶
Select transfers involving particular subaddresses. Empty for all.
tx_query: MoneroTxQuery | None instance-attribute ¶
Related transaction query.
__init__() ¶
Initialize a Monero transfer query.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroTransferQuery from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroTransferQuery in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTransferQuery | deserialized instance. |
deserialize_from_block(transfer_query_json) staticmethod ¶
Deserialize transfer query from json block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transfer_query_json | str | json block with serialized transfer query. | required |
Returns:
| Type | Description |
|---|---|
MoneroTransferQuery | deserialized transfer query. |
meets_criteria(transfer, query_parent=True) ¶
Check if transfer meets all the criteria defined in this query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transfer | MoneroTransfer | transfer to check if meets criteria. | required |
query_parent | bool | query parent tx query (default | True |
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroOutputWallet ¶
Bases: MoneroOutput
Models a Monero output with wallet extensions.
account_index: int | None instance-attribute ¶
The index of the account that owns this output.
is_frozen: bool | None instance-attribute ¶
Indicates if the output is frozen (True) or not (False).
is_spent: bool | None instance-attribute ¶
Indicates if the output is spent (True) or not (False).
subaddress_index: int | None instance-attribute ¶
The index of the subaddress that owns this output.
__init__() ¶
Initialize a Monero wallet output.
__lt__(other) ¶
Compare this output to another by ascending tx height, then account index, subaddress index, output index and key image hex (see OutputComparator).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroOutputWallet | output to compare against. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroOutputWallet from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutputWallet in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutputWallet | deserialized instance. |
MoneroOutputQuery ¶
Bases: MoneroOutputWallet
Configures a query to retrieve wallet outputs (i.e. outputs that the wallet has or had the ability to spend).
All outputs are returned except those that do not meet the criteria defined in this query.
max_amount: int | None instance-attribute ¶
Filter outputs above this amount.
min_amount: int | None instance-attribute ¶
Filter outputs below this amount.
subaddress_indices: list[int] instance-attribute ¶
Subadress indices to select (empty for all).
tx_query: MoneroTxQuery | None property ¶
Related transaction query.
__init__() ¶
Initialize a Monero output query.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroOutputQuery from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutputQuery in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutputQuery | deserialized instance. |
deserialize_from_block(output_query_json) staticmethod ¶
Deserialize output query from block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_query_json | str | json query block. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutputQuery | deserialized output query. |
meets_criteria(output, query_parent=True) ¶
Indicates if the output meets all the criteria defined within this query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output | MoneroOutputWallet | Output to check. | required |
query_parent | bool | Query also parent. | True |
Returns:
| Type | Description |
|---|---|
bool |
|
set_tx_query(tx_query, output_query) ¶
Set related transaction query.
This method sets query references constitutively.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_query | Optional[MoneroTxQuery] | Tx query to set. | required |
output_query | bool | If | required |
MoneroTxWallet ¶
Bases: MoneroTx
Models a Monero transaction in the context of a wallet.
change_address: str | None instance-attribute ¶
Address to which the change amount of the transaction was sent.
change_amount: int | None instance-attribute ¶
Change amount of the transaction.
extra_hex: str | None instance-attribute ¶
Extra information about the transaction in hexadecimal format.
incoming_transfers: list[MoneroIncomingTransfer] instance-attribute ¶
List of incoming transfer.
input_sum: int | None instance-attribute ¶
Total input sum.
is_incoming: bool | None instance-attribute ¶
Indicates if the transaction has incoming transfers.
is_outgoing: bool | None instance-attribute ¶
Indicated if the transaction has outgoing transfer.
note: str | None instance-attribute ¶
Transaction note.
num_dummy_outputs: int | None instance-attribute ¶
Number of decoys of the transactions.
outgoing_transfer: MoneroOutgoingTransfer | None instance-attribute ¶
The outgoing transfer related to this transaction.
output_sum: int | None instance-attribute ¶
The total output amount sum originated from this transaction.
tx_set: MoneroTxSet | None instance-attribute ¶
Set of transactions related to current tx.
__init__() ¶
Initialize a new Monero tx wallet.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroTxWallet from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroTxWallet in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | deserialized instance. |
filter_inputs_wallet(query) ¶
Filter this tx's inputs in place, keeping only those that meet the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query | MoneroOutputQuery | query to filter inputs with. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputWallet] | inputs that meet all criteria defined in |
filter_outputs_wallet(query) ¶
Get outputs filtered by query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query | MoneroOutputQuery | query to filter outputs with. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputWallet] | outputs that meets all criteria defined in |
filter_transfers(query) ¶
Get transfers filtered by query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query | MoneroTransferQuery | query to filter transfers with. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroTransfer] | transfers that meets all criteria defined in |
get_incoming_amount() ¶
Get total amount received in current tx.
Returns:
| Type | Description |
|---|---|
int | total amount received in current wallet tx. |
get_outgoing_amount() ¶
Get total amount spent in current tx.
Returns:
| Type | Description |
|---|---|
int | total amount spent in current wallet tx. |
MoneroTxQuery ¶
Bases: MoneroTxWallet
Configures a query to retrieve transactions.
All transactions are returned except those that do not meet the criteria defined in this query.
has_payment_id: bool | None instance-attribute ¶
Get transactions that have a payment id.
hashes: list[str] instance-attribute ¶
Get transactions by hashes.
height: int | None instance-attribute ¶
Get transactions by height.
include_outputs: int | None instance-attribute ¶
Include outputs in transaction data.
input_query: MoneroOutputQuery | None instance-attribute ¶
Query to apply on transaction inputs.
is_incoming: bool | None instance-attribute ¶
Include incoming transactions.
is_outgoing: bool | None instance-attribute ¶
Include outgoing transactions.
max_height: int | None instance-attribute ¶
Get transactions below max height.
min_height: int | None instance-attribute ¶
Get transactions above max height.
output_query: MoneroOutputQuery | None instance-attribute ¶
Query to apply on transaction outputs.
payment_ids: list[str] instance-attribute ¶
Get transactions with specific payment ids.
transfer_query: MoneroTransferQuery | None instance-attribute ¶
Query to apply on transaction wallet transfer.
__init__() ¶
Initiliaze a new Monero transaction query.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroTxQuery from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroTxQuery in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxQuery | deserialized instance. |
deserialize_from_block(tx_query_json) staticmethod ¶
Deserialize transaction query from JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_query_json | str | tx query as JSON string. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxQuery | deserialized tx query. |
meets_criteria(tx, query_children=False) ¶
Check if transaction wallet meets all criteria defined in this query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx | MoneroTxWallet | Tx to check if meets criteria defined in this query. | required |
query_children | bool | Query child data. | False |
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroTxSet ¶
Bases: SerializableStruct
Groups transactions who share common hex data which is needed in order to sign and submit the transactions.
For example, multisig transactions created from create_txs() share a common hex string which is needed in order to sign and submit the multisig transactions.
multisig_tx_hex: str | None instance-attribute ¶
Serialized multisig transaction data produced when a multisig wallet creates transactions; passed to the other cosigners' MoneroWallet.sign_multisig_tx_hex() and finally to submit_multisig_tx_hex() once enough signatures are collected.
signed_tx_hex: str | None instance-attribute ¶
Serialized fully-signed transaction data returned by MoneroWallet.sign_txs() on the offline spend wallet; pass it to submit_txs() on an online wallet to broadcast.
txs: list[MoneroTxWallet] instance-attribute ¶
The structured transactions in this set (populated when the set is created locally or by describe_tx_set()).
unsigned_tx_hex: str | None instance-attribute ¶
Serialized unsigned transaction data produced by a view-only wallet's create_tx() / create_txs(); transfer it to the offline spend wallet and call MoneroWallet.sign_txs().
__init__() ¶
Initialize a Monero transaction set.
deserialize(tx_set_json) staticmethod ¶
Deserialize a Monero transaction set from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_set_json | str | tx set as JSON string. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | The deseriliazed transaction set. |
MoneroIntegratedAddress ¶
Bases: SerializableStruct
Models a Monero integrated address.
integrated_address: str instance-attribute ¶
The integrated address.
payment_id: str instance-attribute ¶
The payment id related to this integrated address.
standard_address: str 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. |
MoneroTxPriority ¶
Bases: IntEnum
Enumerates Monero transaction priorities.
DEFAULT = 0 class-attribute instance-attribute ¶
0 Default transaction priority.
ELEVATED = 3 class-attribute instance-attribute ¶
3 Elevated transaction priority.
NORMAL = 2 class-attribute instance-attribute ¶
2 Normal transaction priority.
UNIMPORTANT = 1 class-attribute instance-attribute ¶
1 Unimportant transaction priority.
MoneroTxConfig ¶
Bases: SerializableStruct
Configures a transaction to send, sweep, or create a payment URI.
account_index: int | None instance-attribute ¶
Account index to send funds from.
address: str | None instance-attribute ¶
Transaction address destination.
amount: int | None instance-attribute ¶
Transaction amount.
below_amount: int | None instance-attribute ¶
Ignore output amount below.
can_split: bool | None instance-attribute ¶
Indicates if transaction can be splitted in multiple transactions.
destinations: list[MoneroDestination] instance-attribute ¶
Transaction outgoing destinations.
fee: int | None instance-attribute ¶
Transaction fee.
key_image: str | None instance-attribute ¶
Use a particular key image as input for transaction.
note: str | None instance-attribute ¶
Transaction note.
payment_id: str | None instance-attribute ¶
Transaction payment id.
priority: MoneroTxPriority | None instance-attribute ¶
Transaction priority.
recipient_name: str | None instance-attribute ¶
Recipient name.
relay: bool | None instance-attribute ¶
Indicates if transaction should be relayed (True) or not (False).
ring_size: int | None instance-attribute ¶
Transaction ring size
subaddress_indices: list[int] instance-attribute ¶
Account subaddresses indices to send funds from.
subtract_fee_from: list[int] instance-attribute ¶
Subtract fee from outputs.
sweep_each_subaddress: bool | None instance-attribute ¶
Sweep each wallet subbaddress.
copy() ¶
deserialize(config_json) staticmethod ¶
Deserialize tx config from JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_json | str | tx config in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxConfig | deserialized tx config. |
get_normalized_destinations() ¶
Get all destinations set in current tx config.
Returns:
| Type | Description |
|---|---|
list[MoneroDestination] | normalized tx config destinations. |
set_address(address) ¶
Set the address of a single-destination configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | the address to set for the single destination. | required |
MoneroKeyImageExportResult ¶
Bases: SerializableStruct
Models results from exporting key images.
key_images: list[MoneroKeyImage] instance-attribute ¶
The exported key images, one per owned output starting at offset.
offset: int | None instance-attribute ¶
Index of the first exported key image within the wallet's list of owned outputs.
On an incremental export (all=False) the wallet skips outputs whose key images were already exported, so this offset tells the importing wallet where in its own output list the returned key images begin. Pass it back as the offset argument of MoneroWallet.import_key_images().
__init__() ¶
Initialize a Monero key image export result.
deserialize(json) staticmethod ¶
Deserialize a MoneroKeyImageExportResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroKeyImageExportResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageExportResult | deserialized instance. |
MoneroKeyImageImportResult ¶
Bases: SerializableStruct
Models results from importing key images.
height: int | None instance-attribute ¶
Height at which the last key image was imported. Can be 0 if blockchain height is not known.
spent_amount: int | None instance-attribute ¶
Amount (in atomic-units) spent from those key images.
unspent_amount: int | None instance-attribute ¶
Amount (in atomic-units) still available from those key images.
__init__() ¶
Initialize a Monero key image import result.
deserialize(json) staticmethod ¶
Deserialize a MoneroKeyImageImportResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroKeyImageImportResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageImportResult | deserialized instance. |
MoneroMessageSignatureType ¶
Bases: IntEnum
Enumerates the type of a Monero message signature.
SIGN_WITH_SPEND_KEY = 0 class-attribute instance-attribute ¶
0 Indicates that the message verification was signed with the wallet private spend key_.
.. _private spend key: https://docs.getmonero.org/cryptography/asymmetric/private-key/#private-spend-key
SIGN_WITH_VIEW_KEY = 1 class-attribute instance-attribute ¶
1 Indicates that the message verification was signed with the wallet private view key_.
.. _private view key: https://docs.getmonero.org/cryptography/asymmetric/private-key/#private-spend-key
MoneroMessageSignatureResult ¶
Bases: SerializableStruct
Models results from message verification.
is_good: bool instance-attribute ¶
Indicates if the message verification was successful.
is_old: bool instance-attribute ¶
Indicates if the message verification used old monero software.
signature_type: MoneroMessageSignatureType instance-attribute ¶
Signature type used in the message verification.
version: int instance-attribute ¶
Message signature version.
__init__() ¶
Initialize a Monero message signature result.
deserialize(json) staticmethod ¶
Deserialize a MoneroMessageSignatureResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMessageSignatureResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMessageSignatureResult | deserialized instance. |
MoneroCheck ¶
Bases: SerializableStruct
Base model for results from checking a transaction or reserve proof.
is_good: bool instance-attribute ¶
Indicates if check was successfull.
__init__() ¶
Initialize a Monero check.
deserialize(json) staticmethod ¶
Deserialize a MoneroCheck from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroCheck in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheck | deserialized instance. |
MoneroCheckTx ¶
Bases: MoneroCheck
Models the results from checking a transaction key.
in_tx_pool: bool | None instance-attribute ¶
States if the transaction is in pool (True) or included in a block (False)
num_confirmations: int | None instance-attribute ¶
Transaction network confirmations.
received_amount: int | None instance-attribute ¶
Amount received in the transaction.
__init__() ¶
Initialize a Monero transaction check.
deserialize(json) staticmethod ¶
Deserialize a MoneroCheckTx from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroCheckTx in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckTx | deserialized instance. |
MoneroCheckReserve ¶
Bases: MoneroCheck
Models the results from checking a reserve proof.
total_amount: int | None instance-attribute ¶
The reserve total amount.
unconfirmed_spent_amount: int | None instance-attribute ¶
The reserve unconfirmed spent amount.
__init__() ¶
Initialize a Monero reserve check.
deserialize(json) staticmethod ¶
Deserialize a MoneroCheckReserve from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroCheckReserve in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckReserve | deserialized instance. |
MoneroMultisigInfo ¶
Bases: SerializableStruct
Models information about a multisig wallet.
is_multisig: bool instance-attribute ¶
Indicates if the wallet is multisignature (True), or not (False).
is_ready: bool instance-attribute ¶
Indicates if the wallet is ready to support multisignature operations (True) or not (False).
num_participants: int instance-attribute ¶
Number of participants of the multisignature wallet.
threshold: int instance-attribute ¶
Number of participants need in order to sign a transaction.
__init__() ¶
Initialize a Monero multisignature info.
deserialize(json) staticmethod ¶
Deserialize a MoneroMultisigInfo from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMultisigInfo in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigInfo | deserialized instance. |
MoneroMultisigInitResult ¶
Bases: SerializableStruct
Models the result of initializing a multisig wallet which results in the multisig wallet's address xor another multisig hex to share with participants to create the wallet.
address: str | None instance-attribute ¶
The multisignature wallet address.
multisig_hex: str | None instance-attribute ¶
The multisignature hex to share with other participants.
__init__() ¶
Initialize a Monero multisignature initializing result.
deserialize(json) staticmethod ¶
Deserialize a MoneroMultisigInitResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMultisigInitResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigInitResult | deserialized instance. |
MoneroMultisigSignResult ¶
Bases: SerializableStruct
Models the result of signing multisig tx hex.
signed_multisig_tx_hex: str | None instance-attribute ¶
Multisig transaction in hex format.
tx_hashes: list[str] instance-attribute ¶
List of transaction hash.
__init__() ¶
Initialize a Monero multisignature signature result.
deserialize(json) staticmethod ¶
Deserialize a MoneroMultisigSignResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMultisigSignResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigSignResult | deserialized instance. |
MoneroAddressBookEntry ¶
Bases: SerializableStruct
Monero address book entry model.
address: str | None instance-attribute ¶
The book entry address.
description: str | None instance-attribute ¶
The book entry description.
index: int | None instance-attribute ¶
The book entry index.
payment_id: str | None instance-attribute ¶
The book entry payment id.
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. |
MoneroAddressType ¶
Bases: IntEnum
Models a Monero public address type_.
.. _Monero public address type: https://docs.getmonero.org/public-address/
INTEGRATED_ADDRESS = 1 class-attribute instance-attribute ¶
1 Indicates that the Monero address format is integrated_.
.. _integrated: https://docs.getmonero.org/public-address/integrated-address/
PRIMARY_ADDRESS = 0 class-attribute instance-attribute ¶
0 Indicates that the Monero address format is standard_, also known as primary.
.. _standard: https://docs.getmonero.org/public-address/standard-address/
SUBADDRESS = 2 class-attribute instance-attribute ¶
2 Indicates that the Monero address format is subaddress_.
.. _subaddress: https://docs.getmonero.org/public-address/subaddress/
MoneroDecodedAddress ¶
Bases: SerializableStruct
Maintains metadata for a decoded address.
address: str instance-attribute ¶
The decoded address.
address_type: MoneroAddressType instance-attribute ¶
Type of the decoded address.
network_type: MoneroNetworkType instance-attribute ¶
Network type of the decoded address.
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. |
MoneroAccountTag ¶
Bases: SerializableStruct
Models a Monero account tag.
account_indices: list[int] instance-attribute ¶
Account indices with this tag.
label: str | None instance-attribute ¶
The account tag label.
tag: str | None instance-attribute ¶
The account tag.
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. |
MoneroWalletListener ¶
Interface to receive wallet notifications.
__init__() ¶
Initialize a wallet listener.
on_balances_changed(new_balance, new_unlocked_balance) ¶
Invoked when the wallet's balances change.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_balance | int | new balance. | required |
new_unlocked_balance | int | new unlocked balance. | required |
on_new_block(height) ¶
Invoked when a new block is processed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | the newly processed block. | required |
on_output_received(output) ¶
Invoked when the wallet receives an output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output | MoneroOutputWallet | the received output. | required |
on_output_spent(output) ¶
Invoked when the wallet spends an output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output | MoneroOutputWallet | the spent output. | required |
on_sync_progress(height, start_height, end_height, percent_done, message) ¶
Invoked when sync progress is made.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | height of the synced block. | required |
start_height | int | starting height of the sync request. | required |
end_height | int | ending height of the sync request. | required |
percent_done | float | sync progress as a percentage. | required |
message | str | human-readable description of the current progress. | required |