Skip to main content

iota_sdk.wallet.prepared_transaction

PreparedTransaction Objects

class PreparedTransaction()

A helper class for offline signing.

Attributes:

  • account - An account object used to continue building this transaction.
  • prepared_transaction_data_dto - A prepared transaction data object.

__init__

def __init__(account: Account,
prepared_transaction_data: Union[PreparedTransactionData, Dict])

Initalize Self.

prepared_transaction_data

def prepared_transaction_data() -> PreparedTransactionData

Get the prepared transaction data.

send

def send() -> Transaction

Send a transaction. Internally just calls sign_and_submit_transaction.

Returns:

The transaction after it has been signed and submitted.

sign

def sign()

Sign a prepared transaction essence using the account's private key and returns the signed transaction essence.

sign_and_submit_transaction

def sign_and_submit_transaction() -> Transaction

Sign and submit a transaction using prepared transaction data.

Returns:

The transaction after it has been signed and submitted.

PreparedCreateTokenTransaction Objects

class PreparedCreateTokenTransaction(PreparedTransaction)

A prepared transaction for creating a native token. The function returns the token_id as a string.

Returns: The token id of the PreparedCreateTokenTransaction.

token_id

def token_id()

Get the native token id as a string.

prepared_transaction_data

def prepared_transaction_data()

The function returns the prepared transaction data.