xrpld
Loading...
Searching...
No Matches
xrpl::ledger_entry_helpers Namespace Reference

Functions

std::unexpected< json::Value > missingFieldError (json::StaticString const field, std::optional< std::string > err=std::nullopt)
std::unexpected< json::Value > invalidFieldError (std::string const &err, json::StaticString const field, std::string const &type)
std::unexpected< json::Value > malformedError (std::string const &err, std::string const &message)
std::expected< bool, json::Value > hasRequired (json::Value const &params, std::initializer_list< json::StaticString > fields, std::optional< std::string > err=std::nullopt)
template<class T>
std::optional< T > parse (json::Value const &param)
template<class T>
std::expected< T, json::Value > required (json::Value const &params, json::StaticString const fieldName, std::string const &err, std::string const &expectedType)
template<>
std::optional< AccountID > parse (json::Value const &param)
std::expected< AccountID, json::Value > requiredAccountID (json::Value const &params, json::StaticString const fieldName, std::string const &err)
std::optional< Blob > parseHexBlob (json::Value const &param, std::size_t maxLength)
std::expected< Blob, json::Value > requiredHexBlob (json::Value const &params, json::StaticString const fieldName, std::size_t maxLength, std::string const &err)
template<>
std::optional< std::uint32_t > parse (json::Value const &param)
std::expected< std::uint32_t, json::Value > requiredUInt32 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< UInt256 > parse (json::Value const &param)
std::expected< UInt256, json::Value > requiredUInt256 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< UInt192 > parse (json::Value const &param)
std::expected< UInt192, json::Value > requiredUInt192 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< Asset > parse (json::Value const &param)
std::expected< Asset, json::Value > requiredAsset (json::Value const &params, json::StaticString const fieldName, std::string const &err)

Function Documentation

◆ missingFieldError()

std::unexpected< json::Value > xrpl::ledger_entry_helpers::missingFieldError ( json::StaticString const field,
std::optional< std::string > err = std::nullopt )

Definition at line 26 of file LedgerEntryHelpers.h.

◆ invalidFieldError()

std::unexpected< json::Value > xrpl::ledger_entry_helpers::invalidFieldError ( std::string const & err,
json::StaticString const field,
std::string const & type )

Definition at line 36 of file LedgerEntryHelpers.h.

◆ malformedError()

std::unexpected< json::Value > xrpl::ledger_entry_helpers::malformedError ( std::string const & err,
std::string const & message )

Definition at line 46 of file LedgerEntryHelpers.h.

◆ hasRequired()

std::expected< bool, json::Value > xrpl::ledger_entry_helpers::hasRequired ( json::Value const & params,
std::initializer_list< json::StaticString > fields,
std::optional< std::string > err = std::nullopt )

Definition at line 56 of file LedgerEntryHelpers.h.

◆ parse() [1/6]

template<class T>
std::optional< T > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

◆ required()

template<class T>
std::expected< T, json::Value > xrpl::ledger_entry_helpers::required ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err,
std::string const & expectedType )

Definition at line 77 of file LedgerEntryHelpers.h.

◆ parse() [2/6]

template<>
std::optional< AccountID > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

Definition at line 96 of file LedgerEntryHelpers.h.

◆ requiredAccountID()

std::expected< AccountID, json::Value > xrpl::ledger_entry_helpers::requiredAccountID ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err )

Definition at line 111 of file LedgerEntryHelpers.h.

◆ parseHexBlob()

std::optional< Blob > xrpl::ledger_entry_helpers::parseHexBlob ( json::Value const & param,
std::size_t maxLength )

Definition at line 120 of file LedgerEntryHelpers.h.

◆ requiredHexBlob()

std::expected< Blob, json::Value > xrpl::ledger_entry_helpers::requiredHexBlob ( json::Value const & params,
json::StaticString const fieldName,
std::size_t maxLength,
std::string const & err )

Definition at line 133 of file LedgerEntryHelpers.h.

◆ parse() [3/6]

template<>
std::optional< std::uint32_t > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

Definition at line 152 of file LedgerEntryHelpers.h.

◆ requiredUInt32()

std::expected< std::uint32_t, json::Value > xrpl::ledger_entry_helpers::requiredUInt32 ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err )

Definition at line 168 of file LedgerEntryHelpers.h.

◆ parse() [4/6]

template<>
std::optional< UInt256 > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

Definition at line 178 of file LedgerEntryHelpers.h.

◆ requiredUInt256()

std::expected< UInt256, json::Value > xrpl::ledger_entry_helpers::requiredUInt256 ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err )

Definition at line 190 of file LedgerEntryHelpers.h.

◆ parse() [5/6]

template<>
std::optional< UInt192 > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

Definition at line 200 of file LedgerEntryHelpers.h.

◆ requiredUInt192()

std::expected< UInt192, json::Value > xrpl::ledger_entry_helpers::requiredUInt192 ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err )

Definition at line 212 of file LedgerEntryHelpers.h.

◆ parse() [6/6]

template<>
std::optional< Asset > xrpl::ledger_entry_helpers::parse ( json::Value const & param)

Definition at line 222 of file LedgerEntryHelpers.h.

◆ requiredAsset()

std::expected< Asset, json::Value > xrpl::ledger_entry_helpers::requiredAsset ( json::Value const & params,
json::StaticString const fieldName,
std::string const & err )

Definition at line 235 of file LedgerEntryHelpers.h.