Transaction Submission Mini-Protocol

class ogmios.txsubmit.EvaluateTransaction(client: Client)

Bases: object

Ogmios method to evaluate execution units of scripts in a well-formed transaction.

NOTE: This class is not intended to be used directly. Instead, use the Client.evaluate_transaction method.

Parameters:

client (Client) – The client to use for the request.

execute(tx_cbor: str, additional_utxo: Utxo | None = None, id: Any | None = None)

Send and receive the request.

Parameters:
  • tx_id (str) – CBOR serialized transaction to evaluate.

  • additional_utxo (Optional[Utxo]) – Additional UTxO to include in the transaction evaluation.

  • id (Any) – The ID of the request.

Returns:

The TX’s execution units and ID of the response.

Return type:

(dict, Optional[Any])

receive()

Receive a previously requested response.

Returns:

The TX’s execution units and ID of the response.

Return type:

(dict, Optional[Any])

send(tx_cbor: str, additional_utxo: Utxo | None = None, id: Any | None = None) None

Send the request.

Parameters:
  • tx_id (str) – CBOR serialized transaction to evaluate.

  • additional_utxo (Optional[Utxo]) – Additional UTxO to include in the transaction evaluation.

  • id (Any) – The ID of the request.

class ogmios.txsubmit.SubmitTransaction(client: Client)

Bases: object

Ogmios method to submit a signed and serialized transaction to the network.

NOTE: This class is not intended to be used directly. Instead, use the Client.submit_transaction method.

Parameters:

client (Client) – The client to use for the request.

execute(tx_cbor: str, id: Any | None = None)

Send and receive the request.

Parameters:
  • tx_id (str) – CBOR serialized transaction to submit.

  • id (Any) – The ID of the request.

Returns:

The submitted transaction’s ID and ID of the response.

Return type:

(str, Optional[Any])

receive()

Receive a previously requested response.

Returns:

The submitted transaction’s ID and ID of the response.

Return type:

(str, Optional[Any])

send(tx_cbor: str, id: Any | None = None) None

Send the request.

Parameters:
  • tx_id (str) – CBOR serialized transaction to submit.

  • id (Any) – The ID of the request.