Is there a way to get the last block?

I’m coming from working with bitcoin-cli. With bitcoin can get the latest block number. And from that query for the latest block information.

Is there something like that for Libra?

Looking at a few block explorer available ( . it seems like they are able to get the information.

You’ll want to call UpdateToLatestLedger first. It will provide you with a response including ledger_info_with_sigs. Inside of that, you will find the ledger info which contains the version. That is the latest “block”. Note that we operate in terms of transactions and not blocks. You can then query for more information on this transaction if you wish

If you are looking for a quick and easy way to get this via an json rpc api, we offer an api-end point for the last version here