Get Ledger Info

This method can be used to fetch ledger info.

Below is an example code describing the way to fetch ledger id.

// Fetch ledger info
const ledgerInfo = await window.martian.getLedgerInfo();
console.log(ledgerInfo);
// above code output
{
    "chain_id": 20,
    "epoch": 6,
    "ledger_version": "3815571",
    "oldest_ledger_version": "0",
    "ledger_timestamp": "1658818977888546",
    "node_role": "full_node"
}

Last updated