diff --git a/CMakeLists.txt b/CMakeLists.txt index ca92059..ea9684d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -project(monero VERSION 0.9.3 LANGUAGES CXX) +project(monero VERSION 0.9.4 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/debian/bookworm/control b/debian/bookworm/control index 8e67d3f..6d27a83 100644 --- a/debian/bookworm/control +++ b/debian/bookworm/control @@ -11,4 +11,4 @@ Package: python3-monero Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. -Version: 0.9.3 +Version: 0.9.4 diff --git a/debian/jammy/control b/debian/jammy/control index 8e67d3f..6d27a83 100644 --- a/debian/jammy/control +++ b/debian/jammy/control @@ -11,4 +11,4 @@ Package: python3-monero Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. -Version: 0.9.3 +Version: 0.9.4 diff --git a/debian/noble/control b/debian/noble/control index 8e67d3f..6d27a83 100644 --- a/debian/noble/control +++ b/debian/noble/control @@ -11,4 +11,4 @@ Package: python3-monero Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. -Version: 0.9.3 +Version: 0.9.4 diff --git a/debian/trixie/control b/debian/trixie/control index 8e67d3f..6d27a83 100644 --- a/debian/trixie/control +++ b/debian/trixie/control @@ -11,4 +11,4 @@ Package: python3-monero Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. -Version: 0.9.3 +Version: 0.9.4 diff --git a/docker/build.sh b/docker/build.sh index b65d433..16365b8 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -2,7 +2,7 @@ set -e DISTRO_CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2) -DEFAULT_VERSION="0.9.3" +DEFAULT_VERSION="0.9.4" if [ -z "$DISTRO_CODENAME" ]; then DISTRO_CODENAME=$(lsb_release -c -s 2>/dev/null || echo "unknown") diff --git a/docs/mkdocs/docs/en/api/data_model/daemon.md b/docs/mkdocs/docs/en/api/data_model/daemon.md index fa94ce5..cf07b9f 100644 --- a/docs/mkdocs/docs/en/api/data_model/daemon.md +++ b/docs/mkdocs/docs/en/api/data_model/daemon.md @@ -7,14 +7,22 @@ title: Daemon Data Model ::: monero.MoneroVersion +::: monero.MoneroRpcPaymentInfo + ::: monero.MoneroBlockHeader ::: monero.MoneroBlock +::: monero.MoneroGetBlocksByHashResult + +::: monero.MoneroGetBlockHashesResult + ::: monero.MoneroTx ::: monero.MoneroKeyImage +::: monero.MoneroKeyImageSpentStatus + ::: monero.MoneroOutput ::: monero.MoneroAltChain @@ -27,14 +35,22 @@ title: Daemon Data Model ::: monero.MoneroMinerTxSum +::: monero.MoneroMinerData + ::: monero.MoneroBlockTemplate +::: monero.MoneroGenerateBlocksResult + ::: monero.MoneroConnectionSpan ::: monero.MoneroPeer ::: monero.MoneroSubmitTxResult +::: monero.MoneroAuxiliaryPow + +::: monero.MoneroAddAuxiliaryPowResult + ::: monero.MoneroTxBacklogEntry ::: monero.MoneroOutputDistributionEntry @@ -53,6 +69,8 @@ title: Daemon Data Model ::: monero.MoneroDaemonSyncInfo +::: monero.MoneroDaemonNetworkStats + ::: monero.MoneroHardForkInfo -::: monero.MoneroDaemonListener \ No newline at end of file +::: monero.MoneroDaemonListener diff --git a/docs/mkdocs/docs/en/api/data_model/wallet.md b/docs/mkdocs/docs/en/api/data_model/wallet.md index d231ca1..77f7472 100644 --- a/docs/mkdocs/docs/en/api/data_model/wallet.md +++ b/docs/mkdocs/docs/en/api/data_model/wallet.md @@ -37,6 +37,8 @@ title: Wallet Data Model ::: monero.MoneroTxConfig +::: monero.MoneroKeyImageExportResult + ::: monero.MoneroKeyImageImportResult ::: monero.MoneroMessageSignatureType @@ -63,4 +65,4 @@ title: Wallet Data Model ::: monero.MoneroAccountTag -::: monero.MoneroWalletListener \ No newline at end of file +::: monero.MoneroWalletListener diff --git a/docs/mkdocs/docs/en/api/errors.md b/docs/mkdocs/docs/en/api/errors.md new file mode 100644 index 0000000..2f42ea3 --- /dev/null +++ b/docs/mkdocs/docs/en/api/errors.md @@ -0,0 +1,8 @@ +--- +title: Errors +--- +# Errors + +::: monero.MoneroError + +::: monero.MoneroRpcError diff --git a/docs/mkdocs/docs/en/api/utils.md b/docs/mkdocs/docs/en/api/utils.md index 69561a4..718913c 100644 --- a/docs/mkdocs/docs/en/api/utils.md +++ b/docs/mkdocs/docs/en/api/utils.md @@ -4,3 +4,13 @@ title: Monero Utilities # Monero Utilities ::: monero.MoneroUtils + +::: monero.GenUtils + +## Comparators + +::: monero.TxHeightComparator + +::: monero.IncomingTransferComparator + +::: monero.OutputComparator diff --git a/docs/mkdocs/docs/macros/includes/.gitkeep b/docs/mkdocs/docs/macros/includes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/mkdocs/mkdocs.yml b/docs/mkdocs/mkdocs.yml index 00b771f..c9fe97d 100644 --- a/docs/mkdocs/mkdocs.yml +++ b/docs/mkdocs/mkdocs.yml @@ -13,6 +13,7 @@ nav: - Architecture: 'api/architecture.md' - API Reference: - Serializable Struct: 'api/serializable_struct.md' + - Errors: 'api/errors.md' - Connection: - Data Model: 'api/data_model/connection.md' - RPC: 'api/connection.md' diff --git a/docs/mkdocs/public/404.html b/docs/mkdocs/public/404.html index e1d93da..a268265 100644 --- a/docs/mkdocs/public/404.html +++ b/docs/mkdocs/public/404.html @@ -1 +1 @@ -


MoneroRpcConnection ¶ Bases: SerializableStruct
Models a connection to a daemon.
password: str | None property ¶Connection authentication password.
priority: int instance-attribute ¶Connection priority.
proxy_uri: str | None instance-attribute ¶Connection proxy address.
response_time: int | None property ¶Connection response time in milliseconds.
timeout_ms: int instance-attribute ¶Connection timeout (milliseconds).
uri: str | None instance-attribute ¶Connection uri.
username: str | None property ¶Connection authentication username.
zmq_uri: str | None instance-attribute ¶ZMQ connection uri.
check_connection(timeout_ms=None) ¶Check the connection and update online, authentication, and response time status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout_ms | int|None | the maximum response time before considered offline. | None |
Returns:
| Type | Description |
|---|---|
bool |
|
compare(p1, p2) staticmethod ¶Compare connection priorities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 | int | first priority to check. | required |
p2 | int | second priority to check. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
get_attribute(key) ¶Returns RPC connection attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | attribute key. | required |
Returns:
| Type | Description |
|---|---|
str | attribute value. |
is_authenticated() ¶Indicates if the connection is authenticated according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
is_connected() ¶Indicates if the connection is connected according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
is_i2p() ¶Indicates if the connection is a I2P connection.
Returns:
| Type | Description |
|---|---|
bool |
|
is_onion() ¶Indicates if the connection is a TOR connection.
Returns:
| Type | Description |
|---|---|
bool |
|
is_online() ¶Indicates if the connection is online according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
send_binary_request(method, parameters=None, timeout_ms=None) ¶Send a binary RPC request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the path of the binary RPC method to invoke. | required |
parameters | Optional[object] | are the request parameters (default | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
bytes | None | the request's deserialized binary response. |
send_json_request(method, parameters=None, timeout_ms=None) ¶Send a request to the JSON-RPC API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the method to request. | required |
parameters | Optional[object] | are the request's input parameters (default | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
object | None | the RPC API response as a map. |
send_path_request(method, parameters=None, timeout_ms=None) ¶Send a RPC request to the given path and with the given paramters.
E.g. /get_transactions with params.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the url path of the request to invoke. | required |
parameters | Optional[object] | are request parameters sent in the body. | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
object | None | the request's deserialized response. |
set_attribute(key, value) ¶Set RPC connection attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | key attribute. | required |
value | str | value attribute. | required |
set_credentials(username, password) ¶Set RPC connection credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username | str | username used for RPC authentication. | required |
password | str | passowrd user for RPC authentication. | required |
MoneroRpcConnection ¶ Bases: SerializableStruct
Models a connection to a daemon.
password: str | None property ¶Connection authentication password.
priority: int instance-attribute ¶Connection priority.
proxy_uri: str | None instance-attribute ¶Connection proxy address.
response_time: int | None property ¶Connection response time in milliseconds.
timeout_ms: int instance-attribute ¶Connection timeout (milliseconds).
uri: str | None instance-attribute ¶Connection uri.
username: str | None property ¶Connection authentication username.
zmq_uri: str | None instance-attribute ¶ZMQ connection uri.
check_connection(timeout_ms=None) ¶Check the connection and update online, authentication, and response time status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout_ms | int|None | the maximum response time before considered offline. | None |
Returns:
| Type | Description |
|---|---|
bool |
|
compare(p1, p2) staticmethod ¶Compare connection priorities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 | int | first priority to check. | required |
p2 | int | second priority to check. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
deserialize(json) staticmethod ¶Deserialize a MoneroRpcConnection from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | MoneroRpcConnection in JSON format. | required |
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | deserialized instance. |
get_attribute(key) ¶Returns RPC connection attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | attribute key. | required |
Returns:
| Type | Description |
|---|---|
str | attribute value. |
is_authenticated() ¶Indicates if the connection is authenticated according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
is_connected() ¶Indicates if the connection is connected according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
is_i2p() ¶Indicates if the connection is a I2P connection.
Returns:
| Type | Description |
|---|---|
bool |
|
is_onion() ¶Indicates if the connection is a TOR connection.
Returns:
| Type | Description |
|---|---|
bool |
|
is_online() ¶Indicates if the connection is online according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
| Type | Description |
|---|---|
bool | None |
|
send_binary_request(method, parameters=None, timeout_ms=None) ¶Send a binary RPC request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the path of the binary RPC method to invoke. | required |
parameters | Optional[object] | are the request parameters (default | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
bytes | None | the request's deserialized binary response. |
send_json_request(method, parameters=None, timeout_ms=None) ¶Send a request to the JSON-RPC API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the method to request. | required |
parameters | Optional[object] | are the request's input parameters (default | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
object | None | the RPC API response as a map. |
send_path_request(method, parameters=None, timeout_ms=None) ¶Send a RPC request to the given path and with the given paramters.
E.g. /get_transactions with params.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | str | is the url path of the request to invoke. | required |
parameters | Optional[object] | are request parameters sent in the body. | None |
timeout_ms | Optional[int] | request timeout in milliseconds. | None |
Returns:
| Type | Description |
|---|---|
object | None | the request's deserialized response. |
set_attribute(key, value) ¶Set RPC connection attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | key attribute. | required |
value | str | value attribute. | required |
set_credentials(username, password) ¶Set RPC connection credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username | str | username used for RPC authentication. | required |
password | str | passowrd user for RPC authentication. | required |
MoneroDaemon ¶Monero daemon interface.
__init__() ¶Initialize a Monero daemon.
add_listener(listener) ¶Register a listener to receive daemon notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroDaemonListener | the listener to register. | required |
check_for_update() ¶Check for update.
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateCheckResult | the result of the update check. |
download_update(path='') ¶Download an update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | download path. | '' |
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateDownloadResult | the result of the update download. |
generate_blocks(wallet_address, num_blocks, prev_block_hash=None, starting_nonce=None) ¶Generate blocks to a wallet address (regtest only).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wallet_address | str | is the address of the wallet to receive miner transactions if block is successfully mined. | required |
num_blocks | int | is the number of blocks to generate. | required |
prev_block_hash | str|None | is the hash of the previous block to build on top of (optional, builds on the current tip if not given). | None |
starting_nonce | int|None | is the starting nonce to use (optional). | None |
Returns:
| Type | Description |
|---|---|
MoneroGenerateBlocksResult | the result of generating blocks; height is the height of the last block generated. |
get_alt_block_hashes() ¶Get known block hashes which are not on the main chain.
Returns:
| Type | Description |
|---|---|
list[str] | known block hashes which are not on the main chain. |
get_alt_chains() ¶Get alternative chains seen by the node.
Returns:
| Type | Description |
|---|---|
list[MoneroAltChain] | alternative chains seen by the node. |
get_block_by_hash(hash) ¶Get a block by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hash | str | is the hash of the block to get. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlock | the block with the given hash. |
get_block_by_height(height) ¶Get a block by height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block to get. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlock | the block at the given height. |
get_block_hash(height) ¶Get a block's hash by its height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block hash to get. | required |
Returns:
| Type | Description |
|---|---|
str | the block's hash at the given height. |
get_block_hashes(block_hashes, start_height) ¶Get block hashes as a binary request to the daemon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_hashes | list[str] | specify block hashes to fetch; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block. | required |
start_height | int | is the starting height of block hashes to return. | required |
Returns:
| Type | Description |
|---|---|
list[str] | the requested block hashes. |
get_block_header_by_hash(hash) ¶Get a block header by its hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hash | str | is the hash of the block to get the header of. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the block's header. |
get_block_header_by_height(height) ¶Get a block header by its height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block to get the header of. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the block's header. |
get_block_headers_by_range(start_height, end_height) ¶Get block headers for the given range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlockHeader] | block headers in the given range. |
get_block_template(wallet_address, reserve_size=None) ¶Get a block template for mining a new block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wallet_address | str | is the address of the wallet to receive miner transactions if block is successfully mined. | required |
reserve_size | int|None | is the reserve size (optional). | None |
Returns:
| Type | Description |
|---|---|
MoneroBlockTemplate | a block template for mining a new block. |
get_blocks_by_hash(block_hashes, start_height, prune) ¶Get a block by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_hashes | list[str] | is the hash of the block to get. | required |
start_height | int | filter blocks by block height. | required |
prune | bool | prune hash. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | the block with the given hash. |
get_blocks_by_height(heights) ¶Get blocks at the given heights.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
heights | list[int] | are the heights of the blocks to get. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks at the given heights. |
get_blocks_by_range(start_height, end_height) ¶Get blocks in the given height range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks in the given height range. |
get_blocks_by_range_chunked(start_height, end_height, max_chunk_size=None) ¶Get blocks in the given height range as chunked requests so that each request is not too big.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
max_chunk_size | int | is the maximum chunk size in any one request (default 3,000,000 bytes). | None |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks in the given height range. |
get_download_limit() ¶Get the download bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | is the download bandwidth limit. |
get_fee_estimate(grace_blocks=0) ¶Get mining fee estimates per kB.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grace_blocks | int | number of blocks we want the fee estimate to be valid for. | 0 |
Returns:
| Type | Description |
|---|---|
MoneroFeeEstimate | mining fee estimates per kB. |
get_hard_fork_info() ¶Look up information regarding hard fork voting and readiness.
Returns:
| Type | Description |
|---|---|
MoneroHardForkInfo | hard fork information. |
get_height() ¶Get the number of blocks in the longest chain known to the node.
Returns:
| Type | Description |
|---|---|
int | the number of blocks. |
get_info() ¶Get general information about the state of the node and the network.
Returns:
| Type | Description |
|---|---|
MoneroDaemonInfo | general information about the node and network. |
get_key_image_spent_status(key_image) ¶Get the spent status of the given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | is key image hex to get the status of. | required |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageSpentStatus | the status of the key image. |
get_key_image_spent_statuses(key_images) ¶Get the spent status of each given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_images | list[str] | are hex key images to get the statuses of. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroKeyImageSpentStatus] | the spent status for each key image. |
get_known_peers() ¶Get all known peers including their last known online status.
Returns:
| Type | Description |
|---|---|
list[MoneroPeer] | the daemon's known peers. |
get_last_block_header() ¶get_listeners() ¶Get the listeners registered with the daemon.
Returns:
| Type | Description |
|---|---|
list[MoneroDaemonListener] | the registered listeners. |
get_miner_tx_sum(height, num_blocks) ¶Gets the total emissions and fees from the genesis block to the current height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height to start computing the miner sum. | required |
num_blocks | int | are the number of blocks to include in the sum. | required |
Returns:
| Type | Description |
|---|---|
MoneroMinerTxSum | the sum emission and fees since the geneis block. |
get_mining_status() ¶Get the daemon's mining status.
Returns:
| Type | Description |
|---|---|
MoneroMiningStatus | the daemon's mining status. |
get_output_distribution(amounts, is_cumulative=None, start_height=None, end_height=None) ¶Creates an output distribution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amounts | list[int] | are amounts of outputs to make the distribution with. | required |
is_cumulative | bool|None | specifies if the results should be cumulative (optional). | None |
start_height | int|None | is the start height lower bound inclusive (optional). | None |
end_height | int|None | is the end height upper bound inclusive (optional). | None |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputDistributionEntry] | output distribution entries meeting the parameters. |
get_output_histogram(amounts, min_count, max_count, is_unlocked, recent_cutoff) ¶Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amounts | list[int] | are amounts of outputs to make the histogram with (atomic-units). | required |
min_count | Optional[int] | filter amounts with at least this number of outputs. | required |
max_count | Optional[int] | filter amounts with at most this number of outputs. | required |
is_unlocked | Optional[bool] | makes a histogram with outputs with the specified lock state. | required |
recent_cutoff | Optional[int] | exclude outputs from older than this timestamp. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputHistogramEntry] | output histogram entries meeting the parameters. |
get_outputs(outputs) ¶Get outputs identified by a list of output amounts and indices as a binary request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs | list[MoneroOutput] | identify each output by amount and index. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutput] | the identified outputs. |
get_peer_bans() ¶get_peers() ¶Get peers with active incoming or outgoing connections to the node.
Returns:
| Type | Description |
|---|---|
list[MoneroPeer] | the daemon's peers. |
get_sync_info() ¶Get synchronization information.
Returns:
| Type | Description |
|---|---|
MoneroDaemonSyncInfo | contains sync information. |
get_tx(tx_hash, prune=False) ¶Get a transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the hash of the transaction to get. | required |
prune | bool | specifies if the returned tx should be pruned (defaults to | False |
Returns:
| Type | Description |
|---|---|
MoneroTx | None | the transaction with the given hash or null if not found. |
get_tx_hex(tx_hash, prune=False) ¶Get a transaction hex by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the hash of the transaction to get hex from. | required |
prune | bool | specifies if the returned tx hex should be pruned (defaults to | False |
Returns:
| Type | Description |
|---|---|
str | None | the tx hex with the given hash. |
get_tx_hexes(tx_hashes, prune=False) ¶Get transaction hexes by hashes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | are hashes of transactions to get hexes from | required |
prune | bool | Prune transaction hashes. | False |
Returns:
| Type | Description |
|---|---|
list[str] | are the tx hexes. |
get_tx_pool() ¶Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.
Returns:
| Type | Description |
|---|---|
list[MoneroTx] | transactions in the transaction pool. |
get_tx_pool_backlog() ¶Get all transaction pool backlog.
Returns:
| Type | Description |
|---|---|
list[MoneroTxBacklogEntry] | transaction pool backlog entries. |
get_tx_pool_hashes() ¶Get hashes of transactions in the transaction pool.
Returns:
| Type | Description |
|---|---|
list[str] | hashes of transactions in the transaction pool. |
get_tx_pool_stats() ¶Get transaction pool statistics.
Returns:
| Type | Description |
|---|---|
MoneroTxPoolStats | statistics about the transaction pool. |
get_txs(tx_hashes, prune=False) ¶Get transactions by hashes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | are hashes of transactions to get. | required |
prune | bool | Prune transactions. | False |
Returns:
| Type | Description |
|---|---|
list[MoneroTx] | found transactions with the given hashes. |
get_upload_limit() ¶Get the upload bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | is the upload bandwidth limit. |
get_version() ¶is_trusted() ¶Indicates if the daemon is trusted or untrusted.
Returns:
| Type | Description |
|---|---|
bool |
|
prune_blockchain(check) ¶Prune the blockchain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check | bool | specifies to check the pruning (default | required |
Returns:
| Type | Description |
|---|---|
MoneroPruneResult | the prune result. |
relay_tx_by_hash(tx_hash) ¶Relays a transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | identifies the transaction to relay. | required |
relay_txs_by_hash(tx_hashes) ¶Relays transactions by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | identify the transactions to relay. | required |
remove_listener(listener) ¶Unregister a listener to receive daemon notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroDaemonListener | a previously registered listener to be unregistered. | required |
reset_download_limit() ¶Reset the download bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | the download bandwidth limit after resetting. |
reset_upload_limit() ¶Reset the upload bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | the upload bandwidth limit after resetting. |
set_download_limit(limit) ¶Set the download bandwidth limit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the download limit to set ( | required |
Returns:
| Type | Description |
|---|---|
int | is the new download limit after setting. |
set_incoming_peer_limit(limit) ¶Limit number of incoming peers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the maximum number of incoming peers. | required |
set_outgoing_peer_limit(limit) ¶Limit number of outgoing peers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the maximum number of outgoing peers. | required |
set_peer_ban(ban) ¶Ban a peer node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ban | MoneroBan | contains information about a node to ban. | required |
set_peer_bans(bans) ¶Ban peers nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bans | list[MoneroBan] | are bans to apply against peer nodes. | required |
set_upload_limit(limit) ¶Set the upload bandwidth limit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the upload limit to set ( | required |
Returns:
| Type | Description |
|---|---|
int | is the new upload limit after setting. |
start_mining(address, num_threads, is_background, ignore_battery) ¶Start mining.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address given miner rewards if the daemon mines a block. | required |
num_threads | int | is the number of mining threads to run. | required |
is_background | bool | specifies if the miner should run in the background or not. | required |
ignore_battery | bool | specifies if the battery state (e.g. on laptop) should be ignored or not. | required |
stop() ¶Safely disconnect and shut down the daemon.
stop_mining() ¶Stop mining.
submit_block(block_blob) ¶Submit a mined block to the network.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_blob | str | is the mined block to submit. | required |
submit_blocks(block_blobs) ¶Submit mined blocks to the network.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_blobs | list[str] | are the mined blocks to submit. | required |
submit_tx_hex(tx_hex, do_not_relay=False) ¶Submits a transaction to the daemon's pool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hex | str | is the raw transaction hex to submit. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubmitTxResult | the submission results. |
wait_for_next_block_header() ¶Get the header of the next block added to the chain.
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the header of the next block added to the chain. |
MoneroDaemon ¶Monero daemon interface.
__init__() ¶Initialize a Monero daemon.
add_auxiliary_pow(block_template_blob, aux_pow) ¶Add auxiliary proof-of-work to a block template for merge mining.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_template_blob | str | the block template blob to add auxiliary PoW to. | required |
aux_pow | list[MoneroAuxiliaryPow] | identifies each auxiliary chain by id and its block's PoW hash. | required |
Returns:
| Type | Description |
|---|---|
MoneroAddAuxiliaryPowResult | the updated block template along with the (possibly reordered) auxiliary PoW. |
add_listener(listener) ¶Register a listener to receive daemon notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroDaemonListener | the listener to register. | required |
calculate_pow(major_version, height, block_blob, seed_hash) ¶Calculate the proof-of-work hash of a mined block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
major_version | int | the block's major version. | required |
height | int | the block's height. | required |
block_blob | str | the block's blob to hash. | required |
seed_hash | str | the seed hash used to select the RandomX dataset/cache. | required |
Returns:
| Type | Description |
|---|---|
str | the block's proof-of-work hash. |
check_for_update() ¶Check for update.
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateCheckResult | the result of the update check. |
download_update(path='') ¶Download an update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | download path. | '' |
Returns:
| Type | Description |
|---|---|
MoneroDaemonUpdateDownloadResult | the result of the update download. |
flush_cache(bad_blocks=False) ¶Flush the daemon's invalid block and transaction caches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bad_blocks | bool | specifies to also flush the bad blocks cache. | False |
generate_blocks(wallet_address, num_blocks, prev_block_hash=None, starting_nonce=None) ¶Generate blocks to a wallet address (regtest only).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wallet_address | str | is the address of the wallet to receive miner transactions if block is successfully mined. | required |
num_blocks | int | is the number of blocks to generate. | required |
prev_block_hash | str|None | is the hash of the previous block to build on top of (optional, builds on the current tip if not given). | None |
starting_nonce | int|None | is the starting nonce to use (optional). | None |
Returns:
| Type | Description |
|---|---|
MoneroGenerateBlocksResult | the result of generating blocks; height is the height of the last block generated. |
get_alt_block_hashes() ¶Get known block hashes which are not on the main chain.
Returns:
| Type | Description |
|---|---|
list[str] | known block hashes which are not on the main chain. |
get_alt_chains() ¶Get alternative chains seen by the node.
Returns:
| Type | Description |
|---|---|
list[MoneroAltChain] | alternative chains seen by the node. |
get_block_by_hash(hash) ¶Get a block by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hash | str | is the hash of the block to get. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlock | the block with the given hash. |
get_block_by_height(height) ¶Get a block by height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block to get. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlock | the block at the given height. |
get_block_hash(height) ¶Get a block's hash by its height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block hash to get. | required |
Returns:
| Type | Description |
|---|---|
str | the block's hash at the given height. |
get_block_hashes(block_hashes) ¶Get block hashes as a binary request to the daemon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_hashes | list[str] | a short chain history; first 10 block hashes go sequential, next go in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always the genesis block, which is required or the request fails. | required |
Returns:
| Type | Description |
|---|---|
MoneroGetBlockHashesResult | the requested hashes plus their start height and the daemon's current chain height. |
get_block_header_by_hash(hash) ¶Get a block header by its hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hash | str | is the hash of the block to get the header of. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the block's header. |
get_block_header_by_height(height) ¶Get a block header by its height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height of the block to get the header of. | required |
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the block's header. |
get_block_headers_by_range(start_height, end_height) ¶Get block headers for the given range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlockHeader] | block headers in the given range. |
get_block_template(wallet_address, reserve_size=None) ¶Get a block template for mining a new block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wallet_address | str | is the address of the wallet to receive miner transactions if block is successfully mined. | required |
reserve_size | int|None | is the reserve size (optional). | None |
Returns:
| Type | Description |
|---|---|
MoneroBlockTemplate | a block template for mining a new block. |
get_blocks_by_hash(block_hashes, start_height, prune, max_block_count=0) ¶Get blocks by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_hashes | list[str] | a short chain history; first 10 block hashes go sequential, next go in pow(2,n) offset, and the last one is always the genesis block. | required |
start_height | int | the start height to resume from; when non-zero the daemon skips the search for the last common block and uses it as-is. | required |
prune | bool | whether returned blocks should be pruned. | required |
max_block_count | int | caps how many blocks the daemon returns in one call (0 leaves it to the daemon's own default limit). | 0 |
Returns:
| Type | Description |
|---|---|
MoneroGetBlocksByHashResult | the retrieved blocks plus the daemon's current chain height. |
get_blocks_by_height(heights) ¶Get blocks at the given heights.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
heights | list[int] | are the heights of the blocks to get. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks at the given heights. |
get_blocks_by_range(start_height, end_height) ¶Get blocks in the given height range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks in the given height range. |
get_blocks_by_range_chunked(start_height, end_height, max_chunk_size=None) ¶Get blocks in the given height range as chunked requests so that each request is not too big.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_height | int | is the start height lower bound inclusive (optional). | required |
end_height | int | is the end height upper bound inclusive (optional). | required |
max_chunk_size | int | is the maximum chunk size in any one request (default 3,000,000 bytes). | None |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | blocks in the given height range. |
get_download_limit() ¶Get the download bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | is the download bandwidth limit. |
get_fee_estimate(grace_blocks=0) ¶Get mining fee estimates per kB.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grace_blocks | int | number of blocks we want the fee estimate to be valid for. | 0 |
Returns:
| Type | Description |
|---|---|
MoneroFeeEstimate | mining fee estimates per kB. |
get_hard_fork_info() ¶Look up information regarding hard fork voting and readiness.
Returns:
| Type | Description |
|---|---|
MoneroHardForkInfo | hard fork information. |
get_height() ¶Get the number of blocks in the longest chain known to the node.
Returns:
| Type | Description |
|---|---|
int | the number of blocks. |
get_info() ¶Get general information about the state of the node and the network.
Returns:
| Type | Description |
|---|---|
MoneroDaemonInfo | general information about the node and network. |
get_key_image_spent_status(key_image) ¶Get the spent status of the given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | is key image hex to get the status of. | required |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageSpentStatus | the status of the key image. |
get_key_image_spent_statuses(key_images) ¶Get the spent status of each given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_images | list[str] | are hex key images to get the statuses of. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroKeyImageSpentStatus] | the spent status for each key image. |
get_known_peers() ¶Get all known peers including their last known online status.
Returns:
| Type | Description |
|---|---|
list[MoneroPeer] | the daemon's known peers. |
get_last_block_header() ¶get_listeners() ¶Get the listeners registered with the daemon.
Returns:
| Type | Description |
|---|---|
list[MoneroDaemonListener] | the registered listeners. |
get_miner_data() ¶Get the data needed to construct a block template for mining, e.g. for use by a pool that assembles its own block templates.
Returns:
| Type | Description |
|---|---|
MoneroMinerData | the current data for mining a new block. |
get_miner_tx_sum(height, num_blocks) ¶Gets the total emissions and fees from the genesis block to the current height.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | int | is the height to start computing the miner sum. | required |
num_blocks | int | are the number of blocks to include in the sum. | required |
Returns:
| Type | Description |
|---|---|
MoneroMinerTxSum | the sum emission and fees since the geneis block. |
get_mining_status() ¶Get the daemon's mining status.
Returns:
| Type | Description |
|---|---|
MoneroMiningStatus | the daemon's mining status. |
get_network_stats() ¶Get network (bandwidth) statistics since the daemon started.
Returns:
| Type | Description |
|---|---|
MoneroDaemonNetworkStats | the daemon's network statistics. |
get_output_distribution(amounts, is_cumulative=None, start_height=None, end_height=None) ¶Creates an output distribution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amounts | list[int] | are amounts of outputs to make the distribution with. | required |
is_cumulative | bool|None | specifies if the results should be cumulative (optional). | None |
start_height | int|None | is the start height lower bound inclusive (optional). | None |
end_height | int|None | is the end height upper bound inclusive (optional). | None |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputDistributionEntry] | output distribution entries meeting the parameters. |
get_output_histogram(amounts, min_count, max_count, is_unlocked, recent_cutoff) ¶Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amounts | list[int] | are amounts of outputs to make the histogram with (atomic-units). | required |
min_count | Optional[int] | filter amounts with at least this number of outputs. | required |
max_count | Optional[int] | filter amounts with at most this number of outputs. | required |
is_unlocked | Optional[bool] | makes a histogram with outputs with the specified lock state. | required |
recent_cutoff | Optional[int] | exclude outputs from older than this timestamp. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputHistogramEntry] | output histogram entries meeting the parameters. |
get_output_indices(tx_hash) ¶Get the global output index of each output in a transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | the hash of the transaction to get output indices for. | required |
Returns:
| Type | Description |
|---|---|
list[int] | the global output index of each output in the transaction, in order. |
get_outputs(outputs) ¶Get outputs identified by a list of output amounts and indices as a binary request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs | list[MoneroOutput] | identify each output by amount and index. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroOutput] | the identified outputs. |
get_peer_ban(address) ¶Get the ban status of a peer node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | the address of the peer node to check, e.g. "1.2.3.4" or "1.2.3.4:18080". | required |
Returns:
| Type | Description |
|---|---|
MoneroBan | the peer's ban status. |
get_peer_bans() ¶get_peers() ¶Get peers with active incoming or outgoing connections to the node.
Returns:
| Type | Description |
|---|---|
list[MoneroPeer] | the daemon's peers. |
get_public_peers(include_offline=False) ¶Get public nodes known to the daemon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_offline | bool | specifies if offline nodes should be included. | False |
Returns:
| Type | Description |
|---|---|
list[MoneroPeer] | the daemon's known public nodes. |
get_sync_info() ¶Get synchronization information.
Returns:
| Type | Description |
|---|---|
MoneroDaemonSyncInfo | contains sync information. |
get_tx(tx_hash, prune=False) ¶Get a transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the hash of the transaction to get. | required |
prune | bool | specifies if the returned tx should be pruned (defaults to | False |
Returns:
| Type | Description |
|---|---|
MoneroTx | None | the transaction with the given hash or null if not found. |
get_tx_hex(tx_hash, prune=False) ¶Get a transaction hex by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the hash of the transaction to get hex from. | required |
prune | bool | specifies if the returned tx hex should be pruned (defaults to | False |
Returns:
| Type | Description |
|---|---|
str | None | the tx hex with the given hash. |
get_tx_hexes(tx_hashes, prune=False) ¶Get transaction hexes by hashes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | are hashes of transactions to get hexes from | required |
prune | bool | Prune transaction hashes. | False |
Returns:
| Type | Description |
|---|---|
list[str] | are the tx hexes. |
get_tx_pool() ¶Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.
Returns:
| Type | Description |
|---|---|
list[MoneroTx] | transactions in the transaction pool. |
get_tx_pool_backlog() ¶Get all transaction pool backlog.
Returns:
| Type | Description |
|---|---|
list[MoneroTxBacklogEntry] | transaction pool backlog entries. |
get_tx_pool_hashes() ¶Get hashes of transactions in the transaction pool.
Returns:
| Type | Description |
|---|---|
list[str] | hashes of transactions in the transaction pool. |
get_tx_pool_stats() ¶Get transaction pool statistics.
Returns:
| Type | Description |
|---|---|
MoneroTxPoolStats | statistics about the transaction pool. |
get_txs(tx_hashes, prune=False) ¶Get transactions by hashes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | are hashes of transactions to get. | required |
prune | bool | Prune transactions. | False |
Returns:
| Type | Description |
|---|---|
list[MoneroTx] | found transactions with the given hashes. |
get_upload_limit() ¶Get the upload bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | is the upload bandwidth limit. |
get_version() ¶is_trusted() ¶Indicates if the daemon is trusted or untrusted.
Returns:
| Type | Description |
|---|---|
bool |
|
pop_blocks(num_blocks) ¶Pop (remove) blocks from the top of the blockchain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_blocks | int | the number of blocks to pop. | required |
Returns:
| Type | Description |
|---|---|
int | the blockchain height after popping the blocks. |
prune_blockchain(check) ¶Prune the blockchain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check | bool | specifies to check the pruning (default | required |
Returns:
| Type | Description |
|---|---|
MoneroPruneResult | the prune result. |
relay_tx_by_hash(tx_hash) ¶Relays a transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | identifies the transaction to relay. | required |
relay_txs_by_hash(tx_hashes) ¶Relays transactions by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | identify the transactions to relay. | required |
remove_bootstrap_daemon() ¶Disable the bootstrap daemon so the daemon no longer falls back to it.
remove_listener(listener) ¶Unregister a listener to receive daemon notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroDaemonListener | a previously registered listener to be unregistered. | required |
remove_listeners() ¶Unregister all listeners registered with the daemon.
reset_download_limit() ¶Reset the download bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | the download bandwidth limit after resetting. |
reset_upload_limit() ¶Reset the upload bandwidth limit.
Returns:
| Type | Description |
|---|---|
int | the upload bandwidth limit after resetting. |
save_blockchain() ¶Save (flush) the blockchain to disk.
set_bootstrap_daemon(address, username='', password='', proxy='') ¶Set the bootstrap daemon used by the daemon to serve requests while it is not fully synced, e.g. a remote node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | the bootstrap daemon's address (host:port), "auto" to select a public node automatically, or an empty string to disable the bootstrap daemon. | required |
username | str | the username to authenticate with the bootstrap daemon (optional). | '' |
password | str | the password to authenticate with the bootstrap daemon (optional). | '' |
proxy | str | the proxy used to reach the bootstrap daemon, e.g. a SOCKS proxy (optional). | '' |
set_download_limit(limit) ¶Set the download bandwidth limit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the download limit to set ( | required |
Returns:
| Type | Description |
|---|---|
int | is the new download limit after setting. |
set_incoming_peer_limit(limit) ¶Limit number of incoming peers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the maximum number of incoming peers. | required |
set_log_categories(categories='') ¶Set the daemon's log categories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
categories | str | the log categories to set, e.g. "*:WARNING,net.p2p:DEBUG" (an empty string resets categories to the default). | '' |
Returns:
| Type | Description |
|---|---|
str | the daemon's resulting log categories. |
set_log_hash_rate(is_visible) ¶Show or hide the mining hash rate in the daemon's console log.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_visible | bool | specifies if the hash rate should be logged. | required |
set_log_level(level) ¶Set the daemon's log level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level | int | the log level to set, from 0 (least verbose) to 4 (most verbose). | required |
set_outgoing_peer_limit(limit) ¶Limit number of outgoing peers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the maximum number of outgoing peers. | required |
set_peer_ban(ban) ¶Ban a peer node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ban | MoneroBan | contains information about a node to ban. | required |
set_peer_bans(bans) ¶Ban peers nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bans | list[MoneroBan] | are bans to apply against peer nodes. | required |
set_upload_limit(limit) ¶Set the upload bandwidth limit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | is the upload limit to set ( | required |
Returns:
| Type | Description |
|---|---|
int | is the new upload limit after setting. |
start_mining(address, num_threads, is_background, ignore_battery) ¶Start mining.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address given miner rewards if the daemon mines a block. | required |
num_threads | int | is the number of mining threads to run. | required |
is_background | bool | specifies if the miner should run in the background or not. | required |
ignore_battery | bool | specifies if the battery state (e.g. on laptop) should be ignored or not. | required |
stop() ¶Safely disconnect and shut down the daemon.
stop_mining() ¶Stop mining.
submit_block(block_blob) ¶Submit a mined block to the network.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_blob | str | is the mined block to submit. | required |
submit_blocks(block_blobs) ¶Submit mined blocks to the network.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_blobs | list[str] | are the mined blocks to submit. | required |
submit_tx_hex(tx_hex, do_not_relay=False) ¶Submits a transaction to the daemon's pool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hex | str | is the raw transaction hex to submit. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubmitTxResult | the submission results. |
wait_for_next_block_header() ¶Get the header of the next block added to the chain.
Returns:
| Type | Description |
|---|---|
MoneroBlockHeader | the header of the next block added to the chain. |
MoneroDaemonRpc ¶ Bases: MoneroDaemon
Implements a MoneroDaemon using monerod-rpc_.
.. _monerod-rpc: https://docs.getmonero.org/rpc-library/monerod-rpc/
get_rpc_connection() ¶Get the daemon's RPC connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | the daemon's rpc connection. |
is_connected() ¶Indicates if the client is connected to the daemon via RPC.
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroDaemonRpc ¶ Bases: MoneroDaemon
Implements a MoneroDaemon using monerod-rpc_.
.. _monerod-rpc: https://docs.getmonero.org/rpc-library/monerod-rpc/
get_rpc_connection() ¶Get the daemon's RPC connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | the daemon's rpc connection. |
is_connected() ¶Indicates if the client is connected to the daemon via RPC.
Returns:
| Type | Description |
|---|---|
bool |
|
SslOptions ¶ Bases: SerializableStruct
Models SSL options for a Monero rpc connection.
ssl_allow_any_cert: bool | None instance-attribute ¶Allow any certificate.
ssl_allowed_fingerprints: list[str] instance-attribute ¶Allowed ssl fingerprints.
ssl_ca_file: str | None instance-attribute ¶Path to ssl CA file.
ssl_certificate_path: str | None instance-attribute ¶Path to private ssl certificate.
ssl_private_key_path: str | None instance-attribute ¶Path to private ssl key.
__init__() ¶Initialize a new rpc connection ssl options.
MoneroConnectionType ¶ Bases: IntEnum
Enumerates a connection type, wich can be IPV4, IPV6, TOR, I2P or INVALID.
I2P = 4 class-attribute instance-attribute ¶4 Indicates that Monero connection type is I2P.
INVALID = 0 class-attribute instance-attribute ¶0 Indicates that Monero connection type is invalid.
IPV4 = 1 class-attribute instance-attribute ¶1 Indicates that Monero connection type is IPV4.
IPV6 = 2 class-attribute instance-attribute ¶2 Indicates that Monero connection type is IPV6.
TOR = 3 class-attribute instance-attribute ¶3 Indicates that Monero connection type is TOR.
SslOptions ¶ Bases: SerializableStruct
Models SSL options for a Monero rpc connection.
ssl_allow_any_cert: bool | None instance-attribute ¶Allow any certificate.
ssl_allowed_fingerprints: list[str] instance-attribute ¶Allowed ssl fingerprints.
ssl_ca_file: str | None instance-attribute ¶Path to ssl CA file.
ssl_certificate_path: str | None instance-attribute ¶Path to private ssl certificate.
ssl_private_key_path: str | None instance-attribute ¶Path to private ssl key.
__init__() ¶Initialize a new rpc connection ssl options.
deserialize(json) staticmethod ¶Deserialize an SslOptions from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json | str | SslOptions in JSON format. | required |
Returns:
| Type | Description |
|---|---|
SslOptions | deserialized instance. |
MoneroConnectionType ¶ Bases: IntEnum
Enumerates a connection type, wich can be IPV4, IPV6, TOR, I2P or INVALID.
I2P = 4 class-attribute instance-attribute ¶4 Indicates that Monero connection type is I2P.
INVALID = 0 class-attribute instance-attribute ¶0 Indicates that Monero connection type is invalid.
IPV4 = 1 class-attribute instance-attribute ¶1 Indicates that Monero connection type is IPV4.
IPV6 = 2 class-attribute instance-attribute ¶2 Indicates that Monero connection type is IPV6.
TOR = 3 class-attribute instance-attribute ¶3 Indicates that Monero connection type is TOR.
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.
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() ¶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() ¶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_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 ¶Transaction indexes.
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.
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_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 |
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.
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() ¶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.
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.
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.
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.
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 ¶Reserved offset.
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.
MoneroConnectionSpan ¶ Bases: SerializableStruct
Monero daemon connection span.
connection_id: str | None instance-attribute ¶Id of connection
num_blocks: int | None instance-attribute ¶Number of blocks in this span
rate: int | None instance-attribute ¶Connection rate
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 ¶Connection speed.
start_height: int | None instance-attribute ¶Block height of the first block in that span.
__init__() ¶Initialize a Monero connection span.
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.
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_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.
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 ¶The output distibution.
start_height: int | None instance-attribute ¶Not necessarily equal to start_height parameter especially for amount = 0 where start_height will be no less than the height of the v4 hardfork.
__init__() ¶Initialize a Monero output distribution entry.
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.
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.
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.
MoneroDaemonUpdateDownloadResult ¶ Bases: MoneroDaemonUpdateCheckResult
Models the result of downloading a daemon update.
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.
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_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.
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.
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.
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 |
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 |
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.
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.
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.
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.
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. |
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.
copy() ¶Copy current incoming transfer.
Returns:
| Type | Description |
|---|---|
MoneroIncomingTransfer | incoming transfer copy. |
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. |
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_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.
copy() ¶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_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_locked: bool | None instance-attribute ¶Indicates if the transaction is locked.
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() ¶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_inputs_wallet(query=None) ¶Get wallet inputs filtered by query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query | MoneroOutputQuery | query to filter outputs with. | None |
Returns:
| Type | Description |
|---|---|
list[MoneroOutputWallet] | wallet outputs filtered by query. |
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_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 ¶Multisignature transaction hex.
signed_tx_hex: str | None instance-attribute ¶Signed transaction hex.
txs: list[MoneroTxWallet] instance-attribute ¶List of transactions defined in this set.
unsigned_tx_hex: str | None instance-attribute ¶Unsigned transaction hex.
__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.
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 |
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.
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.
MoneroCheck ¶ Bases: SerializableStruct
Base model for results from checking a transaction or reserve proof.
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.
MoneroCheckReserve ¶ Bases: MoneroCheck
Models the results from checking a reserve proof.
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.
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.
MoneroMultisigSignResult ¶ Bases: SerializableStruct
Models the result of signing multisig tx hex.
MoneroAddressBookEntry ¶ Bases: SerializableStruct
Monero address book entry model.
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.
__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 |
MoneroAccountTag ¶ Bases: SerializableStruct
Models a Monero account tag.
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 |
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 |
MoneroUtils ¶Collection of Monero utilities.
atomic_units_to_xmr(amount_atomic_units) staticmethod ¶Convert atomic units to XMR.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_atomic_units | int | amount in atomic units to convert to XMR. | required |
Returns:
| Type | Description |
|---|---|
float | amount in XMR. |
binary_blocks_to_json(bin) staticmethod ¶Deserialize blocks JSON string from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | blocks JSON string in binary format. | required |
Returns:
| Type | Description |
|---|---|
str | The deserialized blocks in JSON string format. |
binary_to_dict(bin) staticmethod ¶Deserialize a dictionary from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | Dictionary in binary format. | required |
Returns:
| Type | Description |
|---|---|
dict[Any, Any] | Deserialized dictionary. |
binary_to_json(bin) staticmethod ¶Deserialize a JSON string from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | JSON string in binary format. | required |
Returns:
| Type | Description |
|---|---|
str | The deserialized JSON string. |
configure_logging(path, console) staticmethod ¶Initialize logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | the path to write logs to. | required |
console | bool | specifies whether or not to write to the console. | required |
dict_to_binary(dictionary) staticmethod ¶Converts a dictionary into binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dictionary | dict | The dictionary to convert in binary format. | required |
Returns:
| Type | Description |
|---|---|
bytes | Binary format. |
get_blocks_from_outputs(outputs) staticmethod ¶Get distinct blocks from outputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs | list[MoneroOutputWallet] | Outputs to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from outputs. |
get_blocks_from_transfers(transfers) staticmethod ¶Get distinct blocks from transfers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transfers | list[MoneroTransfer] | Transfers to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from transfers. |
get_blocks_from_txs(txs) staticmethod ¶Get distinct blocks from transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
txs | list[MoneroTxWallet] | Transactions to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from transactions. |
get_integrated_address(network_type, standard_address, payment_id='') staticmethod ¶Get an integrated address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network_type | MoneroNetworkType | is the network type of the integrated address. | required |
standard_address | str | is the address to derive the integrated address from. | required |
payment_id | str | optionally specifies the integrated address's payment id (defaults to random payment id). | '' |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the integrated address. |
get_payment_uri(config, network_type=MoneroNetworkType.MAINNET) staticmethod ¶Creates a payment URI from a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | specifies configuration for a payment URI. | required |
network_type | MoneroNetworkType | address network type (optional). | MAINNET |
Returns:
| Type | Description |
|---|---|
str | the payment URI. |
get_ring_size() staticmethod ¶Get network-enforced ring size.
Returns:
| Type | Description |
|---|---|
int | network-enforced ring size. |
get_version() staticmethod ¶Get the version of the monero-python library.
Returns:
| Type | Description |
|---|---|
str | the version of this monero-python library |
is_valid_address(address, network_type) staticmethod ¶Determine if the given address is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to validate. | required |
network_type | MoneroNetworkType | is the address's network type. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_language(language) staticmethod ¶Indicates if the given language is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
language | str | is the language to validate | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_mnemonic(mnemonic, language='') staticmethod ¶Indicates if a mnemonic is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mnemonic | str | is the mnemonic to validate. | required |
language | str | is the mnemonic expected language. | '' |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_payment_id(payment_id) staticmethod ¶Indicates if a payment id is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_id | str | is the payment id to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_private_spend_key(private_spend_key) staticmethod ¶Indicates if a private spend key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_spend_key | str | is the private spend key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_private_view_key(private_view_key) staticmethod ¶Indicates if a private view key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_view_key | str | is the private view key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_public_spend_key(public_spend_key) staticmethod ¶Indicates if a public spend key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_spend_key | str | is the public spend key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_public_view_key(public_view_key) staticmethod ¶Indicates if a public view key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_view_key | str | is the public view key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
json_to_binary(json) staticmethod ¶Convert a JSON string into binary format.
Returns:
| Type | Description |
|---|---|
bytes | Binary format. |
log_debug(message) staticmethod ¶Log debug message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_error(message) staticmethod ¶Log error message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_info(message) staticmethod ¶Log info message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_trace(message) staticmethod ¶Log trace message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_warning(message) staticmethod ¶Log warning message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
set_log_categories(categories) staticmethod ¶Set the library's log categories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
categories | str | the library's log categories to set. | required |
set_log_level(loglevel) staticmethod ¶Set the library's log level with 0 being least verbose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loglevel | int | the library's log level. | required |
validate_address(address, network_type) staticmethod ¶Validates the given address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to validate. | required |
network_type | MoneroNetworkType | is the address's network type. | required |
validate_mnemonic(mnemonic, language='') staticmethod ¶Validates the given mnemonic phrase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mnemonic | str | is the mnemonic to validate. | required |
language | str | is the mnemonic expected language. | '' |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given mnemonic is invalid. |
validate_payment_id(payment_id) staticmethod ¶Validate a payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_id | str | is the payment id to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given payment id is invalid. |
validate_private_spend_key(private_spend_key) staticmethod ¶Validate a private spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_spend_key | str | is the private spend key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given private spend key is invalid. |
validate_private_view_key(private_view_key) staticmethod ¶Validate a private view key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_view_key | str | is the private view key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given private view key is invalid. |
validate_public_spend_key(public_spend_key) staticmethod ¶Validate a public spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_spend_key | str | is the public spend key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given public spend key is invalid. |
validate_public_view_key(public_view_key) staticmethod ¶Validate a public view key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_view_key | str | is the public view key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given public view key is invalid. |
xmr_to_atomic_units(amount_xmr) staticmethod ¶Convert XMR to atomic units.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_xmr | float | amount in XMR to convert to atomic units. | required |
Returns:
| Type | Description |
|---|---|
int | amount in atomic units. |
MoneroUtils ¶Collection of Monero utilities.
atomic_units_to_xmr(amount_atomic_units) staticmethod ¶Convert atomic units to XMR.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_atomic_units | int | amount in atomic units to convert to XMR. | required |
Returns:
| Type | Description |
|---|---|
float | amount in XMR. |
binary_blocks_fast_to_json(bin) staticmethod ¶Deserialize blocks JSON string from the daemon's fast (get_blocks.bin) binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | blocks JSON string in the fast binary format. | required |
Returns:
| Type | Description |
|---|---|
str | The deserialized blocks in JSON string format. |
binary_blocks_to_json(bin) staticmethod ¶Deserialize blocks JSON string from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | blocks JSON string in binary format. | required |
Returns:
| Type | Description |
|---|---|
str | The deserialized blocks in JSON string format. |
binary_to_dict(bin) staticmethod ¶Deserialize a dictionary from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | Dictionary in binary format. | required |
Returns:
| Type | Description |
|---|---|
dict[Any, Any] | Deserialized dictionary. |
binary_to_json(bin) staticmethod ¶Deserialize a JSON string from binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bin | bytes | JSON string in binary format. | required |
Returns:
| Type | Description |
|---|---|
str | The deserialized JSON string. |
configure_logging(path, console) staticmethod ¶Initialize logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | the path to write logs to. | required |
console | bool | specifies whether or not to write to the console. | required |
dict_to_binary(dictionary) staticmethod ¶Converts a dictionary into binary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dictionary | dict | The dictionary to convert in binary format. | required |
Returns:
| Type | Description |
|---|---|
bytes | Binary format. |
get_blocks_from_outputs(outputs) staticmethod ¶Get distinct blocks from outputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs | list[MoneroOutputWallet] | Outputs to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from outputs. |
get_blocks_from_transfers(transfers) staticmethod ¶Get distinct blocks from transfers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transfers | list[MoneroTransfer] | Transfers to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from transfers. |
get_blocks_from_txs(txs) staticmethod ¶Get distinct blocks from transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
txs | list[MoneroTxWallet] | Transactions to get blocks from. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroBlock] | Distinct blocks obtained from transactions. |
get_integrated_address(network_type, standard_address, payment_id='') staticmethod ¶Get an integrated address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network_type | MoneroNetworkType | is the network type of the integrated address. | required |
standard_address | str | is the address to derive the integrated address from. | required |
payment_id | str | optionally specifies the integrated address's payment id (defaults to random payment id). | '' |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the integrated address. |
get_payment_uri(config, network_type=MoneroNetworkType.MAINNET) staticmethod ¶Creates a payment URI from a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | specifies configuration for a payment URI. | required |
network_type | MoneroNetworkType | address network type (optional). | MAINNET |
Returns:
| Type | Description |
|---|---|
str | the payment URI. |
get_ring_size() staticmethod ¶Get network-enforced ring size.
Returns:
| Type | Description |
|---|---|
int | network-enforced ring size. |
get_version() staticmethod ¶Get the version of the monero-python library.
Returns:
| Type | Description |
|---|---|
str | the version of this monero-python library |
is_valid_address(address, network_type) staticmethod ¶Determine if the given address is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to validate. | required |
network_type | MoneroNetworkType | is the address's network type. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_language(language) staticmethod ¶Indicates if the given language is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
language | str | is the language to validate | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_mnemonic(mnemonic, language='') staticmethod ¶Indicates if a mnemonic is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mnemonic | str | is the mnemonic to validate. | required |
language | str | is the mnemonic expected language. | '' |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_payment_id(payment_id) staticmethod ¶Indicates if a payment id is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_id | str | is the payment id to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_private_spend_key(private_spend_key) staticmethod ¶Indicates if a private spend key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_spend_key | str | is the private spend key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_private_view_key(private_view_key) staticmethod ¶Indicates if a private view key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_view_key | str | is the private view key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_public_spend_key(public_spend_key) staticmethod ¶Indicates if a public spend key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_spend_key | str | is the public spend key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_valid_public_view_key(public_view_key) staticmethod ¶Indicates if a public view key is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_view_key | str | is the public view key to validate. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
json_to_binary(json) staticmethod ¶Convert a JSON string into binary format.
Returns:
| Type | Description |
|---|---|
bytes | Binary format. |
log_debug(message) staticmethod ¶Log debug message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_error(message) staticmethod ¶Log error message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_info(message) staticmethod ¶Log info message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_trace(message) staticmethod ¶Log trace message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
log_warning(message) staticmethod ¶Log warning message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | the message to log. | required |
set_log_categories(categories) staticmethod ¶Set the library's log categories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
categories | str | the library's log categories to set. | required |
set_log_level(loglevel) staticmethod ¶Set the library's log level with 0 being least verbose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loglevel | int | the library's log level. | required |
validate_address(address, network_type) staticmethod ¶Validates the given address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to validate. | required |
network_type | MoneroNetworkType | is the address's network type. | required |
validate_mnemonic(mnemonic, language='') staticmethod ¶Validates the given mnemonic phrase.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mnemonic | str | is the mnemonic to validate. | required |
language | str | is the mnemonic expected language. | '' |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given mnemonic is invalid. |
validate_payment_id(payment_id) staticmethod ¶Validate a payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment_id | str | is the payment id to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given payment id is invalid. |
validate_private_spend_key(private_spend_key) staticmethod ¶Validate a private spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_spend_key | str | is the private spend key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given private spend key is invalid. |
validate_private_view_key(private_view_key) staticmethod ¶Validate a private view key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
private_view_key | str | is the private view key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given private view key is invalid. |
validate_public_spend_key(public_spend_key) staticmethod ¶Validate a public spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_spend_key | str | is the public spend key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given public spend key is invalid. |
validate_public_view_key(public_view_key) staticmethod ¶Validate a public view key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_view_key | str | is the public view key to validate. | required |
Raises:
| Type | Description |
|---|---|
MoneroError | if the given public view key is invalid. |
xmr_to_atomic_units(amount_xmr) staticmethod ¶Convert XMR to atomic units.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_xmr | float | amount in XMR to convert to atomic units. | required |
Returns:
| Type | Description |
|---|---|
int | amount in atomic units. |
GenUtils ¶ Bases: ABC
Collection of generic utilities.
bool_equals(val, opt_val) staticmethod ¶Compare a bool to an optional bool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val | bool | value to compare. | required |
opt_val | bool|None | optional value to compare against; | required |
Returns:
| Type | Description |
|---|---|
bool |
|
get_uuid() staticmethod ¶Return a random unique identifier.
Returns:
| Type | Description |
|---|---|
str | a unique id. |
reconcile_bool(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod ¶Reconcile two optional bools to a single value, the same logic used internally to merge model fields (e.g. MoneroTx.merge()).
None), returns that value.None, returns the other, unless resolve_defined is False, in which case None is returned.resolve_true picks whichever operand equals resolve_true; else resolve_max picks the greater (True) or lesser (False) of the two, treating True as 1 and False as 0.Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val1 | bool|None | first value. | required |
val2 | bool|None | second value. | required |
resolve_defined | bool|None | when only one side is set and this is | None |
resolve_true | bool|None | when both sides are set and differ, prefer whichever operand equals this value. | None |
resolve_max | bool|None | when both sides are set and differ (and | None |
err_msg | str | extra context appended to the error message on conflict. | '' |
Returns:
| Type | Description |
|---|---|
bool | None | the reconciled value. |
Raises:
| Type | Description |
|---|---|
RuntimeError | If none of the above resolves. |
reconcile_string(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod ¶Reconcile two optional strings. Unlike the bool/int overloads, resolve_true/resolve_max are accepted for signature symmetry but are not used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val1 | str|None | first value. | required |
val2 | str|None | second value. | required |
resolve_defined | bool|None | see | None |
resolve_true | bool|None | accepted but ignored. | None |
resolve_max | bool|None | accepted but ignored. | None |
err_msg | str | extra context appended to the error message on conflict. | '' |
Returns:
| Type | Description |
|---|---|
str | None | the reconciled value. |
Raises:
| Type | Description |
|---|---|
RuntimeError | on different strings always regardless of |
reconcile_string_list(v1, v2, err_msg='') staticmethod ¶Reconcile two string lists: equal lists are returned as-is, an empty list yields the other.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v1 | list[str] | first list. | required |
v2 | list[str] | second list. | required |
err_msg | str | extra context appended to the error message on conflict. | '' |
Returns:
| Type | Description |
|---|---|
list[str] | the reconciled list. |
Raises:
| Type | Description |
|---|---|
RuntimeError | on two different non-empty lists. |
reconcile_uint64(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod ¶Reconcile two optional unsigned 64-bit integers. See reconcile_bool for the resolution rules (resolve_max here picks the numeric max/min).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val1 | int|None | first value. | required |
val2 | int|None | second value. | required |
resolve_defined | bool|None | see | None |
resolve_true | bool|None | see | None |
resolve_max | bool|None | prefer the larger ( | None |
err_msg | str | extra context appended to the error message on conflict. | '' |
Returns:
| Type | Description |
|---|---|
int | None | the reconciled value. |
Raises:
| Type | Description |
|---|---|
RuntimeError | If none of the above resolves. |
wait_for(duration_ms) staticmethod ¶Block the calling thread for the given duration. Releases the GIL while sleeping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration_ms | int | duration to wait, in milliseconds. | required |
Raises:
| Type | Description |
|---|---|
TypeError | Must be a non-negative number that fits in a valid |
TxHeightComparator ¶Compares two transactions by their height.
compare(tx1, tx2) staticmethod ¶Compare two transactions by height.
Unconfirmed transactions (no block) sort after confirmed ones; when both are unconfirmed or share the same height and block, their original order within the block's tx list is preserved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx1 | MoneroTx | first transaction to compare. | required |
tx2 | MoneroTx | second transaction to compare. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
IncomingTransferComparator ¶Compares two incoming transfers by ascending account and subaddress indices.
compare(transfer1, transfer2) staticmethod ¶Compare two incoming transfers.
Compares by transaction height first (see TxHeightComparator), then by account index, then by subaddress index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transfer1 | MoneroIncomingTransfer | first transfer to compare. | required |
transfer2 | MoneroIncomingTransfer | second transfer to compare. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
OutputComparator ¶Compares two wallet outputs by ascending account, subaddress and output index.
compare(output1, output2) staticmethod ¶Compare two wallet outputs.
Compares by transaction height first (see TxHeightComparator), then by account index, subaddress index, output index and finally key image hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output1 | MoneroOutputWallet | first output to compare. | required |
output2 | MoneroOutputWallet | second output to compare. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroWallet ¶Base wallet with default implementations.
DEFAULT_LANGUAGE: str instance-attribute ¶Default Monero wallet seed language.
__init__() ¶Initialize a Monero wallet.
add_address_book_entry(address, description) ¶Add an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the entry address. | required |
description | str | is the entry description (optional). | required |
Returns:
| Type | Description |
|---|---|
int | the index of the added entry. |
add_listener(listener) ¶Register a listener receive wallet notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroWalletListener | is the listener to receive wallet notifications. | required |
change_password(old_password, new_password) ¶Change the wallet password.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
old_password | str | is the wallet's old password. | required |
new_password | str | is the wallet's new password. | required |
check_reserve_proof(address, message, signature) ¶Proves a wallet has a disposable reserve using a signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the public wallet address. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the reserve proof signature to check. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckReserve | the result of checking the signature proof. |
check_spend_proof(tx_hash, message, signature) ¶Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the transaction signature to confirm. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
check_tx_key(tx_hash, tx_key, address) ¶Check a transaction in the blockchain with its secret key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to check. | required |
tx_key | str | is the transaction's secret key. | required |
address | str | is the destination public address of the transaction. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckTx | the result of the check. |
check_tx_proof(tx_hash, address, message, signature) ¶Prove a transaction by checking its signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
address | str | is the destination public address of the transaction. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the transaction signature to confirm. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckTx | the result of the check. |
close(save=False) ¶Optionally save then close the wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save | bool | specifies if the wallet should be saved before being closed (default | False |
create_account(label='') ¶Create a new account with a label for the first subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label | str | specifies the label for the account's first subaddress (optional). | '' |
Returns:
| Type | Description |
|---|---|
MoneroAccount | the created account. |
create_subaddress(account_idx, label='') ¶Create a subaddress within an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the index of the account to create the subaddress within. | required |
label | str | specifies the the label for the subaddress (defaults to empty string). | '' |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the created subaddress. |
create_tx(config) ¶Create a transaction to transfer funds from this wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the transaction to create. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | the created transaction. |
create_txs(config) ¶Create one or more transactions to transfer funds from this wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the transactions to create. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
decode_integrated_address(integrated_address) ¶Decode an integrated address to get its standard address and payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
integrated_address | str | is an integrated address to decode. | required |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the decoded integrated address including standard address and payment id. |
delete_address_book_entry(index) ¶Delete an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | is the index of the entry to delete. | required |
describe_multisig_tx_set(multisig_tx_hex) ¶Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_tx_hex | str | multisig tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
describe_tx_set(tx_set) ¶Describes a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_set | MoneroTxSet | is a tx set containing unsigned or multisig tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
describe_unsigned_tx_set(unsigned_tx_hex) ¶Describe a tx set from unsigned tx hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unsigned_tx_hex | str | unsigned tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
edit_address_book_entry(index, set_address, address, set_description, description) ¶Edit an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | is the index of the address book entry to edit. | required |
set_address | bool | specifies if the address should be updated. | required |
address | str | is the updated address. | required |
set_description | bool | specifies if the description should be updated. | required |
description | str | is the updated description. | required |
exchange_multisig_keys(multisig_hexes, password) ¶Exchange multisig hex with participants in a M/N multisig wallet.
This process must be repeated with participants exactly N-M times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
password | str | is the wallet's password (TODO monero-project: redundant? wallet is created with password). | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigInitResult | the result which has the multisig's address xor this wallet's multisig hex to share with participants if not done. |
export_key_images(all=False) ¶Export signed key images.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all | bool | export all key images if | False |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageExportResult | the wallet's signed key images. |
export_multisig_hex() ¶Export this wallet's multisig info as hex for other participants.
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig info as hex for other participants. |
export_outputs(all=False) ¶Export outputs in hex format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all | bool | export all outputs if | False |
Returns:
| Type | Description |
|---|---|
str | outputs in hex format, empty string if no outputs. |
freeze_output(key_image) ¶Freeze an output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to freeze. | required |
get_account_tags() ¶Return all account tags.
Returns:
| Type | Description |
|---|---|
list[MoneroAccountTag] | the wallet's account tags. |
get_address(account_idx, subaddress_idx) ¶Get the address of a specific subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the account index of the address's subaddress. | required |
subaddress_idx | int | specifies the subaddress index within the account. | required |
Returns:
| Type | Description |
|---|---|
str | the receive address of the specified subaddress. |
get_address_index(address) ¶Get the account and subaddress index of the given address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to get the account and subaddress index from. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the account and subaddress indices. |
Raises:
| Type | Description |
|---|---|
MoneroError | exception if address is not a wallet address. |
get_attribute(key) ¶Get an attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | is the attribute to get the value of. | required |
Returns:
| Type | Description |
|---|---|
str | attribute's value. |
get_daemon_connection() ¶Get the wallet's daemon connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | None | the wallet's daemon connection. |
get_daemon_height() ¶Get the height that the wallet's daemon is synced to.
Returns:
| Type | Description |
|---|---|
int | the height that the wallet's daemon is synced to. |
get_daemon_max_peer_height() ¶Get the maximum height of the peers the wallet's daemon is connected to.
Returns:
| Type | Description |
|---|---|
int | the maximum height of the peers the wallet's daemon is connected to. |
get_default_fee_priority() ¶Get the current default fee priority (unimportant, normal, elevated, etc).
Returns:
| Type | Description |
|---|---|
MoneroTxPriority | the current fee priority. |
get_height() ¶Get the height of the last block processed by the wallet (its index + 1).
Returns:
| Type | Description |
|---|---|
int | the height of the last block processed by the wallet. |
get_height_by_date(year, month, day) ¶Get the blockchain's height by date as a conservative estimate for scanning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year | int | year of the height to get. | required |
month | int | month of the height to get as a number between 1 and 12. | required |
day | int | day of the height to get as a number between 1 and 31. | required |
Returns:
| Type | Description |
|---|---|
int | the blockchain's approximate height at the given date. |
get_integrated_address(standard_address='', payment_id='') ¶Get an integrated address from a standard address and a payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
standard_address | str | is the integrated addresse's standard address (defaults to wallet's primary address). | '' |
payment_id | str | is the integrated addresse's payment id (defaults to randomly generating new payment id). | '' |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the integrated address. |
get_listeners() ¶Get the listeners registered with the wallet.
Returns:
| Type | Description |
|---|---|
list[MoneroWalletListener] | List of listener registered with the wallet. |
get_multisig_info() ¶Get multisig info about this wallet.
Returns:
| Type | Description |
|---|---|
MoneroMultisigInfo | multisig info about this wallet. |
get_network_type() ¶Get the wallet's network type (mainnet, testnet, or stagenet).
Returns:
| Type | Description |
|---|---|
MoneroNetworkType | the wallet's network type. |
get_new_key_images_from_last_import() ¶Get new key images from the last imported outputs.
Returns:
| Type | Description |
|---|---|
list[MoneroKeyImage] | the key images from the last imported outputs. |
get_path() ¶Get the path of this wallet's file on disk.
Returns:
| Type | Description |
|---|---|
str | the path of this wallet's file on disk. |
get_payment_uri(config) ¶Creates a payment URI from a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | specifies configuration for a potential tx. | required |
Returns:
| Type | Description |
|---|---|
str | is the payment uri. |
get_primary_address() ¶Get the wallet's primary address.
Returns:
| Type | Description |
|---|---|
str | the wallet's primary address. |
get_private_spend_key() ¶Get the wallet's private spend key.
Returns:
| Type | Description |
|---|---|
str | the wallet's private spend key. |
get_private_view_key() ¶Get the wallet's private view key.
Returns:
| Type | Description |
|---|---|
str | the wallet's private view key. |
get_public_spend_key() ¶Get the wallet's public spend key.
Returns:
| Type | Description |
|---|---|
str | the wallet's public spend key. |
get_public_view_key() ¶Get the wallet's public view key.
Returns:
| Type | Description |
|---|---|
str | the wallet's public view key. |
get_reserve_proof_account(account_idx, amount, message) ¶Generate a signature to prove an available amount in an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the account to prove ownership of the amount. | required |
amount | int | is the minimum amount to prove as available in the account. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | required |
Returns:
| Type | Description |
|---|---|
str | the reserve proof signature. |
get_reserve_proof_wallet(message) ¶Generate a signature to prove the entire balance of the wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
Returns:
| Type | Description |
|---|---|
str | the reserve proof signature. |
get_restore_height() ¶Get the height of the first block that the wallet scans.
Returns:
| Type | Description |
|---|---|
int | the height of the first block that the wallet scans. |
get_seed() ¶Get the wallet's mnemonic phrase or seed.
Returns:
| Type | Description |
|---|---|
str | the wallet's mnemonic phrase or seed. |
get_seed_language() ¶Get the language of the wallet's mnemonic phrase or seed.
Returns:
| Type | Description |
|---|---|
str | the language of the wallet's mnemonic phrase or seed. |
get_spend_proof(tx_hash, message='') ¶Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | '' |
Returns:
| Type | Description |
|---|---|
str | the transaction signature. |
get_subaddress(account_idx, subaddress_idx) ¶Get a subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the index of the subaddress's account. | required |
subaddress_idx | int | specifies index of the subaddress within the account. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the retrieved subaddress. |
get_tx(tx_hash) ¶Get single wallet transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | Transaction hash. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | None | wallet transaction. |
get_tx_key(tx_hash) ¶Get a transaction's secret key from its hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the transaction's hash. | required |
Returns:
| Type | Description |
|---|---|
str | is the transaction's secret key. |
get_tx_note(tx_hash) ¶Get a transaction note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to get the note of. | required |
Returns:
| Type | Description |
|---|---|
str | the tx note. |
get_tx_notes(tx_hashes) ¶Get notes for multiple transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | identify the transactions to get notes for. | required |
Returns:
| Type | Description |
|---|---|
list[str] | notes for the transactions. |
get_tx_proof(tx_hash, address, message='') ¶Get a transaction signature to prove it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
address | str | is the destination public address of the transaction. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | '' |
Returns:
| Type | Description |
|---|---|
str | the transaction signature. |
get_version() ¶import_key_images(key_images, offset=0) ¶Import signed key images and verify their spent status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_images | list[MoneroKeyImage] | are key images to import and verify (requires hex and signature). | required |
offset | int | offset of the first key image among the wallet's outputs. | 0 |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageImportResult | results of the import. |
import_multisig_hex(multisig_hexes, refresh_after_import=True) ¶Import multisig info as hex from other participants.
Note: If the daemon is not trusted, this method will not automatically update the spent status after importing peer multisig hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
refresh_after_import | bool | refresh wallet after import. | True |
Returns:
| Type | Description |
|---|---|
int | the number of outputs signed with the given multisig hex. |
import_outputs(outputs_hex) ¶Import outputs in hex format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs_hex | str | are outputs in hex format. | required |
Returns:
| Type | Description |
|---|---|
int | the number of outputs imported. |
is_closed() ¶Indicates if the wallet is closed.
Returns:
| Type | Description |
|---|---|
bool |
|
is_connected_to_daemon() ¶Indicates if the wallet is connected a daemon.
Returns:
| Type | Description |
|---|---|
bool |
|
is_daemon_trusted() ¶Indicates if the daemon is trusted or untrusted.
Returns:
| Type | Description |
|---|---|
bool |
|
is_multisig() ¶Indicates if this wallet is a multisig wallet.
Returns:
| Type | Description |
|---|---|
bool |
|
is_multisig_import_needed() ¶Indicates if importing multisig data is needed for returning a correct balance.
Returns:
| Type | Description |
|---|---|
bool |
|
is_output_frozen(key_image) ¶Check if an output is frozen.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to check if frozen. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_synced() ¶Indicates if the wallet is synced with the daemon.
Returns:
| Type | Description |
|---|---|
bool |
|
is_view_only() ¶Indicates if the wallet is view-only, meaning it does have the private spend key and can therefore only observe incoming outputs.
Returns:
| Type | Description |
|---|---|
bool |
|
make_multisig(multisig_hexes, threshold, password) ¶Make this wallet multisig by importing multisig hex from participants.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
threshold | int | is the number of signatures needed to sign transfers. | required |
password | str | is the wallet password. | required |
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig hex to share with participants. |
move_to(path, password) ¶Move the wallet from its current path to the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the new wallet's path. | required |
password | str | is the new wallet's password. | required |
parse_payment_uri(uri) ¶Parses a payment URI to a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri | str | is the payment uri to parse. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxConfig | the tx configuration parsed from the uri. |
prepare_multisig() ¶Get multisig info as hex to share with participants to begin creating a multisig wallet.
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig hex to share with participants. |
remove_listener(listener) ¶Unregister a listener to receive wallet notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroWalletListener | is the listener to unregister. | required |
rescan_blockchain() ¶Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.
WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc.
rescan_spent() ¶Rescan the blockchain for spent outputs.
Note: this can only be called with a trusted daemon.
Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs.
save() ¶Save the wallet at its current path.
scan_txs(tx_hashes) ¶Scan transactions by their hash/id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | tx hashes to scan. | required |
set_account_label(account_idx, label) ¶Set a human-readable description for an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | account index. | required |
label | str | is the label to set. | required |
set_account_tag_label(tag, label) ¶Sets a human-readable description for a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag | str | is the tag to set a description for. | required |
label | str | is the label to set for the tag. | required |
set_attribute(key, val) ¶Set an arbitrary attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | is the attribute key. | required |
val | str | is the attribute value. | required |
set_restore_height(restore_height) ¶Set the height of the first block that the wallet scans.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
restore_height | int | is the height of the first block that the wallet scans. | required |
set_subaddress_label(account_idx, subaddress_idx, label='') ¶Set a subaddress label.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | index of the account to set the label for. | required |
subaddress_idx | int | index of the subaddress to set the label for. | required |
label | str | the label to set (default | '' |
set_tx_note(tx_hash, note) ¶Set a note for a specific transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction. | required |
note | str | specifies the note. | required |
set_tx_notes(tx_hashes, notes) ¶Set notes for multiple transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | specify the transactions to set notes for. | required |
notes | list[str] | are the notes to set for the transactions. | required |
sign_message(msg, signature_type, account_idx=0, subaddress_idx=0) ¶Sign a message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg | str | the message to sign. | required |
signature_type | MoneroMessageSignatureType | sign with spend key or spend key. | required |
account_idx | int | the account index of the message signature (default | 0 |
subaddress_idx | int | the subaddress index of the message signature (default | 0 |
Returns:
| Type | Description |
|---|---|
str | the message signature. |
sign_multisig_tx_hex(multisig_tx_hex) ¶Sign previously created multisig transactions as represented by hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_tx_hex | str | is the hex shared among the multisig transactions when they were created. | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigSignResult | the result of signing the multisig transactions. |
sign_txs(unsigned_tx_hex) ¶Sign unsigned transactions from a view-only wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unsigned_tx_hex | str | is unsigned transaction hex from when the transactions were created. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the signed transaction set. |
start_mining(num_threads=None, background_mining=None, ignore_battery=None) ¶Start mining.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_threads | Optional[int] | is the number of threads created for mining (default | None |
background_mining | Optional[bool] | specifies if mining should occur in the background (default | None |
ignore_battery | Optional[bool] | specifies if the battery should be ignored for mining (default | None |
start_syncing(sync_period_in_ms=10000) ¶Start background synchronizing with a maximum period between syncs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sync_period_in_ms | int | maximum period between syncs in milliseconds. | 10000 |
stop_mining() ¶Stop mining.
stop_syncing() ¶Stop the asynchronous thread to continuously synchronize the wallet with the daemon.
submit_multisig_tx_hex(signed_multisig_tx_hex) ¶Submit signed multisig transactions as represented by a hex string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signed_multisig_tx_hex | str | is the signed multisig hex returned from | required |
Returns:
| Type | Description |
|---|---|
list[str] | the resulting transaction hashes. |
submit_txs(signed_tx_hex) ¶Submit signed transactions from a view-only wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signed_tx_hex | str | is signed transaction hex from | required |
Returns:
| Type | Description |
|---|---|
list[str] | the resulting transaction hashes. |
sweep_dust(relay=False) ¶Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
relay | bool | specifies if the resulting transaction should be relayed (default | False |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
sweep_output(config) ¶Sweep an output with a given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the sweep transaction. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | the created transaction. |
sweep_unlocked(config) ¶Sweep unlocked funds according to the given config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | is the sweep configuration. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
tag_accounts(tag, account_indices) ¶Tag accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag | str | is the tag to apply to the specified accounts. | required |
account_indices | list[int] | are the indices of the accounts to tag. | required |
thaw_output(key_image) ¶Thaw a frozen output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to thaw. | required |
untag_accounts(account_indices) ¶Untag accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_indices | list[int] | are the indices of the accounts to untag. | required |
verify_message(msg, address, signature) ¶Verify a message signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg | str | the signed message. | required |
address | str | signing address. | required |
signature | str | signature. | required |
Returns:
| Type | Description |
|---|---|
MoneroMessageSignatureResult | the message signature result. |
wait_for_next_block() ¶Wait for the next block to be added to the chain.
Returns:
| Type | Description |
|---|---|
int | the height of the next block when it is added to the chain. |
MoneroWallet ¶Base wallet with default implementations.
DEFAULT_LANGUAGE: str instance-attribute ¶Default Monero wallet seed language.
__init__() ¶Initialize a Monero wallet.
add_address_book_entry(address, description) ¶Add an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the entry address. | required |
description | str | is the entry description (optional). | required |
Returns:
| Type | Description |
|---|---|
int | the index of the added entry. |
add_listener(listener) ¶Register a listener receive wallet notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroWalletListener | is the listener to receive wallet notifications. | required |
change_password(old_password, new_password) ¶Change the wallet password.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
old_password | str | is the wallet's old password. | required |
new_password | str | is the wallet's new password. | required |
check_reserve_proof(address, message, signature) ¶Proves a wallet has a disposable reserve using a signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the public wallet address. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the reserve proof signature to check. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckReserve | the result of checking the signature proof. |
check_spend_proof(tx_hash, message, signature) ¶Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the transaction signature to confirm. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
check_tx_key(tx_hash, tx_key, address) ¶Check a transaction in the blockchain with its secret key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to check. | required |
tx_key | str | is the transaction's secret key. | required |
address | str | is the destination public address of the transaction. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckTx | the result of the check. |
check_tx_proof(tx_hash, address, message, signature) ¶Prove a transaction by checking its signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
address | str | is the destination public address of the transaction. | required |
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
signature | str | is the transaction signature to confirm. | required |
Returns:
| Type | Description |
|---|---|
MoneroCheckTx | the result of the check. |
close(save=False) ¶Optionally save then close the wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save | bool | specifies if the wallet should be saved before being closed (default | False |
create_account(label='') ¶Create a new account with a label for the first subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label | str | specifies the label for the account's first subaddress (optional). | '' |
Returns:
| Type | Description |
|---|---|
MoneroAccount | the created account. |
create_subaddress(account_idx, label='') ¶Create a subaddress within an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the index of the account to create the subaddress within. | required |
label | str | specifies the the label for the subaddress (defaults to empty string). | '' |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the created subaddress. |
create_tx(config) ¶Create a transaction to transfer funds from this wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the transaction to create. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | the created transaction. |
create_txs(config) ¶Create one or more transactions to transfer funds from this wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the transactions to create. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
decode_integrated_address(integrated_address) ¶Decode an integrated address to get its standard address and payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
integrated_address | str | is an integrated address to decode. | required |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the decoded integrated address including standard address and payment id. |
delete_address_book_entry(index) ¶Delete an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | is the index of the entry to delete. | required |
describe_multisig_tx_set(multisig_tx_hex) ¶Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_tx_hex | str | multisig tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
describe_tx_set(tx_set) ¶Describes a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_set | MoneroTxSet | is a tx set containing unsigned or multisig tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
describe_unsigned_tx_set(unsigned_tx_hex) ¶Describe a tx set from unsigned tx hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unsigned_tx_hex | str | unsigned tx hex. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the tx set containing structured transactions. |
edit_address_book_entry(index, set_address, address, set_description, description) ¶Edit an address book entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | is the index of the address book entry to edit. | required |
set_address | bool | specifies if the address should be updated. | required |
address | str | is the updated address. | required |
set_description | bool | specifies if the description should be updated. | required |
description | str | is the updated description. | required |
exchange_multisig_keys(multisig_hexes, password) ¶Exchange multisig hex with participants in a M/N multisig wallet.
This process must be repeated with participants exactly N-M times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
password | str | the wallet's password, needed to decrypt the account keys in memory for the key exchange ( | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigInitResult | the result which has the multisig's address xor this wallet's multisig hex to share with participants if not done. |
export_key_images(all=False) ¶Export signed key images.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all | bool | export all key images if | False |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageExportResult | the wallet's signed key images. |
export_multisig_hex() ¶Export this wallet's multisig info as hex for other participants.
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig info as hex for other participants. |
export_outputs(all=False) ¶Export outputs in hex format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all | bool | export all outputs if | False |
Returns:
| Type | Description |
|---|---|
str | outputs in hex format, empty string if no outputs. |
freeze_output(key_image) ¶Freeze an output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to freeze. | required |
get_account_tags() ¶Return all account tags.
Returns:
| Type | Description |
|---|---|
list[MoneroAccountTag] | the wallet's account tags. |
get_address(account_idx, subaddress_idx) ¶Get the address of a specific subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the account index of the address's subaddress. | required |
subaddress_idx | int | specifies the subaddress index within the account. | required |
Returns:
| Type | Description |
|---|---|
str | the receive address of the specified subaddress. |
get_address_index(address) ¶Get the account and subaddress index of the given address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address | str | is the address to get the account and subaddress index from. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the account and subaddress indices. |
Raises:
| Type | Description |
|---|---|
MoneroError | exception if address is not a wallet address. |
get_attribute(key) ¶Get an attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | is the attribute to get the value of. | required |
Returns:
| Type | Description |
|---|---|
str | attribute's value. |
get_daemon_connection() ¶Get the wallet's daemon connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | None | the wallet's daemon connection. |
get_daemon_height() ¶Get the height that the wallet's daemon is synced to.
Returns:
| Type | Description |
|---|---|
int | the height that the wallet's daemon is synced to. |
Raises:
| Type | Description |
|---|---|
Exception | if the wallet cannot reach its daemon. |
get_daemon_max_peer_height() ¶Get the maximum height of the peers the wallet's daemon is connected to.
Returns:
| Type | Description |
|---|---|
int | the maximum height of the peers the wallet's daemon is connected to. |
get_default_fee_priority() ¶Get the current default fee priority (unimportant, normal, elevated, etc).
Returns:
| Type | Description |
|---|---|
MoneroTxPriority | the current fee priority. |
get_height() ¶Get the height of the last block processed by the wallet (its index + 1).
Returns:
| Type | Description |
|---|---|
int | the height of the last block processed by the wallet. |
get_height_by_date(year, month, day) ¶Get the blockchain's height by date as a conservative estimate for scanning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year | int | year of the height to get. | required |
month | int | month of the height to get as a number between 1 and 12. | required |
day | int | day of the height to get as a number between 1 and 31. | required |
Returns:
| Type | Description |
|---|---|
int | the blockchain's approximate height at the given date. |
get_integrated_address(standard_address='', payment_id='') ¶Get an integrated address from a standard address and a payment id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
standard_address | str | is the integrated addresse's standard address (defaults to wallet's primary address). | '' |
payment_id | str | is the integrated addresse's payment id (defaults to randomly generating new payment id). | '' |
Returns:
| Type | Description |
|---|---|
MoneroIntegratedAddress | the integrated address. |
get_listeners() ¶Get the listeners registered with the wallet.
Returns:
| Type | Description |
|---|---|
list[MoneroWalletListener] | List of listener registered with the wallet. |
get_multisig_info() ¶Get multisig info about this wallet.
Returns:
| Type | Description |
|---|---|
MoneroMultisigInfo | multisig info about this wallet. |
get_network_type() ¶Get the wallet's network type (mainnet, testnet, or stagenet).
Returns:
| Type | Description |
|---|---|
MoneroNetworkType | the wallet's network type. |
get_new_key_images_from_last_import() ¶Get new key images from the last imported outputs.
Returns:
| Type | Description |
|---|---|
MoneroKeyImageExportResult | the key images from the last imported outputs. |
get_path() ¶Get the path of this wallet's file on disk.
Returns:
| Type | Description |
|---|---|
str | the path of this wallet's file on disk. |
get_payment_uri(config) ¶Creates a payment URI from a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | specifies configuration for a potential tx. | required |
Returns:
| Type | Description |
|---|---|
str | is the payment uri. |
get_primary_address() ¶Get the wallet's primary address.
Returns:
| Type | Description |
|---|---|
str | the wallet's primary address. |
get_private_spend_key() ¶Get the wallet's private spend key.
Returns:
| Type | Description |
|---|---|
str | the wallet's private spend key. |
get_private_view_key() ¶Get the wallet's private view key.
Returns:
| Type | Description |
|---|---|
str | the wallet's private view key. |
get_public_spend_key() ¶Get the wallet's public spend key.
Returns:
| Type | Description |
|---|---|
str | the wallet's public spend key. |
get_public_view_key() ¶Get the wallet's public view key.
Returns:
| Type | Description |
|---|---|
str | the wallet's public view key. |
get_reserve_proof_account(account_idx, amount, message) ¶Generate a signature to prove an available amount in an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the account to prove ownership of the amount. | required |
amount | int | is the minimum amount to prove as available in the account. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | required |
Returns:
| Type | Description |
|---|---|
str | the reserve proof signature. |
get_reserve_proof_wallet(message) ¶Generate a signature to prove the entire balance of the wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | is a message included with the signature to further authenticate the proof (optional). | required |
Returns:
| Type | Description |
|---|---|
str | the reserve proof signature. |
get_restore_height() ¶Get the height of the first block that the wallet scans.
Returns:
| Type | Description |
|---|---|
int | the height of the first block that the wallet scans. |
get_seed() ¶Get the wallet's mnemonic phrase or seed.
Returns:
| Type | Description |
|---|---|
str | the wallet's mnemonic phrase or seed. |
get_seed_language() ¶Get the language of the wallet's mnemonic phrase or seed.
Returns:
| Type | Description |
|---|---|
str | the language of the wallet's mnemonic phrase or seed. |
get_spend_proof(tx_hash, message='') ¶Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | '' |
Returns:
| Type | Description |
|---|---|
str | the transaction signature. |
get_subaddress(account_idx, subaddress_idx) ¶Get a subaddress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | specifies the index of the subaddress's account. | required |
subaddress_idx | int | specifies index of the subaddress within the account. | required |
Returns:
| Type | Description |
|---|---|
MoneroSubaddress | the retrieved subaddress. |
get_tx(tx_hash) ¶Get single wallet transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | Transaction hash. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | None | wallet transaction. |
get_tx_key(tx_hash) ¶Get a transaction's secret key from its hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | is the transaction's hash. | required |
Returns:
| Type | Description |
|---|---|
str | is the transaction's secret key. |
get_tx_note(tx_hash) ¶Get a transaction note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to get the note of. | required |
Returns:
| Type | Description |
|---|---|
str | the tx note. |
get_tx_notes(tx_hashes) ¶Get notes for multiple transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | identify the transactions to get notes for. | required |
Returns:
| Type | Description |
|---|---|
list[str] | notes for the transactions. |
get_tx_proof(tx_hash, address, message='') ¶Get a transaction signature to prove it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction to prove. | required |
address | str | is the destination public address of the transaction. | required |
message | str | is a message to include with the signature to further authenticate the proof (optional). | '' |
Returns:
| Type | Description |
|---|---|
str | the transaction signature. |
get_version() ¶import_key_images(key_images, offset=0) ¶Import signed key images and verify their spent status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_images | list[MoneroKeyImage] | are key images to import and verify (requires hex and signature). | required |
offset | int | offset of the first key image among the wallet's outputs. | 0 |
Returns:
| Type | Description |
|---|---|
MoneroKeyImageImportResult | results of the import. |
import_multisig_hex(multisig_hexes, refresh_after_import=True) ¶Import multisig info as hex from other participants.
Note: If the daemon is not trusted, this method will not automatically update the spent status after importing peer multisig hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
refresh_after_import | bool | refresh wallet after import. | True |
Returns:
| Type | Description |
|---|---|
int | the number of outputs signed with the given multisig hex. |
import_outputs(outputs_hex) ¶Import outputs in hex format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outputs_hex | str | are outputs in hex format. | required |
Returns:
| Type | Description |
|---|---|
int | the number of outputs imported. |
is_closed() ¶Indicates if the wallet is closed.
Returns:
| Type | Description |
|---|---|
bool |
|
is_connected_to_daemon() ¶Indicates if the wallet is connected a daemon.
Returns:
| Type | Description |
|---|---|
bool |
|
is_daemon_synced() ¶Indicates if the wallet's daemon is synced with the network.
Returns:
| Type | Description |
|---|---|
bool |
|
is_daemon_trusted() ¶Indicates if the daemon is trusted or untrusted.
Returns:
| Type | Description |
|---|---|
bool |
|
is_multisig() ¶Indicates if this wallet is a multisig wallet.
Returns:
| Type | Description |
|---|---|
bool |
|
is_multisig_import_needed() ¶Indicates if importing multisig data is needed for returning a correct balance.
Returns:
| Type | Description |
|---|---|
bool |
|
is_output_frozen(key_image) ¶Check if an output is frozen.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to check if frozen. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
is_synced() ¶Indicates if the wallet is synced with the daemon.
Returns:
| Type | Description |
|---|---|
bool |
|
is_view_only() ¶Indicates if the wallet is view-only, meaning it does have the private spend key and can therefore only observe incoming outputs.
Returns:
| Type | Description |
|---|---|
bool |
|
make_multisig(multisig_hexes, threshold, password) ¶Make this wallet multisig by importing multisig hex from participants.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_hexes | list[str] | are multisig hex from each participant. | required |
threshold | int | is the number of signatures needed to sign transfers. | required |
password | str | the wallet's password, needed to decrypt the account keys in memory while converting the wallet to multisig. | required |
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig hex to share with participants. |
move_to(path, password) ¶Move the wallet from its current path to the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the new wallet's path. | required |
password | str | is the new wallet's password. | required |
parse_payment_uri(uri) ¶Parses a payment URI to a tx configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri | str | is the payment uri to parse. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxConfig | the tx configuration parsed from the uri. |
prepare_multisig() ¶Get multisig info as hex to share with participants to begin creating a multisig wallet.
Returns:
| Type | Description |
|---|---|
str | this wallet's multisig hex to share with participants. |
remove_listener(listener) ¶Unregister a listener to receive wallet notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listener | MoneroWalletListener | is the listener to unregister. | required |
rescan_blockchain() ¶Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.
WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc.
rescan_spent() ¶Rescan the blockchain for spent outputs.
Note: this can only be called with a trusted daemon.
Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs.
save() ¶Save the wallet at its current path.
scan_txs(tx_hashes) ¶Scan transactions by their hash/id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | tx hashes to scan. | required |
Raises:
| Type | Description |
|---|---|
Exception | if |
set_account_label(account_idx, label) ¶Set a human-readable description for an account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | account index. | required |
label | str | is the label to set. | required |
set_account_tag_label(tag, label) ¶Sets a human-readable description for a tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag | str | is the tag to set a description for. | required |
label | str | is the label to set for the tag. | required |
set_attribute(key, val) ¶Set an arbitrary attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | str | is the attribute key. | required |
val | str | is the attribute value. | required |
set_restore_height(restore_height) ¶Set the height of the first block that the wallet scans.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
restore_height | int | is the height of the first block that the wallet scans. | required |
set_subaddress_label(account_idx, subaddress_idx, label='') ¶Set a subaddress label.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_idx | int | index of the account to set the label for. | required |
subaddress_idx | int | index of the subaddress to set the label for. | required |
label | str | the label to set (default | '' |
set_tx_note(tx_hash, note) ¶Set a note for a specific transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hash | str | specifies the transaction. | required |
note | str | specifies the note. | required |
set_tx_notes(tx_hashes, notes) ¶Set notes for multiple transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tx_hashes | list[str] | specify the transactions to set notes for. | required |
notes | list[str] | are the notes to set for the transactions. | required |
sign_message(msg, signature_type, account_idx=0, subaddress_idx=0) ¶Sign a message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg | str | the message to sign. | required |
signature_type | MoneroMessageSignatureType | sign with spend key or spend key. | required |
account_idx | int | the account index of the message signature (default | 0 |
subaddress_idx | int | the subaddress index of the message signature (default | 0 |
Returns:
| Type | Description |
|---|---|
str | the message signature. |
sign_multisig_tx_hex(multisig_tx_hex) ¶Sign previously created multisig transactions as represented by hex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multisig_tx_hex | str | is the hex shared among the multisig transactions when they were created. | required |
Returns:
| Type | Description |
|---|---|
MoneroMultisigSignResult | the result of signing the multisig transactions. |
sign_txs(unsigned_tx_hex) ¶Sign unsigned transactions from a view-only wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unsigned_tx_hex | str | is unsigned transaction hex from when the transactions were created. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxSet | the signed transaction set. |
start_mining(num_threads=None, background_mining=None, ignore_battery=None) ¶Start mining.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_threads | Optional[int] | is the number of threads created for mining (default | None |
background_mining | Optional[bool] | specifies if mining should occur in the background (default | None |
ignore_battery | Optional[bool] | specifies if the battery should be ignored for mining (default | None |
start_syncing(sync_period_in_ms=10000) ¶Start background synchronizing with a maximum period between syncs.
Succeeds even while the wallet is offline; syncing begins once a daemon connection becomes reachable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sync_period_in_ms | int | maximum period between syncs in milliseconds. | 10000 |
stop_mining() ¶Stop mining.
stop_syncing() ¶Stop the asynchronous thread to continuously synchronize the wallet with the daemon.
submit_multisig_tx_hex(signed_multisig_tx_hex) ¶Submit signed multisig transactions as represented by a hex string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signed_multisig_tx_hex | str | is the signed multisig hex returned from | required |
Returns:
| Type | Description |
|---|---|
list[str] | the resulting transaction hashes. |
submit_txs(signed_tx_hex) ¶Submit signed transactions from a view-only wallet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signed_tx_hex | str | is signed transaction hex from | required |
Returns:
| Type | Description |
|---|---|
list[str] | the resulting transaction hashes. |
sweep_dust(relay=False) ¶Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
relay | bool | specifies if the resulting transaction should be relayed (default | False |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
sweep_output(config) ¶Sweep an output with a given key image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | configures the sweep transaction. | required |
Returns:
| Type | Description |
|---|---|
MoneroTxWallet | the created transaction. |
sweep_unlocked(config) ¶Sweep unlocked funds according to the given config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroTxConfig | is the sweep configuration. | required |
Returns:
| Type | Description |
|---|---|
list[MoneroTxWallet] | the created transactions. |
tag_accounts(tag, account_indices) ¶Tag accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag | str | is the tag to apply to the specified accounts. | required |
account_indices | list[int] | are the indices of the accounts to tag. | required |
thaw_output(key_image) ¶Thaw a frozen output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key_image | str | key image of the output to thaw. | required |
untag_accounts(account_indices) ¶Untag accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_indices | list[int] | are the indices of the accounts to untag. | required |
verify_message(msg, address, signature) ¶Verify a message signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg | str | the signed message. | required |
address | str | signing address. | required |
signature | str | signature. | required |
Returns:
| Type | Description |
|---|---|
MoneroMessageSignatureResult | the message signature result. |
wait_for_next_block() ¶Wait for the next block to be added to the chain.
Returns:
| Type | Description |
|---|---|
int | the height of the next block when it is added to the chain. |
MoneroWalletFull ¶ Bases: MoneroWallet
Monero wallet implementation which uses monero-project's wallet2.
create_wallet(config) staticmethod ¶Create a new wallet with the given configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | the wallet configuration. | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
get_cache_file_buffer() ¶Get wallet cache file without using filesystem.
Returns:
| Type | Description |
|---|---|
str | Cache file buffer. |
get_keys_file_buffer(password, view_only) ¶Get wallet keys file without using filesystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password | str | The wallet password. | required |
view_only | bool | Get view-only keys. | required |
Returns:
| Type | Description |
|---|---|
str | Keys file buffer. |
get_seed_languages() staticmethod ¶Get a list of available languages for the wallet's seed.
Returns:
| Type | Description |
|---|---|
list[str] | the available languages for the wallet's seed. |
open_wallet(path, password, nettype, regtest=False) staticmethod ¶Open an existing wallet from disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the path to the wallet file to open. | required |
password | str | is the password of the wallet file to open. | required |
nettype | MoneroNetworkType | is the wallet's network type. | required |
regtest | bool | indicates if wallet to open is a regtest wallet (optional). | False |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
open_wallet_data(password, nettype, keys_data, cache_data, daemon_connection=MoneroRpcConnection(), regtest=False) staticmethod ¶Open an in-memory wallet from existing data buffers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password | str | is the password of the wallet file to open. | required |
nettype | MoneroNetworkType | is the wallet's network type. | required |
keys_data | str | contains the contents of the ".keys" file. | required |
cache_data | str | contains the contents of the wallet cache file (no extension). | required |
daemon_connection | MoneroRpcConnection | is connection information to a daemon (default = an unconnected wallet). | MoneroRpcConnection() |
regtest | bool | indicates if wallet to open is a regtest wallet (optional). | False |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
wallet_exists(path) staticmethod ¶Indicates if a wallet exists at the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the path to check for a wallet. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroWalletFull ¶ Bases: MoneroWallet
Monero wallet implementation which uses monero-project's wallet2.
create_wallet(config) staticmethod ¶Create a new wallet with the given configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | the wallet configuration. | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
get_cache_file_buffer() ¶Get wallet cache file without using filesystem.
Returns:
| Type | Description |
|---|---|
bytes | Cache file buffer. |
get_keys_file_buffer(password, view_only) ¶Get wallet keys file without using filesystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password | str | The wallet password. | required |
view_only | bool | Get view-only keys. | required |
Returns:
| Type | Description |
|---|---|
bytes | Keys file buffer. |
get_seed_languages() staticmethod ¶Get a list of available languages for the wallet's seed.
Returns:
| Type | Description |
|---|---|
list[str] | the available languages for the wallet's seed. |
open_wallet(path, password, nettype, regtest=False) staticmethod ¶Open an existing wallet from disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the path to the wallet file to open. | required |
password | str | is the password of the wallet file to open. | required |
nettype | MoneroNetworkType | is the wallet's network type. | required |
regtest | bool | indicates if wallet to open is a regtest wallet (optional). | False |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
open_wallet_data(password, nettype, keys_data, cache_data, daemon_connection=MoneroRpcConnection(), regtest=False) staticmethod ¶Open an in-memory wallet from existing data buffers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
password | str | is the password of the wallet file to open. | required |
nettype | MoneroNetworkType | is the wallet's network type. | required |
keys_data | bytes | contains the contents of the ".keys" file ( | required |
cache_data | bytes | contents of the wallet cache file, no extension ( | required |
daemon_connection | MoneroRpcConnection | is connection information to a daemon (default = an unconnected wallet). | MoneroRpcConnection() |
regtest | bool | indicates if wallet to open is a regtest wallet (optional). | False |
Returns:
| Type | Description |
|---|---|
MoneroWalletFull | reference to the wallet instance. |
wallet_exists(path) staticmethod ¶Indicates if a wallet exists at the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | is the path to check for a wallet. | required |
Returns:
| Type | Description |
|---|---|
bool |
|
MoneroWalletKeys ¶ Bases: MoneroWallet
Implements a Monero wallet to provide basic key management.
create_wallet_from_keys(config) staticmethod ¶Create a wallet from an address, view key, and spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type, address, view key, spend key, language). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
create_wallet_from_seed(config) staticmethod ¶Create a wallet from an existing mnemonic phrase or seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type, seed, seed offset, is_multisig). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
create_wallet_random(config) staticmethod ¶Create a new wallet with a randomly generated seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type and language). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
get_seed_languages() staticmethod ¶Get a list of available languages for the wallet's seed.
Returns:
| Type | Description |
|---|---|
list[str] | The available languages for the wallet's seed. |
MoneroWalletKeys ¶ Bases: MoneroWallet
Implements a Monero wallet to provide basic key management.
create_wallet_from_keys(config) staticmethod ¶Create a wallet from an address, view key, and spend key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type, address, view key, spend key, language). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
create_wallet_from_seed(config) staticmethod ¶Create a wallet from an existing mnemonic phrase or seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type, seed, seed offset, is_multisig). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
create_wallet_random(config) staticmethod ¶Create a new wallet with a randomly generated seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | is the wallet configuration (network type and language). | required |
Returns:
| Type | Description |
|---|---|
MoneroWalletKeys | reference to the wallet instance. |
get_seed_languages() staticmethod ¶Get a list of available languages for the wallet's seed.
Returns:
| Type | Description |
|---|---|
list[str] | The available languages for the wallet's seed. |
MoneroWalletRpc ¶ Bases: MoneroWallet
Implements a Monero wallet using monero-wallet-rpc_.
.. _monero-wallet-rpc: https://docs.getmonero.org/rpc-library/wallet-rpc/
create_wallet(config) ¶Create and open a wallet on the monero-wallet-rpc server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | configures the wallet to create. | required |
get_rpc_connection() ¶Get the wallet's RPC connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | None | the wallet's rpc connection. |
get_seed_languages() ¶Get all supported wallet seed languages.
Returns:
| Type | Description |
|---|---|
list[str] | wallet's supported languages. |
stop() ¶Save and close the current wallet and stop the RPC server.
MoneroWalletRpc ¶ Bases: MoneroWallet
Implements a Monero wallet using monero-wallet-rpc_.
.. _monero-wallet-rpc: https://docs.getmonero.org/rpc-library/wallet-rpc/
create_wallet(config) ¶Create and open a wallet on the monero-wallet-rpc server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config | MoneroWalletConfig | configures the wallet to create. | required |
get_rpc_connection() ¶Get the wallet's RPC connection.
Returns:
| Type | Description |
|---|---|
MoneroRpcConnection | None | the wallet's rpc connection. |
get_seed_languages() ¶Get all supported wallet seed languages.
Returns:
| Type | Description |
|---|---|
list[str] | wallet's supported languages. |
stop() ¶Save and close the current wallet and stop the RPC server.
Developers can create and establish a connection to a rpc server conveniently with a MoneroRpcConnection:
from monero import MoneroRpcConnection
+ Connect to RPC Server - Monero Python
Monero Python Connect to RPC Server
Connect to RPC Server¶
Developers can create and establish a connection to a rpc server conveniently with a MoneroRpcConnection:
from monero import MoneroRpcConnection
# connect to a monerod or wallet rpc server
connection = MoneroRpcConnection("http:://rpc_server_uri:18089")
diff --git a/docs/mkdocs/public/examples/create_local_full_wallet/index.html b/docs/mkdocs/public/examples/create_local_full_wallet/index.html
index 4cb5a18..d157f45 100644
--- a/docs/mkdocs/public/examples/create_local_full_wallet/index.html
+++ b/docs/mkdocs/public/examples/create_local_full_wallet/index.html
@@ -1,4 +1,4 @@
- Create Local Full Wallet - Monero Python
Monero Python Create Local Full Wallet
Create Local Full Wallet¶
MoneroWalletFull is another MoneroWallet implementation that fully wraps wallet2 API. With a full wallet developers can create wallet files and manage them locally.
Creating a MoneroWalletFull is very simple:
from monero import MoneroWalletConfig, MoneroWalletFull, MoneroNetworkType
+ Create Local Full Wallet - Monero Python
Monero Python Create Local Full Wallet
Create Local Full Wallet¶
MoneroWalletFull is another MoneroWallet implementation that fully wraps wallet2 API. With a full wallet developers can create wallet files and manage them locally.
Creating a MoneroWalletFull is very simple:
from monero import MoneroWalletConfig, MoneroWalletFull, MoneroNetworkType
# setup wallet configuration
config = MoneroWalletConfig()
diff --git a/docs/mkdocs/public/examples/interact_with_daemon/index.html b/docs/mkdocs/public/examples/interact_with_daemon/index.html
index 88d6fda..f5aff8f 100644
--- a/docs/mkdocs/public/examples/interact_with_daemon/index.html
+++ b/docs/mkdocs/public/examples/interact_with_daemon/index.html
@@ -1,4 +1,4 @@
- Interact with RPC Daemon - Monero Python
Monero Python Interact with RPC Daemon
Interact with RPC Daemon¶
MoneroDaemonRpc offers a MoneroDaemon implementation that interacts with monero-rpc server using calls to RPC, JSON-RPC and Binary interfaces.
Creating a MoneroDaemonRpc instance is very simple:
from monero import MoneroDaemonRpc
+ Interact with RPC Daemon - Monero Python
Monero Python Interact with RPC Daemon
Interact with RPC Daemon¶
MoneroDaemonRpc offers a MoneroDaemon implementation that interacts with monero-rpc server using calls to RPC, JSON-RPC and Binary interfaces.
Creating a MoneroDaemonRpc instance is very simple:
from monero import MoneroDaemonRpc
# create RPC daemon connected to `monerod-rpc` server
daemon = MoneroDaemonRpc("http://monerod_rpc_uri:18081")
diff --git a/docs/mkdocs/public/examples/interact_with_wallet_rpc/index.html b/docs/mkdocs/public/examples/interact_with_wallet_rpc/index.html
index d97c2a5..86061c9 100644
--- a/docs/mkdocs/public/examples/interact_with_wallet_rpc/index.html
+++ b/docs/mkdocs/public/examples/interact_with_wallet_rpc/index.html
@@ -1,4 +1,4 @@
- Interact with RPC Wallet - Monero Python
Monero Python Interact with RPC Wallet
Interact with RPC Wallet¶
MoneroWalletRpc offers a MoneroWallet implementation that interacts with monero-wallet-rpc using calls to the JSON-RPC interface.
Creating a MoneroWalletRpc instance is very simple:
from monero import MoneroWalletRpc
+ Interact with RPC Wallet - Monero Python
Monero Python Interact with RPC Wallet
Interact with RPC Wallet¶
MoneroWalletRpc offers a MoneroWallet implementation that interacts with monero-wallet-rpc using calls to the JSON-RPC interface.
Creating a MoneroWalletRpc instance is very simple:
from monero import MoneroWalletRpc
# create RPC wallet connected to `monero-wallet-rpc` server
wallet = MoneroWalletRpc("http://wallet_rpc_uri:18081")
diff --git a/docs/mkdocs/public/examples/query_wallet_txs_and_transfers/index.html b/docs/mkdocs/public/examples/query_wallet_txs_and_transfers/index.html
index 991ed9c..4856bfa 100644
--- a/docs/mkdocs/public/examples/query_wallet_txs_and_transfers/index.html
+++ b/docs/mkdocs/public/examples/query_wallet_txs_and_transfers/index.html
@@ -1,4 +1,4 @@
- Query Wallet Txs and Transfers - Monero Python
Monero Python Query Wallet Txs and Transfers
Query Wallet Txs and Transfers¶
The MoneroWallet interface offers methods for fetching transactions, transfers and outputs from wallet's cache:
MoneroWallet.get_txs(query: MoneroTxQuery) -> list[MoneroTxWallet] MoneroWallet.get_transfers(query: MoneroTransferQuery) -> list[MoneroTransfer] MoneroWallet.get_outputs(query: MoneroOutputQuery) -> list[MoneroOutputWallet]
This methods can be used with a MoneroTxQuery, MoneroTransferQuery, MoneroOutputQuery, wich will filter all records that doesn't match criteria defined in the query.
Example of fetching wallet txs with a basic MoneroTxQuery:
from monero import (
+ Query Wallet Txs and Transfers - Monero Python
Monero Python Query Wallet Txs and Transfers
Query Wallet Txs and Transfers¶
The MoneroWallet interface offers methods for fetching transactions, transfers and outputs from wallet's cache:
MoneroWallet.get_txs(query: MoneroTxQuery) -> list[MoneroTxWallet] MoneroWallet.get_transfers(query: MoneroTransferQuery) -> list[MoneroTransfer] MoneroWallet.get_outputs(query: MoneroOutputQuery) -> list[MoneroOutputWallet]
This methods can be used with a MoneroTxQuery, MoneroTransferQuery, MoneroOutputQuery, wich will filter all records that doesn't match criteria defined in the query.
Example of fetching wallet txs with a basic MoneroTxQuery:
from monero import (
MoneroWallet, MoneroTxQuery,
MoneroTxWallet
)
diff --git a/docs/mkdocs/public/examples/sending_payments/index.html b/docs/mkdocs/public/examples/sending_payments/index.html
index 9e223a1..fbd88e7 100644
--- a/docs/mkdocs/public/examples/sending_payments/index.html
+++ b/docs/mkdocs/public/examples/sending_payments/index.html
@@ -1,4 +1,4 @@
- Sending Payments - Monero Python
Monero Python Sending Payments
Sending Payments¶
In order to send payments with a MoneroWallet, developers must setup a MoneroTxConfig:
from monero import MoneroTxConfig
+ Sending Payments - Monero Python
Monero Python Sending Payments
Sending Payments¶
In order to send payments with a MoneroWallet, developers must setup a MoneroTxConfig:
from monero import MoneroTxConfig
# create and setup transaction configuration
tx_config = MoneroTxConfig()
diff --git a/docs/mkdocs/public/examples/using_keys_only_wallet/index.html b/docs/mkdocs/public/examples/using_keys_only_wallet/index.html
index f7548e3..fbf2662 100644
--- a/docs/mkdocs/public/examples/using_keys_only_wallet/index.html
+++ b/docs/mkdocs/public/examples/using_keys_only_wallet/index.html
@@ -1,4 +1,4 @@
- Using Keys-Only Wallet - Monero Python
Monero Python Using Keys-Only Wallet
Using Keys-Only Wallet¶
MoneroWalletKeys is a MoneroWallet implementation that supports only basic keys operations, without files or RPC calls.
Creating a in-memory keys-only wallet with MoneroWalletKeys is very simple:
from monero import MoneroWalletKeys, MoneroWalletConfig, MoneroNetworkType
+ Using Keys-Only Wallet - Monero Python
Monero Python Using Keys-Only Wallet
Using Keys-Only Wallet¶
MoneroWalletKeys is a MoneroWallet implementation that supports only basic keys operations, without files or RPC calls.
Creating a in-memory keys-only wallet with MoneroWalletKeys is very simple:
from monero import MoneroWalletKeys, MoneroWalletConfig, MoneroNetworkType
# setup wallet configuration
config = MoneroWalletConfig()
diff --git a/docs/mkdocs/public/index.html b/docs/mkdocs/public/index.html
index 3a99727..35ae353 100644
--- a/docs/mkdocs/public/index.html
+++ b/docs/mkdocs/public/index.html
@@ -1 +1 @@
- Monero Python Documentation - Monero Python
Monero Python Monero Python Documentation
Monero Python Documentation¶
Welcome to the Monero Python documentation.
The aim of this project is to provide an intuitive and robust way to interact with the Monero cryptocurrency in Python using a clearly defined data model. It provides high level classes representing objects from the Monero environment, like wallets, accounts, addresses and transactions.
Developers can create Monero applications using JSON-RPC or Python bindings to monero v0.18.5.1 'Flourine Fermi'.
Contributions can be made via issues and pull requests on GitHub, or communicated via the #monero-python workgroup on Matrix.
\ No newline at end of file
+ Monero Python Documentation - Monero Python
Monero Python Monero Python Documentation
Monero Python Documentation¶
Welcome to the Monero Python documentation.
The aim of this project is to provide an intuitive and robust way to interact with the Monero cryptocurrency in Python using a clearly defined data model. It provides high level classes representing objects from the Monero environment, like wallets, accounts, addresses and transactions.
Developers can create Monero applications using JSON-RPC or Python bindings to monero v0.18.5.1 'Flourine Fermi'.
Contributions can be made via issues and pull requests on GitHub, or communicated via the #monero-python workgroup on Matrix.
\ No newline at end of file
diff --git a/docs/mkdocs/public/objects.inv b/docs/mkdocs/public/objects.inv
index cd7adec..8fbf221 100644
Binary files a/docs/mkdocs/public/objects.inv and b/docs/mkdocs/public/objects.inv differ
diff --git a/docs/mkdocs/public/search/search_index.json b/docs/mkdocs/public/search/search_index.json
index d063a17..ed1e0c6 100644
--- a/docs/mkdocs/public/search/search_index.json
+++ b/docs/mkdocs/public/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Monero Python Documentation","text":"Welcome to the Monero Python documentation.
The aim of this project is to provide an intuitive and robust way to interact with the Monero cryptocurrency in Python using a clearly defined data model. It provides high level classes representing objects from the Monero environment, like wallets, accounts, addresses and transactions.
Developers can create Monero applications using JSON-RPC or Python bindings to monero v0.18.5.1 'Flourine Fermi'.
Contributions can be made via issues and pull requests on GitHub, or communicated via the #monero-python workgroup on Matrix.
GitHub Matrix
"},{"location":"api/architecture/","title":"Architecture","text":""},{"location":"api/connection/","title":"RPC Connection","text":""},{"location":"api/connection/#monero.MoneroRpcConnection","title":"MoneroRpcConnection","text":" Bases: SerializableStruct
Models a connection to a daemon.
"},{"location":"api/connection/#monero.MoneroRpcConnection.password","title":"password: str | None property","text":"Connection authentication password.
"},{"location":"api/connection/#monero.MoneroRpcConnection.priority","title":"priority: int instance-attribute","text":"Connection priority.
"},{"location":"api/connection/#monero.MoneroRpcConnection.proxy_uri","title":"proxy_uri: str | None instance-attribute","text":"Connection proxy address.
"},{"location":"api/connection/#monero.MoneroRpcConnection.response_time","title":"response_time: int | None property","text":"Connection response time in milliseconds.
"},{"location":"api/connection/#monero.MoneroRpcConnection.timeout_ms","title":"timeout_ms: int instance-attribute","text":"Connection timeout (milliseconds).
"},{"location":"api/connection/#monero.MoneroRpcConnection.uri","title":"uri: str | None instance-attribute","text":"Connection uri.
"},{"location":"api/connection/#monero.MoneroRpcConnection.username","title":"username: str | None property","text":"Connection authentication username.
"},{"location":"api/connection/#monero.MoneroRpcConnection.zmq_uri","title":"zmq_uri: str | None instance-attribute","text":"ZMQ connection uri.
"},{"location":"api/connection/#monero.MoneroRpcConnection.check_connection","title":"check_connection(timeout_ms=None)","text":"Check the connection and update online, authentication, and response time status.
Parameters:
Name Type Description Default timeout_ms int|None the maximum response time before considered offline.
None Returns:
Type Description bool True if there is a change in status, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.compare","title":"compare(p1, p2) staticmethod","text":"Compare connection priorities.
Parameters:
Name Type Description Default p1 int first priority to check.
required p2 int second priority to check.
required Returns:
Type Description bool True if p1 comes before p2, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.get_attribute","title":"get_attribute(key)","text":"Returns RPC connection attribute.
Parameters:
Name Type Description Default key str attribute key.
required Returns:
Type Description str attribute value.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_authenticated","title":"is_authenticated()","text":"Indicates if the connection is authenticated according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True if authenticated or no authentication required, False if not authenticated, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_connected","title":"is_connected()","text":"Indicates if the connection is connected according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True or False to indicate if connected, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_i2p","title":"is_i2p()","text":"Indicates if the connection is a I2P connection.
Returns:
Type Description bool True if connection is a I2P connection, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_onion","title":"is_onion()","text":"Indicates if the connection is a TOR connection.
Returns:
Type Description bool True if connection is a TOR connection, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_online","title":"is_online()","text":"Indicates if the connection is online according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True or False to indicate if online, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_binary_request","title":"send_binary_request(method, parameters=None, timeout_ms=None)","text":"Send a binary RPC request.
Parameters:
Name Type Description Default method str is the path of the binary RPC method to invoke.
required parameters Optional[object] are the request parameters (default None).
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description bytes | None the request's deserialized binary response.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_json_request","title":"send_json_request(method, parameters=None, timeout_ms=None)","text":"Send a request to the JSON-RPC API.
Parameters:
Name Type Description Default method str is the method to request.
required parameters Optional[object] are the request's input parameters (default None).
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description object | None the RPC API response as a map.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_path_request","title":"send_path_request(method, parameters=None, timeout_ms=None)","text":"Send a RPC request to the given path and with the given paramters.
E.g. /get_transactions with params.
Parameters:
Name Type Description Default method str is the url path of the request to invoke.
required parameters Optional[object] are request parameters sent in the body.
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description object | None the request's deserialized response.
"},{"location":"api/connection/#monero.MoneroRpcConnection.set_attribute","title":"set_attribute(key, value)","text":"Set RPC connection attribute.
Parameters:
Name Type Description Default key str key attribute.
required value str value attribute.
required"},{"location":"api/connection/#monero.MoneroRpcConnection.set_credentials","title":"set_credentials(username, password)","text":"Set RPC connection credentials.
Parameters:
Name Type Description Default username str username used for RPC authentication.
required password str passowrd user for RPC authentication.
required"},{"location":"api/daemon/","title":"Daemon Interface","text":""},{"location":"api/daemon/#monero.MoneroDaemon","title":"MoneroDaemon","text":"Monero daemon interface.
"},{"location":"api/daemon/#monero.MoneroDaemon.__init__","title":"__init__()","text":"Initialize a Monero daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.add_listener","title":"add_listener(listener)","text":"Register a listener to receive daemon notifications.
Parameters:
Name Type Description Default listener MoneroDaemonListener the listener to register.
required"},{"location":"api/daemon/#monero.MoneroDaemon.check_for_update","title":"check_for_update()","text":"Check for update.
Returns:
Type Description MoneroDaemonUpdateCheckResult the result of the update check.
"},{"location":"api/daemon/#monero.MoneroDaemon.download_update","title":"download_update(path='')","text":"Download an update.
Parameters:
Name Type Description Default path str download path.
'' Returns:
Type Description MoneroDaemonUpdateDownloadResult the result of the update download.
"},{"location":"api/daemon/#monero.MoneroDaemon.generate_blocks","title":"generate_blocks(wallet_address, num_blocks, prev_block_hash=None, starting_nonce=None)","text":"Generate blocks to a wallet address (regtest only).
Parameters:
Name Type Description Default wallet_address str is the address of the wallet to receive miner transactions if block is successfully mined.
required num_blocks int is the number of blocks to generate.
required prev_block_hash str|None is the hash of the previous block to build on top of (optional, builds on the current tip if not given).
None starting_nonce int|None is the starting nonce to use (optional).
None Returns:
Type Description MoneroGenerateBlocksResult the result of generating blocks; height is the height of the last block generated.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_alt_block_hashes","title":"get_alt_block_hashes()","text":"Get known block hashes which are not on the main chain.
Returns:
Type Description list[str] known block hashes which are not on the main chain.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_alt_chains","title":"get_alt_chains()","text":"Get alternative chains seen by the node.
Returns:
Type Description list[MoneroAltChain] alternative chains seen by the node.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_by_hash","title":"get_block_by_hash(hash)","text":"Get a block by hash.
Parameters:
Name Type Description Default hash str is the hash of the block to get.
required Returns:
Type Description MoneroBlock the block with the given hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_by_height","title":"get_block_by_height(height)","text":"Get a block by height.
Parameters:
Name Type Description Default height int is the height of the block to get.
required Returns:
Type Description MoneroBlock the block at the given height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_hash","title":"get_block_hash(height)","text":"Get a block's hash by its height.
Parameters:
Name Type Description Default height int is the height of the block hash to get.
required Returns:
Type Description str the block's hash at the given height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_hashes","title":"get_block_hashes(block_hashes, start_height)","text":"Get block hashes as a binary request to the daemon.
Parameters:
Name Type Description Default block_hashes list[str] specify block hashes to fetch; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block.
required start_height int is the starting height of block hashes to return.
required Returns:
Type Description list[str] the requested block hashes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_header_by_hash","title":"get_block_header_by_hash(hash)","text":"Get a block header by its hash.
Parameters:
Name Type Description Default hash str is the hash of the block to get the header of.
required Returns:
Type Description MoneroBlockHeader the block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_header_by_height","title":"get_block_header_by_height(height)","text":"Get a block header by its height.
Parameters:
Name Type Description Default height int is the height of the block to get the header of.
required Returns:
Type Description MoneroBlockHeader the block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_headers_by_range","title":"get_block_headers_by_range(start_height, end_height)","text":"Get block headers for the given range.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required Returns:
Type Description list[MoneroBlockHeader] block headers in the given range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_template","title":"get_block_template(wallet_address, reserve_size=None)","text":"Get a block template for mining a new block.
Parameters:
Name Type Description Default wallet_address str is the address of the wallet to receive miner transactions if block is successfully mined.
required reserve_size int|None is the reserve size (optional).
None Returns:
Type Description MoneroBlockTemplate a block template for mining a new block.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_hash","title":"get_blocks_by_hash(block_hashes, start_height, prune)","text":"Get a block by hash.
Parameters:
Name Type Description Default block_hashes list[str] is the hash of the block to get.
required start_height int filter blocks by block height.
required prune bool prune hash.
required Returns:
Type Description list[MoneroBlock] the block with the given hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_height","title":"get_blocks_by_height(heights)","text":"Get blocks at the given heights.
Parameters:
Name Type Description Default heights list[int] are the heights of the blocks to get.
required Returns:
Type Description list[MoneroBlock] blocks at the given heights.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_range","title":"get_blocks_by_range(start_height, end_height)","text":"Get blocks in the given height range.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required Returns:
Type Description list[MoneroBlock] blocks in the given height range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_range_chunked","title":"get_blocks_by_range_chunked(start_height, end_height, max_chunk_size=None)","text":"Get blocks in the given height range as chunked requests so that each request is not too big.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required max_chunk_size int is the maximum chunk size in any one request (default 3,000,000 bytes).
None Returns:
Type Description list[MoneroBlock] blocks in the given height range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_download_limit","title":"get_download_limit()","text":"Get the download bandwidth limit.
Returns:
Type Description int is the download bandwidth limit.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_fee_estimate","title":"get_fee_estimate(grace_blocks=0)","text":"Get mining fee estimates per kB.
Parameters:
Name Type Description Default grace_blocks int number of blocks we want the fee estimate to be valid for.
0 Returns:
Type Description MoneroFeeEstimate mining fee estimates per kB.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_hard_fork_info","title":"get_hard_fork_info()","text":"Look up information regarding hard fork voting and readiness.
Returns:
Type Description MoneroHardForkInfo hard fork information.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_height","title":"get_height()","text":"Get the number of blocks in the longest chain known to the node.
Returns:
Type Description int the number of blocks.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_info","title":"get_info()","text":"Get general information about the state of the node and the network.
Returns:
Type Description MoneroDaemonInfo general information about the node and network.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_key_image_spent_status","title":"get_key_image_spent_status(key_image)","text":"Get the spent status of the given key image.
Parameters:
Name Type Description Default key_image str is key image hex to get the status of.
required Returns:
Type Description MoneroKeyImageSpentStatus the status of the key image.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_key_image_spent_statuses","title":"get_key_image_spent_statuses(key_images)","text":"Get the spent status of each given key image.
Parameters:
Name Type Description Default key_images list[str] are hex key images to get the statuses of.
required Returns:
Type Description list[MoneroKeyImageSpentStatus] the spent status for each key image.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_known_peers","title":"get_known_peers()","text":"Get all known peers including their last known online status.
Returns:
Type Description list[MoneroPeer] the daemon's known peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_last_block_header","title":"get_last_block_header()","text":"Get the last block's header.
Returns:
Type Description MoneroBlockHeader the last block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_listeners","title":"get_listeners()","text":"Get the listeners registered with the daemon.
Returns:
Type Description list[MoneroDaemonListener] the registered listeners.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_miner_tx_sum","title":"get_miner_tx_sum(height, num_blocks)","text":"Gets the total emissions and fees from the genesis block to the current height.
Parameters:
Name Type Description Default height int is the height to start computing the miner sum.
required num_blocks int are the number of blocks to include in the sum.
required Returns:
Type Description MoneroMinerTxSum the sum emission and fees since the geneis block.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_mining_status","title":"get_mining_status()","text":"Get the daemon's mining status.
Returns:
Type Description MoneroMiningStatus the daemon's mining status.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_output_distribution","title":"get_output_distribution(amounts, is_cumulative=None, start_height=None, end_height=None)","text":"Creates an output distribution.
Parameters:
Name Type Description Default amounts list[int] are amounts of outputs to make the distribution with.
required is_cumulative bool|None specifies if the results should be cumulative (optional).
None start_height int|None is the start height lower bound inclusive (optional).
None end_height int|None is the end height upper bound inclusive (optional).
None Returns:
Type Description list[MoneroOutputDistributionEntry] output distribution entries meeting the parameters.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_output_histogram","title":"get_output_histogram(amounts, min_count, max_count, is_unlocked, recent_cutoff)","text":"Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Parameters:
Name Type Description Default amounts list[int] are amounts of outputs to make the histogram with (atomic-units).
required min_count Optional[int] filter amounts with at least this number of outputs.
required max_count Optional[int] filter amounts with at most this number of outputs.
required is_unlocked Optional[bool] makes a histogram with outputs with the specified lock state.
required recent_cutoff Optional[int] exclude outputs from older than this timestamp.
required Returns:
Type Description list[MoneroOutputHistogramEntry] output histogram entries meeting the parameters.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_outputs","title":"get_outputs(outputs)","text":"Get outputs identified by a list of output amounts and indices as a binary request.
Parameters:
Name Type Description Default outputs list[MoneroOutput] identify each output by amount and index.
required Returns:
Type Description list[MoneroOutput] the identified outputs.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_peer_bans","title":"get_peer_bans()","text":"Get peer bans.
Returns:
Type Description list[MoneroBan] entries about banned peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_peers","title":"get_peers()","text":"Get peers with active incoming or outgoing connections to the node.
Returns:
Type Description list[MoneroPeer] the daemon's peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_sync_info","title":"get_sync_info()","text":"Get synchronization information.
Returns:
Type Description MoneroDaemonSyncInfo contains sync information.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx","title":"get_tx(tx_hash, prune=False)","text":"Get a transaction by hash.
Parameters:
Name Type Description Default tx_hash str is the hash of the transaction to get.
required prune bool specifies if the returned tx should be pruned (defaults to False).
False Returns:
Type Description MoneroTx | None the transaction with the given hash or null if not found.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_hex","title":"get_tx_hex(tx_hash, prune=False)","text":"Get a transaction hex by hash.
Parameters:
Name Type Description Default tx_hash str is the hash of the transaction to get hex from.
required prune bool specifies if the returned tx hex should be pruned (defaults to False).
False Returns:
Type Description str | None the tx hex with the given hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_hexes","title":"get_tx_hexes(tx_hashes, prune=False)","text":"Get transaction hexes by hashes.
Parameters:
Name Type Description Default tx_hashes list[str] are hashes of transactions to get hexes from
required prune bool Prune transaction hashes.
False Returns:
Type Description list[str] are the tx hexes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool","title":"get_tx_pool()","text":"Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.
Returns:
Type Description list[MoneroTx] transactions in the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_backlog","title":"get_tx_pool_backlog()","text":"Get all transaction pool backlog.
Returns:
Type Description list[MoneroTxBacklogEntry] transaction pool backlog entries.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_hashes","title":"get_tx_pool_hashes()","text":"Get hashes of transactions in the transaction pool.
Returns:
Type Description list[str] hashes of transactions in the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_stats","title":"get_tx_pool_stats()","text":"Get transaction pool statistics.
Returns:
Type Description MoneroTxPoolStats statistics about the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_txs","title":"get_txs(tx_hashes, prune=False)","text":"Get transactions by hashes.
Parameters:
Name Type Description Default tx_hashes list[str] are hashes of transactions to get.
required prune bool Prune transactions.
False Returns:
Type Description list[MoneroTx] found transactions with the given hashes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_upload_limit","title":"get_upload_limit()","text":"Get the upload bandwidth limit.
Returns:
Type Description int is the upload bandwidth limit.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_version","title":"get_version()","text":"Gets the version of the daemon.
Returns:
Type Description MoneroVersion the version of the daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.is_trusted","title":"is_trusted()","text":"Indicates if the daemon is trusted or untrusted.
Returns:
Type Description bool True if the daemon is trusted, False otherwise.
"},{"location":"api/daemon/#monero.MoneroDaemon.prune_blockchain","title":"prune_blockchain(check)","text":"Prune the blockchain.
Parameters:
Name Type Description Default check bool specifies to check the pruning (default False).
required Returns:
Type Description MoneroPruneResult the prune result.
"},{"location":"api/daemon/#monero.MoneroDaemon.relay_tx_by_hash","title":"relay_tx_by_hash(tx_hash)","text":"Relays a transaction by hash.
Parameters:
Name Type Description Default tx_hash str identifies the transaction to relay.
required"},{"location":"api/daemon/#monero.MoneroDaemon.relay_txs_by_hash","title":"relay_txs_by_hash(tx_hashes)","text":"Relays transactions by hash.
Parameters:
Name Type Description Default tx_hashes list[str] identify the transactions to relay.
required"},{"location":"api/daemon/#monero.MoneroDaemon.remove_listener","title":"remove_listener(listener)","text":"Unregister a listener to receive daemon notifications.
Parameters:
Name Type Description Default listener MoneroDaemonListener a previously registered listener to be unregistered.
required"},{"location":"api/daemon/#monero.MoneroDaemon.reset_download_limit","title":"reset_download_limit()","text":"Reset the download bandwidth limit.
Returns:
Type Description int the download bandwidth limit after resetting.
"},{"location":"api/daemon/#monero.MoneroDaemon.reset_upload_limit","title":"reset_upload_limit()","text":"Reset the upload bandwidth limit.
Returns:
Type Description int the upload bandwidth limit after resetting.
"},{"location":"api/daemon/#monero.MoneroDaemon.set_download_limit","title":"set_download_limit(limit)","text":"Set the download bandwidth limit.
Parameters:
Name Type Description Default limit int is the download limit to set (-1 to reset to default).
required Returns:
Type Description int is the new download limit after setting.
"},{"location":"api/daemon/#monero.MoneroDaemon.set_incoming_peer_limit","title":"set_incoming_peer_limit(limit)","text":"Limit number of incoming peers.
Parameters:
Name Type Description Default limit int is the maximum number of incoming peers.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_outgoing_peer_limit","title":"set_outgoing_peer_limit(limit)","text":"Limit number of outgoing peers.
Parameters:
Name Type Description Default limit int is the maximum number of outgoing peers.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_peer_ban","title":"set_peer_ban(ban)","text":"Ban a peer node.
Parameters:
Name Type Description Default ban MoneroBan contains information about a node to ban.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_peer_bans","title":"set_peer_bans(bans)","text":"Ban peers nodes.
Parameters:
Name Type Description Default bans list[MoneroBan] are bans to apply against peer nodes.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_upload_limit","title":"set_upload_limit(limit)","text":"Set the upload bandwidth limit.
Parameters:
Name Type Description Default limit int is the upload limit to set (-1 to reset to default).
required Returns:
Type Description int is the new upload limit after setting.
"},{"location":"api/daemon/#monero.MoneroDaemon.start_mining","title":"start_mining(address, num_threads, is_background, ignore_battery)","text":"Start mining.
Parameters:
Name Type Description Default address str is the address given miner rewards if the daemon mines a block.
required num_threads int is the number of mining threads to run.
required is_background bool specifies if the miner should run in the background or not.
required ignore_battery bool specifies if the battery state (e.g. on laptop) should be ignored or not.
required"},{"location":"api/daemon/#monero.MoneroDaemon.stop","title":"stop()","text":"Safely disconnect and shut down the daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.stop_mining","title":"stop_mining()","text":"Stop mining.
"},{"location":"api/daemon/#monero.MoneroDaemon.submit_block","title":"submit_block(block_blob)","text":"Submit a mined block to the network.
Parameters:
Name Type Description Default block_blob str is the mined block to submit.
required"},{"location":"api/daemon/#monero.MoneroDaemon.submit_blocks","title":"submit_blocks(block_blobs)","text":"Submit mined blocks to the network.
Parameters:
Name Type Description Default block_blobs list[str] are the mined blocks to submit.
required"},{"location":"api/daemon/#monero.MoneroDaemon.submit_tx_hex","title":"submit_tx_hex(tx_hex, do_not_relay=False)","text":"Submits a transaction to the daemon's pool.
Parameters:
Name Type Description Default tx_hex str is the raw transaction hex to submit.
required Returns:
Type Description MoneroSubmitTxResult the submission results.
"},{"location":"api/daemon/#monero.MoneroDaemon.wait_for_next_block_header","title":"wait_for_next_block_header()","text":"Get the header of the next block added to the chain.
Returns:
Type Description MoneroBlockHeader the header of the next block added to the chain.
"},{"location":"api/daemon_rpc/","title":"Daemon RPC","text":""},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc","title":"MoneroDaemonRpc","text":" Bases: MoneroDaemon
Implements a MoneroDaemon using monerod-rpc_.
.. _monerod-rpc: https://docs.getmonero.org/rpc-library/monerod-rpc/
"},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc.get_rpc_connection","title":"get_rpc_connection()","text":"Get the daemon's RPC connection.
Returns:
Type Description MoneroRpcConnection the daemon's rpc connection.
"},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc.is_connected","title":"is_connected()","text":"Indicates if the client is connected to the daemon via RPC.
Returns:
Type Description bool True if the client is connected to the daemon, False otherwise.
"},{"location":"api/serializable_struct/","title":"Serializable Struct","text":""},{"location":"api/serializable_struct/#monero.SerializableStruct","title":"SerializableStruct","text":" Bases: ABC
Base struct which can be serialized.
"},{"location":"api/serializable_struct/#monero.SerializableStruct.serialize","title":"serialize()","text":"Serializes the struct to a json string.
Returns:
Type Description str the struct serialized to a json string.
"},{"location":"api/utils/","title":"Monero Utilities","text":""},{"location":"api/utils/#monero.MoneroUtils","title":"MoneroUtils","text":"Collection of Monero utilities.
"},{"location":"api/utils/#monero.MoneroUtils.atomic_units_to_xmr","title":"atomic_units_to_xmr(amount_atomic_units) staticmethod","text":"Convert atomic units to XMR.
Parameters:
Name Type Description Default amount_atomic_units int amount in atomic units to convert to XMR.
required Returns:
Type Description float amount in XMR.
"},{"location":"api/utils/#monero.MoneroUtils.binary_blocks_to_json","title":"binary_blocks_to_json(bin) staticmethod","text":"Deserialize blocks JSON string from binary format.
Parameters:
Name Type Description Default bin bytes blocks JSON string in binary format.
required Returns:
Type Description str The deserialized blocks in JSON string format.
"},{"location":"api/utils/#monero.MoneroUtils.binary_to_dict","title":"binary_to_dict(bin) staticmethod","text":"Deserialize a dictionary from binary format.
Parameters:
Name Type Description Default bin bytes Dictionary in binary format.
required Returns:
Type Description dict[Any, Any] Deserialized dictionary.
"},{"location":"api/utils/#monero.MoneroUtils.binary_to_json","title":"binary_to_json(bin) staticmethod","text":"Deserialize a JSON string from binary format.
Parameters:
Name Type Description Default bin bytes JSON string in binary format.
required Returns:
Type Description str The deserialized JSON string.
"},{"location":"api/utils/#monero.MoneroUtils.configure_logging","title":"configure_logging(path, console) staticmethod","text":"Initialize logging.
Parameters:
Name Type Description Default path str the path to write logs to.
required console bool specifies whether or not to write to the console.
required"},{"location":"api/utils/#monero.MoneroUtils.dict_to_binary","title":"dict_to_binary(dictionary) staticmethod","text":"Converts a dictionary into binary format.
Parameters:
Name Type Description Default dictionary dict The dictionary to convert in binary format.
required Returns:
Type Description bytes Binary format.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_outputs","title":"get_blocks_from_outputs(outputs) staticmethod","text":"Get distinct blocks from outputs.
Parameters:
Name Type Description Default outputs list[MoneroOutputWallet] Outputs to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from outputs.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_transfers","title":"get_blocks_from_transfers(transfers) staticmethod","text":"Get distinct blocks from transfers.
Parameters:
Name Type Description Default transfers list[MoneroTransfer] Transfers to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from transfers.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_txs","title":"get_blocks_from_txs(txs) staticmethod","text":"Get distinct blocks from transactions.
Parameters:
Name Type Description Default txs list[MoneroTxWallet] Transactions to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from transactions.
"},{"location":"api/utils/#monero.MoneroUtils.get_integrated_address","title":"get_integrated_address(network_type, standard_address, payment_id='') staticmethod","text":"Get an integrated address.
Parameters:
Name Type Description Default network_type MoneroNetworkType is the network type of the integrated address.
required standard_address str is the address to derive the integrated address from.
required payment_id str optionally specifies the integrated address's payment id (defaults to random payment id).
'' Returns:
Type Description MoneroIntegratedAddress the integrated address.
"},{"location":"api/utils/#monero.MoneroUtils.get_payment_uri","title":"get_payment_uri(config, network_type=MoneroNetworkType.MAINNET) staticmethod","text":"Creates a payment URI from a tx configuration.
Parameters:
Name Type Description Default config MoneroTxConfig specifies configuration for a payment URI.
required network_type MoneroNetworkType address network type (optional).
MAINNET Returns:
Type Description str the payment URI.
"},{"location":"api/utils/#monero.MoneroUtils.get_ring_size","title":"get_ring_size() staticmethod","text":"Get network-enforced ring size.
Returns:
Type Description int network-enforced ring size.
"},{"location":"api/utils/#monero.MoneroUtils.get_version","title":"get_version() staticmethod","text":"Get the version of the monero-python library.
Returns:
Type Description str the version of this monero-python library
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_address","title":"is_valid_address(address, network_type) staticmethod","text":"Determine if the given address is valid.
Parameters:
Name Type Description Default address str is the address to validate.
required network_type MoneroNetworkType is the address's network type.
required Returns:
Type Description bool True if the address is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_language","title":"is_valid_language(language) staticmethod","text":"Indicates if the given language is valid.
Parameters:
Name Type Description Default language str is the language to validate
required Returns:
Type Description bool True if the language is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_mnemonic","title":"is_valid_mnemonic(mnemonic, language='') staticmethod","text":"Indicates if a mnemonic is valid.
Parameters:
Name Type Description Default mnemonic str is the mnemonic to validate.
required language str is the mnemonic expected language.
'' Returns:
Type Description bool True if the mnemonic is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_payment_id","title":"is_valid_payment_id(payment_id) staticmethod","text":"Indicates if a payment id is valid.
Parameters:
Name Type Description Default payment_id str is the payment id to validate.
required Returns:
Type Description bool True if the payment id is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_private_spend_key","title":"is_valid_private_spend_key(private_spend_key) staticmethod","text":"Indicates if a private spend key is valid.
Parameters:
Name Type Description Default private_spend_key str is the private spend key to validate.
required Returns:
Type Description bool True if the private spend key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_private_view_key","title":"is_valid_private_view_key(private_view_key) staticmethod","text":"Indicates if a private view key is valid.
Parameters:
Name Type Description Default private_view_key str is the private view key to validate.
required Returns:
Type Description bool True if the private view key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_public_spend_key","title":"is_valid_public_spend_key(public_spend_key) staticmethod","text":"Indicates if a public spend key is valid.
Parameters:
Name Type Description Default public_spend_key str is the public spend key to validate.
required Returns:
Type Description bool True if the public spend key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_public_view_key","title":"is_valid_public_view_key(public_view_key) staticmethod","text":"Indicates if a public view key is valid.
Parameters:
Name Type Description Default public_view_key str is the public view key to validate.
required Returns:
Type Description bool True if the public view key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.json_to_binary","title":"json_to_binary(json) staticmethod","text":"Convert a JSON string into binary format.
Returns:
Type Description bytes Binary format.
"},{"location":"api/utils/#monero.MoneroUtils.log_debug","title":"log_debug(message) staticmethod","text":"Log debug message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_error","title":"log_error(message) staticmethod","text":"Log error message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_info","title":"log_info(message) staticmethod","text":"Log info message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_trace","title":"log_trace(message) staticmethod","text":"Log trace message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_warning","title":"log_warning(message) staticmethod","text":"Log warning message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.set_log_categories","title":"set_log_categories(categories) staticmethod","text":"Set the library's log categories.
Parameters:
Name Type Description Default categories str the library's log categories to set.
required"},{"location":"api/utils/#monero.MoneroUtils.set_log_level","title":"set_log_level(loglevel) staticmethod","text":"Set the library's log level with 0 being least verbose.
Parameters:
Name Type Description Default loglevel int the library's log level.
required"},{"location":"api/utils/#monero.MoneroUtils.validate_address","title":"validate_address(address, network_type) staticmethod","text":"Validates the given address.
Parameters:
Name Type Description Default address str is the address to validate.
required network_type MoneroNetworkType is the address's network type.
required"},{"location":"api/utils/#monero.MoneroUtils.validate_mnemonic","title":"validate_mnemonic(mnemonic, language='') staticmethod","text":"Validates the given mnemonic phrase.
Parameters:
Name Type Description Default mnemonic str is the mnemonic to validate.
required language str is the mnemonic expected language.
'' Raises:
Type Description MoneroError if the given mnemonic is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_payment_id","title":"validate_payment_id(payment_id) staticmethod","text":"Validate a payment id.
Parameters:
Name Type Description Default payment_id str is the payment id to validate.
required Raises:
Type Description MoneroError if the given payment id is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_private_spend_key","title":"validate_private_spend_key(private_spend_key) staticmethod","text":"Validate a private spend key.
Parameters:
Name Type Description Default private_spend_key str is the private spend key to validate.
required Raises:
Type Description MoneroError if the given private spend key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_private_view_key","title":"validate_private_view_key(private_view_key) staticmethod","text":"Validate a private view key.
Parameters:
Name Type Description Default private_view_key str is the private view key to validate.
required Raises:
Type Description MoneroError if the given private view key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_public_spend_key","title":"validate_public_spend_key(public_spend_key) staticmethod","text":"Validate a public spend key.
Parameters:
Name Type Description Default public_spend_key str is the public spend key to validate.
required Raises:
Type Description MoneroError if the given public spend key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_public_view_key","title":"validate_public_view_key(public_view_key) staticmethod","text":"Validate a public view key.
Parameters:
Name Type Description Default public_view_key str is the public view key to validate.
required Raises:
Type Description MoneroError if the given public view key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.xmr_to_atomic_units","title":"xmr_to_atomic_units(amount_xmr) staticmethod","text":"Convert XMR to atomic units.
Parameters:
Name Type Description Default amount_xmr float amount in XMR to convert to atomic units.
required Returns:
Type Description int amount in atomic units.
"},{"location":"api/wallet/","title":"Wallet Interface","text":""},{"location":"api/wallet/#monero.MoneroWallet","title":"MoneroWallet","text":"Base wallet with default implementations.
"},{"location":"api/wallet/#monero.MoneroWallet.DEFAULT_LANGUAGE","title":"DEFAULT_LANGUAGE: str instance-attribute","text":"Default Monero wallet seed language.
"},{"location":"api/wallet/#monero.MoneroWallet.__init__","title":"__init__()","text":"Initialize a Monero wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.add_address_book_entry","title":"add_address_book_entry(address, description)","text":"Add an address book entry.
Parameters:
Name Type Description Default address str is the entry address.
required description str is the entry description (optional).
required Returns:
Type Description int the index of the added entry.
"},{"location":"api/wallet/#monero.MoneroWallet.add_listener","title":"add_listener(listener)","text":"Register a listener receive wallet notifications.
Parameters:
Name Type Description Default listener MoneroWalletListener is the listener to receive wallet notifications.
required"},{"location":"api/wallet/#monero.MoneroWallet.change_password","title":"change_password(old_password, new_password)","text":"Change the wallet password.
Parameters:
Name Type Description Default old_password str is the wallet's old password.
required new_password str is the wallet's new password.
required"},{"location":"api/wallet/#monero.MoneroWallet.check_reserve_proof","title":"check_reserve_proof(address, message, signature)","text":"Proves a wallet has a disposable reserve using a signature.
Parameters:
Name Type Description Default address str is the public wallet address.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the reserve proof signature to check.
required Returns:
Type Description MoneroCheckReserve the result of checking the signature proof.
"},{"location":"api/wallet/#monero.MoneroWallet.check_spend_proof","title":"check_spend_proof(tx_hash, message, signature)","text":"Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the transaction signature to confirm.
required Returns:
Type Description bool True if the signature is good, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.check_tx_key","title":"check_tx_key(tx_hash, tx_key, address)","text":"Check a transaction in the blockchain with its secret key.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to check.
required tx_key str is the transaction's secret key.
required address str is the destination public address of the transaction.
required Returns:
Type Description MoneroCheckTx the result of the check.
"},{"location":"api/wallet/#monero.MoneroWallet.check_tx_proof","title":"check_tx_proof(tx_hash, address, message, signature)","text":"Prove a transaction by checking its signature.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required address str is the destination public address of the transaction.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the transaction signature to confirm.
required Returns:
Type Description MoneroCheckTx the result of the check.
"},{"location":"api/wallet/#monero.MoneroWallet.close","title":"close(save=False)","text":"Optionally save then close the wallet.
Parameters:
Name Type Description Default save bool specifies if the wallet should be saved before being closed (default False).
False"},{"location":"api/wallet/#monero.MoneroWallet.create_account","title":"create_account(label='')","text":"Create a new account with a label for the first subaddress.
Parameters:
Name Type Description Default label str specifies the label for the account's first subaddress (optional).
'' Returns:
Type Description MoneroAccount the created account.
"},{"location":"api/wallet/#monero.MoneroWallet.create_subaddress","title":"create_subaddress(account_idx, label='')","text":"Create a subaddress within an account.
Parameters:
Name Type Description Default account_idx int specifies the index of the account to create the subaddress within.
required label str specifies the the label for the subaddress (defaults to empty string).
'' Returns:
Type Description MoneroSubaddress the created subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.create_tx","title":"create_tx(config)","text":"Create a transaction to transfer funds from this wallet.
Parameters:
Name Type Description Default config MoneroTxConfig configures the transaction to create.
required Returns:
Type Description MoneroTxWallet the created transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.create_txs","title":"create_txs(config)","text":"Create one or more transactions to transfer funds from this wallet.
Parameters:
Name Type Description Default config MoneroTxConfig configures the transactions to create.
required Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.decode_integrated_address","title":"decode_integrated_address(integrated_address)","text":"Decode an integrated address to get its standard address and payment id.
Parameters:
Name Type Description Default integrated_address str is an integrated address to decode.
required Returns:
Type Description MoneroIntegratedAddress the decoded integrated address including standard address and payment id.
"},{"location":"api/wallet/#monero.MoneroWallet.delete_address_book_entry","title":"delete_address_book_entry(index)","text":"Delete an address book entry.
Parameters:
Name Type Description Default index int is the index of the entry to delete.
required"},{"location":"api/wallet/#monero.MoneroWallet.describe_multisig_tx_set","title":"describe_multisig_tx_set(multisig_tx_hex)","text":"Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
Name Type Description Default multisig_tx_hex str multisig tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.describe_tx_set","title":"describe_tx_set(tx_set)","text":"Describes a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
Name Type Description Default tx_set MoneroTxSet is a tx set containing unsigned or multisig tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.describe_unsigned_tx_set","title":"describe_unsigned_tx_set(unsigned_tx_hex)","text":"Describe a tx set from unsigned tx hex.
Parameters:
Name Type Description Default unsigned_tx_hex str unsigned tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.edit_address_book_entry","title":"edit_address_book_entry(index, set_address, address, set_description, description)","text":"Edit an address book entry.
Parameters:
Name Type Description Default index int is the index of the address book entry to edit.
required set_address bool specifies if the address should be updated.
required address str is the updated address.
required set_description bool specifies if the description should be updated.
required description str is the updated description.
required"},{"location":"api/wallet/#monero.MoneroWallet.exchange_multisig_keys","title":"exchange_multisig_keys(multisig_hexes, password)","text":"Exchange multisig hex with participants in a M/N multisig wallet.
This process must be repeated with participants exactly N-M times.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required password str is the wallet's password (TODO monero-project: redundant? wallet is created with password).
required Returns:
Type Description MoneroMultisigInitResult the result which has the multisig's address xor this wallet's multisig hex to share with participants if not done.
"},{"location":"api/wallet/#monero.MoneroWallet.export_key_images","title":"export_key_images(all=False)","text":"Export signed key images.
Parameters:
Name Type Description Default all bool export all key images if True, else export key images since the last export.
False Returns:
Type Description MoneroKeyImageExportResult the wallet's signed key images.
"},{"location":"api/wallet/#monero.MoneroWallet.export_multisig_hex","title":"export_multisig_hex()","text":"Export this wallet's multisig info as hex for other participants.
Returns:
Type Description str this wallet's multisig info as hex for other participants.
"},{"location":"api/wallet/#monero.MoneroWallet.export_outputs","title":"export_outputs(all=False)","text":"Export outputs in hex format.
Parameters:
Name Type Description Default all bool export all outputs if True, else export outputs since the last export.
False Returns:
Type Description str outputs in hex format, empty string if no outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.freeze_output","title":"freeze_output(key_image)","text":"Freeze an output.
Parameters:
Name Type Description Default key_image str key image of the output to freeze.
required"},{"location":"api/wallet/#monero.MoneroWallet.get_account_tags","title":"get_account_tags()","text":"Return all account tags.
Returns:
Type Description list[MoneroAccountTag] the wallet's account tags.
"},{"location":"api/wallet/#monero.MoneroWallet.get_address","title":"get_address(account_idx, subaddress_idx)","text":"Get the address of a specific subaddress.
Parameters:
Name Type Description Default account_idx int specifies the account index of the address's subaddress.
required subaddress_idx int specifies the subaddress index within the account.
required Returns:
Type Description str the receive address of the specified subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.get_address_index","title":"get_address_index(address)","text":"Get the account and subaddress index of the given address.
Parameters:
Name Type Description Default address str is the address to get the account and subaddress index from.
required Returns:
Type Description MoneroSubaddress the account and subaddress indices.
Raises:
Type Description MoneroError exception if address is not a wallet address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_attribute","title":"get_attribute(key)","text":"Get an attribute.
Parameters:
Name Type Description Default key str is the attribute to get the value of.
required Returns:
Type Description str attribute's value.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_connection","title":"get_daemon_connection()","text":"Get the wallet's daemon connection.
Returns:
Type Description MoneroRpcConnection | None the wallet's daemon connection.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_height","title":"get_daemon_height()","text":"Get the height that the wallet's daemon is synced to.
Returns:
Type Description int the height that the wallet's daemon is synced to.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_max_peer_height","title":"get_daemon_max_peer_height()","text":"Get the maximum height of the peers the wallet's daemon is connected to.
Returns:
Type Description int the maximum height of the peers the wallet's daemon is connected to.
"},{"location":"api/wallet/#monero.MoneroWallet.get_default_fee_priority","title":"get_default_fee_priority()","text":"Get the current default fee priority (unimportant, normal, elevated, etc).
Returns:
Type Description MoneroTxPriority the current fee priority.
"},{"location":"api/wallet/#monero.MoneroWallet.get_height","title":"get_height()","text":"Get the height of the last block processed by the wallet (its index + 1).
Returns:
Type Description int the height of the last block processed by the wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_height_by_date","title":"get_height_by_date(year, month, day)","text":"Get the blockchain's height by date as a conservative estimate for scanning.
Parameters:
Name Type Description Default year int year of the height to get.
required month int month of the height to get as a number between 1 and 12.
required day int day of the height to get as a number between 1 and 31.
required Returns:
Type Description int the blockchain's approximate height at the given date.
"},{"location":"api/wallet/#monero.MoneroWallet.get_integrated_address","title":"get_integrated_address(standard_address='', payment_id='')","text":"Get an integrated address from a standard address and a payment id.
Parameters:
Name Type Description Default standard_address str is the integrated addresse's standard address (defaults to wallet's primary address).
'' payment_id str is the integrated addresse's payment id (defaults to randomly generating new payment id).
'' Returns:
Type Description MoneroIntegratedAddress the integrated address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_listeners","title":"get_listeners()","text":"Get the listeners registered with the wallet.
Returns:
Type Description list[MoneroWalletListener] List of listener registered with the wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_multisig_info","title":"get_multisig_info()","text":"Get multisig info about this wallet.
Returns:
Type Description MoneroMultisigInfo multisig info about this wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_network_type","title":"get_network_type()","text":"Get the wallet's network type (mainnet, testnet, or stagenet).
Returns:
Type Description MoneroNetworkType the wallet's network type.
"},{"location":"api/wallet/#monero.MoneroWallet.get_new_key_images_from_last_import","title":"get_new_key_images_from_last_import()","text":"Get new key images from the last imported outputs.
Returns:
Type Description list[MoneroKeyImage] the key images from the last imported outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.get_path","title":"get_path()","text":"Get the path of this wallet's file on disk.
Returns:
Type Description str the path of this wallet's file on disk.
"},{"location":"api/wallet/#monero.MoneroWallet.get_payment_uri","title":"get_payment_uri(config)","text":"Creates a payment URI from a tx configuration.
Parameters:
Name Type Description Default config MoneroTxConfig specifies configuration for a potential tx.
required Returns:
Type Description str is the payment uri.
"},{"location":"api/wallet/#monero.MoneroWallet.get_primary_address","title":"get_primary_address()","text":"Get the wallet's primary address.
Returns:
Type Description str the wallet's primary address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_private_spend_key","title":"get_private_spend_key()","text":"Get the wallet's private spend key.
Returns:
Type Description str the wallet's private spend key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_private_view_key","title":"get_private_view_key()","text":"Get the wallet's private view key.
Returns:
Type Description str the wallet's private view key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_public_spend_key","title":"get_public_spend_key()","text":"Get the wallet's public spend key.
Returns:
Type Description str the wallet's public spend key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_public_view_key","title":"get_public_view_key()","text":"Get the wallet's public view key.
Returns:
Type Description str the wallet's public view key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_reserve_proof_account","title":"get_reserve_proof_account(account_idx, amount, message)","text":"Generate a signature to prove an available amount in an account.
Parameters:
Name Type Description Default account_idx int specifies the account to prove ownership of the amount.
required amount int is the minimum amount to prove as available in the account.
required message str is a message to include with the signature to further authenticate the proof (optional).
required Returns:
Type Description str the reserve proof signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_reserve_proof_wallet","title":"get_reserve_proof_wallet(message)","text":"Generate a signature to prove the entire balance of the wallet.
Parameters:
Name Type Description Default message str is a message included with the signature to further authenticate the proof (optional).
required Returns:
Type Description str the reserve proof signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_restore_height","title":"get_restore_height()","text":"Get the height of the first block that the wallet scans.
Returns:
Type Description int the height of the first block that the wallet scans.
"},{"location":"api/wallet/#monero.MoneroWallet.get_seed","title":"get_seed()","text":"Get the wallet's mnemonic phrase or seed.
Returns:
Type Description str the wallet's mnemonic phrase or seed.
"},{"location":"api/wallet/#monero.MoneroWallet.get_seed_language","title":"get_seed_language()","text":"Get the language of the wallet's mnemonic phrase or seed.
Returns:
Type Description str the language of the wallet's mnemonic phrase or seed.
"},{"location":"api/wallet/#monero.MoneroWallet.get_spend_proof","title":"get_spend_proof(tx_hash, message='')","text":"Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required message str is a message to include with the signature to further authenticate the proof (optional).
'' Returns:
Type Description str the transaction signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_subaddress","title":"get_subaddress(account_idx, subaddress_idx)","text":"Get a subaddress.
Parameters:
Name Type Description Default account_idx int specifies the index of the subaddress's account.
required subaddress_idx int specifies index of the subaddress within the account.
required Returns:
Type Description MoneroSubaddress the retrieved subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx","title":"get_tx(tx_hash)","text":"Get single wallet transaction by hash.
Parameters:
Name Type Description Default tx_hash str Transaction hash.
required Returns:
Type Description MoneroTxWallet | None wallet transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_key","title":"get_tx_key(tx_hash)","text":"Get a transaction's secret key from its hash.
Parameters:
Name Type Description Default tx_hash str is the transaction's hash.
required Returns:
Type Description str is the transaction's secret key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_note","title":"get_tx_note(tx_hash)","text":"Get a transaction note.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to get the note of.
required Returns:
Type Description str the tx note.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_notes","title":"get_tx_notes(tx_hashes)","text":"Get notes for multiple transactions.
Parameters:
Name Type Description Default tx_hashes list[str] identify the transactions to get notes for.
required Returns:
Type Description list[str] notes for the transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_proof","title":"get_tx_proof(tx_hash, address, message='')","text":"Get a transaction signature to prove it.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required address str is the destination public address of the transaction.
required message str is a message to include with the signature to further authenticate the proof (optional).
'' Returns:
Type Description str the transaction signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_version","title":"get_version()","text":"Get the wallet's version.
Returns:
Type Description MoneroVersion the wallet's version.
"},{"location":"api/wallet/#monero.MoneroWallet.import_key_images","title":"import_key_images(key_images, offset=0)","text":"Import signed key images and verify their spent status.
Parameters:
Name Type Description Default key_images list[MoneroKeyImage] are key images to import and verify (requires hex and signature).
required offset int offset of the first key image among the wallet's outputs.
0 Returns:
Type Description MoneroKeyImageImportResult results of the import.
"},{"location":"api/wallet/#monero.MoneroWallet.import_multisig_hex","title":"import_multisig_hex(multisig_hexes, refresh_after_import=True)","text":"Import multisig info as hex from other participants.
Note: If the daemon is not trusted, this method will not automatically update the spent status after importing peer multisig hex.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required refresh_after_import bool refresh wallet after import.
True Returns:
Type Description int the number of outputs signed with the given multisig hex.
"},{"location":"api/wallet/#monero.MoneroWallet.import_outputs","title":"import_outputs(outputs_hex)","text":"Import outputs in hex format.
Parameters:
Name Type Description Default outputs_hex str are outputs in hex format.
required Returns:
Type Description int the number of outputs imported.
"},{"location":"api/wallet/#monero.MoneroWallet.is_closed","title":"is_closed()","text":"Indicates if the wallet is closed.
Returns:
Type Description bool True if the wallet is closed, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_connected_to_daemon","title":"is_connected_to_daemon()","text":"Indicates if the wallet is connected a daemon.
Returns:
Type Description bool True if the wallet is connected to daemon, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_daemon_trusted","title":"is_daemon_trusted()","text":"Indicates if the daemon is trusted or untrusted.
Returns:
Type Description bool True if the daemon is trusted, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_multisig","title":"is_multisig()","text":"Indicates if this wallet is a multisig wallet.
Returns:
Type Description bool True if this is a multisig wallet, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_multisig_import_needed","title":"is_multisig_import_needed()","text":"Indicates if importing multisig data is needed for returning a correct balance.
Returns:
Type Description bool True if importing multisig data is needed for returning a correct balance, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_output_frozen","title":"is_output_frozen(key_image)","text":"Check if an output is frozen.
Parameters:
Name Type Description Default key_image str key image of the output to check if frozen.
required Returns:
Type Description bool True if the output is frozen, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_synced","title":"is_synced()","text":"Indicates if the wallet is synced with the daemon.
Returns:
Type Description bool True if the wallet is synced with the daemon, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_view_only","title":"is_view_only()","text":"Indicates if the wallet is view-only, meaning it does have the private spend key and can therefore only observe incoming outputs.
Returns:
Type Description bool True if the wallet is view-only, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.make_multisig","title":"make_multisig(multisig_hexes, threshold, password)","text":"Make this wallet multisig by importing multisig hex from participants.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required threshold int is the number of signatures needed to sign transfers.
required password str is the wallet password.
required Returns:
Type Description str this wallet's multisig hex to share with participants.
"},{"location":"api/wallet/#monero.MoneroWallet.move_to","title":"move_to(path, password)","text":"Move the wallet from its current path to the given path.
Parameters:
Name Type Description Default path str is the new wallet's path.
required password str is the new wallet's password.
required"},{"location":"api/wallet/#monero.MoneroWallet.parse_payment_uri","title":"parse_payment_uri(uri)","text":"Parses a payment URI to a tx configuration.
Parameters:
Name Type Description Default uri str is the payment uri to parse.
required Returns:
Type Description MoneroTxConfig the tx configuration parsed from the uri.
"},{"location":"api/wallet/#monero.MoneroWallet.prepare_multisig","title":"prepare_multisig()","text":"Get multisig info as hex to share with participants to begin creating a multisig wallet.
Returns:
Type Description str this wallet's multisig hex to share with participants.
"},{"location":"api/wallet/#monero.MoneroWallet.remove_listener","title":"remove_listener(listener)","text":"Unregister a listener to receive wallet notifications.
Parameters:
Name Type Description Default listener MoneroWalletListener is the listener to unregister.
required"},{"location":"api/wallet/#monero.MoneroWallet.rescan_blockchain","title":"rescan_blockchain()","text":"Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.
WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc.
"},{"location":"api/wallet/#monero.MoneroWallet.rescan_spent","title":"rescan_spent()","text":"Rescan the blockchain for spent outputs.
Note: this can only be called with a trusted daemon.
Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.save","title":"save()","text":"Save the wallet at its current path.
"},{"location":"api/wallet/#monero.MoneroWallet.scan_txs","title":"scan_txs(tx_hashes)","text":"Scan transactions by their hash/id.
Parameters:
Name Type Description Default tx_hashes list[str] tx hashes to scan.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_account_label","title":"set_account_label(account_idx, label)","text":"Set a human-readable description for an account.
Parameters:
Name Type Description Default account_idx int account index.
required label str is the label to set.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_account_tag_label","title":"set_account_tag_label(tag, label)","text":"Sets a human-readable description for a tag.
Parameters:
Name Type Description Default tag str is the tag to set a description for.
required label str is the label to set for the tag.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_attribute","title":"set_attribute(key, val)","text":"Set an arbitrary attribute.
Parameters:
Name Type Description Default key str is the attribute key.
required val str is the attribute value.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_restore_height","title":"set_restore_height(restore_height)","text":"Set the height of the first block that the wallet scans.
Parameters:
Name Type Description Default restore_height int is the height of the first block that the wallet scans.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_subaddress_label","title":"set_subaddress_label(account_idx, subaddress_idx, label='')","text":"Set a subaddress label.
Parameters:
Name Type Description Default account_idx int index of the account to set the label for.
required subaddress_idx int index of the subaddress to set the label for.
required label str the label to set (default '').
''"},{"location":"api/wallet/#monero.MoneroWallet.set_tx_note","title":"set_tx_note(tx_hash, note)","text":"Set a note for a specific transaction.
Parameters:
Name Type Description Default tx_hash str specifies the transaction.
required note str specifies the note.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_tx_notes","title":"set_tx_notes(tx_hashes, notes)","text":"Set notes for multiple transactions.
Parameters:
Name Type Description Default tx_hashes list[str] specify the transactions to set notes for.
required notes list[str] are the notes to set for the transactions.
required"},{"location":"api/wallet/#monero.MoneroWallet.sign_message","title":"sign_message(msg, signature_type, account_idx=0, subaddress_idx=0)","text":"Sign a message.
Parameters:
Name Type Description Default msg str the message to sign.
required signature_type MoneroMessageSignatureType sign with spend key or spend key.
required account_idx int the account index of the message signature (default 0).
0 subaddress_idx int the subaddress index of the message signature (default 0).
0 Returns:
Type Description str the message signature.
"},{"location":"api/wallet/#monero.MoneroWallet.sign_multisig_tx_hex","title":"sign_multisig_tx_hex(multisig_tx_hex)","text":"Sign previously created multisig transactions as represented by hex.
Parameters:
Name Type Description Default multisig_tx_hex str is the hex shared among the multisig transactions when they were created.
required Returns:
Type Description MoneroMultisigSignResult the result of signing the multisig transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.sign_txs","title":"sign_txs(unsigned_tx_hex)","text":"Sign unsigned transactions from a view-only wallet.
Parameters:
Name Type Description Default unsigned_tx_hex str is unsigned transaction hex from when the transactions were created.
required Returns:
Type Description MoneroTxSet the signed transaction set.
"},{"location":"api/wallet/#monero.MoneroWallet.start_mining","title":"start_mining(num_threads=None, background_mining=None, ignore_battery=None)","text":"Start mining.
Parameters:
Name Type Description Default num_threads Optional[int] is the number of threads created for mining (default None).
None background_mining Optional[bool] specifies if mining should occur in the background (default None).
None ignore_battery Optional[bool] specifies if the battery should be ignored for mining (default None).
None"},{"location":"api/wallet/#monero.MoneroWallet.start_syncing","title":"start_syncing(sync_period_in_ms=10000)","text":"Start background synchronizing with a maximum period between syncs.
Parameters:
Name Type Description Default sync_period_in_ms int maximum period between syncs in milliseconds.
10000"},{"location":"api/wallet/#monero.MoneroWallet.stop_mining","title":"stop_mining()","text":"Stop mining.
"},{"location":"api/wallet/#monero.MoneroWallet.stop_syncing","title":"stop_syncing()","text":"Stop the asynchronous thread to continuously synchronize the wallet with the daemon.
"},{"location":"api/wallet/#monero.MoneroWallet.submit_multisig_tx_hex","title":"submit_multisig_tx_hex(signed_multisig_tx_hex)","text":"Submit signed multisig transactions as represented by a hex string.
Parameters:
Name Type Description Default signed_multisig_tx_hex str is the signed multisig hex returned from sign_multisig_txs().
required Returns:
Type Description list[str] the resulting transaction hashes.
"},{"location":"api/wallet/#monero.MoneroWallet.submit_txs","title":"submit_txs(signed_tx_hex)","text":"Submit signed transactions from a view-only wallet.
Parameters:
Name Type Description Default signed_tx_hex str is signed transaction hex from sign_txs().
required Returns:
Type Description list[str] the resulting transaction hashes.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_dust","title":"sweep_dust(relay=False)","text":"Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
Parameters:
Name Type Description Default relay bool specifies if the resulting transaction should be relayed (default False).
False Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_output","title":"sweep_output(config)","text":"Sweep an output with a given key image.
Parameters:
Name Type Description Default config MoneroTxConfig configures the sweep transaction.
required Returns:
Type Description MoneroTxWallet the created transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_unlocked","title":"sweep_unlocked(config)","text":"Sweep unlocked funds according to the given config.
Parameters:
Name Type Description Default config MoneroTxConfig is the sweep configuration.
required Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.tag_accounts","title":"tag_accounts(tag, account_indices)","text":"Tag accounts.
Parameters:
Name Type Description Default tag str is the tag to apply to the specified accounts.
required account_indices list[int] are the indices of the accounts to tag.
required"},{"location":"api/wallet/#monero.MoneroWallet.thaw_output","title":"thaw_output(key_image)","text":"Thaw a frozen output.
Parameters:
Name Type Description Default key_image str key image of the output to thaw.
required"},{"location":"api/wallet/#monero.MoneroWallet.untag_accounts","title":"untag_accounts(account_indices)","text":"Untag accounts.
Parameters:
Name Type Description Default account_indices list[int] are the indices of the accounts to untag.
required"},{"location":"api/wallet/#monero.MoneroWallet.verify_message","title":"verify_message(msg, address, signature)","text":"Verify a message signature.
Parameters:
Name Type Description Default msg str the signed message.
required address str signing address.
required signature str signature.
required Returns:
Type Description MoneroMessageSignatureResult the message signature result.
"},{"location":"api/wallet/#monero.MoneroWallet.wait_for_next_block","title":"wait_for_next_block()","text":"Wait for the next block to be added to the chain.
Returns:
Type Description int the height of the next block when it is added to the chain.
"},{"location":"api/wallet_full/","title":"Full Wallet","text":""},{"location":"api/wallet_full/#monero.MoneroWalletFull","title":"MoneroWalletFull","text":" Bases: MoneroWallet
Monero wallet implementation which uses monero-project's wallet2.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.create_wallet","title":"create_wallet(config) staticmethod","text":"Create a new wallet with the given configuration.
Parameters:
Name Type Description Default config MoneroWalletConfig the wallet configuration.
required Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_cache_file_buffer","title":"get_cache_file_buffer()","text":"Get wallet cache file without using filesystem.
Returns:
Type Description str Cache file buffer.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_keys_file_buffer","title":"get_keys_file_buffer(password, view_only)","text":"Get wallet keys file without using filesystem.
Parameters:
Name Type Description Default password str The wallet password.
required view_only bool Get view-only keys.
required Returns:
Type Description str Keys file buffer.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_seed_languages","title":"get_seed_languages() staticmethod","text":"Get a list of available languages for the wallet's seed.
Returns:
Type Description list[str] the available languages for the wallet's seed.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.open_wallet","title":"open_wallet(path, password, nettype, regtest=False) staticmethod","text":"Open an existing wallet from disk.
Parameters:
Name Type Description Default path str is the path to the wallet file to open.
required password str is the password of the wallet file to open.
required nettype MoneroNetworkType is the wallet's network type.
required regtest bool indicates if wallet to open is a regtest wallet (optional).
False Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.open_wallet_data","title":"open_wallet_data(password, nettype, keys_data, cache_data, daemon_connection=MoneroRpcConnection(), regtest=False) staticmethod","text":"Open an in-memory wallet from existing data buffers.
Parameters:
Name Type Description Default password str is the password of the wallet file to open.
required nettype MoneroNetworkType is the wallet's network type.
required keys_data str contains the contents of the \".keys\" file.
required cache_data str contains the contents of the wallet cache file (no extension).
required daemon_connection MoneroRpcConnection is connection information to a daemon (default = an unconnected wallet).
MoneroRpcConnection() regtest bool indicates if wallet to open is a regtest wallet (optional).
False Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.wallet_exists","title":"wallet_exists(path) staticmethod","text":"Indicates if a wallet exists at the given path.
Parameters:
Name Type Description Default path str is the path to check for a wallet.
required Returns:
Type Description bool True if a wallet exists at the given path, False otherwise.
"},{"location":"api/wallet_keys/","title":"Keys-Only Wallet","text":""},{"location":"api/wallet_keys/#monero.MoneroWalletKeys","title":"MoneroWalletKeys","text":" Bases: MoneroWallet
Implements a Monero wallet to provide basic key management.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_from_keys","title":"create_wallet_from_keys(config) staticmethod","text":"Create a wallet from an address, view key, and spend key.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type, address, view key, spend key, language).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_from_seed","title":"create_wallet_from_seed(config) staticmethod","text":"Create a wallet from an existing mnemonic phrase or seed.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type, seed, seed offset, is_multisig).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_random","title":"create_wallet_random(config) staticmethod","text":"Create a new wallet with a randomly generated seed.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type and language).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.get_seed_languages","title":"get_seed_languages() staticmethod","text":"Get a list of available languages for the wallet's seed.
Returns:
Type Description list[str] The available languages for the wallet's seed.
"},{"location":"api/wallet_rpc/","title":"RPC Wallet","text":""},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc","title":"MoneroWalletRpc","text":" Bases: MoneroWallet
Implements a Monero wallet using monero-wallet-rpc_.
.. _monero-wallet-rpc: https://docs.getmonero.org/rpc-library/wallet-rpc/
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.create_wallet","title":"create_wallet(config)","text":"Create and open a wallet on the monero-wallet-rpc server.
Parameters:
Name Type Description Default config MoneroWalletConfig configures the wallet to create.
required"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.get_rpc_connection","title":"get_rpc_connection()","text":"Get the wallet's RPC connection.
Returns:
Type Description MoneroRpcConnection | None the wallet's rpc connection.
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.get_seed_languages","title":"get_seed_languages()","text":"Get all supported wallet seed languages.
Returns:
Type Description list[str] wallet's supported languages.
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.stop","title":"stop()","text":"Save and close the current wallet and stop the RPC server.
"},{"location":"api/data_model/connection/","title":"Connection Data Model","text":""},{"location":"api/data_model/connection/#monero.SslOptions","title":"SslOptions","text":" Bases: SerializableStruct
Models SSL options for a Monero rpc connection.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_allow_any_cert","title":"ssl_allow_any_cert: bool | None instance-attribute","text":"Allow any certificate.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_allowed_fingerprints","title":"ssl_allowed_fingerprints: list[str] instance-attribute","text":"Allowed ssl fingerprints.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_ca_file","title":"ssl_ca_file: str | None instance-attribute","text":"Path to ssl CA file.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_certificate_path","title":"ssl_certificate_path: str | None instance-attribute","text":"Path to private ssl certificate.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_private_key_path","title":"ssl_private_key_path: str | None instance-attribute","text":"Path to private ssl key.
"},{"location":"api/data_model/connection/#monero.SslOptions.__init__","title":"__init__()","text":"Initialize a new rpc connection ssl options.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType","title":"MoneroConnectionType","text":" Bases: IntEnum
Enumerates a connection type, wich can be IPV4, IPV6, TOR, I2P or INVALID.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.I2P","title":"I2P = 4 class-attribute instance-attribute","text":"4 Indicates that Monero connection type is I2P.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.INVALID","title":"INVALID = 0 class-attribute instance-attribute","text":"0 Indicates that Monero connection type is invalid.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.IPV4","title":"IPV4 = 1 class-attribute instance-attribute","text":"1 Indicates that Monero connection type is IPV4.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.IPV6","title":"IPV6 = 2 class-attribute instance-attribute","text":"2 Indicates that Monero connection type is IPV6.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.TOR","title":"TOR = 3 class-attribute instance-attribute","text":"3 Indicates that Monero connection type is TOR.
"},{"location":"api/data_model/daemon/","title":"Daemon Data Model","text":""},{"location":"api/data_model/daemon/#monero.MoneroNetworkType","title":"MoneroNetworkType","text":" Bases: IntEnum
Enumerates a Monero network type_.
.. _Monero network type: https://docs.getmonero.org/infrastructure/networks/
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.MAINNET","title":"MAINNET = 0 class-attribute instance-attribute","text":"0 indicates Mainnet network_.
.. _Mainnet network: https://docs.getmonero.org/infrastructure/networks/#mainnet
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.STAGENET","title":"STAGENET = 2 class-attribute instance-attribute","text":"2 indicates Stagenet network_.
.. _Stagenet network: https://docs.getmonero.org/infrastructure/networks/#stagenet
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.TESTNET","title":"TESTNET = 1 class-attribute instance-attribute","text":"1 indicates Testnet network_.
.. _Testnet network: https://docs.getmonero.org/infrastructure/networks/#testnet
"},{"location":"api/data_model/daemon/#monero.MoneroVersion","title":"MoneroVersion","text":" Bases: SerializableStruct
Models a Monero version.
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.is_release","title":"is_release: bool | None instance-attribute","text":"States if the monero software version corresponds to an official tagged release (True), or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.number","title":"number: int | None instance-attribute","text":"Number of the monero software version.
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.__init__","title":"__init__()","text":"Initialize a new Monero version.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader","title":"MoneroBlockHeader","text":" Bases: SerializableStruct
Models a Monero block header which contains information about the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.cumulative_difficulty_high","title":"cumulative_difficulty_high: int | None instance-attribute","text":"Cumulative difficulty of all blocks up to the block in the reply.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.cumulative_difficulty_low","title":"cumulative_difficulty_low: int | None instance-attribute","text":"Cumulative difficulty of all blocks up to the block in the reply.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.depth","title":"depth: int | None instance-attribute","text":"The number of blocks succeeding this block on the blockchain. A larger number means an older block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"The strength of the Monero network based on mining power.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"The strength of the Monero network based on mining power.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.hash","title":"hash: str | None instance-attribute","text":"The hash of this block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.height","title":"height: int | None instance-attribute","text":"The number of blocks preceding this block on the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.long_term_weight","title":"long_term_weight: int | None instance-attribute","text":"The long term block weight, based on the median weight of the preceding 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.major_version","title":"major_version: int | None instance-attribute","text":"The major version of the monero protocol at this block height.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.miner_tx_hash","title":"miner_tx_hash: str | None instance-attribute","text":"The hash of this block's coinbase transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.minor_version","title":"minor_version: int | None instance-attribute","text":"The minor version of the monero protocol at this block height.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.nonce","title":"nonce: int | None instance-attribute","text":"A cryptographic random one-time number used in mining a Monero block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.num_txs","title":"num_txs: int | None instance-attribute","text":"Number of transactions included in this block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.orphan_status","title":"orphan_status: bool | None instance-attribute","text":"If True, this block is not part of the longest chain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.pow_hash","title":"pow_hash: str | None instance-attribute","text":"The hash, as a hexadecimal string, calculated from the block as proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.prev_hash","title":"prev_hash: str | None instance-attribute","text":"The hash of the block immediately preceding this block in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.reward","title":"reward: int | None instance-attribute","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.size","title":"size: int | None instance-attribute","text":"Backward compatibility, same as weight, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.timestamp","title":"timestamp: int | None instance-attribute","text":"The unix time at which the block was recorded into the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.weight","title":"weight: int | None instance-attribute","text":"The adjusted block size, in bytes. This is the raw size, plus a positive adjustment for any Bulletproof transactions with more than 2 outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.__init__","title":"__init__()","text":"Initialize a Monero block header.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.copy","title":"copy()","text":"Copy current block header.
Returns:
Type Description MoneroBlockHeader copied block header.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.merge","title":"merge(other)","text":"Merge current block header with another one.
Raises:
Type Description Exception on reconciliation error.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock","title":"MoneroBlock","text":" Bases: MoneroBlockHeader
Models a Monero block in the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.hex","title":"hex: str | None instance-attribute","text":"Hexadecimal blob of block information.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.miner_tx","title":"miner_tx: MoneroTx | None instance-attribute","text":"Miner transaction information.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.tx_hashes","title":"tx_hashes: list[str] instance-attribute","text":"List of hashes of non-coinbase transactions in the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.txs","title":"txs: list[MoneroTx] instance-attribute","text":"List of non-coinbase transactions in the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.__init__","title":"__init__()","text":"Initialize a Monero block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.copy","title":"copy()","text":"Copy current block.
Returns:
Type Description MoneroBlock copied block.
"},{"location":"api/data_model/daemon/#monero.MoneroTx","title":"MoneroTx","text":" Bases: SerializableStruct
Models a Monero transaction on the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.DEFAULT_PAYMENT_ID","title":"DEFAULT_PAYMENT_ID: str instance-attribute","text":"Default tx payment id
"},{"location":"api/data_model/daemon/#monero.MoneroTx.block","title":"block: MoneroBlock | None instance-attribute","text":"Block including the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.common_tx_sets","title":"common_tx_sets: str | None instance-attribute","text":"A hexadecimal string representing a set of unsigned transactions, or a set of signing keys used in a multisig transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.extra","title":"extra: list[int] instance-attribute","text":"Usually called the payment ID but can be used to include any random 32 bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.fee","title":"fee: int | None instance-attribute","text":"The amount of the mining fee included in the transaction, in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.full_hex","title":"full_hex: str | None instance-attribute","text":"Full transaction information as a hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.hash","title":"hash: str | None instance-attribute","text":"The transaction hash.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.in_tx_pool","title":"in_tx_pool: bool | None instance-attribute","text":"States if the transaction is in pool (True) or included in a block (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.inputs","title":"inputs: list[MoneroOutput] instance-attribute","text":"List of inputs into transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_confirmed","title":"is_confirmed: bool | None instance-attribute","text":"States if the transaction included in a block (True) or is in pool (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_double_spend_seen","title":"is_double_spend_seen: bool | None instance-attribute","text":"States if the transaction is a double-spend (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_failed","title":"is_failed: bool | None instance-attribute","text":"Indicates if the transaction validation has previously failed.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_kept_by_block","title":"is_kept_by_block: bool | None instance-attribute","text":"States if the transaction was included in a block at least once (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_miner_tx","title":"is_miner_tx: bool | None instance-attribute","text":"States if the transaction is a coinbase-transaction (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_relayed","title":"is_relayed: bool | None instance-attribute","text":"States if the transaction was relayed (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.key","title":"key: str | None instance-attribute","text":"The transaction key.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_failed_hash","title":"last_failed_hash: str | None instance-attribute","text":"If the transaction validation has previously failed, this tells the previous transaction hash.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_failed_height","title":"last_failed_height: int | None instance-attribute","text":"If the transaction validation has previously failed, this tells at what height that occurred.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_relayed_timestamp","title":"last_relayed_timestamp: int | None instance-attribute","text":"Last unix time at which the transaction has been relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.max_used_block_hash","title":"max_used_block_hash: str | None instance-attribute","text":"Tells the hash of the most recent block with an output used in this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.max_used_block_height","title":"max_used_block_height: int | None instance-attribute","text":"Tells the height of the most recent block with an output used in this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.metadata","title":"metadata: str | None instance-attribute","text":"Transaction metadata.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.num_confirmations","title":"num_confirmations: int | None instance-attribute","text":"Number of network confirmations.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.output_indices","title":"output_indices: list[int] instance-attribute","text":"Transaction indexes.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.outputs","title":"outputs: list[MoneroOutput] instance-attribute","text":"Transaction outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.payment_id","title":"payment_id: str | None instance-attribute","text":"Payment ID for this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.prunable_hash","title":"prunable_hash: str | None instance-attribute","text":"Keccak-256 hash of the prunable portion of the block.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.prunable_hex","title":"prunable_hex: str | None instance-attribute","text":"Prunable block encoded as a hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.pruned_hex","title":"pruned_hex: str | None instance-attribute","text":"Pruned block encoded as hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.rct_sig_prunable","title":"rct_sig_prunable: str | None instance-attribute","text":"Prunable ring signature.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.rct_signatures","title":"rct_signatures: str | None instance-attribute","text":"Signatures used in ring signature to hide the true origin of the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.received_timestamp","title":"received_timestamp: int | None instance-attribute","text":"Unix time at chich the transaction has been received.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.relay","title":"relay: bool | None instance-attribute","text":"States if this transaction should be relayed (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.ring_size","title":"ring_size: int | None instance-attribute","text":"The ring size of this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.signatures","title":"signatures: list[str] instance-attribute","text":"List of signatures used in ring signature to hide the true origin of the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.size","title":"size: int | None instance-attribute","text":"Backward compatibility, same as weight, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.unlock_time","title":"unlock_time: int | None instance-attribute","text":"If not 0, this tells when the transaction outputs are spendable.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.version","title":"version: int | None instance-attribute","text":"Transaction version.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.weight","title":"weight: int | None instance-attribute","text":"The weight of this transaction in bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.__init__","title":"__init__()","text":"Initialize a new Monero transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.copy","title":"copy()","text":"Copy current tx.
Returns:
Type Description MoneroTx tx copy.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.get_height","title":"get_height()","text":"Get the transaction height.
Returns:
Type Description int | None The height of the transaction, if known.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.merge","title":"merge(other)","text":"Merge current tx with another one.
Parameters:
Name Type Description Default other MoneroTx other tx to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage","title":"MoneroKeyImage","text":" Bases: SerializableStruct
Models a Monero key image.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.hex","title":"hex: str | None instance-attribute","text":"The key image in hexadecimal format.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.signature","title":"signature: str | None instance-attribute","text":"The key image signature. None if not known.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.__init__","title":"__init__()","text":"Initialize a Monero key image.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.copy","title":"copy()","text":"Copy current key image.
Returns:
Type Description MoneroKeyImage key image copy.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.deserialize_key_images","title":"deserialize_key_images(key_images_json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.merge","title":"merge(other)","text":"Merge current key image with another one.
Parameters:
Name Type Description Default other MoneroKeyImage other key image to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroOutput","title":"MoneroOutput","text":" Bases: SerializableStruct
Models a Monero transaction output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.index","title":"index: int | None instance-attribute","text":"Output index.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.key_image","title":"key_image: MoneroKeyImage | None instance-attribute","text":"The key image of the output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.ring_output_indices","title":"ring_output_indices: list[int] instance-attribute","text":"Indices of ring outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.stealth_public_key","title":"stealth_public_key: str | None instance-attribute","text":"The public key of the output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.tx","title":"tx: MoneroTx instance-attribute","text":"The transaction related to this output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.__init__","title":"__init__()","text":"Initialize a Monero output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.copy","title":"copy()","text":"Copy current output.
Returns:
Type Description MoneroOutput output copy.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.merge","title":"merge(other)","text":"Merge current output wallet with another output.
Parameters:
Name Type Description Default other MoneroOutput other output to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroAltChain","title":"MoneroAltChain","text":" Bases: SerializableStruct
Models an alternative chain seen by the node.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.block_hashes","title":"block_hashes: list[str] instance-attribute","text":"List of all block hashes in the alternative chain that are not in the main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"Cumulative difficulty of all blocks in the alternative chain (Most-significant 64 bits of the 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"Cumulative difficulty of all blocks in the alternative chain (Least-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.height","title":"height: int | None instance-attribute","text":"The block height of the first diverging block of this alternative chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.length","title":"length: int | None instance-attribute","text":"The length in blocks of this alternative chain, after divergence.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.main_chain_parent_block_hash","title":"main_chain_parent_block_hash: str | None instance-attribute","text":"The hash of the greatest height block that is shared between the alternative chain and the main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.__init__","title":"__init__()","text":"Initialize a Monero alt chain info.
"},{"location":"api/data_model/daemon/#monero.MoneroBan","title":"MoneroBan","text":" Bases: SerializableStruct
Model a Monero banhammer.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.host","title":"host: str | None instance-attribute","text":"Host ban.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.ip","title":"ip: int | None instance-attribute","text":"IP ban.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.is_banned","title":"is_banned: bool | None instance-attribute","text":"Indicates if ban on the host is active (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroBan.seconds","title":"seconds: int | None instance-attribute","text":"Indicates the duration of the ban in seconds.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.__init__","title":"__init__()","text":"Initialize a Monero banhammer.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult","title":"MoneroPruneResult","text":" Bases: SerializableStruct
Models the result of pruning the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.is_pruned","title":"is_pruned: bool | None instance-attribute","text":"Indicates if blockchain is pruned.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.pruning_seed","title":"pruning_seed: int | None instance-attribute","text":"Blockheight at which pruning began.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.__init__","title":"__init__()","text":"Initialize a Monero prune result.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus","title":"MoneroMiningStatus","text":" Bases: SerializableStruct
Models a Monero daemon mining status.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.address","title":"address: str | None instance-attribute","text":"Account address daemon is mining to. None if not mining.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.is_active","title":"is_active: bool | None instance-attribute","text":"Indicates if mining is enabled.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.is_background","title":"is_background: bool | None instance-attribute","text":"Indicates if mining is running in background.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.num_threads","title":"num_threads: int | None instance-attribute","text":"Number of running mining threads.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.speed","title":"speed: int | None instance-attribute","text":"Mining power in hashes per seconds.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.__init__","title":"__init__()","text":"Initialize a Monero daemon mining status.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum","title":"MoneroMinerTxSum","text":" Bases: SerializableStruct
Model for the sum of miner emissions and fees.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.emission_sum_high","title":"emission_sum_high: int | None instance-attribute","text":"The new coins emitted in atomic-units. (Most significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.emission_sum_low","title":"emission_sum_low: int | None instance-attribute","text":"The new coins emitted in atomic-units. (Least significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.fee_sum_high","title":"fee_sum_high: int | None instance-attribute","text":"The sum of fees in atomic-units. (Most significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.fee_sum_low","title":"fee_sum_low: int | None instance-attribute","text":"The sum of fees in atomic-units. (Least significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.__init__","title":"__init__()","text":"Initialize a Monero miner transaction sum.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate","title":"MoneroBlockTemplate","text":" Bases: SerializableStruct
Monero block template to mine.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.block_hashing_blob","title":"block_hashing_blob: str | None instance-attribute","text":"Blob on which to try to find a valid nonce.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.block_template_blob","title":"block_template_blob: str | None instance-attribute","text":"Blob on which to try to mine a new block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"Network difficulty (Most-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"Network difficulty (Least-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.expected_reward","title":"expected_reward: int | None instance-attribute","text":"Coinbase reward expected to be received if block is successfully mined.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.height","title":"height: int | None instance-attribute","text":"Height on which to mine.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.next_seed_hash","title":"next_seed_hash: str | None instance-attribute","text":"Hash of the next block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.prev_hash","title":"prev_hash: str | None instance-attribute","text":"Hash of the most recent block on which to mine the next block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.reserved_offset","title":"reserved_offset: int | None instance-attribute","text":"Reserved offset.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.seed_hash","title":"seed_hash: str | None instance-attribute","text":"Hash of block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.seed_height","title":"seed_height: int | None instance-attribute","text":"Height of block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.__init__","title":"__init__()","text":"Initialize a Monero block template.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan","title":"MoneroConnectionSpan","text":" Bases: SerializableStruct
Monero daemon connection span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.connection_id","title":"connection_id: str | None instance-attribute","text":"Id of connection
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.num_blocks","title":"num_blocks: int | None instance-attribute","text":"Number of blocks in this span
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.rate","title":"rate: int | None instance-attribute","text":"Connection rate
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.remote_address","title":"remote_address: str | None instance-attribute","text":"Peer address the node is downloading (or has downloaded) than span from.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.size","title":"size: int | None instance-attribute","text":"Total number of bytes in that span's blocks (including txes).
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.speed","title":"speed: int | None instance-attribute","text":"Connection speed.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.start_height","title":"start_height: int | None instance-attribute","text":"Block height of the first block in that span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.__init__","title":"__init__()","text":"Initialize a Monero connection span.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer","title":"MoneroPeer","text":" Bases: SerializableStruct
Models a peer to the daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.address","title":"address: str | None instance-attribute","text":"The peer's address, actually IPv4 & port.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.avg_download","title":"avg_download: int | None instance-attribute","text":"Average bytes of data downloaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.avg_upload","title":"avg_upload: int | None instance-attribute","text":"Average bytes of data uploaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.connection_type","title":"connection_type: MoneroConnectionType | None instance-attribute","text":"Type of peer connection.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.current_download","title":"current_download: int | None instance-attribute","text":"Current bytes downloaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.current_upload","title":"current_upload: int | None instance-attribute","text":"Current bytes uploaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.hash","title":"hash: str | None instance-attribute","text":"Peer hash.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.height","title":"height: int | None instance-attribute","text":"The peer blockchain height.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.host","title":"host: str | None instance-attribute","text":"The peer host.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.id","title":"id: str | None instance-attribute","text":"The node's ID on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Indicates if peer is pulling blocks from node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_local_host","title":"is_local_host: bool | None instance-attribute","text":"Indicates if peer is localhost.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_local_ip","title":"is_local_ip: bool | None instance-attribute","text":"Indicates if peer has a local ip address.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_online","title":"is_online: bool | None instance-attribute","text":"Indicates if the peer is online.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.last_seen_timestamp","title":"last_seen_timestamp: int | None instance-attribute","text":"Last activity timestamp of this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.live_time","title":"live_time: int | None instance-attribute","text":"Length of time the peer has been online.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_receives","title":"num_receives: int | None instance-attribute","text":"Total number of messages received from this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_sends","title":"num_sends: int | None instance-attribute","text":"Total number of messages sent to this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_support_flags","title":"num_support_flags: int | None instance-attribute","text":"Support flags number.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.port","title":"port: int | None instance-attribute","text":"The port that the node is using to connect to the network.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.pruning_seed","title":"pruning_seed: int | None instance-attribute","text":"Block height at which pruning began.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.receive_idle_time","title":"receive_idle_time: int | None instance-attribute","text":"Seconds since last data was received from this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.rpc_credits_per_hash","title":"rpc_credits_per_hash: int | None instance-attribute","text":"Credits for every hash calculated by client.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.rpc_port","title":"rpc_port: int | None instance-attribute","text":"Peer RPC port.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.send_idle_time","title":"send_idle_time: int | None instance-attribute","text":"Seconds since the last data sent to this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.state","title":"state: str | None instance-attribute","text":"Peer state.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.__init__","title":"__init__()","text":"Initialize a new Monero peer.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult","title":"MoneroSubmitTxResult","text":" Bases: MoneroRpcPaymentInfo
Models the result from submitting a tx to a daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_invalid_input","title":"has_invalid_input: bool | None instance-attribute","text":"Indicates if the transaction has an invalid input.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_invalid_output","title":"has_invalid_output: bool | None instance-attribute","text":"Indicates if the transaction has an invalid output.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_too_few_outputs","title":"has_too_few_outputs: bool | None instance-attribute","text":"Indicates if the transaction has too few outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_double_spend","title":"is_double_spend: bool | None instance-attribute","text":"Indicates if the transaction is double spend.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_fee_too_low","title":"is_fee_too_low: bool | None instance-attribute","text":"Indicates if the transaction fee is too low.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_good","title":"is_good: bool | None instance-attribute","text":"Indicates if the submission of the transaction was successfull.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_mixin_too_low","title":"is_mixin_too_low: bool | None instance-attribute","text":"Indicates if the transaction mixin count is too low.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_overspend","title":"is_overspend: bool | None instance-attribute","text":"Indicates if the transaction uses more money than available
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_relayed","title":"is_relayed: bool | None instance-attribute","text":"Indicates if the transaction has been relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_too_big","title":"is_too_big: bool | None instance-attribute","text":"Indicates if the transaction size is too big.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_tx_extra_too_big","title":"is_tx_extra_too_big: bool | None instance-attribute","text":"Indicates if the transaction extra size is too big.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.reason","title":"reason: str | None instance-attribute","text":"Additional information. Currently empty or Not relayed if transaction was accepted but not relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.sanity_check_failed","title":"sanity_check_failed: bool | None instance-attribute","text":"Indicates if the transaction sanity check has failed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.__init__","title":"__init__()","text":"Initialize a new submit transaction result.
"},{"location":"api/data_model/daemon/#monero.MoneroTxBacklogEntry","title":"MoneroTxBacklogEntry","text":"TODO
"},{"location":"api/data_model/daemon/#monero.MoneroTxBacklogEntry.__init__","title":"__init__()","text":"Intialize a new tx backlog entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry","title":"MoneroOutputDistributionEntry","text":" Bases: SerializableStruct
Models a Monero output distribution entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.base","title":"base: int | None instance-attribute","text":"The total number of outputs of amount in the chain before, not including, the block at start_height.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.distribution","title":"distribution: list[int] instance-attribute","text":"The output distibution.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.start_height","title":"start_height: int | None instance-attribute","text":"Not necessarily equal to start_height parameter especially for amount = 0 where start_height will be no less than the height of the v4 hardfork.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.__init__","title":"__init__()","text":"Initialize a Monero output distribution entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry","title":"MoneroOutputHistogramEntry","text":" Bases: SerializableStruct
Models a Monero output histogram entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.num_instances","title":"num_instances: int | None instance-attribute","text":"Number of outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.recent_instances","title":"recent_instances: int | None instance-attribute","text":"Number of recent outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.unlocked_instances","title":"unlocked_instances: int | None instance-attribute","text":"Number of unlocked outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.__init__","title":"__init__()","text":"Initialize a Monero output histogram entry.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats","title":"MoneroTxPoolStats","text":" Bases: SerializableStruct
Models transaction pool statistics.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_max","title":"bytes_max: int | None instance-attribute","text":"Max transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_med","title":"bytes_med: int | None instance-attribute","text":"Median transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_min","title":"bytes_min: int | None instance-attribute","text":"Min transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_total","title":"bytes_total: int | None instance-attribute","text":"Total size of all transactions in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.fee_total","title":"fee_total: int | None instance-attribute","text":"The sum of the fees for all transactions currently in the transaction pool atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.histo","title":"histo: dict[int, int] instance-attribute","text":"Txs histogram (key for bytes, value for txs).
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.histo98pc","title":"histo98pc: int | None instance-attribute","text":"The time 98% of txes are younger than.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num10m","title":"num10m: int | None instance-attribute","text":"Number of transactions in pool for more than 10 minutes.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_double_spends","title":"num_double_spends: int | None instance-attribute","text":"Number of double spend transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_failing","title":"num_failing: int | None instance-attribute","text":"Number of failing transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_not_relayed","title":"num_not_relayed: int | None instance-attribute","text":"Number of non-relayed transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_txs","title":"num_txs: int | None instance-attribute","text":"Total number of transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.oldest_timestamp","title":"oldest_timestamp: int | None instance-attribute","text":"Unix time of the oldest transaction in the pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.__init__","title":"__init__()","text":"Initialize a Monero transaction pool statistics.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult","title":"MoneroDaemonUpdateCheckResult","text":" Bases: SerializableStruct
Models the result of checking for a daemon update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.auto_uri","title":"auto_uri: str | None instance-attribute","text":"URL automatically generated by the daemon to download the update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.hash","title":"hash: str | None instance-attribute","text":"Integrity check hash.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.is_update_available","title":"is_update_available: bool | None instance-attribute","text":"Indicates if an update is available to download.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.user_uri","title":"user_uri: str | None instance-attribute","text":"Alternative user URI.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.version","title":"version: str | None instance-attribute","text":"Version available for download.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.__init__","title":"__init__()","text":"Initialize a Monero update check result.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult","title":"MoneroDaemonUpdateDownloadResult","text":" Bases: MoneroDaemonUpdateCheckResult
Models the result of downloading a daemon update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult.download_path","title":"download_path: str | None instance-attribute","text":"Path to download the update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult.__init__","title":"__init__()","text":"Initialize a Monero update download result.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate","title":"MoneroFeeEstimate","text":" Bases: SerializableStruct
Models a Monero fee estimate.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.fee","title":"fee: int | None instance-attribute","text":"Amount of fees estimated per byte in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.fees","title":"fees: list[int] instance-attribute","text":"Represents the base fees at different priorities [slow, normal, fast, fastest].
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.quantization_mask","title":"quantization_mask: int | None instance-attribute","text":"Final fee should be rounded up to an even multiple of this value.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.__init__","title":"__init__()","text":"Initialize a Monero fee estimate.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo","title":"MoneroDaemonInfo","text":" Bases: MoneroRpcPaymentInfo
Models information got from a Monero daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.adjusted_timestamp","title":"adjusted_timestamp: int | None instance-attribute","text":"Current time approximated from chain data, as Unix time.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_size_limit","title":"block_size_limit: int | None instance-attribute","text":"Backward compatibility, same as block_weight_limit, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_size_median","title":"block_size_median: int | None instance-attribute","text":"Backward compatibility, same as block_weight_median, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_weight_limit","title":"block_weight_limit: int | None instance-attribute","text":"Maximum allowed adjusted block size based on latest 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_weight_median","title":"block_weight_median: int | None instance-attribute","text":"Median adjusted block size of latest 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.bootstrap_daemon_address","title":"bootstrap_daemon_address: str | None instance-attribute","text":"Bootstrap-node to give immediate usability to wallets while syncing by proxying RPC to it.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.cumulative_difficulty_high","title":"cumulative_difficulty_high: int | None instance-attribute","text":"Most-significant 64 bits of the 128-bit cumulative difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.cumulative_difficulty_low","title":"cumulative_difficulty_low: int | None instance-attribute","text":"Least-significant 64 bits of the 128-bit cumulative difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.database_size","title":"database_size: int | None instance-attribute","text":"The size of the blockchain database, in bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"The most-significant 64 bits of the 128-bit network difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"The least-significant 64 bits of the 128-bit network difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.free_space","title":"free_space: int | None instance-attribute","text":"Available disk space on the node.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.height","title":"height: int | None instance-attribute","text":"Current length of longest chain known to daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.height_without_bootstrap","title":"height_without_bootstrap: int | None instance-attribute","text":"Current length of the local chain of the daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_busy_syncing","title":"is_busy_syncing: bool | None instance-attribute","text":"States if new blocks are being added (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_offline","title":"is_offline: bool | None instance-attribute","text":"States if the node is offline (True) or online (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_restricted","title":"is_restricted: bool | None instance-attribute","text":"Indicates that the node RPC interface is restricted (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_synchronized","title":"is_synchronized: bool | None instance-attribute","text":"States if the node is synchronized (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.network_type","title":"network_type: MoneroNetworkType | None instance-attribute","text":"Network type (MAINNET, TESTNET, or STAGENET).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_alt_blocks","title":"num_alt_blocks: int | None instance-attribute","text":"Number of alternative blocks to main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_incoming_connections","title":"num_incoming_connections: int | None instance-attribute","text":"Number of peers connected to and pulling from your node.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_offline_peers","title":"num_offline_peers: int | None instance-attribute","text":"Number of peers that are marked as not reacheable on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_online_peers","title":"num_online_peers: int | None instance-attribute","text":"Number of peers that are marked as reacheble on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_outgoing_connections","title":"num_outgoing_connections: int | None instance-attribute","text":"Number of peers that you are connected to and getting information from.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_rpc_connections","title":"num_rpc_connections: int | None instance-attribute","text":"Number of RPC client connected to the daemon (Including this RPC request).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_txs","title":"num_txs: int | None instance-attribute","text":"Total number of non-coinbase transactions in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_txs_pool","title":"num_txs_pool: int | None instance-attribute","text":"Number of transactions that have been broadcast but not included in a block.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.start_timestamp","title":"start_timestamp: int | None instance-attribute","text":"Start time of the daemon, as UNIX time.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.target","title":"target: int | None instance-attribute","text":"Current target for next proof of work.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.target_height","title":"target_height: int | None instance-attribute","text":"The height of the next block in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.update_available","title":"update_available: bool | None instance-attribute","text":"States if a newer Monero software version is available.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.version","title":"version: str | None instance-attribute","text":"The version of the Monero software the node is running.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.was_bootstrap_ever_used","title":"was_bootstrap_ever_used: bool | None instance-attribute","text":"States if a bootstrap node has ever been used since the daemon started.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.__init__","title":"__init__()","text":"Initiliaze a Monero daemon info.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo","title":"MoneroDaemonSyncInfo","text":" Bases: MoneroRpcPaymentInfo
Models daemon synchronization information.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.height","title":"height: int | None instance-attribute","text":"Daemon blockchain height.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.next_needed_pruning_seed","title":"next_needed_pruning_seed: int | None instance-attribute","text":"The next pruning seed needed for pruned sync.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.overview","title":"overview: str | None instance-attribute","text":"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
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.peers","title":"peers: list[MoneroPeer] instance-attribute","text":"List of peers connected to the node
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.spans","title":"spans: list[MoneroConnectionSpan] instance-attribute","text":"Currently connected peers to download blocks from.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.target_height","title":"target_height: int | None instance-attribute","text":"Target height the node is syncing from (will be 0 if node is fully synced).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.__init__","title":"__init__()","text":"Initialize a Monero daemon sync info.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo","title":"MoneroHardForkInfo","text":" Bases: MoneroRpcPaymentInfo
Models a Monero look up information regarding hard fork voting and readiness.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.earliest_height","title":"earliest_height: int | None instance-attribute","text":"Block height at which hard fork would be enabled if voted in.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.is_enabled","title":"is_enabled: bool | None instance-attribute","text":"Tells if hard fork is enforced.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.num_votes","title":"num_votes: int | None instance-attribute","text":"Number of votes towards hard fork.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.state","title":"state: int | None instance-attribute","text":"Current hard fork state. 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.threshold","title":"threshold: int | None instance-attribute","text":"Minimum percent of votes to trigger hard fork. Default is 80.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.version","title":"version: int | None instance-attribute","text":"The major block version for the fork.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.voting","title":"voting: int | None instance-attribute","text":"Hard fork voting status.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.window","title":"window: int | None instance-attribute","text":"Number of blocks over which current votes are cast. Default is 10080 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.__init__","title":"__init__()","text":"Initialize a Monero hard fork info.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener","title":"MoneroDaemonListener","text":"Receives notifications as a daemon is updated.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.last_header","title":"last_header: MoneroBlockHeader | None instance-attribute","text":"Last block header added to the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.__init__","title":"__init__()","text":"Initialize a Monero daemon listener.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.on_block_header","title":"on_block_header(header)","text":"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"},{"location":"api/data_model/wallet/","title":"Wallet Data Model","text":""},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig","title":"MoneroWalletConfig","text":" Bases: SerializableStruct
Configures a wallet to create.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.account_lookahead","title":"account_lookahead: int | None instance-attribute","text":"Account index look ahead.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.is_multisig","title":"is_multisig: bool | None instance-attribute","text":"Indicates if the wallet is a multisignature wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.language","title":"language: str | None instance-attribute","text":"The wallet language.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.network_type","title":"network_type: MoneroNetworkType | None instance-attribute","text":"The wallet network type.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.password","title":"password: str | None instance-attribute","text":"The wallet password.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.path","title":"path: str | None instance-attribute","text":"The wallet path on file system.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.primary_address","title":"primary_address: str | None instance-attribute","text":"The wallet standard address.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.private_spend_key","title":"private_spend_key: str | None instance-attribute","text":"The wallet private spend key.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.private_view_key","title":"private_view_key: str | None instance-attribute","text":"The wallet private view key.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.regtest","title":"regtest: bool | None instance-attribute","text":"Indicates if wallet is regtest.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.restore_height","title":"restore_height: int | None instance-attribute","text":"The wallet restore height.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.save_current","title":"save_current: bool | None instance-attribute","text":"Save the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.seed","title":"seed: str | None instance-attribute","text":"The wallet mnemonic.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.seed_offset","title":"seed_offset: str | None instance-attribute","text":"The wallet custom seed offset.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.server","title":"server: MoneroRpcConnection | None instance-attribute","text":"The wallet RPC connection.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.subaddress_lookahead","title":"subaddress_lookahead: int | None instance-attribute","text":"Subaddress index look ahead.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.copy","title":"copy()","text":"Copy this wallet config.
Returns:
Type Description MoneroWalletConfig Copy of the wallet config.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.deserialize","title":"deserialize(config_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult","title":"MoneroSyncResult","text":" Bases: SerializableStruct
Models a result of syncing a wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult.num_blocks_fetched","title":"num_blocks_fetched: int instance-attribute","text":"Number of blocks fetched.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult.received_money","title":"received_money: bool instance-attribute","text":"Indicates if money was received.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress","title":"MoneroSubaddress","text":" Bases: SerializableStruct
Models a Monero subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.account_index","title":"account_index: int | None instance-attribute","text":"The subaddress account index.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.address","title":"address: str | None instance-attribute","text":"Public address.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.balance","title":"balance: int | None instance-attribute","text":"The subaddress balance.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.index","title":"index: int | None instance-attribute","text":"The subaddress index.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.is_used","title":"is_used: bool | None instance-attribute","text":"Indicates if subaddress has been used in receiving funds.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.label","title":"label: str | None instance-attribute","text":"The subaddress label.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.num_blocks_to_unlock","title":"num_blocks_to_unlock: int | None instance-attribute","text":"Number of blocks to unlock receveid outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.num_unspent_outputs","title":"num_unspent_outputs: int | None instance-attribute","text":"The number of unspent outputs in this subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.unlocked_balance","title":"unlocked_balance: int | None instance-attribute","text":"The subaddress unlocked balance.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.__init__","title":"__init__()","text":"Initialize a Monero subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount","title":"MoneroAccount","text":" Bases: SerializableStruct
Models a Monero account.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.balance","title":"balance: int | None instance-attribute","text":"The account balance.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.index","title":"index: int | None instance-attribute","text":"The account index.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.primary_address","title":"primary_address: str | None instance-attribute","text":"The account primary address.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.subaddresses","title":"subaddresses: list[MoneroSubaddress] instance-attribute","text":"List of account subaddresses.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.tag","title":"tag: str | None instance-attribute","text":"The account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.unlocked_balance","title":"unlocked_balance: int | None instance-attribute","text":"The account unlocked balance.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.__init__","title":"__init__()","text":"Initialize a Monero account.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination","title":"MoneroDestination","text":" Bases: SerializableStruct
Models an outgoing transfer destination.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.address","title":"address: str | None instance-attribute","text":"Address of the receiver.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.amount","title":"amount: int | None instance-attribute","text":"Amount sent to this destination.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.copy","title":"copy()","text":"Copy current outgoing transfer destination.
Returns:
Type Description MoneroDestination outgoing transfer destination copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer","title":"MoneroTransfer","text":" Bases: SerializableStruct
Models a base transfer of funds to or from the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.account_index","title":"account_index: int | None instance-attribute","text":"Index of the account related to this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.amount","title":"amount: int | None instance-attribute","text":"Transfer amount in atomic-units.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.tx","title":"tx: MoneroTxWallet instance-attribute","text":"Related wallet transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.__init__","title":"__init__()","text":"Initialize a Monero transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.copy","title":"copy()","text":"Copy current transfer.
Returns:
Type Description MoneroTransfer transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.is_incoming","title":"is_incoming()","text":"Indicates if it is an incoming transfer (True) or not (False). Default None.
Returns:
Type Description bool | None True if current transfer is incoming, False if outgoing, None if unkown.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.is_outgoing","title":"is_outgoing()","text":"Indicates if it is an outgoing transfer (True) or not (False). Default None.
Returns:
Type Description bool | None True if current transfer is outgoing, False if incoming, None if unkown.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.merge","title":"merge(other)","text":"Merge current transfer with another one.
Parameters:
Name Type Description Default other MoneroTransfer other transfer to merge with.
required"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer","title":"MoneroIncomingTransfer","text":" Bases: MoneroTransfer
Models an incoming transfer of funds to the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.address","title":"address: str | None instance-attribute","text":"The address that received funds within this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.num_suggested_confirmations","title":"num_suggested_confirmations: int | None instance-attribute","text":"The number of suggested confirmations before moving funds.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"The subaddress index that received funds within this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.__init__","title":"__init__()","text":"Initialize a Monero incoming transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.copy","title":"copy()","text":"Copy current incoming transfer.
Returns:
Type Description MoneroIncomingTransfer incoming transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer","title":"MoneroOutgoingTransfer","text":" Bases: MoneroTransfer
Models an outgoing transfer of funds from the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.addresses","title":"addresses: list[str] instance-attribute","text":"Addresses from which the transfer originated.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Outgoing transfer destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Subaddresses from which the transfer originated.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.copy","title":"copy()","text":"Copy current outgoing transfer.
Returns:
Type Description MoneroOutgoingTransfer outgoing transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery","title":"MoneroTransferQuery","text":" Bases: MoneroTransfer
Configures a query to retrieve transfers.
All transfers are returned except those that do not meet the criteria defined in this query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.address","title":"address: str | None instance-attribute","text":"Select transfers involving particular address. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.addresses","title":"addresses: list[str] instance-attribute","text":"Select transfers involving particular addresses. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Select transfers involving particular destinations. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.has_destinations","title":"has_destinations: bool | None instance-attribute","text":"Filter transfers with or without destinations. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.incoming","title":"incoming: bool | None instance-attribute","text":"Filter incoming or outgoing transfers. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.outgoing","title":"outgoing: bool | None instance-attribute","text":"Filter incoming or outgoing transfers. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"Filter by subaddress index. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Select transfers involving particular subaddresses. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.tx_query","title":"tx_query: MoneroTxQuery | None instance-attribute","text":"Related transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.__init__","title":"__init__()","text":"Initialize a Monero transfer query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.copy","title":"copy()","text":"Copy current transfer query.
Returns:
Type Description MoneroTransferQuery transfer query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.deserialize_from_block","title":"deserialize_from_block(transfer_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.meets_criteria","title":"meets_criteria(transfer, query_parent=True)","text":"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).
True Returns:
Type Description bool True if transfer meets all criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet","title":"MoneroOutputWallet","text":" Bases: MoneroOutput
Models a Monero output with wallet extensions.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.account_index","title":"account_index: int | None instance-attribute","text":"The index of the account that owns this output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.is_frozen","title":"is_frozen: bool | None instance-attribute","text":"Indicates if the output is frozen (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.is_spent","title":"is_spent: bool | None instance-attribute","text":"Indicates if the output is spent (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"The index of the subaddress that owns this output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.__init__","title":"__init__()","text":"Initialize a Monero wallet output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.copy","title":"copy()","text":"Copy current output wallet.
Returns:
Type Description MoneroOutputWallet output wallet copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery","title":"MoneroOutputQuery","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.max_amount","title":"max_amount: int | None instance-attribute","text":"Filter outputs above this amount.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.min_amount","title":"min_amount: int | None instance-attribute","text":"Filter outputs below this amount.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Subadress indices to select (empty for all).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.tx_query","title":"tx_query: MoneroTxQuery | None property","text":"Related transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.__init__","title":"__init__()","text":"Initialize a Monero output query.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.copy","title":"copy()","text":"Copy current output query.
Returns:
Type Description MoneroOutputQuery output query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.deserialize_from_block","title":"deserialize_from_block(output_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.meets_criteria","title":"meets_criteria(output, query_parent=True)","text":"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 True if output meets all the criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.set_tx_query","title":"set_tx_query(tx_query, output_query)","text":"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 True sets outputs query in tx_query, otherwise inputs query.
required"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet","title":"MoneroTxWallet","text":" Bases: MoneroTx
Models a Monero transaction in the context of a wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.change_address","title":"change_address: str | None instance-attribute","text":"Address to which the change amount of the transaction was sent.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.change_amount","title":"change_amount: int | None instance-attribute","text":"Change amount of the transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.extra_hex","title":"extra_hex: str | None instance-attribute","text":"Extra information about the transaction in hexadecimal format.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.incoming_transfers","title":"incoming_transfers: list[MoneroIncomingTransfer] instance-attribute","text":"List of incoming transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.input_sum","title":"input_sum: int | None instance-attribute","text":"Total input sum.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Indicates if the transaction has incoming transfers.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.is_locked","title":"is_locked: bool | None instance-attribute","text":"Indicates if the transaction is locked.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.is_outgoing","title":"is_outgoing: bool | None instance-attribute","text":"Indicated if the transaction has outgoing transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.note","title":"note: str | None instance-attribute","text":"Transaction note.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.num_dummy_outputs","title":"num_dummy_outputs: int | None instance-attribute","text":"Number of decoys of the transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.outgoing_transfer","title":"outgoing_transfer: MoneroOutgoingTransfer | None instance-attribute","text":"The outgoing transfer related to this transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.output_sum","title":"output_sum: int | None instance-attribute","text":"The total output amount sum originated from this transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.tx_set","title":"tx_set: MoneroTxSet | None instance-attribute","text":"Set of transactions related to current tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.__init__","title":"__init__()","text":"Initialize a new Monero tx wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.copy","title":"copy()","text":"Copy current tx wallet.
Returns:
Type Description MoneroTxWallet tx wallet copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.filter_outputs_wallet","title":"filter_outputs_wallet(query)","text":"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 query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.filter_transfers","title":"filter_transfers(query)","text":"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 query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.get_incoming_amount","title":"get_incoming_amount()","text":"Get total amount received in current tx.
Returns:
Type Description int total amount received in current wallet tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.get_inputs_wallet","title":"get_inputs_wallet(query=None)","text":"Get wallet inputs filtered by query.
Parameters:
Name Type Description Default query MoneroOutputQuery query to filter outputs with.
None Returns:
Type Description list[MoneroOutputWallet] wallet outputs filtered by query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.get_outgoing_amount","title":"get_outgoing_amount()","text":"Get total amount spent in current tx.
Returns:
Type Description int total amount spent in current wallet tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery","title":"MoneroTxQuery","text":" Bases: MoneroTxWallet
Configures a query to retrieve transactions.
All transactions are returned except those that do not meet the criteria defined in this query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.has_payment_id","title":"has_payment_id: bool | None instance-attribute","text":"Get transactions that have a payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.hashes","title":"hashes: list[str] instance-attribute","text":"Get transactions by hashes.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.height","title":"height: int | None instance-attribute","text":"Get transactions by height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.include_outputs","title":"include_outputs: int | None instance-attribute","text":"Include outputs in transaction data.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.input_query","title":"input_query: MoneroOutputQuery | None instance-attribute","text":"Query to apply on transaction inputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Include incoming transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.is_outgoing","title":"is_outgoing: bool | None instance-attribute","text":"Include outgoing transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.max_height","title":"max_height: int | None instance-attribute","text":"Get transactions below max height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.min_height","title":"min_height: int | None instance-attribute","text":"Get transactions above max height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.output_query","title":"output_query: MoneroOutputQuery | None instance-attribute","text":"Query to apply on transaction outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.payment_ids","title":"payment_ids: list[str] instance-attribute","text":"Get transactions with specific payment ids.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.transfer_query","title":"transfer_query: MoneroTransferQuery | None instance-attribute","text":"Query to apply on transaction wallet transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.__init__","title":"__init__()","text":"Initiliaze a new Monero transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.copy","title":"copy()","text":"Copy current transaction query.
Returns:
Type Description MoneroTxQuery tx query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.deserialize_from_block","title":"deserialize_from_block(tx_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.meets_criteria","title":"meets_criteria(tx, query_children=False)","text":"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 True if tx meets all criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet","title":"MoneroTxSet","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.multisig_tx_hex","title":"multisig_tx_hex: str | None instance-attribute","text":"Multisignature transaction hex.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.signed_tx_hex","title":"signed_tx_hex: str | None instance-attribute","text":"Signed transaction hex.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.txs","title":"txs: list[MoneroTxWallet] instance-attribute","text":"List of transactions defined in this set.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.unsigned_tx_hex","title":"unsigned_tx_hex: str | None instance-attribute","text":"Unsigned transaction hex.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.__init__","title":"__init__()","text":"Initialize a Monero transaction set.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.deserialize","title":"deserialize(tx_set_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress","title":"MoneroIntegratedAddress","text":" Bases: SerializableStruct
Models a Monero integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.integrated_address","title":"integrated_address: str instance-attribute","text":"The integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.payment_id","title":"payment_id: str instance-attribute","text":"The payment id related to this integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.standard_address","title":"standard_address: str instance-attribute","text":"The standard address related to this integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.__init__","title":"__init__()","text":"Initialize a Monero integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority","title":"MoneroTxPriority","text":" Bases: IntEnum
Enumerates Monero transaction priorities.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.DEFAULT","title":"DEFAULT = 0 class-attribute instance-attribute","text":"0 Default transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.ELEVATED","title":"ELEVATED = 3 class-attribute instance-attribute","text":"3 Elevated transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.NORMAL","title":"NORMAL = 2 class-attribute instance-attribute","text":"2 Normal transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.UNIMPORTANT","title":"UNIMPORTANT = 1 class-attribute instance-attribute","text":"1 Unimportant transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig","title":"MoneroTxConfig","text":" Bases: SerializableStruct
Configures a transaction to send, sweep, or create a payment URI.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.account_index","title":"account_index: int | None instance-attribute","text":"Account index to send funds from.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.address","title":"address: str | None instance-attribute","text":"Transaction address destination.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.amount","title":"amount: int | None instance-attribute","text":"Transaction amount.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.below_amount","title":"below_amount: int | None instance-attribute","text":"Ignore output amount below.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.can_split","title":"can_split: bool | None instance-attribute","text":"Indicates if transaction can be splitted in multiple transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Transaction outgoing destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.fee","title":"fee: int | None instance-attribute","text":"Transaction fee.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.key_image","title":"key_image: str | None instance-attribute","text":"Use a particular key image as input for transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.note","title":"note: str | None instance-attribute","text":"Transaction note.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.payment_id","title":"payment_id: str | None instance-attribute","text":"Transaction payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.priority","title":"priority: MoneroTxPriority | None instance-attribute","text":"Transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.recipient_name","title":"recipient_name: str | None instance-attribute","text":"Recipient name.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.relay","title":"relay: bool | None instance-attribute","text":"Indicates if transaction should be relayed (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.ring_size","title":"ring_size: int | None instance-attribute","text":"Transaction ring size
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Account subaddresses indices to send funds from.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.subtract_fee_from","title":"subtract_fee_from: list[int] instance-attribute","text":"Subtract fee from outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.sweep_each_subaddress","title":"sweep_each_subaddress: bool | None instance-attribute","text":"Sweep each wallet subbaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.copy","title":"copy()","text":"Copy current tx config.
Returns:
Type Description MoneroTxConfig tx config copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.deserialize","title":"deserialize(config_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.get_normalized_destinations","title":"get_normalized_destinations()","text":"Get all destinations set in current tx config.
Returns:
Type Description list[MoneroDestination] normalized tx config destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.set_address","title":"set_address(address)","text":"Set the address of a single-destination configuration.
Parameters:
Name Type Description Default address str the address to set for the single destination.
required"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult","title":"MoneroKeyImageImportResult","text":" Bases: SerializableStruct
Models results from importing key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.height","title":"height: int | None instance-attribute","text":"Height at which the last key image was imported. Can be 0 if blockchain height is not known.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.spent_amount","title":"spent_amount: int | None instance-attribute","text":"Amount (in atomic-units) spent from those key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.unspent_amount","title":"unspent_amount: int | None instance-attribute","text":"Amount (in atomic-units) still available from those key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.__init__","title":"__init__()","text":"Initialize a Monero key image import result.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType","title":"MoneroMessageSignatureType","text":" Bases: IntEnum
Enumerates the type of a Monero message signature.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType.SIGN_WITH_SPEND_KEY","title":"SIGN_WITH_SPEND_KEY = 0 class-attribute instance-attribute","text":"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
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType.SIGN_WITH_VIEW_KEY","title":"SIGN_WITH_VIEW_KEY = 1 class-attribute instance-attribute","text":"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
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult","title":"MoneroMessageSignatureResult","text":" Bases: SerializableStruct
Models results from message verification.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.is_good","title":"is_good: bool instance-attribute","text":"Indicates if the message verification was successful.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.is_old","title":"is_old: bool instance-attribute","text":"Indicates if the message verification used old monero software.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.signature_type","title":"signature_type: MoneroMessageSignatureType instance-attribute","text":"Signature type used in the message verification.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.version","title":"version: int instance-attribute","text":"Message signature version.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.__init__","title":"__init__()","text":"Initialize a Monero message signature result.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck","title":"MoneroCheck","text":" Bases: SerializableStruct
Base model for results from checking a transaction or reserve proof.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck.is_good","title":"is_good: bool instance-attribute","text":"Indicates if check was successfull.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck.__init__","title":"__init__()","text":"Initialize a Monero check.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx","title":"MoneroCheckTx","text":" Bases: MoneroCheck
Models the results from checking a transaction key.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.in_tx_pool","title":"in_tx_pool: bool | None instance-attribute","text":"States if the transaction is in pool (True) or included in a block (False)
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.num_confirmations","title":"num_confirmations: int | None instance-attribute","text":"Transaction network confirmations.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.received_amount","title":"received_amount: int | None instance-attribute","text":"Amount received in the transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.__init__","title":"__init__()","text":"Initialize a Monero transaction check.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve","title":"MoneroCheckReserve","text":" Bases: MoneroCheck
Models the results from checking a reserve proof.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.total_amount","title":"total_amount: int | None instance-attribute","text":"The reserve total amount.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.unconfirmed_spent_amount","title":"unconfirmed_spent_amount: int | None instance-attribute","text":"The reserve unconfirmed spent amount.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.__init__","title":"__init__()","text":"Initialize a Monero reserve check.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo","title":"MoneroMultisigInfo","text":" Bases: SerializableStruct
Models information about a multisig wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.is_multisig","title":"is_multisig: bool instance-attribute","text":"Indicates if the wallet is multisignature (True), or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.is_ready","title":"is_ready: bool instance-attribute","text":"Indicates if the wallet is ready to support multisignature operations (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.num_participants","title":"num_participants: int instance-attribute","text":"Number of participants of the multisignature wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.threshold","title":"threshold: int instance-attribute","text":"Number of participants need in order to sign a transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.__init__","title":"__init__()","text":"Initialize a Monero multisignature info.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult","title":"MoneroMultisigInitResult","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.address","title":"address: str | None instance-attribute","text":"The multisignature wallet address.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.multisig_hex","title":"multisig_hex: str | None instance-attribute","text":"The multisignature hex to share with other participants.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.__init__","title":"__init__()","text":"Initialize a Monero multisignature initializing result.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult","title":"MoneroMultisigSignResult","text":" Bases: SerializableStruct
Models the result of signing multisig tx hex.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.signed_multisig_tx_hex","title":"signed_multisig_tx_hex: str | None instance-attribute","text":"Multisig transaction in hex format.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.tx_hashes","title":"tx_hashes: list[str] instance-attribute","text":"List of transaction hash.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.__init__","title":"__init__()","text":"Initialize a Monero multisignature signature result.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry","title":"MoneroAddressBookEntry","text":" Bases: SerializableStruct
Monero address book entry model.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.address","title":"address: str | None instance-attribute","text":"The book entry address.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.description","title":"description: str | None instance-attribute","text":"The book entry description.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.index","title":"index: int | None instance-attribute","text":"The book entry index.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.payment_id","title":"payment_id: str | None instance-attribute","text":"The book entry payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType","title":"MoneroAddressType","text":" Bases: IntEnum
Models a Monero public address type_.
.. _Monero public address type: https://docs.getmonero.org/public-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.INTEGRATED_ADDRESS","title":"INTEGRATED_ADDRESS = 1 class-attribute instance-attribute","text":"1 Indicates that the Monero address format is integrated_.
.. _integrated: https://docs.getmonero.org/public-address/integrated-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.PRIMARY_ADDRESS","title":"PRIMARY_ADDRESS = 0 class-attribute instance-attribute","text":"0 Indicates that the Monero address format is standard_, also known as primary.
.. _standard: https://docs.getmonero.org/public-address/standard-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.SUBADDRESS","title":"SUBADDRESS = 2 class-attribute instance-attribute","text":"2 Indicates that the Monero address format is subaddress_.
.. _subaddress: https://docs.getmonero.org/public-address/subaddress/
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress","title":"MoneroDecodedAddress","text":" Bases: SerializableStruct
Maintains metadata for a decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.address","title":"address: str instance-attribute","text":"The decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.address_type","title":"address_type: MoneroAddressType instance-attribute","text":"Type of the decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.network_type","title":"network_type: MoneroNetworkType instance-attribute","text":"Network type of the decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.__init__","title":"__init__(address, address_type, network_type)","text":"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"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag","title":"MoneroAccountTag","text":" Bases: SerializableStruct
Models a Monero account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.account_indices","title":"account_indices: list[int] instance-attribute","text":"Account indices with this tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.label","title":"label: str | None instance-attribute","text":"The account tag label.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.tag","title":"tag: str | None instance-attribute","text":"The account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener","title":"MoneroWalletListener","text":"Interface to receive wallet notifications.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.__init__","title":"__init__()","text":"Initialize a wallet listener.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_balances_changed","title":"on_balances_changed(new_balance, new_unlocked_balance)","text":"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"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_new_block","title":"on_new_block(height)","text":"Invoked when a new block is processed.
Parameters:
Name Type Description Default height int the newly processed block.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_output_received","title":"on_output_received(output)","text":"Invoked when the wallet receives an output.
Parameters:
Name Type Description Default output MoneroOutputWallet the received output.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_output_spent","title":"on_output_spent(output)","text":"Invoked when the wallet spends an output.
Parameters:
Name Type Description Default output MoneroOutputWallet the spent output.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_sync_progress","title":"on_sync_progress(height, start_height, end_height, percent_done, message)","text":"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"},{"location":"examples/connect_to_rpc_server/","title":"Connect to RPC Server","text":"Developers can create and establish a connection to a rpc server conveniently with a MoneroRpcConnection:
from monero import MoneroRpcConnection\n\n# connect to a monerod or wallet rpc server\nconnection = MoneroRpcConnection(\"http:://rpc_server_uri:18089\")\n\n# set connection credentials if needed\nconnection.set_credentials(\"rpc_user\", \"rpc_password\")\n\n# check rpc connection\nconnection.check_connection()\n\nif not connection.is_connected():\n raise Exception(\"Could not connect to RPC server.\")\n\nprint(\"Connection established to RPC server.\")\n
After successfully connecting to the rpc server, developers can also invoke methods of the JSON-RPC interface directly:
# invoke JSON-RPC method `get_version`\nresult = connection.send_json_request(\"get_version\")\nprint(f\"get_version JSON-RPC response: {result}\")\n
MoneroRpcConnection also accepts an optional proxy_uri parameter in its constructor, manageable even after a connection has been created. A prime example of use is to route your traffic via TOR:
Note
Setting a proxy_uri resets MoneroRpcConnection status.
# setup TOR proxy uri by instance attribute\nconnection.proxy_uri = \"127.0.0.1:9050\"\n\n# must recall `check_connection()` manually\nconnection.check_connection()\n
"},{"location":"examples/create_local_full_wallet/","title":"Create Local Full Wallet","text":"MoneroWalletFull is another MoneroWallet implementation that fully wraps wallet2 API. With a full wallet developers can create wallet files and manage them locally.
Creating a MoneroWalletFull is very simple:
from monero import MoneroWalletConfig, MoneroWalletFull, MoneroNetworkType\n\n# setup wallet configuration\nconfig = MoneroWalletConfig()\n\n# setup wallet path\nconfig.path = \"test_wallet_full\"\n\n# setup wallet password\nconfig.password = \"supersecretpassword123\"\n\n# setup wallet network type\nconfig.network_type = MoneroNetworkType.TESTNET\n\nwallet = MoneroWalletFull.create_wallet(config)\n
Check if a Monero wallet exists at specific path:
if MoneroWalletFull.wallet_exists(\"test_wallet_full\"):\n wallet = MoneroWalletFull.open_wallet(\"test_wallet_full\", \"supersecretpassword123\", MoneroNetworkType.TESTNET)\n
"},{"location":"examples/interact_with_daemon/","title":"Interact with RPC Daemon","text":"MoneroDaemonRpc offers a MoneroDaemon implementation that interacts with monero-rpc server using calls to RPC, JSON-RPC and Binary interfaces.
Creating a MoneroDaemonRpc instance is very simple:
from monero import MoneroDaemonRpc\n\n# create RPC daemon connected to `monerod-rpc` server\ndaemon = MoneroDaemonRpc(\"http://monerod_rpc_uri:18081\")\n
It can also be done using a MoneroRpcConnection instance:
from monero import MoneroRpcConnection, MoneroDaemonRpc\n\n# create rpc connection\nconnection = MoneroRpcConnection(\"http://monerod_rpc_uri:18081\")\n\n# create daemon using RPC connection\ndaemon = MoneroDaemonRpc(connection)\n
Fetch daemon info and status:
# get general daemon rpc info\ndaemon_info = daemon.get_info()\nprint(f\"Daemon info: {daemon_info.serialize()}\")\n\n# get daemon specific sync info\nsync_info = daemon.get_sync_info()\nprint(f\"Sync info: {sync_info.serialize()}\")\n\n# get peer bans\nbans = daemon.get_peer_bans()\nfor ban in bans:\n print(f\"Banned peer: {peer.serialize()}\")\n
Query blocks and txs on blockchain:
# get last block header added to blockchain\nlast_block = daemon.get_last_block_header()\nprint(f\"Last block header: {last_block.serialize()}\")\n\n# get specific block by height\nblock = daemon.get_block_by_height(1520000)\nprint(f\"Block fetched by height: {block.serialize()}\")\n\n# get specific block by hash\nblock = daemon.get_block_by_hash(\"...block hash...\")\nprint(f\"Block fetched by hash: {block.serialize()}\")\n\n# get alternative chains seen by the daemon\nchains = daemon.get_alt_chains()\nprint(f\"Found {len(chains)} alternative chains\")\n\n# get unconfirmed txs in pool\ntx_pool = daemon.get_tx_pool()\nfor tx in tx_pool:\n print(f\"Found tx in pool: {tx.serialize()}\")\n\n# get specific tx added to chain\ntx = daemon.get_tx(\"...tx hash...\")\nprint(f\"Fetched tx: {tx.serialize()}\")\n
Relay mined blocks and signed txs:
# submit a mined block\ndaemon.submit_block(\"...block blob...\")\n\n# submit a signed tx\ntx: Monerotx = ...\ndaemon.submit_tx(tx.full_hex)\n
"},{"location":"examples/interact_with_wallet_rpc/","title":"Interact with RPC Wallet","text":"MoneroWalletRpc offers a MoneroWallet implementation that interacts with monero-wallet-rpc using calls to the JSON-RPC interface.
Creating a MoneroWalletRpc instance is very simple:
from monero import MoneroWalletRpc\n\n# create RPC wallet connected to `monero-wallet-rpc` server\nwallet = MoneroWalletRpc(\"http://wallet_rpc_uri:18081\")\n
It can also be done using a MoneroRpcConnection instance:
from monero import MoneroRpcConnection, MoneroWalletRpc\n\n# create rpc connection\nconnection = MoneroRpcConnection(\"http://wallet_rpc_uri:18081\")\n\n# create wallet using RPC connection\nwallet = MoneroWalletRpc(connection)\n
Let's create a new wallet file:
# build wallet configuration\nconfig: MoneroWalletConfig = ...\n\n# create new wallet file in rpc server\nwallet.create_wallet(config)\n
Or open an already existing wallet:
# open wallet with config\nwallet.open_wallet(config)\n\n# or open by path and password\nwallet.open_wallet(\"wallet_path\", \"wallet_password\")\n
And fetch some info:
# get wallet information\nprimary_address: str = wallet.get_primary_address()\nview_key: str = wallet.get_private_view_key()\nseed: str = wallet.get_seed()\nbalance: int = wallet.get_balance()\n\nprint(f\"primary address: {primary_address}\")\nprint(f\"view_key: {view_key}\")\nprint(f\"seed: {seed}\")\nprint(f\"balance: {balance}\")\n
"},{"location":"examples/query_wallet_txs_and_transfers/","title":"Query Wallet Txs and Transfers","text":"The MoneroWallet interface offers methods for fetching transactions, transfers and outputs from wallet's cache:
MoneroWallet.get_txs(query: MoneroTxQuery) -> list[MoneroTxWallet] MoneroWallet.get_transfers(query: MoneroTransferQuery) -> list[MoneroTransfer] MoneroWallet.get_outputs(query: MoneroOutputQuery) -> list[MoneroOutputWallet]
This methods can be used with a MoneroTxQuery, MoneroTransferQuery, MoneroOutputQuery, wich will filter all records that doesn't match criteria defined in the query.
Example of fetching wallet txs with a basic MoneroTxQuery:
from monero import (\n MoneroWallet, MoneroTxQuery,\n MoneroTxWallet\n)\n\n# open a wallet with txs data\nwallet: MoneroWallet = ...\n\n# create and setup a new tx query to filter txs with\nquery = MoneroTxQuery()\n\n# fetch only outgoing txs\nquery.is_incoming = False\nquery.is_outgoing = True\n\n# include outputs in tx data\nquery.include_outputs = True\n\n# filter tx by height range\nquery.min_height = 150000\nquery.max_height = 300000\n\n# or get txs at specific height\nquery.height = 152000\n\n# fetch txs that meets criteria from wallet\ntxs: list[MoneroTxWallet] = wallet.get_txs(query)\n\n# print fetched txs\nfor tx in txs:\n print(f\"Found tx: {tx.serialize()}\")\n
Example of fetching wallet transfers with a MoneroTransferQuery:
from monero import (\n MoneroWallet, MoneroTransferQuery,\n MoneroTransfer\n)\n\n# open a wallet with txs data\nwallet: MoneroWallet = ...\n\n# create and setup a new tx query to filter transfers with\nquery = MoneroTransferQuery()\n\n# fetch only incoming transfers\nquery.is_incoming = True\nquery.is_outgoing = False\n\n# filter by account and subaddress index\nquery.account_index = 1\nquery.subaddress_indices = [0, 1, 2, 3]\n\n# fetch transfers that meets criteria from wallet\ntransfers: list[MoneroTransferWallet] = wallet.get_transfers(query)\n\n# print fetched txs\nfor transfer in transfers:\n print(f\"Found transfer: {transfer.serialize()}\")\n
"},{"location":"examples/sending_payments/","title":"Sending Payments","text":"In order to send payments with a MoneroWallet, developers must setup a MoneroTxConfig:
from monero import MoneroTxConfig\n\n# create and setup transaction configuration\ntx_config = MoneroTxConfig()\n\n# specify source account index\ntx_config.account_index = 0\n\n# specify address and destination amount\ntx_config.address = \"...destination address...\"\ntx_config.amount = 1000000000\n\n# relay tx to the network\ntx_config.relay = True\n\n# create txs with configuration\ntxs: list[MoneroTxWallet] = wallet.create_txs(tx_config)\n\nfor tx in txs:\n print(f\"Created tx: {tx.serialize()}\")\n
Is possible to setup also multiple destinations in transaction configuration:
tx_config.destinations.append(MoneroDestination(\"...destination address1...\", 1000000000))\n\n...\n\ntx_config.destinations.append(MoneroDestination(\"...destination addressN...\", 1000000000))\n\n# split into multiple txs\ntx_config.can_split = True\n
"},{"location":"examples/using_keys_only_wallet/","title":"Using Keys-Only Wallet","text":"MoneroWalletKeys is a MoneroWallet implementation that supports only basic keys operations, without files or RPC calls.
Creating a in-memory keys-only wallet with MoneroWalletKeys is very simple:
from monero import MoneroWalletKeys, MoneroWalletConfig, MoneroNetworkType\n\n# setup wallet configuration\nconfig = MoneroWalletConfig()\nconfig.network_type = MoneroNetworkType.TESTNET\n\n# create random wallet\nwallet = MoneroWalletKeys.create_wallet_random(config)\n
Restore specific wallet from seed:
config.seed = \"...wallet seed...\"\n\n# restore wallet from seed\nwallet = MoneroWalletKeys.create_wallet_from_seed(config)\n
Or from wallet keys:
config.primary_address = \"...wallet primary address...\"\nconfig.private_view_key = \"...wallet private view key...\"\n\n# restore wallet from keys\nwallet = MoneroWalletKeys.create_wallet_from_keys(config)\n
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Monero Python Documentation","text":"Welcome to the Monero Python documentation.
The aim of this project is to provide an intuitive and robust way to interact with the Monero cryptocurrency in Python using a clearly defined data model. It provides high level classes representing objects from the Monero environment, like wallets, accounts, addresses and transactions.
Developers can create Monero applications using JSON-RPC or Python bindings to monero v0.18.5.1 'Flourine Fermi'.
Contributions can be made via issues and pull requests on GitHub, or communicated via the #monero-python workgroup on Matrix.
GitHub Matrix
"},{"location":"api/architecture/","title":"Architecture","text":""},{"location":"api/connection/","title":"RPC Connection","text":""},{"location":"api/connection/#monero.MoneroRpcConnection","title":"MoneroRpcConnection","text":" Bases: SerializableStruct
Models a connection to a daemon.
"},{"location":"api/connection/#monero.MoneroRpcConnection.password","title":"password: str | None property","text":"Connection authentication password.
"},{"location":"api/connection/#monero.MoneroRpcConnection.priority","title":"priority: int instance-attribute","text":"Connection priority.
"},{"location":"api/connection/#monero.MoneroRpcConnection.proxy_uri","title":"proxy_uri: str | None instance-attribute","text":"Connection proxy address.
"},{"location":"api/connection/#monero.MoneroRpcConnection.response_time","title":"response_time: int | None property","text":"Connection response time in milliseconds.
"},{"location":"api/connection/#monero.MoneroRpcConnection.timeout_ms","title":"timeout_ms: int instance-attribute","text":"Connection timeout (milliseconds).
"},{"location":"api/connection/#monero.MoneroRpcConnection.uri","title":"uri: str | None instance-attribute","text":"Connection uri.
"},{"location":"api/connection/#monero.MoneroRpcConnection.username","title":"username: str | None property","text":"Connection authentication username.
"},{"location":"api/connection/#monero.MoneroRpcConnection.zmq_uri","title":"zmq_uri: str | None instance-attribute","text":"ZMQ connection uri.
"},{"location":"api/connection/#monero.MoneroRpcConnection.check_connection","title":"check_connection(timeout_ms=None)","text":"Check the connection and update online, authentication, and response time status.
Parameters:
Name Type Description Default timeout_ms int|None the maximum response time before considered offline.
None Returns:
Type Description bool True if there is a change in status, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.compare","title":"compare(p1, p2) staticmethod","text":"Compare connection priorities.
Parameters:
Name Type Description Default p1 int first priority to check.
required p2 int second priority to check.
required Returns:
Type Description bool True if p1 comes before p2, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.deserialize","title":"deserialize(json) staticmethod","text":"Deserialize a MoneroRpcConnection from a JSON string.
Parameters:
Name Type Description Default json str MoneroRpcConnection in JSON format.
required Returns:
Type Description MoneroRpcConnection deserialized instance.
"},{"location":"api/connection/#monero.MoneroRpcConnection.get_attribute","title":"get_attribute(key)","text":"Returns RPC connection attribute.
Parameters:
Name Type Description Default key str attribute key.
required Returns:
Type Description str attribute value.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_authenticated","title":"is_authenticated()","text":"Indicates if the connection is authenticated according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True if authenticated or no authentication required, False if not authenticated, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_connected","title":"is_connected()","text":"Indicates if the connection is connected according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True or False to indicate if connected, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_i2p","title":"is_i2p()","text":"Indicates if the connection is a I2P connection.
Returns:
Type Description bool True if connection is a I2P connection, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_onion","title":"is_onion()","text":"Indicates if the connection is a TOR connection.
Returns:
Type Description bool True if connection is a TOR connection, False otherwise.
"},{"location":"api/connection/#monero.MoneroRpcConnection.is_online","title":"is_online()","text":"Indicates if the connection is online according to the last call to check_connection().
Note: must call check_connection() manually.
Returns:
Type Description bool | None True or False to indicate if online, or None if check_connection() has not been called.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_binary_request","title":"send_binary_request(method, parameters=None, timeout_ms=None)","text":"Send a binary RPC request.
Parameters:
Name Type Description Default method str is the path of the binary RPC method to invoke.
required parameters Optional[object] are the request parameters (default None).
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description bytes | None the request's deserialized binary response.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_json_request","title":"send_json_request(method, parameters=None, timeout_ms=None)","text":"Send a request to the JSON-RPC API.
Parameters:
Name Type Description Default method str is the method to request.
required parameters Optional[object] are the request's input parameters (default None).
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description object | None the RPC API response as a map.
"},{"location":"api/connection/#monero.MoneroRpcConnection.send_path_request","title":"send_path_request(method, parameters=None, timeout_ms=None)","text":"Send a RPC request to the given path and with the given paramters.
E.g. /get_transactions with params.
Parameters:
Name Type Description Default method str is the url path of the request to invoke.
required parameters Optional[object] are request parameters sent in the body.
None timeout_ms Optional[int] request timeout in milliseconds.
None Returns:
Type Description object | None the request's deserialized response.
"},{"location":"api/connection/#monero.MoneroRpcConnection.set_attribute","title":"set_attribute(key, value)","text":"Set RPC connection attribute.
Parameters:
Name Type Description Default key str key attribute.
required value str value attribute.
required"},{"location":"api/connection/#monero.MoneroRpcConnection.set_credentials","title":"set_credentials(username, password)","text":"Set RPC connection credentials.
Parameters:
Name Type Description Default username str username used for RPC authentication.
required password str passowrd user for RPC authentication.
required"},{"location":"api/daemon/","title":"Daemon Interface","text":""},{"location":"api/daemon/#monero.MoneroDaemon","title":"MoneroDaemon","text":"Monero daemon interface.
"},{"location":"api/daemon/#monero.MoneroDaemon.__init__","title":"__init__()","text":"Initialize a Monero daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.add_auxiliary_pow","title":"add_auxiliary_pow(block_template_blob, aux_pow)","text":"Add auxiliary proof-of-work to a block template for merge mining.
Parameters:
Name Type Description Default block_template_blob str the block template blob to add auxiliary PoW to.
required aux_pow list[MoneroAuxiliaryPow] identifies each auxiliary chain by id and its block's PoW hash.
required Returns:
Type Description MoneroAddAuxiliaryPowResult the updated block template along with the (possibly reordered) auxiliary PoW.
"},{"location":"api/daemon/#monero.MoneroDaemon.add_listener","title":"add_listener(listener)","text":"Register a listener to receive daemon notifications.
Parameters:
Name Type Description Default listener MoneroDaemonListener the listener to register.
required"},{"location":"api/daemon/#monero.MoneroDaemon.calculate_pow","title":"calculate_pow(major_version, height, block_blob, seed_hash)","text":"Calculate the proof-of-work hash of a mined block.
Parameters:
Name Type Description Default major_version int the block's major version.
required height int the block's height.
required block_blob str the block's blob to hash.
required seed_hash str the seed hash used to select the RandomX dataset/cache.
required Returns:
Type Description str the block's proof-of-work hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.check_for_update","title":"check_for_update()","text":"Check for update.
Returns:
Type Description MoneroDaemonUpdateCheckResult the result of the update check.
"},{"location":"api/daemon/#monero.MoneroDaemon.download_update","title":"download_update(path='')","text":"Download an update.
Parameters:
Name Type Description Default path str download path.
'' Returns:
Type Description MoneroDaemonUpdateDownloadResult the result of the update download.
"},{"location":"api/daemon/#monero.MoneroDaemon.flush_cache","title":"flush_cache(bad_blocks=False)","text":"Flush the daemon's invalid block and transaction caches.
Parameters:
Name Type Description Default bad_blocks bool specifies to also flush the bad blocks cache.
False"},{"location":"api/daemon/#monero.MoneroDaemon.generate_blocks","title":"generate_blocks(wallet_address, num_blocks, prev_block_hash=None, starting_nonce=None)","text":"Generate blocks to a wallet address (regtest only).
Parameters:
Name Type Description Default wallet_address str is the address of the wallet to receive miner transactions if block is successfully mined.
required num_blocks int is the number of blocks to generate.
required prev_block_hash str|None is the hash of the previous block to build on top of (optional, builds on the current tip if not given).
None starting_nonce int|None is the starting nonce to use (optional).
None Returns:
Type Description MoneroGenerateBlocksResult the result of generating blocks; height is the height of the last block generated.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_alt_block_hashes","title":"get_alt_block_hashes()","text":"Get known block hashes which are not on the main chain.
Returns:
Type Description list[str] known block hashes which are not on the main chain.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_alt_chains","title":"get_alt_chains()","text":"Get alternative chains seen by the node.
Returns:
Type Description list[MoneroAltChain] alternative chains seen by the node.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_by_hash","title":"get_block_by_hash(hash)","text":"Get a block by hash.
Parameters:
Name Type Description Default hash str is the hash of the block to get.
required Returns:
Type Description MoneroBlock the block with the given hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_by_height","title":"get_block_by_height(height)","text":"Get a block by height.
Parameters:
Name Type Description Default height int is the height of the block to get.
required Returns:
Type Description MoneroBlock the block at the given height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_hash","title":"get_block_hash(height)","text":"Get a block's hash by its height.
Parameters:
Name Type Description Default height int is the height of the block hash to get.
required Returns:
Type Description str the block's hash at the given height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_hashes","title":"get_block_hashes(block_hashes)","text":"Get block hashes as a binary request to the daemon.
Parameters:
Name Type Description Default block_hashes list[str] a short chain history; first 10 block hashes go sequential, next go in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always the genesis block, which is required or the request fails.
required Returns:
Type Description MoneroGetBlockHashesResult the requested hashes plus their start height and the daemon's current chain height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_header_by_hash","title":"get_block_header_by_hash(hash)","text":"Get a block header by its hash.
Parameters:
Name Type Description Default hash str is the hash of the block to get the header of.
required Returns:
Type Description MoneroBlockHeader the block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_header_by_height","title":"get_block_header_by_height(height)","text":"Get a block header by its height.
Parameters:
Name Type Description Default height int is the height of the block to get the header of.
required Returns:
Type Description MoneroBlockHeader the block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_headers_by_range","title":"get_block_headers_by_range(start_height, end_height)","text":"Get block headers for the given range.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required Returns:
Type Description list[MoneroBlockHeader] block headers in the given range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_block_template","title":"get_block_template(wallet_address, reserve_size=None)","text":"Get a block template for mining a new block.
Parameters:
Name Type Description Default wallet_address str is the address of the wallet to receive miner transactions if block is successfully mined.
required reserve_size int|None is the reserve size (optional).
None Returns:
Type Description MoneroBlockTemplate a block template for mining a new block.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_hash","title":"get_blocks_by_hash(block_hashes, start_height, prune, max_block_count=0)","text":"Get blocks by hash.
Parameters:
Name Type Description Default block_hashes list[str] a short chain history; first 10 block hashes go sequential, next go in pow(2,n) offset, and the last one is always the genesis block.
required start_height int the start height to resume from; when non-zero the daemon skips the search for the last common block and uses it as-is.
required prune bool whether returned blocks should be pruned.
required max_block_count int caps how many blocks the daemon returns in one call (0 leaves it to the daemon's own default limit).
0 Returns:
Type Description MoneroGetBlocksByHashResult the retrieved blocks plus the daemon's current chain height.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_height","title":"get_blocks_by_height(heights)","text":"Get blocks at the given heights.
Parameters:
Name Type Description Default heights list[int] are the heights of the blocks to get.
required Returns:
Type Description list[MoneroBlock] blocks at the given heights.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_range","title":"get_blocks_by_range(start_height, end_height)","text":"Get blocks in the given height range.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required Returns:
Type Description list[MoneroBlock] blocks in the given height range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_blocks_by_range_chunked","title":"get_blocks_by_range_chunked(start_height, end_height, max_chunk_size=None)","text":"Get blocks in the given height range as chunked requests so that each request is not too big.
Parameters:
Name Type Description Default start_height int is the start height lower bound inclusive (optional).
required end_height int is the end height upper bound inclusive (optional).
required max_chunk_size int is the maximum chunk size in any one request (default 3,000,000 bytes).
None Returns:
Type Description list[MoneroBlock] blocks in the given height range.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_download_limit","title":"get_download_limit()","text":"Get the download bandwidth limit.
Returns:
Type Description int is the download bandwidth limit.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_fee_estimate","title":"get_fee_estimate(grace_blocks=0)","text":"Get mining fee estimates per kB.
Parameters:
Name Type Description Default grace_blocks int number of blocks we want the fee estimate to be valid for.
0 Returns:
Type Description MoneroFeeEstimate mining fee estimates per kB.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_hard_fork_info","title":"get_hard_fork_info()","text":"Look up information regarding hard fork voting and readiness.
Returns:
Type Description MoneroHardForkInfo hard fork information.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_height","title":"get_height()","text":"Get the number of blocks in the longest chain known to the node.
Returns:
Type Description int the number of blocks.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_info","title":"get_info()","text":"Get general information about the state of the node and the network.
Returns:
Type Description MoneroDaemonInfo general information about the node and network.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_key_image_spent_status","title":"get_key_image_spent_status(key_image)","text":"Get the spent status of the given key image.
Parameters:
Name Type Description Default key_image str is key image hex to get the status of.
required Returns:
Type Description MoneroKeyImageSpentStatus the status of the key image.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_key_image_spent_statuses","title":"get_key_image_spent_statuses(key_images)","text":"Get the spent status of each given key image.
Parameters:
Name Type Description Default key_images list[str] are hex key images to get the statuses of.
required Returns:
Type Description list[MoneroKeyImageSpentStatus] the spent status for each key image.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_known_peers","title":"get_known_peers()","text":"Get all known peers including their last known online status.
Returns:
Type Description list[MoneroPeer] the daemon's known peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_last_block_header","title":"get_last_block_header()","text":"Get the last block's header.
Returns:
Type Description MoneroBlockHeader the last block's header.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_listeners","title":"get_listeners()","text":"Get the listeners registered with the daemon.
Returns:
Type Description list[MoneroDaemonListener] the registered listeners.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_miner_data","title":"get_miner_data()","text":"Get the data needed to construct a block template for mining, e.g. for use by a pool that assembles its own block templates.
Returns:
Type Description MoneroMinerData the current data for mining a new block.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_miner_tx_sum","title":"get_miner_tx_sum(height, num_blocks)","text":"Gets the total emissions and fees from the genesis block to the current height.
Parameters:
Name Type Description Default height int is the height to start computing the miner sum.
required num_blocks int are the number of blocks to include in the sum.
required Returns:
Type Description MoneroMinerTxSum the sum emission and fees since the geneis block.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_mining_status","title":"get_mining_status()","text":"Get the daemon's mining status.
Returns:
Type Description MoneroMiningStatus the daemon's mining status.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_network_stats","title":"get_network_stats()","text":"Get network (bandwidth) statistics since the daemon started.
Returns:
Type Description MoneroDaemonNetworkStats the daemon's network statistics.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_output_distribution","title":"get_output_distribution(amounts, is_cumulative=None, start_height=None, end_height=None)","text":"Creates an output distribution.
Parameters:
Name Type Description Default amounts list[int] are amounts of outputs to make the distribution with.
required is_cumulative bool|None specifies if the results should be cumulative (optional).
None start_height int|None is the start height lower bound inclusive (optional).
None end_height int|None is the end height upper bound inclusive (optional).
None Returns:
Type Description list[MoneroOutputDistributionEntry] output distribution entries meeting the parameters.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_output_histogram","title":"get_output_histogram(amounts, min_count, max_count, is_unlocked, recent_cutoff)","text":"Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Parameters:
Name Type Description Default amounts list[int] are amounts of outputs to make the histogram with (atomic-units).
required min_count Optional[int] filter amounts with at least this number of outputs.
required max_count Optional[int] filter amounts with at most this number of outputs.
required is_unlocked Optional[bool] makes a histogram with outputs with the specified lock state.
required recent_cutoff Optional[int] exclude outputs from older than this timestamp.
required Returns:
Type Description list[MoneroOutputHistogramEntry] output histogram entries meeting the parameters.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_output_indices","title":"get_output_indices(tx_hash)","text":"Get the global output index of each output in a transaction.
Parameters:
Name Type Description Default tx_hash str the hash of the transaction to get output indices for.
required Returns:
Type Description list[int] the global output index of each output in the transaction, in order.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_outputs","title":"get_outputs(outputs)","text":"Get outputs identified by a list of output amounts and indices as a binary request.
Parameters:
Name Type Description Default outputs list[MoneroOutput] identify each output by amount and index.
required Returns:
Type Description list[MoneroOutput] the identified outputs.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_peer_ban","title":"get_peer_ban(address)","text":"Get the ban status of a peer node.
Parameters:
Name Type Description Default address str the address of the peer node to check, e.g. \"1.2.3.4\" or \"1.2.3.4:18080\".
required Returns:
Type Description MoneroBan the peer's ban status.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_peer_bans","title":"get_peer_bans()","text":"Get peer bans.
Returns:
Type Description list[MoneroBan] entries about banned peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_peers","title":"get_peers()","text":"Get peers with active incoming or outgoing connections to the node.
Returns:
Type Description list[MoneroPeer] the daemon's peers.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_public_peers","title":"get_public_peers(include_offline=False)","text":"Get public nodes known to the daemon.
Parameters:
Name Type Description Default include_offline bool specifies if offline nodes should be included.
False Returns:
Type Description list[MoneroPeer] the daemon's known public nodes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_sync_info","title":"get_sync_info()","text":"Get synchronization information.
Returns:
Type Description MoneroDaemonSyncInfo contains sync information.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx","title":"get_tx(tx_hash, prune=False)","text":"Get a transaction by hash.
Parameters:
Name Type Description Default tx_hash str is the hash of the transaction to get.
required prune bool specifies if the returned tx should be pruned (defaults to False).
False Returns:
Type Description MoneroTx | None the transaction with the given hash or null if not found.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_hex","title":"get_tx_hex(tx_hash, prune=False)","text":"Get a transaction hex by hash.
Parameters:
Name Type Description Default tx_hash str is the hash of the transaction to get hex from.
required prune bool specifies if the returned tx hex should be pruned (defaults to False).
False Returns:
Type Description str | None the tx hex with the given hash.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_hexes","title":"get_tx_hexes(tx_hashes, prune=False)","text":"Get transaction hexes by hashes.
Parameters:
Name Type Description Default tx_hashes list[str] are hashes of transactions to get hexes from
required prune bool Prune transaction hashes.
False Returns:
Type Description list[str] are the tx hexes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool","title":"get_tx_pool()","text":"Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.
Returns:
Type Description list[MoneroTx] transactions in the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_backlog","title":"get_tx_pool_backlog()","text":"Get all transaction pool backlog.
Returns:
Type Description list[MoneroTxBacklogEntry] transaction pool backlog entries.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_hashes","title":"get_tx_pool_hashes()","text":"Get hashes of transactions in the transaction pool.
Returns:
Type Description list[str] hashes of transactions in the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_tx_pool_stats","title":"get_tx_pool_stats()","text":"Get transaction pool statistics.
Returns:
Type Description MoneroTxPoolStats statistics about the transaction pool.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_txs","title":"get_txs(tx_hashes, prune=False)","text":"Get transactions by hashes.
Parameters:
Name Type Description Default tx_hashes list[str] are hashes of transactions to get.
required prune bool Prune transactions.
False Returns:
Type Description list[MoneroTx] found transactions with the given hashes.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_upload_limit","title":"get_upload_limit()","text":"Get the upload bandwidth limit.
Returns:
Type Description int is the upload bandwidth limit.
"},{"location":"api/daemon/#monero.MoneroDaemon.get_version","title":"get_version()","text":"Gets the version of the daemon.
Returns:
Type Description MoneroVersion the version of the daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.is_trusted","title":"is_trusted()","text":"Indicates if the daemon is trusted or untrusted.
Returns:
Type Description bool True if the daemon is trusted, False otherwise.
"},{"location":"api/daemon/#monero.MoneroDaemon.pop_blocks","title":"pop_blocks(num_blocks)","text":"Pop (remove) blocks from the top of the blockchain.
Parameters:
Name Type Description Default num_blocks int the number of blocks to pop.
required Returns:
Type Description int the blockchain height after popping the blocks.
"},{"location":"api/daemon/#monero.MoneroDaemon.prune_blockchain","title":"prune_blockchain(check)","text":"Prune the blockchain.
Parameters:
Name Type Description Default check bool specifies to check the pruning (default False).
required Returns:
Type Description MoneroPruneResult the prune result.
"},{"location":"api/daemon/#monero.MoneroDaemon.relay_tx_by_hash","title":"relay_tx_by_hash(tx_hash)","text":"Relays a transaction by hash.
Parameters:
Name Type Description Default tx_hash str identifies the transaction to relay.
required"},{"location":"api/daemon/#monero.MoneroDaemon.relay_txs_by_hash","title":"relay_txs_by_hash(tx_hashes)","text":"Relays transactions by hash.
Parameters:
Name Type Description Default tx_hashes list[str] identify the transactions to relay.
required"},{"location":"api/daemon/#monero.MoneroDaemon.remove_bootstrap_daemon","title":"remove_bootstrap_daemon()","text":"Disable the bootstrap daemon so the daemon no longer falls back to it.
"},{"location":"api/daemon/#monero.MoneroDaemon.remove_listener","title":"remove_listener(listener)","text":"Unregister a listener to receive daemon notifications.
Parameters:
Name Type Description Default listener MoneroDaemonListener a previously registered listener to be unregistered.
required"},{"location":"api/daemon/#monero.MoneroDaemon.remove_listeners","title":"remove_listeners()","text":"Unregister all listeners registered with the daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.reset_download_limit","title":"reset_download_limit()","text":"Reset the download bandwidth limit.
Returns:
Type Description int the download bandwidth limit after resetting.
"},{"location":"api/daemon/#monero.MoneroDaemon.reset_upload_limit","title":"reset_upload_limit()","text":"Reset the upload bandwidth limit.
Returns:
Type Description int the upload bandwidth limit after resetting.
"},{"location":"api/daemon/#monero.MoneroDaemon.save_blockchain","title":"save_blockchain()","text":"Save (flush) the blockchain to disk.
"},{"location":"api/daemon/#monero.MoneroDaemon.set_bootstrap_daemon","title":"set_bootstrap_daemon(address, username='', password='', proxy='')","text":"Set the bootstrap daemon used by the daemon to serve requests while it is not fully synced, e.g. a remote node.
Parameters:
Name Type Description Default address str the bootstrap daemon's address (host:port), \"auto\" to select a public node automatically, or an empty string to disable the bootstrap daemon.
required username str the username to authenticate with the bootstrap daemon (optional).
'' password str the password to authenticate with the bootstrap daemon (optional).
'' proxy str the proxy used to reach the bootstrap daemon, e.g. a SOCKS proxy (optional).
''"},{"location":"api/daemon/#monero.MoneroDaemon.set_download_limit","title":"set_download_limit(limit)","text":"Set the download bandwidth limit.
Parameters:
Name Type Description Default limit int is the download limit to set (-1 to reset to default).
required Returns:
Type Description int is the new download limit after setting.
"},{"location":"api/daemon/#monero.MoneroDaemon.set_incoming_peer_limit","title":"set_incoming_peer_limit(limit)","text":"Limit number of incoming peers.
Parameters:
Name Type Description Default limit int is the maximum number of incoming peers.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_log_categories","title":"set_log_categories(categories='')","text":"Set the daemon's log categories.
Parameters:
Name Type Description Default categories str the log categories to set, e.g. \"*:WARNING,net.p2p:DEBUG\" (an empty string resets categories to the default).
'' Returns:
Type Description str the daemon's resulting log categories.
"},{"location":"api/daemon/#monero.MoneroDaemon.set_log_hash_rate","title":"set_log_hash_rate(is_visible)","text":"Show or hide the mining hash rate in the daemon's console log.
Parameters:
Name Type Description Default is_visible bool specifies if the hash rate should be logged.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_log_level","title":"set_log_level(level)","text":"Set the daemon's log level.
Parameters:
Name Type Description Default level int the log level to set, from 0 (least verbose) to 4 (most verbose).
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_outgoing_peer_limit","title":"set_outgoing_peer_limit(limit)","text":"Limit number of outgoing peers.
Parameters:
Name Type Description Default limit int is the maximum number of outgoing peers.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_peer_ban","title":"set_peer_ban(ban)","text":"Ban a peer node.
Parameters:
Name Type Description Default ban MoneroBan contains information about a node to ban.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_peer_bans","title":"set_peer_bans(bans)","text":"Ban peers nodes.
Parameters:
Name Type Description Default bans list[MoneroBan] are bans to apply against peer nodes.
required"},{"location":"api/daemon/#monero.MoneroDaemon.set_upload_limit","title":"set_upload_limit(limit)","text":"Set the upload bandwidth limit.
Parameters:
Name Type Description Default limit int is the upload limit to set (-1 to reset to default).
required Returns:
Type Description int is the new upload limit after setting.
"},{"location":"api/daemon/#monero.MoneroDaemon.start_mining","title":"start_mining(address, num_threads, is_background, ignore_battery)","text":"Start mining.
Parameters:
Name Type Description Default address str is the address given miner rewards if the daemon mines a block.
required num_threads int is the number of mining threads to run.
required is_background bool specifies if the miner should run in the background or not.
required ignore_battery bool specifies if the battery state (e.g. on laptop) should be ignored or not.
required"},{"location":"api/daemon/#monero.MoneroDaemon.stop","title":"stop()","text":"Safely disconnect and shut down the daemon.
"},{"location":"api/daemon/#monero.MoneroDaemon.stop_mining","title":"stop_mining()","text":"Stop mining.
"},{"location":"api/daemon/#monero.MoneroDaemon.submit_block","title":"submit_block(block_blob)","text":"Submit a mined block to the network.
Parameters:
Name Type Description Default block_blob str is the mined block to submit.
required"},{"location":"api/daemon/#monero.MoneroDaemon.submit_blocks","title":"submit_blocks(block_blobs)","text":"Submit mined blocks to the network.
Parameters:
Name Type Description Default block_blobs list[str] are the mined blocks to submit.
required"},{"location":"api/daemon/#monero.MoneroDaemon.submit_tx_hex","title":"submit_tx_hex(tx_hex, do_not_relay=False)","text":"Submits a transaction to the daemon's pool.
Parameters:
Name Type Description Default tx_hex str is the raw transaction hex to submit.
required Returns:
Type Description MoneroSubmitTxResult the submission results.
"},{"location":"api/daemon/#monero.MoneroDaemon.wait_for_next_block_header","title":"wait_for_next_block_header()","text":"Get the header of the next block added to the chain.
Returns:
Type Description MoneroBlockHeader the header of the next block added to the chain.
"},{"location":"api/daemon_rpc/","title":"Daemon RPC","text":""},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc","title":"MoneroDaemonRpc","text":" Bases: MoneroDaemon
Implements a MoneroDaemon using monerod-rpc_.
.. _monerod-rpc: https://docs.getmonero.org/rpc-library/monerod-rpc/
"},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc.get_rpc_connection","title":"get_rpc_connection()","text":"Get the daemon's RPC connection.
Returns:
Type Description MoneroRpcConnection the daemon's rpc connection.
"},{"location":"api/daemon_rpc/#monero.MoneroDaemonRpc.is_connected","title":"is_connected()","text":"Indicates if the client is connected to the daemon via RPC.
Returns:
Type Description bool True if the client is connected to the daemon, False otherwise.
"},{"location":"api/errors/","title":"Errors","text":""},{"location":"api/errors/#monero.MoneroError","title":"MoneroError","text":" Bases: Exception
Monero exception.
"},{"location":"api/errors/#monero.MoneroRpcError","title":"MoneroRpcError","text":" Bases: RuntimeError
Exception when interacting with the Monero daemon or wallet RPC API.
"},{"location":"api/errors/#monero.MoneroRpcError.code","title":"code: int instance-attribute","text":"JSON-RPC error code
"},{"location":"api/errors/#monero.MoneroRpcError.__init__","title":"__init__(message, code=-1)","text":"Initialize a new monero rpc error.
Parameters:
Name Type Description Default message str rpc error message.
required code int rpc error code.
-1"},{"location":"api/serializable_struct/","title":"Serializable Struct","text":""},{"location":"api/serializable_struct/#monero.SerializableStruct","title":"SerializableStruct","text":" Bases: ABC
Base struct which can be serialized.
"},{"location":"api/serializable_struct/#monero.SerializableStruct.serialize","title":"serialize()","text":"Serializes the struct to a json string.
Returns:
Type Description str the struct serialized to a json string.
"},{"location":"api/utils/","title":"Monero Utilities","text":""},{"location":"api/utils/#monero.MoneroUtils","title":"MoneroUtils","text":"Collection of Monero utilities.
"},{"location":"api/utils/#monero.MoneroUtils.atomic_units_to_xmr","title":"atomic_units_to_xmr(amount_atomic_units) staticmethod","text":"Convert atomic units to XMR.
Parameters:
Name Type Description Default amount_atomic_units int amount in atomic units to convert to XMR.
required Returns:
Type Description float amount in XMR.
"},{"location":"api/utils/#monero.MoneroUtils.binary_blocks_fast_to_json","title":"binary_blocks_fast_to_json(bin) staticmethod","text":"Deserialize blocks JSON string from the daemon's fast (get_blocks.bin) binary format.
Parameters:
Name Type Description Default bin bytes blocks JSON string in the fast binary format.
required Returns:
Type Description str The deserialized blocks in JSON string format.
"},{"location":"api/utils/#monero.MoneroUtils.binary_blocks_to_json","title":"binary_blocks_to_json(bin) staticmethod","text":"Deserialize blocks JSON string from binary format.
Parameters:
Name Type Description Default bin bytes blocks JSON string in binary format.
required Returns:
Type Description str The deserialized blocks in JSON string format.
"},{"location":"api/utils/#monero.MoneroUtils.binary_to_dict","title":"binary_to_dict(bin) staticmethod","text":"Deserialize a dictionary from binary format.
Parameters:
Name Type Description Default bin bytes Dictionary in binary format.
required Returns:
Type Description dict[Any, Any] Deserialized dictionary.
"},{"location":"api/utils/#monero.MoneroUtils.binary_to_json","title":"binary_to_json(bin) staticmethod","text":"Deserialize a JSON string from binary format.
Parameters:
Name Type Description Default bin bytes JSON string in binary format.
required Returns:
Type Description str The deserialized JSON string.
"},{"location":"api/utils/#monero.MoneroUtils.configure_logging","title":"configure_logging(path, console) staticmethod","text":"Initialize logging.
Parameters:
Name Type Description Default path str the path to write logs to.
required console bool specifies whether or not to write to the console.
required"},{"location":"api/utils/#monero.MoneroUtils.dict_to_binary","title":"dict_to_binary(dictionary) staticmethod","text":"Converts a dictionary into binary format.
Parameters:
Name Type Description Default dictionary dict The dictionary to convert in binary format.
required Returns:
Type Description bytes Binary format.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_outputs","title":"get_blocks_from_outputs(outputs) staticmethod","text":"Get distinct blocks from outputs.
Parameters:
Name Type Description Default outputs list[MoneroOutputWallet] Outputs to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from outputs.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_transfers","title":"get_blocks_from_transfers(transfers) staticmethod","text":"Get distinct blocks from transfers.
Parameters:
Name Type Description Default transfers list[MoneroTransfer] Transfers to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from transfers.
"},{"location":"api/utils/#monero.MoneroUtils.get_blocks_from_txs","title":"get_blocks_from_txs(txs) staticmethod","text":"Get distinct blocks from transactions.
Parameters:
Name Type Description Default txs list[MoneroTxWallet] Transactions to get blocks from.
required Returns:
Type Description list[MoneroBlock] Distinct blocks obtained from transactions.
"},{"location":"api/utils/#monero.MoneroUtils.get_integrated_address","title":"get_integrated_address(network_type, standard_address, payment_id='') staticmethod","text":"Get an integrated address.
Parameters:
Name Type Description Default network_type MoneroNetworkType is the network type of the integrated address.
required standard_address str is the address to derive the integrated address from.
required payment_id str optionally specifies the integrated address's payment id (defaults to random payment id).
'' Returns:
Type Description MoneroIntegratedAddress the integrated address.
"},{"location":"api/utils/#monero.MoneroUtils.get_payment_uri","title":"get_payment_uri(config, network_type=MoneroNetworkType.MAINNET) staticmethod","text":"Creates a payment URI from a tx configuration.
Parameters:
Name Type Description Default config MoneroTxConfig specifies configuration for a payment URI.
required network_type MoneroNetworkType address network type (optional).
MAINNET Returns:
Type Description str the payment URI.
"},{"location":"api/utils/#monero.MoneroUtils.get_ring_size","title":"get_ring_size() staticmethod","text":"Get network-enforced ring size.
Returns:
Type Description int network-enforced ring size.
"},{"location":"api/utils/#monero.MoneroUtils.get_version","title":"get_version() staticmethod","text":"Get the version of the monero-python library.
Returns:
Type Description str the version of this monero-python library
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_address","title":"is_valid_address(address, network_type) staticmethod","text":"Determine if the given address is valid.
Parameters:
Name Type Description Default address str is the address to validate.
required network_type MoneroNetworkType is the address's network type.
required Returns:
Type Description bool True if the address is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_language","title":"is_valid_language(language) staticmethod","text":"Indicates if the given language is valid.
Parameters:
Name Type Description Default language str is the language to validate
required Returns:
Type Description bool True if the language is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_mnemonic","title":"is_valid_mnemonic(mnemonic, language='') staticmethod","text":"Indicates if a mnemonic is valid.
Parameters:
Name Type Description Default mnemonic str is the mnemonic to validate.
required language str is the mnemonic expected language.
'' Returns:
Type Description bool True if the mnemonic is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_payment_id","title":"is_valid_payment_id(payment_id) staticmethod","text":"Indicates if a payment id is valid.
Parameters:
Name Type Description Default payment_id str is the payment id to validate.
required Returns:
Type Description bool True if the payment id is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_private_spend_key","title":"is_valid_private_spend_key(private_spend_key) staticmethod","text":"Indicates if a private spend key is valid.
Parameters:
Name Type Description Default private_spend_key str is the private spend key to validate.
required Returns:
Type Description bool True if the private spend key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_private_view_key","title":"is_valid_private_view_key(private_view_key) staticmethod","text":"Indicates if a private view key is valid.
Parameters:
Name Type Description Default private_view_key str is the private view key to validate.
required Returns:
Type Description bool True if the private view key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_public_spend_key","title":"is_valid_public_spend_key(public_spend_key) staticmethod","text":"Indicates if a public spend key is valid.
Parameters:
Name Type Description Default public_spend_key str is the public spend key to validate.
required Returns:
Type Description bool True if the public spend key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.is_valid_public_view_key","title":"is_valid_public_view_key(public_view_key) staticmethod","text":"Indicates if a public view key is valid.
Parameters:
Name Type Description Default public_view_key str is the public view key to validate.
required Returns:
Type Description bool True if the public view key is valid, False otherwise.
"},{"location":"api/utils/#monero.MoneroUtils.json_to_binary","title":"json_to_binary(json) staticmethod","text":"Convert a JSON string into binary format.
Returns:
Type Description bytes Binary format.
"},{"location":"api/utils/#monero.MoneroUtils.log_debug","title":"log_debug(message) staticmethod","text":"Log debug message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_error","title":"log_error(message) staticmethod","text":"Log error message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_info","title":"log_info(message) staticmethod","text":"Log info message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_trace","title":"log_trace(message) staticmethod","text":"Log trace message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.log_warning","title":"log_warning(message) staticmethod","text":"Log warning message.
Parameters:
Name Type Description Default message str the message to log.
required"},{"location":"api/utils/#monero.MoneroUtils.set_log_categories","title":"set_log_categories(categories) staticmethod","text":"Set the library's log categories.
Parameters:
Name Type Description Default categories str the library's log categories to set.
required"},{"location":"api/utils/#monero.MoneroUtils.set_log_level","title":"set_log_level(loglevel) staticmethod","text":"Set the library's log level with 0 being least verbose.
Parameters:
Name Type Description Default loglevel int the library's log level.
required"},{"location":"api/utils/#monero.MoneroUtils.validate_address","title":"validate_address(address, network_type) staticmethod","text":"Validates the given address.
Parameters:
Name Type Description Default address str is the address to validate.
required network_type MoneroNetworkType is the address's network type.
required"},{"location":"api/utils/#monero.MoneroUtils.validate_mnemonic","title":"validate_mnemonic(mnemonic, language='') staticmethod","text":"Validates the given mnemonic phrase.
Parameters:
Name Type Description Default mnemonic str is the mnemonic to validate.
required language str is the mnemonic expected language.
'' Raises:
Type Description MoneroError if the given mnemonic is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_payment_id","title":"validate_payment_id(payment_id) staticmethod","text":"Validate a payment id.
Parameters:
Name Type Description Default payment_id str is the payment id to validate.
required Raises:
Type Description MoneroError if the given payment id is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_private_spend_key","title":"validate_private_spend_key(private_spend_key) staticmethod","text":"Validate a private spend key.
Parameters:
Name Type Description Default private_spend_key str is the private spend key to validate.
required Raises:
Type Description MoneroError if the given private spend key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_private_view_key","title":"validate_private_view_key(private_view_key) staticmethod","text":"Validate a private view key.
Parameters:
Name Type Description Default private_view_key str is the private view key to validate.
required Raises:
Type Description MoneroError if the given private view key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_public_spend_key","title":"validate_public_spend_key(public_spend_key) staticmethod","text":"Validate a public spend key.
Parameters:
Name Type Description Default public_spend_key str is the public spend key to validate.
required Raises:
Type Description MoneroError if the given public spend key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.validate_public_view_key","title":"validate_public_view_key(public_view_key) staticmethod","text":"Validate a public view key.
Parameters:
Name Type Description Default public_view_key str is the public view key to validate.
required Raises:
Type Description MoneroError if the given public view key is invalid.
"},{"location":"api/utils/#monero.MoneroUtils.xmr_to_atomic_units","title":"xmr_to_atomic_units(amount_xmr) staticmethod","text":"Convert XMR to atomic units.
Parameters:
Name Type Description Default amount_xmr float amount in XMR to convert to atomic units.
required Returns:
Type Description int amount in atomic units.
"},{"location":"api/utils/#monero.GenUtils","title":"GenUtils","text":" Bases: ABC
Collection of generic utilities.
"},{"location":"api/utils/#monero.GenUtils.bool_equals","title":"bool_equals(val, opt_val) staticmethod","text":"Compare a bool to an optional bool.
Parameters:
Name Type Description Default val bool value to compare.
required opt_val bool|None optional value to compare against; False if None.
required Returns:
Type Description bool True if opt_val is set and equals val, False otherwise.
"},{"location":"api/utils/#monero.GenUtils.get_uuid","title":"get_uuid() staticmethod","text":"Return a random unique identifier.
Returns:
Type Description str a unique id.
"},{"location":"api/utils/#monero.GenUtils.reconcile_bool","title":"reconcile_bool(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod","text":"Reconcile two optional bools to a single value, the same logic used internally to merge model fields (e.g. MoneroTx.merge()).
- If both are equal (including both
None), returns that value. - If exactly one is
None, returns the other, unless resolve_defined is False, in which case None is returned. - Otherwise, if both are set and differ:
resolve_true picks whichever operand equals resolve_true; else resolve_max picks the greater (True) or lesser (False) of the two, treating True as 1 and False as 0.
Parameters:
Name Type Description Default val1 bool|None first value.
required val2 bool|None second value.
required resolve_defined bool|None when only one side is set and this is False, return None instead of the set side.
None resolve_true bool|None when both sides are set and differ, prefer whichever operand equals this value.
None resolve_max bool|None when both sides are set and differ (and resolve_true didn't resolve it), prefer the greater (True) or lesser (False) value.
None err_msg str extra context appended to the error message on conflict.
'' Returns:
Type Description bool | None the reconciled value.
Raises:
Type Description RuntimeError If none of the above resolves.
"},{"location":"api/utils/#monero.GenUtils.reconcile_string","title":"reconcile_string(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod","text":"Reconcile two optional strings. Unlike the bool/int overloads, resolve_true/resolve_max are accepted for signature symmetry but are not used.
Parameters:
Name Type Description Default val1 str|None first value.
required val2 str|None second value.
required resolve_defined bool|None see reconcile_bool.
None resolve_true bool|None accepted but ignored.
None resolve_max bool|None accepted but ignored.
None err_msg str extra context appended to the error message on conflict.
'' Returns:
Type Description str | None the reconciled value.
Raises:
Type Description RuntimeError on different strings always regardless of resolve_true/resolve_max flags.
"},{"location":"api/utils/#monero.GenUtils.reconcile_string_list","title":"reconcile_string_list(v1, v2, err_msg='') staticmethod","text":"Reconcile two string lists: equal lists are returned as-is, an empty list yields the other.
Parameters:
Name Type Description Default v1 list[str] first list.
required v2 list[str] second list.
required err_msg str extra context appended to the error message on conflict.
'' Returns:
Type Description list[str] the reconciled list.
Raises:
Type Description RuntimeError on two different non-empty lists.
"},{"location":"api/utils/#monero.GenUtils.reconcile_uint64","title":"reconcile_uint64(val1, val2, resolve_defined=None, resolve_true=None, resolve_max=None, err_msg='') staticmethod","text":"Reconcile two optional unsigned 64-bit integers. See reconcile_bool for the resolution rules (resolve_max here picks the numeric max/min).
Parameters:
Name Type Description Default val1 int|None first value.
required val2 int|None second value.
required resolve_defined bool|None see reconcile_bool.
None resolve_true bool|None see reconcile_bool.
None resolve_max bool|None prefer the larger (True) or smaller (False) value.
None err_msg str extra context appended to the error message on conflict.
'' Returns:
Type Description int | None the reconciled value.
Raises:
Type Description RuntimeError If none of the above resolves.
"},{"location":"api/utils/#monero.GenUtils.wait_for","title":"wait_for(duration_ms) staticmethod","text":"Block the calling thread for the given duration. Releases the GIL while sleeping.
Parameters:
Name Type Description Default duration_ms int duration to wait, in milliseconds.
required Raises:
Type Description TypeError Must be a non-negative number that fits in a valid uint64_t range.
"},{"location":"api/utils/#comparators","title":"Comparators","text":""},{"location":"api/utils/#monero.TxHeightComparator","title":"TxHeightComparator","text":"Compares two transactions by their height.
"},{"location":"api/utils/#monero.TxHeightComparator.compare","title":"compare(tx1, tx2) staticmethod","text":"Compare two transactions by height.
Unconfirmed transactions (no block) sort after confirmed ones; when both are unconfirmed or share the same height and block, their original order within the block's tx list is preserved.
Parameters:
Name Type Description Default tx1 MoneroTx first transaction to compare.
required tx2 MoneroTx second transaction to compare.
required Returns:
Type Description bool True if tx1 sorts before tx2, False otherwise.
"},{"location":"api/utils/#monero.IncomingTransferComparator","title":"IncomingTransferComparator","text":"Compares two incoming transfers by ascending account and subaddress indices.
"},{"location":"api/utils/#monero.IncomingTransferComparator.compare","title":"compare(transfer1, transfer2) staticmethod","text":"Compare two incoming transfers.
Compares by transaction height first (see TxHeightComparator), then by account index, then by subaddress index.
Parameters:
Name Type Description Default transfer1 MoneroIncomingTransfer first transfer to compare.
required transfer2 MoneroIncomingTransfer second transfer to compare.
required Returns:
Type Description bool True if transfer1 sorts before transfer2, False otherwise.
"},{"location":"api/utils/#monero.OutputComparator","title":"OutputComparator","text":"Compares two wallet outputs by ascending account, subaddress and output index.
"},{"location":"api/utils/#monero.OutputComparator.compare","title":"compare(output1, output2) staticmethod","text":"Compare two wallet outputs.
Compares by transaction height first (see TxHeightComparator), then by account index, subaddress index, output index and finally key image hex.
Parameters:
Name Type Description Default output1 MoneroOutputWallet first output to compare.
required output2 MoneroOutputWallet second output to compare.
required Returns:
Type Description bool True if output1 sorts before output2, False otherwise.
"},{"location":"api/wallet/","title":"Wallet Interface","text":""},{"location":"api/wallet/#monero.MoneroWallet","title":"MoneroWallet","text":"Base wallet with default implementations.
"},{"location":"api/wallet/#monero.MoneroWallet.DEFAULT_LANGUAGE","title":"DEFAULT_LANGUAGE: str instance-attribute","text":"Default Monero wallet seed language.
"},{"location":"api/wallet/#monero.MoneroWallet.__init__","title":"__init__()","text":"Initialize a Monero wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.add_address_book_entry","title":"add_address_book_entry(address, description)","text":"Add an address book entry.
Parameters:
Name Type Description Default address str is the entry address.
required description str is the entry description (optional).
required Returns:
Type Description int the index of the added entry.
"},{"location":"api/wallet/#monero.MoneroWallet.add_listener","title":"add_listener(listener)","text":"Register a listener receive wallet notifications.
Parameters:
Name Type Description Default listener MoneroWalletListener is the listener to receive wallet notifications.
required"},{"location":"api/wallet/#monero.MoneroWallet.change_password","title":"change_password(old_password, new_password)","text":"Change the wallet password.
Parameters:
Name Type Description Default old_password str is the wallet's old password.
required new_password str is the wallet's new password.
required"},{"location":"api/wallet/#monero.MoneroWallet.check_reserve_proof","title":"check_reserve_proof(address, message, signature)","text":"Proves a wallet has a disposable reserve using a signature.
Parameters:
Name Type Description Default address str is the public wallet address.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the reserve proof signature to check.
required Returns:
Type Description MoneroCheckReserve the result of checking the signature proof.
"},{"location":"api/wallet/#monero.MoneroWallet.check_spend_proof","title":"check_spend_proof(tx_hash, message, signature)","text":"Prove a spend using a signature. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the transaction signature to confirm.
required Returns:
Type Description bool True if the signature is good, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.check_tx_key","title":"check_tx_key(tx_hash, tx_key, address)","text":"Check a transaction in the blockchain with its secret key.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to check.
required tx_key str is the transaction's secret key.
required address str is the destination public address of the transaction.
required Returns:
Type Description MoneroCheckTx the result of the check.
"},{"location":"api/wallet/#monero.MoneroWallet.check_tx_proof","title":"check_tx_proof(tx_hash, address, message, signature)","text":"Prove a transaction by checking its signature.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required address str is the destination public address of the transaction.
required message str is a message included with the signature to further authenticate the proof (optional).
required signature str is the transaction signature to confirm.
required Returns:
Type Description MoneroCheckTx the result of the check.
"},{"location":"api/wallet/#monero.MoneroWallet.close","title":"close(save=False)","text":"Optionally save then close the wallet.
Parameters:
Name Type Description Default save bool specifies if the wallet should be saved before being closed (default False).
False"},{"location":"api/wallet/#monero.MoneroWallet.create_account","title":"create_account(label='')","text":"Create a new account with a label for the first subaddress.
Parameters:
Name Type Description Default label str specifies the label for the account's first subaddress (optional).
'' Returns:
Type Description MoneroAccount the created account.
"},{"location":"api/wallet/#monero.MoneroWallet.create_subaddress","title":"create_subaddress(account_idx, label='')","text":"Create a subaddress within an account.
Parameters:
Name Type Description Default account_idx int specifies the index of the account to create the subaddress within.
required label str specifies the the label for the subaddress (defaults to empty string).
'' Returns:
Type Description MoneroSubaddress the created subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.create_tx","title":"create_tx(config)","text":"Create a transaction to transfer funds from this wallet.
Parameters:
Name Type Description Default config MoneroTxConfig configures the transaction to create.
required Returns:
Type Description MoneroTxWallet the created transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.create_txs","title":"create_txs(config)","text":"Create one or more transactions to transfer funds from this wallet.
Parameters:
Name Type Description Default config MoneroTxConfig configures the transactions to create.
required Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.decode_integrated_address","title":"decode_integrated_address(integrated_address)","text":"Decode an integrated address to get its standard address and payment id.
Parameters:
Name Type Description Default integrated_address str is an integrated address to decode.
required Returns:
Type Description MoneroIntegratedAddress the decoded integrated address including standard address and payment id.
"},{"location":"api/wallet/#monero.MoneroWallet.delete_address_book_entry","title":"delete_address_book_entry(index)","text":"Delete an address book entry.
Parameters:
Name Type Description Default index int is the index of the entry to delete.
required"},{"location":"api/wallet/#monero.MoneroWallet.describe_multisig_tx_set","title":"describe_multisig_tx_set(multisig_tx_hex)","text":"Describe a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
Name Type Description Default multisig_tx_hex str multisig tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.describe_tx_set","title":"describe_tx_set(tx_set)","text":"Describes a tx set containing unsigned or multisig tx hex to a new tx set containing structured transactions.
Parameters:
Name Type Description Default tx_set MoneroTxSet is a tx set containing unsigned or multisig tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.describe_unsigned_tx_set","title":"describe_unsigned_tx_set(unsigned_tx_hex)","text":"Describe a tx set from unsigned tx hex.
Parameters:
Name Type Description Default unsigned_tx_hex str unsigned tx hex.
required Returns:
Type Description MoneroTxSet the tx set containing structured transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.edit_address_book_entry","title":"edit_address_book_entry(index, set_address, address, set_description, description)","text":"Edit an address book entry.
Parameters:
Name Type Description Default index int is the index of the address book entry to edit.
required set_address bool specifies if the address should be updated.
required address str is the updated address.
required set_description bool specifies if the description should be updated.
required description str is the updated description.
required"},{"location":"api/wallet/#monero.MoneroWallet.exchange_multisig_keys","title":"exchange_multisig_keys(multisig_hexes, password)","text":"Exchange multisig hex with participants in a M/N multisig wallet.
This process must be repeated with participants exactly N-M times.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required password str the wallet's password, needed to decrypt the account keys in memory for the key exchange (wallet2 keeps them encrypted at rest unless the wallet is unattended or view-only).
required Returns:
Type Description MoneroMultisigInitResult the result which has the multisig's address xor this wallet's multisig hex to share with participants if not done.
"},{"location":"api/wallet/#monero.MoneroWallet.export_key_images","title":"export_key_images(all=False)","text":"Export signed key images.
Parameters:
Name Type Description Default all bool export all key images if True, else export key images since the last export.
False Returns:
Type Description MoneroKeyImageExportResult the wallet's signed key images.
"},{"location":"api/wallet/#monero.MoneroWallet.export_multisig_hex","title":"export_multisig_hex()","text":"Export this wallet's multisig info as hex for other participants.
Returns:
Type Description str this wallet's multisig info as hex for other participants.
"},{"location":"api/wallet/#monero.MoneroWallet.export_outputs","title":"export_outputs(all=False)","text":"Export outputs in hex format.
Parameters:
Name Type Description Default all bool export all outputs if True, else export outputs since the last export.
False Returns:
Type Description str outputs in hex format, empty string if no outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.freeze_output","title":"freeze_output(key_image)","text":"Freeze an output.
Parameters:
Name Type Description Default key_image str key image of the output to freeze.
required"},{"location":"api/wallet/#monero.MoneroWallet.get_account_tags","title":"get_account_tags()","text":"Return all account tags.
Returns:
Type Description list[MoneroAccountTag] the wallet's account tags.
"},{"location":"api/wallet/#monero.MoneroWallet.get_address","title":"get_address(account_idx, subaddress_idx)","text":"Get the address of a specific subaddress.
Parameters:
Name Type Description Default account_idx int specifies the account index of the address's subaddress.
required subaddress_idx int specifies the subaddress index within the account.
required Returns:
Type Description str the receive address of the specified subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.get_address_index","title":"get_address_index(address)","text":"Get the account and subaddress index of the given address.
Parameters:
Name Type Description Default address str is the address to get the account and subaddress index from.
required Returns:
Type Description MoneroSubaddress the account and subaddress indices.
Raises:
Type Description MoneroError exception if address is not a wallet address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_attribute","title":"get_attribute(key)","text":"Get an attribute.
Parameters:
Name Type Description Default key str is the attribute to get the value of.
required Returns:
Type Description str attribute's value.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_connection","title":"get_daemon_connection()","text":"Get the wallet's daemon connection.
Returns:
Type Description MoneroRpcConnection | None the wallet's daemon connection.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_height","title":"get_daemon_height()","text":"Get the height that the wallet's daemon is synced to.
Returns:
Type Description int the height that the wallet's daemon is synced to.
Raises:
Type Description Exception if the wallet cannot reach its daemon.
"},{"location":"api/wallet/#monero.MoneroWallet.get_daemon_max_peer_height","title":"get_daemon_max_peer_height()","text":"Get the maximum height of the peers the wallet's daemon is connected to.
Returns:
Type Description int the maximum height of the peers the wallet's daemon is connected to.
"},{"location":"api/wallet/#monero.MoneroWallet.get_default_fee_priority","title":"get_default_fee_priority()","text":"Get the current default fee priority (unimportant, normal, elevated, etc).
Returns:
Type Description MoneroTxPriority the current fee priority.
"},{"location":"api/wallet/#monero.MoneroWallet.get_height","title":"get_height()","text":"Get the height of the last block processed by the wallet (its index + 1).
Returns:
Type Description int the height of the last block processed by the wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_height_by_date","title":"get_height_by_date(year, month, day)","text":"Get the blockchain's height by date as a conservative estimate for scanning.
Parameters:
Name Type Description Default year int year of the height to get.
required month int month of the height to get as a number between 1 and 12.
required day int day of the height to get as a number between 1 and 31.
required Returns:
Type Description int the blockchain's approximate height at the given date.
"},{"location":"api/wallet/#monero.MoneroWallet.get_integrated_address","title":"get_integrated_address(standard_address='', payment_id='')","text":"Get an integrated address from a standard address and a payment id.
Parameters:
Name Type Description Default standard_address str is the integrated addresse's standard address (defaults to wallet's primary address).
'' payment_id str is the integrated addresse's payment id (defaults to randomly generating new payment id).
'' Returns:
Type Description MoneroIntegratedAddress the integrated address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_listeners","title":"get_listeners()","text":"Get the listeners registered with the wallet.
Returns:
Type Description list[MoneroWalletListener] List of listener registered with the wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_multisig_info","title":"get_multisig_info()","text":"Get multisig info about this wallet.
Returns:
Type Description MoneroMultisigInfo multisig info about this wallet.
"},{"location":"api/wallet/#monero.MoneroWallet.get_network_type","title":"get_network_type()","text":"Get the wallet's network type (mainnet, testnet, or stagenet).
Returns:
Type Description MoneroNetworkType the wallet's network type.
"},{"location":"api/wallet/#monero.MoneroWallet.get_new_key_images_from_last_import","title":"get_new_key_images_from_last_import()","text":"Get new key images from the last imported outputs.
Returns:
Type Description MoneroKeyImageExportResult the key images from the last imported outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.get_path","title":"get_path()","text":"Get the path of this wallet's file on disk.
Returns:
Type Description str the path of this wallet's file on disk.
"},{"location":"api/wallet/#monero.MoneroWallet.get_payment_uri","title":"get_payment_uri(config)","text":"Creates a payment URI from a tx configuration.
Parameters:
Name Type Description Default config MoneroTxConfig specifies configuration for a potential tx.
required Returns:
Type Description str is the payment uri.
"},{"location":"api/wallet/#monero.MoneroWallet.get_primary_address","title":"get_primary_address()","text":"Get the wallet's primary address.
Returns:
Type Description str the wallet's primary address.
"},{"location":"api/wallet/#monero.MoneroWallet.get_private_spend_key","title":"get_private_spend_key()","text":"Get the wallet's private spend key.
Returns:
Type Description str the wallet's private spend key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_private_view_key","title":"get_private_view_key()","text":"Get the wallet's private view key.
Returns:
Type Description str the wallet's private view key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_public_spend_key","title":"get_public_spend_key()","text":"Get the wallet's public spend key.
Returns:
Type Description str the wallet's public spend key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_public_view_key","title":"get_public_view_key()","text":"Get the wallet's public view key.
Returns:
Type Description str the wallet's public view key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_reserve_proof_account","title":"get_reserve_proof_account(account_idx, amount, message)","text":"Generate a signature to prove an available amount in an account.
Parameters:
Name Type Description Default account_idx int specifies the account to prove ownership of the amount.
required amount int is the minimum amount to prove as available in the account.
required message str is a message to include with the signature to further authenticate the proof (optional).
required Returns:
Type Description str the reserve proof signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_reserve_proof_wallet","title":"get_reserve_proof_wallet(message)","text":"Generate a signature to prove the entire balance of the wallet.
Parameters:
Name Type Description Default message str is a message included with the signature to further authenticate the proof (optional).
required Returns:
Type Description str the reserve proof signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_restore_height","title":"get_restore_height()","text":"Get the height of the first block that the wallet scans.
Returns:
Type Description int the height of the first block that the wallet scans.
"},{"location":"api/wallet/#monero.MoneroWallet.get_seed","title":"get_seed()","text":"Get the wallet's mnemonic phrase or seed.
Returns:
Type Description str the wallet's mnemonic phrase or seed.
"},{"location":"api/wallet/#monero.MoneroWallet.get_seed_language","title":"get_seed_language()","text":"Get the language of the wallet's mnemonic phrase or seed.
Returns:
Type Description str the language of the wallet's mnemonic phrase or seed.
"},{"location":"api/wallet/#monero.MoneroWallet.get_spend_proof","title":"get_spend_proof(tx_hash, message='')","text":"Generate a signature to prove a spend. Unlike proving a transaction, it does not require the destination public address.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required message str is a message to include with the signature to further authenticate the proof (optional).
'' Returns:
Type Description str the transaction signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_subaddress","title":"get_subaddress(account_idx, subaddress_idx)","text":"Get a subaddress.
Parameters:
Name Type Description Default account_idx int specifies the index of the subaddress's account.
required subaddress_idx int specifies index of the subaddress within the account.
required Returns:
Type Description MoneroSubaddress the retrieved subaddress.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx","title":"get_tx(tx_hash)","text":"Get single wallet transaction by hash.
Parameters:
Name Type Description Default tx_hash str Transaction hash.
required Returns:
Type Description MoneroTxWallet | None wallet transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_key","title":"get_tx_key(tx_hash)","text":"Get a transaction's secret key from its hash.
Parameters:
Name Type Description Default tx_hash str is the transaction's hash.
required Returns:
Type Description str is the transaction's secret key.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_note","title":"get_tx_note(tx_hash)","text":"Get a transaction note.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to get the note of.
required Returns:
Type Description str the tx note.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_notes","title":"get_tx_notes(tx_hashes)","text":"Get notes for multiple transactions.
Parameters:
Name Type Description Default tx_hashes list[str] identify the transactions to get notes for.
required Returns:
Type Description list[str] notes for the transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.get_tx_proof","title":"get_tx_proof(tx_hash, address, message='')","text":"Get a transaction signature to prove it.
Parameters:
Name Type Description Default tx_hash str specifies the transaction to prove.
required address str is the destination public address of the transaction.
required message str is a message to include with the signature to further authenticate the proof (optional).
'' Returns:
Type Description str the transaction signature.
"},{"location":"api/wallet/#monero.MoneroWallet.get_version","title":"get_version()","text":"Get the wallet's version.
Returns:
Type Description MoneroVersion the wallet's version.
"},{"location":"api/wallet/#monero.MoneroWallet.import_key_images","title":"import_key_images(key_images, offset=0)","text":"Import signed key images and verify their spent status.
Parameters:
Name Type Description Default key_images list[MoneroKeyImage] are key images to import and verify (requires hex and signature).
required offset int offset of the first key image among the wallet's outputs.
0 Returns:
Type Description MoneroKeyImageImportResult results of the import.
"},{"location":"api/wallet/#monero.MoneroWallet.import_multisig_hex","title":"import_multisig_hex(multisig_hexes, refresh_after_import=True)","text":"Import multisig info as hex from other participants.
Note: If the daemon is not trusted, this method will not automatically update the spent status after importing peer multisig hex.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required refresh_after_import bool refresh wallet after import.
True Returns:
Type Description int the number of outputs signed with the given multisig hex.
"},{"location":"api/wallet/#monero.MoneroWallet.import_outputs","title":"import_outputs(outputs_hex)","text":"Import outputs in hex format.
Parameters:
Name Type Description Default outputs_hex str are outputs in hex format.
required Returns:
Type Description int the number of outputs imported.
"},{"location":"api/wallet/#monero.MoneroWallet.is_closed","title":"is_closed()","text":"Indicates if the wallet is closed.
Returns:
Type Description bool True if the wallet is closed, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_connected_to_daemon","title":"is_connected_to_daemon()","text":"Indicates if the wallet is connected a daemon.
Returns:
Type Description bool True if the wallet is connected to daemon, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_daemon_synced","title":"is_daemon_synced()","text":"Indicates if the wallet's daemon is synced with the network.
Returns:
Type Description bool True if the daemon is synced, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_daemon_trusted","title":"is_daemon_trusted()","text":"Indicates if the daemon is trusted or untrusted.
Returns:
Type Description bool True if the daemon is trusted, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_multisig","title":"is_multisig()","text":"Indicates if this wallet is a multisig wallet.
Returns:
Type Description bool True if this is a multisig wallet, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_multisig_import_needed","title":"is_multisig_import_needed()","text":"Indicates if importing multisig data is needed for returning a correct balance.
Returns:
Type Description bool True if importing multisig data is needed for returning a correct balance, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_output_frozen","title":"is_output_frozen(key_image)","text":"Check if an output is frozen.
Parameters:
Name Type Description Default key_image str key image of the output to check if frozen.
required Returns:
Type Description bool True if the output is frozen, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_synced","title":"is_synced()","text":"Indicates if the wallet is synced with the daemon.
Returns:
Type Description bool True if the wallet is synced with the daemon, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.is_view_only","title":"is_view_only()","text":"Indicates if the wallet is view-only, meaning it does have the private spend key and can therefore only observe incoming outputs.
Returns:
Type Description bool True if the wallet is view-only, False otherwise.
"},{"location":"api/wallet/#monero.MoneroWallet.make_multisig","title":"make_multisig(multisig_hexes, threshold, password)","text":"Make this wallet multisig by importing multisig hex from participants.
Parameters:
Name Type Description Default multisig_hexes list[str] are multisig hex from each participant.
required threshold int is the number of signatures needed to sign transfers.
required password str the wallet's password, needed to decrypt the account keys in memory while converting the wallet to multisig.
required Returns:
Type Description str this wallet's multisig hex to share with participants.
"},{"location":"api/wallet/#monero.MoneroWallet.move_to","title":"move_to(path, password)","text":"Move the wallet from its current path to the given path.
Parameters:
Name Type Description Default path str is the new wallet's path.
required password str is the new wallet's password.
required"},{"location":"api/wallet/#monero.MoneroWallet.parse_payment_uri","title":"parse_payment_uri(uri)","text":"Parses a payment URI to a tx configuration.
Parameters:
Name Type Description Default uri str is the payment uri to parse.
required Returns:
Type Description MoneroTxConfig the tx configuration parsed from the uri.
"},{"location":"api/wallet/#monero.MoneroWallet.prepare_multisig","title":"prepare_multisig()","text":"Get multisig info as hex to share with participants to begin creating a multisig wallet.
Returns:
Type Description str this wallet's multisig hex to share with participants.
"},{"location":"api/wallet/#monero.MoneroWallet.remove_listener","title":"remove_listener(listener)","text":"Unregister a listener to receive wallet notifications.
Parameters:
Name Type Description Default listener MoneroWalletListener is the listener to unregister.
required"},{"location":"api/wallet/#monero.MoneroWallet.rescan_blockchain","title":"rescan_blockchain()","text":"Rescan the blockchain from scratch, losing any information which cannot be recovered from the blockchain itself.
WARNING: This method discards local wallet data like destination addresses, tx secret keys, tx notes, etc.
"},{"location":"api/wallet/#monero.MoneroWallet.rescan_spent","title":"rescan_spent()","text":"Rescan the blockchain for spent outputs.
Note: this can only be called with a trusted daemon.
Example use case: peer multisig hex is import when connected to an untrusted daemon, so the wallet will not rescan spent outputs. Then the wallet connects to a trusted daemon. This method should be manually invoked to rescan outputs.
"},{"location":"api/wallet/#monero.MoneroWallet.save","title":"save()","text":"Save the wallet at its current path.
"},{"location":"api/wallet/#monero.MoneroWallet.scan_txs","title":"scan_txs(tx_hashes)","text":"Scan transactions by their hash/id.
Parameters:
Name Type Description Default tx_hashes list[str] tx hashes to scan.
required Raises:
Type Description Exception if tx_hashes is empty.
"},{"location":"api/wallet/#monero.MoneroWallet.set_account_label","title":"set_account_label(account_idx, label)","text":"Set a human-readable description for an account.
Parameters:
Name Type Description Default account_idx int account index.
required label str is the label to set.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_account_tag_label","title":"set_account_tag_label(tag, label)","text":"Sets a human-readable description for a tag.
Parameters:
Name Type Description Default tag str is the tag to set a description for.
required label str is the label to set for the tag.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_attribute","title":"set_attribute(key, val)","text":"Set an arbitrary attribute.
Parameters:
Name Type Description Default key str is the attribute key.
required val str is the attribute value.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_restore_height","title":"set_restore_height(restore_height)","text":"Set the height of the first block that the wallet scans.
Parameters:
Name Type Description Default restore_height int is the height of the first block that the wallet scans.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_subaddress_label","title":"set_subaddress_label(account_idx, subaddress_idx, label='')","text":"Set a subaddress label.
Parameters:
Name Type Description Default account_idx int index of the account to set the label for.
required subaddress_idx int index of the subaddress to set the label for.
required label str the label to set (default '').
''"},{"location":"api/wallet/#monero.MoneroWallet.set_tx_note","title":"set_tx_note(tx_hash, note)","text":"Set a note for a specific transaction.
Parameters:
Name Type Description Default tx_hash str specifies the transaction.
required note str specifies the note.
required"},{"location":"api/wallet/#monero.MoneroWallet.set_tx_notes","title":"set_tx_notes(tx_hashes, notes)","text":"Set notes for multiple transactions.
Parameters:
Name Type Description Default tx_hashes list[str] specify the transactions to set notes for.
required notes list[str] are the notes to set for the transactions.
required"},{"location":"api/wallet/#monero.MoneroWallet.sign_message","title":"sign_message(msg, signature_type, account_idx=0, subaddress_idx=0)","text":"Sign a message.
Parameters:
Name Type Description Default msg str the message to sign.
required signature_type MoneroMessageSignatureType sign with spend key or spend key.
required account_idx int the account index of the message signature (default 0).
0 subaddress_idx int the subaddress index of the message signature (default 0).
0 Returns:
Type Description str the message signature.
"},{"location":"api/wallet/#monero.MoneroWallet.sign_multisig_tx_hex","title":"sign_multisig_tx_hex(multisig_tx_hex)","text":"Sign previously created multisig transactions as represented by hex.
Parameters:
Name Type Description Default multisig_tx_hex str is the hex shared among the multisig transactions when they were created.
required Returns:
Type Description MoneroMultisigSignResult the result of signing the multisig transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.sign_txs","title":"sign_txs(unsigned_tx_hex)","text":"Sign unsigned transactions from a view-only wallet.
Parameters:
Name Type Description Default unsigned_tx_hex str is unsigned transaction hex from when the transactions were created.
required Returns:
Type Description MoneroTxSet the signed transaction set.
"},{"location":"api/wallet/#monero.MoneroWallet.start_mining","title":"start_mining(num_threads=None, background_mining=None, ignore_battery=None)","text":"Start mining.
Parameters:
Name Type Description Default num_threads Optional[int] is the number of threads created for mining (default None).
None background_mining Optional[bool] specifies if mining should occur in the background (default None).
None ignore_battery Optional[bool] specifies if the battery should be ignored for mining (default None).
None"},{"location":"api/wallet/#monero.MoneroWallet.start_syncing","title":"start_syncing(sync_period_in_ms=10000)","text":"Start background synchronizing with a maximum period between syncs.
Succeeds even while the wallet is offline; syncing begins once a daemon connection becomes reachable.
Parameters:
Name Type Description Default sync_period_in_ms int maximum period between syncs in milliseconds.
10000"},{"location":"api/wallet/#monero.MoneroWallet.stop_mining","title":"stop_mining()","text":"Stop mining.
"},{"location":"api/wallet/#monero.MoneroWallet.stop_syncing","title":"stop_syncing()","text":"Stop the asynchronous thread to continuously synchronize the wallet with the daemon.
"},{"location":"api/wallet/#monero.MoneroWallet.submit_multisig_tx_hex","title":"submit_multisig_tx_hex(signed_multisig_tx_hex)","text":"Submit signed multisig transactions as represented by a hex string.
Parameters:
Name Type Description Default signed_multisig_tx_hex str is the signed multisig hex returned from sign_multisig_txs().
required Returns:
Type Description list[str] the resulting transaction hashes.
"},{"location":"api/wallet/#monero.MoneroWallet.submit_txs","title":"submit_txs(signed_tx_hex)","text":"Submit signed transactions from a view-only wallet.
Parameters:
Name Type Description Default signed_tx_hex str is signed transaction hex from sign_txs().
required Returns:
Type Description list[str] the resulting transaction hashes.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_dust","title":"sweep_dust(relay=False)","text":"Sweep all unmixable dust outputs back to the wallet to make them easier to spend and mix.
Parameters:
Name Type Description Default relay bool specifies if the resulting transaction should be relayed (default False).
False Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_output","title":"sweep_output(config)","text":"Sweep an output with a given key image.
Parameters:
Name Type Description Default config MoneroTxConfig configures the sweep transaction.
required Returns:
Type Description MoneroTxWallet the created transaction.
"},{"location":"api/wallet/#monero.MoneroWallet.sweep_unlocked","title":"sweep_unlocked(config)","text":"Sweep unlocked funds according to the given config.
Parameters:
Name Type Description Default config MoneroTxConfig is the sweep configuration.
required Returns:
Type Description list[MoneroTxWallet] the created transactions.
"},{"location":"api/wallet/#monero.MoneroWallet.tag_accounts","title":"tag_accounts(tag, account_indices)","text":"Tag accounts.
Parameters:
Name Type Description Default tag str is the tag to apply to the specified accounts.
required account_indices list[int] are the indices of the accounts to tag.
required"},{"location":"api/wallet/#monero.MoneroWallet.thaw_output","title":"thaw_output(key_image)","text":"Thaw a frozen output.
Parameters:
Name Type Description Default key_image str key image of the output to thaw.
required"},{"location":"api/wallet/#monero.MoneroWallet.untag_accounts","title":"untag_accounts(account_indices)","text":"Untag accounts.
Parameters:
Name Type Description Default account_indices list[int] are the indices of the accounts to untag.
required"},{"location":"api/wallet/#monero.MoneroWallet.verify_message","title":"verify_message(msg, address, signature)","text":"Verify a message signature.
Parameters:
Name Type Description Default msg str the signed message.
required address str signing address.
required signature str signature.
required Returns:
Type Description MoneroMessageSignatureResult the message signature result.
"},{"location":"api/wallet/#monero.MoneroWallet.wait_for_next_block","title":"wait_for_next_block()","text":"Wait for the next block to be added to the chain.
Returns:
Type Description int the height of the next block when it is added to the chain.
"},{"location":"api/wallet_full/","title":"Full Wallet","text":""},{"location":"api/wallet_full/#monero.MoneroWalletFull","title":"MoneroWalletFull","text":" Bases: MoneroWallet
Monero wallet implementation which uses monero-project's wallet2.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.create_wallet","title":"create_wallet(config) staticmethod","text":"Create a new wallet with the given configuration.
Parameters:
Name Type Description Default config MoneroWalletConfig the wallet configuration.
required Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_cache_file_buffer","title":"get_cache_file_buffer()","text":"Get wallet cache file without using filesystem.
Returns:
Type Description bytes Cache file buffer.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_keys_file_buffer","title":"get_keys_file_buffer(password, view_only)","text":"Get wallet keys file without using filesystem.
Parameters:
Name Type Description Default password str The wallet password.
required view_only bool Get view-only keys.
required Returns:
Type Description bytes Keys file buffer.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.get_seed_languages","title":"get_seed_languages() staticmethod","text":"Get a list of available languages for the wallet's seed.
Returns:
Type Description list[str] the available languages for the wallet's seed.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.open_wallet","title":"open_wallet(path, password, nettype, regtest=False) staticmethod","text":"Open an existing wallet from disk.
Parameters:
Name Type Description Default path str is the path to the wallet file to open.
required password str is the password of the wallet file to open.
required nettype MoneroNetworkType is the wallet's network type.
required regtest bool indicates if wallet to open is a regtest wallet (optional).
False Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.open_wallet_data","title":"open_wallet_data(password, nettype, keys_data, cache_data, daemon_connection=MoneroRpcConnection(), regtest=False) staticmethod","text":"Open an in-memory wallet from existing data buffers.
Parameters:
Name Type Description Default password str is the password of the wallet file to open.
required nettype MoneroNetworkType is the wallet's network type.
required keys_data bytes contains the contents of the \".keys\" file (b\"\" to open without one).
required cache_data bytes contents of the wallet cache file, no extension (b\"\" for keys only).
required daemon_connection MoneroRpcConnection is connection information to a daemon (default = an unconnected wallet).
MoneroRpcConnection() regtest bool indicates if wallet to open is a regtest wallet (optional).
False Returns:
Type Description MoneroWalletFull reference to the wallet instance.
"},{"location":"api/wallet_full/#monero.MoneroWalletFull.wallet_exists","title":"wallet_exists(path) staticmethod","text":"Indicates if a wallet exists at the given path.
Parameters:
Name Type Description Default path str is the path to check for a wallet.
required Returns:
Type Description bool True if a wallet exists at the given path, False otherwise.
"},{"location":"api/wallet_keys/","title":"Keys-Only Wallet","text":""},{"location":"api/wallet_keys/#monero.MoneroWalletKeys","title":"MoneroWalletKeys","text":" Bases: MoneroWallet
Implements a Monero wallet to provide basic key management.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_from_keys","title":"create_wallet_from_keys(config) staticmethod","text":"Create a wallet from an address, view key, and spend key.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type, address, view key, spend key, language).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_from_seed","title":"create_wallet_from_seed(config) staticmethod","text":"Create a wallet from an existing mnemonic phrase or seed.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type, seed, seed offset, is_multisig).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.create_wallet_random","title":"create_wallet_random(config) staticmethod","text":"Create a new wallet with a randomly generated seed.
Parameters:
Name Type Description Default config MoneroWalletConfig is the wallet configuration (network type and language).
required Returns:
Type Description MoneroWalletKeys reference to the wallet instance.
"},{"location":"api/wallet_keys/#monero.MoneroWalletKeys.get_seed_languages","title":"get_seed_languages() staticmethod","text":"Get a list of available languages for the wallet's seed.
Returns:
Type Description list[str] The available languages for the wallet's seed.
"},{"location":"api/wallet_rpc/","title":"RPC Wallet","text":""},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc","title":"MoneroWalletRpc","text":" Bases: MoneroWallet
Implements a Monero wallet using monero-wallet-rpc_.
.. _monero-wallet-rpc: https://docs.getmonero.org/rpc-library/wallet-rpc/
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.create_wallet","title":"create_wallet(config)","text":"Create and open a wallet on the monero-wallet-rpc server.
Parameters:
Name Type Description Default config MoneroWalletConfig configures the wallet to create.
required"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.get_rpc_connection","title":"get_rpc_connection()","text":"Get the wallet's RPC connection.
Returns:
Type Description MoneroRpcConnection | None the wallet's rpc connection.
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.get_seed_languages","title":"get_seed_languages()","text":"Get all supported wallet seed languages.
Returns:
Type Description list[str] wallet's supported languages.
"},{"location":"api/wallet_rpc/#monero.MoneroWalletRpc.stop","title":"stop()","text":"Save and close the current wallet and stop the RPC server.
"},{"location":"api/data_model/connection/","title":"Connection Data Model","text":""},{"location":"api/data_model/connection/#monero.SslOptions","title":"SslOptions","text":" Bases: SerializableStruct
Models SSL options for a Monero rpc connection.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_allow_any_cert","title":"ssl_allow_any_cert: bool | None instance-attribute","text":"Allow any certificate.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_allowed_fingerprints","title":"ssl_allowed_fingerprints: list[str] instance-attribute","text":"Allowed ssl fingerprints.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_ca_file","title":"ssl_ca_file: str | None instance-attribute","text":"Path to ssl CA file.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_certificate_path","title":"ssl_certificate_path: str | None instance-attribute","text":"Path to private ssl certificate.
"},{"location":"api/data_model/connection/#monero.SslOptions.ssl_private_key_path","title":"ssl_private_key_path: str | None instance-attribute","text":"Path to private ssl key.
"},{"location":"api/data_model/connection/#monero.SslOptions.__init__","title":"__init__()","text":"Initialize a new rpc connection ssl options.
"},{"location":"api/data_model/connection/#monero.SslOptions.deserialize","title":"deserialize(json) staticmethod","text":"Deserialize an SslOptions from a JSON string.
Parameters:
Name Type Description Default json str SslOptions in JSON format.
required Returns:
Type Description SslOptions deserialized instance.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType","title":"MoneroConnectionType","text":" Bases: IntEnum
Enumerates a connection type, wich can be IPV4, IPV6, TOR, I2P or INVALID.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.I2P","title":"I2P = 4 class-attribute instance-attribute","text":"4 Indicates that Monero connection type is I2P.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.INVALID","title":"INVALID = 0 class-attribute instance-attribute","text":"0 Indicates that Monero connection type is invalid.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.IPV4","title":"IPV4 = 1 class-attribute instance-attribute","text":"1 Indicates that Monero connection type is IPV4.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.IPV6","title":"IPV6 = 2 class-attribute instance-attribute","text":"2 Indicates that Monero connection type is IPV6.
"},{"location":"api/data_model/connection/#monero.MoneroConnectionType.TOR","title":"TOR = 3 class-attribute instance-attribute","text":"3 Indicates that Monero connection type is TOR.
"},{"location":"api/data_model/daemon/","title":"Daemon Data Model","text":""},{"location":"api/data_model/daemon/#monero.MoneroNetworkType","title":"MoneroNetworkType","text":" Bases: IntEnum
Enumerates a Monero network type_.
.. _Monero network type: https://docs.getmonero.org/infrastructure/networks/
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.MAINNET","title":"MAINNET = 0 class-attribute instance-attribute","text":"0 indicates Mainnet network_.
.. _Mainnet network: https://docs.getmonero.org/infrastructure/networks/#mainnet
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.STAGENET","title":"STAGENET = 2 class-attribute instance-attribute","text":"2 indicates Stagenet network_.
.. _Stagenet network: https://docs.getmonero.org/infrastructure/networks/#stagenet
"},{"location":"api/data_model/daemon/#monero.MoneroNetworkType.TESTNET","title":"TESTNET = 1 class-attribute instance-attribute","text":"1 indicates Testnet network_.
.. _Testnet network: https://docs.getmonero.org/infrastructure/networks/#testnet
"},{"location":"api/data_model/daemon/#monero.MoneroVersion","title":"MoneroVersion","text":" Bases: SerializableStruct
Models a Monero version.
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.is_release","title":"is_release: bool | None instance-attribute","text":"States if the monero software version corresponds to an official tagged release (True), or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.number","title":"number: int | None instance-attribute","text":"Number of the monero software version.
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.__init__","title":"__init__()","text":"Initialize a new Monero version.
"},{"location":"api/data_model/daemon/#monero.MoneroVersion.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroRpcPaymentInfo","title":"MoneroRpcPaymentInfo","text":" Bases: SerializableStruct
Models a Monero RPC payment information.
"},{"location":"api/data_model/daemon/#monero.MoneroRpcPaymentInfo.credits","title":"credits: int | None instance-attribute","text":"If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
"},{"location":"api/data_model/daemon/#monero.MoneroRpcPaymentInfo.top_block_hash","title":"top_block_hash: str | None instance-attribute","text":"If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, None.
"},{"location":"api/data_model/daemon/#monero.MoneroRpcPaymentInfo.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader","title":"MoneroBlockHeader","text":" Bases: SerializableStruct
Models a Monero block header which contains information about the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.cumulative_difficulty_high","title":"cumulative_difficulty_high: int | None instance-attribute","text":"Cumulative difficulty of all blocks up to the block in the reply.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.cumulative_difficulty_low","title":"cumulative_difficulty_low: int | None instance-attribute","text":"Cumulative difficulty of all blocks up to the block in the reply.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.depth","title":"depth: int | None instance-attribute","text":"The number of blocks succeeding this block on the blockchain. A larger number means an older block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"The strength of the Monero network based on mining power.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"The strength of the Monero network based on mining power.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.hash","title":"hash: str | None instance-attribute","text":"The hash of this block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.height","title":"height: int | None instance-attribute","text":"The number of blocks preceding this block on the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.long_term_weight","title":"long_term_weight: int | None instance-attribute","text":"The long term block weight, based on the median weight of the preceding 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.major_version","title":"major_version: int | None instance-attribute","text":"The major version of the monero protocol at this block height.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.miner_tx_hash","title":"miner_tx_hash: str | None instance-attribute","text":"The hash of this block's coinbase transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.minor_version","title":"minor_version: int | None instance-attribute","text":"The minor version of the monero protocol at this block height.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.nonce","title":"nonce: int | None instance-attribute","text":"A cryptographic random one-time number used in mining a Monero block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.num_txs","title":"num_txs: int | None instance-attribute","text":"Number of transactions included in this block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.orphan_status","title":"orphan_status: bool | None instance-attribute","text":"If True, this block is not part of the longest chain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.pow_hash","title":"pow_hash: str | None instance-attribute","text":"The hash, as a hexadecimal string, calculated from the block as proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.prev_hash","title":"prev_hash: str | None instance-attribute","text":"The hash of the block immediately preceding this block in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.reward","title":"reward: int | None instance-attribute","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.size","title":"size: int | None instance-attribute","text":"Backward compatibility, same as weight, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.timestamp","title":"timestamp: int | None instance-attribute","text":"The unix time at which the block was recorded into the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.weight","title":"weight: int | None instance-attribute","text":"The adjusted block size, in bytes. This is the raw size, plus a positive adjustment for any Bulletproof transactions with more than 2 outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.__init__","title":"__init__()","text":"Initialize a Monero block header.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.copy","title":"copy()","text":"Copy current block header.
Returns:
Type Description MoneroBlockHeader copied block header.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockHeader.merge","title":"merge(other)","text":"Merge current block header with another one.
Raises:
Type Description Exception on reconciliation error.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock","title":"MoneroBlock","text":" Bases: MoneroBlockHeader
Models a Monero block in the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.hex","title":"hex: str | None instance-attribute","text":"Hexadecimal blob of block information.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.miner_tx","title":"miner_tx: MoneroTx | None instance-attribute","text":"Miner transaction information.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.tx_hashes","title":"tx_hashes: list[str] instance-attribute","text":"List of hashes of non-coinbase transactions in the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.txs","title":"txs: list[MoneroTx] instance-attribute","text":"List of non-coinbase transactions in the block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.__init__","title":"__init__()","text":"Initialize a Monero block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.copy","title":"copy()","text":"Copy current block.
Returns:
Type Description MoneroBlock copied block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlock.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlocksByHashResult","title":"MoneroGetBlocksByHashResult","text":" Bases: SerializableStruct
Models the result of getting blocks by hash.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlocksByHashResult.blocks","title":"blocks: list[MoneroBlock] instance-attribute","text":"The retrieved blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlocksByHashResult.current_height","title":"current_height: int | None instance-attribute","text":"The daemon's chain height at request time.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlocksByHashResult.__init__","title":"__init__()","text":"Initialize a Monero get blocks by hash result.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlocksByHashResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult","title":"MoneroGetBlockHashesResult","text":" Bases: SerializableStruct
Models the result of getting block hashes.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult.current_height","title":"current_height: int | None instance-attribute","text":"The daemon's chain height at request time.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult.hashes","title":"hashes: list[str] instance-attribute","text":"The requested block hashes, starting at (and including) the last block in common with the request.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult.start_height","title":"start_height: int | None instance-attribute","text":"The height of the first hash in hashes.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult.__init__","title":"__init__()","text":"Initialize a Monero get block hashes result.
"},{"location":"api/data_model/daemon/#monero.MoneroGetBlockHashesResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroTx","title":"MoneroTx","text":" Bases: SerializableStruct
Models a Monero transaction on the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.DEFAULT_PAYMENT_ID","title":"DEFAULT_PAYMENT_ID: str instance-attribute","text":"Default tx payment id
"},{"location":"api/data_model/daemon/#monero.MoneroTx.block","title":"block: MoneroBlock | None instance-attribute","text":"Block including the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.common_tx_sets","title":"common_tx_sets: str | None instance-attribute","text":"A hexadecimal string representing a set of unsigned transactions, or a set of signing keys used in a multisig transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.extra","title":"extra: list[int] instance-attribute","text":"Usually called the payment ID but can be used to include any random 32 bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.fee","title":"fee: int | None instance-attribute","text":"The amount of the mining fee included in the transaction, in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.full_hex","title":"full_hex: str | None instance-attribute","text":"Full transaction information as a hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.hash","title":"hash: str | None instance-attribute","text":"The transaction hash.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.in_tx_pool","title":"in_tx_pool: bool | None instance-attribute","text":"States if the transaction is in pool (True) or included in a block (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.inputs","title":"inputs: list[MoneroOutput] instance-attribute","text":"List of inputs into transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_confirmed","title":"is_confirmed: bool | None instance-attribute","text":"States if the transaction included in a block (True) or is in pool (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_double_spend_seen","title":"is_double_spend_seen: bool | None instance-attribute","text":"States if the transaction is a double-spend (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_failed","title":"is_failed: bool | None instance-attribute","text":"Indicates if the transaction validation has previously failed.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_kept_by_block","title":"is_kept_by_block: bool | None instance-attribute","text":"States if the transaction was included in a block at least once (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_locked","title":"is_locked: bool | None instance-attribute","text":"Indicates if the transaction is locked.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_miner_tx","title":"is_miner_tx: bool | None instance-attribute","text":"States if the transaction is a coinbase-transaction (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.is_relayed","title":"is_relayed: bool | None instance-attribute","text":"States if the transaction was relayed (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.key","title":"key: str | None instance-attribute","text":"The transaction key.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_failed_hash","title":"last_failed_hash: str | None instance-attribute","text":"If the transaction validation has previously failed, this tells the previous transaction hash.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_failed_height","title":"last_failed_height: int | None instance-attribute","text":"If the transaction validation has previously failed, this tells at what height that occurred.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.last_relayed_timestamp","title":"last_relayed_timestamp: int | None instance-attribute","text":"Last unix time at which the transaction has been relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.max_used_block_hash","title":"max_used_block_hash: str | None instance-attribute","text":"Tells the hash of the most recent block with an output used in this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.max_used_block_height","title":"max_used_block_height: int | None instance-attribute","text":"Tells the height of the most recent block with an output used in this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.metadata","title":"metadata: str | None instance-attribute","text":"Transaction metadata.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.num_confirmations","title":"num_confirmations: int | None instance-attribute","text":"Number of network confirmations.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.output_indices","title":"output_indices: list[int] instance-attribute","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.outputs","title":"outputs: list[MoneroOutput] instance-attribute","text":"Transaction outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.payment_id","title":"payment_id: str | None instance-attribute","text":"Payment ID for this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.prunable_hash","title":"prunable_hash: str | None instance-attribute","text":"Keccak-256 hash of the prunable portion of the block.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.prunable_hex","title":"prunable_hex: str | None instance-attribute","text":"Prunable block encoded as a hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.pruned_hex","title":"pruned_hex: str | None instance-attribute","text":"Pruned block encoded as hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.rct_sig_prunable","title":"rct_sig_prunable: str | None instance-attribute","text":"Prunable ring signature.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.rct_signatures","title":"rct_signatures: str | None instance-attribute","text":"Signatures used in ring signature to hide the true origin of the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.received_timestamp","title":"received_timestamp: int | None instance-attribute","text":"Unix time at chich the transaction has been received.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.relay","title":"relay: bool | None instance-attribute","text":"States if this transaction should be relayed (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroTx.ring_size","title":"ring_size: int | None instance-attribute","text":"The ring size of this transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.signatures","title":"signatures: list[str] instance-attribute","text":"List of signatures used in ring signature to hide the true origin of the transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.size","title":"size: int | None instance-attribute","text":"Backward compatibility, same as weight, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.unlock_time","title":"unlock_time: int | None instance-attribute","text":"If not 0, this tells when the transaction outputs are spendable.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.version","title":"version: int | None instance-attribute","text":"Transaction version.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.weight","title":"weight: int | None instance-attribute","text":"The weight of this transaction in bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.__init__","title":"__init__()","text":"Initialize a new Monero transaction.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.__lt__","title":"__lt__(other)","text":"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 True if this tx sorts before other.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.copy","title":"copy()","text":"Copy current tx.
Returns:
Type Description MoneroTx tx copy.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.get_height","title":"get_height()","text":"Get the transaction height.
Returns:
Type Description int | None The height of the transaction, if known.
"},{"location":"api/data_model/daemon/#monero.MoneroTx.merge","title":"merge(other)","text":"Merge current tx with another one.
Parameters:
Name Type Description Default other MoneroTx other tx to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage","title":"MoneroKeyImage","text":" Bases: SerializableStruct
Models a Monero key image.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.hex","title":"hex: str | None instance-attribute","text":"The key image in hexadecimal format.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.signature","title":"signature: str | None instance-attribute","text":"The key image signature. None if not known.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.__init__","title":"__init__()","text":"Initialize a Monero key image.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.copy","title":"copy()","text":"Copy current key image.
Returns:
Type Description MoneroKeyImage key image copy.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.deserialize_key_images","title":"deserialize_key_images(key_images_json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImage.merge","title":"merge(other)","text":"Merge current key image with another one.
Parameters:
Name Type Description Default other MoneroKeyImage other key image to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroKeyImageSpentStatus","title":"MoneroKeyImageSpentStatus","text":" Bases: IntEnum
Enumerates the spent status of a key image.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImageSpentStatus.CONFIRMED","title":"CONFIRMED = 1 class-attribute instance-attribute","text":"1 Indicates that the key image is spent.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImageSpentStatus.NOT_SPENT","title":"NOT_SPENT = 0 class-attribute instance-attribute","text":"0 Indicates that the key image is not spent.
"},{"location":"api/data_model/daemon/#monero.MoneroKeyImageSpentStatus.TX_POOL","title":"TX_POOL = 2 class-attribute instance-attribute","text":"2 Indicates that the key image is in transaction pool.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput","title":"MoneroOutput","text":" Bases: SerializableStruct
Models a Monero transaction output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.index","title":"index: int | None instance-attribute","text":"Output index.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.key_image","title":"key_image: MoneroKeyImage | None instance-attribute","text":"The key image of the output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.mask","title":"mask: str | None instance-attribute","text":"The output commitment mask (pseudo-out blinding factor) as a hex string.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.ring_output_indices","title":"ring_output_indices: list[int] instance-attribute","text":"Indices of ring outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.stealth_public_key","title":"stealth_public_key: str | None instance-attribute","text":"The public key of the output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.tx","title":"tx: MoneroTx instance-attribute","text":"The transaction related to this output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.__init__","title":"__init__()","text":"Initialize a Monero output.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.copy","title":"copy()","text":"Copy current output.
Returns:
Type Description MoneroOutput output copy.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroOutput.merge","title":"merge(other)","text":"Merge current output wallet with another output.
Parameters:
Name Type Description Default other MoneroOutput other output to merge with.
required"},{"location":"api/data_model/daemon/#monero.MoneroAltChain","title":"MoneroAltChain","text":" Bases: SerializableStruct
Models an alternative chain seen by the node.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.block_hashes","title":"block_hashes: list[str] instance-attribute","text":"List of all block hashes in the alternative chain that are not in the main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"Cumulative difficulty of all blocks in the alternative chain (Most-significant 64 bits of the 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"Cumulative difficulty of all blocks in the alternative chain (Least-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.height","title":"height: int | None instance-attribute","text":"The block height of the first diverging block of this alternative chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.length","title":"length: int | None instance-attribute","text":"The length in blocks of this alternative chain, after divergence.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.main_chain_parent_block_hash","title":"main_chain_parent_block_hash: str | None instance-attribute","text":"The hash of the greatest height block that is shared between the alternative chain and the main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.__init__","title":"__init__()","text":"Initialize a Monero alt chain info.
"},{"location":"api/data_model/daemon/#monero.MoneroAltChain.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBan","title":"MoneroBan","text":" Bases: SerializableStruct
Model a Monero banhammer.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.host","title":"host: str | None instance-attribute","text":"Host ban.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.ip","title":"ip: int | None instance-attribute","text":"IP ban.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.is_banned","title":"is_banned: bool | None instance-attribute","text":"Indicates if ban on the host is active (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroBan.seconds","title":"seconds: int | None instance-attribute","text":"Indicates the duration of the ban in seconds.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.__init__","title":"__init__()","text":"Initialize a Monero banhammer.
"},{"location":"api/data_model/daemon/#monero.MoneroBan.deserialize","title":"deserialize(json) staticmethod","text":"Deserialize a MoneroBan from a JSON string.
Parameters:
Name Type Description Default json str MoneroBan in JSON format.
required Returns:
Type Description MoneroBan deserialized instance.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult","title":"MoneroPruneResult","text":" Bases: SerializableStruct
Models the result of pruning the blockchain.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.is_pruned","title":"is_pruned: bool | None instance-attribute","text":"Indicates if blockchain is pruned.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.pruning_seed","title":"pruning_seed: int | None instance-attribute","text":"Blockheight at which pruning began.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.__init__","title":"__init__()","text":"Initialize a Monero prune result.
"},{"location":"api/data_model/daemon/#monero.MoneroPruneResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus","title":"MoneroMiningStatus","text":" Bases: SerializableStruct
Models a Monero daemon mining status.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.address","title":"address: str | None instance-attribute","text":"Account address daemon is mining to. None if not mining.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.is_active","title":"is_active: bool | None instance-attribute","text":"Indicates if mining is enabled.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.is_background","title":"is_background: bool | None instance-attribute","text":"Indicates if mining is running in background.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.num_threads","title":"num_threads: int | None instance-attribute","text":"Number of running mining threads.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.speed","title":"speed: int | None instance-attribute","text":"Mining power in hashes per seconds.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.__init__","title":"__init__()","text":"Initialize a Monero daemon mining status.
"},{"location":"api/data_model/daemon/#monero.MoneroMiningStatus.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum","title":"MoneroMinerTxSum","text":" Bases: SerializableStruct
Model for the sum of miner emissions and fees.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.emission_sum_high","title":"emission_sum_high: int | None instance-attribute","text":"The new coins emitted in atomic-units. (Most significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.emission_sum_low","title":"emission_sum_low: int | None instance-attribute","text":"The new coins emitted in atomic-units. (Least significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.fee_sum_high","title":"fee_sum_high: int | None instance-attribute","text":"The sum of fees in atomic-units. (Most significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.fee_sum_low","title":"fee_sum_low: int | None instance-attribute","text":"The sum of fees in atomic-units. (Least significant 64 bits for 128 bit integer)
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.__init__","title":"__init__()","text":"Initialize a Monero miner transaction sum.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerTxSum.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData","title":"MoneroMinerData","text":" Bases: MoneroRpcPaymentInfo
Data needed to construct a block template for mining, e.g. for a pool that assembles its own block templates.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.already_generated_coins","title":"already_generated_coins: int | None instance-attribute","text":"The total coins emitted so far, in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.difficulty","title":"difficulty: str | None instance-attribute","text":"The next block's difficulty as a hex string, e.g. \"0x1f4\".
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.height","title":"height: int | None instance-attribute","text":"The height of the next block to mine.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.major_version","title":"major_version: int | None instance-attribute","text":"The next block's major version.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.median_weight","title":"median_weight: int | None instance-attribute","text":"The median block weight used for penalty calculations.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.prev_hash","title":"prev_hash: str | None instance-attribute","text":"The hash of the previous (current top) block.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.seed_hash","title":"seed_hash: str | None instance-attribute","text":"The seed hash used to select the RandomX dataset/cache.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.tx_pool_backlog","title":"tx_pool_backlog: list[MoneroTx] instance-attribute","text":"The transactions currently in the pool eligible for the next block.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.__init__","title":"__init__()","text":"Initialize a Monero miner data.
"},{"location":"api/data_model/daemon/#monero.MoneroMinerData.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate","title":"MoneroBlockTemplate","text":" Bases: SerializableStruct
Monero block template to mine.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.block_hashing_blob","title":"block_hashing_blob: str | None instance-attribute","text":"Blob on which to try to find a valid nonce.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.block_template_blob","title":"block_template_blob: str | None instance-attribute","text":"Blob on which to try to mine a new block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"Network difficulty (Most-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"Network difficulty (Least-significant 64 bits of 128-bit integer).
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.expected_reward","title":"expected_reward: int | None instance-attribute","text":"Coinbase reward expected to be received if block is successfully mined.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.height","title":"height: int | None instance-attribute","text":"Height on which to mine.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.next_seed_hash","title":"next_seed_hash: str | None instance-attribute","text":"Hash of the next block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.prev_hash","title":"prev_hash: str | None instance-attribute","text":"Hash of the most recent block on which to mine the next block.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.reserved_offset","title":"reserved_offset: int | None instance-attribute","text":"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).
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.seed_hash","title":"seed_hash: str | None instance-attribute","text":"Hash of block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.seed_height","title":"seed_height: int | None instance-attribute","text":"Height of block to use as seed for Random-X proof-of-work.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.__init__","title":"__init__()","text":"Initialize a Monero block template.
"},{"location":"api/data_model/daemon/#monero.MoneroBlockTemplate.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroGenerateBlocksResult","title":"MoneroGenerateBlocksResult","text":" Bases: SerializableStruct
Models the result of generating blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroGenerateBlocksResult.block_hashes","title":"block_hashes: list[str] instance-attribute","text":"Generated block hashes.
"},{"location":"api/data_model/daemon/#monero.MoneroGenerateBlocksResult.height","title":"height: int | None instance-attribute","text":"New chain height.
"},{"location":"api/data_model/daemon/#monero.MoneroGenerateBlocksResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan","title":"MoneroConnectionSpan","text":" Bases: SerializableStruct
Monero daemon connection span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.connection_id","title":"connection_id: str | None instance-attribute","text":"Id of the P2P connection this span of blocks was (or is being) downloaded over.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.num_blocks","title":"num_blocks: int | None instance-attribute","text":"Number of blocks in this span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.rate","title":"rate: int | None instance-attribute","text":"Download rate for this span, in bytes per second.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.remote_address","title":"remote_address: str | None instance-attribute","text":"Peer address the node is downloading (or has downloaded) than span from.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.size","title":"size: int | None instance-attribute","text":"Total number of bytes in that span's blocks (including txes).
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.speed","title":"speed: int | None instance-attribute","text":"Relative speed of this connection as a percentage (0-100) of the fastest peer currently downloading blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.start_height","title":"start_height: int | None instance-attribute","text":"Block height of the first block in that span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.__init__","title":"__init__()","text":"Initialize a Monero connection span.
"},{"location":"api/data_model/daemon/#monero.MoneroConnectionSpan.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer","title":"MoneroPeer","text":" Bases: SerializableStruct
Models a peer to the daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.address","title":"address: str | None instance-attribute","text":"The peer's address, actually IPv4 & port.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.avg_download","title":"avg_download: int | None instance-attribute","text":"Average bytes of data downloaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.avg_upload","title":"avg_upload: int | None instance-attribute","text":"Average bytes of data uploaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.connection_type","title":"connection_type: MoneroConnectionType | None instance-attribute","text":"Type of peer connection.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.current_download","title":"current_download: int | None instance-attribute","text":"Current bytes downloaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.current_upload","title":"current_upload: int | None instance-attribute","text":"Current bytes uploaded by node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.hash","title":"hash: str | None instance-attribute","text":"Peer hash.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.height","title":"height: int | None instance-attribute","text":"The peer blockchain height.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.host","title":"host: str | None instance-attribute","text":"The peer host.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.id","title":"id: str | None instance-attribute","text":"The node's ID on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Indicates if peer is pulling blocks from node.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_local_host","title":"is_local_host: bool | None instance-attribute","text":"Indicates if peer is localhost.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_local_ip","title":"is_local_ip: bool | None instance-attribute","text":"Indicates if peer has a local ip address.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.is_online","title":"is_online: bool | None instance-attribute","text":"Indicates if the peer is online.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.last_seen_timestamp","title":"last_seen_timestamp: int | None instance-attribute","text":"Last activity timestamp of this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.live_time","title":"live_time: int | None instance-attribute","text":"Length of time the peer has been online.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_receives","title":"num_receives: int | None instance-attribute","text":"Total number of messages received from this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_sends","title":"num_sends: int | None instance-attribute","text":"Total number of messages sent to this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.num_support_flags","title":"num_support_flags: int | None instance-attribute","text":"Support flags number.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.port","title":"port: int | None instance-attribute","text":"The port that the node is using to connect to the network.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.pruning_seed","title":"pruning_seed: int | None instance-attribute","text":"Block height at which pruning began.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.receive_idle_time","title":"receive_idle_time: int | None instance-attribute","text":"Seconds since last data was received from this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.rpc_credits_per_hash","title":"rpc_credits_per_hash: int | None instance-attribute","text":"Credits for every hash calculated by client.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.rpc_port","title":"rpc_port: int | None instance-attribute","text":"Peer RPC port.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.send_idle_time","title":"send_idle_time: int | None instance-attribute","text":"Seconds since the last data sent to this peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.state","title":"state: str | None instance-attribute","text":"Peer state.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.__init__","title":"__init__()","text":"Initialize a new Monero peer.
"},{"location":"api/data_model/daemon/#monero.MoneroPeer.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult","title":"MoneroSubmitTxResult","text":" Bases: MoneroRpcPaymentInfo
Models the result from submitting a tx to a daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_invalid_input","title":"has_invalid_input: bool | None instance-attribute","text":"Indicates if the transaction has an invalid input.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_invalid_output","title":"has_invalid_output: bool | None instance-attribute","text":"Indicates if the transaction has an invalid output.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.has_too_few_outputs","title":"has_too_few_outputs: bool | None instance-attribute","text":"Indicates if the transaction has too few outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_double_spend","title":"is_double_spend: bool | None instance-attribute","text":"Indicates if the transaction is double spend.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_fee_too_low","title":"is_fee_too_low: bool | None instance-attribute","text":"Indicates if the transaction fee is too low.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_good","title":"is_good: bool | None instance-attribute","text":"Indicates if the submission of the transaction was successfull.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_mixin_too_low","title":"is_mixin_too_low: bool | None instance-attribute","text":"Indicates if the transaction mixin count is too low.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_nonzero_unlock_time","title":"is_nonzero_unlock_time: bool | None instance-attribute","text":"Indicates if the transaction was rejected for carrying a non-zero per-transaction unlock time, which the daemon no longer accepts into the pool.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_overspend","title":"is_overspend: bool | None instance-attribute","text":"Indicates if the transaction uses more money than available
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_relayed","title":"is_relayed: bool | None instance-attribute","text":"Indicates if the transaction has been relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_too_big","title":"is_too_big: bool | None instance-attribute","text":"Indicates if the transaction size is too big.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.is_tx_extra_too_big","title":"is_tx_extra_too_big: bool | None instance-attribute","text":"Indicates if the transaction extra size is too big.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.reason","title":"reason: str | None instance-attribute","text":"Additional information. Currently empty or Not relayed if transaction was accepted but not relayed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.sanity_check_failed","title":"sanity_check_failed: bool | None instance-attribute","text":"Indicates if the transaction sanity check has failed.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.__init__","title":"__init__()","text":"Initialize a new submit transaction result.
"},{"location":"api/data_model/daemon/#monero.MoneroSubmitTxResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroAuxiliaryPow","title":"MoneroAuxiliaryPow","text":" Bases: SerializableStruct
Identifies an auxiliary chain's block by id and proof-of-work hash for merge mining.
"},{"location":"api/data_model/daemon/#monero.MoneroAuxiliaryPow.hash","title":"hash: str | None instance-attribute","text":"The auxiliary block's proof-of-work hash.
"},{"location":"api/data_model/daemon/#monero.MoneroAuxiliaryPow.id","title":"id: str | None instance-attribute","text":"The auxiliary chain id.
"},{"location":"api/data_model/daemon/#monero.MoneroAuxiliaryPow.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult","title":"MoneroAddAuxiliaryPowResult","text":" Bases: MoneroRpcPaymentInfo
Models the result of adding auxiliary proof-of-work to a block template for merge mining.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.aux_pow","title":"aux_pow: list[MoneroAuxiliaryPow] instance-attribute","text":"The (possibly reordered) auxiliary proof-of-work entries.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.block_hashing_blob","title":"block_hashing_blob: str | None instance-attribute","text":"The updated block hashing blob.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.block_template_blob","title":"block_template_blob: str | None instance-attribute","text":"The updated block template blob.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.merkle_root","title":"merkle_root: str | None instance-attribute","text":"The Merkle root committing to the auxiliary blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.merkle_tree_depth","title":"merkle_tree_depth: int | None instance-attribute","text":"The depth of the auxiliary Merkle tree.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.__init__","title":"__init__()","text":"Initialize a Monero add auxiliary proof-of-work result.
"},{"location":"api/data_model/daemon/#monero.MoneroAddAuxiliaryPowResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroTxBacklogEntry","title":"MoneroTxBacklogEntry","text":"TODO
"},{"location":"api/data_model/daemon/#monero.MoneroTxBacklogEntry.__init__","title":"__init__()","text":"Intialize a new tx backlog entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry","title":"MoneroOutputDistributionEntry","text":" Bases: SerializableStruct
Models a Monero output distribution entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.base","title":"base: int | None instance-attribute","text":"The total number of outputs of amount in the chain before, not including, the block at start_height.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.distribution","title":"distribution: list[int] instance-attribute","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.start_height","title":"start_height: int | None instance-attribute","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.__init__","title":"__init__()","text":"Initialize a Monero output distribution entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputDistributionEntry.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry","title":"MoneroOutputHistogramEntry","text":" Bases: SerializableStruct
Models a Monero output histogram entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.amount","title":"amount: int | None instance-attribute","text":"Output amount in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.num_instances","title":"num_instances: int | None instance-attribute","text":"Number of outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.recent_instances","title":"recent_instances: int | None instance-attribute","text":"Number of recent outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.unlocked_instances","title":"unlocked_instances: int | None instance-attribute","text":"Number of unlocked outputs.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.__init__","title":"__init__()","text":"Initialize a Monero output histogram entry.
"},{"location":"api/data_model/daemon/#monero.MoneroOutputHistogramEntry.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats","title":"MoneroTxPoolStats","text":" Bases: SerializableStruct
Models transaction pool statistics.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_max","title":"bytes_max: int | None instance-attribute","text":"Max transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_med","title":"bytes_med: int | None instance-attribute","text":"Median transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_min","title":"bytes_min: int | None instance-attribute","text":"Min transaction size in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.bytes_total","title":"bytes_total: int | None instance-attribute","text":"Total size of all transactions in pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.fee_total","title":"fee_total: int | None instance-attribute","text":"The sum of the fees for all transactions currently in the transaction pool atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.histo","title":"histo: dict[int, int] instance-attribute","text":"Txs histogram (key for bytes, value for txs).
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.histo98pc","title":"histo98pc: int | None instance-attribute","text":"The time 98% of txes are younger than.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num10m","title":"num10m: int | None instance-attribute","text":"Number of transactions in pool for more than 10 minutes.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_double_spends","title":"num_double_spends: int | None instance-attribute","text":"Number of double spend transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_failing","title":"num_failing: int | None instance-attribute","text":"Number of failing transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_not_relayed","title":"num_not_relayed: int | None instance-attribute","text":"Number of non-relayed transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.num_txs","title":"num_txs: int | None instance-attribute","text":"Total number of transactions.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.oldest_timestamp","title":"oldest_timestamp: int | None instance-attribute","text":"Unix time of the oldest transaction in the pool.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.__init__","title":"__init__()","text":"Initialize a Monero transaction pool statistics.
"},{"location":"api/data_model/daemon/#monero.MoneroTxPoolStats.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult","title":"MoneroDaemonUpdateCheckResult","text":" Bases: SerializableStruct
Models the result of checking for a daemon update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.auto_uri","title":"auto_uri: str | None instance-attribute","text":"URL automatically generated by the daemon to download the update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.hash","title":"hash: str | None instance-attribute","text":"Integrity check hash.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.is_update_available","title":"is_update_available: bool | None instance-attribute","text":"Indicates if an update is available to download.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.user_uri","title":"user_uri: str | None instance-attribute","text":"Alternative user URI.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.version","title":"version: str | None instance-attribute","text":"Version available for download.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.__init__","title":"__init__()","text":"Initialize a Monero update check result.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateCheckResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult","title":"MoneroDaemonUpdateDownloadResult","text":" Bases: MoneroDaemonUpdateCheckResult
Models the result of downloading a daemon update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult.download_path","title":"download_path: str | None instance-attribute","text":"Path to download the update.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult.__init__","title":"__init__()","text":"Initialize a Monero update download result.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonUpdateDownloadResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate","title":"MoneroFeeEstimate","text":" Bases: SerializableStruct
Models a Monero fee estimate.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.fee","title":"fee: int | None instance-attribute","text":"Amount of fees estimated per byte in atomic-units.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.fees","title":"fees: list[int] instance-attribute","text":"Represents the base fees at different priorities [slow, normal, fast, fastest].
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.quantization_mask","title":"quantization_mask: int | None instance-attribute","text":"Final fee should be rounded up to an even multiple of this value.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.__init__","title":"__init__()","text":"Initialize a Monero fee estimate.
"},{"location":"api/data_model/daemon/#monero.MoneroFeeEstimate.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo","title":"MoneroDaemonInfo","text":" Bases: MoneroRpcPaymentInfo
Models information got from a Monero daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.adjusted_timestamp","title":"adjusted_timestamp: int | None instance-attribute","text":"Current time approximated from chain data, as Unix time.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_size_limit","title":"block_size_limit: int | None instance-attribute","text":"Backward compatibility, same as block_weight_limit, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_size_median","title":"block_size_median: int | None instance-attribute","text":"Backward compatibility, same as block_weight_median, use that instead.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_weight_limit","title":"block_weight_limit: int | None instance-attribute","text":"Maximum allowed adjusted block size based on latest 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.block_weight_median","title":"block_weight_median: int | None instance-attribute","text":"Median adjusted block size of latest 100000 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.bootstrap_daemon_address","title":"bootstrap_daemon_address: str | None instance-attribute","text":"Bootstrap-node to give immediate usability to wallets while syncing by proxying RPC to it.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.cumulative_difficulty_high","title":"cumulative_difficulty_high: int | None instance-attribute","text":"Most-significant 64 bits of the 128-bit cumulative difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.cumulative_difficulty_low","title":"cumulative_difficulty_low: int | None instance-attribute","text":"Least-significant 64 bits of the 128-bit cumulative difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.database_size","title":"database_size: int | None instance-attribute","text":"The size of the blockchain database, in bytes.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.difficulty_high","title":"difficulty_high: int | None instance-attribute","text":"The most-significant 64 bits of the 128-bit network difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.difficulty_low","title":"difficulty_low: int | None instance-attribute","text":"The least-significant 64 bits of the 128-bit network difficulty.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.free_space","title":"free_space: int | None instance-attribute","text":"Available disk space on the node.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.height","title":"height: int | None instance-attribute","text":"Current length of longest chain known to daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.height_without_bootstrap","title":"height_without_bootstrap: int | None instance-attribute","text":"Current length of the local chain of the daemon.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_busy_syncing","title":"is_busy_syncing: bool | None instance-attribute","text":"States if new blocks are being added (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_offline","title":"is_offline: bool | None instance-attribute","text":"States if the node is offline (True) or online (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_regtest","title":"is_regtest: bool | None instance-attribute","text":"States if the node is running in regtest mode (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_restricted","title":"is_restricted: bool | None instance-attribute","text":"Indicates that the node RPC interface is restricted (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.is_synchronized","title":"is_synchronized: bool | None instance-attribute","text":"States if the node is synchronized (True) or not (False).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.network_type","title":"network_type: MoneroNetworkType | None instance-attribute","text":"Network type (MAINNET, TESTNET, or STAGENET).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_alt_blocks","title":"num_alt_blocks: int | None instance-attribute","text":"Number of alternative blocks to main chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_incoming_connections","title":"num_incoming_connections: int | None instance-attribute","text":"Number of peers connected to and pulling from your node.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_offline_peers","title":"num_offline_peers: int | None instance-attribute","text":"Number of peers that are marked as not reacheable on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_online_peers","title":"num_online_peers: int | None instance-attribute","text":"Number of peers that are marked as reacheble on the network.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_outgoing_connections","title":"num_outgoing_connections: int | None instance-attribute","text":"Number of peers that you are connected to and getting information from.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_rpc_connections","title":"num_rpc_connections: int | None instance-attribute","text":"Number of RPC client connected to the daemon (Including this RPC request).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_txs","title":"num_txs: int | None instance-attribute","text":"Total number of non-coinbase transactions in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.num_txs_pool","title":"num_txs_pool: int | None instance-attribute","text":"Number of transactions that have been broadcast but not included in a block.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.start_timestamp","title":"start_timestamp: int | None instance-attribute","text":"Start time of the daemon, as UNIX time.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.target","title":"target: int | None instance-attribute","text":"Current target for next proof of work.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.target_height","title":"target_height: int | None instance-attribute","text":"The height of the next block in the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.update_available","title":"update_available: bool | None instance-attribute","text":"States if a newer Monero software version is available.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.version","title":"version: str | None instance-attribute","text":"The version of the Monero software the node is running.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.was_bootstrap_ever_used","title":"was_bootstrap_ever_used: bool | None instance-attribute","text":"States if a bootstrap node has ever been used since the daemon started.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.__init__","title":"__init__()","text":"Initiliaze a Monero daemon info.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonInfo.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo","title":"MoneroDaemonSyncInfo","text":" Bases: MoneroRpcPaymentInfo
Models daemon synchronization information.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.height","title":"height: int | None instance-attribute","text":"Daemon blockchain height.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.next_needed_pruning_seed","title":"next_needed_pruning_seed: int | None instance-attribute","text":"The next pruning seed needed for pruned sync.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.overview","title":"overview: str | None instance-attribute","text":"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
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.peers","title":"peers: list[MoneroPeer] instance-attribute","text":"List of peers connected to the node
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.spans","title":"spans: list[MoneroConnectionSpan] instance-attribute","text":"Currently connected peers to download blocks from.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.target_height","title":"target_height: int | None instance-attribute","text":"Target height the node is syncing from (will be 0 if node is fully synced).
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.__init__","title":"__init__()","text":"Initialize a Monero daemon sync info.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonSyncInfo.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats","title":"MoneroDaemonNetworkStats","text":" Bases: MoneroRpcPaymentInfo
Models daemon network (bandwidth) statistics since the daemon started.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.start_time","title":"start_time: int | None instance-attribute","text":"Unix timestamp when the statistics window started.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.total_bytes_in","title":"total_bytes_in: int | None instance-attribute","text":"Total number of bytes received.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.total_bytes_out","title":"total_bytes_out: int | None instance-attribute","text":"Total number of bytes sent.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.total_packets_in","title":"total_packets_in: int | None instance-attribute","text":"Total number of packets received.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.total_packets_out","title":"total_packets_out: int | None instance-attribute","text":"Total number of packets sent.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.__init__","title":"__init__()","text":"Initialize a Monero daemon network stats.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonNetworkStats.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo","title":"MoneroHardForkInfo","text":" Bases: MoneroRpcPaymentInfo
Models a Monero look up information regarding hard fork voting and readiness.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.earliest_height","title":"earliest_height: int | None instance-attribute","text":"Block height at which hard fork would be enabled if voted in.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.is_enabled","title":"is_enabled: bool | None instance-attribute","text":"Tells if hard fork is enforced.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.num_votes","title":"num_votes: int | None instance-attribute","text":"Number of votes towards hard fork.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.state","title":"state: int | None instance-attribute","text":"Current hard fork state. 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.threshold","title":"threshold: int | None instance-attribute","text":"Minimum percent of votes to trigger hard fork. Default is 80.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.version","title":"version: int | None instance-attribute","text":"The major block version for the fork.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.voting","title":"voting: int | None instance-attribute","text":"Hard fork voting status.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.window","title":"window: int | None instance-attribute","text":"Number of blocks over which current votes are cast. Default is 10080 blocks.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.__init__","title":"__init__()","text":"Initialize a Monero hard fork info.
"},{"location":"api/data_model/daemon/#monero.MoneroHardForkInfo.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener","title":"MoneroDaemonListener","text":"Receives notifications as a daemon is updated.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.last_header","title":"last_header: MoneroBlockHeader | None instance-attribute","text":"Last block header added to the chain.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.__init__","title":"__init__()","text":"Initialize a Monero daemon listener.
"},{"location":"api/data_model/daemon/#monero.MoneroDaemonListener.on_block_header","title":"on_block_header(header)","text":"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"},{"location":"api/data_model/wallet/","title":"Wallet Data Model","text":""},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig","title":"MoneroWalletConfig","text":" Bases: SerializableStruct
Configures a wallet to create.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.account_lookahead","title":"account_lookahead: int | None instance-attribute","text":"Account index look ahead.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.is_multisig","title":"is_multisig: bool | None instance-attribute","text":"Indicates if the wallet is a multisignature wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.is_trusted_daemon","title":"is_trusted_daemon: bool | None instance-attribute","text":"Indicates whether the configured daemon connection should be treated as trusted.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.language","title":"language: str | None instance-attribute","text":"The wallet language.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.network_type","title":"network_type: MoneroNetworkType | None instance-attribute","text":"The wallet network type.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.password","title":"password: str | None instance-attribute","text":"The wallet password.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.path","title":"path: str | None instance-attribute","text":"The wallet path on file system.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.primary_address","title":"primary_address: str | None instance-attribute","text":"The wallet standard address.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.private_spend_key","title":"private_spend_key: str | None instance-attribute","text":"The wallet private spend key.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.private_view_key","title":"private_view_key: str | None instance-attribute","text":"The wallet private view key.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.regtest","title":"regtest: bool | None instance-attribute","text":"Indicates if wallet is regtest.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.restore_height","title":"restore_height: int | None instance-attribute","text":"The wallet restore height.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.save_current","title":"save_current: bool | None instance-attribute","text":"Save the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.seed","title":"seed: str | None instance-attribute","text":"The wallet mnemonic.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.seed_offset","title":"seed_offset: str | None instance-attribute","text":"The wallet custom seed offset.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.server","title":"server: MoneroRpcConnection | None instance-attribute","text":"The wallet RPC connection.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.subaddress_lookahead","title":"subaddress_lookahead: int | None instance-attribute","text":"Subaddress index look ahead.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.copy","title":"copy()","text":"Copy this wallet config.
Returns:
Type Description MoneroWalletConfig Copy of the wallet config.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletConfig.deserialize","title":"deserialize(config_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult","title":"MoneroSyncResult","text":" Bases: SerializableStruct
Models a result of syncing a wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult.num_blocks_fetched","title":"num_blocks_fetched: int instance-attribute","text":"Number of blocks fetched.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult.received_money","title":"received_money: bool instance-attribute","text":"Indicates if money was received.
"},{"location":"api/data_model/wallet/#monero.MoneroSyncResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress","title":"MoneroSubaddress","text":" Bases: SerializableStruct
Models a Monero subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.account_index","title":"account_index: int | None instance-attribute","text":"The subaddress account index.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.address","title":"address: str | None instance-attribute","text":"Public address.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.balance","title":"balance: int | None instance-attribute","text":"The subaddress balance.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.index","title":"index: int | None instance-attribute","text":"The subaddress index.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.is_used","title":"is_used: bool | None instance-attribute","text":"Indicates if subaddress has been used in receiving funds.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.label","title":"label: str | None instance-attribute","text":"The subaddress label.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.num_blocks_to_unlock","title":"num_blocks_to_unlock: int | None instance-attribute","text":"Number of blocks to unlock receveid outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.num_unspent_outputs","title":"num_unspent_outputs: int | None instance-attribute","text":"The number of unspent outputs in this subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.unlocked_balance","title":"unlocked_balance: int | None instance-attribute","text":"The subaddress unlocked balance.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.__init__","title":"__init__()","text":"Initialize a Monero subaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroSubaddress.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount","title":"MoneroAccount","text":" Bases: SerializableStruct
Models a Monero account.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.balance","title":"balance: int | None instance-attribute","text":"The account balance.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.index","title":"index: int | None instance-attribute","text":"The account index.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.primary_address","title":"primary_address: str | None instance-attribute","text":"The account primary address.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.subaddresses","title":"subaddresses: list[MoneroSubaddress] instance-attribute","text":"List of account subaddresses.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.tag","title":"tag: str | None instance-attribute","text":"The account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.unlocked_balance","title":"unlocked_balance: int | None instance-attribute","text":"The account unlocked balance.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.__init__","title":"__init__()","text":"Initialize a Monero account.
"},{"location":"api/data_model/wallet/#monero.MoneroAccount.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination","title":"MoneroDestination","text":" Bases: SerializableStruct
Models an outgoing transfer destination.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.address","title":"address: str | None instance-attribute","text":"Address of the receiver.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.amount","title":"amount: int | None instance-attribute","text":"Amount sent to this destination.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.copy","title":"copy()","text":"Copy current outgoing transfer destination.
Returns:
Type Description MoneroDestination outgoing transfer destination copy.
"},{"location":"api/data_model/wallet/#monero.MoneroDestination.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer","title":"MoneroTransfer","text":" Bases: SerializableStruct
Models a base transfer of funds to or from the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.account_index","title":"account_index: int | None instance-attribute","text":"Index of the account related to this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.amount","title":"amount: int | None instance-attribute","text":"Transfer amount in atomic-units.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.tx","title":"tx: MoneroTxWallet instance-attribute","text":"Related wallet transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.__init__","title":"__init__()","text":"Initialize a Monero transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.copy","title":"copy()","text":"Copy current transfer.
Returns:
Type Description MoneroTransfer transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.is_incoming","title":"is_incoming()","text":"Indicates if it is an incoming transfer (True) or not (False). Default None.
Returns:
Type Description bool | None True if current transfer is incoming, False if outgoing, None if unkown.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.is_outgoing","title":"is_outgoing()","text":"Indicates if it is an outgoing transfer (True) or not (False). Default None.
Returns:
Type Description bool | None True if current transfer is outgoing, False if incoming, None if unkown.
"},{"location":"api/data_model/wallet/#monero.MoneroTransfer.merge","title":"merge(other)","text":"Merge current transfer with another one.
Parameters:
Name Type Description Default other MoneroTransfer other transfer to merge with.
required"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer","title":"MoneroIncomingTransfer","text":" Bases: MoneroTransfer
Models an incoming transfer of funds to the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.address","title":"address: str | None instance-attribute","text":"The address that received funds within this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.num_suggested_confirmations","title":"num_suggested_confirmations: int | None instance-attribute","text":"The number of suggested confirmations before moving funds.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"The subaddress index that received funds within this transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.__init__","title":"__init__()","text":"Initialize a Monero incoming transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.__lt__","title":"__lt__(other)","text":"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 True if this transfer sorts before other.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.copy","title":"copy()","text":"Copy current incoming transfer.
Returns:
Type Description MoneroIncomingTransfer incoming transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroIncomingTransfer.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer","title":"MoneroOutgoingTransfer","text":" Bases: MoneroTransfer
Models an outgoing transfer of funds from the wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.addresses","title":"addresses: list[str] instance-attribute","text":"Addresses from which the transfer originated.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Outgoing transfer destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Subaddresses from which the transfer originated.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.copy","title":"copy()","text":"Copy current outgoing transfer.
Returns:
Type Description MoneroOutgoingTransfer outgoing transfer copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutgoingTransfer.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery","title":"MoneroTransferQuery","text":" Bases: MoneroTransfer
Configures a query to retrieve transfers.
All transfers are returned except those that do not meet the criteria defined in this query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.address","title":"address: str | None instance-attribute","text":"Select transfers involving particular address. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.addresses","title":"addresses: list[str] instance-attribute","text":"Select transfers involving particular addresses. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Select transfers involving particular destinations. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.has_destinations","title":"has_destinations: bool | None instance-attribute","text":"Filter transfers with or without destinations. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.incoming","title":"incoming: bool | None instance-attribute","text":"Filter incoming or outgoing transfers. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.outgoing","title":"outgoing: bool | None instance-attribute","text":"Filter incoming or outgoing transfers. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"Filter by subaddress index. None for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Select transfers involving particular subaddresses. Empty for all.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.tx_query","title":"tx_query: MoneroTxQuery | None instance-attribute","text":"Related transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.__init__","title":"__init__()","text":"Initialize a Monero transfer query.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.copy","title":"copy()","text":"Copy current transfer query.
Returns:
Type Description MoneroTransferQuery transfer query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.deserialize_from_block","title":"deserialize_from_block(transfer_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTransferQuery.meets_criteria","title":"meets_criteria(transfer, query_parent=True)","text":"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).
True Returns:
Type Description bool True if transfer meets all criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet","title":"MoneroOutputWallet","text":" Bases: MoneroOutput
Models a Monero output with wallet extensions.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.account_index","title":"account_index: int | None instance-attribute","text":"The index of the account that owns this output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.is_frozen","title":"is_frozen: bool | None instance-attribute","text":"Indicates if the output is frozen (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.is_spent","title":"is_spent: bool | None instance-attribute","text":"Indicates if the output is spent (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.subaddress_index","title":"subaddress_index: int | None instance-attribute","text":"The index of the subaddress that owns this output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.__init__","title":"__init__()","text":"Initialize a Monero wallet output.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.__lt__","title":"__lt__(other)","text":"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 True if this output sorts before other.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.copy","title":"copy()","text":"Copy current output wallet.
Returns:
Type Description MoneroOutputWallet output wallet copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputWallet.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery","title":"MoneroOutputQuery","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.max_amount","title":"max_amount: int | None instance-attribute","text":"Filter outputs above this amount.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.min_amount","title":"min_amount: int | None instance-attribute","text":"Filter outputs below this amount.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Subadress indices to select (empty for all).
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.tx_query","title":"tx_query: MoneroTxQuery | None property","text":"Related transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.__init__","title":"__init__()","text":"Initialize a Monero output query.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.copy","title":"copy()","text":"Copy current output query.
Returns:
Type Description MoneroOutputQuery output query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.deserialize_from_block","title":"deserialize_from_block(output_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.meets_criteria","title":"meets_criteria(output, query_parent=True)","text":"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 True if output meets all the criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroOutputQuery.set_tx_query","title":"set_tx_query(tx_query, output_query)","text":"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 True sets outputs query in tx_query, otherwise inputs query.
required"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet","title":"MoneroTxWallet","text":" Bases: MoneroTx
Models a Monero transaction in the context of a wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.change_address","title":"change_address: str | None instance-attribute","text":"Address to which the change amount of the transaction was sent.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.change_amount","title":"change_amount: int | None instance-attribute","text":"Change amount of the transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.extra_hex","title":"extra_hex: str | None instance-attribute","text":"Extra information about the transaction in hexadecimal format.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.incoming_transfers","title":"incoming_transfers: list[MoneroIncomingTransfer] instance-attribute","text":"List of incoming transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.input_sum","title":"input_sum: int | None instance-attribute","text":"Total input sum.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Indicates if the transaction has incoming transfers.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.is_outgoing","title":"is_outgoing: bool | None instance-attribute","text":"Indicated if the transaction has outgoing transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.note","title":"note: str | None instance-attribute","text":"Transaction note.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.num_dummy_outputs","title":"num_dummy_outputs: int | None instance-attribute","text":"Number of decoys of the transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.outgoing_transfer","title":"outgoing_transfer: MoneroOutgoingTransfer | None instance-attribute","text":"The outgoing transfer related to this transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.output_sum","title":"output_sum: int | None instance-attribute","text":"The total output amount sum originated from this transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.tx_set","title":"tx_set: MoneroTxSet | None instance-attribute","text":"Set of transactions related to current tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.__init__","title":"__init__()","text":"Initialize a new Monero tx wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.copy","title":"copy()","text":"Copy current tx wallet.
Returns:
Type Description MoneroTxWallet tx wallet copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.filter_inputs_wallet","title":"filter_inputs_wallet(query)","text":"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 query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.filter_outputs_wallet","title":"filter_outputs_wallet(query)","text":"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 query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.filter_transfers","title":"filter_transfers(query)","text":"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 query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.get_incoming_amount","title":"get_incoming_amount()","text":"Get total amount received in current tx.
Returns:
Type Description int total amount received in current wallet tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxWallet.get_outgoing_amount","title":"get_outgoing_amount()","text":"Get total amount spent in current tx.
Returns:
Type Description int total amount spent in current wallet tx.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery","title":"MoneroTxQuery","text":" Bases: MoneroTxWallet
Configures a query to retrieve transactions.
All transactions are returned except those that do not meet the criteria defined in this query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.has_payment_id","title":"has_payment_id: bool | None instance-attribute","text":"Get transactions that have a payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.hashes","title":"hashes: list[str] instance-attribute","text":"Get transactions by hashes.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.height","title":"height: int | None instance-attribute","text":"Get transactions by height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.include_outputs","title":"include_outputs: int | None instance-attribute","text":"Include outputs in transaction data.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.input_query","title":"input_query: MoneroOutputQuery | None instance-attribute","text":"Query to apply on transaction inputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.is_incoming","title":"is_incoming: bool | None instance-attribute","text":"Include incoming transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.is_outgoing","title":"is_outgoing: bool | None instance-attribute","text":"Include outgoing transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.max_height","title":"max_height: int | None instance-attribute","text":"Get transactions below max height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.min_height","title":"min_height: int | None instance-attribute","text":"Get transactions above max height.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.output_query","title":"output_query: MoneroOutputQuery | None instance-attribute","text":"Query to apply on transaction outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.payment_ids","title":"payment_ids: list[str] instance-attribute","text":"Get transactions with specific payment ids.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.transfer_query","title":"transfer_query: MoneroTransferQuery | None instance-attribute","text":"Query to apply on transaction wallet transfer.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.__init__","title":"__init__()","text":"Initiliaze a new Monero transaction query.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.copy","title":"copy()","text":"Copy current transaction query.
Returns:
Type Description MoneroTxQuery tx query copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.deserialize_from_block","title":"deserialize_from_block(tx_query_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxQuery.meets_criteria","title":"meets_criteria(tx, query_children=False)","text":"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 True if tx meets all criteria defined in this query, False otherwise.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet","title":"MoneroTxSet","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.multisig_tx_hex","title":"multisig_tx_hex: str | None instance-attribute","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.signed_tx_hex","title":"signed_tx_hex: str | None instance-attribute","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.txs","title":"txs: list[MoneroTxWallet] instance-attribute","text":"The structured transactions in this set (populated when the set is created locally or by describe_tx_set()).
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.unsigned_tx_hex","title":"unsigned_tx_hex: str | None instance-attribute","text":"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().
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.__init__","title":"__init__()","text":"Initialize a Monero transaction set.
"},{"location":"api/data_model/wallet/#monero.MoneroTxSet.deserialize","title":"deserialize(tx_set_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress","title":"MoneroIntegratedAddress","text":" Bases: SerializableStruct
Models a Monero integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.integrated_address","title":"integrated_address: str instance-attribute","text":"The integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.payment_id","title":"payment_id: str instance-attribute","text":"The payment id related to this integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.standard_address","title":"standard_address: str instance-attribute","text":"The standard address related to this integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.__init__","title":"__init__()","text":"Initialize a Monero integrated address.
"},{"location":"api/data_model/wallet/#monero.MoneroIntegratedAddress.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority","title":"MoneroTxPriority","text":" Bases: IntEnum
Enumerates Monero transaction priorities.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.DEFAULT","title":"DEFAULT = 0 class-attribute instance-attribute","text":"0 Default transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.ELEVATED","title":"ELEVATED = 3 class-attribute instance-attribute","text":"3 Elevated transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.NORMAL","title":"NORMAL = 2 class-attribute instance-attribute","text":"2 Normal transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxPriority.UNIMPORTANT","title":"UNIMPORTANT = 1 class-attribute instance-attribute","text":"1 Unimportant transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig","title":"MoneroTxConfig","text":" Bases: SerializableStruct
Configures a transaction to send, sweep, or create a payment URI.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.account_index","title":"account_index: int | None instance-attribute","text":"Account index to send funds from.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.address","title":"address: str | None instance-attribute","text":"Transaction address destination.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.amount","title":"amount: int | None instance-attribute","text":"Transaction amount.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.below_amount","title":"below_amount: int | None instance-attribute","text":"Ignore output amount below.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.can_split","title":"can_split: bool | None instance-attribute","text":"Indicates if transaction can be splitted in multiple transactions.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.destinations","title":"destinations: list[MoneroDestination] instance-attribute","text":"Transaction outgoing destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.fee","title":"fee: int | None instance-attribute","text":"Transaction fee.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.key_image","title":"key_image: str | None instance-attribute","text":"Use a particular key image as input for transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.note","title":"note: str | None instance-attribute","text":"Transaction note.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.payment_id","title":"payment_id: str | None instance-attribute","text":"Transaction payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.priority","title":"priority: MoneroTxPriority | None instance-attribute","text":"Transaction priority.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.recipient_name","title":"recipient_name: str | None instance-attribute","text":"Recipient name.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.relay","title":"relay: bool | None instance-attribute","text":"Indicates if transaction should be relayed (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.ring_size","title":"ring_size: int | None instance-attribute","text":"Transaction ring size
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.subaddress_indices","title":"subaddress_indices: list[int] instance-attribute","text":"Account subaddresses indices to send funds from.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.subtract_fee_from","title":"subtract_fee_from: list[int] instance-attribute","text":"Subtract fee from outputs.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.sweep_each_subaddress","title":"sweep_each_subaddress: bool | None instance-attribute","text":"Sweep each wallet subbaddress.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.copy","title":"copy()","text":"Copy current tx config.
Returns:
Type Description MoneroTxConfig tx config copy.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.deserialize","title":"deserialize(config_json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.get_normalized_destinations","title":"get_normalized_destinations()","text":"Get all destinations set in current tx config.
Returns:
Type Description list[MoneroDestination] normalized tx config destinations.
"},{"location":"api/data_model/wallet/#monero.MoneroTxConfig.set_address","title":"set_address(address)","text":"Set the address of a single-destination configuration.
Parameters:
Name Type Description Default address str the address to set for the single destination.
required"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageExportResult","title":"MoneroKeyImageExportResult","text":" Bases: SerializableStruct
Models results from exporting key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageExportResult.key_images","title":"key_images: list[MoneroKeyImage] instance-attribute","text":"The exported key images, one per owned output starting at offset.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageExportResult.offset","title":"offset: int | None instance-attribute","text":"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().
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageExportResult.__init__","title":"__init__()","text":"Initialize a Monero key image export result.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageExportResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult","title":"MoneroKeyImageImportResult","text":" Bases: SerializableStruct
Models results from importing key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.height","title":"height: int | None instance-attribute","text":"Height at which the last key image was imported. Can be 0 if blockchain height is not known.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.spent_amount","title":"spent_amount: int | None instance-attribute","text":"Amount (in atomic-units) spent from those key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.unspent_amount","title":"unspent_amount: int | None instance-attribute","text":"Amount (in atomic-units) still available from those key images.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.__init__","title":"__init__()","text":"Initialize a Monero key image import result.
"},{"location":"api/data_model/wallet/#monero.MoneroKeyImageImportResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType","title":"MoneroMessageSignatureType","text":" Bases: IntEnum
Enumerates the type of a Monero message signature.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType.SIGN_WITH_SPEND_KEY","title":"SIGN_WITH_SPEND_KEY = 0 class-attribute instance-attribute","text":"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
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureType.SIGN_WITH_VIEW_KEY","title":"SIGN_WITH_VIEW_KEY = 1 class-attribute instance-attribute","text":"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
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult","title":"MoneroMessageSignatureResult","text":" Bases: SerializableStruct
Models results from message verification.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.is_good","title":"is_good: bool instance-attribute","text":"Indicates if the message verification was successful.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.is_old","title":"is_old: bool instance-attribute","text":"Indicates if the message verification used old monero software.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.signature_type","title":"signature_type: MoneroMessageSignatureType instance-attribute","text":"Signature type used in the message verification.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.version","title":"version: int instance-attribute","text":"Message signature version.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.__init__","title":"__init__()","text":"Initialize a Monero message signature result.
"},{"location":"api/data_model/wallet/#monero.MoneroMessageSignatureResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck","title":"MoneroCheck","text":" Bases: SerializableStruct
Base model for results from checking a transaction or reserve proof.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck.is_good","title":"is_good: bool instance-attribute","text":"Indicates if check was successfull.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck.__init__","title":"__init__()","text":"Initialize a Monero check.
"},{"location":"api/data_model/wallet/#monero.MoneroCheck.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx","title":"MoneroCheckTx","text":" Bases: MoneroCheck
Models the results from checking a transaction key.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.in_tx_pool","title":"in_tx_pool: bool | None instance-attribute","text":"States if the transaction is in pool (True) or included in a block (False)
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.num_confirmations","title":"num_confirmations: int | None instance-attribute","text":"Transaction network confirmations.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.received_amount","title":"received_amount: int | None instance-attribute","text":"Amount received in the transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.__init__","title":"__init__()","text":"Initialize a Monero transaction check.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckTx.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve","title":"MoneroCheckReserve","text":" Bases: MoneroCheck
Models the results from checking a reserve proof.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.total_amount","title":"total_amount: int | None instance-attribute","text":"The reserve total amount.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.unconfirmed_spent_amount","title":"unconfirmed_spent_amount: int | None instance-attribute","text":"The reserve unconfirmed spent amount.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.__init__","title":"__init__()","text":"Initialize a Monero reserve check.
"},{"location":"api/data_model/wallet/#monero.MoneroCheckReserve.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo","title":"MoneroMultisigInfo","text":" Bases: SerializableStruct
Models information about a multisig wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.is_multisig","title":"is_multisig: bool instance-attribute","text":"Indicates if the wallet is multisignature (True), or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.is_ready","title":"is_ready: bool instance-attribute","text":"Indicates if the wallet is ready to support multisignature operations (True) or not (False).
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.num_participants","title":"num_participants: int instance-attribute","text":"Number of participants of the multisignature wallet.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.threshold","title":"threshold: int instance-attribute","text":"Number of participants need in order to sign a transaction.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.__init__","title":"__init__()","text":"Initialize a Monero multisignature info.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInfo.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult","title":"MoneroMultisigInitResult","text":" 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.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.address","title":"address: str | None instance-attribute","text":"The multisignature wallet address.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.multisig_hex","title":"multisig_hex: str | None instance-attribute","text":"The multisignature hex to share with other participants.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.__init__","title":"__init__()","text":"Initialize a Monero multisignature initializing result.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigInitResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult","title":"MoneroMultisigSignResult","text":" Bases: SerializableStruct
Models the result of signing multisig tx hex.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.signed_multisig_tx_hex","title":"signed_multisig_tx_hex: str | None instance-attribute","text":"Multisig transaction in hex format.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.tx_hashes","title":"tx_hashes: list[str] instance-attribute","text":"List of transaction hash.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.__init__","title":"__init__()","text":"Initialize a Monero multisignature signature result.
"},{"location":"api/data_model/wallet/#monero.MoneroMultisigSignResult.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry","title":"MoneroAddressBookEntry","text":" Bases: SerializableStruct
Monero address book entry model.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.address","title":"address: str | None instance-attribute","text":"The book entry address.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.description","title":"description: str | None instance-attribute","text":"The book entry description.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.index","title":"index: int | None instance-attribute","text":"The book entry index.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.payment_id","title":"payment_id: str | None instance-attribute","text":"The book entry payment id.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressBookEntry.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType","title":"MoneroAddressType","text":" Bases: IntEnum
Models a Monero public address type_.
.. _Monero public address type: https://docs.getmonero.org/public-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.INTEGRATED_ADDRESS","title":"INTEGRATED_ADDRESS = 1 class-attribute instance-attribute","text":"1 Indicates that the Monero address format is integrated_.
.. _integrated: https://docs.getmonero.org/public-address/integrated-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.PRIMARY_ADDRESS","title":"PRIMARY_ADDRESS = 0 class-attribute instance-attribute","text":"0 Indicates that the Monero address format is standard_, also known as primary.
.. _standard: https://docs.getmonero.org/public-address/standard-address/
"},{"location":"api/data_model/wallet/#monero.MoneroAddressType.SUBADDRESS","title":"SUBADDRESS = 2 class-attribute instance-attribute","text":"2 Indicates that the Monero address format is subaddress_.
.. _subaddress: https://docs.getmonero.org/public-address/subaddress/
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress","title":"MoneroDecodedAddress","text":" Bases: SerializableStruct
Maintains metadata for a decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.address","title":"address: str instance-attribute","text":"The decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.address_type","title":"address_type: MoneroAddressType instance-attribute","text":"Type of the decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.network_type","title":"network_type: MoneroNetworkType instance-attribute","text":"Network type of the decoded address.
"},{"location":"api/data_model/wallet/#monero.MoneroDecodedAddress.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag","title":"MoneroAccountTag","text":" Bases: SerializableStruct
Models a Monero account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.account_indices","title":"account_indices: list[int] instance-attribute","text":"Account indices with this tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.label","title":"label: str | None instance-attribute","text":"The account tag label.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.tag","title":"tag: str | None instance-attribute","text":"The account tag.
"},{"location":"api/data_model/wallet/#monero.MoneroAccountTag.deserialize","title":"deserialize(json) staticmethod","text":"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.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener","title":"MoneroWalletListener","text":"Interface to receive wallet notifications.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.__init__","title":"__init__()","text":"Initialize a wallet listener.
"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_balances_changed","title":"on_balances_changed(new_balance, new_unlocked_balance)","text":"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"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_new_block","title":"on_new_block(height)","text":"Invoked when a new block is processed.
Parameters:
Name Type Description Default height int the newly processed block.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_output_received","title":"on_output_received(output)","text":"Invoked when the wallet receives an output.
Parameters:
Name Type Description Default output MoneroOutputWallet the received output.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_output_spent","title":"on_output_spent(output)","text":"Invoked when the wallet spends an output.
Parameters:
Name Type Description Default output MoneroOutputWallet the spent output.
required"},{"location":"api/data_model/wallet/#monero.MoneroWalletListener.on_sync_progress","title":"on_sync_progress(height, start_height, end_height, percent_done, message)","text":"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"},{"location":"examples/connect_to_rpc_server/","title":"Connect to RPC Server","text":"Developers can create and establish a connection to a rpc server conveniently with a MoneroRpcConnection:
from monero import MoneroRpcConnection\n\n# connect to a monerod or wallet rpc server\nconnection = MoneroRpcConnection(\"http:://rpc_server_uri:18089\")\n\n# set connection credentials if needed\nconnection.set_credentials(\"rpc_user\", \"rpc_password\")\n\n# check rpc connection\nconnection.check_connection()\n\nif not connection.is_connected():\n raise Exception(\"Could not connect to RPC server.\")\n\nprint(\"Connection established to RPC server.\")\n
After successfully connecting to the rpc server, developers can also invoke methods of the JSON-RPC interface directly:
# invoke JSON-RPC method `get_version`\nresult = connection.send_json_request(\"get_version\")\nprint(f\"get_version JSON-RPC response: {result}\")\n
MoneroRpcConnection also accepts an optional proxy_uri parameter in its constructor, manageable even after a connection has been created. A prime example of use is to route your traffic via TOR:
Note
Setting a proxy_uri resets MoneroRpcConnection status.
# setup TOR proxy uri by instance attribute\nconnection.proxy_uri = \"127.0.0.1:9050\"\n\n# must recall `check_connection()` manually\nconnection.check_connection()\n
"},{"location":"examples/create_local_full_wallet/","title":"Create Local Full Wallet","text":"MoneroWalletFull is another MoneroWallet implementation that fully wraps wallet2 API. With a full wallet developers can create wallet files and manage them locally.
Creating a MoneroWalletFull is very simple:
from monero import MoneroWalletConfig, MoneroWalletFull, MoneroNetworkType\n\n# setup wallet configuration\nconfig = MoneroWalletConfig()\n\n# setup wallet path\nconfig.path = \"test_wallet_full\"\n\n# setup wallet password\nconfig.password = \"supersecretpassword123\"\n\n# setup wallet network type\nconfig.network_type = MoneroNetworkType.TESTNET\n\nwallet = MoneroWalletFull.create_wallet(config)\n
Check if a Monero wallet exists at specific path:
if MoneroWalletFull.wallet_exists(\"test_wallet_full\"):\n wallet = MoneroWalletFull.open_wallet(\"test_wallet_full\", \"supersecretpassword123\", MoneroNetworkType.TESTNET)\n
"},{"location":"examples/interact_with_daemon/","title":"Interact with RPC Daemon","text":"MoneroDaemonRpc offers a MoneroDaemon implementation that interacts with monero-rpc server using calls to RPC, JSON-RPC and Binary interfaces.
Creating a MoneroDaemonRpc instance is very simple:
from monero import MoneroDaemonRpc\n\n# create RPC daemon connected to `monerod-rpc` server\ndaemon = MoneroDaemonRpc(\"http://monerod_rpc_uri:18081\")\n
It can also be done using a MoneroRpcConnection instance:
from monero import MoneroRpcConnection, MoneroDaemonRpc\n\n# create rpc connection\nconnection = MoneroRpcConnection(\"http://monerod_rpc_uri:18081\")\n\n# create daemon using RPC connection\ndaemon = MoneroDaemonRpc(connection)\n
Fetch daemon info and status:
# get general daemon rpc info\ndaemon_info = daemon.get_info()\nprint(f\"Daemon info: {daemon_info.serialize()}\")\n\n# get daemon specific sync info\nsync_info = daemon.get_sync_info()\nprint(f\"Sync info: {sync_info.serialize()}\")\n\n# get peer bans\nbans = daemon.get_peer_bans()\nfor ban in bans:\n print(f\"Banned peer: {peer.serialize()}\")\n
Query blocks and txs on blockchain:
# get last block header added to blockchain\nlast_block = daemon.get_last_block_header()\nprint(f\"Last block header: {last_block.serialize()}\")\n\n# get specific block by height\nblock = daemon.get_block_by_height(1520000)\nprint(f\"Block fetched by height: {block.serialize()}\")\n\n# get specific block by hash\nblock = daemon.get_block_by_hash(\"...block hash...\")\nprint(f\"Block fetched by hash: {block.serialize()}\")\n\n# get alternative chains seen by the daemon\nchains = daemon.get_alt_chains()\nprint(f\"Found {len(chains)} alternative chains\")\n\n# get unconfirmed txs in pool\ntx_pool = daemon.get_tx_pool()\nfor tx in tx_pool:\n print(f\"Found tx in pool: {tx.serialize()}\")\n\n# get specific tx added to chain\ntx = daemon.get_tx(\"...tx hash...\")\nprint(f\"Fetched tx: {tx.serialize()}\")\n
Relay mined blocks and signed txs:
# submit a mined block\ndaemon.submit_block(\"...block blob...\")\n\n# submit a signed tx\ntx: Monerotx = ...\ndaemon.submit_tx(tx.full_hex)\n
"},{"location":"examples/interact_with_wallet_rpc/","title":"Interact with RPC Wallet","text":"MoneroWalletRpc offers a MoneroWallet implementation that interacts with monero-wallet-rpc using calls to the JSON-RPC interface.
Creating a MoneroWalletRpc instance is very simple:
from monero import MoneroWalletRpc\n\n# create RPC wallet connected to `monero-wallet-rpc` server\nwallet = MoneroWalletRpc(\"http://wallet_rpc_uri:18081\")\n
It can also be done using a MoneroRpcConnection instance:
from monero import MoneroRpcConnection, MoneroWalletRpc\n\n# create rpc connection\nconnection = MoneroRpcConnection(\"http://wallet_rpc_uri:18081\")\n\n# create wallet using RPC connection\nwallet = MoneroWalletRpc(connection)\n
Let's create a new wallet file:
# build wallet configuration\nconfig: MoneroWalletConfig = ...\n\n# create new wallet file in rpc server\nwallet.create_wallet(config)\n
Or open an already existing wallet:
# open wallet with config\nwallet.open_wallet(config)\n\n# or open by path and password\nwallet.open_wallet(\"wallet_path\", \"wallet_password\")\n
And fetch some info:
# get wallet information\nprimary_address: str = wallet.get_primary_address()\nview_key: str = wallet.get_private_view_key()\nseed: str = wallet.get_seed()\nbalance: int = wallet.get_balance()\n\nprint(f\"primary address: {primary_address}\")\nprint(f\"view_key: {view_key}\")\nprint(f\"seed: {seed}\")\nprint(f\"balance: {balance}\")\n
"},{"location":"examples/query_wallet_txs_and_transfers/","title":"Query Wallet Txs and Transfers","text":"The MoneroWallet interface offers methods for fetching transactions, transfers and outputs from wallet's cache:
MoneroWallet.get_txs(query: MoneroTxQuery) -> list[MoneroTxWallet] MoneroWallet.get_transfers(query: MoneroTransferQuery) -> list[MoneroTransfer] MoneroWallet.get_outputs(query: MoneroOutputQuery) -> list[MoneroOutputWallet]
This methods can be used with a MoneroTxQuery, MoneroTransferQuery, MoneroOutputQuery, wich will filter all records that doesn't match criteria defined in the query.
Example of fetching wallet txs with a basic MoneroTxQuery:
from monero import (\n MoneroWallet, MoneroTxQuery,\n MoneroTxWallet\n)\n\n# open a wallet with txs data\nwallet: MoneroWallet = ...\n\n# create and setup a new tx query to filter txs with\nquery = MoneroTxQuery()\n\n# fetch only outgoing txs\nquery.is_incoming = False\nquery.is_outgoing = True\n\n# include outputs in tx data\nquery.include_outputs = True\n\n# filter tx by height range\nquery.min_height = 150000\nquery.max_height = 300000\n\n# or get txs at specific height\nquery.height = 152000\n\n# fetch txs that meets criteria from wallet\ntxs: list[MoneroTxWallet] = wallet.get_txs(query)\n\n# print fetched txs\nfor tx in txs:\n print(f\"Found tx: {tx.serialize()}\")\n
Example of fetching wallet transfers with a MoneroTransferQuery:
from monero import (\n MoneroWallet, MoneroTransferQuery,\n MoneroTransfer\n)\n\n# open a wallet with txs data\nwallet: MoneroWallet = ...\n\n# create and setup a new tx query to filter transfers with\nquery = MoneroTransferQuery()\n\n# fetch only incoming transfers\nquery.is_incoming = True\nquery.is_outgoing = False\n\n# filter by account and subaddress index\nquery.account_index = 1\nquery.subaddress_indices = [0, 1, 2, 3]\n\n# fetch transfers that meets criteria from wallet\ntransfers: list[MoneroTransferWallet] = wallet.get_transfers(query)\n\n# print fetched txs\nfor transfer in transfers:\n print(f\"Found transfer: {transfer.serialize()}\")\n
"},{"location":"examples/sending_payments/","title":"Sending Payments","text":"In order to send payments with a MoneroWallet, developers must setup a MoneroTxConfig:
from monero import MoneroTxConfig\n\n# create and setup transaction configuration\ntx_config = MoneroTxConfig()\n\n# specify source account index\ntx_config.account_index = 0\n\n# specify address and destination amount\ntx_config.address = \"...destination address...\"\ntx_config.amount = 1000000000\n\n# relay tx to the network\ntx_config.relay = True\n\n# create txs with configuration\ntxs: list[MoneroTxWallet] = wallet.create_txs(tx_config)\n\nfor tx in txs:\n print(f\"Created tx: {tx.serialize()}\")\n
Is possible to setup also multiple destinations in transaction configuration:
tx_config.destinations.append(MoneroDestination(\"...destination address1...\", 1000000000))\n\n...\n\ntx_config.destinations.append(MoneroDestination(\"...destination addressN...\", 1000000000))\n\n# split into multiple txs\ntx_config.can_split = True\n
"},{"location":"examples/using_keys_only_wallet/","title":"Using Keys-Only Wallet","text":"MoneroWalletKeys is a MoneroWallet implementation that supports only basic keys operations, without files or RPC calls.
Creating a in-memory keys-only wallet with MoneroWalletKeys is very simple:
from monero import MoneroWalletKeys, MoneroWalletConfig, MoneroNetworkType\n\n# setup wallet configuration\nconfig = MoneroWalletConfig()\nconfig.network_type = MoneroNetworkType.TESTNET\n\n# create random wallet\nwallet = MoneroWalletKeys.create_wallet_random(config)\n
Restore specific wallet from seed:
config.seed = \"...wallet seed...\"\n\n# restore wallet from seed\nwallet = MoneroWalletKeys.create_wallet_from_seed(config)\n
Or from wallet keys:
config.primary_address = \"...wallet primary address...\"\nconfig.private_view_key = \"...wallet private view key...\"\n\n# restore wallet from keys\nwallet = MoneroWalletKeys.create_wallet_from_keys(config)\n
"}]}
\ No newline at end of file
diff --git a/docs/mkdocs/public/sitemap.xml b/docs/mkdocs/public/sitemap.xml
index 0b8cf3d..401b16b 100644
--- a/docs/mkdocs/public/sitemap.xml
+++ b/docs/mkdocs/public/sitemap.xml
@@ -2,127 +2,133 @@
https://everoddandeven.github.io/monero-python/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/architecture/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/connection/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/daemon/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/daemon_rpc/
- 2026-07-28
+ 2026-08-31
daily
+
+ https://everoddandeven.github.io/monero-python/api/errors/
+ 2026-08-31
+ daily
+
+
https://everoddandeven.github.io/monero-python/api/serializable_struct/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/utils/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/wallet/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/wallet_full/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/wallet_keys/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/wallet_rpc/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/data_model/connection/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/data_model/daemon/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/api/data_model/wallet/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/connect_to_rpc_server/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/create_local_full_wallet/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/interact_with_daemon/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/interact_with_wallet_rpc/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/query_wallet_txs_and_transfers/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/sending_payments/
- 2026-07-28
+ 2026-08-31
daily
https://everoddandeven.github.io/monero-python/examples/using_keys_only_wallet/
- 2026-07-28
+ 2026-08-31
daily
diff --git a/docs/mkdocs/public/sitemap.xml.gz b/docs/mkdocs/public/sitemap.xml.gz
index 87a7bc4..569958f 100644
Binary files a/docs/mkdocs/public/sitemap.xml.gz and b/docs/mkdocs/public/sitemap.xml.gz differ
diff --git a/external/monero-cpp b/external/monero-cpp
index 8db4afa..6927f7b 160000
--- a/external/monero-cpp
+++ b/external/monero-cpp
@@ -1 +1 @@
-Subproject commit 8db4afab28f394f3dc78de6b4c2d3473484ce1b9
+Subproject commit 6927f7bf52dabad2179dfe2a0a0e1a95e12290c1
diff --git a/pyproject.toml b/pyproject.toml
index 8fb7ee2..5effba2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "monero"
-version = "0.9.3"
+version = "0.9.4"
description = "A Python library for using Monero"
authors = [
{ name = "everoddandeven", email = "everoddandeven@protonmail.com" }
diff --git a/setup.py b/setup.py
index 52e8051..2e7e257 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
setup(
name='monero',
- version='0.9.3',
+ version='0.9.4',
author='everoddandeven',
author_email="everoddandeven@protonmail.com",
maintainer='everoddandeven',
diff --git a/src/cpp/common/py_monero_common_bindings.cpp b/src/cpp/common/py_monero_common_bindings.cpp
index 2ebb110..463817a 100644
--- a/src/cpp/common/py_monero_common_bindings.cpp
+++ b/src/cpp/common/py_monero_common_bindings.cpp
@@ -235,7 +235,7 @@ void py_monero_bind_common(py::module_& m, PyMoneroTypes& t) {
t.py_monero_rpc_payment_info
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_rpc_payment_info::deserialize(json));
}, py::arg("json"))
.def_readwrite("credits", &monero_rpc_payment_info::m_credits)
.def_readwrite("top_block_hash", &monero_rpc_payment_info::m_top_block_hash);
@@ -243,6 +243,9 @@ void py_monero_bind_common(py::module_& m, PyMoneroTypes& t) {
// monero_ssl_options
t.py_monero_ssl_options
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(ssl_options::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("ssl_private_key_path", &ssl_options::m_ssl_private_key_path)
.def_readwrite("ssl_certificate_path", &ssl_options::m_ssl_certificate_path)
.def_readwrite("ssl_ca_file", &ssl_options::m_ssl_ca_file)
@@ -257,7 +260,7 @@ void py_monero_bind_common(py::module_& m, PyMoneroTypes& t) {
MONERO_CATCH_AND_RETHROW(monero_rpc_connection::compare(p1, p2));
}, py::arg("p1"), py::arg("p2"))
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize_rpc_connection(json));
+ MONERO_CATCH_AND_RETHROW(monero_rpc_connection::deserialize(json));
}, py::arg("json"))
.def_property("uri",
[](const monero_rpc_connection& self) { return self.m_uri; },
diff --git a/src/cpp/daemon/py_monero_daemon_bindings.cpp b/src/cpp/daemon/py_monero_daemon_bindings.cpp
index eb0cc19..3c37224 100644
--- a/src/cpp/daemon/py_monero_daemon_bindings.cpp
+++ b/src/cpp/daemon/py_monero_daemon_bindings.cpp
@@ -58,7 +58,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroFeeEstimate")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_fee_estimate::deserialize(json));
}, py::arg("json"))
.def_readwrite("fee", &monero_fee_estimate::m_fee)
.def_readwrite("fees", &monero_fee_estimate::m_fees)
@@ -72,7 +72,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
t.py_monero_version
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_version::deserialize(json));
}, py::arg("json"))
.def_readwrite("number", &monero_version::m_number)
.def_readwrite("is_release", &monero_version::m_is_release);
@@ -80,6 +80,9 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
// monero_block_header
t.py_monero_block_header
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_block_header::deserialize(json));
+ }, py::arg("json"))
.def("__str__", &monero_block_header::serialize)
.def_readwrite("hash", &monero_block_header::m_hash)
.def_readwrite("height", &monero_block_header::m_height)
@@ -112,6 +115,9 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
// monero_block (needs: monero_tx)
t.py_monero_block
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_block::deserialize(json));
+ }, py::arg("json"))
.def("__str__", &monero_block::serialize)
.def_readwrite("hex", &monero_block::m_hex)
.def_readwrite("miner_tx", &monero_block::m_miner_tx)
@@ -129,7 +135,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroBlockTemplate")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_block_template::deserialize(json));
}, py::arg("json"))
.def_readwrite("block_template_blob", &monero_block_template::m_block_template_blob)
.def_readwrite("block_hashing_blob", &monero_block_template::m_block_hashing_blob)
@@ -147,7 +153,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroConnectionSpan")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_connection_span::deserialize(json));
}, py::arg("json"))
.def_readwrite("connection_id", &monero_connection_span::m_connection_id)
.def_readwrite("num_blocks", &monero_connection_span::m_num_blocks)
@@ -161,7 +167,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroPeer")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_peer::deserialize(json));
}, py::arg("json"))
.def_readwrite("id", &monero_peer::m_id)
.def_readwrite("address", &monero_peer::m_address)
@@ -194,7 +200,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroAltChain")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_alt_chain::deserialize(json));
}, py::arg("json"))
.def_readwrite("block_hashes", &monero_alt_chain::m_block_hashes)
.def_readwrite("difficulty_low", &monero_alt_chain::m_difficulty_low)
@@ -207,7 +213,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroBan")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_ban::deserialize(json));
}, py::arg("json"))
.def_readwrite("host", &monero_ban::m_host)
.def_readwrite("ip", &monero_ban::m_ip)
@@ -218,7 +224,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroOutputDistributionEntry")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_output_distribution_entry::deserialize(json));
}, py::arg("json"))
.def_readwrite("amount", &monero_output_distribution_entry::m_amount)
.def_readwrite("base", &monero_output_distribution_entry::m_base)
@@ -229,7 +235,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroOutputHistogramEntry")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_output_histogram_entry::deserialize(json));
}, py::arg("json"))
.def_readwrite("amount", &monero_output_histogram_entry::m_amount)
.def_readwrite("num_instances", &monero_output_histogram_entry::m_num_instances)
@@ -240,7 +246,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroHardForkInfo")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_hard_fork_info::deserialize(json));
}, py::arg("json"))
.def_readwrite("earliest_height", &monero_hard_fork_info::m_earliest_height)
.def_readwrite("is_enabled", &monero_hard_fork_info::m_is_enabled)
@@ -255,7 +261,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroDaemonNetworkStats")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_daemon_network_stats::deserialize(json));
}, py::arg("json"))
.def_readwrite("start_time", &monero_daemon_network_stats::m_start_time)
.def_readwrite("total_packets_in", &monero_daemon_network_stats::m_total_packets_in)
@@ -268,7 +274,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
.def(py::init<>())
.def(py::init(), py::arg("id"), py::arg("hash"))
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_auxiliary_pow::deserialize(json));
}, py::arg("json"))
.def_readwrite("id", &monero_auxiliary_pow::m_id)
.def_readwrite("hash", &monero_auxiliary_pow::m_hash);
@@ -277,7 +283,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroAddAuxiliaryPowResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_add_auxiliary_pow_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("block_template_blob", &monero_add_auxiliary_pow_result::m_block_template_blob)
.def_readwrite("block_hashing_blob", &monero_add_auxiliary_pow_result::m_block_hashing_blob)
@@ -289,7 +295,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroMinerData")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_miner_data::deserialize(json));
}, py::arg("json"))
.def_readwrite("major_version", &monero_miner_data::m_major_version)
.def_readwrite("height", &monero_miner_data::m_height)
@@ -304,7 +310,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroGetBlocksByHashResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_get_blocks_by_hash_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("blocks", &monero_get_blocks_by_hash_result::m_blocks)
.def_readwrite("current_height", &monero_get_blocks_by_hash_result::m_current_height);
@@ -313,7 +319,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroGetBlockHashesResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_get_block_hashes_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("hashes", &monero_get_block_hashes_result::m_hashes)
.def_readwrite("start_height", &monero_get_block_hashes_result::m_start_height)
@@ -323,7 +329,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroPruneResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_prune_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_pruned", &monero_prune_result::m_is_pruned)
.def_readwrite("pruning_seed", &monero_prune_result::m_pruning_seed);
@@ -332,7 +338,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroDaemonSyncInfo")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_daemon_sync_info::deserialize(json));
}, py::arg("json"))
.def_readwrite("height", &monero_daemon_sync_info::m_height)
.def_readwrite("peers", &monero_daemon_sync_info::m_peers)
@@ -345,7 +351,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroDaemonInfo")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_daemon_info::deserialize(json));
}, py::arg("json"))
.def_readwrite("version", &monero_daemon_info::m_version)
.def_readwrite("num_alt_blocks", &monero_daemon_info::m_num_alt_blocks)
@@ -386,7 +392,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroDaemonUpdateCheckResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_daemon_update_check_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_update_available", &monero_daemon_update_check_result::m_is_update_available)
.def_readwrite("version", &monero_daemon_update_check_result::m_version)
@@ -398,7 +404,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroDaemonUpdateDownloadResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_daemon_update_download_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("download_path", &monero_daemon_update_download_result::m_download_path);
@@ -406,7 +412,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroSubmitTxResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_submit_tx_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_good", &monero_submit_tx_result::m_is_good)
.def_readwrite("is_relayed", &monero_submit_tx_result::m_is_relayed)
@@ -427,7 +433,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroGenerateBlocksResult")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_generate_blocks_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("block_hashes", &monero_generate_blocks_result::m_block_hashes)
.def_readwrite("height", &monero_generate_blocks_result::m_height);
@@ -436,7 +442,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroTxPoolStats")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_tx_pool_stats::deserialize(json));
}, py::arg("json"))
.def_readwrite("num_txs", &monero_tx_pool_stats::m_num_txs)
.def_readwrite("num_not_relayed", &monero_tx_pool_stats::m_num_not_relayed)
@@ -456,7 +462,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroMiningStatus")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_mining_status::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_active", &monero_mining_status::m_is_active)
.def_readwrite("is_background", &monero_mining_status::m_is_background)
@@ -468,7 +474,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
py::class_>(m, "MoneroMinerTxSum")
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_miner_tx_sum::deserialize(json));
}, py::arg("json"))
.def_readwrite("emission_sum_low", &monero_miner_tx_sum::m_emission_sum_low)
.def_readwrite("emission_sum_high", &monero_miner_tx_sum::m_emission_sum_high)
@@ -479,7 +485,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
t.py_monero_tx
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_tx::deserialize(json));
}, py::arg("json"))
.def_property_readonly_static("DEFAULT_PAYMENT_ID", [](py::object /* self */) { return monero_tx::DEFAULT_PAYMENT_ID; })
.def_readwrite("block", &monero_tx::m_block)
@@ -540,7 +546,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
t.py_monero_key_image
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_key_image::deserialize(json));
}, py::arg("json"))
.def_static("deserialize_key_images", [](const std::string& key_images_json) {
MONERO_CATCH_AND_RETHROW(monero_key_image::deserialize_key_images(key_images_json));
@@ -559,7 +565,7 @@ void py_monero_bind_daemon(py::module_& m, PyMoneroTypes& t) {
t.py_monero_output
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_output::deserialize(json));
}, py::arg("json"))
.def_readwrite("tx", &monero_output::m_tx)
.def_readwrite("key_image", &monero_output::m_key_image)
diff --git a/src/cpp/py_monero_types.h b/src/cpp/py_monero_types.h
index 7f54090..458871b 100644
--- a/src/cpp/py_monero_types.h
+++ b/src/cpp/py_monero_types.h
@@ -78,22 +78,6 @@ PYBIND11_MAKE_OPAQUE(VectorUint64);
#include "wallet/monero_wallet_keys.h"
#include "wallet/monero_wallet_full.h"
#include "utils/py_monero_utils.h"
-#include "utils/gen_utils.h"
-
-template
-std::shared_ptr py_monero_deserialize(const std::string& json) {
- boost::property_tree::ptree root;
- gen_utils::deserialize(json, root);
- std::shared_ptr obj = std::make_shared();
- T::from_property_tree(root, obj);
- return obj;
-}
-
-inline std::shared_ptr py_monero_deserialize_rpc_connection(const std::string& json) {
- boost::property_tree::ptree root;
- gen_utils::deserialize(json, root);
- return monero_rpc_connection::from_property_tree(root);
-}
#define MONERO_CATCH_AND_RETHROW(expr) \
try { \
diff --git a/src/cpp/utils/py_monero_utils.h b/src/cpp/utils/py_monero_utils.h
index cb84fb0..81d8526 100644
--- a/src/cpp/utils/py_monero_utils.h
+++ b/src/cpp/utils/py_monero_utils.h
@@ -63,7 +63,7 @@ class PyMoneroUtils {
public:
PyMoneroUtils() {};
- static std::string get_version() { return std::string("0.9.3"); };
+ static std::string get_version() { return std::string("0.9.4"); };
static std::string json_to_binary(const std::string &json);
static std::string dict_to_binary(const py::dict &dictionary);
static py::dict binary_to_dict(const std::string& bin);
diff --git a/src/cpp/wallet/py_monero_wallet_bindings.cpp b/src/cpp/wallet/py_monero_wallet_bindings.cpp
index d837901..3c0e8e1 100644
--- a/src/cpp/wallet/py_monero_wallet_bindings.cpp
+++ b/src/cpp/wallet/py_monero_wallet_bindings.cpp
@@ -86,7 +86,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_subaddress
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_subaddress::deserialize(json));
}, py::arg("json"))
.def_readwrite("account_index", &monero_subaddress::m_account_index)
.def_readwrite("index", &monero_subaddress::m_index)
@@ -102,6 +102,9 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_sync_result
.def(py::init<>())
.def(py::init(), py::arg("num_blocks_fetched"), py::arg("received_money"))
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_sync_result::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("num_blocks_fetched", &monero_sync_result::m_num_blocks_fetched)
.def_readwrite("received_money", &monero_sync_result::m_received_money);
@@ -109,7 +112,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_account
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_account::deserialize(json));
}, py::arg("json"))
.def_readwrite("index", &monero_account::m_index)
.def_readwrite("primary_address", &monero_account::m_primary_address)
@@ -122,7 +125,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_account_tag
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_account_tag::deserialize(json));
}, py::arg("json"))
.def(py::init(), py::arg("tag"), py::arg("label"))
.def(py::init>(), py::arg("tag"), py::arg("label"), py::arg("account_indices"))
@@ -134,7 +137,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_destination
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_destination::deserialize(json));
}, py::arg("json"))
.def(py::init(), py::arg("address"))
.def(py::init(), py::arg("address"), py::arg("amount"))
@@ -168,6 +171,9 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
// monero_incoming_transfer
t.py_monero_incoming_transfer
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_incoming_transfer::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("address", &monero_incoming_transfer::m_address)
.def_readwrite("subaddress_index", &monero_incoming_transfer::m_subaddress_index)
.def_readwrite("num_suggested_confirmations", &monero_incoming_transfer::m_num_suggested_confirmations)
@@ -186,6 +192,9 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
// monero_outgoing_transfer
t.py_monero_outgoing_transfer
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_outgoing_transfer::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("subaddress_indices", &monero_outgoing_transfer::m_subaddress_indices)
.def_readwrite("addresses", &monero_outgoing_transfer::m_addresses)
.def_readwrite("destinations", &monero_outgoing_transfer::m_destinations)
@@ -201,7 +210,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_transfer_query
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_transfer_query::deserialize(json));
}, py::arg("json"))
.def_static("deserialize_from_block", [](const std::string& transfer_query_json) {
MONERO_CATCH_AND_RETHROW(monero_transfer_query::deserialize_from_block(transfer_query_json));
@@ -245,7 +254,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_output_wallet
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_output_wallet::deserialize(json));
}, py::arg("json"))
.def_readwrite("account_index", &monero_output_wallet::m_account_index)
.def_readwrite("subaddress_index", &monero_output_wallet::m_subaddress_index)
@@ -267,7 +276,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_output_query
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_output_query::deserialize(json));
}, py::arg("json"))
.def_static("deserialize_from_block", [](const std::string& output_query_json) {
MONERO_CATCH_AND_RETHROW(monero_output_query::deserialize_from_block(output_query_json));
@@ -302,7 +311,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_tx_wallet
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_tx_wallet::deserialize(json));
}, py::arg("json"))
.def_readwrite("tx_set", &monero_tx_wallet::m_tx_set)
.def_readwrite("is_incoming", &monero_tx_wallet::m_is_incoming)
@@ -361,7 +370,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_tx_query
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_tx_query::deserialize(json));
}, py::arg("json"))
.def_static("deserialize_from_block", [](const std::string& tx_query_json) {
MONERO_CATCH_AND_RETHROW(monero_tx_query::deserialize_from_block(tx_query_json));
@@ -413,7 +422,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_integrated_address
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_integrated_address::deserialize(json));
}, py::arg("json"))
.def_readwrite("standard_address", &monero_integrated_address::m_standard_address)
.def_readwrite("payment_id", &monero_integrated_address::m_payment_id)
@@ -421,7 +430,11 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
// monero_decoded_address
t.py_monero_decoded_address
+ .def(py::init<>())
.def(py::init(), py::arg("address"), py::arg("address_type"), py::arg("network_type"))
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_decoded_address::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("address", &monero_decoded_address::m_address)
.def_readwrite("address_type", &monero_decoded_address::m_address_type)
.def_readwrite("network_type", &monero_decoded_address::m_network_type);
@@ -469,6 +482,9 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
// monero_key_image_export_result
t.py_monero_key_image_export_result
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_key_image_export_result::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("offset", &monero_key_image_export_result::m_offset)
.def_readwrite("key_images", &monero_key_image_export_result::m_key_images);
@@ -476,7 +492,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_key_image_import_result
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_key_image_import_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("height", &monero_key_image_import_result::m_height)
.def_readwrite("spent_amount", &monero_key_image_import_result::m_spent_amount)
@@ -486,7 +502,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_message_signature_result
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_message_signature_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_good", &monero_message_signature_result::m_is_good)
.def_readwrite("version", &monero_message_signature_result::m_version)
@@ -496,13 +512,16 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
// monero_check
t.py_monero_check
.def(py::init<>())
+ .def_static("deserialize", [](const std::string& json) {
+ MONERO_CATCH_AND_RETHROW(monero_check::deserialize(json));
+ }, py::arg("json"))
.def_readwrite("is_good", &monero_check::m_is_good);
// monero_check_tx
t.py_monero_check_tx
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_check_tx::deserialize(json));
}, py::arg("json"))
.def_readwrite("in_tx_pool", &monero_check_tx::m_in_tx_pool)
.def_readwrite("num_confirmations", &monero_check_tx::m_num_confirmations)
@@ -512,7 +531,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_check_reserve
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_check_reserve::deserialize(json));
}, py::arg("json"))
.def_readwrite("total_amount", &monero_check_reserve::m_total_amount)
.def_readwrite("unconfirmed_spent_amount", &monero_check_reserve::m_unconfirmed_spent_amount);
@@ -521,7 +540,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_multisig_info
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_multisig_info::deserialize(json));
}, py::arg("json"))
.def_readwrite("is_multisig", &monero_multisig_info::m_is_multisig)
.def_readwrite("is_ready", &monero_multisig_info::m_is_ready)
@@ -532,7 +551,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_multisig_init_result
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_multisig_init_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("address", &monero_multisig_init_result::m_address)
.def_readwrite("multisig_hex", &monero_multisig_init_result::m_multisig_hex);
@@ -541,7 +560,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_multisig_sign_result
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_multisig_sign_result::deserialize(json));
}, py::arg("json"))
.def_readwrite("signed_multisig_tx_hex", &monero_multisig_sign_result::m_signed_multisig_tx_hex)
.def_readwrite("tx_hashes", &monero_multisig_sign_result::m_tx_hashes);
@@ -550,7 +569,7 @@ void py_monero_bind_wallet(py::module_& m, PyMoneroTypes& t) {
t.py_monero_address_book_entry
.def(py::init<>())
.def_static("deserialize", [](const std::string& json) {
- MONERO_CATCH_AND_RETHROW(py_monero_deserialize(json));
+ MONERO_CATCH_AND_RETHROW(monero_address_book_entry::deserialize(json));
}, py::arg("json"))
.def(py::init(), py::arg("index"), py::arg("address"), py::arg("description"))
.def(py::init(), py::arg("index"), py::arg("address"), py::arg("description"), py::arg("payment_id"))
diff --git a/src/python/gen_utils.pyi b/src/python/gen_utils.pyi
index 417ece2..ac7163d 100644
--- a/src/python/gen_utils.pyi
+++ b/src/python/gen_utils.pyi
@@ -30,7 +30,7 @@ class GenUtils(ABC):
Compare a bool to an optional bool.
:param bool val: value to compare.
- :param bool | None opt_val: optional value to compare against; `False` if `None`.
+ :param bool|None opt_val: optional value to compare against; `False` if `None`.
:returns bool: `True` if `opt_val` is set and equals `val`, `False` otherwise.
"""
@@ -57,18 +57,18 @@ class GenUtils(ABC):
(`True`) or lesser (`False`) of the two, treating `True` as 1 and
`False` as 0.
- :param bool | None val1: first value.
- :param bool | None val2: second value.
- :param bool | None resolve_defined: when only one side is set and this
+ :param bool|None val1: first value.
+ :param bool|None val2: second value.
+ :param bool|None resolve_defined: when only one side is set and this
is `False`, return `None` instead of the set side.
- :param bool | None resolve_true: when both sides are set and differ,
+ :param bool|None resolve_true: when both sides are set and differ,
prefer whichever operand equals this value.
- :param bool | None resolve_max: when both sides are set and differ
+ :param bool|None resolve_max: when both sides are set and differ
(and `resolve_true` didn't resolve it), prefer the greater (`True`)
or lesser (`False`) value.
:param str err_msg: extra context appended to the error message on conflict.
- :returns bool | None: the reconciled value.
+ :returns bool|None: the reconciled value.
:raises RuntimeError: If none of the above resolves.
"""
...
@@ -86,14 +86,14 @@ class GenUtils(ABC):
Reconcile two optional unsigned 64-bit integers. See `reconcile_bool`
for the resolution rules (`resolve_max` here picks the numeric max/min).
- :param int | None val1: first value.
- :param int | None val2: second value.
- :param bool | None resolve_defined: see `reconcile_bool`.
- :param bool | None resolve_true: see `reconcile_bool`.
- :param bool | None resolve_max: prefer the larger (`True`) or smaller (`False`) value.
+ :param int|None val1: first value.
+ :param int|None val2: second value.
+ :param bool|None resolve_defined: see `reconcile_bool`.
+ :param bool|None resolve_true: see `reconcile_bool`.
+ :param bool|None resolve_max: prefer the larger (`True`) or smaller (`False`) value.
:param str err_msg: extra context appended to the error message on conflict.
- :returns int | None: the reconciled value.
+ :returns int|None: the reconciled value.
:raises RuntimeError: If none of the above resolves.
"""
...
@@ -112,14 +112,14 @@ class GenUtils(ABC):
`resolve_true`/`resolve_max` are accepted for signature symmetry but
are not used.
- :param str | None val1: first value.
- :param str | None val2: second value.
- :param bool | None resolve_defined: see `reconcile_bool`.
- :param bool | None resolve_true: accepted but ignored.
- :param bool | None resolve_max: accepted but ignored.
+ :param str|None val1: first value.
+ :param str|None val2: second value.
+ :param bool|None resolve_defined: see `reconcile_bool`.
+ :param bool|None resolve_true: accepted but ignored.
+ :param bool|None resolve_max: accepted but ignored.
:param str err_msg: extra context appended to the error message on conflict.
- :returns str | None: the reconciled value.
+ :returns str|None: the reconciled value.
:raises RuntimeError: on different strings always regardless of `resolve_true`/`resolve_max` flags.
"""
...
diff --git a/src/python/monero_block.pyi b/src/python/monero_block.pyi
index 1dbb04d..2475ac5 100644
--- a/src/python/monero_block.pyi
+++ b/src/python/monero_block.pyi
@@ -15,6 +15,16 @@ class MoneroBlock(MoneroBlockHeader):
txs: list[MoneroTx]
"""List of non-coinbase transactions in the block."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroBlock:
+ """
+ Deserialize a MoneroBlock from a JSON string.
+
+ :param str json: MoneroBlock in JSON format.
+ :returns MoneroBlock: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a Monero block."""
...
diff --git a/src/python/monero_block_header.pyi b/src/python/monero_block_header.pyi
index 6de91fb..06d49f1 100644
--- a/src/python/monero_block_header.pyi
+++ b/src/python/monero_block_header.pyi
@@ -50,6 +50,16 @@ class MoneroBlockHeader(SerializableStruct):
weight: int | None
"""The adjusted block size, in bytes. This is the raw size, plus a positive adjustment for any Bulletproof transactions with more than 2 outputs."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroBlockHeader:
+ """
+ Deserialize a MoneroBlockHeader from a JSON string.
+
+ :param str json: MoneroBlockHeader in JSON format.
+ :returns MoneroBlockHeader: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a Monero block header."""
...
diff --git a/src/python/monero_check.pyi b/src/python/monero_check.pyi
index bb70435..10b880d 100644
--- a/src/python/monero_check.pyi
+++ b/src/python/monero_check.pyi
@@ -7,6 +7,16 @@ class MoneroCheck(SerializableStruct):
is_good: bool
"""Indicates if check was successfull."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroCheck:
+ """
+ Deserialize a MoneroCheck from a JSON string.
+
+ :param str json: MoneroCheck in JSON format.
+ :returns MoneroCheck: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a Monero check."""
...
diff --git a/src/python/monero_decoded_address.pyi b/src/python/monero_decoded_address.pyi
index fb7f436..b288faf 100644
--- a/src/python/monero_decoded_address.pyi
+++ b/src/python/monero_decoded_address.pyi
@@ -1,3 +1,7 @@
+from __future__ import annotations
+
+import typing
+
from .serializable_struct import SerializableStruct
from .monero_address_type import MoneroAddressType
from .monero_network_type import MoneroNetworkType
@@ -13,6 +17,22 @@ class MoneroDecodedAddress(SerializableStruct):
network_type: MoneroNetworkType
"""Network type of the decoded address."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroDecodedAddress:
+ """
+ Deserialize a MoneroDecodedAddress from a JSON string.
+
+ :param str json: MoneroDecodedAddress in JSON format.
+ :returns MoneroDecodedAddress: deserialized instance.
+ """
+ ...
+
+ @typing.overload
+ def __init__(self) -> None:
+ """Initialize an empty Monero decoded address."""
+ ...
+
+ @typing.overload
def __init__(self, address: str, address_type: MoneroAddressType, network_type: MoneroNetworkType) -> None:
"""
Initialize a Monero decoded address.
diff --git a/src/python/monero_incoming_transfer.pyi b/src/python/monero_incoming_transfer.pyi
index 7fb23e7..9f8cf86 100644
--- a/src/python/monero_incoming_transfer.pyi
+++ b/src/python/monero_incoming_transfer.pyi
@@ -13,6 +13,16 @@ class MoneroIncomingTransfer(MoneroTransfer):
subaddress_index: int | None
"""The subaddress index that received funds within this transfer."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroIncomingTransfer:
+ """
+ Deserialize a MoneroIncomingTransfer from a JSON string.
+
+ :param str json: MoneroIncomingTransfer in JSON format.
+ :returns MoneroIncomingTransfer: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a Monero incoming transfer."""
...
diff --git a/src/python/monero_key_image_export_result.pyi b/src/python/monero_key_image_export_result.pyi
index d88825b..3e18eed 100644
--- a/src/python/monero_key_image_export_result.pyi
+++ b/src/python/monero_key_image_export_result.pyi
@@ -17,6 +17,16 @@ class MoneroKeyImageExportResult(SerializableStruct):
key_images: list[MoneroKeyImage]
"""The exported key images, one per owned output starting at `offset`."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroKeyImageExportResult:
+ """
+ Deserialize a MoneroKeyImageExportResult from a JSON string.
+
+ :param str json: MoneroKeyImageExportResult in JSON format.
+ :returns MoneroKeyImageExportResult: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a Monero key image export result."""
...
diff --git a/src/python/monero_outgoing_transfer.pyi b/src/python/monero_outgoing_transfer.pyi
index 58333bb..25450d6 100644
--- a/src/python/monero_outgoing_transfer.pyi
+++ b/src/python/monero_outgoing_transfer.pyi
@@ -14,6 +14,16 @@ class MoneroOutgoingTransfer(MoneroTransfer):
subaddress_indices: list[int]
"""Subaddresses from which the transfer originated."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroOutgoingTransfer:
+ """
+ Deserialize a MoneroOutgoingTransfer from a JSON string.
+
+ :param str json: MoneroOutgoingTransfer in JSON format.
+ :returns MoneroOutgoingTransfer: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
...
diff --git a/src/python/monero_sync_result.pyi b/src/python/monero_sync_result.pyi
index 17ff6de..7b3ac77 100644
--- a/src/python/monero_sync_result.pyi
+++ b/src/python/monero_sync_result.pyi
@@ -11,6 +11,16 @@ class MoneroSyncResult(SerializableStruct):
received_money: bool
"""Indicates if money was received."""
+ @staticmethod
+ def deserialize(json: str) -> MoneroSyncResult:
+ """
+ Deserialize a MoneroSyncResult from a JSON string.
+
+ :param str json: MoneroSyncResult in JSON format.
+ :returns MoneroSyncResult: deserialized instance.
+ """
+ ...
+
@typing.overload
def __init__(self) -> None:
"""Initialize a Monero sync result."""
diff --git a/src/python/monero_wallet.pyi b/src/python/monero_wallet.pyi
index 0e87889..1ba437c 100644
--- a/src/python/monero_wallet.pyi
+++ b/src/python/monero_wallet.pyi
@@ -390,6 +390,7 @@ class MoneroWallet:
Get the height that the wallet's daemon is synced to.
:returns int: the height that the wallet's daemon is synced to.
+ :raises Exception: if the wallet cannot reach its daemon.
"""
...
def get_daemon_max_peer_height(self) -> int:
@@ -997,6 +998,7 @@ class MoneroWallet:
Scan transactions by their hash/id.
:param list[str] tx_hashes: tx hashes to scan.
+ :raises Exception: if `tx_hashes` is empty.
"""
...
def set_account_tag_label(self, tag: str, label: str) -> None:
@@ -1107,6 +1109,9 @@ class MoneroWallet:
"""
Start background synchronizing with a maximum period between syncs.
+ Succeeds even while the wallet is offline; syncing begins once a daemon
+ connection becomes reachable.
+
:param int sync_period_in_ms: maximum period between syncs in milliseconds.
"""
...
diff --git a/src/python/ssl_options.pyi b/src/python/ssl_options.pyi
index 9539f43..0ddd2be 100644
--- a/src/python/ssl_options.pyi
+++ b/src/python/ssl_options.pyi
@@ -15,6 +15,16 @@ class SslOptions(SerializableStruct):
ssl_allow_any_cert: bool | None
"""Allow any certificate."""
+ @staticmethod
+ def deserialize(json: str) -> SslOptions:
+ """
+ Deserialize an SslOptions from a JSON string.
+
+ :param str json: SslOptions in JSON format.
+ :returns SslOptions: deserialized instance.
+ """
+ ...
+
def __init__(self) -> None:
"""Initialize a new rpc connection ssl options."""
...
diff --git a/tests/test_monero_common.py b/tests/test_monero_common.py
index 201316e..a1ba7d5 100644
--- a/tests/test_monero_common.py
+++ b/tests/test_monero_common.py
@@ -37,7 +37,6 @@ def test_serializable_struct(self) -> None:
SerializableStruct()
# test ssl options serialization integrity
- @pytest.mark.xfail(reason="TODO monero-cpp implement ssl_options::from_property_tree()", strict=True)
def test_ssl_options(self) -> None:
# create ssl_options objects and populate properties
ssl_options: SslOptions = SslOptions()
diff --git a/tests/test_monero_daemon_model.py b/tests/test_monero_daemon_model.py
index f532a8d..13a8fd9 100644
--- a/tests/test_monero_daemon_model.py
+++ b/tests/test_monero_daemon_model.py
@@ -135,6 +135,38 @@ def test_block_template_deserialize(self) -> None:
template.seed_height = 0
AssertUtils.assert_serialization_integrity(template)
+ def test_block_header_deserialize(self) -> None:
+ header: MoneroBlockHeader = MoneroBlockHeader()
+ header.hash = "a" * 64
+ header.height = 12345
+ header.timestamp = 1600000000
+ header.size = 2048
+ header.weight = 2048
+ header.long_term_weight = 2048
+ header.depth = 10
+ header.difficulty_low = 5000
+ header.difficulty_high = 0
+ header.cumulative_difficulty_low = 900000
+ header.cumulative_difficulty_high = 0
+ header.major_version = 16
+ header.minor_version = 16
+ header.nonce = 42
+ header.miner_tx_hash = "b" * 64
+ header.num_txs = 3
+ header.orphan_status = False
+ header.prev_hash = "c" * 64
+ header.reward = 600000000000
+ header.pow_hash = "d" * 64
+ AssertUtils.assert_serialization_integrity(header)
+
+ def test_block_deserialize(self) -> None:
+ block: MoneroBlock = MoneroBlock()
+ block.hash = "a" * 64
+ block.height = 12345
+ block.hex = "deadbeef"
+ block.tx_hashes = ["b" * 64, "c" * 64]
+ AssertUtils.assert_serialization_integrity(block)
+
def test_connection_span_deserialize(self) -> None:
span: MoneroConnectionSpan = MoneroConnectionSpan()
span.connection_id = "deadbeef"
diff --git a/tests/test_monero_utils.py b/tests/test_monero_utils.py
index 4420dab..8cbd4cf 100644
--- a/tests/test_monero_utils.py
+++ b/tests/test_monero_utils.py
@@ -566,27 +566,15 @@ def test_get_blocks_from_transfers_unconfirmed_placeholder(self) -> None:
assert t1.tx.block is placeholder
assert t2.tx.block is placeholder
- @pytest.mark.xfail(reason="get_blocks_from_transfers() dereferences transfer.tx without a null check and segfaults the interpreter when it's unset", strict=True)
- def test_get_blocks_from_transfers_missing_tx_does_not_crash(self) -> None:
+ def test_get_blocks_from_transfers_missing_tx_raises(self) -> None:
# a transfer with no tx set is a legitimate, reachable state (it's just
- # never assigned), but get_blocks_from_transfers() used to dereference
- # transfer.tx unconditionally, causing a native segfault (SIGSEGV)
- # instead of raising a catchable Python exception. Run in an isolated
- # subprocess so a regression here only kills a throwaway process
- # instead of the whole test run; fixed upstream in the local
- # everoddandeven/monero-cpp checkout, pending a submodule bump.
- script: str = (
- "import monero\n"
- "t = monero.MoneroIncomingTransfer()\n"
- "t.amount = 500000\n"
- "monero.MoneroUtils.get_blocks_from_transfers([t])\n"
- )
- result: subprocess.CompletedProcess[str] = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=30)
- logger.debug(f"subprocess exit code: {result.returncode}, stderr: {result.stderr.strip()}")
- assert result.returncode == 0, (
- f"get_blocks_from_transfers() crashed the interpreter (exit code {result.returncode}) "
- "instead of raising a Python exception for a transfer with no tx set"
- )
+ # never assigned); get_blocks_from_transfers() must raise a catchable
+ # exception, not dereference transfer.tx and segfault
+ transfer: MoneroIncomingTransfer = MoneroIncomingTransfer()
+ transfer.amount = 500000
+ with pytest.raises(RuntimeError) as exc_info:
+ MoneroUtils.get_blocks_from_transfers([transfer])
+ assert str(exc_info.value) == "Transfer has no tx"
def test_get_blocks_from_outputs_dedup_and_order(self) -> None:
block1: MoneroBlock = MoneroBlock()
@@ -625,22 +613,14 @@ def test_get_blocks_from_outputs_unconfirmed_raises(self) -> None:
with pytest.raises(RuntimeError, match="Need to handle unconfirmed output"):
MoneroUtils.get_blocks_from_outputs([output])
- @pytest.mark.xfail(reason="get_blocks_from_outputs() bug", strict=True)
- def test_get_blocks_from_outputs_missing_tx_does_not_crash(self) -> None:
- # same crash as get_blocks_from_transfers(), for the same reason:
- # output.tx is a legitimate but unchecked null before the cast/dereference.
- script: str = (
- "import monero\n"
- "o = monero.MoneroOutputWallet()\n"
- "o.amount = 1000000\n"
- "monero.MoneroUtils.get_blocks_from_outputs([o])\n"
- )
- result: subprocess.CompletedProcess[str] = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=30)
- logger.debug(f"subprocess exit code: {result.returncode}, stderr: {result.stderr.strip()}")
- assert result.returncode == 0, (
- f"get_blocks_from_outputs() crashed the interpreter (exit code {result.returncode}) "
- "instead of raising a Python exception for an output with no tx set"
- )
+ def test_get_blocks_from_outputs_missing_tx_raises(self) -> None:
+ # same as get_blocks_from_transfers(): output.tx is a legitimate but
+ # unchecked null; must raise rather than dereference and segfault
+ output: MoneroOutputWallet = MoneroOutputWallet()
+ output.amount = 1000000
+ with pytest.raises(RuntimeError) as exc_info:
+ MoneroUtils.get_blocks_from_outputs([output])
+ assert str(exc_info.value) == "Output has no tx"
#endregion
@@ -791,34 +771,21 @@ def test_free_none_does_not_crash(self) -> None:
"instead of raising a Python exception (or being a documented no-op)"
)
- @pytest.mark.xfail(reason="free(transfers) delegates to get_blocks_from_transfers(), which segfaults on a transfer with no tx set", strict=True)
- def test_free_transfers_missing_tx_does_not_crash(self) -> None:
- script: str = (
- "import monero\n"
- "t = monero.MoneroIncomingTransfer()\n"
- "t.amount = 500000\n"
- "monero.MoneroUtils.free([t])\n"
- )
- result: subprocess.CompletedProcess[str] = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=30)
- logger.debug(f"subprocess exit code: {result.returncode}, stderr: {result.stderr.strip()}")
- assert result.returncode == 0, (
- f"free([transfer]) crashed the interpreter (exit code {result.returncode}) "
- "instead of raising a Python exception for a transfer with no tx set"
- )
+ def test_free_transfers_missing_tx_raises(self) -> None:
+ # free([transfers]) delegates to get_blocks_from_transfers(): a transfer
+ # with no tx must surface a catchable exception, not segfault
+ transfer: MoneroIncomingTransfer = MoneroIncomingTransfer()
+ transfer.amount = 500000
+ with pytest.raises(RuntimeError) as exc_info:
+ MoneroUtils.free([transfer])
+ assert str(exc_info.value) == "Transfer has no tx"
- @pytest.mark.xfail(reason="free(outputs) delegates to get_blocks_from_outputs(), which segfaults on an output with no tx set", strict=True)
- def test_free_outputs_missing_tx_does_not_crash(self) -> None:
- script: str = (
- "import monero\n"
- "o = monero.MoneroOutputWallet()\n"
- "o.amount = 1000000\n"
- "monero.MoneroUtils.free([o])\n"
- )
- result: subprocess.CompletedProcess[str] = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=30)
- logger.debug(f"subprocess exit code: {result.returncode}, stderr: {result.stderr.strip()}")
- assert result.returncode == 0, (
- f"free([output]) crashed the interpreter (exit code {result.returncode}) "
- "instead of raising a Python exception for an output with no tx set"
- )
+ def test_free_outputs_missing_tx_raises(self) -> None:
+ # free([outputs]) delegates to get_blocks_from_outputs(): same guarantee
+ output: MoneroOutputWallet = MoneroOutputWallet()
+ output.amount = 1000000
+ with pytest.raises(RuntimeError) as exc_info:
+ MoneroUtils.free([output])
+ assert str(exc_info.value) == "Output has no tx"
#endregion
diff --git a/tests/test_monero_wallet_full.py b/tests/test_monero_wallet_full.py
index 4701872..220342e 100644
--- a/tests/test_monero_wallet_full.py
+++ b/tests/test_monero_wallet_full.py
@@ -139,10 +139,10 @@ def test_create_wallet_random_full(self, daemon: MoneroDaemonRpc) -> None:
assert wallet.get_height() == 1
assert wallet.get_restore_height() >= 0
- # cannot get daemon chain height
+ # cannot get daemon chain height: wallet2 masks errors from untrusted daemons
with pytest.raises(Exception) as exc_info:
wallet.get_daemon_height()
- assert str(exc_info.value) == "Wallet is not connected to daemon"
+ assert str(exc_info.value) == "daemon error"
# set daemon and check chain height
wallet.set_daemon_connection(daemon.get_rpc_connection())
@@ -197,9 +197,7 @@ def test_create_wallet_from_seed_full(self, daemon: MoneroDaemonRpc) -> None:
assert wallet.is_synced() is False
assert wallet.get_height() == 1
assert wallet.get_restore_height() == 0
- with pytest.raises(Exception) as exc_info:
- wallet.start_syncing()
- WalletErrorUtils.test_wallet_is_not_connected_error(exc_info.value)
+ wallet.start_syncing() # succeeds while offline, syncing when a daemon becomes reachable
wallet.close()
@@ -458,9 +456,7 @@ def test_start_stop_syncing(self, daemon: MoneroDaemonRpc) -> None:
assert len(wallet.get_seed()) > 0
assert wallet.get_height() == 1
assert wallet.get_balance() == 0
- with pytest.raises(Exception) as exc_info:
- wallet.start_syncing()
- WalletErrorUtils.test_wallet_is_not_connected_error(exc_info.value)
+ wallet.start_syncing() # succeeds while offline, syncing when a daemon becomes reachable
finally:
wallet.close()
@@ -753,7 +749,6 @@ def test_move_to(self) -> None:
wallet.close()
# Can export and import wallet files
- @pytest.mark.not_implemented
def test_export_and_import_wallet_files(self) -> None:
config: MoneroWalletConfig = MoneroWalletConfig()
config.path = ""
diff --git a/tests/test_monero_wallet_model.py b/tests/test_monero_wallet_model.py
index 9986456..350cc56 100644
--- a/tests/test_monero_wallet_model.py
+++ b/tests/test_monero_wallet_model.py
@@ -8,12 +8,13 @@
MoneroWalletConfig, MoneroDestination, MoneroUtils,
MoneroTxConfig, MoneroSubaddress, MoneroAccount, MoneroTxWallet,
MoneroOutputWallet, MoneroKeyImage, MoneroIntegratedAddress,
- MoneroKeyImageImportResult, MoneroMessageSignatureResult,
- MoneroMessageSignatureType, MoneroCheckTx, MoneroCheckReserve,
+ MoneroKeyImageImportResult, MoneroKeyImageExportResult, MoneroMessageSignatureResult,
+ MoneroMessageSignatureType, MoneroCheck, MoneroCheckTx, MoneroCheckReserve,
MoneroMultisigInfo, MoneroMultisigInitResult, MoneroMultisigSignResult,
MoneroAddressBookEntry, MoneroAccountTag, MoneroIncomingTransfer,
MoneroOutgoingTransfer, IncomingTransferComparator, OutputComparator, MoneroTx,
- MoneroTxSet
+ MoneroTxSet, MoneroSyncResult, MoneroDecodedAddress,
+ MoneroAddressType, MoneroNetworkType
)
from utils import BaseTestClass, TestUtils, AssertUtils
@@ -189,6 +190,11 @@ def test_wallet_config(self) -> None:
logger.debug(f"Deserialized config: {deserialized_config.serialize()}")
AssertUtils.assert_equals(config, deserialized_config)
+ @pytest.mark.parametrize("json_fragment", ['{"networkType":-1}', '{"networkType":3}'])
+ def test_wallet_config_invalid_network_type(self, json_fragment: str) -> None:
+ with pytest.raises(Exception, match="Invalid network type"):
+ MoneroWalletConfig.deserialize(json_fragment)
+
def test_tx_config(self) -> None:
config: MoneroTxConfig = MoneroTxConfig()
config.set_address(TestUtils.ADDRESS)
@@ -507,6 +513,60 @@ def test_tx_set_signed_tx_hex_deserialize(self) -> None:
tx_set.signed_tx_hex = "deadbeef"
AssertUtils.assert_serialization_integrity(tx_set)
+ def test_sync_result_deserialize(self) -> None:
+ result: MoneroSyncResult = MoneroSyncResult()
+ result.num_blocks_fetched = 42
+ result.received_money = True
+ AssertUtils.assert_serialization_integrity(result)
+
+ def test_check_deserialize(self) -> None:
+ check: MoneroCheck = MoneroCheck()
+ check.is_good = True
+ AssertUtils.assert_serialization_integrity(check)
+
+ def test_incoming_transfer_deserialize(self) -> None:
+ transfer: MoneroIncomingTransfer = MoneroIncomingTransfer()
+ transfer.amount = 500000
+ transfer.account_index = 0
+ transfer.subaddress_index = 1
+ transfer.address = TestUtils.ADDRESS
+ transfer.num_suggested_confirmations = 10
+ AssertUtils.assert_serialization_integrity(transfer)
+
+ def test_outgoing_transfer_deserialize(self) -> None:
+ transfer: MoneroOutgoingTransfer = MoneroOutgoingTransfer()
+ transfer.amount = 500000
+ transfer.account_index = 0
+ transfer.subaddress_indices = [0, 1]
+ transfer.addresses = [TestUtils.ADDRESS]
+ transfer.destinations = [MoneroDestination(TestUtils.ADDRESS, 500000)]
+ AssertUtils.assert_serialization_integrity(transfer)
+
+ def test_decoded_address_deserialize(self) -> None:
+ address: MoneroDecodedAddress = MoneroDecodedAddress(
+ TestUtils.ADDRESS, MoneroAddressType.PRIMARY_ADDRESS, MoneroNetworkType.MAINNET
+ )
+ AssertUtils.assert_serialization_integrity(address)
+
+ @pytest.mark.parametrize("json_fragment", [
+ '{"networkType":-1}',
+ '{"networkType":3}',
+ '{"addressType":-1}',
+ '{"addressType":3}',
+ ])
+ def test_decoded_address_invalid_enum_range(self, json_fragment: str) -> None:
+ with pytest.raises(Exception, match="Invalid (network|address) type"):
+ MoneroDecodedAddress.deserialize(json_fragment)
+
+ def test_key_image_export_result_deserialize(self) -> None:
+ result: MoneroKeyImageExportResult = MoneroKeyImageExportResult()
+ result.offset = 3
+ key_image: MoneroKeyImage = MoneroKeyImage()
+ key_image.hex = "a" * 64
+ key_image.signature = "b" * 128
+ result.key_images = [key_image]
+ AssertUtils.assert_serialization_integrity(result)
+
#endregion
#region Copy / merge / comparators
@@ -621,38 +681,28 @@ def test_outgoing_transfer_merge(self) -> None:
assert a.subaddress_indices == [0]
assert len(a.destinations) == 1
- @pytest.mark.xfail(reason="monero_outgoing_transfer::merge() dereferences destination address/amount unconditionally", strict=True)
def test_outgoing_transfer_merge_destinations_with_unset_fields(self) -> None:
- script: str = (
- "import monero, sys\n"
- # dirty the heap first: a clean freshly-started interpreter doesn't reliably
- # reproduce the crash, but a heap with realistic allocation churn (much closer to
- # a real test run or application) does, consistently
- "garbage = []\n"
- "for i in range(500):\n"
- " tx = monero.MoneroTxWallet()\n"
- " tx.hash = 'b' * 64 + str(i)\n"
- " tx.note = 'x' * (i % 200)\n"
- " garbage.append(tx)\n"
- "del garbage\n"
- "a = monero.MoneroOutgoingTransfer()\n"
- "a.amount = 500000\n"
- "a.account_index = 0\n"
- "a.destinations = [monero.MoneroDestination()]\n"
- "b = a.copy()\n"
- "b.destinations = [monero.MoneroDestination()]\n"
- "try:\n"
- " a.merge(b)\n"
- " sys.exit('merge() did not raise')\n"
- "except RuntimeError as e:\n"
- " sys.exit(0 if str(e) == 'Destination vectors are different' else f'wrong message: {e}')\n"
- )
- result: subprocess.CompletedProcess[str] = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, timeout=30)
- logger.debug(f"subprocess exit code: {result.returncode}, stderr: {result.stderr.strip()}")
- assert result.returncode == 0, (
- f"outgoing_transfer.merge() did not cleanly raise 'Destination vectors are different' "
- f"(exit code {result.returncode}): {result.stderr.strip()[-300:]}"
- )
+ # destinations with unset address/amount are a reachable state; merge()
+ # must compare them without dereferencing the empty optionals
+ a: MoneroOutgoingTransfer = MoneroOutgoingTransfer()
+ a.amount = 500000
+ a.account_index = 0
+ a.destinations = [MoneroDestination()]
+ b: MoneroOutgoingTransfer = a.copy()
+ b.destinations = [MoneroDestination()]
+ a.merge(b) # equal (empty) destinations -> no error
+ assert len(a.destinations) == 1
+
+ def test_outgoing_transfer_merge_conflicting_destinations_raises(self) -> None:
+ a: MoneroOutgoingTransfer = MoneroOutgoingTransfer()
+ a.amount = 500000
+ a.account_index = 0
+ a.destinations = [MoneroDestination(TestUtils.ADDRESS, 1)]
+ b: MoneroOutgoingTransfer = a.copy()
+ b.destinations = [MoneroDestination(TestUtils.ADDRESS, 2)]
+ with pytest.raises(RuntimeError) as exc_info:
+ a.merge(b)
+ assert str(exc_info.value) == "Destination vectors are different"
def test_output_wallet_copy(self) -> None:
output: MoneroOutputWallet = MoneroOutputWallet()