Solana.RPC.Tracker (Solana v0.2.0) View Source
A GenServer you can use to track the status of transaction signatures.
Example
iex> key = Solana.keypair() |> Solana.pubkey!()
iex> {:ok, tracker} = Solana.RPC.Tracker.start_link(network: "localhost")
iex> client = Solana.RPC.client(network: "localhost")
iex> {:ok, tx} = Solana.RPC.send(client, Solana.RPC.Request.request_airdrop(key, 1))
iex> Solana.Tracker.start_tracking(tracker, tx)
iex> receive do
...> {:ok, [^tx]} -> IO.puts("confirmed!")
...> end
confirmed!
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a Solana.RPC.Tracker
process linked to the current process.
Starts tracking a transaction signature or list of transaction signatures.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Starts a Solana.RPC.Tracker
process linked to the current process.
Starts tracking a transaction signature or list of transaction signatures.
Sends messages back to the calling process as transactions from the list are confirmed. Stops tracking automatically once transactions have been confirmed.