rippled
Loading...
Searching...
No Matches
Functions
ripple::LedgerEntryHelpers Namespace Reference

Functions

Unexpected< Json::ValuemissingFieldError (Json::StaticString const field, std::optional< std::string > err=std::nullopt)
 
Unexpected< Json::ValueinvalidFieldError (std::string const &err, Json::StaticString const field, std::string const &type)
 
Unexpected< Json::ValuemalformedError (std::string const &err, std::string const &message)
 
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 >
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)
 
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)
 
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)
 
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)
 
Expected< uint256, Json::ValuerequiredUInt256 (Json::Value const &params, Json::StaticString const fieldName, std::string const &err)
 
template<>
std::optional< uint192parse (Json::Value const &param)
 
Expected< uint192, Json::ValuerequiredUInt192 (Json::Value const &params, Json::StaticString const fieldName, std::string const &err)
 
Expected< STXChainBridge, Json::ValueparseBridgeFields (Json::Value const &params)
 

Function Documentation

◆ missingFieldError()

Unexpected< Json::Value > ripple::LedgerEntryHelpers::missingFieldError ( Json::StaticString const  field,
std::optional< std::string err = std::nullopt 
)

Definition at line 39 of file LedgerEntryHelpers.h.

◆ invalidFieldError()

Unexpected< Json::Value > ripple::LedgerEntryHelpers::invalidFieldError ( std::string const &  err,
Json::StaticString const  field,
std::string const &  type 
)

Definition at line 52 of file LedgerEntryHelpers.h.

◆ malformedError()

Unexpected< Json::Value > ripple::LedgerEntryHelpers::malformedError ( std::string const &  err,
std::string const &  message 
)

Definition at line 66 of file LedgerEntryHelpers.h.

◆ hasRequired()

Expected< bool, Json::Value > ripple::LedgerEntryHelpers::hasRequired ( Json::Value const &  params,
std::initializer_list< Json::StaticString fields,
std::optional< std::string err = std::nullopt 
)

Definition at line 76 of file LedgerEntryHelpers.h.

◆ parse() [1/5]

template<class T >
std::optional< T > ripple::LedgerEntryHelpers::parse ( Json::Value const &  param)

◆ required()

template<class T >
Expected< T, Json::Value > ripple::LedgerEntryHelpers::required ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  err,
std::string const &  expectedType 
)

Definition at line 97 of file LedgerEntryHelpers.h.

◆ parse() [2/5]

template<>
std::optional< AccountID > ripple::LedgerEntryHelpers::parse ( Json::Value const &  param)

Definition at line 116 of file LedgerEntryHelpers.h.

◆ requiredAccountID()

Expected< AccountID, Json::Value > ripple::LedgerEntryHelpers::requiredAccountID ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  err 
)

Definition at line 131 of file LedgerEntryHelpers.h.

◆ parseHexBlob()

std::optional< Blob > ripple::LedgerEntryHelpers::parseHexBlob ( Json::Value const &  param,
std::size_t  maxLength 
)

Definition at line 140 of file LedgerEntryHelpers.h.

◆ requiredHexBlob()

Expected< Blob, Json::Value > ripple::LedgerEntryHelpers::requiredHexBlob ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::size_t  maxLength,
std::string const &  err 
)

Definition at line 153 of file LedgerEntryHelpers.h.

◆ parse() [3/5]

template<>
std::optional< std::uint32_t > ripple::LedgerEntryHelpers::parse ( Json::Value const &  param)

Definition at line 172 of file LedgerEntryHelpers.h.

◆ requiredUInt32()

Expected< std::uint32_t, Json::Value > ripple::LedgerEntryHelpers::requiredUInt32 ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  err 
)

Definition at line 188 of file LedgerEntryHelpers.h.

◆ parse() [4/5]

template<>
std::optional< uint256 > ripple::LedgerEntryHelpers::parse ( Json::Value const &  param)

Definition at line 198 of file LedgerEntryHelpers.h.

◆ requiredUInt256()

Expected< uint256, Json::Value > ripple::LedgerEntryHelpers::requiredUInt256 ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  err 
)

Definition at line 210 of file LedgerEntryHelpers.h.

◆ parse() [5/5]

template<>
std::optional< uint192 > ripple::LedgerEntryHelpers::parse ( Json::Value const &  param)

Definition at line 220 of file LedgerEntryHelpers.h.

◆ requiredUInt192()

Expected< uint192, Json::Value > ripple::LedgerEntryHelpers::requiredUInt192 ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  err 
)

Definition at line 232 of file LedgerEntryHelpers.h.

◆ parseBridgeFields()

Expected< STXChainBridge, Json::Value > ripple::LedgerEntryHelpers::parseBridgeFields ( Json::Value const &  params)

Definition at line 241 of file LedgerEntryHelpers.h.