WalletRPC¶
- class nerva.wallet_rpc.WalletRPC(*, port, host='localhost', ssl=False, timeout=10.0, username='', password='')¶
Bases:
objectA class to interact with the Nerva wallet’s JSON-RPC interface.
- Parameters:
port (int) – The port of the wallet’s JSON-RPC interface.
host (str, optional) – The host of the wallet’s JSON-RPC interface. Default is “localhost”.
ssl (bool, optional) – Whether to use SSL. Default is False.
timeout (float, optional) – The timeout for the request. Default is 10.0.
username (str, optional) – The username for the wallet’s JSON-RPC interface. Default is “”.
password (str, optional) – The password for the wallet’s JSON-RPC interface. Default is “”.
- url¶
The URL of the wallet’s JSON-RPC interface.
- Type:
str
- auth¶
The authentication for the wallet’s JSON-RPC interface.
- Type:
httpx.DigestAuth | None
- timeout¶
The timeout for the request.
- Type:
float
- headers¶
The headers for the request.
- Type:
dict[str, str]
- async get_balance(*, account_index, address_indices=None)¶
Return the wallet’s balance.
- Parameters:
account_index (int) – Return balance for this account.
address_indices (list[int], optional) – Return balance detail for those subaddresses.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_address(*, account_index, address_indices=None)¶
Return the wallet’s addresses for an account. Optionally filter for specific set of subaddresses.
- Parameters:
account_index (int) – Get addresses for this account.
address_indices (list[int], optional) – Return specific set of subaddresses.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_address_index(*, address)¶
Get account and address indexes from a specific (sub)address.
- Parameters:
address (str) – The (sub)address to look for.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async create_address(*, account_index, label=None)¶
Create a new address for an account.
- Parameters:
account_index (int) – Create a new address for this account.
label (str, optional) – Label for the new address.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async label_address(*, index, label)¶
Label an address.
- Parameters:
index (dict[str, int]) – Subaddress index in the form {“major”: 0, “minor”: 0}.
label (str) – The label of the address.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_accounts(*, tag=None)¶
Return the wallet’s accounts.
- Parameters:
tag (str, optional) – Tag for filtering accounts.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async create_account(*, label=None)¶
Create a new account.
- Parameters:
label (str, optional) – The label of the account.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async label_account(*, account_index, label)¶
Label an account.
- Parameters:
account_index (int) – The index of the account.
label (str) – The label of the account.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_account_tags()¶
Return the wallet’s account tags.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async tag_accounts(*, tag, accounts)¶
Apply a filtering tag to a list of accounts.
- Parameters:
tag (str) – The tag to apply.
accounts (list[int]) – The accounts to tag.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async untag_accounts(*, accounts)¶
Remove filtering tag from a list of accounts.
- Parameters:
accounts (list[int]) – The accounts to untag.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_account_tag_description(*, tag, description)¶
Set description for an account tag.
- Parameters:
tag (str) – The tag to set description for.
description (str) – Description for the tag.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_height()¶
Return the wallet’s current block height.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async transfer(*, destinations, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, get_tx_key, get_tx_hex, get_tx_metadata, do_not_relay, payment_id=None)¶
Send a transfer from the wallet to a single recipient.
- Parameters:
destinations (list[dict[str, Any]]) – The destinations to send the transfer to.
account_index (int) – The account to send the transfer from.
subaddr_indices (list[int]) – Array of subaddress indices to send from.
priority (int) – Set a priority for the transfer.
mixin (int) – Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size (int) – Sets ringsize for each transaction.
unlock_time (int) – Number of blocks before the Nerva can be spent (0 to not add a lock).
get_tx_key (bool) – Return the transaction key after sending.
get_tx_hex (bool) – Return the transaction as hex string after sending.
get_tx_metadata (bool) – Return the transaction metadata.
do_not_relay (bool) – If true, the transfer won’t be relayed to the Nerva network.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async transfer_split(*, destinations, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, get_tx_keys, get_tx_hex, get_tx_metadata, do_not_relay, payment_id=None)¶
Send a transfer from the wallet to multiple recipients.
- Parameters:
destinations (list[dict[str, Any]]) – The destinations to send the transfer to.
account_index (int) – The account to send the transfer from.
subaddr_indices (list[int]) – Array of subaddress indices to send from.
priority (int) – Set a priority for the transfer.
mixin (int) – Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size (int) – Sets ringsize for each transaction.
unlock_time (int) – Number of blocks before the Nerva can be spent (0 to not add a lock).
get_tx_keys (bool) – Return the transaction keys after sending.
get_tx_hex (bool) – Return the transaction as hex string after sending.
get_tx_metadata (bool) – Return the transaction metadata.
do_not_relay (bool) – If true, the transfer won’t be relayed to the Nerva network.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sign_transfer(*, unsigned_txset, export_raw=False)¶
Sign a transaction created on a read-only wallet (in cold-signing process).
- Parameters:
unsigned_txset (str) – Set of unsigned tx returned by “transfer” method.
export_raw (bool, optional) – If true, return the raw transaction data. Default is False.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async describe_transfer(*, unsigned_txset)¶
Return a list of unsigned transfers in the set, their count, and total amount.
- Parameters:
unsigned_txset (str) – Set of unsigned tx returned by “transfer” method.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async submit_transfer(*, tx_data_hex)¶
Submit a previously signed transaction.
- Parameters:
tx_data_hex (str) – Transaction in hex format.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sweep_dust(*, get_tx_keys=False, do_not_relay=False, get_tx_hex=False, get_tx_metadata=False)¶
Sweep the dust from the wallet.
- Parameters:
get_tx_keys (bool, optional) – Return the transaction keys after sending.
do_not_relay (bool, optional) – If true, do not relay this sweep transfer.
get_tx_hex (bool, optional) – Return the transactions as hex string after sending.
get_tx_metadata (bool, optional) – Return the transaction metadata.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sweep_unmixable()¶
Sweep unmixable outputs from the wallet.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sweep_all(*, address, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, get_tx_keys, below_amount, do_not_relay, get_tx_hex, get_tx_metadata, payment_id=None)¶
Sweep all unlocked outputs in a specified subaddress to an address.
- Parameters:
address (str) – Destination public address.
account_index (int) – Account to sweep from.
subaddr_indices (list[int]) – Array of subaddress indices to sweep from.
priority (int) – Set a priority for the transfer.
mixin (int) – Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size (int) – Sets ringsize for each transaction.
unlock_time (int) – Number of blocks before the Nerva can be spent (0 to not add a lock).
get_tx_keys (bool) – Return the transaction keys after sending.
below_amount (int) – Sweep all outputs below this amount.
do_not_relay (bool) – If true, do not relay this sweep transfer.
get_tx_hex (bool) – Return the transactions as hex string after sending.
get_tx_metadata (bool) – Return the transaction metadata.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sweep_single(*, address, priority, mixin, ring_size, unlock_time, get_tx_key, get_tx_hex, get_tx_metadata, do_not_relay, payment_id=None)¶
Sweep a single output to an address.
- Parameters:
address (str) – Destination public address.
priority (int) – Set a priority for the transfer.
mixin (int) – Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size (int) – Sets ringsize for each transaction.
unlock_time (int) – Number of blocks before the Nerva can be spent (0 to not add a lock).
get_tx_key (bool) – Return the transaction keys after sending.
get_tx_hex (bool) – Return the transaction as hex string after sending.
get_tx_metadata (bool) – Return the transaction metadata.
do_not_relay (bool) – If true, the transfer won’t be relayed to the Nerva network.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async relay_tx(*, tx_hex)¶
Relay a transaction previously created with “do_not_relay” set to true.
- Parameters:
tx_hex (str) – Transaction in hex format.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async store()¶
Save the wallet file.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_payments(*, payment_id)¶
Return a list of incoming payments using a given payment ID.
- Parameters:
payment_id (str) – Payment ID to query.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_bulk_payments(*, payment_ids, min_block_height)¶
Return a list of incoming payments using a given payment ID.
- Parameters:
payment_ids (list[str]) – Payment IDs to query.
min_block_height (int) – The minimum block height to scan.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async incoming_transfers(*, transfer_type, account_index, subaddr_indices, verbose=False)¶
Return a list of incoming transfers to the wallet.
- Parameters:
transfer_type (str) – “all”: all the transfers. “available”: only transfers which are not yet spent. “unavailable”: only transfers which are already spent.
account_index (int) – Return transfers for this account.
subaddr_indices (list[int]) – Array of subaddress indices to query.
verbose (bool, optional) – Enable verbose output.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async query_key(*, key_type)¶
Return the spend or view private key.
- Parameters:
key_type (str) – “mnemonic”: the mnemonic seed. “view_key”: the view key. “spend_key”: the spend key. “seed”: the mnemonic seed.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async make_integrated_address(*, payment_id, standard_address=None)¶
Make an integrated address from the wallet address and a payment ID.
- Parameters:
payment_id (str) – Payment ID.
standard_address (str, optional) – Destination public address. If not provided, the wallet’s address is used.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async split_integrated_address(*, integrated_address)¶
Retrieve the standard address and payment ID corresponding to an integrated address.
- Parameters:
integrated_address (str) – Integrated address to split.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async stop_wallet()¶
Stop the wallet.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async rescan_blockchain()¶
Re-scan the blockchain.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_tx_notes(*, txids, notes)¶
Set arbitrary string notes for transactions.
- Parameters:
txids (list[str]) – Array of transaction IDs.
notes (list[str]) – Notes for the transactions.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_tx_notes(*, txids)¶
Get string notes for transactions.
- Parameters:
txids (list[str]) – Array of transaction IDs.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_attribute(*, key, value)¶
Set arbitrary attribute.
- Parameters:
key (str) – Attribute name.
value (str) – Attribute value.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_attribute(*, key)¶
Get an attribute.
- Parameters:
key (str) – Attribute name.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_tx_key(*, txid)¶
Get transaction secret key.
- Parameters:
txid (str) – Transaction ID.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async check_tx_key(*, txid, tx_key, address)¶
Check a transaction in the blockchain with its secret key.
- Parameters:
txid (str) – Transaction ID.
tx_key (str) – Transaction secret key.
address (str) – Destination public address.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_tx_proof(*, txid, address, message=None)¶
Generate a signature to prove a transaction in the blockchain.
- Parameters:
txid (str) – Transaction ID.
address (str) – Destination public address.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async check_tx_proof(*, txid, address, signature, message=None)¶
Prove a transaction by checking its signature.
- Parameters:
txid (str) – Transaction ID.
address (str) – Destination public address.
signature (str) – Transaction signature.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_spend_proof(*, txid, message=None)¶
Generate a signature to prove a spend using the key of the transaction.
- Parameters:
txid (str) – Transaction ID.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async check_spend_proof(*, txid, signature, message=None)¶
Prove a spend using the key of the transaction.
- Parameters:
txid (str) – Transaction ID.
signature (str) – Spend signature.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_reserve_proof(*, all_reserve, account_index, amount, message=None)¶
Generate a signature to prove of a reserve proof.
- Parameters:
all_reserve (bool) – Proves all wallet reserve.
account_index (int) – Account to prove reserve for.
amount (int) – Amount to prove.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async check_reserve_proof(*, address, signature, message=None)¶
Prove a wallet has a disposable reserve using a signature.
- Parameters:
address (str) – Public address.
signature (str) – Reserve proof signature.
message (str, optional) – Add a message to the signature to further authenticate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_transfers(*, incoming=False, outgoing=False, pending=False, failed=False, pool=False, filter_by_height=False, min_height=None, max_height=None, account_index=None, subaddr_indices=None)¶
Return a list of transfers.
- Parameters:
incoming (bool, optional) – Include incoming transfers.
outgoing (bool, optional) – Include outgoing transfers.
pending (bool, optional) – Include pending transfers.
failed (bool, optional) – Include failed transfers.
pool (bool, optional) – Include transfers from the daemon’s transaction pool.
filter_by_height (bool, optional) – Filter transfers by block height.
min_height (int, optional) – Minimum block height to scan for transfers.
max_height (int, optional) – Maximum block height to scan for transfers.
account_index (int, optional) – Return transfers for this account.
subaddr_indices (list[int], optional) – Array of subaddress indices to query.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_transfer_by_txid(*, txid, account_index=None)¶
Return a list of transfers for the given txid.
- Parameters:
txid (str) – Transaction ID.
account_index (int, optional) – Return transfers for this account.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sign(*, data)¶
Sign a string.
- Parameters:
data (str) – Data to sign.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async verify(*, data, address, signature)¶
Verify a signature on a string.
- Parameters:
data (str) – Data to verify.
address (str) – Public address.
signature (str) – Signature to verify.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async export_outputs()¶
Export all outputs in hex format.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async import_outputs(*, outputs_data_hex)¶
Import outputs in hex format.
- Parameters:
outputs_data_hex (str) – Outputs to import in hex format.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async export_key_images()¶
Export a signed set of key images.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async import_key_images(*, signed_key_images, key_image, signature)¶
Import signed key images list and verify their spent status.
- Parameters:
signed_key_images (list[str]) – Array of signed key images in hex format.
key_image (str) – Key image to import.
signature (str) – Signature of the key image.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async make_uri(*, address, amount=None, payment_id=None, recipient_name=None, tx_description=None)¶
Create a payment URI using the official URI spec.
- Parameters:
address (str) – Destination public address.
amount (int, optional) – Amount to send.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
recipient_name (str, optional) – Name of the payment recipient.
tx_description (str, optional) – Description of the reason for the tx.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async parse_uri(*, uri)¶
Parse a payment URI to get payment information.
- Parameters:
uri (str) – Payment URI.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_address_book(*, entries)¶
Return the wallet’s address book.
- Parameters:
entries (list[int]) – Array of address book entries.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async add_address_book(*, address, payment_id=None, description=None)¶
Add an entry to the wallet’s address book.
- Parameters:
address (str) – Destination public address.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
description (str, optional) – Description of the address.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async edit_address_book(*, index, set_address=False, address=None, set_description=False, description=None, set_payment_id=False, payment_id=None)¶
Edit an existing entry in the wallet’s address book.
- Parameters:
index (int) – The index of the address book entry to edit.
set_address (bool, optional) – Set the address.
address (str, optional) – Destination public address.
set_description (bool, optional) – Set the description.
description (str, optional) – Description of the address.
set_payment_id (bool, optional) – Set the payment ID.
payment_id (str, optional) – Random 32-byte/64-character hex string to identify a transaction.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async delete_address_book(*, index)¶
Delete an entry from the wallet’s address book.
- Parameters:
index (int) – The index of the address book entry to delete.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async refresh(*, start_height=None)¶
Refresh the wallet.
- Parameters:
start_height (int, optional) – Start height to refresh from.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async auto_refresh(*, enable=True, period=None)¶
Set whether to automatically refresh the wallet.
- Parameters:
enable (bool) – Enable or disable auto refresh.
period (int, optional) – Set the refresh period.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async rescan_spent()¶
Re-scan spent outputs.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async start_mining(*, threads_count, do_background_mining, ignore_battery)¶
Start mining in the wallet.
- Parameters:
threads_count (int) – Number of threads to use for mining.
do_background_mining (bool) – If true, mine in the background.
ignore_battery (bool) – If true, mine even if battery is low.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_donate_level(*, blocks)¶
Set the donation level for the Nerva network.
- Parameters:
blocks (int) – Number of blocks to donate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async stop_mining()¶
Stop mining in the wallet.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_languages()¶
Return the list of available languages for the wallet’s seed.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async create_wallet(*, filename, language, password=None)¶
Create a new wallet.
- Parameters:
filename (str) – Wallet file name.
language (str) – Language for seed.
password (str, optional) – Wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async create_hw_wallet(*, filename, language, device_name, restore_height)¶
Create a wallet from a hardware device.
- Parameters:
filename (str) – Wallet file name.
language (str) – Wallet language.
device_name (str) – Hardware device name.
restore_height (int) – Wallet restore height.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async open_wallet(*, filename, password=None)¶
Open a wallet.
- Parameters:
filename (str) – Wallet file name.
password (str, optional) – Wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async close_wallet()¶
Close the wallet.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async change_wallet_password(*, old_password=None, new_password=None)¶
Change the wallet password.
- Parameters:
old_password (str, optional) – Old wallet password.
new_password (str, optional) – New wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async restore_wallet_from_seed(*, filename, seed, restore_height)¶
Restore a wallet from a mnemonic seed.
- Parameters:
filename (str) – Wallet file name.
seed (str) – Wallet mnemonic seed.
restore_height (int) – Wallet restore height.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async restore_wallet_from_keys(*, filename, address, viewkey, spendkey, restore_height)¶
Restore a wallet from a set of keys.
- Parameters:
filename (str) – Wallet file name.
address (str) – Wallet public address.
viewkey (str) – Wallet view key.
spendkey (str) – Wallet spend key.
restore_height (int) – Wallet restore height.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async is_multisig()¶
Check if the wallet is a multisig wallet.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async prepare_multisig()¶
Prepare a wallet for multisig use.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async make_multisig(*, multisig_info, threshold, password)¶
Make a wallet multisig.
- Parameters:
multisig_info (list[str]) – Array of multisig info from other participants.
threshold (int) – Number of signatures needed to sign a transfer.
password (str) – Wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async export_multisig_info()¶
Export multisig info for other participants.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async import_multisig_info(*, info)¶
Import multisig info from other participants.
- Parameters:
info (list[str]) – Array of multisig info from other participants.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async finalize_multisig(*, multisig_info, password)¶
Finalize a multisig wallet.
- Parameters:
multisig_info (list[str]) – Array of multisig info from other participants.
password (str) – Wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async exchange_multisig_keys(*, multisig_info, password)¶
Exchange multisig keys with other participants.
- Parameters:
multisig_info (list[str]) – Array of multisig info from other participants.
password (str) – Wallet password.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async sign_multisig(*, tx_data_hex)¶
Sign a multisig transaction.
- Parameters:
tx_data_hex (str) – Transaction in hex format.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async submit_multisig(*, tx_data_hex)¶
Submit a signed multisig transaction.
- Parameters:
tx_data_hex (str) – Transaction in hex format.
- Returns:
The submitted transaction.
- Return type:
dict[str, Any]
- async validate_address(*, address, any_net_type=False, allow_openalias=False)¶
Validate a public address.
- Parameters:
address (str) – Public address.
any_net_type (bool, optional) – Allow any net type.
allow_openalias (bool, optional) – Allow OpenAlias addresses.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_daemon(*, address, trusted, ssl_support='autodetect', ssl_private_key_path=None, ssl_certificate_path=None, ssl_ca_file=None, ssl_allowed_fingerprints=None, ssl_allow_any_cert=False)¶
Set the daemon address.
- Parameters:
address (str) – Daemon public address.
trusted (bool) – If true, trust the daemon.
ssl_support (str, optional) – SSL support (autodetect, enabled, disabled).
ssl_private_key_path (str, optional) – SSL private key path.
ssl_certificate_path (str, optional) – SSL certificate path.
ssl_ca_file (str, optional) – SSL CA file.
ssl_allowed_fingerprints (list[str], optional) – SSL allowed fingerprints.
ssl_allow_any_cert (bool, optional) – Allow any certificate.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_log_level(*, level)¶
Set the log level.
- Parameters:
level (int) – Log level.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async set_log_categories(*, categories)¶
Set the log categories.
- Parameters:
categories (str) – Log categories.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]
- async get_version()¶
Get the wallet version.
- Returns:
The response from wallet RPC.
- Return type:
dict[str, Any]