View Source Xogmios.TxSubmission (xogmios v0.8.0)

This module interfaces with the Tx Submission protocol.

Summary

Functions

Evaluates the execution units of scripts present in a given transaction.

Starts a new Tx Submission process linked to the current process.

Submits a transaction to the server and returns a response including the transaction id.

Functions

Link to this function

evaluate_tx(client \\ __MODULE__, cbor)

View Source
@spec evaluate_tx(pid() | atom(), String.t()) :: {:ok, any()} | {:error, any()}

Evaluates the execution units of scripts present in a given transaction.

This function is synchronous and takes two arguments:

  1. (Optional) A process reference. If none given, it defaults to the linked process __MODULE__.
  2. The CBOR of a transaction. Unlike submit_tx/1, this function does not expect the transaction to be signed. Please refer to the official Ogmios docs for more details on the type of transaction that is accepted.
Link to this function

start_link(client, opts)

View Source
@spec start_link(module(), start_options :: Keyword.t()) :: GenServer.on_start()

Starts a new Tx Submission process linked to the current process.

This function should not be called directly, but rather via Xogmios.start_tx_submission_link/2

Link to this function

submit_tx(client \\ __MODULE__, cbor)

View Source
@spec submit_tx(pid() | atom(), String.t()) :: {:ok, any()} | {:error, any()}

Submits a transaction to the server and returns a response including the transaction id.

This function is synchronous and takes two arguments:

  1. (Optional) A process reference. If none given, it defaults to the linked process __MODULE__.
  2. The CBOR of a signed transaction.