3#include <xrpl/basics/ByteUtilities.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/protocol/Units.h>
7#include <mpt_protocol.h>
8#include <secp256k1_mpt.h>
103template <
typename T,
class TBips>
109template <
typename T,
class TBips>
static constexpr internalrep kMaxRep
constexpr value_type value() const
Returns the underlying value.
static constexpr int kLoanMaximumPaymentsPerTransaction
Maximum number of combined payments that a LoanPay transaction will process.
constexpr TenthBips32 kMaxCloseInterestRate
The maximum close interest rate charged for repaying a loan early in 1/10 bips.
constexpr TenthBips32 kMaxOverpaymentFee
The maximum overpayment fee on a loan in 1/10 bips.
constexpr TenthBips32 kMaxOverpaymentInterestRate
The maximum overpayment interest rate charged on loan overpayments in 1/10 bips.
constexpr TenthBips16 kMaxManagementFeeRate(unsafeCast< std::uint16_t >(percentageToTenthBips(10).value()))
The maximum management fee rate allowed by a loan broker in 1/10 bips.
constexpr TenthBips32 kMaxInterestRate
Annualized interest rate of the Loan in 1/10 bips.
constexpr TenthBips32 kMaxLateInterestRate
The maximum premium added to the interest rate for late payments on a loan in 1/10 bips.
constexpr TenthBips32 kMaxCoverRate
The maximum coverage rate required of a loan broker in 1/10 bips.
static constexpr int kLoanPaymentsPerFeeIncrement
LoanPay transaction cost will be one base fee per X combined payments.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::size_t kEcPubKeyLength
Length of EC public key (compressed).
constexpr std::uint8_t kEcCompressedPrefixEvenY
Compressed EC point prefix for even y-coordinate.
bool isFlagLedger(LedgerIndex seq)
Returns true if the given ledgerIndex is a flag ledgerIndex.
constexpr std::size_t kDirNodeMaxEntries
The maximum number of entries per directory page.
constexpr std::size_t kEcBlindingFactorLength
Length of the EC blinding factor in bytes.
constexpr std::size_t kMaxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
std::uint32_t LedgerIndex
A ledger index.
constexpr std::size_t kMaxPriceScale
The maximum price scaling factor.
constexpr std::size_t kCompressedEcPointLength
Length of EC point (compressed).
constexpr T bipsOfValue(T value, Bips< TBips > bips)
constexpr TenthBips32 percentageToTenthBips(std::uint32_t percentage)
constexpr std::uint32_t kConfidentialFeeMultiplier
Extra base fee multiplier charged to confidential MPT transactions.
constexpr std::size_t kMaxBatchTxCount
The maximum number of transactions that can be in a batch.
constexpr T tenthBipsOfValue(T value, TenthBips< TBips > bips)
constexpr std::size_t kMaxTokenUriLength
The maximum length of a URI inside an NFT.
constexpr std::size_t kTxMinSizeBytes
Protocol specific constants.
constexpr std::size_t kPermissionMaxSize
The maximum number of delegate permissions an account can grant.
constexpr std::size_t kEcClawbackProofLength
Length of the ZKProof for ConfidentialMPTClawback.
constexpr std::uint8_t kVaultMaximumIouScale
Maximum scale factor for a Vault.
constexpr std::uint8_t kEcCompressedPrefixOddY
Compressed EC point prefix for odd y-coordinate.
Bips< std::uint32_t > Bips32
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > unsafeCast(Src s) noexcept
constexpr std::size_t kEcSchnorrProofLength
Length of Schnorr ZKProof for public key registration (compact form) in bytes.
constexpr std::size_t kMaxLastUpdateTimeDelta
The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
constexpr std::size_t kEcGamalEncryptedTotalLength
EC ElGamal ciphertext length: two compressed EC points concatenated.
constexpr std::size_t kMaxDidDataLength
The maximum length of an Attestation inside a DID.
TenthBips< std::uint32_t > TenthBips32
constexpr std::uint64_t kDirNodeMaxPages
The maximum number of pages allowed in a directory.
TenthBips< std::uint16_t > TenthBips16
constexpr std::uint16_t kMaxDeletableAmmTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
constexpr Bips32 kBipsPerUnity(100 *100)
There are 10,000 basis points (bips) in 100%.
constexpr std::size_t kMaxDataPayloadLength
The maximum length of Data payload.
constexpr std::size_t kEcConvertBackProofLength
128 bytes compact sigma proof + 688 bytes single bulletproof.
constexpr std::size_t kExpiredOfferRemoveLimit
The maximum number of expired offers to delete at once.
constexpr std::size_t kMaxDidUriLength
The maximum length of a URI inside a DID.
constexpr std::size_t kMaxDeletableTokenOfferEntries
The maximum number of offers in an offer directory for NFT to be burnable.
constexpr TenthBips32 kTenthBipsPerUnity(kBipsPerUnity.value() *10)
bool isVotingLedger(LedgerIndex seq)
Returns true if the given ledgerIndex is a voting ledgerIndex.
constexpr std::size_t kMaxOracleSymbolClass
The maximum length of a SymbolClass inside an Oracle.
constexpr auto megabytes(T value) noexcept
constexpr std::size_t kEcConvertBackSigmaProofLength
Length of the compact sigma proof component for ConfidentialMPTConvertBack.
constexpr std::uint8_t kVaultDefaultIouScale
Default IOU scale factor for a Vault.
constexpr std::size_t kEcSingleBulletproofLength
Length of single bulletproof (range proof for 1 commitment) in bytes.
constexpr std::size_t kMaxCredentialsArraySize
The maximum number of credentials can be passed in array.
constexpr std::size_t kEcPedersenCommitmentLength
Length of Pedersen Commitment (compressed).
constexpr std::size_t kEcCiphertextComponentLength
Length of one compressed EC point component in an EC ElGamal ciphertext.
constexpr std::uint8_t kMaxAssetCheckDepth
Maximum recursion depth for vault shares being put as an asset inside another vault; counted from 0.
constexpr std::size_t kMaxOracleProvider
The maximum length of a Provider inside an Oracle.
constexpr std::size_t kMaxDidDocumentLength
The maximum length of a Data element inside a DID.
constexpr std::size_t kMaxMpTokenMetadataLength
The maximum length of MPTokenMetadata.
constexpr std::size_t kEcSendSigmaProofLength
Length of the compact sigma proof component for ConfidentialMPTSend.
constexpr std::size_t kEcDoubleBulletproofLength
Length of double bulletproof (range proof for 2 commitments) in bytes.
constexpr std::size_t kMaxTokenOfferCancelCount
The maximum number of token offers that can be canceled at once.
constexpr std::size_t kMaxOracleUri
The maximum length of a URI inside an Oracle.
constexpr std::size_t kMaxTrim
The maximum percentage of outliers to trim.
constexpr Bips32 percentageToBips(std::uint32_t percentage)
constexpr std::size_t kEcScalarLength
Length of a secp256k1 scalar in bytes.
constexpr std::uint16_t kMaxTransferFee
The maximum token transfer fee allowed.
constexpr std::size_t kMaxCredentialUriLength
The maximum length of a URI inside a Credential.
constexpr std::size_t kEcSendProofLength
192 bytes compact sigma proof + 754 bytes double bulletproof.
unit::ValueUnit< unit::BipsTag, T > Bips
constexpr std::size_t kDirMaxTokensPerPage
The maximum number of items in an NFT page.
constexpr std::uint8_t kVaultStrategyFirstComeFirstServe
Vault withdrawal policies.
constexpr std::size_t kMaxPermissionedDomainCredentialsArraySize
The maximum number of credentials can be passed in array for permissioned domain.
unit::ValueUnit< unit::TenthBipsTag, T > TenthBips
constexpr std::size_t kUnfundedOfferRemoveLimit
The maximum number of unfunded offers to delete at once.
constexpr std::size_t kOversizeMetaDataCap
The maximum number of metadata entries allowed in one transaction.
constexpr std::uint64_t kMaxMpTokenAmount
The maximum amount of MPTokenIssuance.
constexpr std::size_t kEcPrivKeyLength
Length of EC private key in bytes.
uint256 TxID
A transaction identifier.
constexpr std::size_t kMaxDeletableDirEntries
The maximum number of owner directory entries for account to be deletable.
constexpr std::size_t kMaxOracleDataSeries
The maximum size of a data series array inside an Oracle.
constexpr std::size_t kMaxDomainLength
The maximum length of a domain.
constexpr std::size_t kTxMaxSizeBytes
Largest legal byte size of a transaction.
constexpr std::uint32_t kFlagLedgerInterval