ledgerData method
Future<Map<String, dynamic> >
ledgerData({
- bool binary = false,
- int? limit,
- String? ledgerHash,
- XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
- LedgerEntryType? type,
The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version. See ledger data
Implementation
Future<Map<String, dynamic>> ledgerData(
{bool binary = false,
int? limit,
String? ledgerHash,
XRPLLedgerIndex? ledgerIndex = XRPLLedgerIndex.validated,
LedgerEntryType? type}) async {
final Map<String, dynamic> configParams = {};
_createRpcConfig(configParams, "binary", binary);
_createRpcConfig(configParams, "limit", limit);
_createRpcConfig(configParams, "type", type?.value);
_createRpcConfig(configParams, "ledger_index", ledgerIndex?.value);
_createRpcConfig(configParams, "ledger_hash", ledgerHash);
final response = await makeCustomCall<Map<String, dynamic>>(
"ledger_data", [configParams]);
return response;
}