View Source Tezex.Rpc (tezex v2.0.0-rc.6)
Send transactions to the Tezos network.
send_operation/4
is the main function, see tests for usage.
Summary
Functions
Sign the forged operation and returns the forged operation+signature payload to be injected.
Simulate the application of the operations with the context of the given block and return the result of each operation application.
Send an operation to a Tezos RPC node.
Types
@type encoded_private_key() :: <<_::32, _::_*8>>
@type op() :: map()
@type t() :: %Tezex.Rpc{ chain_id: binary(), endpoint: binary(), headers: Finch.Request.headers(), opts: Finch.request_opts() }
Functions
@spec forge_and_sign_operation(op(), encoded_private_key()) :: nonempty_binary()
Sign the forged operation and returns the forged operation+signature payload to be injected.
@spec get_block(t(), nonempty_binary()) :: {:ok, map()} | {:error, Finch.Error.t()} | {:error, Jason.DecodeError.t()}
@spec get_block_at_offset(t(), integer()) :: {:ok, map()} | {:error, Finch.Error.t()} | {:error, Jason.DecodeError.t()}
@spec get_counter_for_account(t(), nonempty_binary()) :: integer() | {:error, :not_integer} | {:error, Finch.Error.t()}
@spec inject_operation(t(), any()) :: {:ok, any()} | {:error, Finch.Error.t()} | {:error, Jason.DecodeError.t()}
@spec preapply_operation(t(), map(), encoded_private_key(), any()) :: {:ok, any()} | {:error, Finch.Error.t()} | {:error, Jason.DecodeError.t()}
Simulate the application of the operations with the context of the given block and return the result of each operation application.
Link to this function
send_operation(rpc, contents, wallet_address, encoded_private_key, opts \\ [])
View SourceSend an operation to a Tezos RPC node.