|
monero-c
C ABI for using Monero
|
#include "utils/monero_c_utils.h"#include "common/monero_c_rpc_connection.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | monero_wallet_listener_callbacks |
| Callbacks of a wallet listener. More... | |
Typedefs | |
| typedef struct monero_wallet | monero_wallet |
| Copyright (c) Libmonero. | |
| typedef struct monero_wallet_listener | monero_wallet_listener |
| Opaque listener that receives the wallet's notifications. | |
| typedef void(* | monero_wallet_on_sync_progress_fn) (void *user_data, uint64_t height, uint64_t start_height, uint64_t end_height, double percent_done, const char *message) |
| Called with the progress of a sync. | |
| typedef void(* | monero_wallet_on_new_block_fn) (void *user_data, uint64_t height) |
| Called when a new block is processed. | |
| typedef void(* | monero_wallet_on_balances_changed_fn) (void *user_data, uint64_t new_balance, uint64_t new_unlocked_balance) |
| Called when the balances of the wallet change. | |
| typedef void(* | monero_wallet_on_output_received_fn) (void *user_data, const char *output_json) |
| Called when the wallet receives an output. | |
| typedef void(* | monero_wallet_on_output_spent_fn) (void *user_data, const char *output_json) |
| Called when the wallet spends an output. | |
| typedef struct monero_wallet_listener_callbacks | monero_wallet_listener_callbacks |
| Callbacks of a wallet listener. | |
| typedef enum monero_message_signature_type | monero_message_signature_type |
| Key that signs a message. | |
| typedef enum monero_tx_priority | monero_tx_priority |
| Fee priority of a transaction. | |
Enumerations | |
| enum | monero_message_signature_type { MONERO_MESSAGE_SIGN_WITH_SPEND_KEY = 0 , MONERO_MESSAGE_SIGN_WITH_VIEW_KEY = 1 } |
| Key that signs a message. More... | |
| enum | monero_tx_priority { MONERO_TX_PRIORITY_DEFAULT = 0 , MONERO_TX_PRIORITY_UNIMPORTANT = 1 , MONERO_TX_PRIORITY_NORMAL = 2 , MONERO_TX_PRIORITY_ELEVATED = 3 } |
| Fee priority of a transaction. More... | |
Functions | |
| MONERO_EXPORT monero_result | monero_wallet_create_random (const char *path, const char *password, int32_t network_type, const char *language, monero_wallet **out_wallet) |
| Create a wallet with a new random seed and save it to disk. | |
| MONERO_EXPORT monero_result | monero_wallet_create_from_seed (const char *path, const char *password, int32_t network_type, const char *seed, const char *seed_offset, uint64_t restore_height, const char *language, monero_wallet **out_wallet) |
| Restore a wallet from its mnemonic seed and save it to disk. | |
| MONERO_EXPORT monero_result | monero_wallet_create_from_keys (const char *path, const char *password, int32_t network_type, const char *address, const char *private_view_key, const char *private_spend_key, uint64_t restore_height, const char *language, monero_wallet **out_wallet) |
| Restore a wallet from its keys and save it to disk. | |
| MONERO_EXPORT monero_result | monero_wallet_create (const char *config_json, monero_wallet **out_wallet) |
| Create a full wallet from a monero_wallet_config, which the other creation functions can't do: it can connect the wallet to a daemon when it is created, set the trust in the daemon, scan more accounts and subaddresses than the 50 and 200 of wallet2, and restore a multisig wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_open (const char *path, const char *password, int32_t network_type, monero_wallet **out_wallet) |
| Open a wallet from its files on disk. | |
| MONERO_EXPORT monero_result | monero_wallet_exists (const char *path, bool *out_exists) |
| Check if a wallet exists at the given path. | |
| MONERO_EXPORT monero_result | monero_wallet_get_seed_languages (char **out_json) |
| Get the languages a mnemonic seed can be written in. | |
| MONERO_EXPORT monero_result | monero_wallet_keys_create_random (int32_t network_type, const char *language, monero_wallet **out_wallet) |
| Create a keys-only wallet with a new random seed. | |
| MONERO_EXPORT monero_result | monero_wallet_keys_create_from_seed (int32_t network_type, const char *seed, const char *seed_offset, const char *language, monero_wallet **out_wallet) |
| Restore a keys-only wallet from its mnemonic seed. | |
| MONERO_EXPORT monero_result | monero_wallet_keys_create_from_keys (int32_t network_type, const char *address, const char *private_view_key, const char *private_spend_key, const char *language, monero_wallet **out_wallet) |
| Restore a keys-only wallet from its keys. | |
| MONERO_EXPORT monero_result | monero_wallet_save (monero_wallet *wallet) |
| Save the wallet to disk. | |
| MONERO_EXPORT monero_result | monero_wallet_close (monero_wallet *wallet, bool save) |
| Close the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_request_shutdown (monero_wallet *wallet) |
| Ask a full wallet to stop what it is doing, so that the calls that other threads have in flight on it return soon. | |
| MONERO_EXPORT void | monero_wallet_free (monero_wallet *wallet) |
| Release a wallet handle. | |
| MONERO_EXPORT monero_result | monero_wallet_get_network_type (monero_wallet *wallet, monero_utils_network_type *out_network_type) |
| Get the network of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_is_view_only (monero_wallet *wallet, bool *out_view_only) |
| Check if the wallet is view-only, which means it has no private spend key. | |
| MONERO_EXPORT monero_result | monero_wallet_is_multisig (monero_wallet *wallet, bool *out_multisig) |
| Check if the wallet is a multisig wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_seed (monero_wallet *wallet, char **out_seed) |
| Get the mnemonic seed of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_seed_language (monero_wallet *wallet, char **out_language) |
| Get the language of the mnemonic seed. | |
| MONERO_EXPORT monero_result | monero_wallet_get_primary_address (monero_wallet *wallet, char **out_address) |
| Get the primary address of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_private_view_key (monero_wallet *wallet, char **out_key) |
| Get the private view key of the wallet, in hex. | |
| MONERO_EXPORT monero_result | monero_wallet_get_private_spend_key (monero_wallet *wallet, char **out_key) |
| Get the private spend key of the wallet, in hex. | |
| MONERO_EXPORT monero_result | monero_wallet_get_height (monero_wallet *wallet, uint64_t *out_height) |
| Get the height of the blocks the wallet has synced to. | |
| MONERO_EXPORT monero_result | monero_wallet_get_balance (monero_wallet *wallet, uint64_t *out_balance) |
| Get the balance of the wallet, including funds that are still locked. | |
| MONERO_EXPORT monero_result | monero_wallet_get_unlocked_balance (monero_wallet *wallet, uint64_t *out_balance) |
| Get the unlocked balance of the wallet, the part that can be spent now. | |
| MONERO_EXPORT monero_result | monero_wallet_get_account_balance (monero_wallet *wallet, uint32_t account_idx, uint64_t *out_balance) |
| Get the balance of an account, including funds that are still locked. | |
| MONERO_EXPORT monero_result | monero_wallet_get_subaddress_balance (monero_wallet *wallet, uint32_t account_idx, uint32_t subaddress_idx, uint64_t *out_balance) |
| Get the balance of a subaddress, including funds that are still locked. | |
| MONERO_EXPORT monero_result | monero_wallet_get_account_unlocked_balance (monero_wallet *wallet, uint32_t account_idx, uint64_t *out_balance) |
| Get the unlocked balance of an account, the part that can be spent now. | |
| MONERO_EXPORT monero_result | monero_wallet_get_subaddress_unlocked_balance (monero_wallet *wallet, uint32_t account_idx, uint32_t subaddress_idx, uint64_t *out_balance) |
| Get the unlocked balance of a subaddress, the part that can be spent now. | |
| MONERO_EXPORT monero_result | monero_wallet_get_address (monero_wallet *wallet, uint32_t account_idx, uint32_t subaddress_idx, char **out_address) |
| Get the address of an account and subaddress. | |
| MONERO_EXPORT monero_result | monero_wallet_get_integrated_address (monero_wallet *wallet, const char *standard_address, const char *payment_id, char **out_json) |
| Get the integrated address of a standard address and a payment ID. | |
| MONERO_EXPORT monero_result | monero_wallet_decode_integrated_address (monero_wallet *wallet, const char *integrated_address, char **out_json) |
| Decode an integrated address into its standard address and payment ID. | |
| MONERO_EXPORT monero_result | monero_wallet_get_account (monero_wallet *wallet, uint32_t account_idx, bool include_subaddresses, char **out_json) |
| Get an account, with or without its subaddresses. | |
| MONERO_EXPORT monero_result | monero_wallet_get_subaddresses (monero_wallet *wallet, uint32_t account_idx, const uint32_t *subaddress_indices, size_t num_subaddress_indices, char **out_json) |
| Get the subaddresses of an account. | |
| MONERO_EXPORT monero_result | monero_wallet_sign_message (monero_wallet *wallet, const char *message, int32_t signature_type, uint32_t account_idx, uint32_t subaddress_idx, char **out_signature) |
| Sign a message with the spend key or the view key of an account and subaddress. | |
| MONERO_EXPORT monero_result | monero_wallet_verify_message (monero_wallet *wallet, const char *message, const char *address, const char *signature, char **out_json) |
| Verify a signature made by monero_wallet_sign_message() for an address. | |
| MONERO_EXPORT monero_result | monero_wallet_add_address_book_entry (monero_wallet *wallet, const char *address, const char *description, uint64_t *out_index) |
| Add an address to the address book. | |
| MONERO_EXPORT monero_result | monero_wallet_edit_address_book_entry (monero_wallet *wallet, uint64_t index, const char *address, const char *description) |
| Edit an address book entry. | |
| MONERO_EXPORT monero_result | monero_wallet_delete_address_book_entry (monero_wallet *wallet, uint64_t index) |
| Delete an address book entry. | |
| MONERO_EXPORT monero_result | monero_wallet_get_address_book_entries (monero_wallet *wallet, const uint64_t *indices, size_t num_indices, char **out_json) |
| Get the address book entries with the given indices. | |
| MONERO_EXPORT monero_result | monero_wallet_change_password (monero_wallet *wallet, const char *old_password, const char *new_password) |
| Change the password of the wallet files. | |
| MONERO_EXPORT monero_result | monero_wallet_create_account (monero_wallet *wallet, const char *label, char **out_json) |
| Create an account, with the next account index. | |
| MONERO_EXPORT monero_result | monero_wallet_create_subaddress (monero_wallet *wallet, uint32_t account_idx, const char *label, char **out_json) |
| Create a subaddress in an account. | |
| MONERO_EXPORT monero_result | monero_wallet_get_accounts (monero_wallet *wallet, bool include_subaddresses, char **out_json) |
| Get the accounts of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_address_index (monero_wallet *wallet, const char *address, char **out_json) |
| Get the subaddress of an address. | |
| MONERO_EXPORT monero_result | monero_wallet_get_subaddress (monero_wallet *wallet, uint32_t account_idx, uint32_t subaddress_idx, char **out_json) |
| Get a subaddress by its indices. | |
| MONERO_EXPORT monero_result | monero_wallet_set_subaddress_label (monero_wallet *wallet, uint32_t account_idx, uint32_t subaddress_idx, const char *label) |
| Set the label of a subaddress. | |
| MONERO_EXPORT monero_result | monero_wallet_set_account_tag_label (monero_wallet *wallet, const char *tag, const char *label) |
| Set the label of an account tag. | |
| MONERO_EXPORT monero_result | monero_wallet_get_account_tags (monero_wallet *wallet, char **out_json) |
| Get the account tags of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_tag_accounts (monero_wallet *wallet, const char *tag, const uint32_t *account_indices, size_t num_account_indices) |
| Tag accounts with a tag. | |
| MONERO_EXPORT monero_result | monero_wallet_untag_accounts (monero_wallet *wallet, const uint32_t *account_indices, size_t num_account_indices) |
| Remove the tags of accounts. | |
| MONERO_EXPORT monero_result | monero_wallet_get_attribute (monero_wallet *wallet, const char *key, bool *out_found, char **out_value) |
| Get an attribute, a key and value that the wallet stores with its files. | |
| MONERO_EXPORT monero_result | monero_wallet_set_attribute (monero_wallet *wallet, const char *key, const char *value) |
| Set an attribute. | |
| MONERO_EXPORT monero_result | monero_wallet_get_default_fee_priority (monero_wallet *wallet, monero_tx_priority *out_priority) |
| Get the default priority of the fee of the transactions. | |
| MONERO_EXPORT monero_result | monero_wallet_get_path (monero_wallet *wallet, char **out_path) |
| Get the path of the wallet file. | |
| MONERO_EXPORT monero_result | monero_wallet_get_public_view_key (monero_wallet *wallet, char **out_key) |
| Get the public view key of the wallet, in hex. | |
| MONERO_EXPORT monero_result | monero_wallet_get_public_spend_key (monero_wallet *wallet, char **out_key) |
| Get the public spend key of the wallet, in hex. | |
| MONERO_EXPORT monero_result | monero_wallet_get_version (monero_wallet *wallet, char **out_json) |
| Get the version of the wallet library. | |
| MONERO_EXPORT monero_result | monero_wallet_get_restore_height (monero_wallet *wallet, uint64_t *out_height) |
| Get the height from which the wallet scans the blocks. | |
| MONERO_EXPORT monero_result | monero_wallet_set_restore_height (monero_wallet *wallet, uint64_t restore_height) |
| Set the height from which the wallet scans the blocks. | |
| MONERO_EXPORT monero_result | monero_wallet_is_closed (monero_wallet *wallet, bool *out_closed) |
| Check if the wallet is closed. | |
| MONERO_EXPORT monero_result | monero_wallet_export_key_images (monero_wallet *wallet, bool all, char **out_json) |
| Export the key images of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_import_key_images (monero_wallet *wallet, const char *key_images_json, uint64_t offset, char **out_json) |
| Import key images into the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_export_outputs (monero_wallet *wallet, bool all, char **out_hex) |
| Export the outputs of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_import_outputs (monero_wallet *wallet, const char *outputs_hex, int32_t *out_num_imported) |
| Import outputs into the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_freeze_output (monero_wallet *wallet, const char *key_image) |
| Freeze an output, so the wallet doesn't spend it. | |
| MONERO_EXPORT monero_result | monero_wallet_thaw_output (monero_wallet *wallet, const char *key_image) |
| Thaw a frozen output. | |
| MONERO_EXPORT monero_result | monero_wallet_is_output_frozen (monero_wallet *wallet, const char *key_image, bool *out_frozen) |
| Check if an output is frozen. | |
| MONERO_EXPORT monero_result | monero_wallet_get_tx_note (monero_wallet *wallet, const char *tx_hash, char **out_note) |
| Get the note of a transaction. | |
| MONERO_EXPORT monero_result | monero_wallet_set_tx_note (monero_wallet *wallet, const char *tx_hash, const char *note) |
| Set the note of a transaction. | |
| MONERO_EXPORT monero_result | monero_wallet_get_tx_notes (monero_wallet *wallet, const char *const *tx_hashes, size_t num_tx_hashes, char **out_json) |
| Get the notes of transactions. | |
| MONERO_EXPORT monero_result | monero_wallet_set_tx_notes (monero_wallet *wallet, const char *const *tx_hashes, const char *const *notes, size_t num_tx_hashes) |
| Set the notes of transactions. | |
| MONERO_EXPORT monero_result | monero_wallet_set_daemon_connection (monero_wallet *wallet, const char *uri, const char *username, const char *password, const char *proxy_uri, const bool *is_trusted, bool ssl_verify) |
| Set the daemon connection of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_daemon_connection (monero_wallet *wallet, char **out_json) |
| Get the daemon connection of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_is_daemon_trusted (monero_wallet *wallet, bool *out_trusted) |
| Check if the daemon is trusted. | |
| MONERO_EXPORT monero_result | monero_wallet_listener_create (const monero_wallet_listener_callbacks *callbacks, monero_wallet_listener **out_listener) |
| Create a listener from its callbacks. | |
| MONERO_EXPORT void | monero_wallet_listener_free (monero_wallet_listener *listener) |
| Release a listener. | |
| MONERO_EXPORT monero_result | monero_wallet_add_listener (monero_wallet *wallet, monero_wallet_listener *listener) |
| Register a listener with a wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_remove_listener (monero_wallet *wallet, monero_wallet_listener *listener) |
| Unregister a listener from a wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_remove_listeners (monero_wallet *wallet) |
| Unregister all the listeners of a wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_sync (monero_wallet *wallet, const uint64_t *start_height, monero_wallet_listener *listener, char **out_json) |
| Synchronize the wallet with the daemon in the calling thread. | |
| MONERO_EXPORT monero_result | monero_wallet_start_syncing (monero_wallet *wallet, uint64_t sync_period_ms) |
| Start a background thread that syncs the wallet with the daemon. | |
| MONERO_EXPORT monero_result | monero_wallet_stop_syncing (monero_wallet *wallet) |
| Stop the background thread that syncs the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_is_connected_to_daemon (monero_wallet *wallet, bool *out_connected) |
| Check if the wallet is connected to a daemon. | |
| MONERO_EXPORT monero_result | monero_wallet_is_daemon_synced (monero_wallet *wallet, bool *out_synced) |
| Check if the daemon of the wallet is synced with the network. | |
| MONERO_EXPORT monero_result | monero_wallet_is_synced (monero_wallet *wallet, bool *out_synced) |
| Check if the wallet is synced with the daemon. | |
| MONERO_EXPORT monero_result | monero_wallet_get_daemon_height (monero_wallet *wallet, uint64_t *out_height) |
| Get the height the daemon of the wallet is synced to. | |
| MONERO_EXPORT monero_result | monero_wallet_get_daemon_max_peer_height (monero_wallet *wallet, uint64_t *out_height) |
| Get the maximum height of the peers the daemon of the wallet is connected to. | |
| MONERO_EXPORT monero_result | monero_wallet_wait_for_next_block (monero_wallet *wallet, uint64_t *out_height) |
| Wait until the next block is added to the chain. | |
| MONERO_EXPORT monero_result | monero_wallet_scan_txs (monero_wallet *wallet, const char *const *tx_hashes, size_t num_tx_hashes) |
| Scan transactions by their hashes. | |
| MONERO_EXPORT monero_result | monero_wallet_rescan_blockchain (monero_wallet *wallet) |
| Rescan the blockchain from scratch. | |
| MONERO_EXPORT monero_result | monero_wallet_rescan_spent (monero_wallet *wallet) |
| Rescan the blockchain for spent outputs. | |
| MONERO_EXPORT monero_result | monero_wallet_get_height_by_date (monero_wallet *wallet, uint16_t year, uint8_t month, uint8_t day, uint64_t *out_height) |
| Get the approximate height of the blockchain at a date. | |
| MONERO_EXPORT monero_result | monero_wallet_start_mining (monero_wallet *wallet, const uint64_t *num_threads, const bool *background_mining, const bool *ignore_battery) |
| Start mining on the daemon. | |
| MONERO_EXPORT monero_result | monero_wallet_stop_mining (monero_wallet *wallet) |
| Stop mining on the daemon. | |
| MONERO_EXPORT monero_result | monero_wallet_get_txs (monero_wallet *wallet, const char *query_json, char **out_json) |
| Get the transactions of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_transfers (monero_wallet *wallet, const char *query_json, char **out_json) |
| Get the incoming and outgoing transfers of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_outputs (monero_wallet *wallet, const char *query_json, char **out_json) |
| Get the outputs of the wallet that it can spend. | |
| MONERO_EXPORT monero_result | monero_wallet_create_tx (monero_wallet *wallet, const char *config_json, char **out_json) |
| Create a transaction that transfers funds from the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_create_txs (monero_wallet *wallet, const char *config_json, char **out_json) |
| Create one or more transactions that transfer funds from the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_relay_tx (monero_wallet *wallet, const char *tx_metadata, char **out_hash) |
| Relay a transaction that was created without relaying. | |
| MONERO_EXPORT monero_result | monero_wallet_relay_tx_json (monero_wallet *wallet, const char *tx_json, char **out_hash) |
| Relay a transaction created without relaying, from its JSON. | |
| MONERO_EXPORT monero_result | monero_wallet_relay_txs (monero_wallet *wallet, const char *const *tx_metadatas, size_t num_tx_metadatas, char **out_json) |
| Relay transactions that were created without relaying. | |
| MONERO_EXPORT monero_result | monero_wallet_relay_txs_json (monero_wallet *wallet, const char *txs_json, char **out_json) |
| Relay transactions created without relaying, from a JSON array. | |
| MONERO_EXPORT monero_result | monero_wallet_submit_txs (monero_wallet *wallet, const char *signed_tx_hex, char **out_json) |
| Submit signed transactions of a view-only wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_sign_txs (monero_wallet *wallet, const char *unsigned_tx_hex, char **out_json) |
| Sign unsigned transactions of a view-only wallet with the full wallet that created them. | |
| MONERO_EXPORT monero_result | monero_wallet_describe_tx_set (monero_wallet *wallet, const char *tx_set_json, char **out_json) |
| Describe a transaction set with unsigned or multisig hex as structured transactions. | |
| MONERO_EXPORT monero_result | monero_wallet_sweep_output (monero_wallet *wallet, const char *config_json, char **out_json) |
| Sweep an output with a given key image into the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_sweep_dust (monero_wallet *wallet, bool relay, char **out_json) |
| Sweep the unmixable dust outputs back to the wallet, so they are easier to spend and mix. | |
| MONERO_EXPORT monero_result | monero_wallet_sweep_unlocked (monero_wallet *wallet, const char *config_json, char **out_json) |
| Sweep the unlocked funds of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_move_to (monero_wallet *wallet, const char *path, const char *password) |
| Move the wallet files to another path. | |
| MONERO_EXPORT monero_result | monero_wallet_get_payment_uri (monero_wallet *wallet, const char *config_json, char **out_uri) |
| Create a payment URI from a transaction config. | |
| MONERO_EXPORT monero_result | monero_wallet_parse_payment_uri (monero_wallet *wallet, const char *uri, char **out_json) |
| Parse a payment URI into a transaction config. | |
| MONERO_EXPORT monero_result | monero_wallet_get_tx_key (monero_wallet *wallet, const char *tx_hash, char **out_key) |
| Get the secret key of a transaction from its hash. | |
| MONERO_EXPORT monero_result | monero_wallet_check_tx_key (monero_wallet *wallet, const char *tx_hash, const char *tx_key, const char *address, char **out_json) |
| Check a transaction in the blockchain with its secret key. | |
| MONERO_EXPORT monero_result | monero_wallet_get_tx_proof (monero_wallet *wallet, const char *tx_hash, const char *address, const char *message, char **out_signature) |
| Get a signature that proves a transaction sent to an address. | |
| MONERO_EXPORT monero_result | monero_wallet_check_tx_proof (monero_wallet *wallet, const char *tx_hash, const char *address, const char *message, const char *signature, char **out_json) |
| Check a transaction proof, the signature made by monero_wallet_get_tx_proof(). | |
| MONERO_EXPORT monero_result | monero_wallet_get_spend_proof (monero_wallet *wallet, const char *tx_hash, const char *message, char **out_signature) |
| Get a signature that proves a spend of a transaction. | |
| MONERO_EXPORT monero_result | monero_wallet_check_spend_proof (monero_wallet *wallet, const char *tx_hash, const char *message, const char *signature, bool *out_good) |
| Check a spend proof, the signature made by monero_wallet_get_spend_proof(). | |
| MONERO_EXPORT monero_result | monero_wallet_get_reserve_proof_wallet (monero_wallet *wallet, const char *message, char **out_signature) |
| Get a signature that proves the whole balance of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_get_reserve_proof_account (monero_wallet *wallet, uint32_t account_idx, uint64_t amount, const char *message, char **out_signature) |
| Get a signature that proves an amount available in an account. | |
| MONERO_EXPORT monero_result | monero_wallet_check_reserve_proof (monero_wallet *wallet, const char *address, const char *message, const char *signature, char **out_json) |
| Check a reserve proof, the signature made by monero_wallet_get_reserve_proof_wallet() or monero_wallet_get_reserve_proof_account(). | |
| MONERO_EXPORT monero_result | monero_wallet_is_multisig_import_needed (monero_wallet *wallet, bool *out_needed) |
| Check if importing multisig data is needed for a correct balance. | |
| MONERO_EXPORT monero_result | monero_wallet_get_multisig_info (monero_wallet *wallet, char **out_json) |
| Get the multisig info of the wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_prepare_multisig (monero_wallet *wallet, char **out_multisig_hex) |
| Get the multisig hex to share with the participants, to start making a multisig wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_make_multisig (monero_wallet *wallet, const char *const *multisig_hexes, size_t num_multisig_hexes, int32_t threshold, const char *password, char **out_multisig_hex) |
| Make the wallet multisig from the multisig hex of the other participants. | |
| MONERO_EXPORT monero_result | monero_wallet_exchange_multisig_keys (monero_wallet *wallet, const char *const *multisig_hexes, size_t num_multisig_hexes, const char *password, char **out_json) |
| Exchange the multisig hex with the other participants. | |
| MONERO_EXPORT monero_result | monero_wallet_export_multisig_hex (monero_wallet *wallet, char **out_multisig_hex) |
| Export the multisig info of the wallet as hex, for the other participants. | |
| MONERO_EXPORT monero_result | monero_wallet_import_multisig_hex (monero_wallet *wallet, const char *const *multisig_hexes, size_t num_multisig_hexes, bool refresh_after_import, int32_t *out_num_imported) |
| Import the multisig info of the other participants, as hex. | |
| MONERO_EXPORT monero_result | monero_wallet_sign_multisig_tx_hex (monero_wallet *wallet, const char *multisig_tx_hex, char **out_json) |
| Sign multisig transactions, given as the hex shared when they were created. | |
| MONERO_EXPORT monero_result | monero_wallet_submit_multisig_tx_hex (monero_wallet *wallet, const char *signed_multisig_tx_hex, char **out_json) |
| Submit signed multisig transactions, given as hex. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_connect (monero_rpc_connection *connection, monero_wallet **out_wallet) |
| Connect to a monero-wallet-rpc server through a shared connection, with its proxy, timeout and TLS settings. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_open_wallet (monero_wallet *wallet, const char *name, const char *wallet_password) |
| Open a wallet on the server of an RPC wallet. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_create_wallet (monero_wallet *wallet, const char *config_json) |
| Create a wallet on the server of an RPC wallet and open it. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_open (const char *uri, const char *username, const char *password, const char *name, const char *wallet_password, monero_wallet **out_wallet) |
| Open a wallet on a monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_create_random (const char *uri, const char *username, const char *password, const char *name, const char *wallet_password, const char *language, monero_wallet **out_wallet) |
| Create a random wallet on a monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_create_from_seed (const char *uri, const char *username, const char *password, const char *name, const char *wallet_password, const char *seed, const char *seed_offset, uint64_t restore_height, const char *language, monero_wallet **out_wallet) |
| Restore a wallet from its mnemonic seed on a monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_create_from_keys (const char *uri, const char *username, const char *password, const char *name, const char *wallet_password, const char *address, const char *private_view_key, const char *private_spend_key, uint64_t restore_height, const char *language, monero_wallet **out_wallet) |
| Restore a wallet from its keys on a monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_stop (monero_wallet *wallet) |
| Save and close the wallet and stop the monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_seed_languages (monero_wallet *wallet, char **out_json) |
| Get the seed languages that the monero-wallet-rpc server supports. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_connection (monero_wallet *wallet, char **out_json) |
| Get the connection to the monero-wallet-rpc server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_set_poll_period (monero_wallet *wallet, uint64_t period_ms) |
| Set how often the RPC wallet polls the server for changes. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_balances (monero_wallet *wallet, const uint32_t *account_idx, const uint32_t *subaddress_idx, char **out_json) |
| Get the balances of an account or a subaddress, from the server. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_account (monero_wallet *wallet, uint32_t account_idx, bool include_subaddresses, bool skip_balances, char **out_json) |
| Get an account from the server, with or without its subaddresses and balances. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_accounts (monero_wallet *wallet, bool include_subaddresses, const char *tag, bool skip_balances, char **out_json) |
| Get the accounts of the wallet from the server, optionally only those with a tag. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_get_subaddresses (monero_wallet *wallet, uint32_t account_idx, const uint32_t *subaddress_indices, size_t num_subaddress_indices, bool skip_balances, char **out_json) |
| Get the subaddresses of an account from the server, with the given indices. | |
| MONERO_EXPORT monero_result | monero_wallet_rpc_set_daemon_connection (monero_wallet *wallet, const char *connection_json, bool is_trusted, const char *ssl_options_json) |
| Set the daemon connection of an RPC wallet, with the SSL options of the connection. | |
Key that signs a message.
Values match monero-cpp's monero_message_signature_type.
| typedef enum monero_tx_priority monero_tx_priority |
Fee priority of a transaction.
Values match monero-cpp's monero_tx_priority.
| typedef struct monero_wallet monero_wallet |
Copyright (c) Libmonero.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Opaque handle to a wallet. Full wallets come from monero_wallet_create_random(), monero_wallet_create_from_seed(), monero_wallet_create_from_keys() and monero_wallet_open(). Keys-only wallets come from the monero_wallet_keys_create_*() functions. Release the handle with monero_wallet_free().
| typedef struct monero_wallet_listener monero_wallet_listener |
Opaque listener that receives the wallet's notifications.
Create it with monero_wallet_listener_create() and release it with monero_wallet_listener_free().
| typedef struct monero_wallet_listener_callbacks monero_wallet_listener_callbacks |
Callbacks of a wallet listener.
The struct is copied by monero_wallet_listener_create(). A NULL callback is skipped.
| typedef void(* monero_wallet_on_balances_changed_fn) (void *user_data, uint64_t new_balance, uint64_t new_unlocked_balance) |
Called when the balances of the wallet change.
| user_data | is the user_data of the monero_wallet_listener_callbacks |
| new_balance | is the new balance in atomic units |
| new_unlocked_balance | is the new unlocked balance in atomic units |
| typedef void(* monero_wallet_on_new_block_fn) (void *user_data, uint64_t height) |
Called when a new block is processed.
| user_data | is the user_data of the monero_wallet_listener_callbacks |
| height | is the height of the new block |
| typedef void(* monero_wallet_on_output_received_fn) (void *user_data, const char *output_json) |
Called when the wallet receives an output.
The JSON is valid only during the call.
| user_data | is the user_data of the monero_wallet_listener_callbacks |
| output_json | is a JSON object with the output in its transaction and its block, {"blocks":[...]}, as monero_wallet_get_outputs() returns it. The block has the height of the transaction, and none if the transaction is in the pool. The transaction has its hash, its unlock time and whether it is locked, and the output is in its "outputs" with its amount and the indices of its account and subaddress |
| typedef void(* monero_wallet_on_output_spent_fn) (void *user_data, const char *output_json) |
Called when the wallet spends an output.
The JSON is valid only during the call.
| user_data | is the user_data of the monero_wallet_listener_callbacks |
| output_json | is a JSON object with the spent output in its transaction and its block, {"blocks":[...]}, as monero_wallet_get_outputs() returns it. The block has the height of the transaction, and none if the transaction is in the pool. The transaction has its hash, its unlock time and whether it is locked, and the output is in its "inputs" with its amount and the indices of its account and subaddress |
| typedef void(* monero_wallet_on_sync_progress_fn) (void *user_data, uint64_t height, uint64_t start_height, uint64_t end_height, double percent_done, const char *message) |
Called with the progress of a sync.
The message is valid only during the call.
| user_data | is the user_data of the monero_wallet_listener_callbacks |
| height | is the height of the synced block |
| start_height | is the starting height of the sync request |
| end_height | is the ending height of the sync request |
| percent_done | is the sync progress, from 0 to 1 |
| message | is a human-readable description of the progress |
| enum monero_tx_priority |
| MONERO_EXPORT monero_result monero_wallet_add_address_book_entry | ( | monero_wallet * | wallet, |
| const char * | address, | ||
| const char * | description, | ||
| uint64_t * | out_index | ||
| ) |
Add an address to the address book.
| wallet | is the wallet handle |
| address | is the address to add |
| description | is the description of the address. NULL or "" for none |
| out_index | receives the index of the new entry |
| MONERO_EXPORT monero_result monero_wallet_add_listener | ( | monero_wallet * | wallet, |
| monero_wallet_listener * | listener | ||
| ) |
Register a listener with a wallet.
Adding it again to the same wallet does nothing. A listener belongs to one wallet at a time, so adding it to another wallet fails until it is removed from the first one.
| wallet | is the wallet handle |
| listener | is the listener to register |
| MONERO_EXPORT monero_result monero_wallet_change_password | ( | monero_wallet * | wallet, |
| const char * | old_password, | ||
| const char * | new_password | ||
| ) |
Change the password of the wallet files.
| wallet | is the wallet handle |
| old_password | is the current password |
| new_password | is the new password |
| MONERO_EXPORT monero_result monero_wallet_check_reserve_proof | ( | monero_wallet * | wallet, |
| const char * | address, | ||
| const char * | message, | ||
| const char * | signature, | ||
| char ** | out_json | ||
| ) |
Check a reserve proof, the signature made by monero_wallet_get_reserve_proof_wallet() or monero_wallet_get_reserve_proof_account().
| wallet | is the wallet handle |
| address | is the address of the wallet |
| message | is the message included in the signature. NULL or "" for none |
| signature | is the signature to check |
| out_json | receives the JSON-serialized monero_check_reserve. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_check_spend_proof | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | message, | ||
| const char * | signature, | ||
| bool * | out_good | ||
| ) |
Check a spend proof, the signature made by monero_wallet_get_spend_proof().
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| message | is the message included in the signature. NULL or "" for none |
| signature | is the signature to check |
| out_good | receives true if the signature is good |
| MONERO_EXPORT monero_result monero_wallet_check_tx_key | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | tx_key, | ||
| const char * | address, | ||
| char ** | out_json | ||
| ) |
Check a transaction in the blockchain with its secret key.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| tx_key | is the secret key of the transaction |
| address | is the destination address of the transaction |
| out_json | receives the JSON-serialized monero_check_tx. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_check_tx_proof | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | address, | ||
| const char * | message, | ||
| const char * | signature, | ||
| char ** | out_json | ||
| ) |
Check a transaction proof, the signature made by monero_wallet_get_tx_proof().
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| address | is the destination address of the transaction |
| message | is the message included in the signature. NULL or "" for none |
| signature | is the signature to check |
| out_json | receives the JSON-serialized monero_check_tx. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_close | ( | monero_wallet * | wallet, |
| bool | save | ||
| ) |
Close the wallet.
Its methods fail afterwards, but the handle must still be freed.
| wallet | is the wallet handle |
| save | saves the wallet to disk before closing it |
| MONERO_EXPORT monero_result monero_wallet_create | ( | const char * | config_json, |
| monero_wallet ** | out_wallet | ||
| ) |
Create a full wallet from a monero_wallet_config, which the other creation functions can't do: it can connect the wallet to a daemon when it is created, set the trust in the daemon, scan more accounts and subaddresses than the 50 and 200 of wallet2, and restore a multisig wallet.
The wallet is restored from its seed if the config has one, from its keys if it has the address or the private keys, and has a new random seed otherwise.
The fields of the JSON, all optional but networkType, and the ones that are null are ignored:
A seed and keys together fail. So does a restore height with neither of them, since a random wallet starts from the current height, or from 0 on regtest, and it can't start from another.
| config_json | is the JSON-serialized monero_wallet_config |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_create_account | ( | monero_wallet * | wallet, |
| const char * | label, | ||
| char ** | out_json | ||
| ) |
Create an account, with the next account index.
| wallet | is the wallet handle |
| label | is the label of the account. NULL or "" for none |
| out_json | receives the JSON-serialized monero_account. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_create_from_keys | ( | const char * | path, |
| const char * | password, | ||
| int32_t | network_type, | ||
| const char * | address, | ||
| const char * | private_view_key, | ||
| const char * | private_spend_key, | ||
| uint64_t | restore_height, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a wallet from its keys and save it to disk.
Without a private spend key the wallet is view-only.
| path | is the path of the wallet file |
| password | encrypts the wallet files. NULL or "" for no password |
| network_type | is the monero_utils_network_type of the wallet |
| address | is the primary address |
| private_view_key | is the private view key, in hex |
| private_spend_key | is the private spend key, in hex. NULL or "" for a view-only wallet |
| restore_height | is the first block to scan. 0 scans from the genesis block |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_create_from_seed | ( | const char * | path, |
| const char * | password, | ||
| int32_t | network_type, | ||
| const char * | seed, | ||
| const char * | seed_offset, | ||
| uint64_t | restore_height, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a wallet from its mnemonic seed and save it to disk.
| path | is the path of the wallet file |
| password | encrypts the wallet files. NULL or "" for no password |
| network_type | is the monero_utils_network_type of the wallet |
| seed | is the mnemonic seed, at most 4096 bytes |
| seed_offset | is the passphrase that extends the seed. NULL or "" for none |
| restore_height | is the first block to scan. 0 scans from the genesis block |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_create_random | ( | const char * | path, |
| const char * | password, | ||
| int32_t | network_type, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Create a wallet with a new random seed and save it to disk.
The keys are written to path + ".keys". The wallet scans from an estimate of the current height, or from 0 on regtest.
| path | is the path of the wallet file |
| password | encrypts the wallet files. NULL or "" for no password |
| network_type | is the monero_utils_network_type of the wallet |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_create_subaddress | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| const char * | label, | ||
| char ** | out_json | ||
| ) |
Create a subaddress in an account.
| wallet | is the wallet handle |
| account_idx | is the index of the account |
| label | is the label of the subaddress. NULL or "" for none |
| out_json | receives the JSON-serialized monero_subaddress. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_create_tx | ( | monero_wallet * | wallet, |
| const char * | config_json, | ||
| char ** | out_json | ||
| ) |
Create a transaction that transfers funds from the wallet.
It is relayed only if the config says so.
| wallet | is the wallet handle |
| config_json | is the JSON-serialized monero_tx_config |
| out_json | receives a JSON object with the tx set of the transaction, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_create_txs | ( | monero_wallet * | wallet, |
| const char * | config_json, | ||
| char ** | out_json | ||
| ) |
Create one or more transactions that transfer funds from the wallet.
A view-only wallet creates the unsigned hex that monero_wallet_sign_txs() takes, in the tx set.
| wallet | is the wallet handle |
| config_json | is the JSON-serialized monero_tx_config |
| out_json | receives a JSON object with the tx set of the transactions, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_decode_integrated_address | ( | monero_wallet * | wallet, |
| const char * | integrated_address, | ||
| char ** | out_json | ||
| ) |
Decode an integrated address into its standard address and payment ID.
| wallet | is the wallet handle |
| integrated_address | is the integrated address |
| out_json | receives the JSON-serialized monero_integrated_address. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_delete_address_book_entry | ( | monero_wallet * | wallet, |
| uint64_t | index | ||
| ) |
Delete an address book entry.
| wallet | is the wallet handle |
| index | is the index of the entry |
| MONERO_EXPORT monero_result monero_wallet_describe_tx_set | ( | monero_wallet * | wallet, |
| const char * | tx_set_json, | ||
| char ** | out_json | ||
| ) |
Describe a transaction set with unsigned or multisig hex as structured transactions.
Only the hex of the set is read, so the output of monero_wallet_create_txs() can be passed as it is.
| wallet | is the wallet handle |
| tx_set_json | is the JSON-serialized monero_tx_set, with its unsignedTxHex or multisigTxHex, or the tx sets with one set |
| out_json | receives a JSON object with the tx set of the structured transactions, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_edit_address_book_entry | ( | monero_wallet * | wallet, |
| uint64_t | index, | ||
| const char * | address, | ||
| const char * | description | ||
| ) |
Edit an address book entry.
A NULL address or description is left unchanged.
| wallet | is the wallet handle |
| index | is the index of the entry |
| address | is the new address, or NULL |
| description | is the new description, or NULL |
| MONERO_EXPORT monero_result monero_wallet_exchange_multisig_keys | ( | monero_wallet * | wallet, |
| const char *const * | multisig_hexes, | ||
| size_t | num_multisig_hexes, | ||
| const char * | password, | ||
| char ** | out_json | ||
| ) |
Exchange the multisig hex with the other participants.
Repeat it with the new multisig hex of each participant until the result has an address. A 2 of 3 wallet needs two exchanges after make.
| wallet | is the wallet handle |
| multisig_hexes | are the multisig hex of each participant |
| num_multisig_hexes | is the number of elements in multisig_hexes |
| password | is the password of the wallet |
| out_json | receives the JSON-serialized monero_multisig_init_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_exists | ( | const char * | path, |
| bool * | out_exists | ||
| ) |
Check if a wallet exists at the given path.
It looks for the keys file, path + ".keys".
| path | is the path of the wallet file |
| out_exists | receives true if the wallet exists |
| MONERO_EXPORT monero_result monero_wallet_export_key_images | ( | monero_wallet * | wallet, |
| bool | all, | ||
| char ** | out_json | ||
| ) |
Export the key images of the wallet.
| wallet | is the wallet handle |
| all | is true to include the key images of the spent outputs |
| out_json | receives the JSON-serialized monero_key_image_export_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_export_multisig_hex | ( | monero_wallet * | wallet, |
| char ** | out_multisig_hex | ||
| ) |
Export the multisig info of the wallet as hex, for the other participants.
| wallet | is the wallet handle |
| out_multisig_hex | receives the hex. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_export_outputs | ( | monero_wallet * | wallet, |
| bool | all, | ||
| char ** | out_hex | ||
| ) |
Export the outputs of the wallet.
| wallet | is the wallet handle |
| all | is true to include the spent outputs |
| out_hex | receives the outputs in hex. Free with monero_utils_free() |
| MONERO_EXPORT void monero_wallet_free | ( | monero_wallet * | wallet | ) |
Release a wallet handle.
A wallet that is still open is closed without saving, so call monero_wallet_save() first to keep the changes.
| wallet | is the handle to release |
| MONERO_EXPORT monero_result monero_wallet_freeze_output | ( | monero_wallet * | wallet, |
| const char * | key_image | ||
| ) |
Freeze an output, so the wallet doesn't spend it.
Fails for an unknown key image.
| wallet | is the wallet handle |
| key_image | is the key image of the output, in hex |
| MONERO_EXPORT monero_result monero_wallet_get_account | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| bool | include_subaddresses, | ||
| char ** | out_json | ||
| ) |
Get an account, with or without its subaddresses.
| wallet | is the wallet handle |
| account_idx | is the account index |
| include_subaddresses | is true to include the subaddresses of the account |
| out_json | receives the JSON-serialized monero_account. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_account_balance | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint64_t * | out_balance | ||
| ) |
Get the balance of an account, including funds that are still locked.
Keys-only wallets don't support it.
| wallet | is the wallet handle |
| account_idx | is the account index |
| out_balance | receives the balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_account_tags | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the account tags of the wallet.
Full wallets don't support it.
| wallet | is the wallet handle |
| out_json | receives a JSON array of monero_account_tag. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_account_unlocked_balance | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint64_t * | out_balance | ||
| ) |
Get the unlocked balance of an account, the part that can be spent now.
Keys-only wallets don't support it.
| wallet | is the wallet handle |
| account_idx | is the account index |
| out_balance | receives the unlocked balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_accounts | ( | monero_wallet * | wallet, |
| bool | include_subaddresses, | ||
| char ** | out_json | ||
| ) |
Get the accounts of the wallet.
| wallet | is the wallet handle |
| include_subaddresses | is true to include the subaddresses of each account |
| out_json | receives a JSON array of monero_account. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_address | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| char ** | out_address | ||
| ) |
Get the address of an account and subaddress.
Account 0, subaddress 0 is the primary address.
| wallet | is the wallet handle |
| account_idx | is the account index |
| subaddress_idx | is the subaddress index within the account |
| out_address | receives the address. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_address_book_entries | ( | monero_wallet * | wallet, |
| const uint64_t * | indices, | ||
| size_t | num_indices, | ||
| char ** | out_json | ||
| ) |
Get the address book entries with the given indices.
With no indices, all of them are returned.
| wallet | is the wallet handle |
| indices | are the indices of the entries |
| num_indices | is the number of elements in indices |
| out_json | receives a JSON array of monero_address_book_entry. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_address_index | ( | monero_wallet * | wallet, |
| const char * | address, | ||
| char ** | out_json | ||
| ) |
Get the subaddress of an address.
| wallet | is the wallet handle |
| address | is the address |
| out_json | receives the JSON-serialized monero_subaddress. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_attribute | ( | monero_wallet * | wallet, |
| const char * | key, | ||
| bool * | out_found, | ||
| char ** | out_value | ||
| ) |
Get an attribute, a key and value that the wallet stores with its files.
| wallet | is the wallet handle |
| key | is the key of the attribute |
| out_found | receives true if the attribute exists |
| out_value | receives the value, or NULL if it doesn't exist. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_balance | ( | monero_wallet * | wallet, |
| uint64_t * | out_balance | ||
| ) |
Get the balance of the wallet, including funds that are still locked.
| wallet | is the wallet handle |
| out_balance | receives the balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_daemon_connection | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the daemon connection of the wallet.
| wallet | is the wallet handle |
| out_json | receives the JSON-serialized monero_rpc_connection, or NULL if there is none. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_daemon_height | ( | monero_wallet * | wallet, |
| uint64_t * | out_height | ||
| ) |
Get the height the daemon of the wallet is synced to.
| wallet | is the wallet handle |
| out_height | receives the height |
| MONERO_EXPORT monero_result monero_wallet_get_daemon_max_peer_height | ( | monero_wallet * | wallet, |
| uint64_t * | out_height | ||
| ) |
Get the maximum height of the peers the daemon of the wallet is connected to.
| wallet | is the wallet handle |
| out_height | receives the height |
| MONERO_EXPORT monero_result monero_wallet_get_default_fee_priority | ( | monero_wallet * | wallet, |
| monero_tx_priority * | out_priority | ||
| ) |
Get the default priority of the fee of the transactions.
| wallet | is the wallet handle |
| out_priority | receives the priority |
| MONERO_EXPORT monero_result monero_wallet_get_height | ( | monero_wallet * | wallet, |
| uint64_t * | out_height | ||
| ) |
Get the height of the blocks the wallet has synced to.
| wallet | is the wallet handle |
| out_height | receives the height |
| MONERO_EXPORT monero_result monero_wallet_get_height_by_date | ( | monero_wallet * | wallet, |
| uint16_t | year, | ||
| uint8_t | month, | ||
| uint8_t | day, | ||
| uint64_t * | out_height | ||
| ) |
Get the approximate height of the blockchain at a date.
It is a conservative estimate for scanning.
| wallet | is the wallet handle |
| year | is the year |
| month | is the month, from 1 to 12 |
| day | is the day, from 1 to 31 |
| out_height | receives the height |
| MONERO_EXPORT monero_result monero_wallet_get_integrated_address | ( | monero_wallet * | wallet, |
| const char * | standard_address, | ||
| const char * | payment_id, | ||
| char ** | out_json | ||
| ) |
Get the integrated address of a standard address and a payment ID.
| wallet | is the wallet handle |
| standard_address | is the standard address. NULL or "" for the primary address |
| payment_id | is the payment ID, in hex. NULL or "" for a random one |
| out_json | receives the JSON-serialized monero_integrated_address. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_multisig_info | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the multisig info of the wallet.
| wallet | is the wallet handle |
| out_json | receives the JSON-serialized monero_multisig_info. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_network_type | ( | monero_wallet * | wallet, |
| monero_utils_network_type * | out_network_type | ||
| ) |
Get the network of the wallet.
| wallet | is the wallet handle |
| out_network_type | receives the network |
| MONERO_EXPORT monero_result monero_wallet_get_outputs | ( | monero_wallet * | wallet, |
| const char * | query_json, | ||
| char ** | out_json | ||
| ) |
Get the outputs of the wallet that it can spend.
| wallet | is the wallet handle |
| query_json | is the JSON-serialized monero_output_query, which can hold the monero_tx_query of the transactions of the outputs in "txQuery". NULL for all outputs |
| out_json | receives a JSON object with the blocks of the monero_tx_wallet that have the outputs, and each monero_output_wallet is in its transaction. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_path | ( | monero_wallet * | wallet, |
| char ** | out_path | ||
| ) |
Get the path of the wallet file.
| wallet | is the wallet handle |
| out_path | receives the path. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_payment_uri | ( | monero_wallet * | wallet, |
| const char * | config_json, | ||
| char ** | out_uri | ||
| ) |
Create a payment URI from a transaction config.
| wallet | is the wallet handle |
| config_json | is the JSON-serialized monero_tx_config |
| out_uri | receives the payment URI. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_primary_address | ( | monero_wallet * | wallet, |
| char ** | out_address | ||
| ) |
Get the primary address of the wallet.
| wallet | is the wallet handle |
| out_address | receives the address. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_private_spend_key | ( | monero_wallet * | wallet, |
| char ** | out_key | ||
| ) |
Get the private spend key of the wallet, in hex.
Fails for a view-only wallet.
| wallet | is the wallet handle |
| out_key | receives the key. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_private_view_key | ( | monero_wallet * | wallet, |
| char ** | out_key | ||
| ) |
Get the private view key of the wallet, in hex.
| wallet | is the wallet handle |
| out_key | receives the key. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_public_spend_key | ( | monero_wallet * | wallet, |
| char ** | out_key | ||
| ) |
Get the public spend key of the wallet, in hex.
| wallet | is the wallet handle |
| out_key | receives the key. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_public_view_key | ( | monero_wallet * | wallet, |
| char ** | out_key | ||
| ) |
Get the public view key of the wallet, in hex.
| wallet | is the wallet handle |
| out_key | receives the key. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_reserve_proof_account | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint64_t | amount, | ||
| const char * | message, | ||
| char ** | out_signature | ||
| ) |
Get a signature that proves an amount available in an account.
| wallet | is the wallet handle |
| account_idx | is the index of the account |
| amount | is the minimum amount to prove, in atomic units |
| message | is a message to include in the signature. NULL or "" for none |
| out_signature | receives the signature. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_reserve_proof_wallet | ( | monero_wallet * | wallet, |
| const char * | message, | ||
| char ** | out_signature | ||
| ) |
Get a signature that proves the whole balance of the wallet.
| wallet | is the wallet handle |
| message | is a message to include in the signature. NULL or "" for none |
| out_signature | receives the signature. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_restore_height | ( | monero_wallet * | wallet, |
| uint64_t * | out_height | ||
| ) |
Get the height from which the wallet scans the blocks.
| wallet | is the wallet handle |
| out_height | receives the height |
| MONERO_EXPORT monero_result monero_wallet_get_seed | ( | monero_wallet * | wallet, |
| char ** | out_seed | ||
| ) |
Get the mnemonic seed of the wallet.
Fails for a view-only wallet.
| wallet | is the wallet handle |
| out_seed | receives the seed. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_seed_language | ( | monero_wallet * | wallet, |
| char ** | out_language | ||
| ) |
Get the language of the mnemonic seed.
| wallet | is the wallet handle |
| out_language | receives the language name. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_seed_languages | ( | char ** | out_json | ) |
Get the languages a mnemonic seed can be written in.
| out_json | receives a JSON array of language names. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_spend_proof | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | message, | ||
| char ** | out_signature | ||
| ) |
Get a signature that proves a spend of a transaction.
It doesn't need the destination address.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| message | is a message to include in the signature. NULL or "" for none |
| out_signature | receives the signature. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_subaddress | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| char ** | out_json | ||
| ) |
Get a subaddress by its indices.
Full wallets don't support it.
| wallet | is the wallet handle |
| account_idx | is the index of the account |
| subaddress_idx | is the index of the subaddress within the account |
| out_json | receives the JSON-serialized monero_subaddress. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_subaddress_balance | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| uint64_t * | out_balance | ||
| ) |
Get the balance of a subaddress, including funds that are still locked.
Keys-only wallets don't support it.
| wallet | is the wallet handle |
| account_idx | is the account index |
| subaddress_idx | is the subaddress index within the account |
| out_balance | receives the balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_subaddress_unlocked_balance | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| uint64_t * | out_balance | ||
| ) |
Get the unlocked balance of a subaddress, the part that can be spent now.
Keys-only wallets don't support it.
| wallet | is the wallet handle |
| account_idx | is the account index |
| subaddress_idx | is the subaddress index within the account |
| out_balance | receives the unlocked balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_subaddresses | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| const uint32_t * | subaddress_indices, | ||
| size_t | num_subaddress_indices, | ||
| char ** | out_json | ||
| ) |
Get the subaddresses of an account.
With no indices, a full wallet returns all of them. Keys-only wallets can't enumerate their subaddresses, so they need the indices.
| wallet | is the wallet handle |
| account_idx | is the account index |
| subaddress_indices | are the subaddress indices, or NULL for all of them |
| num_subaddress_indices | is the number of elements in subaddress_indices, 0 for all of them |
| out_json | receives a JSON array of monero_subaddress. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_transfers | ( | monero_wallet * | wallet, |
| const char * | query_json, | ||
| char ** | out_json | ||
| ) |
Get the incoming and outgoing transfers of the wallet.
| wallet | is the wallet handle |
| query_json | is the JSON-serialized monero_transfer_query, which can hold the monero_tx_query of the transactions of the transfers in "txQuery". NULL for all transfers |
| out_json | receives a JSON object with the blocks of the monero_tx_wallet that have the transfers, and each transfer is in its transaction as a monero_incoming_transfer or a monero_outgoing_transfer. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_tx_key | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| char ** | out_key | ||
| ) |
Get the secret key of a transaction from its hash.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| out_key | receives the secret key. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_tx_note | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| char ** | out_note | ||
| ) |
Get the note of a transaction.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| out_note | receives the note. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_tx_notes | ( | monero_wallet * | wallet, |
| const char *const * | tx_hashes, | ||
| size_t | num_tx_hashes, | ||
| char ** | out_json | ||
| ) |
Get the notes of transactions.
| wallet | is the wallet handle |
| tx_hashes | are the hashes of the transactions |
| num_tx_hashes | is the number of elements in tx_hashes |
| out_json | receives a JSON array of notes. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_tx_proof | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | address, | ||
| const char * | message, | ||
| char ** | out_signature | ||
| ) |
Get a signature that proves a transaction sent to an address.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| address | is the destination address of the transaction |
| message | is a message to include in the signature. NULL or "" for none |
| out_signature | receives the signature. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_txs | ( | monero_wallet * | wallet, |
| const char * | query_json, | ||
| char ** | out_json | ||
| ) |
Get the transactions of the wallet.
| wallet | is the wallet handle |
| query_json | is the JSON-serialized monero_tx_query. NULL for all transactions |
| out_json | receives a JSON object with the blocks of the monero_tx_wallet that match, with their transfers. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_get_unlocked_balance | ( | monero_wallet * | wallet, |
| uint64_t * | out_balance | ||
| ) |
Get the unlocked balance of the wallet, the part that can be spent now.
| wallet | is the wallet handle |
| out_balance | receives the unlocked balance in atomic units |
| MONERO_EXPORT monero_result monero_wallet_get_version | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the version of the wallet library.
| wallet | is the wallet handle |
| out_json | receives the JSON-serialized monero_version. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_import_key_images | ( | monero_wallet * | wallet, |
| const char * | key_images_json, | ||
| uint64_t | offset, | ||
| char ** | out_json | ||
| ) |
Import key images into the wallet.
| wallet | is the wallet handle |
| key_images_json | is a JSON array of monero_key_image |
| offset | is the index of the first key image among the wallet's outputs |
| out_json | receives the JSON-serialized monero_key_image_import_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_import_multisig_hex | ( | monero_wallet * | wallet, |
| const char *const * | multisig_hexes, | ||
| size_t | num_multisig_hexes, | ||
| bool | refresh_after_import, | ||
| int32_t * | out_num_imported | ||
| ) |
Import the multisig info of the other participants, as hex.
| wallet | is the wallet handle |
| multisig_hexes | are the multisig hex of each participant |
| num_multisig_hexes | is the number of elements in multisig_hexes |
| refresh_after_import | is true to refresh the wallet after the import |
| out_num_imported | receives the number of imported outputs |
| MONERO_EXPORT monero_result monero_wallet_import_outputs | ( | monero_wallet * | wallet, |
| const char * | outputs_hex, | ||
| int32_t * | out_num_imported | ||
| ) |
Import outputs into the wallet.
| wallet | is the wallet handle |
| outputs_hex | are the outputs, in hex |
| out_num_imported | receives the number of imported outputs |
| MONERO_EXPORT monero_result monero_wallet_is_closed | ( | monero_wallet * | wallet, |
| bool * | out_closed | ||
| ) |
Check if the wallet is closed.
| wallet | is the wallet handle |
| out_closed | receives true if the wallet is closed |
| MONERO_EXPORT monero_result monero_wallet_is_connected_to_daemon | ( | monero_wallet * | wallet, |
| bool * | out_connected | ||
| ) |
Check if the wallet is connected to a daemon.
| wallet | is the wallet handle |
| out_connected | receives true if the wallet is connected |
| MONERO_EXPORT monero_result monero_wallet_is_daemon_synced | ( | monero_wallet * | wallet, |
| bool * | out_synced | ||
| ) |
Check if the daemon of the wallet is synced with the network.
| wallet | is the wallet handle |
| out_synced | receives true if the daemon is synced |
| MONERO_EXPORT monero_result monero_wallet_is_daemon_trusted | ( | monero_wallet * | wallet, |
| bool * | out_trusted | ||
| ) |
Check if the daemon is trusted.
| wallet | is the wallet handle |
| out_trusted | receives true if the daemon is trusted |
| MONERO_EXPORT monero_result monero_wallet_is_multisig | ( | monero_wallet * | wallet, |
| bool * | out_multisig | ||
| ) |
Check if the wallet is a multisig wallet.
Keys-only wallets don't support multisig, so this fails for them.
| wallet | is the wallet handle |
| out_multisig | receives true for a multisig wallet |
| MONERO_EXPORT monero_result monero_wallet_is_multisig_import_needed | ( | monero_wallet * | wallet, |
| bool * | out_needed | ||
| ) |
Check if importing multisig data is needed for a correct balance.
| wallet | is the wallet handle |
| out_needed | receives true if the import is needed |
| MONERO_EXPORT monero_result monero_wallet_is_output_frozen | ( | monero_wallet * | wallet, |
| const char * | key_image, | ||
| bool * | out_frozen | ||
| ) |
Check if an output is frozen.
Fails for an unknown key image.
| wallet | is the wallet handle |
| key_image | is the key image of the output, in hex |
| out_frozen | receives true if the output is frozen |
| MONERO_EXPORT monero_result monero_wallet_is_synced | ( | monero_wallet * | wallet, |
| bool * | out_synced | ||
| ) |
Check if the wallet is synced with the daemon.
| wallet | is the wallet handle |
| out_synced | receives true if the wallet is synced |
| MONERO_EXPORT monero_result monero_wallet_is_view_only | ( | monero_wallet * | wallet, |
| bool * | out_view_only | ||
| ) |
Check if the wallet is view-only, which means it has no private spend key.
| wallet | is the wallet handle |
| out_view_only | receives true for a view-only wallet |
| MONERO_EXPORT monero_result monero_wallet_keys_create_from_keys | ( | int32_t | network_type, |
| const char * | address, | ||
| const char * | private_view_key, | ||
| const char * | private_spend_key, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a keys-only wallet from its keys.
Without a private spend key the wallet is view-only.
| network_type | is the monero_utils_network_type of the wallet |
| address | is the primary address |
| private_view_key | is the private view key, in hex |
| private_spend_key | is the private spend key, in hex. NULL or "" for a view-only wallet |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_keys_create_from_seed | ( | int32_t | network_type, |
| const char * | seed, | ||
| const char * | seed_offset, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a keys-only wallet from its mnemonic seed.
| network_type | is the monero_utils_network_type of the wallet |
| seed | is the mnemonic seed, at most 4096 bytes |
| seed_offset | is the passphrase that extends the seed. NULL or "" for none |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_keys_create_random | ( | int32_t | network_type, |
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Create a keys-only wallet with a new random seed.
It has no files, so monero_wallet_save() and monero_wallet_close(wallet, true) fail on it. It also has no height, sync or transactions.
| network_type | is the monero_utils_network_type of the wallet |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_listener_create | ( | const monero_wallet_listener_callbacks * | callbacks, |
| monero_wallet_listener ** | out_listener | ||
| ) |
Create a listener from its callbacks.
The callbacks are copied, and the listener is released with monero_wallet_listener_free().
| callbacks | are the callbacks to call |
| out_listener | receives the listener |
| MONERO_EXPORT void monero_wallet_listener_free | ( | monero_wallet_listener * | listener | ) |
Release a listener.
If the listener is registered with a wallet, it is removed first.
| listener | is the listener to release |
| MONERO_EXPORT monero_result monero_wallet_make_multisig | ( | monero_wallet * | wallet, |
| const char *const * | multisig_hexes, | ||
| size_t | num_multisig_hexes, | ||
| int32_t | threshold, | ||
| const char * | password, | ||
| char ** | out_multisig_hex | ||
| ) |
Make the wallet multisig from the multisig hex of the other participants.
| wallet | is the wallet handle |
| multisig_hexes | are the multisig hex of each participant |
| num_multisig_hexes | is the number of elements in multisig_hexes |
| threshold | is the number of signatures needed to sign a transfer |
| password | is the password of the wallet |
| out_multisig_hex | receives the hex to share with the participants, if another round is needed. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_move_to | ( | monero_wallet * | wallet, |
| const char * | path, | ||
| const char * | password | ||
| ) |
Move the wallet files to another path.
The wallet is saved there with the new password.
| wallet | is the wallet handle |
| path | is the new path of the wallet file |
| password | is the new password of the wallet files |
| MONERO_EXPORT monero_result monero_wallet_open | ( | const char * | path, |
| const char * | password, | ||
| int32_t | network_type, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Open a wallet from its files on disk.
| path | is the path of the wallet file |
| password | decrypts the wallet files. NULL or "" for no password |
| network_type | is the monero_utils_network_type of the wallet |
| out_wallet | receives the handle, released with monero_wallet_free() |
| MONERO_EXPORT monero_result monero_wallet_parse_payment_uri | ( | monero_wallet * | wallet, |
| const char * | uri, | ||
| char ** | out_json | ||
| ) |
Parse a payment URI into a transaction config.
| wallet | is the wallet handle |
| uri | is the payment URI |
| out_json | receives the JSON-serialized monero_tx_config. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_prepare_multisig | ( | monero_wallet * | wallet, |
| char ** | out_multisig_hex | ||
| ) |
Get the multisig hex to share with the participants, to start making a multisig wallet.
| wallet | is the wallet handle |
| out_multisig_hex | receives the hex. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_relay_tx | ( | monero_wallet * | wallet, |
| const char * | tx_metadata, | ||
| char ** | out_hash | ||
| ) |
Relay a transaction that was created without relaying.
| wallet | is the wallet handle |
| tx_metadata | is the metadata of the transaction |
| out_hash | receives the hash of the relayed transaction. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_relay_tx_json | ( | monero_wallet * | wallet, |
| const char * | tx_json, | ||
| char ** | out_hash | ||
| ) |
Relay a transaction created without relaying, from its JSON.
Only the metadata is used, so the output of monero_wallet_create_tx() can be passed as it is. A tx set, or the JSON of tx sets, works too if it holds one transaction.
| wallet | is the wallet handle |
| tx_json | is the JSON-serialized monero_tx_wallet with its metadata, or the tx sets that hold it |
| out_hash | receives the hash of the relayed transaction. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_relay_txs | ( | monero_wallet * | wallet, |
| const char *const * | tx_metadatas, | ||
| size_t | num_tx_metadatas, | ||
| char ** | out_json | ||
| ) |
Relay transactions that were created without relaying.
| wallet | is the wallet handle |
| tx_metadatas | are the metadata of the transactions |
| num_tx_metadatas | is the number of elements in tx_metadatas |
| out_json | receives a JSON array of the hashes of the relayed transactions. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_relay_txs_json | ( | monero_wallet * | wallet, |
| const char * | txs_json, | ||
| char ** | out_json | ||
| ) |
Relay transactions created without relaying, from a JSON array.
Only their metadata is used. The JSON of tx sets, or one tx set, works too, and relays all the transactions in it.
| wallet | is the wallet handle |
| txs_json | is a JSON array of monero_tx_wallet with their metadata, or the tx sets that hold them |
| out_json | receives a JSON array of the hashes of the relayed transactions. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_remove_listener | ( | monero_wallet * | wallet, |
| monero_wallet_listener * | listener | ||
| ) |
Unregister a listener from a wallet.
| wallet | is the wallet handle |
| listener | is the listener to unregister |
| MONERO_EXPORT monero_result monero_wallet_remove_listeners | ( | monero_wallet * | wallet | ) |
Unregister all the listeners of a wallet.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_request_shutdown | ( | monero_wallet * | wallet | ) |
Ask a full wallet to stop what it is doing, so that the calls that other threads have in flight on it return soon.
A request to the daemon is aborted and its call fails, and a sync stops after the batch of blocks that it is on. The calls that need the daemon fail from then on. It is the only function that may run while another thread is inside a call of the same wallet. Call monero_wallet_close() and monero_wallet_free() once those calls have returned, since they can't use a closed or freed wallet. A wallet that is already closed ignores it. Keys-only and RPC wallets have nothing to abort, so it fails for them.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_rescan_blockchain | ( | monero_wallet * | wallet | ) |
Rescan the blockchain from scratch.
This discards local data that the blockchain can't restore, like destination addresses, tx keys and tx notes.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_rescan_spent | ( | monero_wallet * | wallet | ) |
Rescan the blockchain for spent outputs.
It needs a trusted daemon.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_connect | ( | monero_rpc_connection * | connection, |
| monero_wallet ** | out_wallet | ||
| ) |
Connect to a monero-wallet-rpc server through a shared connection, with its proxy, timeout and TLS settings.
No wallet is open until monero_wallet_rpc_open_wallet() or monero_wallet_rpc_create_wallet(). Free the handle with monero_wallet_free().
| connection | is the connection to the server. It can be freed after the call |
| out_wallet | receives the handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_create_from_keys | ( | const char * | uri, |
| const char * | username, | ||
| const char * | password, | ||
| const char * | name, | ||
| const char * | wallet_password, | ||
| const char * | address, | ||
| const char * | private_view_key, | ||
| const char * | private_spend_key, | ||
| uint64_t | restore_height, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a wallet from its keys on a monero-wallet-rpc server.
Without a private spend key the wallet is view-only. Free the handle with monero_wallet_free().
| uri | is the URI of the server |
| username | is the username of the server. NULL or "" for none |
| password | is the password of the server. NULL or "" for none |
| name | is the name of the new wallet on the server |
| wallet_password | is the password of the wallet. NULL or "" for none |
| address | is the primary address |
| private_view_key | is the private view key, in hex |
| private_spend_key | is the private spend key, in hex. NULL or "" for a view-only wallet |
| restore_height | is the first block to scan. 0 scans from the genesis block |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_create_from_seed | ( | const char * | uri, |
| const char * | username, | ||
| const char * | password, | ||
| const char * | name, | ||
| const char * | wallet_password, | ||
| const char * | seed, | ||
| const char * | seed_offset, | ||
| uint64_t | restore_height, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Restore a wallet from its mnemonic seed on a monero-wallet-rpc server.
Free the handle with monero_wallet_free().
| uri | is the URI of the server |
| username | is the username of the server. NULL or "" for none |
| password | is the password of the server. NULL or "" for none |
| name | is the name of the new wallet on the server |
| wallet_password | is the password of the wallet. NULL or "" for none |
| seed | is the mnemonic seed, at most 4096 bytes |
| seed_offset | is the passphrase that extends the seed. NULL or "" for none |
| restore_height | is the first block to scan. 0 scans from the genesis block |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_create_random | ( | const char * | uri, |
| const char * | username, | ||
| const char * | password, | ||
| const char * | name, | ||
| const char * | wallet_password, | ||
| const char * | language, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Create a random wallet on a monero-wallet-rpc server.
Free the handle with monero_wallet_free().
| uri | is the URI of the server |
| username | is the username of the server. NULL or "" for none |
| password | is the password of the server. NULL or "" for none |
| name | is the name of the new wallet on the server |
| wallet_password | is the password of the wallet. NULL or "" for none |
| language | is the seed language. NULL for English |
| out_wallet | receives the handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_create_wallet | ( | monero_wallet * | wallet, |
| const char * | config_json | ||
| ) |
Create a wallet on the server of an RPC wallet and open it.
A config with a seed restores the wallet from the seed, a config with keys restores it from the keys, and a config with neither creates a random wallet. The server has its own network, so the config has no network type.
| wallet | is the wallet handle of an RPC wallet |
| config_json | is the JSON-serialized monero_wallet_config, with the wallet name in "path" |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_account | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| bool | include_subaddresses, | ||
| bool | skip_balances, | ||
| char ** | out_json | ||
| ) |
Get an account from the server, with or without its subaddresses and balances.
| wallet | is the wallet handle of an RPC wallet |
| account_idx | is the account index |
| include_subaddresses | is true to include the subaddresses of the account |
| skip_balances | is true to skip the balances, which is faster |
| out_json | receives the JSON-serialized monero_account. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_accounts | ( | monero_wallet * | wallet, |
| bool | include_subaddresses, | ||
| const char * | tag, | ||
| bool | skip_balances, | ||
| char ** | out_json | ||
| ) |
Get the accounts of the wallet from the server, optionally only those with a tag.
| wallet | is the wallet handle of an RPC wallet |
| include_subaddresses | is true to include the subaddresses of each account |
| tag | is the tag of the accounts. NULL or "" for all of them |
| skip_balances | is true to skip the balances, which is faster |
| out_json | receives a JSON array of monero_account. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_balances | ( | monero_wallet * | wallet, |
| const uint32_t * | account_idx, | ||
| const uint32_t * | subaddress_idx, | ||
| char ** | out_json | ||
| ) |
Get the balances of an account or a subaddress, from the server.
| wallet | is the wallet handle of an RPC wallet |
| account_idx | is the account index. NULL for none |
| subaddress_idx | is the subaddress index within the account. NULL for none |
| out_json | receives the JSON-serialized monero_subaddress with the balances, or the string null if the server has none. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_connection | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the connection to the monero-wallet-rpc server.
| wallet | is the wallet handle of an RPC wallet |
| out_json | receives the JSON-serialized monero_rpc_connection. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_seed_languages | ( | monero_wallet * | wallet, |
| char ** | out_json | ||
| ) |
Get the seed languages that the monero-wallet-rpc server supports.
| wallet | is the wallet handle of an RPC wallet |
| out_json | receives a JSON array of language names. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_get_subaddresses | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| const uint32_t * | subaddress_indices, | ||
| size_t | num_subaddress_indices, | ||
| bool | skip_balances, | ||
| char ** | out_json | ||
| ) |
Get the subaddresses of an account from the server, with the given indices.
| wallet | is the wallet handle of an RPC wallet |
| account_idx | is the account index |
| subaddress_indices | are the subaddress indices, or NULL for all of them |
| num_subaddress_indices | is the number of elements in subaddress_indices, 0 for all of them |
| skip_balances | is true to skip the balances, which is faster |
| out_json | receives a JSON array of monero_subaddress. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_rpc_open | ( | const char * | uri, |
| const char * | username, | ||
| const char * | password, | ||
| const char * | name, | ||
| const char * | wallet_password, | ||
| monero_wallet ** | out_wallet | ||
| ) |
Open a wallet on a monero-wallet-rpc server.
Free the handle with monero_wallet_free().
| uri | is the URI of the server |
| username | is the username of the server. NULL or "" for none |
| password | is the password of the server. NULL or "" for none |
| name | is the name of the wallet on the server |
| wallet_password | is the password of the wallet. NULL or "" for none |
| out_wallet | receives the handle |
| MONERO_EXPORT monero_result monero_wallet_rpc_open_wallet | ( | monero_wallet * | wallet, |
| const char * | name, | ||
| const char * | wallet_password | ||
| ) |
Open a wallet on the server of an RPC wallet.
| wallet | is the wallet handle of an RPC wallet |
| name | is the name of the wallet on the server |
| wallet_password | is the password of the wallet. NULL or "" for none |
| MONERO_EXPORT monero_result monero_wallet_rpc_set_daemon_connection | ( | monero_wallet * | wallet, |
| const char * | connection_json, | ||
| bool | is_trusted, | ||
| const char * | ssl_options_json | ||
| ) |
Set the daemon connection of an RPC wallet, with the SSL options of the connection.
| wallet | is the wallet handle of an RPC wallet |
| connection_json | is the JSON-serialized monero_rpc_connection of the daemon |
| is_trusted | is true if the daemon is trusted |
| ssl_options_json | is the JSON-serialized ssl_options. NULL or empty for none |
| MONERO_EXPORT monero_result monero_wallet_rpc_set_poll_period | ( | monero_wallet * | wallet, |
| uint64_t | period_ms | ||
| ) |
Set how often the RPC wallet polls the server for changes.
Polling starts with the first call.
| wallet | is the wallet handle of an RPC wallet |
| period_ms | is the poll period in milliseconds, from 1 to 2147483647. A period of 0 would poll again at once, over and over |
| MONERO_EXPORT monero_result monero_wallet_rpc_stop | ( | monero_wallet * | wallet | ) |
Save and close the wallet and stop the monero-wallet-rpc server.
Calls on the handle fail afterwards.
| wallet | is the wallet handle of an RPC wallet |
| MONERO_EXPORT monero_result monero_wallet_save | ( | monero_wallet * | wallet | ) |
Save the wallet to disk.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_scan_txs | ( | monero_wallet * | wallet, |
| const char *const * | tx_hashes, | ||
| size_t | num_tx_hashes | ||
| ) |
Scan transactions by their hashes.
| wallet | is the wallet handle |
| tx_hashes | are the hashes of the transactions |
| num_tx_hashes | is the number of elements in tx_hashes |
| MONERO_EXPORT monero_result monero_wallet_set_account_tag_label | ( | monero_wallet * | wallet, |
| const char * | tag, | ||
| const char * | label | ||
| ) |
Set the label of an account tag.
Full wallets don't support it.
| wallet | is the wallet handle |
| tag | is the tag |
| label | is the new label |
| MONERO_EXPORT monero_result monero_wallet_set_attribute | ( | monero_wallet * | wallet, |
| const char * | key, | ||
| const char * | value | ||
| ) |
Set an attribute.
| wallet | is the wallet handle |
| key | is the key of the attribute |
| value | is the value of the attribute |
| MONERO_EXPORT monero_result monero_wallet_set_daemon_connection | ( | monero_wallet * | wallet, |
| const char * | uri, | ||
| const char * | username, | ||
| const char * | password, | ||
| const char * | proxy_uri, | ||
| const bool * | is_trusted, | ||
| bool | ssl_verify | ||
| ) |
Set the daemon connection of the wallet.
| wallet | is the wallet handle |
| uri | is the URI of the daemon |
| username | is the username of the daemon. NULL or "" for none |
| password | is the password of the daemon. NULL or "" for none |
| proxy_uri | is the URI of a proxy. NULL or "" for none |
| is_trusted | is true if the daemon is trusted and false if it is not. NULL trusts it only if its address is local |
| ssl_verify | is true to verify the daemon's TLS certificate and hostname |
| MONERO_EXPORT monero_result monero_wallet_set_restore_height | ( | monero_wallet * | wallet, |
| uint64_t | restore_height | ||
| ) |
Set the height from which the wallet scans the blocks.
| wallet | is the wallet handle |
| restore_height | is the height |
| MONERO_EXPORT monero_result monero_wallet_set_subaddress_label | ( | monero_wallet * | wallet, |
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| const char * | label | ||
| ) |
Set the label of a subaddress.
| wallet | is the wallet handle |
| account_idx | is the index of the account |
| subaddress_idx | is the index of the subaddress within the account |
| label | is the new label. NULL or "" to clear it |
| MONERO_EXPORT monero_result monero_wallet_set_tx_note | ( | monero_wallet * | wallet, |
| const char * | tx_hash, | ||
| const char * | note | ||
| ) |
Set the note of a transaction.
| wallet | is the wallet handle |
| tx_hash | is the hash of the transaction |
| note | is the note |
| MONERO_EXPORT monero_result monero_wallet_set_tx_notes | ( | monero_wallet * | wallet, |
| const char *const * | tx_hashes, | ||
| const char *const * | notes, | ||
| size_t | num_tx_hashes | ||
| ) |
Set the notes of transactions.
Each note goes with the hash at the same position.
| wallet | is the wallet handle |
| tx_hashes | are the hashes of the transactions |
| notes | are the notes |
| num_tx_hashes | is the number of elements in tx_hashes and notes |
| MONERO_EXPORT monero_result monero_wallet_sign_message | ( | monero_wallet * | wallet, |
| const char * | message, | ||
| int32_t | signature_type, | ||
| uint32_t | account_idx, | ||
| uint32_t | subaddress_idx, | ||
| char ** | out_signature | ||
| ) |
Sign a message with the spend key or the view key of an account and subaddress.
| wallet | is the wallet handle |
| message | is the message to sign |
| signature_type | is the monero_message_signature_type, the key that signs the message |
| account_idx | is the account index |
| subaddress_idx | is the subaddress index within the account |
| out_signature | receives the signature. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sign_multisig_tx_hex | ( | monero_wallet * | wallet, |
| const char * | multisig_tx_hex, | ||
| char ** | out_json | ||
| ) |
Sign multisig transactions, given as the hex shared when they were created.
| wallet | is the wallet handle |
| multisig_tx_hex | is the multisig transaction hex |
| out_json | receives the JSON-serialized monero_multisig_sign_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sign_txs | ( | monero_wallet * | wallet, |
| const char * | unsigned_tx_hex, | ||
| char ** | out_json | ||
| ) |
Sign unsigned transactions of a view-only wallet with the full wallet that created them.
| wallet | is the wallet handle |
| unsigned_tx_hex | is the unsigned transaction hex, from when the transactions were created |
| out_json | receives a JSON object with the tx set of the signed transactions, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_start_mining | ( | monero_wallet * | wallet, |
| const uint64_t * | num_threads, | ||
| const bool * | background_mining, | ||
| const bool * | ignore_battery | ||
| ) |
Start mining on the daemon.
It needs a trusted daemon.
| wallet | is the wallet handle |
| num_threads | is the number of mining threads. NULL for one thread |
| background_mining | is true to mine in the background. NULL for false |
| ignore_battery | is true to mine on battery power. NULL for false |
| MONERO_EXPORT monero_result monero_wallet_start_syncing | ( | monero_wallet * | wallet, |
| uint64_t | sync_period_ms | ||
| ) |
Start a background thread that syncs the wallet with the daemon.
Stop it with monero_wallet_stop_syncing().
| wallet | is the wallet handle |
| sync_period_ms | is the maximum time between two syncs in milliseconds, from 1 to 2147483647. A period of 0 would sync again at once, over and over |
| MONERO_EXPORT monero_result monero_wallet_stop_mining | ( | monero_wallet * | wallet | ) |
Stop mining on the daemon.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_stop_syncing | ( | monero_wallet * | wallet | ) |
Stop the background thread that syncs the wallet.
| wallet | is the wallet handle |
| MONERO_EXPORT monero_result monero_wallet_submit_multisig_tx_hex | ( | monero_wallet * | wallet, |
| const char * | signed_multisig_tx_hex, | ||
| char ** | out_json | ||
| ) |
Submit signed multisig transactions, given as hex.
| wallet | is the wallet handle |
| signed_multisig_tx_hex | is the signed multisig transaction hex, from monero_wallet_sign_multisig_tx_hex() |
| out_json | receives a JSON array of the hashes of the submitted transactions. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_submit_txs | ( | monero_wallet * | wallet, |
| const char * | signed_tx_hex, | ||
| char ** | out_json | ||
| ) |
Submit signed transactions of a view-only wallet.
| wallet | is the wallet handle |
| signed_tx_hex | is the signed transaction hex, from monero_wallet_sign_txs() |
| out_json | receives a JSON array of the hashes of the submitted transactions. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sweep_dust | ( | monero_wallet * | wallet, |
| bool | relay, | ||
| char ** | out_json | ||
| ) |
Sweep the unmixable dust outputs back to the wallet, so they are easier to spend and mix.
| wallet | is the wallet handle |
| relay | is true to relay the transactions |
| out_json | receives a JSON object with the tx sets of the transactions, {"txSets":[...]}, none if there is no dust. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sweep_output | ( | monero_wallet * | wallet, |
| const char * | config_json, | ||
| char ** | out_json | ||
| ) |
Sweep an output with a given key image into the wallet.
| wallet | is the wallet handle |
| config_json | is the JSON-serialized monero_tx_config of the sweep |
| out_json | receives a JSON object with the tx set of the transaction, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sweep_unlocked | ( | monero_wallet * | wallet, |
| const char * | config_json, | ||
| char ** | out_json | ||
| ) |
Sweep the unlocked funds of the wallet.
| wallet | is the wallet handle |
| config_json | is the JSON-serialized monero_tx_config of the sweep |
| out_json | receives a JSON object with the tx sets of the transactions, {"txSets":[...]}. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_sync | ( | monero_wallet * | wallet, |
| const uint64_t * | start_height, | ||
| monero_wallet_listener * | listener, | ||
| char ** | out_json | ||
| ) |
Synchronize the wallet with the daemon in the calling thread.
| wallet | is the wallet handle |
| start_height | is the height to sync from, ignored if it is less than the last processed block. NULL for none |
| listener | receives the notifications of this sync. NULL for none. Free it after the call returns |
| out_json | receives the JSON-serialized monero_sync_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_tag_accounts | ( | monero_wallet * | wallet, |
| const char * | tag, | ||
| const uint32_t * | account_indices, | ||
| size_t | num_account_indices | ||
| ) |
Tag accounts with a tag.
Full wallets don't support it.
| wallet | is the wallet handle |
| tag | is the tag |
| account_indices | are the indices of the accounts |
| num_account_indices | is the number of elements in account_indices |
| MONERO_EXPORT monero_result monero_wallet_thaw_output | ( | monero_wallet * | wallet, |
| const char * | key_image | ||
| ) |
Thaw a frozen output.
Fails for an unknown key image.
| wallet | is the wallet handle |
| key_image | is the key image of the output, in hex |
| MONERO_EXPORT monero_result monero_wallet_untag_accounts | ( | monero_wallet * | wallet, |
| const uint32_t * | account_indices, | ||
| size_t | num_account_indices | ||
| ) |
Remove the tags of accounts.
Full wallets don't support it.
| wallet | is the wallet handle |
| account_indices | are the indices of the accounts |
| num_account_indices | is the number of elements in account_indices |
| MONERO_EXPORT monero_result monero_wallet_verify_message | ( | monero_wallet * | wallet, |
| const char * | message, | ||
| const char * | address, | ||
| const char * | signature, | ||
| char ** | out_json | ||
| ) |
Verify a signature made by monero_wallet_sign_message() for an address.
A signature that doesn't match is not an error. The result has isGood set to false.
| wallet | is the wallet handle |
| message | is the signed message |
| address | is the address that signed the message |
| signature | is the signature |
| out_json | receives the JSON-serialized monero_message_signature_result. Free with monero_utils_free() |
| MONERO_EXPORT monero_result monero_wallet_wait_for_next_block | ( | monero_wallet * | wallet, |
| uint64_t * | out_height | ||
| ) |
Wait until the next block is added to the chain.
It blocks until a block arrives, and the wallet must be syncing in the background with monero_wallet_start_syncing(), or it never returns. Neither monero_wallet_stop_syncing() nor monero_wallet_close() wakes it, so call it from a thread that the application can leave behind, or use a listener instead.
| wallet | is the wallet handle |
| out_height | receives the height of the new block |