View Source ElectrumClient.Calls.Blockchain.ScriptHash.GetHistory (electrum_client v0.1.2)
Manages blockchain.scripthash.get_history params and results
Link to this section Summary
Functions
Calls the electrum server with the required parameters and returns a the script hash's history
Converts a script hash into blockchain.scripthash.get_history params
Converts a blockchain.scripthash.get_history's call result into an elixir list
Link to this section Functions
Calls the electrum server with the required parameters and returns a the script hash's history
Converts a script hash into blockchain.scripthash.get_history params
examples
Examples
iex> "67a5662abf889b5a28ffa821c1f85fd3ef9313756b881351d91a3671f3f52858" ...> |> ElectrumClient.Calls.Blockchain.ScriptHash.GetHistory.encode_params() """ {"id":1,"jsonrpc":"2.0","method":"blockchain.scripthash.get_history","params":["67a5662abf889b5a28ffa821c1f85fd3ef9313756b881351d91a3671f3f52858"]} """
Converts a blockchain.scripthash.get_history's call result into an elixir list
examples
Examples
iex> """ ...> {"id":1,"jsonrpc":"2.0","result":[{"height":2347375,"tx_hash":"dde058767aa566f2aba736320796771922efa6cb6e75f1cba3d47e4bfd5ae0d8"},{"height":2347382,"tx_hash":"5a957f4bff6d23140eb7e9b6fcedd41d3febf1e145d37519c593c939789a49af"}]} ...> """ ...> |> ElectrumClient.Calls.Blockchain.ScriptHash.GetHistory.parse_result() [
%{
height: 2347375,
txid: "dde058767aa566f2aba736320796771922efa6cb6e75f1cba3d47e4bfd5ae0d8"
},
%{
height: 2347382,
txid: "5a957f4bff6d23140eb7e9b6fcedd41d3febf1e145d37519c593c939789a49af"
}
]