View Source Stellar.TxBuild.Spec behaviour (Elixir Stellar SDK v0.22.0)

Defines contracts to build a Stellar transaction.

Summary

Types

@type account() :: Stellar.TxBuild.Account.t()
@type base_fee() :: Stellar.TxBuild.BaseFee.t()
@type envelope() :: String.t()
@type hash() :: String.t()
@type memo() :: Stellar.TxBuild.Memo.t()
@type network_passphrase() :: String.t()
@type operations() :: [operation()]
@type opts() :: Keyword.t()
@type preconditions() :: Stellar.TxBuild.Preconditions.t()
@type sequence_number() :: Stellar.TxBuild.SequenceNumber.t()
@type soroban_data() :: String.t() | StellarBase.XDR.SorobanTransactionData.t()
@type time_bounds() :: Stellar.TxBuild.TimeBounds.t()
@type tx_build() :: {:ok, Stellar.TxBuild.t()} | {:error, atom()}
@type tx_envelope() :: {:ok, envelope()} | {:error, atom()}
@type tx_hash() :: {:ok, hash()} | {:error, atom()}

Callbacks

Link to this callback

add_memo(tx_build, memo)

View Source (optional)
@callback add_memo(tx_build(), memo()) :: tx_build()
Link to this callback

add_operation(tx_build, operation)

View Source
@callback add_operation(tx_build(), operation()) :: tx_build()
Link to this callback

add_operations(tx_build, operations)

View Source
@callback add_operations(tx_build(), operations()) :: tx_build()
@callback build(tx_build()) :: tx_build()
@callback envelope(tx_build()) :: tx_envelope()
@callback hash(tx_build()) :: tx_hash()
@callback new(account(), opts()) :: tx_build()
Link to this callback

set_base_fee(tx_build, base_fee)

View Source (optional)
@callback set_base_fee(tx_build(), base_fee()) :: tx_build()
Link to this callback

set_network_passphrase(tx_build, network_passphrase)

View Source
@callback set_network_passphrase(tx_build(), network_passphrase()) :: tx_build()
Link to this callback

set_preconditions(tx_build, preconditions)

View Source (optional)
@callback set_preconditions(tx_build(), preconditions()) :: tx_build()
Link to this callback

set_sequence_number(tx_build, sequence_number)

View Source (optional)
@callback set_sequence_number(tx_build(), sequence_number()) :: tx_build()
Link to this callback

set_soroban_data(tx_build, soroban_data)

View Source
@callback set_soroban_data(tx_build(), soroban_data()) :: tx_build()
Link to this callback

set_time_bounds(tx_build, time_bounds)

View Source (optional)
@callback set_time_bounds(tx_build(), time_bounds()) :: tx_build()
Link to this callback

sign(tx_build, signatures)

View Source
@callback sign(tx_build(), signatures()) :: tx_build()
Link to this callback

sign_envelope(envelope, signatures, network_passphrase)

View Source
@callback sign_envelope(envelope(), signatures(), network_passphrase()) :: tx_envelope()