I have height block and i want to get block.
What method can i use to get a block with rpc api?
I have height block and i want to get block.
What method can i use to get a block with rpc api?
zcash-cli getblock 100000 0
Thanks. I have one more question.
I can create object for utxo
type Utxo struct {
Address string `json:"address"`
Txid string `json:"txid"`
Vout int `json:"vout"`
ScriptPubKey string `json:"scriptPubKey"`
AmountIface interface{} `json:"amountIface"`
Amount float64 `json:"amount"`
Satoshis int64 `json:"satoshis"`
Confirmations int `json:"confirmations"`
}
in rpc request i find this request
let utxo = await rpc.getaddressutxos({"addresses": [`${req.params.address}`], "chainInfo": true})
this request get result
{
"utxos":
[
{
"address" (string) The address base58check encoded
"txid" (string) The output txid
"height" (number) The block height
"outputIndex" (number) The output index
"script" (string) The script hex encoded
"satoshis" (number) The number of zatoshis of the output
}, ...
],
"hash" (string) The block hash
"height" (numeric) The block height
}
There can i find vout for utxo ?
I don’t understand your question, but you can decode a block (and its transactions) with the same RPC call :-
zcash-cli getblock 130000 2