Daemon Data Model¶
MoneroNetworkType ¶
Bases: IntEnum
Enumerates a Monero network type_.
.. _Monero network type: https://docs.getmonero.org/infrastructure/networks/
MAINNET = 0 class-attribute instance-attribute ¶
0 indicates Mainnet network_.
.. _Mainnet network: https://docs.getmonero.org/infrastructure/networks/#mainnet
STAGENET = 2 class-attribute instance-attribute ¶
2 indicates Stagenet network_.
.. _Stagenet network: https://docs.getmonero.org/infrastructure/networks/#stagenet
TESTNET = 1 class-attribute instance-attribute ¶
1 indicates Testnet network_.
.. _Testnet network: https://docs.getmonero.org/infrastructure/networks/#testnet
MoneroVersion ¶
Bases: SerializableStruct
Models a Monero version.
is_release: bool | None instance-attribute ¶
States if the monero software version corresponds to an official tagged release (True), or not (False).
number: int | None instance-attribute ¶
Number of the monero software version.
__init__() ¶
Initialize a new Monero version.
deserialize(json) staticmethod ¶
Deserialize a MoneroVersion from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroVersion in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroVersion | deserialized instance. |
MoneroRpcPaymentInfo ¶
Bases: SerializableStruct
Models a Monero RPC payment information.
credits: int | None instance-attribute ¶
If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
top_block_hash: str | None instance-attribute ¶
If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, None.
deserialize(json) staticmethod ¶
Deserialize a MoneroRpcPaymentInfo from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroRpcPaymentInfo in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroRpcPaymentInfo | deserialized instance. |
MoneroBlockHeader ¶
Bases: SerializableStruct
Models a Monero block header which contains information about the block.
cumulative_difficulty_high: int | None instance-attribute ¶
Cumulative difficulty of all blocks up to the block in the reply.
cumulative_difficulty_low: int | None instance-attribute ¶
Cumulative difficulty of all blocks up to the block in the reply.
depth: int | None instance-attribute ¶
The number of blocks succeeding this block on the blockchain. A larger number means an older block.
difficulty_high: int | None instance-attribute ¶
The strength of the Monero network based on mining power.
difficulty_low: int | None instance-attribute ¶
The strength of the Monero network based on mining power.
hash: str | None instance-attribute ¶
The hash of this block.
height: int | None instance-attribute ¶
The number of blocks preceding this block on the blockchain.
long_term_weight: int | None instance-attribute ¶
The long term block weight, based on the median weight of the preceding 100000 blocks.
major_version: int | None instance-attribute ¶
The major version of the monero protocol at this block height.
miner_tx_hash: str | None instance-attribute ¶
The hash of this block's coinbase transaction.
minor_version: int | None instance-attribute ¶
The minor version of the monero protocol at this block height.
nonce: int | None instance-attribute ¶
A cryptographic random one-time number used in mining a Monero block.
num_txs: int | None instance-attribute ¶
Number of transactions included in this block.
orphan_status: bool | None instance-attribute ¶
If True, this block is not part of the longest chain.
pow_hash: str | None instance-attribute ¶
The hash, as a hexadecimal string, calculated from the block as proof-of-work.
prev_hash: str | None instance-attribute ¶
The hash of the block immediately preceding this block in the chain.
reward: int | None instance-attribute ¶
The amount of atomic-units rewarded to the miner. The reward is the sum of new coins created (the emission) and fees paid by transactions in this block. Note: 1 XMR = 1e12 atomic-units.
size: int | None instance-attribute ¶
Backward compatibility, same as weight, use that instead.
timestamp: int | None instance-attribute ¶
The unix time at which the block was recorded into the blockchain.
weight: int | None instance-attribute ¶
The adjusted block size, in bytes. This is the raw size, plus a positive adjustment for any Bulletproof transactions with more than 2 outputs.
__init__() ¶
Initialize a Monero block header.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroBlockHeader from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroBlockHeader in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | deserialized instance. |
merge(other) ¶
Merge current block header with another one.
Raises:
| Type | Description |
|---|---|
Exception | on reconciliation error. |
MoneroBlock ¶
Bases: MoneroBlockHeader
Models a Monero block in the blockchain.
hex: str | None instance-attribute ¶
Hexadecimal blob of block information.
miner_tx: MoneroTx | None instance-attribute ¶
Miner transaction information.
tx_hashes: list[str] instance-attribute ¶
List of hashes of non-coinbase transactions in the block.
txs: list[MoneroTx] instance-attribute ¶
List of non-coinbase transactions in the block.
__init__() ¶
Initialize a Monero block.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroBlock from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroBlock in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlock | deserialized instance. |
MoneroGetBlocksByHashResult ¶
Bases: SerializableStruct
Models the result of getting blocks by hash.
blocks: list[MoneroBlock] instance-attribute ¶
The retrieved blocks.
current_height: int | None instance-attribute ¶
The daemon's chain height at request time.
__init__() ¶
Initialize a Monero get blocks by hash result.
deserialize(json) staticmethod ¶
Deserialize a MoneroGetBlocksByHashResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroGetBlocksByHashResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroGetBlocksByHashResult | deserialized instance. |
MoneroGetBlockHashesResult ¶
Bases: SerializableStruct
Models the result of getting block hashes.
current_height: int | None instance-attribute ¶
The daemon's chain height at request time.
hashes: list[str] instance-attribute ¶
The requested block hashes, starting at (and including) the last block in common with the request.
start_height: int | None instance-attribute ¶
The height of the first hash in hashes.
__init__() ¶
Initialize a Monero get block hashes result.
deserialize(json) staticmethod ¶
Deserialize a MoneroGetBlockHashesResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroGetBlockHashesResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroGetBlockHashesResult | deserialized instance. |
MoneroTx ¶
Bases: SerializableStruct
Models a Monero transaction on the blockchain.
DEFAULT_PAYMENT_ID: str instance-attribute ¶
Default tx payment id
block: MoneroBlock | None instance-attribute ¶
Block including the transaction.
common_tx_sets: str | None instance-attribute ¶
A hexadecimal string representing a set of unsigned transactions, or a set of signing keys used in a multisig transaction.
extra: list[int] instance-attribute ¶
Usually called the payment ID but can be used to include any random 32 bytes.
fee: int | None instance-attribute ¶
The amount of the mining fee included in the transaction, in atomic-units.
full_hex: str | None instance-attribute ¶
Full transaction information as a hex string.
hash: str | None instance-attribute ¶
The transaction hash.
in_tx_pool: bool | None instance-attribute ¶
States if the transaction is in pool (True) or included in a block (False).
inputs: list[MoneroOutput] instance-attribute ¶
List of inputs into transaction.
is_confirmed: bool | None instance-attribute ¶
States if the transaction included in a block (True) or is in pool (False).
is_double_spend_seen: bool | None instance-attribute ¶
States if the transaction is a double-spend (True) or not (False).
is_failed: bool | None instance-attribute ¶
Indicates if the transaction validation has previously failed.
is_kept_by_block: bool | None instance-attribute ¶
States if the transaction was included in a block at least once (True) or not (False).
is_locked: bool | None instance-attribute ¶
Indicates if the transaction is locked.
is_miner_tx: bool | None instance-attribute ¶
States if the transaction is a coinbase-transaction (True) or not (False).
is_relayed: bool | None instance-attribute ¶
States if the transaction was relayed (True) or not (False).
key: str | None instance-attribute ¶
The transaction key.
last_failed_hash: str | None instance-attribute ¶
If the transaction validation has previously failed, this tells the previous transaction hash.
last_failed_height: int | None instance-attribute ¶
If the transaction validation has previously failed, this tells at what height that occurred.
last_relayed_timestamp: int | None instance-attribute ¶
Last unix time at which the transaction has been relayed.
max_used_block_hash: str | None instance-attribute ¶
Tells the hash of the most recent block with an output used in this transaction.
max_used_block_height: int | None instance-attribute ¶
Tells the height of the most recent block with an output used in this transaction.
metadata: str | None instance-attribute ¶
Transaction metadata.
num_confirmations: int | None instance-attribute ¶
Number of network confirmations.
output_indices: list[int] instance-attribute ¶
Global (on-chain) output index of each of this transaction's outputs, in order; the indices by which the outputs are referenced as ring members.
outputs: list[MoneroOutput] instance-attribute ¶
Transaction outputs.
payment_id: str | None instance-attribute ¶
Payment ID for this transaction.
prunable_hash: str | None instance-attribute ¶
Keccak-256 hash of the prunable portion of the block.
prunable_hex: str | None instance-attribute ¶
Prunable block encoded as a hex string.
pruned_hex: str | None instance-attribute ¶
Pruned block encoded as hex string.
rct_sig_prunable: str | None instance-attribute ¶
Prunable ring signature.
rct_signatures: str | None instance-attribute ¶
Signatures used in ring signature to hide the true origin of the transaction.
received_timestamp: int | None instance-attribute ¶
Unix time at chich the transaction has been received.
relay: bool | None instance-attribute ¶
States if this transaction should be relayed (True) or not (False).
ring_size: int | None instance-attribute ¶
The ring size of this transaction.
signatures: list[str] instance-attribute ¶
List of signatures used in ring signature to hide the true origin of the transaction.
size: int | None instance-attribute ¶
Backward compatibility, same as weight, use that instead.
unlock_time: int | None instance-attribute ¶
If not 0, this tells when the transaction outputs are spendable.
version: int | None instance-attribute ¶
Transaction version.
weight: int | None instance-attribute ¶
The weight of this transaction in bytes.
__init__() ¶
Initialize a new Monero transaction.
__lt__(other) ¶
Compare this tx to another by height (see TxHeightComparator).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroTx | tx to compare against. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
deserialize(json) staticmethod ¶
Deserialize a MoneroTx from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroTx in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTx | deserialized instance. |
get_height() ¶
Get the transaction height.
Returns:
| Type | Description |
|---|---|
int | None | The height of the transaction, if known. |
merge(other) ¶
Merge current tx with another one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroTx | other tx to merge with. | required |
MoneroKeyImage ¶
Bases: SerializableStruct
Models a Monero key image.
hex: str | None instance-attribute ¶
The key image in hexadecimal format.
signature: str | None instance-attribute ¶
The key image signature. None if not known.
__init__() ¶
Initialize a Monero key image.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroKeyImage from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroKeyImage in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroKeyImage | deserialized instance. |
deserialize_key_images(key_images_json) staticmethod ¶
Deserialize key images from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_images_json | str | JSON string with serialized key images. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroKeyImage] | Deserialized key images. |
merge(other) ¶
Merge current key image with another one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroKeyImage | other key image to merge with. | required |
MoneroKeyImageSpentStatus ¶
Bases: IntEnum
Enumerates the spent status of a key image.
MoneroOutput ¶
Bases: SerializableStruct
Models a Monero transaction output.
amount: int | None instance-attribute ¶
Output amount in atomic-units.
index: int | None instance-attribute ¶
Output index.
key_image: MoneroKeyImage | None instance-attribute ¶
The key image of the output.
mask: str | None instance-attribute ¶
The output commitment mask (pseudo-out blinding factor) as a hex string.
ring_output_indices: list[int] instance-attribute ¶
Indices of ring outputs.
stealth_public_key: str | None instance-attribute ¶
The public key of the output.
tx: MoneroTx instance-attribute ¶
The transaction related to this output.
__init__() ¶
Initialize a Monero output.
copy() ¶
deserialize(json) staticmethod ¶
Deserialize a MoneroOutput from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutput in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutput | deserialized instance. |
merge(other) ¶
Merge current output wallet with another output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other | MoneroOutput | other output to merge with. | required |
MoneroAltChain ¶
Bases: SerializableStruct
Models an alternative chain seen by the node.
block_hashes: list[str] instance-attribute ¶
List of all block hashes in the alternative chain that are not in the main chain.
difficulty_high: int | None instance-attribute ¶
Cumulative difficulty of all blocks in the alternative chain (Most-significant 64 bits of the 128-bit integer).
difficulty_low: int | None instance-attribute ¶
Cumulative difficulty of all blocks in the alternative chain (Least-significant 64 bits of 128-bit integer).
height: int | None instance-attribute ¶
The block height of the first diverging block of this alternative chain.
length: int | None instance-attribute ¶
The length in blocks of this alternative chain, after divergence.
main_chain_parent_block_hash: str | None instance-attribute ¶
The hash of the greatest height block that is shared between the alternative chain and the main chain.
__init__() ¶
Initialize a Monero alt chain info.
deserialize(json) staticmethod ¶
Deserialize a MoneroAltChain from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAltChain in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAltChain | deserialized instance. |
MoneroBan ¶
Bases: SerializableStruct
Model a Monero banhammer.
host: str | None instance-attribute ¶
Host ban.
ip: int | None instance-attribute ¶
IP ban.
is_banned: bool | None instance-attribute ¶
Indicates if ban on the host is active (True) or not (False).
seconds: int | None instance-attribute ¶
Indicates the duration of the ban in seconds.
__init__() ¶
Initialize a Monero banhammer.
MoneroPruneResult ¶
Bases: SerializableStruct
Models the result of pruning the blockchain.
is_pruned: bool | None instance-attribute ¶
Indicates if blockchain is pruned.
pruning_seed: int | None instance-attribute ¶
Blockheight at which pruning began.
__init__() ¶
Initialize a Monero prune result.
deserialize(json) staticmethod ¶
Deserialize a MoneroPruneResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroPruneResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroPruneResult | deserialized instance. |
MoneroMiningStatus ¶
Bases: SerializableStruct
Models a Monero daemon mining status.
address: str | None instance-attribute ¶
Account address daemon is mining to. None if not mining.
is_active: bool | None instance-attribute ¶
Indicates if mining is enabled.
is_background: bool | None instance-attribute ¶
Indicates if mining is running in background.
num_threads: int | None instance-attribute ¶
Number of running mining threads.
speed: int | None instance-attribute ¶
Mining power in hashes per seconds.
__init__() ¶
Initialize a Monero daemon mining status.
deserialize(json) staticmethod ¶
Deserialize a MoneroMiningStatus from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMiningStatus in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMiningStatus | deserialized instance. |
MoneroMinerTxSum ¶
Bases: SerializableStruct
Model for the sum of miner emissions and fees.
emission_sum_high: int | None instance-attribute ¶
The new coins emitted in atomic-units. (Most significant 64 bits for 128 bit integer)
emission_sum_low: int | None instance-attribute ¶
The new coins emitted in atomic-units. (Least significant 64 bits for 128 bit integer)
fee_sum_high: int | None instance-attribute ¶
The sum of fees in atomic-units. (Most significant 64 bits for 128 bit integer)
fee_sum_low: int | None instance-attribute ¶
The sum of fees in atomic-units. (Least significant 64 bits for 128 bit integer)
__init__() ¶
Initialize a Monero miner transaction sum.
deserialize(json) staticmethod ¶
Deserialize a MoneroMinerTxSum from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMinerTxSum in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMinerTxSum | deserialized instance. |
MoneroMinerData ¶
Bases: MoneroRpcPaymentInfo
Data needed to construct a block template for mining, e.g. for a pool that assembles its own block templates.
already_generated_coins: int | None instance-attribute ¶
The total coins emitted so far, in atomic-units.
difficulty: str | None instance-attribute ¶
The next block's difficulty as a hex string, e.g. "0x1f4".
height: int | None instance-attribute ¶
The height of the next block to mine.
major_version: int | None instance-attribute ¶
The next block's major version.
median_weight: int | None instance-attribute ¶
The median block weight used for penalty calculations.
prev_hash: str | None instance-attribute ¶
The hash of the previous (current top) block.
seed_hash: str | None instance-attribute ¶
The seed hash used to select the RandomX dataset/cache.
tx_pool_backlog: list[MoneroTx] instance-attribute ¶
The transactions currently in the pool eligible for the next block.
__init__() ¶
Initialize a Monero miner data.
deserialize(json) staticmethod ¶
Deserialize a MoneroMinerData from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroMinerData in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroMinerData | deserialized instance. |
MoneroBlockTemplate ¶
Bases: SerializableStruct
Monero block template to mine.
block_hashing_blob: str | None instance-attribute ¶
Blob on which to try to find a valid nonce.
block_template_blob: str | None instance-attribute ¶
Blob on which to try to mine a new block.
difficulty_high: int | None instance-attribute ¶
Network difficulty (Most-significant 64 bits of 128-bit integer).
difficulty_low: int | None instance-attribute ¶
Network difficulty (Least-significant 64 bits of 128-bit integer).
expected_reward: int | None instance-attribute ¶
Coinbase reward expected to be received if block is successfully mined.
height: int | None instance-attribute ¶
Height on which to mine.
next_seed_hash: str | None instance-attribute ¶
Hash of the next block to use as seed for Random-X proof-of-work.
prev_hash: str | None instance-attribute ¶
Hash of the most recent block on which to mine the next block.
reserved_offset: int | None instance-attribute ¶
Byte offset into block_template_blob of the reserve_size scratch bytes the daemon left free in the coinbase transaction's extra field, where a pool writes its own data (e.g. an extra-nonce it varies to search the nonce space).
seed_hash: str | None instance-attribute ¶
Hash of block to use as seed for Random-X proof-of-work.
seed_height: int | None instance-attribute ¶
Height of block to use as seed for Random-X proof-of-work.
__init__() ¶
Initialize a Monero block template.
deserialize(json) staticmethod ¶
Deserialize a MoneroBlockTemplate from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroBlockTemplate in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockTemplate | deserialized instance. |
MoneroGenerateBlocksResult ¶
Bases: SerializableStruct
Models the result of generating blocks.
block_hashes: list[str] instance-attribute ¶
Generated block hashes.
height: int | None instance-attribute ¶
New chain height.
deserialize(json) staticmethod ¶
Deserialize a MoneroGenerateBlocksResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroGenerateBlocksResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroGenerateBlocksResult | deserialized instance. |
MoneroConnectionSpan ¶
Bases: SerializableStruct
Monero daemon connection span.
connection_id: str | None instance-attribute ¶
Id of the P2P connection this span of blocks was (or is being) downloaded over.
num_blocks: int | None instance-attribute ¶
Number of blocks in this span.
rate: int | None instance-attribute ¶
Download rate for this span, in bytes per second.
remote_address: str | None instance-attribute ¶
Peer address the node is downloading (or has downloaded) than span from.
size: int | None instance-attribute ¶
Total number of bytes in that span's blocks (including txes).
speed: int | None instance-attribute ¶
Relative speed of this connection as a percentage (0-100) of the fastest peer currently downloading blocks.
start_height: int | None instance-attribute ¶
Block height of the first block in that span.
__init__() ¶
Initialize a Monero connection span.
deserialize(json) staticmethod ¶
Deserialize a MoneroConnectionSpan from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroConnectionSpan in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroConnectionSpan | deserialized instance. |
MoneroPeer ¶
Bases: SerializableStruct
Models a peer to the daemon.
address: str | None instance-attribute ¶
The peer's address, actually IPv4 & port.
avg_download: int | None instance-attribute ¶
Average bytes of data downloaded by node.
avg_upload: int | None instance-attribute ¶
Average bytes of data uploaded by node.
connection_type: MoneroConnectionType | None instance-attribute ¶
Type of peer connection.
current_download: int | None instance-attribute ¶
Current bytes downloaded by node.
current_upload: int | None instance-attribute ¶
Current bytes uploaded by node.
hash: str | None instance-attribute ¶
Peer hash.
height: int | None instance-attribute ¶
The peer blockchain height.
host: str | None instance-attribute ¶
The peer host.
id: str | None instance-attribute ¶
The node's ID on the network.
is_incoming: bool | None instance-attribute ¶
Indicates if peer is pulling blocks from node.
is_local_host: bool | None instance-attribute ¶
Indicates if peer is localhost.
is_local_ip: bool | None instance-attribute ¶
Indicates if peer has a local ip address.
is_online: bool | None instance-attribute ¶
Indicates if the peer is online.
last_seen_timestamp: int | None instance-attribute ¶
Last activity timestamp of this peer.
live_time: int | None instance-attribute ¶
Length of time the peer has been online.
num_receives: int | None instance-attribute ¶
Total number of messages received from this peer.
num_sends: int | None instance-attribute ¶
Total number of messages sent to this peer.
num_support_flags: int | None instance-attribute ¶
Support flags number.
port: int | None instance-attribute ¶
The port that the node is using to connect to the network.
pruning_seed: int | None instance-attribute ¶
Block height at which pruning began.
receive_idle_time: int | None instance-attribute ¶
Seconds since last data was received from this peer.
rpc_credits_per_hash: int | None instance-attribute ¶
Credits for every hash calculated by client.
rpc_port: int | None instance-attribute ¶
Peer RPC port.
send_idle_time: int | None instance-attribute ¶
Seconds since the last data sent to this peer.
state: str | None instance-attribute ¶
Peer state.
__init__() ¶
Initialize a new Monero peer.
deserialize(json) staticmethod ¶
Deserialize a MoneroPeer from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroPeer in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroPeer | deserialized instance. |
MoneroSubmitTxResult ¶
Bases: MoneroRpcPaymentInfo
Models the result from submitting a tx to a daemon.
has_invalid_input: bool | None instance-attribute ¶
Indicates if the transaction has an invalid input.
has_invalid_output: bool | None instance-attribute ¶
Indicates if the transaction has an invalid output.
has_too_few_outputs: bool | None instance-attribute ¶
Indicates if the transaction has too few outputs.
is_double_spend: bool | None instance-attribute ¶
Indicates if the transaction is double spend.
is_fee_too_low: bool | None instance-attribute ¶
Indicates if the transaction fee is too low.
is_good: bool | None instance-attribute ¶
Indicates if the submission of the transaction was successfull.
is_mixin_too_low: bool | None instance-attribute ¶
Indicates if the transaction mixin count is too low.
is_nonzero_unlock_time: bool | None instance-attribute ¶
Indicates if the transaction was rejected for carrying a non-zero per-transaction unlock time, which the daemon no longer accepts into the pool.
is_overspend: bool | None instance-attribute ¶
Indicates if the transaction uses more money than available
is_relayed: bool | None instance-attribute ¶
Indicates if the transaction has been relayed.
is_too_big: bool | None instance-attribute ¶
Indicates if the transaction size is too big.
is_tx_extra_too_big: bool | None instance-attribute ¶
Indicates if the transaction extra size is too big.
reason: str | None instance-attribute ¶
Additional information. Currently empty or Not relayed if transaction was accepted but not relayed.
sanity_check_failed: bool | None instance-attribute ¶
Indicates if the transaction sanity check has failed.
__init__() ¶
Initialize a new submit transaction result.
deserialize(json) staticmethod ¶
Deserialize a MoneroSubmitTxResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroSubmitTxResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubmitTxResult | deserialized instance. |
MoneroAuxiliaryPow ¶
Bases: SerializableStruct
Identifies an auxiliary chain's block by id and proof-of-work hash for merge mining.
hash: str | None instance-attribute ¶
The auxiliary block's proof-of-work hash.
id: str | None instance-attribute ¶
The auxiliary chain id.
deserialize(json) staticmethod ¶
Deserialize a MoneroAuxiliaryPow from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAuxiliaryPow in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAuxiliaryPow | deserialized instance. |
MoneroAddAuxiliaryPowResult ¶
Bases: MoneroRpcPaymentInfo
Models the result of adding auxiliary proof-of-work to a block template for merge mining.
aux_pow: list[MoneroAuxiliaryPow] instance-attribute ¶
The (possibly reordered) auxiliary proof-of-work entries.
block_hashing_blob: str | None instance-attribute ¶
The updated block hashing blob.
block_template_blob: str | None instance-attribute ¶
The updated block template blob.
merkle_root: str | None instance-attribute ¶
The Merkle root committing to the auxiliary blocks.
merkle_tree_depth: int | None instance-attribute ¶
The depth of the auxiliary Merkle tree.
__init__() ¶
Initialize a Monero add auxiliary proof-of-work result.
deserialize(json) staticmethod ¶
Deserialize a MoneroAddAuxiliaryPowResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroAddAuxiliaryPowResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroAddAuxiliaryPowResult | deserialized instance. |
MoneroOutputDistributionEntry ¶
Bases: SerializableStruct
Models a Monero output distribution entry.
amount: int | None instance-attribute ¶
Output amount in atomic-units.
base: int | None instance-attribute ¶
The total number of outputs of amount in the chain before, not including, the block at start_height.
distribution: list[int] instance-attribute ¶
Per-block counts of outputs of amount starting at start_height: element i is the number created in block start_height + i, or the running total up to that block when the distribution was requested as cumulative. Wallets use this to weight decoy selection by output age.
start_height: int | None instance-attribute ¶
Not necessarily equal to the start_height parameter, especially for amount = 0 where it will be no less than the height of the v4 hard fork.
__init__() ¶
Initialize a Monero output distribution entry.
deserialize(json) staticmethod ¶
Deserialize a MoneroOutputDistributionEntry from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutputDistributionEntry in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutputDistributionEntry | deserialized instance. |
MoneroOutputHistogramEntry ¶
Bases: SerializableStruct
Models a Monero output histogram entry.
amount: int | None instance-attribute ¶
Output amount in atomic-units.
num_instances: int | None instance-attribute ¶
Number of outputs.
recent_instances: int | None instance-attribute ¶
Number of recent outputs.
unlocked_instances: int | None instance-attribute ¶
Number of unlocked outputs.
__init__() ¶
Initialize a Monero output histogram entry.
deserialize(json) staticmethod ¶
Deserialize a MoneroOutputHistogramEntry from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroOutputHistogramEntry in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroOutputHistogramEntry | deserialized instance. |
MoneroTxPoolStats ¶
Bases: SerializableStruct
Models transaction pool statistics.
bytes_max: int | None instance-attribute ¶
Max transaction size in pool.
bytes_med: int | None instance-attribute ¶
Median transaction size in pool.
bytes_min: int | None instance-attribute ¶
Min transaction size in pool.
bytes_total: int | None instance-attribute ¶
Total size of all transactions in pool.
fee_total: int | None instance-attribute ¶
The sum of the fees for all transactions currently in the transaction pool atomic-units.
histo: dict[int, int] instance-attribute ¶
Txs histogram (key for bytes, value for txs).
histo98pc: int | None instance-attribute ¶
The time 98% of txes are younger than.
num10m: int | None instance-attribute ¶
Number of transactions in pool for more than 10 minutes.
num_double_spends: int | None instance-attribute ¶
Number of double spend transactions.
num_failing: int | None instance-attribute ¶
Number of failing transactions.
num_not_relayed: int | None instance-attribute ¶
Number of non-relayed transactions.
num_txs: int | None instance-attribute ¶
Total number of transactions.
oldest_timestamp: int | None instance-attribute ¶
Unix time of the oldest transaction in the pool.
__init__() ¶
Initialize a Monero transaction pool statistics.
deserialize(json) staticmethod ¶
Deserialize a MoneroTxPoolStats from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroTxPoolStats in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxPoolStats | deserialized instance. |
MoneroDaemonUpdateCheckResult ¶
Bases: SerializableStruct
Models the result of checking for a daemon update.
auto_uri: str | None instance-attribute ¶
URL automatically generated by the daemon to download the update.
hash: str | None instance-attribute ¶
Integrity check hash.
is_update_available: bool | None instance-attribute ¶
Indicates if an update is available to download.
user_uri: str | None instance-attribute ¶
Alternative user URI.
version: str | None instance-attribute ¶
Version available for download.
__init__() ¶
Initialize a Monero update check result.
deserialize(json) staticmethod ¶
Deserialize a MoneroDaemonUpdateCheckResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDaemonUpdateCheckResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateCheckResult | deserialized instance. |
MoneroDaemonUpdateDownloadResult ¶
Bases: MoneroDaemonUpdateCheckResult
Models the result of downloading a daemon update.
download_path: str | None instance-attribute ¶
Path to download the update.
__init__() ¶
Initialize a Monero update download result.
deserialize(json) staticmethod ¶
Deserialize a MoneroDaemonUpdateDownloadResult from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDaemonUpdateDownloadResult in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateDownloadResult | deserialized instance. |
MoneroFeeEstimate ¶
Bases: SerializableStruct
Models a Monero fee estimate.
fee: int | None instance-attribute ¶
Amount of fees estimated per byte in atomic-units.
fees: list[int] instance-attribute ¶
Represents the base fees at different priorities [slow, normal, fast, fastest].
quantization_mask: int | None instance-attribute ¶
Final fee should be rounded up to an even multiple of this value.
__init__() ¶
Initialize a Monero fee estimate.
deserialize(json) staticmethod ¶
Deserialize a MoneroFeeEstimate from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroFeeEstimate in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroFeeEstimate | deserialized instance. |
MoneroDaemonInfo ¶
Bases: MoneroRpcPaymentInfo
Models information got from a Monero daemon.
adjusted_timestamp: int | None instance-attribute ¶
Current time approximated from chain data, as Unix time.
block_size_limit: int | None instance-attribute ¶
Backward compatibility, same as block_weight_limit, use that instead.
block_size_median: int | None instance-attribute ¶
Backward compatibility, same as block_weight_median, use that instead.
block_weight_limit: int | None instance-attribute ¶
Maximum allowed adjusted block size based on latest 100000 blocks.
block_weight_median: int | None instance-attribute ¶
Median adjusted block size of latest 100000 blocks.
bootstrap_daemon_address: str | None instance-attribute ¶
Bootstrap-node to give immediate usability to wallets while syncing by proxying RPC to it.
cumulative_difficulty_high: int | None instance-attribute ¶
Most-significant 64 bits of the 128-bit cumulative difficulty.
cumulative_difficulty_low: int | None instance-attribute ¶
Least-significant 64 bits of the 128-bit cumulative difficulty.
database_size: int | None instance-attribute ¶
The size of the blockchain database, in bytes.
difficulty_high: int | None instance-attribute ¶
The most-significant 64 bits of the 128-bit network difficulty.
difficulty_low: int | None instance-attribute ¶
The least-significant 64 bits of the 128-bit network difficulty.
free_space: int | None instance-attribute ¶
Available disk space on the node.
height: int | None instance-attribute ¶
Current length of longest chain known to daemon.
height_without_bootstrap: int | None instance-attribute ¶
Current length of the local chain of the daemon.
is_busy_syncing: bool | None instance-attribute ¶
States if new blocks are being added (True) or not (False).
is_offline: bool | None instance-attribute ¶
States if the node is offline (True) or online (False).
is_regtest: bool | None instance-attribute ¶
States if the node is running in regtest mode (True) or not (False).
is_restricted: bool | None instance-attribute ¶
Indicates that the node RPC interface is restricted (True) or not (False).
is_synchronized: bool | None instance-attribute ¶
States if the node is synchronized (True) or not (False).
network_type: MoneroNetworkType | None instance-attribute ¶
Network type (MAINNET, TESTNET, or STAGENET).
num_alt_blocks: int | None instance-attribute ¶
Number of alternative blocks to main chain.
num_incoming_connections: int | None instance-attribute ¶
Number of peers connected to and pulling from your node.
num_offline_peers: int | None instance-attribute ¶
Number of peers that are marked as not reacheable on the network.
num_online_peers: int | None instance-attribute ¶
Number of peers that are marked as reacheble on the network.
num_outgoing_connections: int | None instance-attribute ¶
Number of peers that you are connected to and getting information from.
num_rpc_connections: int | None instance-attribute ¶
Number of RPC client connected to the daemon (Including this RPC request).
num_txs: int | None instance-attribute ¶
Total number of non-coinbase transactions in the chain.
num_txs_pool: int | None instance-attribute ¶
Number of transactions that have been broadcast but not included in a block.
start_timestamp: int | None instance-attribute ¶
Start time of the daemon, as UNIX time.
target: int | None instance-attribute ¶
Current target for next proof of work.
target_height: int | None instance-attribute ¶
The height of the next block in the chain.
update_available: bool | None instance-attribute ¶
States if a newer Monero software version is available.
version: str | None instance-attribute ¶
The version of the Monero software the node is running.
was_bootstrap_ever_used: bool | None instance-attribute ¶
States if a bootstrap node has ever been used since the daemon started.
__init__() ¶
Initiliaze a Monero daemon info.
deserialize(json) staticmethod ¶
Deserialize a MoneroDaemonInfo from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDaemonInfo in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDaemonInfo | deserialized instance. |
MoneroDaemonSyncInfo ¶
Bases: MoneroRpcPaymentInfo
Models daemon synchronization information.
height: int | None instance-attribute ¶
Daemon blockchain height.
next_needed_pruning_seed: int | None instance-attribute ¶
The next pruning seed needed for pruned sync.
overview: str | None instance-attribute ¶
Overview of current block queue where each character in the string represents a block set in the queue. '.' = requested but not received, 'o' = set received, 'm' = received set that matches the next blocks needed
peers: list[MoneroPeer] instance-attribute ¶
List of peers connected to the node
spans: list[MoneroConnectionSpan] instance-attribute ¶
Currently connected peers to download blocks from.
target_height: int | None instance-attribute ¶
Target height the node is syncing from (will be 0 if node is fully synced).
__init__() ¶
Initialize a Monero daemon sync info.
deserialize(json) staticmethod ¶
Deserialize a MoneroDaemonSyncInfo from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDaemonSyncInfo in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDaemonSyncInfo | deserialized instance. |
MoneroDaemonNetworkStats ¶
Bases: MoneroRpcPaymentInfo
Models daemon network (bandwidth) statistics since the daemon started.
start_time: int | None instance-attribute ¶
Unix timestamp when the statistics window started.
total_bytes_in: int | None instance-attribute ¶
Total number of bytes received.
total_bytes_out: int | None instance-attribute ¶
Total number of bytes sent.
total_packets_in: int | None instance-attribute ¶
Total number of packets received.
total_packets_out: int | None instance-attribute ¶
Total number of packets sent.
__init__() ¶
Initialize a Monero daemon network stats.
deserialize(json) staticmethod ¶
Deserialize a MoneroDaemonNetworkStats from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroDaemonNetworkStats in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroDaemonNetworkStats | deserialized instance. |
MoneroHardForkInfo ¶
Bases: MoneroRpcPaymentInfo
Models a Monero look up information regarding hard fork voting and readiness.
earliest_height: int | None instance-attribute ¶
Block height at which hard fork would be enabled if voted in.
is_enabled: bool | None instance-attribute ¶
Tells if hard fork is enforced.
num_votes: int | None instance-attribute ¶
Number of votes towards hard fork.
state: int | None instance-attribute ¶
Current hard fork state. 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
threshold: int | None instance-attribute ¶
Minimum percent of votes to trigger hard fork. Default is 80.
version: int | None instance-attribute ¶
The major block version for the fork.
voting: int | None instance-attribute ¶
Hard fork voting status.
window: int | None instance-attribute ¶
Number of blocks over which current votes are cast. Default is 10080 blocks.
__init__() ¶
Initialize a Monero hard fork info.
deserialize(json) staticmethod ¶
Deserialize a MoneroHardForkInfo from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroHardForkInfo in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroHardForkInfo | deserialized instance. |
MoneroDaemonListener ¶
Receives notifications as a daemon is updated.
last_header: MoneroBlockHeader | None instance-attribute ¶
Last block header added to the chain.
__init__() ¶
Initialize a Monero daemon listener.
on_block_header(header) ¶
Called when a new block is added to the chain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
header | MoneroBlockHeader | is the header of the block added to the chain. | required |