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

Functions

std::unexpected< json::ValuemissingFieldError (json::StaticString const field, std::optional< std::string > err=std::nullopt)
std::unexpected< json::ValueinvalidFieldError (std::string const &err, json::StaticString const field, std::string const &type)
std::unexpected< json::ValuemalformedError (std::string const &err, std::string const &message)
std::expected< bool, json::ValuehasRequired (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::Valuerequired (json::Value const &params, json::StaticString const fieldName, std::string const &err, std::string const &expectedType)
template<>
std::optional< AccountIDparse (json::Value const &param)
std::expected< AccountID, json::ValuerequiredAccountID (json::Value const &params, json::StaticString const fieldName, std::string const &err)
std::optional< BlobparseHexBlob (json::Value const &param, std::size_t maxLength)
std::expected< Blob, json::ValuerequiredHexBlob (json::Value const &params, json::StaticString const fieldName, std::size_t maxLength, std::string const &err)
template<>
std::optional< std::uint32_tparse (json::Value const &param)
std::expected< std::uint32_t, json::ValuerequiredUInt32 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< uint256parse (json::Value const &param)
std::expected< uint256, json::ValuerequiredUInt256 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< uint192parse (json::Value const &param)
std::expected< uint192, json::ValuerequiredUInt192 (json::Value const &params, json::StaticString const fieldName, std::string const &err)
template<>
std::optional< Assetparse (json::Value const &param)
std::expected< Asset, json::ValuerequiredAsset (json::Value const &params, json::StaticString const fieldName, std::string const &err)
std::expected< STXChainBridge, json::ValueparseBridgeFields (json::Value const &params)

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 28 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 38 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 48 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 58 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 79 of file LedgerEntryHelpers.h.

◆ parse() [2/6]

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

Definition at line 98 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 113 of file LedgerEntryHelpers.h.

◆ parseHexBlob()

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

Definition at line 122 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 135 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 154 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 170 of file LedgerEntryHelpers.h.

◆ parse() [4/6]

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

Definition at line 180 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 192 of file LedgerEntryHelpers.h.

◆ parse() [5/6]

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

Definition at line 202 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 214 of file LedgerEntryHelpers.h.

◆ parse() [6/6]

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

Definition at line 224 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 237 of file LedgerEntryHelpers.h.

◆ parseBridgeFields()

std::expected< STXChainBridge, json::Value > xrpl::ledger_entry_helpers::parseBridgeFields ( json::Value const & params)

Definition at line 243 of file LedgerEntryHelpers.h.