iota_sdk.wallet.account
Account Objects
class Account()
prepare_burn
def prepare_burn(burn: Burn, options=None)
A generic prepare_burn()
function that can be used to prepare the burn of native tokens, nfts, foundries and aliases.
prepare_burn_native_token
def prepare_burn_native_token(token_id: HexStr,
burn_amount: int,
options=None)
Burn native tokens. This doesn't require the foundry output which minted them, but will not increase
the foundries melted_tokens
field, which makes it impossible to destroy the foundry output. Therefore it's
recommended to use melting, if the foundry output is available.
prepare_burn_nft
def prepare_burn_nft(nft_id: HexStr, options=None)
Burn an nft output.
prepare_consolidate_outputs
def prepare_consolidate_outputs(
force: bool, output_consolidation_threshold: Optional[int] = None)
Consolidate outputs.
prepare_create_alias_output
def prepare_create_alias_output(params, options)
Create an alias output.
prepare_destroy_alias
def prepare_destroy_alias(alias_id: HexStr, options=None)
Destroy an alias output.
prepare_destroy_foundry
def prepare_destroy_foundry(foundry_id: HexStr, options=None)
Destroy a foundry output with a circulating supply of 0.
generate_ed25519_addresses
def generate_ed25519_addresses(amount: int, options=None)
Generate new addresses.
claimable_outputs
def claimable_outputs(outputs_to_claim: List[OutputId])
Get outputs with additional unlock conditions.
get_output
def get_output(output_id: OutputId)
Get output.
get_transaction
def get_transaction(transaction_id: HexStr)
Get transaction.
addresses
def addresses()
List addresses.
addresses_with_unspent_outputs
def addresses_with_unspent_outputs()
Returns only addresses of the account with unspent outputs.
outputs
def outputs(filter_options=None)
Returns all outputs of the account.
unspent_outputs
def unspent_outputs(filter_options=None)
Returns all unspent outputs of the account.
incoming_transactions
def incoming_transactions()
Returns all incoming transactions of the account.
transactions
def transactions()
Returns all transaction of the account.
pending_transactions
def pending_transactions()
Returns all pending transactions of the account.
prepare_create_native_token
def prepare_create_native_token(params, options=None)
Create a native token.
prepare_melt_native_token
def prepare_melt_native_token(token_id: HexStr,
melt_amount: int,
options=None)
Melt native tokens. This happens with the foundry output which minted them, by increasing it's
melted_tokens
field.
prepare_mint_native_token
def prepare_mint_native_token(token_id: HexStr,
mint_amount: int,
options=None)
Mint additional native tokens.
minimum_required_storage_deposit
def minimum_required_storage_deposit(output)
Minimum required storage deposit.
prepare_mint_nfts
def prepare_mint_nfts(params, options=None)
Mint nfts.
get_balance
def get_balance()
Get account balance information.
prepare_output
def prepare_output(output_options, transaction_options=None)
Prepare an output for sending
If the amount is below the minimum required storage deposit, by default the remaining amount will automatically
be added with a StorageDepositReturn UnlockCondition, when setting the ReturnStrategy to gift
, the full
minimum required storage deposit will be sent to the recipient.
When the assets contain an nft_id, the data from the existing nft output will be used, just with the address
unlock conditions replaced
prepare_send_amount
def prepare_send_amount(params, options=None)
Prepare send amount.
prepare_transaction
def prepare_transaction(outputs, options=None)
Prepare transaction.
retry_transaction_until_included
def retry_transaction_until_included(transaction_id: HexStr,
interval=None,
max_attempts=None)
Retries (promotes or reattaches) a transaction sent from the account for a provided transaction id until it's included (referenced by a milestone). Returns the included block id.
sync
def sync(options=None)
Sync the account by fetching new information from the nodes. Will also retry pending transactions and consolidate outputs if necessary. A custom default can be set using set_default_sync_options
send_amount
def send_amount(params, options=None)
Send amount.
prepare_send_native_tokens
def prepare_send_native_tokens(params, options=None)
Send native tokens.
prepare_send_nft
def prepare_send_nft(params, options=None)
Send nft.
set_alias
def set_alias(alias: str)
Set alias.
set_default_sync_options
def set_default_sync_options(options)
Set the fallback SyncOptions for account syncing. If storage is enabled, will persist during restarts.
sign_transaction_essence
def sign_transaction_essence(prepared_transaction_data)
Sign a transaction essence.
sign_and_submit_transaction
def sign_and_submit_transaction(prepared_transaction_data)
Validate the transaction, sign it, submit it to a node and store it in the account.
submit_and_store_transaction
def submit_and_store_transaction(signed_transaction_data)
Submit and store transaction.
claim_outputs
def claim_outputs(output_ids_to_claim: List[OutputId])
Claim outputs.
send_outputs
def send_outputs(outputs, options=None)
Send outputs in a transaction.