View Source Soroban.Contract.RPCCalls (Soroban v0.10.0)

Exposes the functions to execute the simulate and send_transaction endpoints

Link to this section Summary

Link to this section Types

@type account() :: Stellar.TxBuild.Account.t()
@type auth() :: String.t() | nil
@type auth_secret_key() :: String.t() | nil
@type envelope_xdr() :: String.t()
Link to this type

invoke_host_function()

View Source
@type invoke_host_function() :: Stellar.TxBuild.InvokeHostFunction.t()
@type send_response() :: {:ok, Soroban.RPC.SendTransactionResponse.t()}
@type sequence_number() :: Stellar.TxBuild.SequenceNumber.t()
@type signature() :: Stellar.TxBuild.Signature.t()
@type simulate_response() :: {:ok, Soroban.RPC.SimulateTransactionResponse.t()}

Link to this section Functions

Link to this function

retrieve_unsigned_xdr(response, source_account, sequence_number, invoke_host_function_op)

View Source
@spec retrieve_unsigned_xdr(
  simulate_response :: simulate_response(),
  source_account :: account(),
  sequence_number :: sequence_number(),
  invoke_host_function_op :: invoke_host_function()
) :: envelope_xdr() | simulate_response()
Link to this function

send_transaction(response, source_account, sequence_number, signature, invoke_host_function_op, auth_secret_key \\ nil)

View Source
Link to this function

simulate(invoke_host_function_op, source_account, sequence_number)

View Source
@spec simulate(
  invoke_host_function_op :: invoke_host_function(),
  source_account :: account(),
  sequence_number :: sequence_number()
) :: simulate_response()