rippled
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions | Variables
ripple Namespace Reference

Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm. More...

Namespaces

namespace  Attestations
 
namespace  b58_ref
 
namespace  base64
 
namespace  BuildInfo
 Versioning information for this build.
 
namespace  compression
 
namespace  compression_algorithms
 
namespace  CrawlOptions
 
namespace  credentials
 
namespace  cryptoconditions
 
namespace  detail
 
namespace  InnerObjectFormatsUnitTestDetail
 
namespace  intr_ptr
 
namespace  jss
 
namespace  keylet
 Keylet computation funclets.
 
namespace  ledger_trie_detail
 
namespace  LedgerEntryHelpers
 
namespace  LedgerReplayParameters
 
namespace  metrics
 
namespace  nft
 
namespace  NodeStore
 
namespace  openssl
 
namespace  path
 
namespace  PeerFinder
 
namespace  perf
 Dummy class for unit tests.
 
namespace  permissioned_dex
 
namespace  reduce_relay
 
namespace  Resource
 
namespace  RPC
 API version numbers used in later API versions.
 
namespace  RPCCall
 Processes Ripple RPC calls.
 
namespace  STParsedJSONDetail
 
namespace  test
 
namespace  tests
 
namespace  Tuning
 
namespace  unit
 
namespace  unl
 
namespace  util
 

Classes

class  AbstractFetchPackContainer
 An interface facilitating retrieval of fetch packs without an application or ledgermaster object. More...
 
class  AcceptedLedger
 A ledger that has become irrevocable. More...
 
class  AcceptedLedgerTx
 A transaction that is in a closed ledger. More...
 
class  AccountCurrencies_test
 
class  AccountRootsDeletedClean
 Invariant: a deleted account must not have any objects left. More...
 
class  AccountRootsNotDeleted
 Invariant: we cannot remove an account ledger entry. More...
 
class  AccountSet_test
 
class  AccountStateSF
 
class  AccountTxPaging_test
 
class  AmendmentBlocked_test
 
class  AmendmentSet
 The status of all amendments requested in a given window. More...
 
struct  AmendmentState
 Current state of an amendment. More...
 
class  AmendmentTable
 The amendment table stores the list of enabled and potential amendments. More...
 
class  AmendmentTable_test
 
class  AmendmentTableImpl
 Track the list of "amendments". More...
 
class  AMMBid
 AMMBid implements AMM bid Transactor. More...
 
class  AMMClawback
 
class  AMMContext
 Maintains AMM info per overall payment engine execution and individual iteration. More...
 
class  AMMCreate
 AMMCreate implements Automatic Market Maker(AMM) creation Transactor. More...
 
class  AMMDelete
 AMMDelete implements AMM delete transactor. More...
 
class  AMMDeposit
 AMMDeposit implements AMM deposit Transactor. More...
 
class  AMMLiquidity
 AMMLiquidity class provides AMM offers to BookStep class. More...
 
class  AMMOffer
 Represents synthetic AMM offer in BookStep. More...
 
class  AMMVote
 AMMVote implements AMM vote Transactor. More...
 
class  AMMWithdraw
 
struct  AmountSpec
 
class  Application
 
class  ApplicationImp
 
class  Apply_test
 
class  ApplyContext
 State information when applying a tx. More...
 
struct  ApplyResult
 
class  ApplyView
 Writeable view to a ledger, for applying a transaction. More...
 
class  ApplyViewImpl
 Editable, discardable view that can build metadata for one tx. More...
 
class  Asset
 
class  AsyncObject
 Mix-in to track when all pending I/O is complete. More...
 
struct  bad_expected_access
 Expected is an approximation of std::expected (hoped for in C++23) More...
 
class  base_uint
 Integers of any length that is a multiple of 32-bits. More...
 
class  BaseHTTPPeer
 Represents an active connection. More...
 
class  BasePeer
 
class  BaseWSPeer
 Represents an active WebSocket connection. More...
 
class  basic_semaphore
 
class  BasicConfig
 Holds unparsed configuration information. More...
 
class  Batch
 
struct  batch_view_t
 Batch view construction tag. More...
 
class  Book
 Specifies an order book. More...
 
class  BookDirs
 
class  BookListeners
 Listen to public/subscribe messages from a book. More...
 
class  BookOfferCrossingStep
 
class  BookPaymentStep
 
class  BookStep
 
class  BookTip
 Iterates and consumes raw offers in an order book. More...
 
class  BridgeModify
 
class  Buffer
 Like std::vector<char> but better. More...
 
class  BuildInfo_test
 
class  CachedView
 Wraps a DigestAwareReadView to provide caching. More...
 
class  CancelCheck
 
class  CancelOffer
 
class  CanCvtToNotTEC
 
class  CanCvtToNotTEC< TEFcodes >
 
class  CanCvtToNotTEC< TELcodes >
 
class  CanCvtToNotTEC< TEMcodes >
 
class  CanCvtToNotTEC< TERcodes >
 
class  CanCvtToNotTEC< TEScodes >
 
class  CanCvtToTER
 
class  CanCvtToTER< NotTEC >
 
class  CanCvtToTER< TECcodes >
 
class  CanCvtToTER< TEFcodes >
 
class  CanCvtToTER< TELcodes >
 
class  CanCvtToTER< TEMcodes >
 
class  CanCvtToTER< TERcodes >
 
class  CanCvtToTER< TEScodes >
 
class  CanonicalTXSet
 Holds transactions which were deferred to the next pass of consensus. More...
 
class  CashCheck
 
class  Change
 
class  Check_test
 
class  Checkpointer
 
class  CheckpointersCollection
 
class  Clawback
 
class  Clawback_test
 
class  ClosureCounter
 The role of a ClosureCounter is to assist in shutdown by letting callers wait for the completion of closures (of a specific type signature) that they previously registered. More...
 
class  Cluster
 
class  ClusterNode
 
class  CollectionAndDelimiter
 
class  CollectionAndDelimiter< char[N]>
 
class  CollectionAndDelimiter< Collection[N]>
 
class  CollectorManager
 Provides the beast::insight::Collector service. More...
 
class  CollectorManagerImp
 
class  Config
 
class  Config_test
 
struct  ConfigSection
 
class  Connect_test
 
class  ConnectAttempt
 Manages outbound peer connection attempts with comprehensive timeout handling. More...
 
class  Consensus
 Generic implementation of consensus algorithm. More...
 
struct  ConsensusCloseTimes
 Stores the set of initial close times. More...
 
struct  ConsensusParms
 Consensus algorithm parameters. More...
 
class  ConsensusProposal
 Represents a proposed position taken during a round of consensus. More...
 
struct  ConsensusResult
 Encapsulates the result of consensus. More...
 
class  ConsensusTimer
 Measures the duration of phases of consensus. More...
 
class  ConsensusTransSetSF
 
struct  Coro_create_t
 
class  CountedObject
 Tracks the number of instances of an object. More...
 
class  CountedObjects
 Manages all counted object types. More...
 
struct  create_genesis_t
 
class  CreateCheck
 
class  CreateOffer
 Transactor specialized for creating offers in the ledger. More...
 
class  CreateTicket
 
class  CredentialAccept
 
class  CredentialCreate
 
class  CredentialDelete
 
class  csprng_engine
 A cryptographically secure random number engine. More...
 
class  CurrentTransactionRulesGuard
 RAII class to set and restore the current transaction rules. More...
 
class  DatabaseCon
 
class  DBConfig
 DBConfig is used when a client wants to delay opening a soci::session after parsing the config parameters. More...
 
class  DebugSink
 
class  DecayingSample
 Sampling function using exponential decay to provide a continuous value. More...
 
class  DecayWindow
 Sampling function using exponential decay to provide a continuous value. More...
 
class  DelegateSet
 
class  DeleteAccount
 
class  DeleteOracle
 Price Oracle is a system that acts as a bridge between a blockchain network and the external world, providing off-chain price data to decentralized applications (dApps) on the blockchain. More...
 
class  DepositPreauth
 
class  DIDDelete
 
class  DIDSet
 
class  DigestAwareReadView
 ReadView that associates keys with digests. More...
 
class  Dir
 A class that simplifies iterating ledger directory pages. More...
 
class  DirectIOfferCrossingStep
 
class  DirectIPaymentStep
 
class  DirectStepI
 
class  Discrepancy_test
 
class  DisputedTx
 A transaction discovered to be in dispute during consensus. More...
 
class  Door
 A listening socket. More...
 
class  DummyPeerSet
 
struct  DynamicCastTagSharedIntrusive
 Tag to create an intrusive pointer from another intrusive pointer by using a dynamic cast. More...
 
struct  EitherAmount
 
struct  equal_to
 
class  EscrowCancel
 
class  EscrowCreate
 
class  EscrowFinish
 
class  Expected
 
class  Expected< void, E >
 
class  Family
 
class  Feature_test
 
class  FeatureBitset
 
struct  Fees
 Reflects the fee settings for a particular ledger. More...
 
struct  FeeSetup
 Fee schedule for startup / standalone, and to vote for. More...
 
class  FeeVote
 Manager to process fee votes. More...
 
class  FeeVoteImpl
 
class  FileUtilities_test
 
class  FixNFTokenPageLinks_test
 
class  FlowOfferStream
 Presents and consumes the offers in an order book. More...
 
class  Freeze_test
 
class  GetCounts_test
 
class  GRPCServer
 
class  GRPCServerImpl
 
struct  Handoff
 Used to indicate the result of a server connection handoff. More...
 
class  hardened_hash
 Seed functor once per construction. More...
 
class  hardened_hash_test
 
class  HashRouter
 Routing table for objects identified by hash. More...
 
class  Hooks_test
 
class  HTTPClient
 Provides an asynchronous HTTP client implementation with optional SSL. More...
 
class  HTTPClientImp
 
class  HTTPClientSSLContext
 
class  InboundLedger
 
class  InboundLedgers
 Manages the lifetime of inbound ledgers. More...
 
class  InboundLedgersImp
 
class  InboundTransactions
 Manages the acquisition and lifetime of transaction sets. More...
 
class  InboundTransactionSet
 
class  InboundTransactionsImp
 
class  InfoSub
 Manages a client's subscription to data feeds. More...
 
class  InfoSubRequest
 
class  InnerObjectFormats
 Manages the list of known inner object formats. More...
 
class  InnerObjectFormatsParsedJSON_test
 
class  InnerObjectFormatsSerializer_test
 
struct  IntrusiveRefCounts
 Implement the strong count, weak count, and bit flags for an intrusive pointer. More...
 
class  InvariantChecker_PROTOTYPE
 Prototype for invariant check implementations. More...
 
class  io_list
 Manages a set of objects performing asynchronous I/O. More...
 
class  IOUAmount
 Floating point representation of amounts with high dynamic range. More...
 
class  IOUAmount_test
 
class  Issue
 A currency issued by an account. More...
 
class  Issue_test
 
class  Job
 
class  JobQueue
 A pool of threads to perform work. More...
 
struct  JobTypeData
 
class  JobTypeInfo
 Holds all the 'static' information about a job, which does not change. More...
 
class  JobTypes
 
struct  json_body
 Body that holds JSON. More...
 
struct  JsonOptions
 Note, should be treated as flags that can be | and &. More...
 
class  JsonPropertyStream
 A PropertyStream::Sink which produces a Json::Value of type objectValue. More...
 
class  KeyCache_test
 
struct  KeyEqual
 
struct  Keylet
 A pair of SHAMap key and LedgerEntryType. More...
 
struct  keyletDesc
 
class  KnownFormats
 Manages a list of known formats. More...
 
class  Ledger
 Holds a ledger. More...
 
class  LedgerCleaner
 Check the ledger/transaction databases to make sure they have continuity. More...
 
class  LedgerCleanerImp
 
class  LedgerClosed_test
 
class  LedgerData_test
 
class  LedgerDeltaAcquire
 Manage the retrieval of a ledger delta (header and transactions) from the network. More...
 
struct  LedgerEntry
 
class  LedgerEntryTypesMatch
 Invariant: corresponding modified ledger entries should match in type and added entries should be a valid type. More...
 
struct  LedgerFill
 
class  LedgerFormats
 Holds the list of known ledger entry formats. More...
 
struct  LedgerHashPair
 
struct  LedgerHeader
 Information about the notional ledger backing the view. More...
 
class  LedgerHeader_test
 
class  LedgerHistory
 Retains historical ledgers. More...
 
class  LedgerHolder
 Hold a ledger in a thread-safe way. More...
 
class  LedgerLoad_test
 
class  LedgerMaster
 
struct  LedgerRange
 
class  LedgerReplay
 
class  LedgerReplayer
 Manages the lifetime of ledger replay tasks. More...
 
class  LedgerReplayMsgHandler
 
class  LedgerReplayTask
 
class  LedgerStateFix
 
class  LedgerTrie
 Ancestry trie of ledgers. More...
 
struct  less
 
class  LoadEvent
 
class  LoadFeeTrack
 Manages the current fee schedule. More...
 
class  LoadFeeTrack_test
 
class  LoadManager
 Manages load sources. More...
 
class  LoadMonitor
 
class  LocalTx
 
class  LocalTxs
 
class  LocalTxsImp
 
class  LocalValue
 
class  LockedSociSession
 
class  Logs
 Manages partitions for logging. More...
 
struct  Manifest
 
class  ManifestCache
 Remembers manifests with the highest sequence number. More...
 
struct  match_peer
 Select the specific peer. More...
 
class  Memo_test
 
class  Message
 
class  MPTAmount
 
struct  MPTAuthorizeArgs
 
struct  MPTCreateArgs
 
class  MPTIssue
 
struct  MPTMutabilityFlags
 
class  MPTokenAuthorize
 
class  MPTokenIssuanceCreate
 
class  MPTokenIssuanceDestroy
 
class  MPTokenIssuanceSet
 
class  NegativeUNLVote
 Manager to create NegativeUNL votes. More...
 
class  NetClock
 
class  NetworkOPs
 Provides server functionality for clients. More...
 
class  NetworkOPsImp
 
class  NFTokenAcceptOffer
 
class  NFTokenAllFeatures_test
 
class  NFTokenAuth_test
 
class  NFTokenBaseUtil_test
 
class  NFTokenBurn
 
class  NFTokenBurn_test
 
class  NFTokenCancelOffer
 
class  NFTokenCountTracking
 Invariant: Validates counts of NFTokens after all transaction types. More...
 
class  NFTokenCreateOffer
 
class  NFTokenDir_test
 
class  NFTokenDisallowIncoming_test
 
class  NFTokenMint
 
class  NFTokenModify
 
class  NFTokenWOMintOffer_test
 
class  NFTokenWOModify_test
 
class  NoBadOffers
 Invariant: offers should be for non-negative amounts and must not be XRP to XRP. More...
 
class  NoDeepFreezeTrustLinesWithoutFreeze
 Invariant: Trust lines with deep freeze flag are not allowed if normal freeze flag is not set. More...
 
class  NodeFamily
 
class  NodeObject
 A simple object that the Ledger uses to store entries. More...
 
class  NodeStoreScheduler
 A NodeStore::Scheduler which uses the JobQueue. More...
 
class  NoRippleCheck_test
 
class  NoRippleCheckLimits_test
 
class  NoXRPTrustLines
 Invariant: Trust lines using XRP are not allowed. More...
 
class  NoZeroEscrow
 Invariant: an escrow entry must take a value between 0 and INITIAL_XRP drops exclusive. More...
 
class  Number
 
class  Number_test
 
struct  NumberParts
 
class  NumberRoundModeGuard
 
class  NumberSO
 RAII class to set and restore the Number switchover. More...
 
class  OfferStream
 Presents and consumes the offers in an order book. More...
 
class  OfferStream_test
 
struct  open_ledger_t
 Open ledger construction tag. More...
 
class  OpenLedger
 Represents the open ledger. More...
 
struct  openssl_ripemd160_hasher
 Message digest functions used in the codebase. More...
 
struct  openssl_sha256_hasher
 SHA-256 digest. More...
 
struct  openssl_sha512_hasher
 SHA-512 digest. More...
 
class  OpenView
 Writable ledger view that accumulates state and tx changes. More...
 
struct  OptionaledField
 Indicate std::optional field semantics. More...
 
class  OrderBookDB
 
class  Overlay
 Manages the set of connected peers. More...
 
class  OverlayImpl
 
class  OwnerInfo_test
 
class  packed_spinlock
 Classes to handle arrays of spinlocks packed into a single atomic integer: More...
 
struct  ParsedPort
 
struct  parsedURL
 
class  partitioned_unordered_map
 
class  Pathfinder
 Calculates payment paths. More...
 
class  PathFindTrustLine
 
class  PathRequest
 
class  PathRequests
 
class  PayChanClaim
 
class  PayChanCreate
 
class  PayChanFund
 
class  Payment
 
class  PaymentSandbox
 A wrapper which makes credits unavailable to balances. More...
 
class  Peer
 Represents a peer connection in the overlay. More...
 
struct  peer_in_cluster
 Select all peers (except optional excluded) that are in our cluster. More...
 
struct  peer_in_set
 Select all peers that are in the specified set. More...
 
class  PeerImp
 This class manages established peer-to-peer connections, handles message exchange, monitors connection health, and graceful shutdown. More...
 
struct  PeerReservation
 
class  PeerReservationTable
 
class  Peers_test
 
class  PeerSet
 Supports data retrieval by managing a set of peers. More...
 
class  PeerSetBuilder
 
class  PeerSetBuilderImpl
 
class  PeerSetImpl
 
class  PendingSaves
 Keeps track of which ledgers haven't been fully saved. More...
 
class  PerfLog_test
 
class  Permission
 
class  PermissionedDomainDelete
 
class  PermissionedDomainSet
 
class  PlainHTTPPeer
 
class  PlainWSPeer
 
struct  Port
 Configuration information for a Server listening port. More...
 
struct  PreclaimContext
 State information when determining if a tx is likely to claim a fee. More...
 
struct  PreclaimResult
 Describes the results of the preclaim check. More...
 
struct  PreflightContext
 State information when preflighting a tx. More...
 
struct  PreflightResult
 Describes the results of the preflight check. More...
 
class  Processor
 
class  ProtocolVersion_test
 
class  PublicKey
 A public key. More...
 
class  PublicKey_test
 
class  Quality_test
 
class  QualityFunction
 Average quality of a path as a function of out: q(out) = m * out + b, where m = -1 / poolGets, b = poolPays / poolGets. More...
 
struct  Rate
 Represents a transfer rate. More...
 
class  RawView
 Interface for ledger entry changes. More...
 
class  RCLCensorshipDetector
 
class  RCLConsensus
 Manages the generic consensus algorithm for use by the RCL. More...
 
class  RclConsensusLogger
 Collects logging information. More...
 
class  RCLCxLedger
 Represents a ledger in RCLConsensus. More...
 
class  RCLCxPeerPos
 A peer's signed, proposed position for use in RCLConsensus. More...
 
class  RCLCxTx
 Represents a transaction in RCLConsensus. More...
 
class  RCLTxSet
 Represents a set of transactions in RCLConsensus. More...
 
class  RCLValidatedLedger
 Wraps a ledger instance for use in generic Validations LedgerTrie. More...
 
class  RCLValidation
 Wrapper over STValidation for generic Validation code. More...
 
class  RCLValidationsAdaptor
 Generic validations adaptor class for RCL. More...
 
class  ReadView
 A view into a ledger. More...
 
class  RelationalDatabase
 
class  Resolver
 
class  ResolverAsio
 
class  ResolverAsioImpl
 
class  RFC1751
 
struct  ripesha_hasher
 Returns the RIPEMD-160 digest of the SHA256 hash of the message. More...
 
class  RippleLineCache
 
struct  RPCCallImp
 
class  RPCParser
 
class  RPCSub
 Subscription object for JSON RPC. More...
 
class  RPCSubImp
 
class  RPCTrustLine
 
class  Rules
 Rules controlling protocol behavior. More...
 
class  Sandbox
 Discardable, editable view to a ledger. More...
 
struct  SavedState
 
class  saveNumberRoundMode
 
class  scope_exit
 
class  scope_fail
 
class  scope_success
 
class  scope_unlock
 Automatically unlocks and re-locks a unique_lock object. More...
 
class  SecretKey
 A secret key. More...
 
class  SecretKey_test
 
class  Section
 Holds a collection of configuration values. More...
 
class  Seed
 Seeds are used to generate deterministic secret keys. More...
 
class  Seed_test
 
struct  send_always
 Sends a message to all peers. More...
 
struct  send_if_not_pred
 Sends a message to non-matching peers. More...
 
struct  send_if_pred
 Sends a message to match peers. More...
 
class  SeqEnforcer
 Enforce validation increasing sequence requirement. More...
 
class  SeqProxy
 A type that represents either a sequence value or a ticket value. More...
 
struct  SeqProxy_test
 
class  SerialIter
 
class  Serializer
 
struct  Serializer_test
 
class  Server
 A multi-protocol server. More...
 
class  ServerHandler
 
class  ServerImpl
 
class  Session
 Persistent state information for a connection session. More...
 
class  SetAccount
 
class  SetOracle
 Price Oracle is a system that acts as a bridge between a blockchain network and the external world, providing off-chain price data to decentralized applications (dApps) on the blockchain. More...
 
class  SetRegularKey
 
class  SetRegularKey_test
 
class  SetSignerList
 See the README.md for an overview of the SetSignerList transaction that this class implements. More...
 
class  SetTrust
 
class  SField
 Identifies fields. More...
 
class  SHAMap
 A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree. More...
 
class  SHAMapAccountStateLeafNode
 A leaf node for a state object. More...
 
class  SHAMapAddNode
 
class  SHAMapHash
 
class  SHAMapInnerNode
 
class  SHAMapItem
 
class  SHAMapLeafNode
 
class  SHAMapMissingNode
 
class  SHAMapNodeID
 Identifies a node inside a SHAMap. More...
 
class  SHAMapStore
 class to create database, launch online delete thread, and related SQLite database More...
 
class  SHAMapStoreImp
 
class  SHAMapSyncFilter
 
class  SHAMapTreeNode
 
class  SHAMapTxLeafNode
 A leaf node for a transaction. More...
 
class  SHAMapTxPlusMetaLeafNode
 A leaf node for a transaction and its associated metadata. More...
 
class  SharedIntrusive
 A shared intrusive pointer class that supports weak pointers. More...
 
struct  SharedIntrusiveAdoptIncrementStrongTag
 When creating or adopting a raw pointer, controls whether the strong count is incremented or not. More...
 
struct  SharedIntrusiveAdoptNoIncrementTag
 When creating or adopting a raw pointer, controls whether the strong count is incremented or not. More...
 
class  SharedWeakCachePointer
 A combination of a std::shared_ptr and a std::weak_pointer. More...
 
class  SharedWeakUnion
 A combination of a strong and a weak intrusive pointer stored in the space of a single pointer. More...
 
class  short_read_test
 
class  SignerEntries
 
class  SimpleWriter
 Deprecated: Writer that serializes a HTTP/1 message. More...
 
class  SkipListAcquire
 Manage the retrieval of a skip list in a ledger from the network. More...
 
class  SlabAllocator
 
class  SlabAllocatorSet
 A collection of slab allocators of various sizes for a given type. More...
 
class  Slice
 An immutable linear range of bytes. More...
 
class  SociDB_test
 
class  SOElement
 An element in a SOTemplate. More...
 
class  SOTemplate
 Defines the fields and their attributes within a STObject. More...
 
class  SpanTip
 The tip of a span of ledger ancestry. More...
 
class  spinlock
 A spinlock implemented on top of an atomic integer. More...
 
class  SQLiteDatabase
 
class  SQLiteDatabaseImp
 
class  SSLHTTPPeer
 
class  SSLWSPeer
 
class  STAccount
 
struct  STAccount_test
 
class  STAmount
 
class  STAmount_test
 
class  STArray
 
struct  StaticCastTagSharedIntrusive
 Tag to create an intrusive pointer from another intrusive pointer by using a static cast. More...
 
class  STBase
 A type which can be exported to a well known binary format. More...
 
class  STBitString
 
class  STBlob
 
class  STCurrency
 
class  Step
 A step in a payment path. More...
 
struct  STExchange
 Convert between serialized type U and C++ type T. More...
 
struct  STExchange< STBlob, Buffer >
 
struct  STExchange< STBlob, PublicKey >
 
struct  STExchange< STBlob, Slice >
 
struct  STExchange< STInteger< U >, T >
 
class  STInteger
 
struct  STInteger_test
 
class  STIssue
 
class  STLedgerEntry
 
class  STNumber
 A serializable number. More...
 
struct  STNumber_test
 
class  STObject
 
class  STObject_test
 
class  STParsedJSON_test
 
class  STParsedJSONObject
 Holds the serialized result of parsing an input JSON object. More...
 
class  STPath
 
class  STPathElement
 
class  STPathSet
 
struct  StrandContext
 Context needed to build Strand Steps and for error checking. More...
 
struct  StrandResult
 Result of flow() execution of a single Strand. More...
 
class  StreambufWSMsg
 
class  StringUtilities_test
 
class  STTx
 
class  STTx_test
 
class  STValidation
 
class  STValidation_test
 
class  STVector256
 
class  STXChainBridge
 
class  tagged_integer
 A type-safe wrap around standard integral types. More...
 
class  TaggedCache
 Map/cache combination. More...
 
class  TaggedCache_test
 
class  TaggedPointer
 TaggedPointer is a combination of a pointer and a mask stored in the lowest two bits. More...
 
struct  TER_test
 
class  TERSubset
 
class  TestSuite
 
class  Ticket_test
 
class  TimeKeeper
 Manages various times used by the server. More...
 
class  TimeoutCounter
 This class is an "active" object. More...
 
class  TOffer
 
class  TOfferBase
 
class  TOfferBase< STAmount, STAmount >
 
class  TOfferStreamBase
 
class  TrafficCount
 TrafficCount is used to count ingress and egress wire bytes and number of messages. More...
 
class  Transaction
 
class  Transaction_test
 
class  TransactionAcquire
 
class  TransactionEntry_test
 
class  TransactionFeeCheck
 Invariant: We should never charge a transaction a negative fee or a fee that is larger than what the transaction itself specifies. More...
 
class  TransactionHistory_test
 
class  TransactionMaster
 
class  TransactionStateSF
 
class  Transactor
 
class  TransfersNotFrozen
 Invariant: frozen trust line balance change is not allowed. More...
 
class  TrustAndBalance_test
 
struct  TrustChanges
 Changes in trusted nodes after updating validator list. More...
 
class  TrustedVotes
 TrustedVotes records the most recent votes from trusted validators. More...
 
class  TrustLineBase
 Wraps a trust line SLE for convenience. More...
 
struct  TxArgs
 
class  TxConsequences
 Class describing the consequences to the account of applying a transaction if the transaction consumes the maximum XRP allowed. More...
 
class  TxFormats
 Manages the list of known transaction formats. More...
 
class  TxMeta
 
class  TxQ
 Transaction Queue. More...
 
struct  TxResult
 
class  TxsRawView
 Interface for changing ledger entries with transactions. More...
 
struct  TypedField
 A field with a type known at compile time. More...
 
class  Unexpected
 
class  unsigned_integer
 
class  UptimeClock
 Tracks program uptime to seconds precision. More...
 
class  ValidAMM
 
struct  ValidationParms
 Timing parameters to control validation staleness and expiration. More...
 
class  Validations
 Maintains current and recent ledger validations. More...
 
struct  ValidatorBlobInfo
 Used to represent the information stored in the blobs_v2 Json array. More...
 
class  ValidatorKeys
 Validator keys and manifest as set in configuration file. More...
 
class  ValidatorList
 
class  ValidatorSite
 
struct  ValidatorToken
 
class  ValidClawback
 Invariant: Token holder's trustline balance cannot be negative after Clawback. More...
 
class  ValidMPTIssuance
 
class  ValidNewAccountRoot
 Invariant: a new account root must be the consequence of a payment, must have the right starting sequence, and the payment may not create more than one new account root. More...
 
class  ValidNFTokenPage
 Invariant: Validates several invariants for NFToken pages. More...
 
class  ValidPermissionedDEX
 
class  ValidPermissionedDomain
 Invariants: Permissioned Domains must have some rules and AcceptedCredentials must have length between 1 and 10 inclusive. More...
 
class  ValidPseudoAccounts
 Invariants: Pseudo-accounts have valid and consisent properties. More...
 
class  ValidVault
 Invariants: Vault object and MPTokenIssuance for vault shares. More...
 
class  Vault_test
 
class  VaultClawback
 
class  VaultCreate
 
class  VaultDelete
 
class  VaultDeposit
 
class  VaultSet
 
class  VaultWithdraw
 
class  Version_test
 
class  WeakIntrusive
 A weak intrusive pointer class for the SharedIntrusive pointer class. More...
 
class  Workers
 Workers is effectively a thread pool. More...
 
class  Workers_test
 
class  Writer
 
class  WSInfoSub
 
class  WSMsg
 
struct  WSSession
 
class  XChainAddAccountCreateAttestation
 
class  XChainAddClaimAttestation
 
class  XChainAttestationsBase
 
class  XChainClaim
 
struct  XChainClaimAttestation
 
class  XChainClaimAttestations
 
class  XChainCommit
 
struct  XChainCreateAccountAttestation
 
class  XChainCreateAccountAttestations
 
class  XChainCreateAccountCommit
 
class  XChainCreateBridge
 
class  XChainCreateClaimID
 
class  XRPAmount
 
class  XRPAmount_test
 
class  XRPBalanceChecks
 Invariant: An account XRP balance must be in XRP and take a value between 0 and INITIAL_XRP drops, inclusive. More...
 
class  XRPEndpointOfferCrossingStep
 
class  XRPEndpointPaymentStep
 
class  XRPEndpointStep
 
class  XRPNotCreated
 Invariant: A transaction must not create XRP and should only destroy the XRP fee. More...
 
class  ZeroCopyInputStream
 Implements ZeroCopyInputStream around a buffer sequence. More...
 
class  ZeroCopyOutputStream
 Implements ZeroCopyOutputStream around a Streambuf. More...
 

Concepts

concept  CAdoptTag
 
concept  SafeToCast
 
concept  ValidIssueType
 
concept  AssetType
 
concept  IsArithmetic
 

Typedefs

using uint128 = base_uint< 128 >
 
using uint160 = base_uint< 160 >
 
using uint256 = base_uint< 256 >
 
using uint192 = base_uint< 192 >
 
using IniFileSections = std::unordered_map< std::string, std::vector< std::string > >
 
using Blob = std::vector< unsigned char >
 Storage for linear binary data.
 
using days = std::chrono::duration< int, std::ratio_multiply< std::chrono::hours::period, std::ratio< 24 > > >
 
using weeks = std::chrono::duration< int, std::ratio_multiply< days::period, std::ratio< 7 > > >
 
using Stopwatch = beast::abstract_clock< std::chrono::steady_clock >
 A clock for measuring elapsed time.
 
using TestStopwatch = beast::manual_clock< std::chrono::steady_clock >
 A manual Stopwatch for unit tests.
 
using KeyCache = TaggedCache< uint256, int, true >
 
template<class T >
using ClosedInterval = boost::icl::closed_interval< T >
 A closed interval over the domain T.
 
template<class T >
using RangeSet = boost::icl::interval_set< T, std::less, ClosedInterval< T > >
 A set of closed intervals over the domain T.
 
template<class Key , class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using hash_map = std::unordered_map< Key, Value, Hash, Pred, Allocator >
 
template<class Key , class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using hash_multimap = std::unordered_multimap< Key, Value, Hash, Pred, Allocator >
 
template<class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using hash_set = std::unordered_set< Value, Hash, Pred, Allocator >
 
template<class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using hash_multiset = std::unordered_multiset< Value, Hash, Pred, Allocator >
 
using strong_hash = beast::xxhasher
 
template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using hardened_hash_map = std::unordered_map< Key, Value, Hash, Pred, Allocator >
 
template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using hardened_partitioned_hash_map = partitioned_unordered_map< Key, Value, Hash, Pred, Allocator >
 
template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using hardened_hash_multimap = std::unordered_multimap< Key, Value, Hash, Pred, Allocator >
 
template<class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using hardened_hash_set = std::unordered_set< Value, Hash, Pred, Allocator >
 
template<class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using hardened_hash_multiset = std::unordered_multiset< Value, Hash, Pred, Allocator >
 
using CachedSLEs = TaggedCache< uint256, SLE const >
 
using majorityAmendments_t = std::map< uint256, NetClock::time_point >
 
using EntryDeleter = std::function< std::pair< TER, SkipEntry >(LedgerEntryType, uint256 const &, std::shared_ptr< SLE > &)>
 Deleter function prototype.
 
using AccountID = base_uint< 160, detail::AccountIDTag >
 A 160-bit unsigned that uniquely identifies an account.
 
template<class T >
using Result = boost::outcome_v2::result< T, std::error_code >
 
using ripemd160_hasher = openssl_ripemd160_hasher
 
using sha256_hasher = openssl_sha256_hasher
 
using sha512_hasher = openssl_sha512_hasher
 
using sha512_half_hasher = detail::basic_sha512_half_hasher< false >
 
using sha512_half_hasher_s = detail::basic_sha512_half_hasher< true >
 
using LedgerInfo = LedgerHeader
 
using MultiApiJson = detail::MultiApiJson< RPC::apiMinimumSupportedVersion, RPC::apiMaximumValidVersion >
 
using LedgerIndex = std::uint32_t
 A ledger index.
 
using TxID = uint256
 A transaction identifier.
 
using LedgerHash = uint256
 
using SF_UINT8 = TypedField< STInteger< std::uint8_t > >
 
using SF_UINT16 = TypedField< STInteger< std::uint16_t > >
 
using SF_UINT32 = TypedField< STInteger< std::uint32_t > >
 
using SF_UINT64 = TypedField< STInteger< std::uint64_t > >
 
using SF_UINT96 = TypedField< STBitString< 96 > >
 
using SF_UINT128 = TypedField< STBitString< 128 > >
 
using SF_UINT160 = TypedField< STBitString< 160 > >
 
using SF_UINT192 = TypedField< STBitString< 192 > >
 
using SF_UINT256 = TypedField< STBitString< 256 > >
 
using SF_UINT384 = TypedField< STBitString< 384 > >
 
using SF_UINT512 = TypedField< STBitString< 512 > >
 
using SF_INT32 = TypedField< STInteger< std::int32_t > >
 
using SF_INT64 = TypedField< STInteger< std::int64_t > >
 
using SF_ACCOUNT = TypedField< STAccount >
 
using SF_AMOUNT = TypedField< STAmount >
 
using SF_ISSUE = TypedField< STIssue >
 
using SF_CURRENCY = TypedField< STCurrency >
 
using SF_NUMBER = TypedField< STNumber >
 
using SF_VL = TypedField< STBlob >
 
using SF_VECTOR256 = TypedField< STVector256 >
 
using SF_XCHAIN_BRIDGE = TypedField< STXChainBridge >
 
using STUInt128 = STBitString< 128 >
 
using STUInt160 = STBitString< 160 >
 
using STUInt192 = STBitString< 192 >
 
using STUInt256 = STBitString< 256 >
 
using STUInt8 = STInteger< unsigned char >
 
using STUInt16 = STInteger< std::uint16_t >
 
using STUInt32 = STInteger< std::uint32_t >
 
using STUInt64 = STInteger< std::uint64_t >
 
using STInt32 = STInteger< std::int32_t >
 
using SLE = STLedgerEntry
 
using TERUnderlyingType = int
 
using NotTEC = TERSubset< CanCvtToNotTEC >
 
using TER = TERSubset< CanCvtToTER >
 
template<class T >
using B58Result = Expected< T, std::error_code >
 
using Directory = base_uint< 256, detail::DirectoryTag >
 Directory is an index into the directory of offer books.
 
using Currency = base_uint< 160, detail::CurrencyTag >
 Currency is a hash representing a specific currency.
 
using NodeID = base_uint< 160, detail::NodeIDTag >
 NodeID is a 160-bit hash representing one node.
 
using MPTID = base_uint< 192 >
 MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence (big endian) and a 160-bit account.
 
using Domain = base_uint< 256 >
 Domain is a 256-bit hash representing a specific domain.
 
template<class T >
using FeeLevel = unit::ValueUnit< unit::feelevelTag, T >
 
using FeeLevel64 = FeeLevel< std::uint64_t >
 
using FeeLevelDouble = FeeLevel< double >
 
template<class T >
using Bips = unit::ValueUnit< unit::BipsTag, T >
 
using Bips16 = Bips< std::uint16_t >
 
using Bips32 = Bips< std::uint32_t >
 
template<class T >
using TenthBips = unit::ValueUnit< unit::TenthBipsTag, T >
 
using TenthBips16 = TenthBips< std::uint16_t >
 
using TenthBips32 = TenthBips< std::uint32_t >
 
using Endpoints = std::unordered_map< std::string, boost::asio::ip::tcp::endpoint >
 
using http_request_type = boost::beast::http::request< boost::beast::http::dynamic_body >
 
using http_response_type = boost::beast::http::response< boost::beast::http::dynamic_body >
 
using FullBelowCache = detail::BasicFullBelowCache
 
using TreeNodeCache = TaggedCache< uint256, SHAMapTreeNode, false, intr_ptr::SharedWeakUnionPtr< SHAMapTreeNode >, intr_ptr::SharedPtr< SHAMapTreeNode > >
 
using const_iterator = Dir::const_iterator
 
using sha256_t = unsigned_integer< 256, std::size_t >
 
using RCLValidations = Validations< RCLValidationsAdaptor >
 Alias for RCL-specific instantiation of generic Validations.
 
using CachedLedger = CachedView< Ledger >
 A ledger wrapped in a CachedView.
 
using OrderedTxs = CanonicalTXSet
 
using NodeCache = TaggedCache< SHAMapHash, Blob >
 
using CheckCancel = CancelCheck
 
using OfferCancel = CancelOffer
 
using CheckCash = CashCheck
 
using EnableAmendment = Change
 
using SetFee = Change
 
using UNLModify = Change
 
using CheckCreate = CreateCheck
 
using OfferCreate = CreateOffer
 
using TicketCreate = CreateTicket
 
using AccountDelete = DeleteAccount
 
using OracleDelete = DeleteOracle
 
using InvariantChecks = std::tuple< TransactionFeeCheck, AccountRootsNotDeleted, AccountRootsDeletedClean, LedgerEntryTypesMatch, XRPBalanceChecks, XRPNotCreated, NoXRPTrustLines, NoDeepFreezeTrustLinesWithoutFreeze, TransfersNotFrozen, NoBadOffers, NoZeroEscrow, ValidNewAccountRoot, ValidNFTokenPage, NFTokenCountTracking, ValidClawback, ValidMPTIssuance, ValidPermissionedDomain, ValidPermissionedDEX, ValidAMM, ValidPseudoAccounts, ValidVault >
 
using Offer = TOffer<>
 
using PaymentChannelCreate = PayChanCreate
 
using PaymentChannelFund = PayChanFund
 
using PaymentChannelClaim = PayChanClaim
 
using AccountSet = SetAccount
 
using OracleSet = SetOracle
 
using SignerListSet = SetSignerList
 
using TrustSet = SetTrust
 
using XChainModifyBridge = BridgeModify
 
using XChainAccountCreateCommit = XChainCreateAccountCommit
 
using semaphore = basic_semaphore< std::mutex, std::condition_variable >
 
using JobCounter = ClosureCounter< void >
 
using socket_type = boost::beast::tcp_stream
 
using stream_type = boost::beast::ssl_stream< socket_type >
 
using request_type = boost::beast::http::request< boost::beast::http::empty_body >
 
using ProtocolVersion = std::pair< std::uint16_t, std::uint16_t >
 Represents a particular version of the peer-to-peer protocol.
 
using TxnsData = RelationalDatabase::AccountTxs
 
using TxnsDataBinary = RelationalDatabase::MetaTxsList
 
using TxnDataBinary = RelationalDatabase::txnMetaLedgerType
 
using AccountTxArgs = RelationalDatabase::AccountTxArgs
 
using AccountTxResult = RelationalDatabase::AccountTxResult
 
using LedgerShortcut = RelationalDatabase::LedgerShortcut
 
using LedgerSpecifier = RelationalDatabase::LedgerSpecifier
 
using Prices = bimap< multiset_of< std::uint32_t, std::greater< std::uint32_t > >, multiset_of< STAmount > >
 
using FunctionType = Expected< uint256, Json::Value >(*)(Json::Value const &, Json::StaticString const)
 

Enumerations

enum class  ReleaseStrongRefAction { noop , partialDestroy , destroy }
 Action to perform when releasing a strong pointer. More...
 
enum class  ReleaseWeakRefAction { noop , destroy }
 Action to perform when releasing a weak pointer. More...
 
enum  LogSeverity {
  lsINVALID = -1 , lsTRACE = 0 , lsDEBUG = 1 , lsINFO = 2 ,
  lsWARNING = 3 , lsERROR = 4 , lsFATAL = 5
}
 
enum  ApplyFlags : std::uint32_t {
  tapNONE = 0x00 , tapFAIL_HARD = 0x10 , tapRETRY = 0x20 , tapUNLIMITED = 0x400 ,
  tapBATCH = 0x800 , tapDRY_RUN = 0x1000
}
 
enum class  WaiveTransferFee : bool { No = false , Yes }
 
enum class  SkipEntry : bool { No = false , Yes }
 
enum  FreezeHandling { fhIGNORE_FREEZE , fhZERO_IF_FROZEN }
 Controls the treatment of frozen account balances. More...
 
enum  AuthHandling { ahIGNORE_AUTH , ahZERO_IF_UNAUTHORIZED }
 Controls the treatment of unauthorized MPT balances. More...
 
enum class  AuthType { StrongAuth , WeakAuth , Legacy }
 
enum class  TruncateShares : bool { no = false , yes = true }
 
enum  NodeObjectType : std::uint32_t {
  hotUNKNOWN = 0 , hotLEDGER = 1 , hotACCOUNT_NODE = 3 , hotTRANSACTION_NODE = 4 ,
  hotDUMMY = 512
}
 The types of node objects. More...
 
enum class  TokenCodecErrc {
  success = 0 , inputTooLarge , inputTooSmall , badB58Character ,
  outputTooSmall , mismatchedTokenType , mismatchedChecksum , invalidEncodingChar ,
  overflowAdd , unknown
}
 
enum  error_code_i {
  rpcUNKNOWN = -1 , rpcSUCCESS = 0 , rpcBAD_SYNTAX = 1 , rpcJSON_RPC = 2 ,
  rpcFORBIDDEN = 3 , rpcWRONG_NETWORK = 4 , rpcNO_PERMISSION = 6 , rpcNO_EVENTS = 7 ,
  rpcTOO_BUSY = 9 , rpcSLOW_DOWN = 10 , rpcHIGH_FEE = 11 , rpcNOT_ENABLED = 12 ,
  rpcNOT_READY = 13 , rpcAMENDMENT_BLOCKED = 14 , rpcNO_CLOSED = 15 , rpcNO_CURRENT = 16 ,
  rpcNO_NETWORK = 17 , rpcNOT_SYNCED = 18 , rpcACT_NOT_FOUND = 19 , rpcLGR_NOT_FOUND = 21 ,
  rpcLGR_NOT_VALIDATED = 22 , rpcMASTER_DISABLED = 23 , rpcTXN_NOT_FOUND = 29 , rpcINVALID_HOTWALLET = 30 ,
  rpcINVALID_PARAMS = 31 , rpcUNKNOWN_COMMAND = 32 , rpcNO_PF_REQUEST = 33 , rpcACT_MALFORMED = 35 ,
  rpcALREADY_MULTISIG = 36 , rpcALREADY_SINGLE_SIG = 37 , rpcBAD_FEATURE = 40 , rpcBAD_ISSUER = 41 ,
  rpcBAD_MARKET = 42 , rpcBAD_SECRET = 43 , rpcBAD_SEED = 44 , rpcCHANNEL_MALFORMED = 45 ,
  rpcCHANNEL_AMT_MALFORMED = 46 , rpcCOMMAND_MISSING = 47 , rpcDST_ACT_MALFORMED = 48 , rpcDST_ACT_MISSING = 49 ,
  rpcDST_ACT_NOT_FOUND = 50 , rpcDST_AMT_MALFORMED = 51 , rpcDST_AMT_MISSING = 52 , rpcDST_ISR_MALFORMED = 53 ,
  rpcLGR_IDXS_INVALID = 57 , rpcLGR_IDX_MALFORMED = 58 , rpcPUBLIC_MALFORMED = 62 , rpcSIGNING_MALFORMED = 63 ,
  rpcSENDMAX_MALFORMED = 64 , rpcSRC_ACT_MALFORMED = 65 , rpcSRC_ACT_MISSING = 66 , rpcSRC_ACT_NOT_FOUND = 67 ,
  rpcDELEGATE_ACT_NOT_FOUND = 68 , rpcSRC_CUR_MALFORMED = 69 , rpcSRC_ISR_MALFORMED = 70 , rpcSTREAM_MALFORMED = 71 ,
  rpcATX_DEPRECATED = 72 , rpcINTERNAL = 73 , rpcNOT_IMPL = 74 , rpcNOT_SUPPORTED = 75 ,
  rpcBAD_KEY_TYPE = 76 , rpcDB_DESERIALIZATION = 77 , rpcEXCESSIVE_LGR_RANGE = 78 , rpcINVALID_LGR_RANGE = 79 ,
  rpcEXPIRED_VALIDATOR_LIST = 80 , rpcREPORTING_UNSUPPORTED = 91 , rpcOBJECT_NOT_FOUND = 92 , rpcISSUE_MALFORMED = 93 ,
  rpcORACLE_MALFORMED = 94 , rpcBAD_CREDENTIALS = 95 , rpcTX_SIGNED = 96 , rpcDOMAIN_MALFORMED = 97 ,
  rpcENTRY_NOT_FOUND = 98 , rpcUNEXPECTED_LEDGER_TYPE = 99 , rpcLAST
}
 
enum  warning_code_i { warnRPC_UNSUPPORTED_MAJORITY = 1001 , warnRPC_AMENDMENT_BLOCKED = 1002 , warnRPC_EXPIRED_VALIDATOR_LIST = 1003 , warnRPC_FIELDS_DEPRECATED = 2004 }
 Codes returned in the warnings array of certain RPC commands. More...
 
enum class  VoteBehavior : int { Obsolete = -1 , DefaultNo = 0 , DefaultYes }
 
enum class  AmendmentSupport : int { Retired = -1 , Supported = 0 , Unsupported }
 
enum class  HashPrefix : std::uint32_t {
  transactionID = detail::make_hash_prefix('T', 'X', 'N') , txNode = detail::make_hash_prefix('S', 'N', 'D') , leafNode = detail::make_hash_prefix('M', 'L', 'N') , innerNode = detail::make_hash_prefix('M', 'I', 'N') ,
  ledgerMaster = detail::make_hash_prefix('L', 'W', 'R') , txSign = detail::make_hash_prefix('S', 'T', 'X') , txMultiSign = detail::make_hash_prefix('S', 'M', 'T') , validation = detail::make_hash_prefix('V', 'A', 'L') ,
  proposal = detail::make_hash_prefix('P', 'R', 'P') , manifest = detail::make_hash_prefix('M', 'A', 'N') , paymentChannelClaim = detail::make_hash_prefix('C', 'L', 'M') , credential = detail::make_hash_prefix('C', 'R', 'D') ,
  batch = detail::make_hash_prefix('B', 'C', 'H')
}
 Prefix for hashing functions. More...
 
enum class  KeyType { secp256k1 = 0 , ed25519 = 1 }
 
enum  LedgerEntryType : std::uint16_t {
  ltANY = 0 , ltCHILD = 0x1CD2 , ltNICKNAME = 0x006e , ltCONTRACT = 0x0063 ,
  ltGENERATOR_MAP = 0x0067
}
 Identifiers for on-ledger objects. More...
 
enum  LedgerSpecificFlags {
  lsfPasswordSpent = 0x00010000 , lsfRequireDestTag , lsfRequireAuth , lsfDisallowXRP = 0x00080000 ,
  lsfDisableMaster = 0x00100000 , lsfNoFreeze = 0x00200000 , lsfGlobalFreeze = 0x00400000 , lsfDefaultRipple ,
  lsfDepositAuth = 0x01000000 , lsfDisallowIncomingNFTokenOffer , lsfDisallowIncomingCheck , lsfDisallowIncomingPayChan ,
  lsfDisallowIncomingTrustline , lsfAllowTrustLineLocking , lsfAllowTrustLineClawback , lsfPassive = 0x00010000 ,
  lsfSell = 0x00020000 , lsfHybrid = 0x00040000 , lsfLowReserve = 0x00010000 , lsfHighReserve = 0x00020000 ,
  lsfLowAuth = 0x00040000 , lsfHighAuth = 0x00080000 , lsfLowNoRipple = 0x00100000 , lsfHighNoRipple = 0x00200000 ,
  lsfLowFreeze = 0x00400000 , lsfHighFreeze = 0x00800000 , lsfLowDeepFreeze = 0x02000000 , lsfHighDeepFreeze = 0x04000000 ,
  lsfAMMNode = 0x01000000 , lsfOneOwnerCount = 0x00010000 , lsfNFTokenBuyOffers = 0x00000001 , lsfNFTokenSellOffers = 0x00000002 ,
  lsfSellNFToken = 0x00000001 , lsfMPTLocked = 0x00000001 , lsfMPTCanLock = 0x00000002 , lsfMPTRequireAuth = 0x00000004 ,
  lsfMPTCanEscrow = 0x00000008 , lsfMPTCanTrade = 0x00000010 , lsfMPTCanTransfer = 0x00000020 , lsfMPTCanClawback = 0x00000040 ,
  lsmfMPTCanMutateCanLock = 0x00000002 , lsmfMPTCanMutateRequireAuth = 0x00000004 , lsmfMPTCanMutateCanEscrow = 0x00000008 , lsmfMPTCanMutateCanTrade = 0x00000010 ,
  lsmfMPTCanMutateCanTransfer = 0x00000020 , lsmfMPTCanMutateCanClawback = 0x00000040 , lsmfMPTCanMutateMetadata = 0x00010000 , lsmfMPTCanMutateTransferFee = 0x00020000 ,
  lsfMPTAuthorized = 0x00000002 , lsfAccepted = 0x00010000 , lsfVaultPrivate = 0x00010000
}
 
enum  GranularPermissionType : std::uint32_t
 We have both transaction type permissions and granular type permissions. More...
 
enum  Delegation { delegatable , notDelegatable }
 
enum class  ECDSACanonicality { canonical , fullyCanonical }
 
enum  SerializedTypeID { XMACRO =(TO_ENUM) }
 
enum  SOEStyle { soeINVALID = -1 , soeREQUIRED = 0 , soeOPTIONAL = 1 , soeDEFAULT = 2 }
 Kind of element in each entry of an SOTemplate. More...
 
enum  SOETxMPTIssue { soeMPTNone , soeMPTSupported , soeMPTNotSupported }
 Amount fields that can support MPT. More...
 
enum  TxnSql : char {
  txnSqlNew = 'N' , txnSqlConflict = 'C' , txnSqlHeld = 'H' , txnSqlValidated = 'V' ,
  txnSqlIncluded = 'I' , txnSqlUnknown = 'U'
}
 
enum  TELcodes : TERUnderlyingType {
  telLOCAL_ERROR = -399 , telBAD_DOMAIN , telBAD_PATH_COUNT , telBAD_PUBLIC_KEY ,
  telFAILED_PROCESSING , telINSUF_FEE_P , telNO_DST_PARTIAL , telCAN_NOT_QUEUE ,
  telCAN_NOT_QUEUE_BALANCE , telCAN_NOT_QUEUE_BLOCKS , telCAN_NOT_QUEUE_BLOCKED , telCAN_NOT_QUEUE_FEE ,
  telCAN_NOT_QUEUE_FULL , telWRONG_NETWORK , telREQUIRES_NETWORK_ID , telNETWORK_ID_MAKES_TX_NON_CANONICAL ,
  telENV_RPC_FAILED
}
 
enum  TEMcodes : TERUnderlyingType {
  temMALFORMED = -299 , temBAD_AMOUNT , temBAD_CURRENCY , temBAD_EXPIRATION ,
  temBAD_FEE , temBAD_ISSUER , temBAD_LIMIT , temBAD_OFFER ,
  temBAD_PATH , temBAD_PATH_LOOP , temBAD_REGKEY , temBAD_SEND_XRP_LIMIT ,
  temBAD_SEND_XRP_MAX , temBAD_SEND_XRP_NO_DIRECT , temBAD_SEND_XRP_PARTIAL , temBAD_SEND_XRP_PATHS ,
  temBAD_SEQUENCE , temBAD_SIGNATURE , temBAD_SRC_ACCOUNT , temBAD_TRANSFER_RATE ,
  temDST_IS_SRC , temDST_NEEDED , temINVALID , temINVALID_FLAG ,
  temREDUNDANT , temRIPPLE_EMPTY , temDISABLED , temBAD_SIGNER ,
  temBAD_QUORUM , temBAD_WEIGHT , temBAD_TICK_SIZE , temINVALID_ACCOUNT_ID ,
  temCANNOT_PREAUTH_SELF , temINVALID_COUNT , temUNCERTAIN , temUNKNOWN ,
  temSEQ_AND_TICKET , temBAD_NFTOKEN_TRANSFER_FEE , temBAD_AMM_TOKENS , temXCHAIN_EQUAL_DOOR_ACCOUNTS ,
  temXCHAIN_BAD_PROOF , temXCHAIN_BRIDGE_BAD_ISSUES , temXCHAIN_BRIDGE_NONDOOR_OWNER , temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT ,
  temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT , temEMPTY_DID , temARRAY_EMPTY , temARRAY_TOO_LARGE ,
  temBAD_TRANSFER_FEE , temINVALID_INNER_BATCH
}
 
enum  TEFcodes : TERUnderlyingType {
  tefFAILURE = -199 , tefALREADY , tefBAD_ADD_AUTH , tefBAD_AUTH ,
  tefBAD_LEDGER , tefCREATED , tefEXCEPTION , tefINTERNAL ,
  tefNO_AUTH_REQUIRED , tefPAST_SEQ , tefWRONG_PRIOR , tefMASTER_DISABLED ,
  tefMAX_LEDGER , tefBAD_SIGNATURE , tefBAD_QUORUM , tefNOT_MULTI_SIGNING ,
  tefBAD_AUTH_MASTER , tefINVARIANT_FAILED , tefTOO_BIG , tefNO_TICKET ,
  tefNFTOKEN_IS_NOT_TRANSFERABLE , tefINVALID_LEDGER_FIX_TYPE
}
 
enum  TERcodes : TERUnderlyingType {
  terRETRY = -99 , terFUNDS_SPENT , terINSUF_FEE_B , terNO_ACCOUNT ,
  terNO_AUTH , terNO_LINE , terOWNERS , terPRE_SEQ ,
  terLAST , terNO_RIPPLE , terQUEUED , terPRE_TICKET ,
  terNO_AMM , terADDRESS_COLLISION , terNO_DELEGATE_PERMISSION
}
 
enum  TEScodes : TERUnderlyingType { tesSUCCESS = 0 }
 
enum  TECcodes : TERUnderlyingType {
  tecCLAIM = 100 , tecPATH_PARTIAL = 101 , tecUNFUNDED_ADD = 102 , tecUNFUNDED_OFFER = 103 ,
  tecUNFUNDED_PAYMENT = 104 , tecFAILED_PROCESSING = 105 , tecDIR_FULL = 121 , tecINSUF_RESERVE_LINE = 122 ,
  tecINSUF_RESERVE_OFFER = 123 , tecNO_DST = 124 , tecNO_DST_INSUF_XRP = 125 , tecNO_LINE_INSUF_RESERVE = 126 ,
  tecNO_LINE_REDUNDANT = 127 , tecPATH_DRY = 128 , tecUNFUNDED = 129 , tecNO_ALTERNATIVE_KEY = 130 ,
  tecNO_REGULAR_KEY = 131 , tecOWNERS = 132 , tecNO_ISSUER = 133 , tecNO_AUTH = 134 ,
  tecNO_LINE = 135 , tecINSUFF_FEE = 136 , tecFROZEN = 137 , tecNO_TARGET = 138 ,
  tecNO_PERMISSION = 139 , tecNO_ENTRY = 140 , tecINSUFFICIENT_RESERVE = 141 , tecNEED_MASTER_KEY = 142 ,
  tecDST_TAG_NEEDED = 143 , tecINTERNAL = 144 , tecOVERSIZE = 145 , tecCRYPTOCONDITION_ERROR = 146 ,
  tecINVARIANT_FAILED = 147 , tecEXPIRED = 148 , tecDUPLICATE = 149 , tecKILLED = 150 ,
  tecHAS_OBLIGATIONS = 151 , tecTOO_SOON = 152 , tecHOOK_REJECTED = 153 , tecMAX_SEQUENCE_REACHED = 154 ,
  tecNO_SUITABLE_NFTOKEN_PAGE = 155 , tecNFTOKEN_BUY_SELL_MISMATCH = 156 , tecNFTOKEN_OFFER_TYPE_MISMATCH = 157 , tecCANT_ACCEPT_OWN_NFTOKEN_OFFER = 158 ,
  tecINSUFFICIENT_FUNDS = 159 , tecOBJECT_NOT_FOUND = 160 , tecINSUFFICIENT_PAYMENT = 161 , tecUNFUNDED_AMM = 162 ,
  tecAMM_BALANCE = 163 , tecAMM_FAILED = 164 , tecAMM_INVALID_TOKENS = 165 , tecAMM_EMPTY = 166 ,
  tecAMM_NOT_EMPTY = 167 , tecAMM_ACCOUNT = 168 , tecINCOMPLETE = 169 , tecXCHAIN_BAD_TRANSFER_ISSUE = 170 ,
  tecXCHAIN_NO_CLAIM_ID = 171 , tecXCHAIN_BAD_CLAIM_ID = 172 , tecXCHAIN_CLAIM_NO_QUORUM = 173 , tecXCHAIN_PROOF_UNKNOWN_KEY = 174 ,
  tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE = 175 , tecXCHAIN_WRONG_CHAIN = 176 , tecXCHAIN_REWARD_MISMATCH = 177 , tecXCHAIN_NO_SIGNERS_LIST = 178 ,
  tecXCHAIN_SENDING_ACCOUNT_MISMATCH = 179 , tecXCHAIN_INSUFF_CREATE_AMOUNT = 180 , tecXCHAIN_ACCOUNT_CREATE_PAST = 181 , tecXCHAIN_ACCOUNT_CREATE_TOO_MANY = 182 ,
  tecXCHAIN_PAYMENT_FAILED = 183 , tecXCHAIN_SELF_COMMIT = 184 , tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR = 185 , tecXCHAIN_CREATE_ACCOUNT_DISABLED = 186 ,
  tecEMPTY_DID = 187 , tecINVALID_UPDATE_TIME = 188 , tecTOKEN_PAIR_NOT_FOUND = 189 , tecARRAY_EMPTY = 190 ,
  tecARRAY_TOO_LARGE = 191 , tecLOCKED = 192 , tecBAD_CREDENTIALS = 193 , tecWRONG_ASSET = 194 ,
  tecLIMIT_EXCEEDED = 195 , tecPSEUDO_ACCOUNT = 196 , tecPRECISION_LOSS = 197 , tecNO_DELEGATE_PERMISSION = 198
}
 
enum class  TokenType : std::uint8_t {
  None = 1 , NodePublic = 28 , NodePrivate = 32 , AccountID = 0 ,
  AccountPublic = 35 , AccountSecret = 34 , FamilyGenerator = 41 , FamilySeed = 33
}
 
enum  TxType : std::uint16_t { ttNICKNAME_SET = 6 , ttCONTRACT = 9 , ttSPINAL_TAP = 11 , ttHOOK_SET = 22 }
 Transaction type identifiers. More...
 
enum class  AttestationMatch { nonDstMismatch , matchExceptDst , match }
 
enum class  SHAMapState { Modifying = 0 , Immutable = 1 , Synching = 2 , Invalid = 3 }
 Describes the current state of a given SHAMap. More...
 
enum class  SHAMapType { TRANSACTION = 1 , STATE = 2 , FREE = 3 }
 
enum class  SHAMapNodeType { tnINNER = 1 , tnTRANSACTION_NM = 2 , tnTRANSACTION_MD = 3 , tnACCOUNT_STATE = 4 }
 
enum class  LedgerNameSpace : std::uint16_t {
  ACCOUNT = 'a' , DIR_NODE = 'd' , TRUST_LINE = 'r' , OFFER = 'o' ,
  OWNER_DIR = 'O' , BOOK_DIR = 'B' , SKIP_LIST = 's' , ESCROW = 'u' ,
  AMENDMENTS = 'f' , FEE_SETTINGS = 'e' , TICKET = 'T' , SIGNER_LIST = 'S' ,
  XRP_PAYMENT_CHANNEL = 'x' , CHECK = 'C' , DEPOSIT_PREAUTH = 'p' , DEPOSIT_PREAUTH_CREDENTIALS = 'P' ,
  NEGATIVE_UNL = 'N' , NFTOKEN_OFFER = 'q' , NFTOKEN_BUY_OFFERS = 'h' , NFTOKEN_SELL_OFFERS = 'i' ,
  AMM = 'A' , BRIDGE = 'H' , XCHAIN_CLAIM_ID = 'Q' , XCHAIN_CREATE_ACCOUNT_CLAIM_ID = 'K' ,
  DID = 'I' , ORACLE = 'R' , MPTOKEN_ISSUANCE = '~' , MPTOKEN = 't' ,
  CREDENTIAL = 'D' , PERMISSIONED_DOMAIN = 'm' , DELEGATE = 'E' , VAULT = 'V' ,
  CONTRACT = 'c' , GENERATOR = 'g' , NICKNAME = 'n'
}
 Type-specific prefix for calculating ledger indices. More...
 
enum class  BypassAccept : bool { no = false , yes }
 
enum  {
  peerCountStart = 5 , peerCountAdd = 3 , ledgerTimeoutRetriesMax = 6 , ledgerBecomeAggressiveThreshold = 4 ,
  missingNodesFind = 256 , reqNodesReply = 128 , reqNodes = 12
}
 
enum  { startPeers = 2 , setKeepRounds = 3 }
 
enum  { NORM_TIMEOUTS = 4 , MAX_TIMEOUTS = 20 }
 
enum class  IsDeposit : bool { No = false , Yes = true }
 
enum class  HashRouterFlags : std::uint16_t {
  UNDEFINED = 0x00 , BAD = 0x02 , SAVED = 0x04 , HELD = 0x08 ,
  TRUSTED = 0x10 , PRIVATE1 = 0x0100 , PRIVATE2 = 0x0200 , PRIVATE3 = 0x0400 ,
  PRIVATE4 = 0x0800 , PRIVATE5 = 0x1000 , PRIVATE6 = 0x2000
}
 
enum class  ManifestDisposition {
  accepted = 0 , stale , badMasterKey , badEphemeralKey ,
  invalid
}
 
enum class  OperatingMode {
  DISCONNECTED = 0 , CONNECTED = 1 , SYNCING = 2 , TRACKING = 3 ,
  FULL = 4
}
 Specifies the mode under which the server believes it's operating. More...
 
enum  TransStatus {
  NEW = 0 , INVALID = 1 , INCLUDED = 2 , CONFLICTED = 3 ,
  COMMITTED = 4 , HELD = 5 , REMOVED = 6 , OBSOLETE = 7 ,
  INCOMPLETE = 8
}
 
enum class  TxSearched { all , some , unknown }
 
enum class  ListDisposition {
  accepted = 0 , expired , pending , same_sequence ,
  known_sequence , stale , untrusted , unsupported_version ,
  invalid
}
 
enum class  PublisherStatus { available = 0 , expired , unavailable , revoked }
 
enum class  DebtDirection { issues , redeems }
 
enum class  QualityDirection { in , out }
 
enum class  StrandDirection { forward , reverse }
 
enum  OfferCrossing { no = 0 , yes = 1 , sell = 2 }
 
enum class  LineDirection : bool { incoming = false , outgoing = true }
 Describes how an account was found in a path, and how to find the next set of paths. More...
 
enum class  AmendmentVote : int { obsolete = -1 , up = 0 , down = 1 }
 
enum class  Validity { SigBad , SigGoodOnly , Valid }
 Describes the pre-processing validity of a transaction. More...
 
enum class  ApplyTransactionResult { Success , Fail , Retry }
 Enum class for return value from applyTransaction More...
 
enum class  WithdrawAll : bool { No = false , Yes }
 AMMWithdraw implements AMM withdraw Transactor. More...
 
enum  Privilege {
  noPriv , createAcct , createPseudoAcct = 0x0002 , mustDeleteAcct ,
  mayDeleteAcct = 0x0008 , overrideFreeze = 0x0010 , changeNFTCounts = 0x0020 , createMPTIssuance ,
  destroyMPTIssuance = 0x0080 , mustAuthorizeMPT = 0x0100 , mayAuthorizeMPT = 0x0200 , mayDeleteMPT ,
  mustModifyVault
}
 
enum class  ConsensusMode { proposing , observing , wrongLedger , switchedLedger }
 Represents how a node currently participates in Consensus. More...
 
enum class  ConsensusPhase { open , establish , accepted }
 Phases of consensus for a single ledger round. More...
 
enum class  ConsensusState { No , MovedOn , Expired , Yes }
 Whether we have or don't have a consensus. More...
 
enum class  ValStatus {
  current , stale , badSeq , multiple ,
  conflicting
}
 Status of validation we received. More...
 
enum class  SizedItem : std::size_t {
  sweepInterval = 0 , treeCacheSize , treeCacheAge , ledgerSize ,
  ledgerAge , ledgerFetch , hashNodeDBCache , txnDBCache ,
  lgrDBCache , openFinalLimit , burstSize , ramSizeGB ,
  accountIdCacheSize
}
 
enum  JobType {
  jtINVALID = -1 , jtPACK , jtPUBOLDLEDGER , jtCLIENT ,
  jtCLIENT_SUBSCRIBE , jtCLIENT_FEE_CHANGE , jtCLIENT_CONSENSUS , jtCLIENT_ACCT_HIST ,
  jtCLIENT_RPC , jtCLIENT_WEBSOCKET , jtRPC , jtSWEEP ,
  jtVALIDATION_ut , jtMANIFEST , jtUPDATE_PF , jtTRANSACTION_l ,
  jtREPLAY_REQ , jtLEDGER_REQ , jtPROPOSAL_ut , jtREPLAY_TASK ,
  jtTRANSACTION , jtMISSING_TXN , jtREQUESTED_TXN , jtBATCH ,
  jtLEDGER_DATA , jtADVANCE , jtPUBLEDGER , jtTXN_DATA ,
  jtWAL , jtVALIDATION_t , jtWRITE , jtACCEPT ,
  jtPROPOSAL_t , jtNETOP_CLUSTER , jtNETOP_TIMER , jtADMIN ,
  jtPEER , jtDISK , jtTXN_PROC , jtOB_SETUP ,
  jtPATH_FIND , jtHO_READ , jtHO_WRITE , jtGENERIC ,
  jtNS_SYNC_READ , jtNS_ASYNC_READ , jtNS_WRITE
}
 
enum class  ProtocolFeature { ValidatorListPropagation , ValidatorList2Propagation , LedgerReplay }
 
enum class  Role {
  GUEST , USER , IDENTIFIED , ADMIN ,
  PROXY , FORBID
}
 Indicates the level of administrative permission to grant. More...
 

Functions

template<class InputIter1 , class InputIter2 , class Action , class Comp >
void generalized_set_intersection (InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2, Action action, Comp comp)
 
template<class FwdIter1 , class InputIter2 , class Pred , class Comp >
FwdIter1 remove_if_intersect_or_match (FwdIter1 first1, FwdIter1 last1, InputIter2 first2, InputIter2 last2, Pred pred, Comp comp)
 
void extractTarLz4 (boost::filesystem::path const &src, boost::filesystem::path const &dst)
 Extract a tar archive compressed with lz4.
 
std::string base64_encode (std::uint8_t const *data, std::size_t len)
 
std::string base64_encode (std::string const &s)
 
std::string base64_decode (std::string_view data)
 
template<std::size_t Bits, class Tag >
constexpr std::strong_ordering operator<=> (base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
 
template<std::size_t Bits, typename Tag >
constexpr bool operator== (base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
 
template<std::size_t Bits, class Tag >
constexpr bool operator== (base_uint< Bits, Tag > const &a, std::uint64_t b)
 
template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > operator^ (base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
 
template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > operator& (base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
 
template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > operator| (base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
 
template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > operator+ (base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
 
template<std::size_t Bits, class Tag >
std::string to_string (base_uint< Bits, Tag > const &a)
 
template<std::size_t Bits, class Tag >
std::string to_short_string (base_uint< Bits, Tag > const &a)
 
template<std::size_t Bits, class Tag >
std::ostreamoperator<< (std::ostream &out, base_uint< Bits, Tag > const &u)
 
template<>
std::size_t extract (uint256 const &key)
 
template<class T >
bool set (T &target, std::string const &name, Section const &section)
 Set a value from a configuration Section If the named value is not found or doesn't parse as a T, the variable is unchanged.
 
template<class T >
bool set (T &target, T const &defaultValue, std::string const &name, Section const &section)
 Set a value from a configuration Section If the named value is not found or doesn't cast to T, the variable is assigned the default.
 
template<class T = std::string>
get (Section const &section, std::string const &name, T const &defaultValue=T{})
 Retrieve a key/value pair from a section.
 
std::string get (Section const &section, std::string const &name, char const *defaultValue)
 
template<class T >
bool get_if_exists (Section const &section, std::string const &name, T &v)
 
template<>
bool get_if_exists< bool > (Section const &section, std::string const &name, bool &v)
 
bool operator== (Buffer const &lhs, Buffer const &rhs) noexcept
 
bool operator!= (Buffer const &lhs, Buffer const &rhs) noexcept
 
template<class T >
constexpr auto kilobytes (T value) noexcept
 
template<class T >
constexpr auto megabytes (T value) noexcept
 
template<class Duration >
std::string to_string (date::sys_time< Duration > tp)
 
std::string to_string (NetClock::time_point tp)
 
template<class Duration >
std::string to_string_iso (date::sys_time< Duration > tp)
 
std::string to_string_iso (NetClock::time_point tp)
 
Stopwatchstopwatch ()
 Returns an instance of a wall clock.
 
void LogThrow (std::string const &title)
 Generates and logs a call stack.
 
void Rethrow ()
 Rethrow the exception currently being handled.
 
template<class E , class... Args>
void Throw (Args &&... args)
 
void LogicError (std::string const &how) noexcept
 Called when faulty logic causes a broken invariant.
 
template<typename E , std::size_t N>
 Unexpected (E(&)[N]) -> Unexpected< E const * >
 
std::string getFileContents (boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
 
void writeFileContents (boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
 
template<class TT , class... Args>
SharedIntrusive< TT > make_SharedIntrusive (Args &&... args)
 Create a shared intrusive pointer.
 
template<class T >
void partialDestructorFinished (T **o)
 
template<class Stream , class Iter >
Stream & join (Stream &s, Iter iter, Iter end, std::string const &delimiter)
 
std::unique_ptr< beast::Journal::SinksetDebugLogSink (std::unique_ptr< beast::Journal::Sink > sink)
 Set the sink for the debug journal.
 
beast::Journal debugLog ()
 Returns a debug journal.
 
std::shared_ptr< boost::asio::ssl::context > make_SSLContext (std::string const &cipherList)
 Create a self-signed SSL context that allows anonymous Diffie Hellman.
 
std::shared_ptr< boost::asio::ssl::context > make_SSLContextAuthed (std::string const &keyFile, std::string const &certFile, std::string const &chainFile, std::string const &cipherList)
 Create an authenticated SSL context using the specified files.
 
constexpr std::size_t calculatePercent (std::size_t count, std::size_t total)
 Calculate one number divided by another number in percentage.
 
std::optional< std::uint64_tmulDiv (std::uint64_t value, std::uint64_t mul, std::uint64_t div)
 Return value*mul/div accurately.
 
std::string to_string (Number const &amount)
 
Number operator+ (Number const &x, Number const &y)
 
Number operator- (Number const &x, Number const &y)
 
Number operator* (Number const &x, Number const &y)
 
Number operator/ (Number const &x, Number const &y)
 
constexpr Number abs (Number x) noexcept
 
Number power (Number const &f, unsigned n)
 
Number root (Number f, unsigned d)
 
Number root2 (Number f)
 
Number power (Number const &f, unsigned n, unsigned d)
 
constexpr Number squelch (Number const &x, Number const &limit) noexcept
 
template<typename Key >
static std::size_t extract (Key const &key)
 
template<>
std::size_t extract (std::string const &key)
 
beast::xor_shift_enginedefault_prng ()
 Return the default random engine.
 
template<class T >
ClosedInterval< T > range (T low, T high)
 Create a closed range interval.
 
template<class T >
std::string to_string (ClosedInterval< T > const &ci)
 Convert a ClosedInterval to a styled string.
 
template<class T >
std::string to_string (RangeSet< T > const &rs)
 Convert the given RangeSet to a styled string.
 
template<class T >
bool from_string (RangeSet< T > &rs, std::string const &s)
 Convert the given styled string to a RangeSet.
 
template<class T >
std::optional< T > prevMissing (RangeSet< T > const &rs, T t, T minVal=0)
 Find the largest value not in the set that is less than a given value.
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > safe_cast (Src s) noexcept
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_enum_v< Dest > &&std::is_integral_v< Src >, Dest > safe_cast (Src s) noexcept
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_enum_v< Src >, Dest > safe_cast (Src s) noexcept
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > unsafe_cast (Src s) noexcept
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_enum_v< Dest > &&std::is_integral_v< Src >, Dest > unsafe_cast (Src s) noexcept
 
template<class Dest , class Src >
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_enum_v< Src >, Dest > unsafe_cast (Src s) noexcept
 
template<class EF >
 scope_exit (EF) -> scope_exit< EF >
 
template<class EF >
 scope_fail (EF) -> scope_fail< EF >
 
template<class EF >
 scope_success (EF) -> scope_success< EF >
 
template<class Mutex >
 scope_unlock (std::unique_lock< Mutex > &) -> scope_unlock< Mutex >
 
bool operator!= (SHAMapHash const &x, SHAMapHash const &y)
 
template<>
std::size_t extract (SHAMapHash const &key)
 
template<class Hasher >
void hash_append (Hasher &h, Slice const &v)
 
bool operator== (Slice const &lhs, Slice const &rhs) noexcept
 
bool operator!= (Slice const &lhs, Slice const &rhs) noexcept
 
bool operator< (Slice const &lhs, Slice const &rhs) noexcept
 
template<class Stream >
Stream & operator<< (Stream &s, Slice const &v)
 
template<class T , std::size_t N>
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, SlicemakeSlice (std::array< T, N > const &a)
 
template<class T , class Alloc >
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, SlicemakeSlice (std::vector< T, Alloc > const &v)
 
template<class Traits , class Alloc >
Slice makeSlice (std::basic_string< char, Traits, Alloc > const &s)
 
template<class FwdIt >
std::string strHex (FwdIt begin, FwdIt end)
 
template<class T , class = decltype(std::declval<T>().begin())>
std::string strHex (T const &from)
 
std::string sqlBlobLiteral (Blob const &blob)
 Format arbitrary binary data as an SQLite "blob literal".
 
template<class Iterator >
std::optional< BlobstrUnHex (std::size_t strSize, Iterator begin, Iterator end)
 
std::optional< BlobstrUnHex (std::string const &strSrc)
 
std::optional< BlobstrViewUnHex (std::string_view strSrc)
 
bool parseUrl (parsedURL &pUrl, std::string const &strUrl)
 
std::string trim_whitespace (std::string str)
 
std::optional< std::uint64_tto_uint64 (std::string const &s)
 
bool isProperlyFormedTomlDomain (std::string_view domain)
 Determines if the given string looks like a TOML-file hosting domain.
 
template<class T >
std::enable_if< std::is_arithmetic< T >::value, std::string >::type to_string (T t)
 to_string() generalizes std::to_string to handle bools, chars, and strings.
 
std::string to_string (bool b)
 
std::string to_string (char c)
 
std::string to_string (std::string s)
 
std::string to_string (char const *s)
 
csprng_enginecrypto_prng ()
 The default cryptographically secure PRNG.
 
void secure_erase (void *dest, std::size_t bytes)
 Attempts to clear the given blob of memory.
 
constexpr ApplyFlags operator| (ApplyFlags const &lhs, ApplyFlags const &rhs)
 
constexpr ApplyFlags operator& (ApplyFlags const &lhs, ApplyFlags const &rhs)
 
constexpr ApplyFlags operator~ (ApplyFlags const &flags)
 
ApplyFlags operator|= (ApplyFlags &lhs, ApplyFlags const &rhs)
 
ApplyFlags operator&= (ApplyFlags &lhs, ApplyFlags const &rhs)
 
TER verifyValidDomain (ApplyView &view, AccountID const &account, uint256 domainID, beast::Journal j)
 
TER verifyDepositPreauth (STTx const &tx, ApplyView &view, AccountID const &src, AccountID const &dst, std::shared_ptr< SLE > const &sleDst, beast::Journal j)
 
Rules makeRulesGivenLedger (DigestAwareReadView const &ledger, Rules const &current)
 
Rules makeRulesGivenLedger (DigestAwareReadView const &ledger, std::unordered_set< uint256, beast::uhash<> > const &presets)
 
bool hasExpired (ReadView const &view, std::optional< std::uint32_t > const &exp)
 Determines whether the given expiration time has passed.
 
bool isGlobalFrozen (ReadView const &view, AccountID const &issuer)
 
bool isGlobalFrozen (ReadView const &view, MPTIssue const &mptIssue)
 
bool isGlobalFrozen (ReadView const &view, Asset const &asset)
 
bool isVaultPseudoAccountFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptShare, int depth)
 
bool isIndividualFrozen (ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer)
 
bool isIndividualFrozen (ReadView const &view, AccountID const &account, Issue const &issue)
 
bool isIndividualFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue)
 
bool isIndividualFrozen (ReadView const &view, AccountID const &account, Asset const &asset)
 
bool isFrozen (ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer)
 
bool isFrozen (ReadView const &view, AccountID const &account, Issue const &issue, int=0)
 
bool isFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue, int depth=0)
 
bool isFrozen (ReadView const &view, AccountID const &account, Asset const &asset, int depth=0)
 isFrozen check is recursive for MPT shares in a vault, descending to assets in the vault, up to maxAssetCheckDepth recursion depth.
 
TER checkFrozen (ReadView const &view, AccountID const &account, Issue const &issue)
 
TER checkFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue)
 
TER checkFrozen (ReadView const &view, AccountID const &account, Asset const &asset)
 
bool isAnyFrozen (ReadView const &view, std::initializer_list< AccountID > const &accounts, MPTIssue const &mptIssue, int depth=0)
 
bool isAnyFrozen (ReadView const &view, std::initializer_list< AccountID > const &accounts, Issue const &issue)
 
bool isAnyFrozen (ReadView const &view, std::initializer_list< AccountID > const &accounts, Asset const &asset, int depth=0)
 
bool isDeepFrozen (ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer)
 
bool isLPTokenFrozen (ReadView const &view, AccountID const &account, Issue const &asset, Issue const &asset2)
 
STAmount accountHolds (ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer, FreezeHandling zeroIfFrozen, beast::Journal j)
 
STAmount accountHolds (ReadView const &view, AccountID const &account, Issue const &issue, FreezeHandling zeroIfFrozen, beast::Journal j)
 
STAmount accountHolds (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue, FreezeHandling zeroIfFrozen, AuthHandling zeroIfUnauthorized, beast::Journal j)
 
STAmount accountHolds (ReadView const &view, AccountID const &account, Asset const &asset, FreezeHandling zeroIfFrozen, AuthHandling zeroIfUnauthorized, beast::Journal j)
 
STAmount accountFunds (ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, beast::Journal j)
 
XRPAmount xrpLiquid (ReadView const &view, AccountID const &id, std::int32_t ownerCountAdj, beast::Journal j)
 
void forEachItem (ReadView const &view, Keylet const &root, std::function< void(std::shared_ptr< SLE const > const &)> const &f)
 Iterate all items in the given directory.
 
bool forEachItemAfter (ReadView const &view, Keylet const &root, uint256 const &after, std::uint64_t const hint, unsigned int limit, std::function< bool(std::shared_ptr< SLE const > const &)> const &f)
 Iterate all items after an item in the given directory.
 
void forEachItem (ReadView const &view, AccountID const &id, std::function< void(std::shared_ptr< SLE const > const &)> const &f)
 Iterate all items in an account's owner directory.
 
bool forEachItemAfter (ReadView const &view, AccountID const &id, uint256 const &after, std::uint64_t const hint, unsigned int limit, std::function< bool(std::shared_ptr< SLE const > const &)> const &f)
 Iterate all items after an item in an owner directory.
 
Rate transferRate (ReadView const &view, AccountID const &issuer)
 Returns IOU issuer transfer fee as Rate.
 
Rate transferRate (ReadView const &view, MPTID const &issuanceID)
 Returns MPT transfer fee as Rate.
 
Rate transferRate (ReadView const &view, STAmount const &amount)
 Returns the transfer fee as Rate based on the type of token.
 
bool dirIsEmpty (ReadView const &view, Keylet const &k)
 Returns true if the directory is empty.
 
std::set< uint256getEnabledAmendments (ReadView const &view)
 
majorityAmendments_t getMajorityAmendments (ReadView const &view)
 
std::optional< uint256hashOfSeq (ReadView const &ledger, LedgerIndex seq, beast::Journal journal)
 Return the hash of a ledger by sequence.
 
LedgerIndex getCandidateLedger (LedgerIndex requested)
 Find a ledger index from which we could easily get the requested ledger.
 
bool areCompatible (ReadView const &validLedger, ReadView const &testLedger, beast::Journal::Stream &s, char const *reason)
 Return false if the test ledger is provably incompatible with the valid ledger, that is, they could not possibly both be valid.
 
bool areCompatible (uint256 const &validHash, LedgerIndex validIndex, ReadView const &testLedger, beast::Journal::Stream &s, char const *reason)
 
void adjustOwnerCount (ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
 Adjust the owner count up or down.
 
std::function< void(SLE::ref)> describeOwnerDir (AccountID const &account)
 
TER dirLink (ApplyView &view, AccountID const &owner, std::shared_ptr< SLE > &object)
 
AccountID pseudoAccountAddress (ReadView const &view, uint256 const &pseudoOwnerKey)
 
Expected< std::shared_ptr< SLE >, TERcreatePseudoAccount (ApplyView &view, uint256 const &pseudoOwnerKey, SField const &ownerField)
 Create pseudo-account, storing pseudoOwnerKey into ownerField.
 
bool isPseudoAccount (std::shared_ptr< SLE const > sleAcct)
 
std::vector< SField const * > const & getPseudoAccountFields ()
 
bool isPseudoAccount (ReadView const &view, AccountID accountId)
 
TER canAddHolding (ReadView const &view, Asset const &asset)
 
TER addEmptyHolding (ApplyView &view, AccountID const &accountID, XRPAmount priorBalance, Issue const &issue, beast::Journal journal)
 Any transactors that call addEmptyHolding() in doApply must call canAddHolding() in preflight with the same View and Asset.
 
TER addEmptyHolding (ApplyView &view, AccountID const &accountID, XRPAmount priorBalance, MPTIssue const &mptIssue, beast::Journal journal)
 
TER addEmptyHolding (ApplyView &view, AccountID const &accountID, XRPAmount priorBalance, Asset const &asset, beast::Journal journal)
 
TER authorizeMPToken (ApplyView &view, XRPAmount const &priorBalance, MPTID const &mptIssuanceID, AccountID const &account, beast::Journal journal, std::uint32_t flags=0, std::optional< AccountID > holderID=std::nullopt)
 
TER trustCreate (ApplyView &view, bool const bSrcHigh, AccountID const &uSrcAccountID, AccountID const &uDstAccountID, uint256 const &uIndex, SLE::ref sleAccount, bool const bAuth, bool const bNoRipple, bool const bFreeze, bool bDeepFreeze, STAmount const &saBalance, STAmount const &saLimit, std::uint32_t uSrcQualityIn, std::uint32_t uSrcQualityOut, beast::Journal j)
 Create a trust line.
 
TER removeEmptyHolding (ApplyView &view, AccountID const &accountID, Issue const &issue, beast::Journal journal)
 
TER removeEmptyHolding (ApplyView &view, AccountID const &accountID, MPTIssue const &mptIssue, beast::Journal journal)
 
TER removeEmptyHolding (ApplyView &view, AccountID const &accountID, Asset const &asset, beast::Journal journal)
 
TER trustDelete (ApplyView &view, std::shared_ptr< SLE > const &sleRippleState, AccountID const &uLowAccountID, AccountID const &uHighAccountID, beast::Journal j)
 
TER offerDelete (ApplyView &view, std::shared_ptr< SLE > const &sle, beast::Journal j)
 Delete an offer.
 
TER rippleCredit (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, bool bCheckIssuer, beast::Journal j)
 Calls static rippleCreditIOU if saAmount represents Issue.
 
TER rippleLockEscrowMPT (ApplyView &view, AccountID const &uGrantorID, STAmount const &saAmount, beast::Journal j)
 
TER rippleUnlockEscrowMPT (ApplyView &view, AccountID const &uGrantorID, AccountID const &uGranteeID, STAmount const &netAmount, STAmount const &grossAmount, beast::Journal j)
 
TER accountSend (ApplyView &view, AccountID const &from, AccountID const &to, STAmount const &saAmount, beast::Journal j, WaiveTransferFee waiveFee=WaiveTransferFee::No)
 Calls static accountSendIOU if saAmount represents Issue.
 
TER issueIOU (ApplyView &view, AccountID const &account, STAmount const &amount, Issue const &issue, beast::Journal j)
 
TER redeemIOU (ApplyView &view, AccountID const &account, STAmount const &amount, Issue const &issue, beast::Journal j)
 
TER transferXRP (ApplyView &view, AccountID const &from, AccountID const &to, STAmount const &amount, beast::Journal j)
 
TER requireAuth (ReadView const &view, Issue const &issue, AccountID const &account, AuthType authType=AuthType::Legacy)
 Check if the account lacks required authorization.
 
TER requireAuth (ReadView const &view, MPTIssue const &mptIssue, AccountID const &account, AuthType authType=AuthType::Legacy, int depth=0)
 Check if the account lacks required authorization.
 
TER requireAuth (ReadView const &view, Asset const &asset, AccountID const &account, AuthType authType=AuthType::Legacy)
 
TER enforceMPTokenAuthorization (ApplyView &view, MPTID const &mptIssuanceID, AccountID const &account, XRPAmount const &priorBalance, beast::Journal j)
 Enforce account has MPToken to match its authorization.
 
TER canTransfer (ReadView const &view, MPTIssue const &mptIssue, AccountID const &from, AccountID const &to)
 Check if the destination account is allowed to receive MPT.
 
TER cleanupOnAccountDelete (ApplyView &view, Keylet const &ownerDirKeylet, EntryDeleter const &deleter, beast::Journal j, std::optional< std::uint16_t > maxNodesToDelete=std::nullopt)
 Cleanup owner directory entries on account delete.
 
TER deleteAMMTrustLine (ApplyView &view, std::shared_ptr< SLE > sleState, std::optional< AccountID > const &ammAccountID, beast::Journal j)
 Delete trustline to AMM.
 
std::optional< STAmountassetsToSharesDeposit (std::shared_ptr< SLE const > const &vault, std::shared_ptr< SLE const > const &issuance, STAmount const &assets)
 
std::optional< STAmountsharesToAssetsDeposit (std::shared_ptr< SLE const > const &vault, std::shared_ptr< SLE const > const &issuance, STAmount const &shares)
 
std::optional< STAmountassetsToSharesWithdraw (std::shared_ptr< SLE const > const &vault, std::shared_ptr< SLE const > const &issuance, STAmount const &assets, TruncateShares truncate=TruncateShares::no)
 
std::optional< STAmountsharesToAssetsWithdraw (std::shared_ptr< SLE const > const &vault, std::shared_ptr< SLE const > const &issuance, STAmount const &shares)
 
bool after (NetClock::time_point now, std::uint32_t mark)
 Has the specified time passed?
 
void registerSSLCerts (boost::asio::ssl::context &, boost::system::error_code &, beast::Journal j)
 Register default SSL certificates.
 
std::string toBase58 (AccountID const &v)
 Convert AccountID to base58 checked string.
 
template<>
std::optional< AccountIDparseBase58 (std::string const &s)
 Parse AccountID from checked, base58 string.
 
AccountID const & xrpAccount ()
 Compute AccountID from public key.
 
AccountID const & noAccount ()
 A placeholder for empty accounts.
 
bool to_issuer (AccountID &, std::string const &)
 Convert hex or base58 string to AccountID.
 
bool isXRP (AccountID const &c)
 
std::string to_string (Currency const &c)
 Returns "", "XRP", or three letter ISO code.
 
std::ostreamoperator<< (std::ostream &os, AccountID const &x)
 
void initAccountIdCache (std::size_t count)
 Initialize the global cache used to map AccountID to base58 conversions.
 
Currency ammLPTCurrency (Currency const &cur1, Currency const &cur2)
 Calculate Liquidity Provider Token (LPT) Currency.
 
Issue ammLPTIssue (Currency const &cur1, Currency const &cur2, AccountID const &ammAccountID)
 Calculate LPT Issue from AMM asset pair.
 
NotTEC invalidAMMAmount (STAmount const &amount, std::optional< std::pair< Issue, Issue > > const &pair=std::nullopt, bool validZero=false)
 Validate the amount.
 
NotTEC invalidAMMAsset (Issue const &issue, std::optional< std::pair< Issue, Issue > > const &pair=std::nullopt)
 
NotTEC invalidAMMAssetPair (Issue const &issue1, Issue const &issue2, std::optional< std::pair< Issue, Issue > > const &pair=std::nullopt)
 
std::optional< std::uint8_tammAuctionTimeSlot (std::uint64_t current, STObject const &auctionSlot)
 Get time slot of the auction slot.
 
bool ammEnabled (Rules const &)
 Return true if required AMM amendments are enabled.
 
Number getFee (std::uint16_t tfee)
 Convert to the fee from the basis points.
 
Number feeMult (std::uint16_t tfee)
 Get fee multiplier (1 - tfee) @tfee trading fee in basis points.
 
Number feeMultHalf (std::uint16_t tfee)
 Get fee multiplier (1 - tfee / 2) @tfee trading fee in basis points.
 
STAmount toSTAmount (IOUAmount const &iou, Issue const &iss)
 
STAmount toSTAmount (IOUAmount const &iou)
 
STAmount toSTAmount (XRPAmount const &xrp)
 
STAmount toSTAmount (XRPAmount const &xrp, Issue const &iss)
 
template<class T >
toAmount (STAmount const &amt)=delete
 
template<>
STAmount toAmount< STAmount > (STAmount const &amt)
 
template<>
IOUAmount toAmount< IOUAmount > (STAmount const &amt)
 
template<>
XRPAmount toAmount< XRPAmount > (STAmount const &amt)
 
template<class T >
toAmount (IOUAmount const &amt)=delete
 
template<>
IOUAmount toAmount< IOUAmount > (IOUAmount const &amt)
 
template<class T >
toAmount (XRPAmount const &amt)=delete
 
template<>
XRPAmount toAmount< XRPAmount > (XRPAmount const &amt)
 
template<typename T >
toAmount (Issue const &issue, Number const &n, Number::rounding_mode mode=Number::getround())
 
template<typename T >
toMaxAmount (Issue const &issue)
 
STAmount toSTAmount (Issue const &issue, Number const &n, Number::rounding_mode mode=Number::getround())
 
template<typename T >
Issue getIssue (T const &amt)
 
template<typename T >
constexpr T get (STAmount const &a)
 
template<unsigned minVer, unsigned maxVer, typename Fn , typename... Args>
requires (maxVer >= minVer) && (minVer >= RPC::apiMinimumSupportedVersion) && (RPC::apiMaximumValidVersion >= maxVer) && requires { fn(std::integral_constant<unsigned int, minVer>{}, std::forward<Args>(args)...); fn(std::integral_constant<unsigned int, maxVer>{}, std::forward<Args>(args)...); }
void forApiVersions (Fn const &fn, Args &&... args)
 
template<typename Fn , typename... Args>
requires requires { forApiVersions< RPC::apiMinimumSupportedVersion, RPC::apiMaximumValidVersion>(fn, std::forward<Args>(args)...); }
void forAllApiVersions (Fn const &fn, Args &&... args)
 
Json::Value to_json (Asset const &asset)
 
constexpr bool operator== (Asset const &lhs, Asset const &rhs)
 
constexpr std::weak_ordering operator<=> (Asset const &lhs, Asset const &rhs)
 
constexpr bool operator== (Currency const &lhs, Asset const &rhs)
 
constexpr bool equalTokens (Asset const &lhs, Asset const &rhs)
 
bool isXRP (Asset const &asset)
 
std::string to_string (Asset const &asset)
 
bool validJSONAsset (Json::Value const &jv)
 
Asset assetFromJson (Json::Value const &jv)
 
void serializeBatch (Serializer &msg, std::uint32_t const &flags, std::vector< uint256 > const &txids)
 
bool isConsistent (Book const &book)
 
std::string to_string (Book const &book)
 
std::ostreamoperator<< (std::ostream &os, Book const &x)
 
template<class Hasher >
void hash_append (Hasher &h, Book const &b)
 
Book reversed (Book const &book)
 
template<class = void>
secp256k1_context const * secp256k1Context ()
 
ripple::detail::TokenCodecErrcCategory const & TokenCodecErrcCategory ()
 
std::error_code make_error_code (ripple::TokenCodecErrc e)
 
template<class... Args>
sha512_half_hasher::result_type sha512Half (Args const &... args)
 Returns the SHA512-Half of a series of objects.
 
template<class... Args>
sha512_half_hasher_s::result_type sha512Half_s (Args const &... args)
 Returns the SHA512-Half of a series of objects.
 
std::string rpcErrorString (Json::Value const &jv)
 Returns a single string with the contents of an RPC error.
 
std::map< std::string, AmendmentSupport > const & allAmendments ()
 All amendments libxrpl knows about.
 
std::optional< uint256getRegisteredFeature (std::string const &name)
 
size_t featureToBitsetIndex (uint256 const &f)
 
uint256 bitsetIndexToFeature (size_t i)
 
std::string featureToName (uint256 const &f)
 
template<class F >
void foreachFeature (FeatureBitset bs, F &&f)
 
template<class Hasher >
void hash_append (Hasher &h, HashPrefix const &hp) noexcept
 
uint256 getBookBase (Book const &book)
 
uint256 getQualityNext (uint256 const &uBase)
 
std::uint64_t getQuality (uint256 const &uBase)
 
uint256 getTicketIndex (AccountID const &account, std::uint32_t uSequence)
 
uint256 getTicketIndex (AccountID const &account, SeqProxy ticketSeq)
 
MPTID makeMptID (std::uint32_t sequence, AccountID const &account)
 
std::string to_string (IOUAmount const &amount)
 
IOUAmount mulRatio (IOUAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
 
bool getSTNumberSwitchover ()
 
void setSTNumberSwitchover (bool v)
 
bool isConsistent (Issue const &ac)
 
std::string to_string (Issue const &ac)
 
Json::Value to_json (Issue const &is)
 
Issue issueFromJson (Json::Value const &v)
 
std::ostreamoperator<< (std::ostream &os, Issue const &x)
 
template<class Hasher >
void hash_append (Hasher &h, Issue const &r)
 
Issue const & xrpIssue ()
 Returns an asset specifier that represents XRP.
 
Issue const & noIssue ()
 Returns an asset specifier that represents no account and currency.
 
bool isXRP (Issue const &issue)
 
std::optional< KeyTypekeyTypeFromString (std::string const &s)
 
char const * to_string (KeyType type)
 
template<class Stream >
Stream & operator<< (Stream &s, KeyType type)
 
bool getCloseAgree (LedgerHeader const &info)
 
void addRaw (LedgerHeader const &, Serializer &, bool includeHash=false)
 
LedgerHeader deserializeHeader (Slice data, bool hasHash=false)
 Deserialize a ledger header from a byte array.
 
LedgerHeader deserializePrefixedHeader (Slice data, bool hasHash=false)
 Deserialize a ledger header (prefixed with 4 bytes) from a byte array.
 
std::string to_string (MPTAmount const &amount)
 
MPTAmount mulRatio (MPTAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
 
constexpr bool operator== (MPTIssue const &lhs, MPTIssue const &rhs)
 
constexpr std::weak_ordering operator<=> (MPTIssue const &lhs, MPTIssue const &rhs)
 
bool isXRP (MPTID const &)
 MPT is a non-native token.
 
Json::Value to_json (MPTIssue const &mptIssue)
 
std::string to_string (MPTIssue const &mptIssue)
 
MPTIssue mptIssueFromJson (Json::Value const &jv)
 
void serializePayChanAuthorization (Serializer &msg, uint256 const &key, XRPAmount const &amt)
 
std::ostreamoperator<< (std::ostream &os, PublicKey const &pk)
 Print the public key to a stream.
 
bool operator== (PublicKey const &lhs, PublicKey const &rhs)
 
bool operator< (PublicKey const &lhs, PublicKey const &rhs)
 
template<class Hasher >
void hash_append (Hasher &h, PublicKey const &pk)
 
std::string toBase58 (TokenType type, PublicKey const &pk)
 
template<>
std::optional< PublicKeyparseBase58 (TokenType type, std::string const &s)
 
std::optional< ECDSACanonicalityecdsaCanonicality (Slice const &sig)
 Determines the canonicality of a signature.
 
bool verifyDigest (PublicKey const &publicKey, uint256 const &digest, Slice const &sig, bool mustBeFullyCanonical=true) noexcept
 Verify a secp256k1 signature on the digest of a message.
 
bool verify (PublicKey const &publicKey, Slice const &m, Slice const &sig, bool mustBeFullyCanonical=true) noexcept
 Verify a signature on a message.
 
NodeID calcNodeID (PublicKey const &)
 Calculate the 160-bit node ID from a node public key.
 
AccountID calcAccountID (PublicKey const &pk)
 
std::string getFingerprint (beast::IP::Endpoint const &address, std::optional< PublicKey > const &publicKey=std::nullopt, std::optional< std::string > const &id=std::nullopt)
 
bool operator== (Rate const &lhs, Rate const &rhs) noexcept
 
bool operator< (Rate const &lhs, Rate const &rhs) noexcept
 
std::ostreamoperator<< (std::ostream &os, Rate const &rate)
 
STAmount multiply (STAmount const &amount, Rate const &rate)
 
STAmount multiplyRound (STAmount const &amount, Rate const &rate, bool roundUp)
 
STAmount multiplyRound (STAmount const &amount, Rate const &rate, Asset const &asset, bool roundUp)
 
STAmount divide (STAmount const &amount, Rate const &rate)
 
STAmount divideRound (STAmount const &amount, Rate const &rate, bool roundUp)
 
STAmount divideRound (STAmount const &amount, Rate const &rate, Asset const &asset, bool roundUp)
 
bool isRpcError (Json::Value jvResult)
 
Json::Value rpcError (int iError)
 
bool isFeatureEnabled (uint256 const &feature)
 
std::optional< Rules > const & getCurrentTransactionRules ()
 
void setCurrentTransactionRules (std::optional< Rules > r)
 
bool operator== (SecretKey const &lhs, SecretKey const &rhs)
 
bool operator!= (SecretKey const &lhs, SecretKey const &rhs)
 
template<>
std::optional< SecretKeyparseBase58 (TokenType type, std::string const &s)
 Parse a secret key.
 
std::string toBase58 (TokenType type, SecretKey const &sk)
 
SecretKey randomSecretKey ()
 Create a secret key using secure random numbers.
 
SecretKey generateSecretKey (KeyType type, Seed const &seed)
 Generate a new secret key deterministically.
 
PublicKey derivePublicKey (KeyType type, SecretKey const &sk)
 Derive the public key from a secret key.
 
std::pair< PublicKey, SecretKeygenerateKeyPair (KeyType type, Seed const &seed)
 Generate a key pair deterministically.
 
std::pair< PublicKey, SecretKeyrandomKeyPair (KeyType type)
 Create a key pair using secure random numbers.
 
Seed randomSeed ()
 Create a seed using secure random numbers.
 
Seed generateSeed (std::string const &passPhrase)
 Generate a seed deterministically.
 
template<>
std::optional< SeedparseBase58 (std::string const &s)
 Parse a Base58 encoded string into a seed.
 
std::optional< SeedparseGenericSeed (std::string const &str, bool rfc1751=true)
 Attempt to parse a string as a seed.
 
std::string seedAs1751 (Seed const &seed)
 Encode a Seed in RFC1751 format.
 
std::string toBase58 (Seed const &seed)
 Format a seed as a Base58 string.
 
template<class Object >
Blob serializeBlob (Object const &o)
 Serialize an object to a blob.
 
std::string serializeHex (STObject const &o)
 Serialize an object to a hex string.
 
int field_code (SerializedTypeID id, int index)
 
int field_code (int id, int index)
 
template<class T >
OptionaledField< T > operator~ (TypedField< T > const &f)
 
void sign (STObject &st, HashPrefix const &prefix, KeyType type, SecretKey const &sk, SF_VL const &sigField=sfSignature)
 Sign an STObject.
 
bool verify (STObject const &st, HashPrefix const &prefix, PublicKey const &pk, SF_VL const &sigField=sfSignature)
 Returns true if STObject contains valid signature.
 
Serializer buildMultiSigningData (STObject const &obj, AccountID const &signingID)
 Return a Serializer suitable for computing a multisigning TxnSignature.
 
Serializer startMultiSigningData (STObject const &obj)
 Break the multi-signing hash computation into 2 parts for optimization.
 
void finishMultiSigningData (AccountID const &signingID, Serializer &s)
 
bool operator== (STAccount const &lhs, STAccount const &rhs)
 
auto operator< (STAccount const &lhs, STAccount const &rhs)
 
bool operator== (STAccount const &lhs, AccountID const &rhs)
 
auto operator< (STAccount const &lhs, AccountID const &rhs)
 
auto operator< (AccountID const &lhs, STAccount const &rhs)
 
STAmount amountFromQuality (std::uint64_t rate)
 
STAmount amountFromString (Asset const &asset, std::string const &amount)
 
STAmount amountFromJson (SField const &name, Json::Value const &v)
 
bool amountFromJsonNoThrow (STAmount &result, Json::Value const &jvSource)
 
STAmount const & toSTAmount (STAmount const &a)
 
bool isLegalNet (STAmount const &value)
 
bool operator== (STAmount const &lhs, STAmount const &rhs)
 
bool operator< (STAmount const &lhs, STAmount const &rhs)
 
bool operator!= (STAmount const &lhs, STAmount const &rhs)
 
bool operator> (STAmount const &lhs, STAmount const &rhs)
 
bool operator<= (STAmount const &lhs, STAmount const &rhs)
 
bool operator>= (STAmount const &lhs, STAmount const &rhs)
 
STAmount operator- (STAmount const &value)
 
STAmount operator+ (STAmount const &v1, STAmount const &v2)
 
STAmount operator- (STAmount const &v1, STAmount const &v2)
 
STAmount divide (STAmount const &v1, STAmount const &v2, Asset const &asset)
 
STAmount multiply (STAmount const &v1, STAmount const &v2, Asset const &asset)
 
STAmount mulRound (STAmount const &v1, STAmount const &v2, Asset const &asset, bool roundUp)
 
STAmount mulRoundStrict (STAmount const &v1, STAmount const &v2, Asset const &asset, bool roundUp)
 
STAmount divRound (STAmount const &v1, STAmount const &v2, Asset const &asset, bool roundUp)
 
STAmount divRoundStrict (STAmount const &v1, STAmount const &v2, Asset const &asset, bool roundUp)
 
std::uint64_t getRate (STAmount const &offerOut, STAmount const &offerIn)
 
bool isXRP (STAmount const &amount)
 
bool canAdd (STAmount const &a, STAmount const &b)
 Safely checks if two STAmount values can be added without overflow, underflow, or precision loss.
 
bool canSubtract (STAmount const &a, STAmount const &b)
 Determines if it is safe to subtract one STAmount from another.
 
template<typename T >
requires requires(T const& t) { { t.getJson(JsonOptions::none) } -> std::convertible_to<Json::Value>; }
Json::Value to_json (T const &t)
 
std::ostreamoperator<< (std::ostream &out, STBase const &t)
 
STCurrency currencyFromJson (SField const &name, Json::Value const &v)
 
bool operator== (STCurrency const &lhs, STCurrency const &rhs)
 
bool operator!= (STCurrency const &lhs, STCurrency const &rhs)
 
bool operator< (STCurrency const &lhs, STCurrency const &rhs)
 
bool operator== (STCurrency const &lhs, Currency const &rhs)
 
bool operator< (STCurrency const &lhs, Currency const &rhs)
 
template<class U , class T >
void set (STObject &st, TypedField< U > const &f, T &&t)
 Set a field value in an STObject.
 
template<class Init >
void set (STObject &st, TypedField< STBlob > const &f, std::size_t size, Init &&init)
 Set a blob field using an init function.
 
template<class = void>
void set (STObject &st, TypedField< STBlob > const &f, void const *data, std::size_t size)
 Set a blob field from data.
 
template<class U >
void erase (STObject &st, TypedField< U > const &f)
 Remove a field in an STObject.
 
STIssue issueFromJson (SField const &name, Json::Value const &v)
 
constexpr bool operator== (STIssue const &lhs, STIssue const &rhs)
 
constexpr std::weak_ordering operator<=> (STIssue const &lhs, STIssue const &rhs)
 
constexpr bool operator== (STIssue const &lhs, Asset const &rhs)
 
constexpr std::weak_ordering operator<=> (STIssue const &lhs, Asset const &rhs)
 
std::ostreamoperator<< (std::ostream &out, STNumber const &rhs)
 
NumberParts partsFromString (std::string const &number)
 
STNumber numberFromJson (SField const &field, Json::Value const &value)
 
void throwFieldNotFound (SField const &field)
 
bool passesLocalChecks (STObject const &st, std::string &)
 
std::shared_ptr< STTx const > sterilize (STTx const &stx)
 Sterilize a transaction.
 
bool isPseudoTx (STObject const &tx)
 Check whether a transaction is a pseudo-transaction.
 
bool operator== (STXChainBridge const &lhs, STXChainBridge const &rhs)
 
bool operator< (STXChainBridge const &lhs, STXChainBridge const &rhs)
 
static std::string const & systemName ()
 
bool isLegalAmount (XRPAmount const &amount)
 Returns true if the amount does not exceed the initial XRP in existence.
 
bool isLegalAmountSigned (XRPAmount const &amount)
 Returns true if the absolute value of the amount does not exceed the initial XRP in existence.
 
static std::string const & systemCurrencyCode ()
 
constexpr TERUnderlyingType TERtoInt (TELcodes v)
 
constexpr TERUnderlyingType TERtoInt (TEMcodes v)
 
constexpr TERUnderlyingType TERtoInt (TEFcodes v)
 
constexpr TERUnderlyingType TERtoInt (TERcodes v)
 
constexpr TERUnderlyingType TERtoInt (TEScodes v)
 
constexpr TERUnderlyingType TERtoInt (TECcodes v)
 
template<typename L , typename R >
constexpr auto operator== (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
template<typename L , typename R >
constexpr auto operator!= (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
template<typename L , typename R >
constexpr auto operator< (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
template<typename L , typename R >
constexpr auto operator<= (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
template<typename L , typename R >
constexpr auto operator> (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
template<typename L , typename R >
constexpr auto operator>= (L const &lhs, R const &rhs) -> std::enable_if_t< std::is_same< decltype(TERtoInt(lhs)), int >::value &&std::is_same< decltype(TERtoInt(rhs)), int >::value, bool >
 
bool isTelLocal (TER x) noexcept
 
bool isTemMalformed (TER x) noexcept
 
bool isTefFailure (TER x) noexcept
 
bool isTerRetry (TER x) noexcept
 
bool isTesSuccess (TER x) noexcept
 
bool isTecClaim (TER x) noexcept
 
std::unordered_map< TERUnderlyingType, std::pair< char const *const, char const *const > > const & transResults ()
 
bool transResultInfo (TER code, std::string &token, std::string &text)
 
std::string transToken (TER code)
 
std::string transHuman (TER code)
 
std::optional< TERtransCode (std::string const &token)
 
template<class T >
std::optional< T > parseBase58 (std::string const &s)
 
template<class T >
std::optional< T > parseBase58 (TokenType type, std::string const &s)
 
std::string encodeBase58Token (TokenType type, void const *token, std::size_t size)
 Encode data in Base58Check format using XRPL alphabet.
 
std::string decodeBase58Token (std::string const &s, TokenType type)
 
Currency const & xrpCurrency ()
 XRP currency.
 
Currency const & noCurrency ()
 A placeholder for empty currencies.
 
Currency const & badCurrency ()
 We deliberately disallow the currency that looks like "XRP" because too many people were using it instead of the correct XRP currency.
 
bool to_currency (Currency &, std::string const &)
 Tries to convert a string to a Currency, returns true on success.
 
Currency to_currency (std::string const &)
 Tries to convert a string to a Currency, returns noCurrency() on failure.
 
template<class Source1 , class Source2 , unit::muldivable< Source1, Source2 > Dest>
std::optional< Dest > mulDiv (Source1 value, Dest mul, Source2 div)
 
template<class Source1 , class Source2 , unit::muldivCommutable< Source1, Source2 > Dest>
std::optional< Dest > mulDiv (Dest value, Source1 mul, Source2 div)
 
template<unit::muldivDest Dest>
std::optional< Dest > mulDiv (std::uint64_t value, Dest mul, std::uint64_t div)
 
template<unit::muldivDest Dest>
std::optional< Dest > mulDiv (Dest value, std::uint64_t mul, std::uint64_t div)
 
template<unit::muldivSource Source1, unit::muldivSources< Source1 > Source2>
std::optional< std::uint64_tmulDiv (Source1 value, std::uint64_t mul, Source2 div)
 
template<unit::muldivSource Source1, unit::muldivSources< Source1 > Source2>
std::optional< std::uint64_tmulDiv (std::uint64_t value, Source1 mul, Source2 div)
 
template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src>
constexpr Dest safe_cast (Src s) noexcept
 
template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src>
constexpr Dest unsafe_cast (Src s) noexcept
 
template<class TAttestation >
bool operator== (XChainAttestationsBase< TAttestation > const &lhs, XChainAttestationsBase< TAttestation > const &rhs)
 
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, XRPAmount const &q)
 
std::string to_string (XRPAmount const &amount)
 
XRPAmount mulRatio (XRPAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
 
void HTTPReply (int nStatus, std::string const &strMsg, Json::Output const &, beast::Journal j)
 
template<class T >
decltype(auto) get_lowest_layer (T &t) noexcept
 
std::ostreamoperator<< (std::ostream &os, Port const &p)
 
void parse_Port (ParsedPort &port, Section const &section, std::ostream &log)
 
template<class Handler >
std::unique_ptr< Servermake_Server (Handler &handler, boost::asio::io_context &io_context, beast::Journal journal)
 Create the HTTP server using the specified handler.
 
int popcnt16 (std::uint16_t a)
 
bool operator== (SHAMap::const_iterator const &x, SHAMap::const_iterator const &y)
 
bool operator!= (SHAMap::const_iterator const &x, SHAMap::const_iterator const &y)
 
void intrusive_ptr_add_ref (SHAMapItem const *x)
 
void intrusive_ptr_release (SHAMapItem const *x)
 
boost::intrusive_ptr< SHAMapItemmake_shamapitem (uint256 const &tag, Slice data)
 
boost::intrusive_ptr< SHAMapItemmake_shamapitem (SHAMapItem const &other)
 
std::string to_string (SHAMapType t)
 
std::string to_string (SHAMapNodeID const &node)
 
std::ostreamoperator<< (std::ostream &out, SHAMapNodeID const &node)
 
unsigned int selectBranch (SHAMapNodeID const &id, uint256 const &hash)
 Returns the branch that would contain the given hash.
 
std::ostreamoperator<< (std::ostream &os, Section const &section)
 
std::ostreamoperator<< (std::ostream &ss, BasicConfig const &c)
 
static DebugSinkdebugSink ()
 
static unsigned divu10 (uint128_t &u)
 
static std::uint32_t confineOwnerCount (std::uint32_t current, std::int32_t adjustment, std::optional< AccountID > const &id=std::nullopt, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
 
TER canAddHolding (ReadView const &view, Issue const &issue)
 
TER canAddHolding (ReadView const &view, MPTIssue const &mptIssue)
 
static TER rippleCreditIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, bool bCheckIssuer, beast::Journal j)
 
static TER rippleSendIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, STAmount &saActual, beast::Journal j, WaiveTransferFee waiveFee)
 
static TER accountSendIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j, WaiveTransferFee waiveFee)
 
static TER rippleCreditMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j)
 
static TER rippleSendMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, STAmount &saActual, beast::Journal j, WaiveTransferFee waiveFee)
 
static TER accountSendMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j, WaiveTransferFee waiveFee)
 
static bool updateTrustLine (ApplyView &view, SLE::pointer state, bool bSenderHigh, AccountID const &sender, STAmount const &before, STAmount const &after, beast::Journal j)
 
TER cleanupOnAccountDelete (ApplyView &view, Keylet const &ownerDirKeylet, EntryDeleter const &deleter, beast::Journal j, std::optional< uint16_t > maxNodesToDelete)
 
template<>
std::optional< AccountIDparseBase58 (std::string const &s)
 Parse AccountID from checked, base58 string.
 
std::size_t hash_value (ripple::uint256 const &feature)
 
uint256 registerFeature (std::string const &name, Supported support, VoteBehavior vote)
 
uint256 retireFeature (std::string const &name)
 
bool registrationIsDone ()
 Tell FeatureCollections when registration is complete.
 
template<class... Args>
static uint256 indexHash (LedgerNameSpace space, Args const &... args)
 
template<>
std::optional< PublicKeyparseBase58 (TokenType type, std::string const &s)
 Parse a secret key.
 
static std::optional< SlicesigPart (Slice &buf)
 
static std::string sliceToHex (Slice const &slice)
 
static bool ed25519Canonical (Slice const &sig)
 
template<STAmount( *DivRoundFunc)(STAmount const &, STAmount const &, Asset const &, bool) >
static Amounts ceil_in_impl (Amounts const &amount, STAmount const &limit, bool roundUp, Quality const &quality)
 
template<STAmount( *MulRoundFunc)(STAmount const &, STAmount const &, Asset const &, bool) >
static Amounts ceil_out_impl (Amounts const &amount, STAmount const &limit, bool roundUp, Quality const &quality)
 
Quality composed_quality (Quality const &lhs, Quality const &rhs)
 
Rate const parityRate (QUALITY_ONE)
 
template<>
std::optional< SecretKeyparseBase58 (TokenType type, std::string const &s)
 Parse a secret key.
 
template<>
std::optional< SeedparseBase58 (std::string const &s)
 Parse AccountID from checked, base58 string.
 
SField const sfInvalid (access, -1, "")
 
SField const sfGeneric (access, 0, "Generic")
 
static std::int64_t getInt64Value (STAmount const &amount, bool valid, char const *error)
 
static std::int64_t getSNValue (STAmount const &amount)
 
static std::int64_t getMPTValue (STAmount const &amount)
 
static bool areComparable (STAmount const &v1, STAmount const &v2)
 
static std::uint64_t muldiv (std::uint64_t multiplier, std::uint64_t multiplicand, std::uint64_t divisor)
 
static std::uint64_t muldiv_round (std::uint64_t multiplier, std::uint64_t multiplicand, std::uint64_t divisor, std::uint64_t rounding)
 
static void canonicalizeRound (bool native, std::uint64_t &value, int &offset, bool)
 
static void canonicalizeRoundStrict (bool native, std::uint64_t &value, int &offset, bool roundUp)
 
template<void(*)(bool, std::uint64_t &, int &, bool) CanonicalizeFunc, typename MightSaveRound >
static STAmount mulRoundImpl (STAmount const &v1, STAmount const &v2, Asset const &asset, bool roundUp)
 
template<typename MightSaveRound >
static STAmount divRoundImpl (STAmount const &num, STAmount const &den, Asset const &asset, bool roundUp)
 
static auto getTxFormat (TxType type)
 
static Blob getSigningData (STTx const &that)
 
static Expected< void, std::stringsingleSignHelper (STObject const &sigObject, Slice const &data, bool const fullyCanonical)
 
Expected< void, std::stringmultiSignHelper (STObject const &sigObject, std::optional< AccountID > txnAccountID, bool const fullyCanonical, std::function< Serializer(AccountID const &)> makeMsg, Rules const &rules)
 
static bool isMemoOkay (STObject const &st, std::string &reason)
 
static bool isAccountFieldOkay (STObject const &st)
 
static bool invalidMPTAmountInTx (STObject const &tx)
 
static bool isRawTransactionOkay (STObject const &st, std::string &reason)
 
template<class Hasher >
static Hasher::result_type digest (void const *data, std::size_t size) noexcept
 
template<class Hasher , class T , std::size_t N, class = std::enable_if_t<sizeof(T) == 1>>
static Hasher::result_type digest (std::array< T, N > const &v)
 
template<class Hasher , class... Args>
static Hasher::result_type digest2 (Args const &... args)
 
static void checksum (void *out, void const *message, std::size_t size)
 Calculate a 4-byte checksum of the data.
 
bool operator== (XChainClaimAttestation const &lhs, XChainClaimAttestation const &rhs)
 
bool operator== (XChainCreateAccountAttestation const &lhs, XChainCreateAccountAttestation const &rhs)
 
std::string getHTTPHeaderTimestamp ()
 
static void populate (Section const &section, std::string const &field, std::ostream &log, std::vector< boost::asio::ip::network_v4 > &nets4, std::vector< boost::asio::ip::network_v6 > &nets6)
 
intr_ptr::SharedPtr< SHAMapLeafNodemakeTypedLeaf (SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t owner)
 
static uint256 const & depthMask (unsigned int depth)
 
 BEAST_DEFINE_TESTSUITE (AccountTxPaging, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (AmendmentTable, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Check, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Clawback, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Discrepancy, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (FixNFTokenPageLinks, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Freeze, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (LedgerLoad, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (LoadFeeTrack, app, ripple)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenBaseUtil, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenDisallowIncoming, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenWOMintOffer, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenWOModify, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenAllFeatures, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenAuth, app, ripple, 2)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenBurn, app, ripple, 3)
 
 BEAST_DEFINE_TESTSUITE_PRIO (NFTokenDir, app, ripple, 1)
 
 BEAST_DEFINE_TESTSUITE (OfferStream, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (SetRegularKey, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Ticket, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (TrustAndBalance, app, ripple)
 
 BEAST_DEFINE_TESTSUITE (Apply, tx, ripple)
 
 BEAST_DEFINE_TESTSUITE_PRIO (Vault, app, ripple, 1)
 
 BEAST_DEFINE_TESTSUITE (FileUtilities, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (hardened_hash, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (IOUAmount, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (KeyCache, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (Number, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (PerfLog, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (StringUtilities, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (TaggedCache, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (XRPAmount, basics, ripple)
 
 BEAST_DEFINE_TESTSUITE (Config, core, ripple)
 
 BEAST_DEFINE_TESTSUITE (SociDB, core, ripple)
 
 BEAST_DEFINE_TESTSUITE (Workers, core, ripple)
 
 BEAST_DEFINE_TESTSUITE (ProtocolVersion, overlay, ripple)
 
 BEAST_DEFINE_TESTSUITE (short_read, overlay, ripple)
 
 BEAST_DEFINE_TESTSUITE (BuildInfo, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Hooks, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (InnerObjectFormatsParsedJSON, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Issue, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Memo, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (PublicKey, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Quality, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (SecretKey, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Seed, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (SeqProxy, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (Serializer, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STAccount, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STAmount, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STInteger, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STNumber, protocol, ripple)
 
void testCompile (std::ostream &out)
 
 BEAST_DEFINE_TESTSUITE (STObject, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STParsedJSON, protocol, ripple)
 
bool matches (char const *string, char const *regex)
 Return true if the string loosely matches the regex.
 
 BEAST_DEFINE_TESTSUITE (STTx, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (InnerObjectFormatsSerializer, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (STValidation, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (TER, protocol, ripple)
 
 BEAST_DEFINE_TESTSUITE (AccountCurrencies, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE_PRIO (AccountSet, rpc, ripple, 1)
 
 BEAST_DEFINE_TESTSUITE (AmendmentBlocked, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (Connect, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (Feature, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (GetCounts, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (LedgerClosed, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE_PRIO (LedgerData, rpc, ripple, 1)
 
 BEAST_DEFINE_TESTSUITE (LedgerHeader, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (NoRippleCheck, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE_MANUAL_PRIO (NoRippleCheckLimits, rpc, ripple, 1)
 
 BEAST_DEFINE_TESTSUITE (OwnerInfo, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (Peers, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (Transaction, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (TransactionEntry, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (TransactionHistory, rpc, ripple)
 
 BEAST_DEFINE_TESTSUITE (Version, rpc, ripple)
 
 TEST_SUITE_BEGIN ("json_value")
 
 TEST_CASE ("construct and compare Json::StaticString")
 
 TEST_CASE ("different types")
 
 TEST_CASE ("compare strings")
 
 TEST_CASE ("bool")
 
 TEST_CASE ("bad json")
 
 TEST_CASE ("edge cases")
 
 TEST_CASE ("copy")
 
 TEST_CASE ("move")
 
 TEST_CASE ("comparisons")
 
 TEST_CASE ("compact")
 
 TEST_CASE ("conversions")
 
 TEST_CASE ("access members")
 
 TEST_CASE ("remove members")
 
 TEST_CASE ("iterator")
 
 TEST_CASE ("nest limits")
 
 TEST_CASE ("memory leak")
 
 TEST_SUITE_END ()
 
uint256 proposalUniqueId (uint256 const &proposeHash, uint256 const &previousLedger, std::uint32_t proposeSeq, NetClock::time_point closeTime, Slice const &publicKey, Slice const &signature)
 Calculate a unique identifier for a signed proposal.
 
RCLValidatedLedger::Seq mismatch (RCLValidatedLedger const &a, RCLValidatedLedger const &b)
 
void handleNewValidation (Application &app, std::shared_ptr< STValidation > const &val, std::string const &source, BypassAccept const bypassAccept=BypassAccept::no, std::optional< beast::Journal > j=std::nullopt)
 Handle a new validation.
 
std::shared_ptr< LedgerbuildLedger (std::shared_ptr< Ledger const > const &parent, NetClock::time_point closeTime, bool const closeTimeCorrect, NetClock::duration closeResolution, Application &app, CanonicalTXSet &txns, std::set< TxID > &failedTxs, beast::Journal j)
 Build a new ledger by applying consensus transactions.
 
std::shared_ptr< LedgerbuildLedger (LedgerReplay const &replayData, ApplyFlags applyFlags, Application &app, beast::Journal j)
 Build a new ledger by replaying transactions.
 
template<class ApplyTxs >
std::shared_ptr< LedgerbuildLedgerImpl (std::shared_ptr< Ledger const > const &parent, NetClock::time_point closeTime, bool const closeTimeCorrect, NetClock::duration closeResolution, Application &app, beast::Journal j, ApplyTxs &&applyTxs)
 
std::size_t applyTransactions (Application &app, std::shared_ptr< Ledger const > const &built, CanonicalTXSet &txns, std::set< TxID > &failed, OpenView &view, beast::Journal j)
 Apply a set of consensus transactions to a ledger.
 
static std::vector< uint256neededHashes (uint256 const &root, SHAMap &map, int max, SHAMapSyncFilter *filter)
 
std::unique_ptr< InboundLedgersmake_InboundLedgers (Application &app, InboundLedgers::clock_type &clock, beast::insight::Collector::ptr const &collector)
 
std::unique_ptr< InboundTransactionsmake_InboundTransactions (Application &app, beast::insight::Collector::ptr const &collector, std::function< void(std::shared_ptr< SHAMap > const &, bool)> gotSet)
 
std::unique_ptr< LedgerCleanermake_LedgerCleaner (Application &app, beast::Journal journal)
 
static bool shouldAcquire (std::uint32_t const currentLedger, std::uint32_t const ledgerHistory, std::optional< LedgerIndex > const minimumOnline, std::uint32_t const candidateLedger, beast::Journal j)
 
static void populateFetchPack (SHAMap const &want, SHAMap const *have, std::uint32_t cnt, protocol::TMGetObjectByHash *into, std::uint32_t seq, bool withLeaves=true)
 Populate a fetch pack with data from the map the recipient wants.
 
void addJson (Json::Value &, LedgerFill const &)
 Given a Ledger and options, fill a Json::Object or Json::Value with a description of the ledger.
 
Json::Value getJson (LedgerFill const &)
 Return a new Json::Value representing the ledger with given options.
 
std::unique_ptr< LocalTxsmake_LocalTxs ()
 
std::string debugTxstr (std::shared_ptr< STTx const > const &tx)
 
std::string debugTostr (OrderedTxs const &set)
 
std::string debugTostr (SHAMap const &set)
 
std::string debugTostr (std::shared_ptr< ReadView const > const &view)
 
uint256 calculateLedgerHash (LedgerInfo const &info)
 
std::shared_ptr< STTx const > deserializeTx (SHAMapItem const &item)
 Deserialize a SHAMapItem containing a single STTx.
 
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > deserializeTxPlusMeta (SHAMapItem const &item)
 Deserialize a SHAMapItem containing STTx + STObject metadata.
 
bool isFlagLedger (LedgerIndex seq)
 Returns true if the given ledgerIndex is a flag ledgerIndex.
 
static bool saveValidatedLedger (Application &app, std::shared_ptr< Ledger const > const &ledger, bool current)
 
bool pendSaveValidated (Application &app, std::shared_ptr< Ledger const > const &ledger, bool isSynchronous, bool isCurrent)
 Save, or arrange to save, a fully-validated ledger Returns false on error.
 
std::shared_ptr< LedgerloadLedgerHelper (LedgerInfo const &info, Application &app, bool acquire)
 
static void finishLoadByIndexOrHash (std::shared_ptr< Ledger > const &ledger, Config const &config, beast::Journal j)
 
std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256getLatestLedger (Application &app)
 
std::shared_ptr< LedgerloadByIndex (std::uint32_t ledgerIndex, Application &app, bool acquire)
 
std::shared_ptr< LedgerloadByHash (uint256 const &ledgerHash, Application &app, bool acquire)
 
static void log_one (ReadView const &ledger, uint256 const &tx, char const *msg, beast::Journal &j)
 
static void log_metadata_difference (ReadView const &builtLedger, ReadView const &validLedger, uint256 const &tx, beast::Journal j)
 
static std::vector< SHAMapItem const * > leaves (SHAMap const &sm)
 
static void fixConfigPorts (Config &config, Endpoints const &endpoints)
 
std::unique_ptr< Applicationmake_Application (std::unique_ptr< Config > config, std::unique_ptr< Logs > logs, std::unique_ptr< TimeKeeper > timeKeeper)
 
std::unique_ptr< CollectorManagermake_CollectorManager (Section const &params, beast::Journal journal)
 
std::unique_ptr< LoadManagermake_LoadManager (Application &app, beast::Journal journal)
 
bool adjustDescriptorLimit (int needed, beast::Journal j)
 
void printHelp (po::options_description const &desc)
 
int run (int argc, char **argv)
 
std::pair< PublicKey, SecretKeygetNodeIdentity (Application &app, boost::program_options::variables_map const &cmdline)
 The cryptographic credentials identifying this server instance.
 
std::unique_ptr< AmendmentTablemake_AmendmentTable (Application &app, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal)
 
STAmount ammLPTokens (STAmount const &asset1, STAmount const &asset2, Issue const &lptIssue)
 Calculate LP Tokens given AMM pool reserves.
 
STAmount lpTokensOut (STAmount const &asset1Balance, STAmount const &asset1Deposit, STAmount const &lptAMMBalance, std::uint16_t tfee)
 Calculate LP Tokens given asset's deposit amount.
 
STAmount ammAssetIn (STAmount const &asset1Balance, STAmount const &lptAMMBalance, STAmount const &lpTokens, std::uint16_t tfee)
 Calculate asset deposit given LP Tokens.
 
STAmount lpTokensIn (STAmount const &asset1Balance, STAmount const &asset1Withdraw, STAmount const &lptAMMBalance, std::uint16_t tfee)
 Calculate LP Tokens given asset's withdraw amount.
 
STAmount ammAssetOut (STAmount const &assetBalance, STAmount const &lptAMMBalance, STAmount const &lpTokens, std::uint16_t tfee)
 Calculate asset withdrawal by tokens.
 
bool withinRelativeDistance (Quality const &calcQuality, Quality const &reqQuality, Number const &dist)
 Check if the relative distance between the qualities is within the requested distance.
 
template<typename Amt >
requires ( std::is_same_v<Amt, STAmount> || std::is_same_v<Amt, IOUAmount> || std::is_same_v<Amt, XRPAmount> || std::is_same_v<Amt, Number>)
bool withinRelativeDistance (Amt const &calc, Amt const &req, Number const &dist)
 Check if the relative distance between the amounts is within the requested distance.
 
std::optional< NumbersolveQuadraticEqSmallest (Number const &a, Number const &b, Number const &c)
 Solve quadratic equation to find takerGets or takerPays.
 
template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > getAMMOfferStartWithTakerGets (TAmounts< TIn, TOut > const &pool, Quality const &targetQuality, std::uint16_t const &tfee)
 Generate AMM offer starting with takerGets when AMM pool from the payment perspective is IOU(in)/XRP(out) Equations: Spot Price Quality after the offer is consumed: Qsp = (O - o) / (I + i) – equation (1) where O is poolPays, I is poolGets, o is takerGets, i is takerPays Swap out: i = (I * o) / (O - o) * f – equation (2) where f is (1 - tfee/100000), tfee is in basis points Effective price targetQuality: Qep = o / i – equation (3) There are two scenarios to consider A) Qsp = Qep.
 
template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > getAMMOfferStartWithTakerPays (TAmounts< TIn, TOut > const &pool, Quality const &targetQuality, std::uint16_t tfee)
 Generate AMM offer starting with takerPays when AMM pool from the payment perspective is XRP(in)/IOU(out) or IOU(in)/IOU(out).
 
template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > changeSpotPriceQuality (TAmounts< TIn, TOut > const &pool, Quality const &quality, std::uint16_t tfee, Rules const &rules, beast::Journal j)
 Generate AMM offer so that either updated Spot Price Quality (SPQ) is equal to LOB quality (in this case AMM offer quality is better than LOB quality) or AMM offer is equal to LOB quality (in this case SPQ is better than LOB quality).
 
template<typename TIn , typename TOut >
TOut swapAssetIn (TAmounts< TIn, TOut > const &pool, TIn const &assetIn, std::uint16_t tfee)
 AMM pool invariant - the product (A * B) after swap in/out has to remain at least the same: (A + in) * (B - out) >= A * B XRP round-off may result in a smaller product after swap in/out.
 
template<typename TIn , typename TOut >
TIn swapAssetOut (TAmounts< TIn, TOut > const &pool, TOut const &assetOut, std::uint16_t tfee)
 Swap assetOut out of the pool and swap in a proportional amount of the other asset.
 
Number square (Number const &n)
 Return square of n.
 
STAmount adjustLPTokens (STAmount const &lptAMMBalance, STAmount const &lpTokens, IsDeposit isDeposit)
 Adjust LP tokens to deposit/withdraw.
 
std::tuple< STAmount, std::optional< STAmount >, STAmountadjustAmountsByLPTokens (STAmount const &amountBalance, STAmount const &amount, std::optional< STAmount > const &amount2, STAmount const &lptAMMBalance, STAmount const &lpTokens, std::uint16_t tfee, IsDeposit isDeposit)
 Calls adjustLPTokens() and adjusts deposit or withdraw amounts if the adjusted LP tokens are less than the provided LP tokens.
 
Number solveQuadraticEq (Number const &a, Number const &b, Number const &c)
 Positive solution for quadratic equation: x = (-b + sqrt(b**2 + 4*a*c))/(2*a)
 
STAmount multiply (STAmount const &amount, Number const &frac, Number::rounding_mode rm)
 
template<typename A >
STAmount getRoundedAsset (Rules const &rules, STAmount const &balance, A const &frac, IsDeposit isDeposit)
 Round AMM equal deposit/withdrawal amount.
 
STAmount getRoundedAsset (Rules const &rules, std::function< Number()> &&noRoundCb, STAmount const &balance, std::function< Number()> &&productCb, IsDeposit isDeposit)
 Round AMM single deposit/withdrawal amount.
 
STAmount getRoundedLPTokens (Rules const &rules, STAmount const &balance, Number const &frac, IsDeposit isDeposit)
 Round AMM deposit/withdrawal LPToken amount.
 
STAmount getRoundedLPTokens (Rules const &rules, std::function< Number()> &&noRoundCb, STAmount const &lptAMMBalance, std::function< Number()> &&productCb, IsDeposit isDeposit)
 Round AMM single deposit/withdrawal LPToken amount.
 
std::pair< STAmount, STAmountadjustAssetInByTokens (Rules const &rules, STAmount const &balance, STAmount const &amount, STAmount const &lptAMMBalance, STAmount const &tokens, std::uint16_t tfee)
 
std::pair< STAmount, STAmountadjustAssetOutByTokens (Rules const &rules, STAmount const &balance, STAmount const &amount, STAmount const &lptAMMBalance, STAmount const &tokens, std::uint16_t tfee)
 
Number adjustFracByTokens (Rules const &rules, STAmount const &lptAMMBalance, STAmount const &tokens, Number const &frac)
 Find a fraction of tokens after the tokens are adjusted.
 
std::pair< STAmount, STAmountammPoolHolds (ReadView const &view, AccountID const &ammAccountID, Issue const &issue1, Issue const &issue2, FreezeHandling freezeHandling, beast::Journal const j)
 Get AMM pool balances.
 
Expected< std::tuple< STAmount, STAmount, STAmount >, TERammHolds (ReadView const &view, SLE const &ammSle, std::optional< Issue > const &optIssue1, std::optional< Issue > const &optIssue2, FreezeHandling freezeHandling, beast::Journal const j)
 Get AMM pool and LP token balances.
 
STAmount ammLPHolds (ReadView const &view, Currency const &cur1, Currency const &cur2, AccountID const &ammAccount, AccountID const &lpAccount, beast::Journal const j)
 Get the balance of LP tokens.
 
STAmount ammLPHolds (ReadView const &view, SLE const &ammSle, AccountID const &lpAccount, beast::Journal const j)
 
std::uint16_t getTradingFee (ReadView const &view, SLE const &ammSle, AccountID const &account)
 Get AMM trading fee for the given account.
 
STAmount ammAccountHolds (ReadView const &view, AccountID const &ammAccountID, Issue const &issue)
 Returns total amount held by AMM for the given token.
 
TER deleteAMMAccount (Sandbox &view, Issue const &asset, Issue const &asset2, beast::Journal j)
 Delete trustlines to AMM.
 
void initializeFeeAuctionVote (ApplyView &view, std::shared_ptr< SLE > &ammSle, AccountID const &account, Issue const &lptIssue, std::uint16_t tfee)
 Initialize Auction and Voting slots and set the trading/discounted fee.
 
Expected< bool, TERisOnlyLiquidityProvider (ReadView const &view, Issue const &ammIssue, AccountID const &lpAccount)
 Return true if the Liquidity Provider is the only AMM provider, false otherwise.
 
Expected< bool, TERverifyAndAdjustLPTokenBalance (Sandbox &sb, STAmount const &lpTokens, std::shared_ptr< SLE > &ammSle, AccountID const &account)
 Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance.
 
bool operator< (CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs)
 
NotTEC checkTxPermission (std::shared_ptr< SLE const > const &delegate, STTx const &tx)
 Check if the delegate account has permission to execute the transaction.
 
void loadGranularPermission (std::shared_ptr< SLE const > const &delegate, TxType const &type, std::unordered_set< GranularPermissionType > &granularPermissions)
 Load the granular permissions granted to the delegate account for the specified transaction type.
 
void convertBlobsToTxResult (RelationalDatabase::AccountTxs &to, std::uint32_t ledger_index, std::string const &status, Blob const &rawTxn, Blob const &rawMeta, Application &app)
 
void saveLedgerAsync (Application &app, std::uint32_t seq)
 
static std::vector< std::pair< uint256, std::string > > parseSection (Section const &section)
 
static TER deleteAMMTrustLines (Sandbox &sb, AccountID const &ammAccountID, std::uint16_t maxTrustlinesToDelete, beast::Journal j)
 
XRPAmount scaleFeeLoad (XRPAmount fee, LoadFeeTrack const &feeTrack, Fees const &fees, bool bUnlimited)
 
std::string to_string (Manifest const &m)
 Format the specified manifest to a string for debugging purposes.
 
template<class Stream >
Stream & logMftAct (Stream &s, std::string const &action, PublicKey const &pk, std::uint32_t seq)
 
template<class Stream >
Stream & logMftAct (Stream &s, std::string const &action, PublicKey const &pk, std::uint32_t seq, std::uint32_t oldSeq)
 
std::optional< ValidatorTokenloadValidatorToken (std::vector< std::string > const &blob, beast::Journal journal)
 
static FeeLevel64 getFeeLevelPaid (ReadView const &view, STTx const &tx)
 
static std::optional< LedgerIndexgetLastLedgerSequence (STTx const &tx)
 
static FeeLevel64 increase (FeeLevel64 level, std::uint32_t increasePercent)
 
TxQ::Setup setup_TxQ (Config const &)
 Build a TxQ::Setup object from application configuration.
 
std::string to_string (ListDisposition disposition)
 
std::size_t splitMessageParts (std::vector< ValidatorList::MessageWithHash > &messages, protocol::TMValidatorListCollection const &largeMsg, std::size_t maxSize, std::size_t begin, std::size_t end)
 
std::size_t splitMessage (std::vector< ValidatorList::MessageWithHash > &messages, protocol::TMValidatorListCollection const &largeMsg, std::size_t maxSize, std::size_t begin=0, std::size_t end=0)
 
std::size_t buildValidatorListMessage (std::vector< ValidatorList::MessageWithHash > &messages, std::uint32_t rawVersion, std::string const &rawManifest, ValidatorBlobInfo const &currentBlob, std::size_t maxSize)
 
std::size_t buildValidatorListMessage (std::vector< ValidatorList::MessageWithHash > &messages, std::uint64_t peerSequence, std::uint32_t rawVersion, std::string const &rawManifest, std::map< std::size_t, ValidatorBlobInfo > const &blobInfos, std::size_t maxSize)
 
std::unique_ptr< FeeVotemake_FeeVote (FeeSetup const &setup, beast::Journal journal)
 Create an instance of the FeeVote logic.
 
HashRouter::Setup setup_HashRouter (Config const &config)
 
constexpr HashRouterFlags operator| (HashRouterFlags lhs, HashRouterFlags rhs)
 
constexpr HashRouterFlagsoperator|= (HashRouterFlags &lhs, HashRouterFlags rhs)
 
constexpr HashRouterFlags operator& (HashRouterFlags lhs, HashRouterFlags rhs)
 
constexpr HashRouterFlagsoperator&= (HashRouterFlags &lhs, HashRouterFlags rhs)
 
constexpr bool any (HashRouterFlags flags)
 
bool operator== (Manifest const &lhs, Manifest const &rhs)
 
bool operator!= (Manifest const &lhs, Manifest const &rhs)
 
std::string to_string (ManifestDisposition m)
 
static std::uint32_t trunc32 (std::uint64_t v)
 
std::unique_ptr< NetworkOPsmake_NetworkOPs (Application &app, NetworkOPs::clock_type &clock, bool standalone, std::size_t minPeerCount, bool startvalid, JobQueue &job_queue, LedgerMaster &ledgerMaster, ValidatorKeys const &validatorKeys, boost::asio::io_context &io_svc, beast::Journal journal, beast::insight::Collector::ptr const &collector)
 
std::unique_ptr< SHAMapStoremake_SHAMapStore (Application &app, NodeStore::Scheduler &scheduler, beast::Journal journal)
 
template<class T >
XRPAmount toDrops (FeeLevel< T > const &level, XRPAmount baseFee)
 
FeeLevel64 toFeeLevel (XRPAmount const &drops, XRPAmount const &baseFee)
 
template<class Hasher >
void hash_append (Hasher &h, ValidatorBlobInfo const &blobInfo)
 
template<class Hasher >
void hash_append (Hasher &h, std::vector< ValidatorBlobInfo > const &blobs)
 
template<class Hasher >
void hash_append (Hasher &h, std::map< std::size_t, ValidatorBlobInfo > const &blobs)
 
hash_set< CurrencyaccountSourceCurrencies (AccountID const &account, std::shared_ptr< RippleLineCache > const &lrCache, bool includeXRP)
 
hash_set< CurrencyaccountDestCurrencies (AccountID const &account, std::shared_ptr< RippleLineCache > const &lrCache, bool includeXRP)
 
template<class T >
T & get (EitherAmount &amt)
 
template<>
IOUAmountget< IOUAmount > (EitherAmount &amt)
 
template<>
XRPAmountget< XRPAmount > (EitherAmount &amt)
 
template<class T >
T const & get (EitherAmount const &amt)
 
template<>
IOUAmount const & get< IOUAmount > (EitherAmount const &amt)
 
template<>
XRPAmount const & get< XRPAmount > (EitherAmount const &amt)
 
AmountSpec toAmountSpec (STAmount const &amt)
 
EitherAmount toEitherAmount (STAmount const &amt)
 
AmountSpec toAmountSpec (EitherAmount const &ea, std::optional< Currency > const &c)
 
template<class TIn , class TOut , class Offer >
static void limitStepIn (Offer const &offer, TAmounts< TIn, TOut > &ofrAmt, TAmounts< TIn, TOut > &stpAmt, TOut &ownerGives, std::uint32_t transferRateIn, std::uint32_t transferRateOut, TIn const &limit)
 
template<class TIn , class TOut , class Offer >
static void limitStepOut (Offer const &offer, TAmounts< TIn, TOut > &ofrAmt, TAmounts< TIn, TOut > &stpAmt, TOut &ownerGives, std::uint32_t transferRateIn, std::uint32_t transferRateOut, TOut const &limit)
 
template<class TCollection >
static auto sum (TCollection const &col)
 
template<class TIn , class TOut >
static std::pair< TER, std::unique_ptr< Step > > make_BookStepHelper (StrandContext const &ctx, Issue const &in, Issue const &out)
 
std::pair< TER, std::unique_ptr< Step > > make_BookStepII (StrandContext const &ctx, Issue const &in, Issue const &out)
 
std::pair< TER, std::unique_ptr< Step > > make_BookStepIX (StrandContext const &ctx, Issue const &in)
 
std::pair< TER, std::unique_ptr< Step > > make_BookStepXI (StrandContext const &ctx, Issue const &out)
 
std::pair< TER, std::unique_ptr< Step > > make_DirectStepI (StrandContext const &ctx, AccountID const &src, AccountID const &dst, Currency const &c)
 
template<class T >
void SetUnion (boost::container::flat_set< T > &dst, boost::container::flat_set< T > const &src)
 Given two flat sets dst and src, compute dst = dst union src.
 
STAmount largestAmount (STAmount const &amt)
 
STAmount convertAmount (STAmount const &amt, bool all)
 
bool convertAllCheck (STAmount const &a)
 
bool checkNear (IOUAmount const &expected, IOUAmount const &actual)
 
bool checkNear (XRPAmount const &expected, XRPAmount const &actual)
 
static bool isXRPAccount (STPathElement const &pe)
 
static std::pair< TER, std::unique_ptr< Step > > toStep (StrandContext const &ctx, STPathElement const *e1, STPathElement const *e2, Issue const &curIssue)
 
std::pair< TER, Strand > toStrand (ReadView const &sb, AccountID const &src, AccountID const &dst, Issue const &deliver, std::optional< Quality > const &limitQuality, std::optional< Issue > const &sendMaxIssue, STPath const &path, bool ownerPaysTransferFee, OfferCrossing offerCrossing, AMMContext &ammContext, std::optional< uint256 > const &domainID, beast::Journal j)
 Create a Strand for the specified path.
 
std::pair< TER, std::vector< Strand > > toStrands (ReadView const &sb, AccountID const &src, AccountID const &dst, Issue const &deliver, std::optional< Quality > const &limitQuality, std::optional< Issue > const &sendMax, STPathSet const &paths, bool addDefaultPath, bool ownerPaysTransferFee, OfferCrossing offerCrossing, AMMContext &ammContext, std::optional< uint256 > const &domainID, beast::Journal j)
 Create a Strand for each specified path (including the default path, if indicated)
 
template<class InAmt , class OutAmt >
bool isDirectXrpToXrp (Strand const &strand)
 
template<>
bool isDirectXrpToXrp< XRPAmount, XRPAmount > (Strand const &strand)
 
template bool isDirectXrpToXrp< XRPAmount, IOUAmount > (Strand const &strand)
 
template bool isDirectXrpToXrp< IOUAmount, XRPAmount > (Strand const &strand)
 
template bool isDirectXrpToXrp< IOUAmount, IOUAmount > (Strand const &strand)
 
TER checkFreeze (ReadView const &view, AccountID const &src, AccountID const &dst, Currency const &currency)
 
TER checkNoRipple (ReadView const &view, AccountID const &prev, AccountID const &cur, AccountID const &next, Currency const &currency, beast::Journal j)
 
bool redeems (DebtDirection dir)
 
bool issues (DebtDirection dir)
 
std::pair< TER, STPathnormalizePath (AccountID const &src, AccountID const &dst, Issue const &deliver, std::optional< Issue > const &sendMaxIssue, STPath const &path)
 
template<class TInAmt , class TOutAmt >
StrandResult< TInAmt, TOutAmt > flow (PaymentSandbox const &baseView, Strand const &strand, std::optional< TInAmt > const &maxIn, TOutAmt const &out, beast::Journal j)
 Request out amount from a strand.
 
template<class TInAmt , class TOutAmt >
FlowResult< TInAmt, TOutAmt > flow (PaymentSandbox const &baseView, std::vector< Strand > const &strands, TOutAmt const &outReq, bool partialPayment, OfferCrossing offerCrossing, std::optional< Quality > const &limitQuality, std::optional< STAmount > const &sendMaxST, beast::Journal j, AMMContext &ammContext, path::detail::FlowDebugInfo *flowDebugInfo=nullptr)
 Request out amount from a collection of strands.
 
template<class TDerived >
bool operator== (XRPEndpointStep< TDerived > const &lhs, XRPEndpointStep< TDerived > const &rhs)
 
std::pair< TER, std::unique_ptr< Step > > make_XRPEndpointStep (StrandContext const &ctx, AccountID const &acc)
 
template<class FlowResult >
static auto finishFlow (PaymentSandbox &sb, Issue const &srcIssue, Issue const &dstIssue, FlowResult &&f)
 
path::RippleCalc::Output flow (PaymentSandbox &view, STAmount const &deliver, AccountID const &src, AccountID const &dst, STPathSet const &paths, bool defaultPaths, bool partialPayment, bool ownerPaysTransferFee, OfferCrossing offerCrossing, std::optional< Quality > const &limitQuality, std::optional< STAmount > const &sendMax, std::optional< uint256 > const &domainID, beast::Journal j, path::detail::FlowDebugInfo *flowDebugInfo=nullptr)
 Make a payment from the src account to the dst account.
 
static bool isDefaultPath (STPath const &path)
 
static STPath removeIssuer (STPath const &path)
 
void addUniquePath (STPathSet &pathSet, STPath const &path)
 
std::unique_ptr< RelationalDatabasegetSQLiteDatabase (Application &app, Config const &config, JobQueue &jobQueue)
 
void initPeerFinderDB (soci::session &session, BasicConfig const &config, beast::Journal j)
 initPeerFinderDB Opens a session with the peer finder database.
 
void updatePeerFinderDB (soci::session &session, int currentSchemaVersion, beast::Journal j)
 updatePeerFinderDB Updates the peer finder database to a new version.
 
void readPeerFinderDB (soci::session &session, std::function< void(std::string const &, int)> const &func)
 readPeerFinderDB Reads all entries from the peer finder database and invokes the given callback for each entry.
 
void savePeerFinderDB (soci::session &session, std::vector< PeerFinder::Store::Entry > const &v)
 savePeerFinderDB Saves a new entry to the peer finder database.
 
void initStateDB (soci::session &session, BasicConfig const &config, std::string const &dbName)
 initStateDB Opens a session with the State database.
 
LedgerIndex getCanDelete (soci::session &session)
 getCanDelete Returns the ledger sequence which can be deleted.
 
LedgerIndex setCanDelete (soci::session &session, LedgerIndex canDelete)
 setCanDelete Updates the ledger sequence which can be deleted.
 
SavedState getSavedState (soci::session &session)
 getSavedState Returns the saved state.
 
void setSavedState (soci::session &session, SavedState const &state)
 setSavedState Saves the given state.
 
void setLastRotated (soci::session &session, LedgerIndex seq)
 setLastRotated Updates the last rotated ledger sequence.
 
bool doVacuumDB (DatabaseCon::Setup const &setup, beast::Journal j)
 doVacuumDB Creates, initialises, and performs cleanup on a database.
 
std::unique_ptr< DatabaseConmakeWalletDB (DatabaseCon::Setup const &setup, beast::Journal j)
 makeWalletDB Opens the wallet database and returns it.
 
std::unique_ptr< DatabaseConmakeTestWalletDB (DatabaseCon::Setup const &setup, std::string const &dbname, beast::Journal j)
 makeTestWalletDB Opens a test wallet database with an arbitrary name.
 
void getManifests (soci::session &session, std::string const &dbTable, ManifestCache &mCache, beast::Journal j)
 getManifests Loads a manifest from the wallet database and stores it in the cache.
 
static void saveManifest (soci::session &session, std::string const &dbTable, std::string const &serialized)
 
void saveManifests (soci::session &session, std::string const &dbTable, std::function< bool(PublicKey const &)> const &isTrusted, hash_map< PublicKey, Manifest > const &map, beast::Journal j)
 saveManifests Saves all given manifests to the database.
 
void addValidatorManifest (soci::session &session, std::string const &serialized)
 addValidatorManifest Saves the manifest of a validator to the database.
 
void clearNodeIdentity (soci::session &session)
 Delete any saved public/private key associated with this node.
 
std::pair< PublicKey, SecretKeygetNodeIdentity (soci::session &session)
 Returns a stable public and private key for this node.
 
std::unordered_set< PeerReservation, beast::uhash<>, KeyEqualgetPeerReservationTable (soci::session &session, beast::Journal j)
 getPeerReservationTable Returns the peer reservation table.
 
void insertPeerReservation (soci::session &session, PublicKey const &nodeId, std::string const &description)
 insertPeerReservation Adds an entry to the peer reservation table.
 
void deletePeerReservation (soci::session &session, PublicKey const &nodeId)
 deletePeerReservation Deletes an entry from the peer reservation table.
 
bool createFeatureVotes (soci::session &session)
 createFeatureVotes Creates the FeatureVote table if it does not exist.
 
void readAmendments (soci::session &session, std::function< void( boost::optional< std::string > amendment_hash, boost::optional< std::string > amendment_name, boost::optional< AmendmentVote > vote)> const &callback)
 readAmendments Reads all amendments from the FeatureVotes table.
 
void voteAmendment (soci::session &session, uint256 const &amendment, std::string const &name, AmendmentVote vote)
 voteAmendment Set the veto value for a particular amendment.
 
template<class T , class C >
rangeCheckedCast (C c)
 
std::pair< Validity, std::stringcheckValidity (HashRouter &router, STTx const &tx, Rules const &rules, Config const &config)
 Checks transaction signature and local checks.
 
void forceValidity (HashRouter &router, uint256 const &txid, Validity validity)
 Sets the validity of a given transaction in the cache.
 
ApplyResult apply (Application &app, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
 Apply a transaction to an OpenView.
 
ApplyTransactionResult applyTransaction (Application &app, OpenView &view, STTx const &tx, bool retryAssured, ApplyFlags flags, beast::Journal journal)
 Transaction application helper.
 
bool isTecClaimHardFail (TER ter, ApplyFlags flags)
 Return true if the transaction can claim a fee (tec), and the ApplyFlags do not allow soft failures.
 
PreclaimResult preclaim (PreflightResult const &preflightResult, Application &app, OpenView const &view)
 Gate a transaction based on static ledger information.
 
XRPAmount calculateBaseFee (ReadView const &view, STTx const &tx)
 Compute only the expected base fee for a transaction.
 
XRPAmount calculateDefaultBaseFee (ReadView const &view, STTx const &tx)
 Return the minimum fee that an "ordinary" transaction would pay.
 
ApplyResult doApply (PreclaimResult const &preclaimResult, Application &app, OpenView &view)
 Apply a prechecked transaction to an OpenView.
 
static std::pair< TER, bool > applyBid (ApplyContext &ctx_, Sandbox &sb, AccountID const &account_, beast::Journal j_)
 
static std::pair< TER, bool > applyCreate (ApplyContext &ctx_, Sandbox &sb, AccountID const &account_, beast::Journal j_)
 
static STAmount adjustLPTokensOut (Rules const &rules, STAmount const &lptAMMBalance, STAmount const &lpTokensDeposit)
 
static std::pair< TER, bool > applyVote (ApplyContext &ctx_, Sandbox &sb, AccountID const &account_, beast::Journal j_)
 
static std::optional< STAmounttokensWithdraw (STAmount const &lpTokens, std::optional< STAmount > const &tokensIn, std::uint32_t flags)
 
static STAmount adjustLPTokensIn (Rules const &rules, STAmount const &lptAMMBalance, STAmount const &lpTokensWithdraw, WithdrawAll withdrawAll)
 
template<typename PreflightChecks >
ApplyResult apply (Application &app, OpenView &view, PreflightChecks &&preflightChecks)
 
ApplyResult apply (Application &app, OpenView &view, uint256 const &parentBatchId, STTx const &tx, ApplyFlags flags, beast::Journal j)
 
static bool applyBatchTransactions (Application &app, OpenView &batchView, STTx const &batchTxn, beast::Journal j)
 
template<class T >
requires (T::ConsequencesFactory == Transactor::Normal)
TxConsequences consequences_helper (PreflightContext const &ctx)
 
template<class T >
requires (T::ConsequencesFactory == Transactor::Blocker)
TxConsequences consequences_helper (PreflightContext const &ctx)
 
template<class T >
requires (T::ConsequencesFactory == Transactor::Custom)
TxConsequences consequences_helper (PreflightContext const &ctx)
 
static std::pair< NotTEC, TxConsequencesinvoke_preflight (PreflightContext const &ctx)
 
static TER invoke_preclaim (PreclaimContext const &ctx)
 
static XRPAmount invoke_calculateBaseFee (ReadView const &view, STTx const &tx)
 Calculates the base fee for a given transaction.
 
static ApplyResult invoke_apply (ApplyContext &ctx)
 
template<ValidIssueType T>
static NotTEC preflightHelper (PreflightContext const &ctx)
 
template<>
NotTEC preflightHelper< Issue > (PreflightContext const &ctx)
 
template<>
NotTEC preflightHelper< MPTIssue > (PreflightContext const &ctx)
 
template<ValidIssueType T>
static TER preclaimHelper (PreclaimContext const &ctx, SLE const &sleIssuer, AccountID const &issuer, AccountID const &holder, STAmount const &clawAmount)
 
template<>
TER preclaimHelper< Issue > (PreclaimContext const &ctx, SLE const &sleIssuer, AccountID const &issuer, AccountID const &holder, STAmount const &clawAmount)
 
template<>
TER preclaimHelper< MPTIssue > (PreclaimContext const &ctx, SLE const &sleIssuer, AccountID const &issuer, AccountID const &holder, STAmount const &clawAmount)
 
template<ValidIssueType T>
static TER applyHelper (ApplyContext &ctx)
 
template<>
TER applyHelper< Issue > (ApplyContext &ctx)
 
template<>
TER applyHelper< MPTIssue > (ApplyContext &ctx)
 
TER addSLE (ApplyContext &ctx, std::shared_ptr< SLE > const &sle, AccountID const &owner)
 
template<ValidIssueType T>
static NotTEC escrowCreatePreflightHelper (PreflightContext const &ctx)
 
template<>
NotTEC escrowCreatePreflightHelper< Issue > (PreflightContext const &ctx)
 
template<>
NotTEC escrowCreatePreflightHelper< MPTIssue > (PreflightContext const &ctx)
 
template<ValidIssueType T>
static TER escrowCreatePreclaimHelper (PreclaimContext const &ctx, AccountID const &account, AccountID const &dest, STAmount const &amount)
 
template<>
TER escrowCreatePreclaimHelper< Issue > (PreclaimContext const &ctx, AccountID const &account, AccountID const &dest, STAmount const &amount)
 
template<>
TER escrowCreatePreclaimHelper< MPTIssue > (PreclaimContext const &ctx, AccountID const &account, AccountID const &dest, STAmount const &amount)
 
template<ValidIssueType T>
static TER escrowLockApplyHelper (ApplyView &view, AccountID const &issuer, AccountID const &sender, STAmount const &amount, beast::Journal journal)
 
template<>
TER escrowLockApplyHelper< Issue > (ApplyView &view, AccountID const &issuer, AccountID const &sender, STAmount const &amount, beast::Journal journal)
 
template<>
TER escrowLockApplyHelper< MPTIssue > (ApplyView &view, AccountID const &issuer, AccountID const &sender, STAmount const &amount, beast::Journal journal)
 
static bool checkCondition (Slice f, Slice c)
 
template<ValidIssueType T>
static TER escrowFinishPreclaimHelper (PreclaimContext const &ctx, AccountID const &dest, STAmount const &amount)
 
template<>
TER escrowFinishPreclaimHelper< Issue > (PreclaimContext const &ctx, AccountID const &dest, STAmount const &amount)
 
template<>
TER escrowFinishPreclaimHelper< MPTIssue > (PreclaimContext const &ctx, AccountID const &dest, STAmount const &amount)
 
template<ValidIssueType T>
static TER escrowUnlockApplyHelper (ApplyView &view, Rate lockedRate, std::shared_ptr< SLE > const &sleDest, STAmount const &xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal)
 
template<>
TER escrowUnlockApplyHelper< Issue > (ApplyView &view, Rate lockedRate, std::shared_ptr< SLE > const &sleDest, STAmount const &xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal)
 
template<>
TER escrowUnlockApplyHelper< MPTIssue > (ApplyView &view, Rate lockedRate, std::shared_ptr< SLE > const &sleDest, STAmount const &xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal)
 
template<ValidIssueType T>
static TER escrowCancelPreclaimHelper (PreclaimContext const &ctx, AccountID const &account, STAmount const &amount)
 
template<>
TER escrowCancelPreclaimHelper< Issue > (PreclaimContext const &ctx, AccountID const &account, STAmount const &amount)
 
template<>
TER escrowCancelPreclaimHelper< MPTIssue > (PreclaimContext const &ctx, AccountID const &account, STAmount const &amount)
 
constexpr Privilege operator| (Privilege lhs, Privilege rhs)
 
bool hasPrivilege (STTx const &tx, Privilege priv)
 
static bool validBalances (STAmount const &amount, STAmount const &amount2, STAmount const &lptAMMBalance, ValidAMM::ZeroAllowed zeroAllowed)
 
InvariantChecks getInvariantChecks ()
 get a tuple of all invariant checks
 
static std::uint16_t extractNFTokenFlagsFromTxFlags (std::uint32_t txFlags)
 
static bool hasOfferFields (PreflightContext const &ctx)
 
template<class TIn , class TOut >
std::ostreamoperator<< (std::ostream &os, TOffer< TIn, TOut > const &offer)
 
static STAmount accountFundsHelper (ReadView const &view, AccountID const &id, STAmount const &saDefault, Issue const &, FreezeHandling freezeHandling, beast::Journal j)
 
static IOUAmount accountFundsHelper (ReadView const &view, AccountID const &id, IOUAmount const &amtDefault, Issue const &issue, FreezeHandling freezeHandling, beast::Journal j)
 
static XRPAmount accountFundsHelper (ReadView const &view, AccountID const &id, XRPAmount const &amtDefault, Issue const &issue, FreezeHandling freezeHandling, beast::Journal j)
 
static TER closeChannel (std::shared_ptr< SLE > const &slep, ApplyView &view, uint256 const &key, beast::Journal j)
 
STAmount getMaxSourceAmount (AccountID const &account, STAmount const &dstAmount, std::optional< STAmount > const &sendMax)
 
static std::pair< Currency, CurrencytokenPairKey (STObject const &pair)
 
static bool adjustOwnerCount (ApplyContext &ctx, int count)
 
static void setPriceDataInnerObjTemplate (STObject &obj)
 
static int signerCountBasedOwnerCountDelta (std::size_t entryCount, Rules const &rules)
 
static TER removeSignersFromLedger (Application &app, ApplyView &view, Keylet const &accountKeylet, Keylet const &ownerDirKeylet, Keylet const &signerListKeylet, beast::Journal j)
 
NotTEC preflight0 (PreflightContext const &ctx, std::uint32_t flagMask)
 Performs early sanity checks on the txid.
 
static void removeUnfundedOffers (ApplyView &view, std::vector< uint256 > const &offers, beast::Journal viewJ)
 
static void removeExpiredNFTokenOffers (ApplyView &view, std::vector< uint256 > const &offers, beast::Journal viewJ)
 
static void removeExpiredCredentials (ApplyView &view, std::vector< uint256 > const &creds, beast::Journal viewJ)
 
static void removeDeletedTrustLines (ApplyView &view, std::vector< uint256 > const &trustLines, beast::Journal viewJ)
 
bool shouldCloseLedger (bool anyTransactions, std::size_t prevProposers, std::size_t proposersClosed, std::size_t proposersValidated, std::chrono::milliseconds prevRoundTime, std::chrono::milliseconds timeSincePrevClose, std::chrono::milliseconds openTime, std::chrono::milliseconds idleInterval, ConsensusParms const &parms, beast::Journal j, std::unique_ptr< std::stringstream > const &clog={})
 Determines whether the current ledger should close at this time.
 
bool checkConsensusReached (std::size_t agreeing, std::size_t total, bool count_self, std::size_t minConsensusPct, bool reachedMax, bool stalled, std::unique_ptr< std::stringstream > const &clog)
 
ConsensusState checkConsensus (std::size_t prevProposers, std::size_t currentProposers, std::size_t currentAgree, std::size_t currentFinished, std::chrono::milliseconds previousAgreeTime, std::chrono::milliseconds currentAgreeTime, bool stalled, ConsensusParms const &parms, bool proposing, beast::Journal j, std::unique_ptr< std::stringstream > const &clog={})
 Determine whether the network reached consensus and whether we joined.
 
int participantsNeeded (int participants, int percent)
 How many of the participants must agree to reach a given threshold?
 
std::pair< std::size_t, std::optional< ConsensusParms::AvalancheState > > getNeededWeight (ConsensusParms const &p, ConsensusParms::AvalancheState currentState, int percentTime, std::size_t currentRounds, std::size_t minimumRounds)
 
template<class NodeID_t , class LedgerID_t , class Position_t >
bool operator== (ConsensusProposal< NodeID_t, LedgerID_t, Position_t > const &a, ConsensusProposal< NodeID_t, LedgerID_t, Position_t > const &b)
 
std::string to_string (ConsensusMode m)
 
std::string to_string (ConsensusPhase p)
 
template<class Rep , class Period , class Seq >
std::chrono::duration< Rep, Period > getNextLedgerTimeResolution (std::chrono::duration< Rep, Period > previousResolution, bool previousAgree, Seq ledgerSeq)
 Calculates the close time resolution for the specified ledger.
 
template<class Clock , class Duration , class Rep , class Period >
std::chrono::time_point< Clock, Duration > roundCloseTime (std::chrono::time_point< Clock, Duration > closeTime, std::chrono::duration< Rep, Period > closeResolution)
 Calculates the close time for a ledger, given a close time resolution.
 
template<class Clock , class Duration , class Rep , class Period >
std::chrono::time_point< Clock, Duration > effCloseTime (std::chrono::time_point< Clock, Duration > closeTime, std::chrono::duration< Rep, Period > resolution, std::chrono::time_point< Clock, Duration > priorCloseTime)
 Calculate the effective ledger close time.
 
bool isCurrent (ValidationParms const &p, NetClock::time_point now, NetClock::time_point signTime, NetClock::time_point seenTime)
 Whether a validation is still current.
 
std::string to_string (ValStatus m)
 
FeeSetup setup_FeeVote (Section const &section)
 
std::shared_ptr< CheckpointercheckpointerFromId (std::uintptr_t id)
 
DatabaseCon::Setup setup_DatabaseCon (Config const &c, std::optional< beast::Journal > j=std::nullopt)
 
IniFileSections parseIniFile (std::string const &strInput, bool const bTrim)
 
IniFileSections::mapped_type * getIniFileSection (IniFileSections &secSource, std::string const &strSection)
 
bool getSingleSection (IniFileSections &secSource, std::string const &strSection, std::string &strValue, beast::Journal j)
 
static std::string getEnvVar (char const *name)
 
static void checkZeroPorts (Config const &config)
 
void open (soci::session &s, BasicConfig const &config, std::string const &dbName)
 Open a soci session.
 
void open (soci::session &s, std::string const &beName, std::string const &connectionString)
 Open a soci session.
 
static sqlite_api::sqlite3 * getConnection (soci::session &s)
 
std::uint32_t getKBUsedAll (soci::session &s)
 
std::uint32_t getKBUsedDB (soci::session &s)
 
void convert (soci::blob &from, std::vector< std::uint8_t > &to)
 
void convert (soci::blob &from, std::string &to)
 
void convert (std::vector< std::uint8_t > const &from, soci::blob &to)
 
void convert (std::string const &from, soci::blob &to)
 
std::shared_ptr< CheckpointermakeCheckpointer (std::uintptr_t id, std::weak_ptr< soci::session >, JobQueue &, Logs &)
 Returns a new checkpointer which makes checkpoints of a soci database every checkpointPageCount pages, using a job on the job queue.
 
std::optional< std::stringgetFeatureValue (boost::beast::http::fields const &headers, std::string const &feature)
 Get feature's header value.
 
bool isFeatureValue (boost::beast::http::fields const &headers, std::string const &feature, std::string const &value)
 Check if a feature's value is equal to the specified value.
 
bool featureEnabled (boost::beast::http::fields const &headers, std::string const &feature)
 Check if a feature is enabled.
 
std::string makeFeaturesRequestHeader (bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)
 Make request header X-Protocol-Ctl value with supported features.
 
std::string makeFeaturesResponseHeader (http_request_type const &headers, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)
 Make response header X-Protocol-Ctl value with supported features.
 
static std::optional< base_uint< 512 > > hashLastMessage (SSL const *ssl, size_t(*get)(const SSL *, void *, size_t))
 Hashes the latest finished message from an SSL stream.
 
std::optional< uint256makeSharedValue (stream_type &ssl, beast::Journal journal)
 Computes a shared value based on the SSL connection state.
 
void buildHandshake (boost::beast::http::fields &h, uint256 const &sharedValue, std::optional< std::uint32_t > networkID, beast::IP::Address public_ip, beast::IP::Address remote_ip, Application &app)
 Insert fields headers necessary for upgrading the link to the peer protocol.
 
PublicKey verifyHandshake (boost::beast::http::fields const &headers, uint256 const &sharedValue, std::optional< std::uint32_t > networkID, beast::IP::Address public_ip, beast::IP::Address remote, Application &app)
 Validate header fields necessary for upgrading the link to the peer protocol.
 
auto makeRequest (bool crawlPublic, bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)
 Make outbound http request.
 
http_response_type makeResponse (bool crawlPublic, http_request_type const &req, beast::IP::Address public_ip, beast::IP::Address remote_ip, uint256 const &sharedValue, std::optional< std::uint32_t > networkID, ProtocolVersion version, Application &app)
 Make http response.
 
template<typename headers >
bool peerFeatureEnabled (headers const &request, std::string const &feature, std::string value, bool config)
 Check if a feature should be enabled for a peer.
 
template<typename headers >
bool peerFeatureEnabled (headers const &request, std::string const &feature, bool config)
 Wrapper for enable(1)/disable type(0) of feature.
 
std::shared_ptr< MessagemakeSquelchMessage (PublicKey const &validator, bool squelch, uint32_t squelchDuration)
 
Overlay::Setup setup_Overlay (BasicConfig const &config)
 
std::unique_ptr< Overlaymake_Overlay (Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_context &io_context, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
 Creates the implementation of Overlay.
 
static bool stringIsUint256Sized (std::string const &pBuffStr)
 
static std::shared_ptr< PeerImpgetPeerWithTree (OverlayImpl &ov, uint256 const &rootHash, PeerImp const *skip)
 
static std::shared_ptr< PeerImpgetPeerWithLedger (OverlayImpl &ov, uint256 const &ledgerHash, LedgerIndex ledger, PeerImp const *skip)
 
std::unique_ptr< PeerSetBuildermake_PeerSetBuilder (Application &app)
 
std::unique_ptr< PeerSetmake_DummyPeerSet (Application &app)
 Make a dummy PeerSet that does not do anything.
 
protocol::MessageType protocolMessageType (protocol::TMGetLedger const &)
 
protocol::MessageType protocolMessageType (protocol::TMReplayDeltaRequest const &)
 
protocol::MessageType protocolMessageType (protocol::TMProofPathRequest const &)
 
template<class = void>
std::string protocolMessageName (int type)
 Returns the name of a protocol message given its type.
 
template<class Buffers , class Handler >
std::pair< std::size_t, boost::system::error_code > invokeProtocolMessage (Buffers const &buffers, Handler &handler, std::size_t &hint)
 Calls the handler for up to one protocol message in the passed buffers.
 
std::string to_string (ProtocolVersion const &p)
 Print a protocol version a human-readable string.
 
std::vector< ProtocolVersionparseProtocolVersions (boost::beast::string_view const &s)
 Parse a set of protocol versions.
 
std::optional< ProtocolVersionnegotiateProtocolVersion (std::vector< ProtocolVersion > const &versions)
 Given a list of supported protocol versions, choose the one we prefer.
 
std::optional< ProtocolVersionnegotiateProtocolVersion (boost::beast::string_view const &versions)
 Given a list of supported protocol versions, choose the one we prefer.
 
std::string const & supportedProtocolVersions ()
 The list of all the protocol versions we support.
 
bool isProtocolSupported (ProtocolVersion const &v)
 Determine whether we support a specific protocol version.
 
constexpr ProtocolVersion make_protocol (std::uint16_t major, std::uint16_t minor)
 
template<typename Predicate >
send_if_pred< Predicate > send_if (std::shared_ptr< Message > const &m, Predicate const &f)
 Helper function to aid in type deduction.
 
template<typename Predicate >
send_if_not_pred< Predicate > send_if_not (std::shared_ptr< Message > const &m, Predicate const &f)
 Helper function to aid in type deduction.
 
bool passwordUnrequiredOrSentCorrect (Port const &port, Json::Value const &params)
 
bool ipAllowed (beast::IP::Address const &remoteIp, std::vector< boost::asio::ip::network_v4 > const &nets4, std::vector< boost::asio::ip::network_v6 > const &nets6)
 True if remoteIp is in any of adminIp.
 
bool isAdmin (Port const &port, Json::Value const &params, beast::IP::Address const &remoteIp)
 
Role requestRole (Role const &required, Port const &port, Json::Value const &params, beast::IP::Endpoint const &remoteIp, std::string_view user)
 Return the allowed privilege role.
 
bool isUnlimited (Role const &role)
 ADMIN and IDENTIFIED roles shall have unlimited resources.
 
bool isUnlimited (Role const &required, Port const &port, Json::Value const &params, beast::IP::Endpoint const &remoteIp, std::string const &user)
 
Resource::Consumer requestInboundEndpoint (Resource::Manager &manager, beast::IP::Endpoint const &remoteAddress, Role const &role, std::string_view user, std::string_view forwardedFor)
 
static std::string_view extractIpAddrFromField (std::string_view field)
 
std::string_view forwardedFor (http_request_type const &request)
 
std::string createHTTPPost (std::string const &strHost, std::string const &strPath, std::string const &strMsg, std::unordered_map< std::string, std::string > const &mapRequestHeaders)
 
std::string JSONRPCRequest (std::string const &strMethod, Json::Value const &params, Json::Value const &id)
 
Json::Value rpcCmdToJson (std::vector< std::string > const &args, Json::Value &retParams, unsigned int apiVersion, beast::Journal j)
 
std::pair< int, Json::ValuerpcClient (std::vector< std::string > const &args, Config const &config, Logs &logs, unsigned int apiVersion, std::unordered_map< std::string, std::string > const &headers={})
 Internal invocation of RPC client.
 
std::shared_ptr< RPCSubmake_RPCSub (InfoSub::Source &source, boost::asio::io_context &io_context, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, Logs &logs)
 
static bool isStatusRequest (http_request_type const &request)
 
static Handoff statusRequestResponse (http_request_type const &request, boost::beast::http::status status)
 
static bool authorized (Port const &port, std::map< std::string, std::string > const &h)
 
static Json::Output makeOutput (Session &session)
 
static std::map< std::string, std::stringbuild_map (boost::beast::http::fields const &h)
 
template<class ConstBufferSequence >
static std::string buffers_to_string (ConstBufferSequence const &bs)
 
template<class T >
void logDuration (Json::Value const &request, T const &duration, beast::Journal &journal)
 
static Json::Value make_json_error (Json::Int code, Json::Value &&message)
 
static Port to_Port (ParsedPort const &parsed, std::ostream &log)
 
static std::vector< Portparse_Ports (Config const &config, std::ostream &log)
 
static void setup_Client (ServerHandler::Setup &setup)
 
static void setup_Overlay (ServerHandler::Setup &setup)
 
ServerHandler::Setup setup_ServerHandler (Config const &config, std::ostream &&log)
 
std::unique_ptr< ServerHandlermake_ServerHandler (Application &app, boost::asio::io_context &io_context, JobQueue &jobQueue, NetworkOPs &networkOPs, Resource::Manager &resourceManager, CollectorManager &cm)
 
std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > doLedgerGrpc (RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > &context)
 
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc (RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
 
std::pair< org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status > doLedgerDataGrpc (RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDataRequest > &context)
 
std::pair< org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status > doLedgerDiffGrpc (RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDiffRequest > &context)
 
void addChannel (Json::Value &jsonLines, SLE const &line)
 
Json::Value doAccountChannels (RPC::JsonContext &context)
 
Json::Value doAccountCurrencies (RPC::JsonContext &context)
 
Json::Value doAccountInfo (RPC::JsonContext &context)
 
void addLine (Json::Value &jsonLines, RPCTrustLine const &line)
 
Json::Value doAccountLines (RPC::JsonContext &context)
 
Json::Value doAccountNFTs (RPC::JsonContext &context)
 General RPC command that can retrieve objects in the account root.
 
Json::Value doAccountObjects (RPC::JsonContext &context)
 
void appendOfferJson (std::shared_ptr< SLE const > const &offer, Json::Value &offers)
 
Json::Value doAccountOffers (RPC::JsonContext &context)
 
std::variant< std::optional< LedgerSpecifier >, Json::ValueparseLedgerArgs (RPC::Context &context, Json::Value const &params)
 
std::variant< LedgerRange, RPC::StatusgetLedgerRange (RPC::Context &context, std::optional< LedgerSpecifier > const &ledgerSpecifier)
 
std::pair< AccountTxResult, RPC::StatusdoAccountTxHelp (RPC::Context &context, AccountTxArgs const &args)
 
Json::Value populateJsonResponse (std::pair< AccountTxResult, RPC::Status > const &res, AccountTxArgs const &args, RPC::JsonContext const &context)
 
Json::Value doAccountTxJson (RPC::JsonContext &context)
 
std::optional< AccountIDgetAccount (Json::Value const &v, Json::Value &result)
 
Expected< Issue, error_code_igetIssue (Json::Value const &v, beast::Journal j)
 
std::string to_iso8601 (NetClock::time_point tp)
 
Json::Value doAMMInfo (RPC::JsonContext &context)
 
Json::Value doBlackList (RPC::JsonContext &context)
 
Json::Value doBookOffers (RPC::JsonContext &context)
 
Json::Value doBookChanges (RPC::JsonContext &context)
 
Json::Value doCanDelete (RPC::JsonContext &context)
 
Json::Value doConnect (RPC::JsonContext &context)
 
Json::Value doConsensusInfo (RPC::JsonContext &context)
 
Json::Value doDepositAuthorized (RPC::JsonContext &context)
 
Json::Value doManifest (RPC::JsonContext &context)
 
Json::Value doFeature (RPC::JsonContext &context)
 
Json::Value doFee (RPC::JsonContext &context)
 
Json::Value doFetchInfo (RPC::JsonContext &context)
 
Json::Value doGatewayBalances (RPC::JsonContext &context)
 
static void iteratePriceData (RPC::JsonContext &context, std::shared_ptr< SLE const > const &sle, std::function< bool(STObject const &)> &&f)
 Calls callback "f" on the ledger-object sle and up to three previous metadata objects.
 
static std::tuple< STAmount, Number, std::uint16_tgetStats (Prices::right_const_iterator const &begin, Prices::right_const_iterator const &end)
 
Json::Value doGetAggregatePrice (RPC::JsonContext &context)
 oracles: array of {account, oracle_document_id} base_asset: is the asset to be priced quote_asset: is the denomination in which the prices are expressed trim : percentage of outliers to trim [optional] time_threshold : defines a range of prices to include based on the timestamp range - {most recent, most recent - time_threshold} [optional]
 
static void textTime (std::string &text, UptimeClock::time_point &seconds, char const *unitName, std::chrono::seconds unitVal)
 
Json::Value getCountsJson (Application &app, int minObjectCount)
 
Json::Value doGetCounts (RPC::JsonContext &context)
 
Json::Value doChannelAuthorize (RPC::JsonContext &)
 
Json::Value doChannelVerify (RPC::JsonContext &)
 
Json::Value doLedgerAccept (RPC::JsonContext &)
 
Json::Value doLedgerCleaner (RPC::JsonContext &)
 
Json::Value doLedgerClosed (RPC::JsonContext &)
 
Json::Value doLedgerCurrent (RPC::JsonContext &)
 
Json::Value doLedgerData (RPC::JsonContext &)
 
Json::Value doLedgerEntry (RPC::JsonContext &)
 
Json::Value doLedgerHeader (RPC::JsonContext &)
 
Json::Value doLedgerRequest (RPC::JsonContext &)
 
Json::Value doLogLevel (RPC::JsonContext &)
 
Json::Value doLogRotate (RPC::JsonContext &)
 
Json::Value doNFTBuyOffers (RPC::JsonContext &)
 
Json::Value doNFTSellOffers (RPC::JsonContext &)
 
Json::Value doNoRippleCheck (RPC::JsonContext &)
 
Json::Value doOwnerInfo (RPC::JsonContext &)
 
Json::Value doPathFind (RPC::JsonContext &)
 
Json::Value doPause (RPC::JsonContext &)
 
Json::Value doPeers (RPC::JsonContext &)
 
Json::Value doPing (RPC::JsonContext &)
 
Json::Value doPrint (RPC::JsonContext &)
 
Json::Value doRandom (RPC::JsonContext &)
 
Json::Value doResume (RPC::JsonContext &)
 
Json::Value doPeerReservationsAdd (RPC::JsonContext &)
 
Json::Value doPeerReservationsDel (RPC::JsonContext &)
 
Json::Value doPeerReservationsList (RPC::JsonContext &)
 
Json::Value doRipplePathFind (RPC::JsonContext &)
 
Json::Value doServerDefinitions (RPC::JsonContext &)
 
Json::Value doServerInfo (RPC::JsonContext &)
 
Json::Value doServerState (RPC::JsonContext &)
 
Json::Value doSign (RPC::JsonContext &)
 
Json::Value doSignFor (RPC::JsonContext &)
 
Json::Value doSimulate (RPC::JsonContext &)
 
Json::Value doStop (RPC::JsonContext &)
 
Json::Value doSubmit (RPC::JsonContext &)
 
Json::Value doSubmitMultiSigned (RPC::JsonContext &)
 
Json::Value doSubscribe (RPC::JsonContext &)
 
Json::Value doTransactionEntry (RPC::JsonContext &)
 
Json::Value doTxJson (RPC::JsonContext &)
 
Json::Value doTxHistory (RPC::JsonContext &)
 
Json::Value doTxReduceRelay (RPC::JsonContext &)
 
Json::Value doUnlList (RPC::JsonContext &)
 
Json::Value doUnsubscribe (RPC::JsonContext &)
 
Json::Value doValidationCreate (RPC::JsonContext &)
 
Json::Value doWalletPropose (RPC::JsonContext &)
 
Json::Value doValidators (RPC::JsonContext &)
 
Json::Value doValidatorListSites (RPC::JsonContext &)
 
Json::Value doValidatorInfo (RPC::JsonContext &)
 
Json::Value doVaultInfo (RPC::JsonContext &)
 
static Expected< uint256, Json::ValueparseObjectID (Json::Value const &params, Json::StaticString const fieldName, std::string const &expectedType="hex string or object")
 
static Expected< uint256, Json::ValueparseIndex (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseAccountRoot (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseAmendments (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseAMM (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseBridge (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseCheck (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseCredential (Json::Value const &cred, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseDelegate (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< STArray, Json::ValueparseAuthorizeCredentials (Json::Value const &jv)
 
static Expected< uint256, Json::ValueparseDepositPreauth (Json::Value const &dp, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseDID (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseDirectoryNode (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseEscrow (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseFeeSettings (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseLedgerHashes (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseMPToken (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseMPTokenIssuance (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseNFTokenOffer (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseNFTokenPage (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseNegativeUNL (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseOffer (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseOracle (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparsePayChannel (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparsePermissionedDomain (Json::Value const &pd, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseRippleState (Json::Value const &jvRippleState, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseSignerList (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseTicket (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseVault (Json::Value const &params, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseXChainOwnedClaimID (Json::Value const &claim_id, Json::StaticString const fieldName)
 
static Expected< uint256, Json::ValueparseXChainOwnedCreateAccountClaimID (Json::Value const &claim_id, Json::StaticString const fieldName)
 
static void appendNftOfferJson (Application const &app, std::shared_ptr< SLE const > const &offer, Json::Value &offers)
 
static Json::Value enumerateNFTOffers (RPC::JsonContext &context, uint256 const &nftId, Keylet const &directory)
 
static void fillTransaction (RPC::JsonContext &context, Json::Value &txArray, AccountID const &accountID, std::uint32_t &sequence, ReadView const &ledger)
 
static Expected< std::uint32_t, Json::ValuegetAutofillSequence (Json::Value const &tx_json, RPC::JsonContext &context)
 
static std::optional< Json::ValueautofillSignature (Json::Value &sigObject)
 
static std::optional< Json::ValueautofillTx (Json::Value &tx_json, RPC::JsonContext &context)
 
static Json::Value getTxJsonFromParams (Json::Value const &params)
 
static Json::Value simulateTxn (RPC::JsonContext &context, std::shared_ptr< Transaction > transaction)
 
static NetworkOPs::FailHard getFailHard (RPC::JsonContext const &context)
 
static bool isValidated (LedgerMaster &ledgerMaster, std::uint32_t seq, uint256 const &hash)
 
std::pair< TxResult, RPC::StatusdoTxHelp (RPC::Context &context, TxArgs args)
 
Json::Value populateJsonResponse (std::pair< TxResult, RPC::Status > const &res, TxArgs const &args, RPC::JsonContext const &context)
 
static std::optional< SeedvalidationSeed (Json::Value const &params)
 
static std::optional< uint256parseVault (Json::Value const &params, Json::Value &jvResult)
 
double estimate_entropy (std::string const &input)
 
Json::Value walletPropose (Json::Value const &params)
 
bool operator< (Port const &lhs, Port const &rhs)
 
template<class Engine , class Integral >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > rand_int (Engine &engine, Integral min, Integral max)
 Return a uniformly distributed random integer.
 
template<class Integral >
std::enable_if_t< std::is_integral< Integral >::value, Integral > rand_int (Integral min, Integral max)
 
template<class Engine , class Integral >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > rand_int (Engine &engine, Integral max)
 
template<class Integral >
std::enable_if_t< std::is_integral< Integral >::value, Integral > rand_int (Integral max)
 
template<class Integral , class Engine >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > rand_int (Engine &engine)
 
template<class Integral = int>
std::enable_if_t< std::is_integral< Integral >::value, Integral > rand_int ()
 
template<class Byte , class Engine >
std::enable_if_t<(std::is_same< Byte, unsigned char >::value||std::is_same< Byte, std::uint8_t >::value) &&detail::is_engine< Engine >::value, Byte > rand_byte (Engine &engine)
 Return a random byte.
 
template<class Byte = std::uint8_t>
std::enable_if_t<(std::is_same< Byte, unsigned char >::value||std::is_same< Byte, std::uint8_t >::value), Byte > rand_byte ()
 
template<class Engine >
bool rand_bool (Engine &engine)
 Return a random boolean value.
 
bool rand_bool ()
 
bool cdirFirst (ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
 Returns the first entry in the directory, advancing the index.
 
bool dirFirst (ApplyView &view, uint256 const &root, std::shared_ptr< SLE > &page, unsigned int &index, uint256 &entry)
 
bool cdirNext (ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
 Returns the next entry in the directory, advancing the index.
 
bool dirNext (ApplyView &view, uint256 const &root, std::shared_ptr< SLE > &page, unsigned int &index, uint256 &entry)
 
constexpr bool operator== (Book const &lhs, Book const &rhs)
 Equality comparison.
 
constexpr std::weak_ordering operator<=> (Book const &lhs, Book const &rhs)
 Strict weak ordering.
 
constexpr bool operator== (Issue const &lhs, Issue const &rhs)
 Equality comparison.
 
constexpr std::weak_ordering operator<=> (Issue const &lhs, Issue const &rhs)
 Strict weak ordering.
 
bool canHaveNFTokenID (std::shared_ptr< STTx const > const &serializedTx, TxMeta const &transactionMeta)
 Add a nftoken_ids field to the meta output parameter.
 
std::optional< uint256getNFTokenIDFromPage (TxMeta const &transactionMeta)
 
std::vector< uint256getNFTokenIDFromDeletedOffer (TxMeta const &transactionMeta)
 
void insertNFTokenID (Json::Value &response, std::shared_ptr< STTx const > const &transaction, TxMeta const &transactionMeta)
 
bool canHaveNFTokenOfferID (std::shared_ptr< STTx const > const &serializedTx, TxMeta const &transactionMeta)
 Add an offer_id field to the meta output parameter.
 
std::optional< uint256getOfferIDFromCreatedOffer (TxMeta const &transactionMeta)
 
void insertNFTokenOfferID (Json::Value &response, std::shared_ptr< STTx const > const &transaction, TxMeta const &transactionMeta)
 
std::optional< KeyTypepublicKeyType (Slice const &slice)
 Returns the type of public key.
 
std::optional< KeyTypepublicKeyType (PublicKey const &publicKey)
 
Buffer signDigest (PublicKey const &pk, SecretKey const &sk, uint256 const &digest)
 Generate a signature for a message digest.
 
Buffer signDigest (KeyType type, SecretKey const &sk, uint256 const &digest)
 
Buffer sign (PublicKey const &pk, SecretKey const &sk, Slice const &message)
 Generate a signature for a message.
 
Buffer sign (KeyType type, SecretKey const &sk, Slice const &message)
 
template<class T , class U >
std::optional< T > get (STObject const &st, TypedField< U > const &f)
 Return the value of a field in an STObject as a given type.
 
template<class U >
std::optional< typename STExchange< U, typename U::value_type >::value_type > get (STObject const &st, TypedField< U > const &f)
 
std::optional< SHAMapNodeIDdeserializeSHAMapNodeID (void const *data, std::size_t size)
 Return an object representing a serialized SHAMap Node ID.
 
std::optional< SHAMapNodeIDdeserializeSHAMapNodeID (std::string const &s)
 
std::optional< ManifestdeserializeManifest (Slice s, beast::Journal journal)
 Constructs Manifest from serialized string.
 
std::optional< ManifestdeserializeManifest (std::string const &s, beast::Journal journal=beast::Journal(beast::Journal::getNullSink()))
 
template<class T , class = std::enable_if_t< std::is_same<T, char>::value || std::is_same<T, unsigned char>::value>>
std::optional< ManifestdeserializeManifest (std::vector< T > const &v, beast::Journal journal=beast::Journal(beast::Journal::getNullSink()))
 
STAmount creditLimit (ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const &currency)
 Calculate the maximum amount of IOUs that an account can hold.
 
IOUAmount creditLimit2 (ReadView const &v, AccountID const &acc, AccountID const &iss, Currency const &cur)
 
STAmount creditBalance (ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const &currency)
 Returns the amount of IOUs issued by issuer that are held by an account.
 
PreflightResult preflight (Application &app, Rules const &rules, STTx const &tx, ApplyFlags flags, beast::Journal j)
 Gate a transaction based on static information.
 
PreflightResult preflight (Application &app, Rules const &rules, uint256 const &parentBatchId, STTx const &tx, ApplyFlags flags, beast::Journal j)
 

Variables

static constexpr std::chrono::seconds epoch_offset
 Clock for measuring the network time.
 
auto constexpr muldiv_max = std::numeric_limits<std::uint64_t>::max()
 
constexpr struct ripple::open_ledger_t open_ledger
 
constexpr struct ripple::batch_view_t batch_view
 
std::uint16_t constexpr TRADING_FEE_THRESHOLD = 1000
 
std::uint32_t constexpr TOTAL_TIME_SLOT_SECS = 24 * 3600
 
std::uint16_t constexpr AUCTION_SLOT_TIME_INTERVALS = 20
 
std::uint16_t constexpr AUCTION_SLOT_MAX_AUTH_ACCOUNTS = 4
 
std::uint32_t constexpr AUCTION_SLOT_FEE_SCALE_FACTOR = 100000
 
std::uint32_t constexpr AUCTION_SLOT_DISCOUNTED_FEE_FRACTION = 10
 
std::uint32_t constexpr AUCTION_SLOT_MIN_FEE_FRACTION = 25
 
std::uint32_t constexpr AUCTION_SLOT_INTERVAL_DURATION
 
std::uint16_t constexpr VOTE_MAX_SLOTS = 8
 
std::uint32_t constexpr VOTE_WEIGHT_SCALE_FACTOR = 100000
 
std::array< keyletDesc< AccountID const & >, 6 > const directAccountKeylets
 
static std::uint32_t const sLCF_NoConsensusTime = 0x01
 
std::size_t constexpr txMinSizeBytes = 32
 Protocol specific constants.
 
std::size_t constexpr txMaxSizeBytes = megabytes(1)
 Largest legal byte size of a transaction.
 
std::size_t constexpr unfundedOfferRemoveLimit = 1000
 The maximum number of unfunded offers to delete at once.
 
std::size_t constexpr expiredOfferRemoveLimit = 256
 The maximum number of expired offers to delete at once.
 
std::size_t constexpr oversizeMetaDataCap = 5200
 The maximum number of metadata entries allowed in one transaction.
 
std::size_t constexpr dirNodeMaxEntries = 32
 The maximum number of entries per directory page.
 
std::uint64_t constexpr dirNodeMaxPages = 262144
 The maximum number of pages allowed in a directory.
 
std::size_t constexpr dirMaxTokensPerPage = 32
 The maximum number of items in an NFT page.
 
std::size_t constexpr maxDeletableDirEntries = 1000
 The maximum number of owner directory entries for account to be deletable.
 
std::size_t constexpr maxTokenOfferCancelCount = 500
 The maximum number of token offers that can be canceled at once.
 
std::size_t constexpr maxDeletableTokenOfferEntries = 500
 The maximum number of offers in an offer directory for NFT to be burnable.
 
std::uint16_t constexpr maxTransferFee = 50000
 The maximum token transfer fee allowed.
 
std::size_t constexpr maxTokenURILength = 256
 The maximum length of a URI inside an NFT.
 
std::size_t constexpr maxDIDDocumentLength = 256
 The maximum length of a Data element inside a DID.
 
std::size_t constexpr maxDIDURILength = 256
 The maximum length of a URI inside a DID.
 
std::size_t constexpr maxDIDAttestationLength = 256
 The maximum length of an Attestation inside a DID.
 
std::size_t constexpr maxDomainLength = 256
 The maximum length of a domain.
 
std::size_t constexpr maxCredentialURILength = 256
 The maximum length of a URI inside a Credential.
 
std::size_t constexpr maxCredentialTypeLength = 64
 The maximum length of a CredentialType inside a Credential.
 
std::size_t constexpr maxCredentialsArraySize = 8
 The maximum number of credentials can be passed in array.
 
std::size_t constexpr maxPermissionedDomainCredentialsArraySize = 10
 The maximum number of credentials can be passed in array for permissioned domain.
 
std::size_t constexpr maxMPTokenMetadataLength = 1024
 The maximum length of MPTokenMetadata.
 
std::uint64_t constexpr maxMPTokenAmount = 0x7FFF'FFFF'FFFF'FFFFull
 The maximum amount of MPTokenIssuance.
 
std::size_t constexpr maxDataPayloadLength = 256
 The maximum length of Data payload.
 
std::uint8_t constexpr vaultStrategyFirstComeFirstServe = 1
 Vault withdrawal policies.
 
std::uint8_t constexpr vaultDefaultIOUScale = 6
 Default IOU scale factor for a Vault.
 
std::uint8_t constexpr vaultMaximumIOUScale = 18
 Maximum scale factor for a Vault.
 
std::uint8_t constexpr maxAssetCheckDepth = 5
 Maximum recursion depth for vault shares being put as an asset inside another vault; counted from 0.
 
std::uint16_t constexpr maxDeletableAMMTrustLines = 512
 The maximum number of trustlines to delete as part of AMM account deletion cleanup.
 
std::size_t constexpr maxOracleURI = 256
 The maximum length of a URI inside an Oracle.
 
std::size_t constexpr maxOracleProvider = 256
 The maximum length of a Provider inside an Oracle.
 
std::size_t constexpr maxOracleDataSeries = 10
 The maximum size of a data series array inside an Oracle.
 
std::size_t constexpr maxOracleSymbolClass = 16
 The maximum length of a SymbolClass inside an Oracle.
 
std::size_t constexpr maxLastUpdateTimeDelta = 300
 The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
 
std::size_t constexpr maxPriceScale = 20
 The maximum price scaling factor.
 
std::size_t constexpr maxTrim = 25
 The maximum percentage of outliers to trim.
 
std::size_t constexpr permissionMaxSize = 10
 The maximum number of delegate permissions an account can grant.
 
std::size_t constexpr maxBatchTxCount = 8
 The maximum number of transactions that can be in a batch.
 
Rate const parityRate
 A transfer rate signifying a 1:1 exchange.
 
static std::map< std::string, int > const sTypeMap = {XMACRO(TO_MAP)}
 
SField const sfInvalid
 
SField const sfGeneric
 
constexpr std::uint32_t vfFullValidation = 0x00000001
 
constexpr std::uint32_t vfFullyCanonicalSig = 0x80000000
 
constexpr XRPAmount INITIAL_XRP {100'000'000'000 * DROPS_PER_XRP}
 Configure the native currency.
 
static constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ {32570u}
 The XRP ledger network's earliest allowed sequence.
 
static constexpr std::uint32_t XRP_LEDGER_EARLIEST_FEES {562177u}
 The XRP Ledger mainnet's earliest ledger with a FeeSettings object.
 
constexpr std::ratio< 80, 100 > amendmentMajorityCalcThreshold
 The minimum amount of support an amendment should have.
 
constexpr std::chrono::seconds const defaultAmendmentMajorityTime = weeks{2}
 The minimum amount of time an amendment must hold a majority.
 
constexpr std::uint32_t tfFullyCanonicalSig = 0x80000000
 Transaction flags.
 
constexpr std::uint32_t tfInnerBatchTxn = 0x40000000
 
constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn
 
constexpr std::uint32_t tfUniversalMask = ~tfUniversal
 
constexpr std::uint32_t tfRequireDestTag = 0x00010000
 
constexpr std::uint32_t tfOptionalDestTag = 0x00020000
 
constexpr std::uint32_t tfRequireAuth = 0x00040000
 
constexpr std::uint32_t tfOptionalAuth = 0x00080000
 
constexpr std::uint32_t tfDisallowXRP = 0x00100000
 
constexpr std::uint32_t tfAllowXRP = 0x00200000
 
constexpr std::uint32_t tfAccountSetMask
 
constexpr std::uint32_t asfRequireDest = 1
 
constexpr std::uint32_t asfRequireAuth = 2
 
constexpr std::uint32_t asfDisallowXRP = 3
 
constexpr std::uint32_t asfDisableMaster = 4
 
constexpr std::uint32_t asfAccountTxnID = 5
 
constexpr std::uint32_t asfNoFreeze = 6
 
constexpr std::uint32_t asfGlobalFreeze = 7
 
constexpr std::uint32_t asfDefaultRipple = 8
 
constexpr std::uint32_t asfDepositAuth = 9
 
constexpr std::uint32_t asfAuthorizedNFTokenMinter = 10
 
constexpr std::uint32_t asfDisallowIncomingNFTokenOffer = 12
 
constexpr std::uint32_t asfDisallowIncomingCheck = 13
 
constexpr std::uint32_t asfDisallowIncomingPayChan = 14
 
constexpr std::uint32_t asfDisallowIncomingTrustline = 15
 
constexpr std::uint32_t asfAllowTrustLineClawback = 16
 
constexpr std::uint32_t asfAllowTrustLineLocking = 17
 
constexpr std::uint32_t tfPassive = 0x00010000
 
constexpr std::uint32_t tfImmediateOrCancel = 0x00020000
 
constexpr std::uint32_t tfFillOrKill = 0x00040000
 
constexpr std::uint32_t tfSell = 0x00080000
 
constexpr std::uint32_t tfHybrid = 0x00100000
 
constexpr std::uint32_t tfOfferCreateMask
 
constexpr std::uint32_t tfNoRippleDirect = 0x00010000
 
constexpr std::uint32_t tfPartialPayment = 0x00020000
 
constexpr std::uint32_t tfLimitQuality = 0x00040000
 
constexpr std::uint32_t tfPaymentMask
 
constexpr std::uint32_t tfMPTPaymentMask = ~(tfUniversal | tfPartialPayment)
 
constexpr std::uint32_t tfSetfAuth = 0x00010000
 
constexpr std::uint32_t tfSetNoRipple = 0x00020000
 
constexpr std::uint32_t tfClearNoRipple = 0x00040000
 
constexpr std::uint32_t tfSetFreeze = 0x00100000
 
constexpr std::uint32_t tfClearFreeze = 0x00200000
 
constexpr std::uint32_t tfSetDeepFreeze = 0x00400000
 
constexpr std::uint32_t tfClearDeepFreeze = 0x00800000
 
constexpr std::uint32_t tfTrustSetMask
 
constexpr std::uint32_t tfTrustSetPermissionMask = ~(tfUniversal | tfSetfAuth | tfSetFreeze | tfClearFreeze)
 
constexpr std::uint32_t tfGotMajority = 0x00010000
 
constexpr std::uint32_t tfLostMajority = 0x00020000
 
constexpr std::uint32_t tfChangeMask
 
constexpr std::uint32_t tfRenew = 0x00010000
 
constexpr std::uint32_t tfClose = 0x00020000
 
constexpr std::uint32_t tfPayChanClaimMask = ~(tfUniversal | tfRenew | tfClose)
 
constexpr std::uint32_t const tfBurnable = 0x00000001
 
constexpr std::uint32_t const tfOnlyXRP = 0x00000002
 
constexpr std::uint32_t const tfTrustLine = 0x00000004
 
constexpr std::uint32_t const tfTransferable = 0x00000008
 
constexpr std::uint32_t const tfMutable = 0x00000010
 
constexpr std::uint32_t const tfMPTCanLock = lsfMPTCanLock
 
constexpr std::uint32_t const tfMPTRequireAuth = lsfMPTRequireAuth
 
constexpr std::uint32_t const tfMPTCanEscrow = lsfMPTCanEscrow
 
constexpr std::uint32_t const tfMPTCanTrade = lsfMPTCanTrade
 
constexpr std::uint32_t const tfMPTCanTransfer = lsfMPTCanTransfer
 
constexpr std::uint32_t const tfMPTCanClawback = lsfMPTCanClawback
 
constexpr std::uint32_t const tfMPTokenIssuanceCreateMask
 
constexpr std::uint32_t const tmfMPTCanMutateCanLock = lsmfMPTCanMutateCanLock
 
constexpr std::uint32_t const tmfMPTCanMutateRequireAuth = lsmfMPTCanMutateRequireAuth
 
constexpr std::uint32_t const tmfMPTCanMutateCanEscrow = lsmfMPTCanMutateCanEscrow
 
constexpr std::uint32_t const tmfMPTCanMutateCanTrade = lsmfMPTCanMutateCanTrade
 
constexpr std::uint32_t const tmfMPTCanMutateCanTransfer = lsmfMPTCanMutateCanTransfer
 
constexpr std::uint32_t const tmfMPTCanMutateCanClawback = lsmfMPTCanMutateCanClawback
 
constexpr std::uint32_t const tmfMPTCanMutateMetadata = lsmfMPTCanMutateMetadata
 
constexpr std::uint32_t const tmfMPTCanMutateTransferFee = lsmfMPTCanMutateTransferFee
 
constexpr std::uint32_t const tmfMPTokenIssuanceCreateMutableMask
 
constexpr std::uint32_t const tfMPTUnauthorize = 0x00000001
 
constexpr std::uint32_t const tfMPTokenAuthorizeMask = ~(tfUniversal | tfMPTUnauthorize)
 
constexpr std::uint32_t const tfMPTLock = 0x00000001
 
constexpr std::uint32_t const tfMPTUnlock = 0x00000002
 
constexpr std::uint32_t const tfMPTokenIssuanceSetMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock)
 
constexpr std::uint32_t const tfMPTokenIssuanceSetPermissionMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock)
 
constexpr std::uint32_t const tmfMPTSetCanLock = 0x00000001
 
constexpr std::uint32_t const tmfMPTClearCanLock = 0x00000002
 
constexpr std::uint32_t const tmfMPTSetRequireAuth = 0x00000004
 
constexpr std::uint32_t const tmfMPTClearRequireAuth = 0x00000008
 
constexpr std::uint32_t const tmfMPTSetCanEscrow = 0x00000010
 
constexpr std::uint32_t const tmfMPTClearCanEscrow = 0x00000020
 
constexpr std::uint32_t const tmfMPTSetCanTrade = 0x00000040
 
constexpr std::uint32_t const tmfMPTClearCanTrade = 0x00000080
 
constexpr std::uint32_t const tmfMPTSetCanTransfer = 0x00000100
 
constexpr std::uint32_t const tmfMPTClearCanTransfer = 0x00000200
 
constexpr std::uint32_t const tmfMPTSetCanClawback = 0x00000400
 
constexpr std::uint32_t const tmfMPTClearCanClawback = 0x00000800
 
constexpr std::uint32_t const tmfMPTokenIssuanceSetMutableMask
 
constexpr std::uint32_t const tfMPTokenIssuanceDestroyMask = ~tfUniversal
 
constexpr std::uint32_t const tfNFTokenMintMask
 
constexpr std::uint32_t const tfNFTokenMintOldMask
 
constexpr std::uint32_t const tfNFTokenMintOldMaskWithMutable
 
constexpr std::uint32_t const tfNFTokenMintMaskWithMutable
 
constexpr std::uint32_t const tfSellNFToken = 0x00000001
 
constexpr std::uint32_t const tfNFTokenCreateOfferMask
 
constexpr std::uint32_t const tfNFTokenCancelOfferMask = ~tfUniversal
 
constexpr std::uint32_t const tfNFTokenAcceptOfferMask = ~tfUniversal
 
constexpr std::uint32_t const tfClawbackMask = ~tfUniversal
 
constexpr std::uint32_t tfLPToken = 0x00010000
 
constexpr std::uint32_t tfWithdrawAll = 0x00020000
 
constexpr std::uint32_t tfOneAssetWithdrawAll = 0x00040000
 
constexpr std::uint32_t tfSingleAsset = 0x00080000
 
constexpr std::uint32_t tfTwoAsset = 0x00100000
 
constexpr std::uint32_t tfOneAssetLPToken = 0x00200000
 
constexpr std::uint32_t tfLimitLPToken = 0x00400000
 
constexpr std::uint32_t tfTwoAssetIfEmpty = 0x00800000
 
constexpr std::uint32_t tfWithdrawSubTx
 
constexpr std::uint32_t tfDepositSubTx
 
constexpr std::uint32_t tfWithdrawMask = ~(tfUniversal | tfWithdrawSubTx)
 
constexpr std::uint32_t tfDepositMask = ~(tfUniversal | tfDepositSubTx)
 
constexpr std::uint32_t tfClawTwoAssets = 0x00000001
 
constexpr std::uint32_t tfAMMClawbackMask = ~(tfUniversal | tfClawTwoAssets)
 
constexpr std::uint32_t tfClearAccountCreateAmount = 0x00010000
 
constexpr std::uint32_t tfBridgeModifyMask = ~(tfUniversal | tfClearAccountCreateAmount)
 
constexpr std::uint32_t const tfVaultPrivate = 0x00010000
 
constexpr std::uint32_t const tfVaultShareNonTransferable = 0x00020000
 
constexpr std::uint32_t const tfVaultCreateMask = ~(tfUniversal | tfVaultPrivate | tfVaultShareNonTransferable)
 
constexpr std::uint32_t tfAllOrNothing = 0x00010000
 
constexpr std::uint32_t tfOnlyOne = 0x00020000
 
constexpr std::uint32_t tfUntilFailure = 0x00040000
 
constexpr std::uint32_t tfIndependent = 0x00080000
 
constexpr std::uint32_t const tfBatchMask
 
constexpr XRPAmount DROPS_PER_XRP {1'000'000}
 Number of drops per 1 XRP.
 
static constexpr unsigned char const wireTypeTransaction = 0
 
static constexpr unsigned char const wireTypeAccountState = 1
 
static constexpr unsigned char const wireTypeInner = 2
 
static constexpr unsigned char const wireTypeCompressedInner = 3
 
static constexpr unsigned char const wireTypeTransactionWithMeta = 4
 
constexpr Number one {1000000000000000, -15, Number::unchecked{}}
 
static std::optional< HTTPClientSSLContexthttpClientSSLContext
 
static std::unique_ptr< detail::AccountIdCacheaccountIdCache
 
static bool const readOnlySet
 
static std::int64_t constexpr minMantissa = 1000000000000000ull
 
static std::int64_t constexpr maxMantissa = 9999999999999999ull
 
static int constexpr minExponent = -96
 
static int constexpr maxExponent = 80
 
static SField::private_access_tag_t access
 
SField const sfHash (access, STI_UINT256, 257, "hash")
 
SField const sfIndex (access, STI_UINT256, 258, "index")
 
static std::uint64_t const tenTo14 = 100000000000000ull
 
static std::uint64_t const tenTo14m1 = tenTo14 - 1
 
static std::uint64_t const tenTo17 = tenTo14 * 1000
 
static constexpr char const * alphabetForward
 
static constexpr std::array< int, 256 > const alphabetReverse
 
static boost::intrusive_ptr< SHAMapItem const > const no_item
 
auto constexpr ledgerAcquireTimeout = 3000ms
 
static constexpr int MAX_LEDGER_GAP {100}
 
static constexpr std::chrono::minutes MAX_LEDGER_AGE_ACQUIRE {1}
 
static constexpr int MAX_WRITE_LOAD_ACQUIRE {8192}
 
auto constexpr TX_ACQUIRE_TIMEOUT = 250ms
 
create_genesis_t const create_genesis {}
 
std::uint32_t constexpr FLAG_LEDGER_INTERVAL = 256
 
constexpr char const * CommonDBPragmaJournal {"PRAGMA journal_mode=%s;"}
 
constexpr char const * CommonDBPragmaSync {"PRAGMA synchronous=%s;"}
 
constexpr char const * CommonDBPragmaTemp {"PRAGMA temp_store=%s;"}
 
constexpr std::uint32_t SQLITE_TUNING_CUTOFF = 10'000'000
 
constexpr auto LgrDBName {"ledger.db"}
 
constexpr std::array< char const *, 5 > LgrDBInit
 
constexpr auto TxDBName {"transaction.db"}
 
constexpr std::array< char const *, 8 > TxDBInit
 
constexpr auto WalletDBName {"wallet.db"}
 
constexpr std::array< char const *, 6 > WalletDBInit
 
constexpr std::size_t fullBelowTargetSize = 524288
 
constexpr std::chrono::seconds fullBelowExpiration = std::chrono::minutes{10}
 
constexpr std::size_t maxPoppedTransactions = 10
 
auto constexpr default_refresh_interval = std::chrono::minutes{5}
 
auto constexpr error_retry_interval = std::chrono::seconds{30}
 
unsigned short constexpr max_redirects = 3
 
static std::array< char const *, 5 > const stateNames
 
static auto const genesisAccountId
 
constexpr HashRouterFlags SF_SIGBAD
 
constexpr HashRouterFlags SF_SIGGOOD
 
constexpr HashRouterFlags SF_LOCALBAD
 
constexpr HashRouterFlags SF_LOCALGOOD
 
constexpr HashRouterFlags SF_CF_INVALID = HashRouterFlags::PRIVATE5
 
constexpr HashRouterFlags SF_CF_VALID = HashRouterFlags::PRIVATE6
 
static constexpr std::array< MPTMutabilityFlags, 6 > mptMutabilityFlags
 
static std::uint32_t const DEFAULT_SIGNER_LIST_ID = 0
 
constexpr size_t xbridgeMaxAccountCreateClaims = 128
 
std::chrono::seconds constexpr ledgerPossibleTimeResolutions []
 Possible ledger close time resolutions.
 
auto constexpr ledgerDefaultTimeResolution = ledgerPossibleTimeResolutions[2]
 Initial resolution of ledger close time.
 
auto constexpr ledgerGenesisTimeResolution = ledgerPossibleTimeResolutions[0]
 Close time resolution in genesis ledger.
 
auto constexpr increaseLedgerTimeResolutionEvery = 8
 How often we increase the close time resolution (in numbers of ledgers)
 
auto constexpr decreaseLedgerTimeResolutionEvery = 1
 How often we decrease the close time resolution (in numbers of ledgers)
 
constexpr std::array< std::pair< SizedItem, std::array< int, 5 > >, 13 > sizedItems
 
CheckpointersCollection checkpointers
 
static auto checkpointPageCount = 1000
 
static constexpr char FEATURE_COMPR [] = "compr"
 
static constexpr char FEATURE_VPRR [] = "vprr"
 
static constexpr char FEATURE_TXRR [] = "txrr"
 
static constexpr char FEATURE_LEDGER_REPLAY [] = "ledgerreplay"
 
static constexpr char DELIM_FEATURE [] = ";"
 
static constexpr char DELIM_VALUE [] = ","
 
constexpr ProtocolVersion const supportedProtocolList []
 The list of protocol versions we speak and we prefer to use.
 
std::unordered_map< protocol::MessageType, TrafficCount::category > const type_lookup
 
constexpr std::size_t maximiumMessageSize = megabytes(64)
 
Json::Int constexpr method_not_found = -32601
 
Json::Int constexpr server_overloaded = -32604
 
Json::Int constexpr forbidden = -32605
 
Json::Int constexpr wrong_version = -32606
 

Detailed Description

Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.

TODO: Remove ripple::basic_semaphore (and this file) and use std::counting_semaphore.

Callback for filtering SHAMap during sync.

Use hardened_hash_* containers for keys that do need a secure hashing algorithm.

The cryptographic security of containers where a hash function is used as a template parameter depends entirely on that hash function and not at all on what container it is.

Background:

GCC: According to GCC Bugzilla PR104928 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928#c15), the fix is scheduled for inclusion in GCC 16.0 (see comment #15, Target Milestone: 16.0). It is not included in GCC 14.x or earlier, and there is no indication that it will be backported to GCC 13.x or 14.x branches.

Clang: The fix for is included in Clang 19.1.0+

Once the minimum compiler version is updated to > GCC 16.0 or Clang 19.1.0, we can remove this file.

WARNING: Avoid using std::counting_semaphore until the minimum compiler version is updated.

Typedef Documentation

◆ uint128

using ripple::uint128 = typedef base_uint<128>

Definition at line 556 of file base_uint.h.

◆ uint160

using ripple::uint160 = typedef base_uint<160>

Definition at line 557 of file base_uint.h.

◆ uint256

using ripple::uint256 = typedef base_uint<256>

Definition at line 558 of file base_uint.h.

◆ uint192

using ripple::uint192 = typedef base_uint<192>

Definition at line 559 of file base_uint.h.

◆ IniFileSections

Definition at line 36 of file BasicConfig.h.

◆ Blob

using ripple::Blob = typedef std::vector<unsigned char>

Storage for linear binary data.

Blocks of binary data appear often in various idioms and structures.

Definition at line 30 of file Blob.h.

◆ days

using ripple::days = typedef std::chrono::duration< int, std::ratio_multiply<std::chrono::hours::period, std::ratio<24> >>

Definition at line 38 of file chrono.h.

◆ weeks

using ripple::weeks = typedef std::chrono:: duration<int, std::ratio_multiply<days::period, std::ratio<7> >>

Definition at line 42 of file chrono.h.

◆ Stopwatch

A clock for measuring elapsed time.

The epoch is unspecified.

Definition at line 112 of file chrono.h.

◆ TestStopwatch

A manual Stopwatch for unit tests.

Definition at line 115 of file chrono.h.

◆ KeyCache

using ripple::KeyCache = typedef TaggedCache<uint256, int, true>

Definition at line 28 of file KeyCache.h.

◆ ClosedInterval

template<class T >
using ripple::ClosedInterval = typedef boost::icl::closed_interval<T>

A closed interval over the domain T.

For an instance ClosedInterval c, this represents the closed interval (c.first(), c.last()). A single element interval has c.first() == c.last().

This is simply a type-alias for boost interval container library interval set, so users should consult that documentation for available supporting member and free functions.

Definition at line 45 of file RangeSet.h.

◆ RangeSet

template<class T >
using ripple::RangeSet = typedef boost::icl::interval_set<T, std::less, ClosedInterval<T> >

A set of closed intervals over the domain T.

Represents a set of values of the domain T using the minimum number of disjoint ClosedInterval<T>. This is useful to represent ranges of T where a few instances are missing, e.g. the set 1-5,8-9,11-14.

This is simply a type-alias for boost interval container library interval set, so users should consult that documentation for available supporting member and free functions.

Definition at line 70 of file RangeSet.h.

◆ hash_map

template<class Key , class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using ripple::hash_map = typedef std::unordered_map<Key, Value, Hash, Pred, Allocator>

Definition at line 54 of file UnorderedContainers.h.

◆ hash_multimap

template<class Key , class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using ripple::hash_multimap = typedef std::unordered_multimap<Key, Value, Hash, Pred, Allocator>

Definition at line 62 of file UnorderedContainers.h.

◆ hash_set

template<class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using ripple::hash_set = typedef std::unordered_set<Value, Hash, Pred, Allocator>

Definition at line 70 of file UnorderedContainers.h.

◆ hash_multiset

template<class Value , class Hash = beast::uhash<>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using ripple::hash_multiset = typedef std::unordered_multiset<Value, Hash, Pred, Allocator>

Definition at line 77 of file UnorderedContainers.h.

◆ strong_hash

Definition at line 81 of file UnorderedContainers.h.

◆ hardened_hash_map

template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using ripple::hardened_hash_map = typedef std::unordered_map<Key, Value, Hash, Pred, Allocator>

Definition at line 89 of file UnorderedContainers.h.

◆ hardened_partitioned_hash_map

template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using ripple::hardened_partitioned_hash_map = typedef partitioned_unordered_map<Key, Value, Hash, Pred, Allocator>

Definition at line 97 of file UnorderedContainers.h.

◆ hardened_hash_multimap

template<class Key , class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>>
using ripple::hardened_hash_multimap = typedef std::unordered_multimap<Key, Value, Hash, Pred, Allocator>

Definition at line 106 of file UnorderedContainers.h.

◆ hardened_hash_set

template<class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using ripple::hardened_hash_set = typedef std::unordered_set<Value, Hash, Pred, Allocator>

Definition at line 114 of file UnorderedContainers.h.

◆ hardened_hash_multiset

template<class Value , class Hash = hardened_hash<strong_hash>, class Pred = std::equal_to<Value>, class Allocator = std::allocator<Value>>
using ripple::hardened_hash_multiset = typedef std::unordered_multiset<Value, Hash, Pred, Allocator>

Definition at line 121 of file UnorderedContainers.h.

◆ CachedSLEs

Definition at line 28 of file CachedSLEs.h.

◆ majorityAmendments_t

Definition at line 400 of file View.h.

◆ EntryDeleter

Deleter function prototype.

Returns the status of the entry deletion (if should not be skipped) and if the entry should be skipped. The status is always tesSUCCESS if the entry should be skipped.

Definition at line 901 of file View.h.

◆ AccountID

A 160-bit unsigned that uniquely identifies an account.

Definition at line 48 of file AccountID.h.

◆ Result

template<class T >
using ripple::Result = typedef boost::outcome_v2::result<T, std::error_code>

Definition at line 37 of file b58_utils.h.

◆ ripemd160_hasher

Definition at line 114 of file digest.h.

◆ sha256_hasher

Definition at line 115 of file digest.h.

◆ sha512_hasher

Definition at line 116 of file digest.h.

◆ sha512_half_hasher

Definition at line 214 of file digest.h.

◆ sha512_half_hasher_s

Definition at line 217 of file digest.h.

◆ LedgerInfo

Definition at line 79 of file LedgerHeader.h.

◆ MultiApiJson

Definition at line 236 of file MultiApiJson.h.

◆ LedgerIndex

A ledger index.

Definition at line 139 of file Protocol.h.

◆ TxID

using ripple::TxID = typedef uint256

A transaction identifier.

The value is computed as the hash of the canonicalized, serialized transaction object.

Definition at line 145 of file Protocol.h.

◆ LedgerHash

using ripple::LedgerHash = typedef uint256

Definition at line 27 of file RippleLedgerHash.h.

◆ SF_UINT8

Definition at line 349 of file SField.h.

◆ SF_UINT16

Definition at line 350 of file SField.h.

◆ SF_UINT32

Definition at line 351 of file SField.h.

◆ SF_UINT64

Definition at line 352 of file SField.h.

◆ SF_UINT96

using ripple::SF_UINT96 = typedef TypedField<STBitString<96> >

Definition at line 353 of file SField.h.

◆ SF_UINT128

using ripple::SF_UINT128 = typedef TypedField<STBitString<128> >

Definition at line 354 of file SField.h.

◆ SF_UINT160

using ripple::SF_UINT160 = typedef TypedField<STBitString<160> >

Definition at line 355 of file SField.h.

◆ SF_UINT192

using ripple::SF_UINT192 = typedef TypedField<STBitString<192> >

Definition at line 356 of file SField.h.

◆ SF_UINT256

using ripple::SF_UINT256 = typedef TypedField<STBitString<256> >

Definition at line 357 of file SField.h.

◆ SF_UINT384

using ripple::SF_UINT384 = typedef TypedField<STBitString<384> >

Definition at line 358 of file SField.h.

◆ SF_UINT512

using ripple::SF_UINT512 = typedef TypedField<STBitString<512> >

Definition at line 359 of file SField.h.

◆ SF_INT32

Definition at line 361 of file SField.h.

◆ SF_INT64

Definition at line 362 of file SField.h.

◆ SF_ACCOUNT

Definition at line 364 of file SField.h.

◆ SF_AMOUNT

Definition at line 365 of file SField.h.

◆ SF_ISSUE

Definition at line 366 of file SField.h.

◆ SF_CURRENCY

Definition at line 367 of file SField.h.

◆ SF_NUMBER

Definition at line 368 of file SField.h.

◆ SF_VL

using ripple::SF_VL = typedef TypedField<STBlob>

Definition at line 369 of file SField.h.

◆ SF_VECTOR256

Definition at line 370 of file SField.h.

◆ SF_XCHAIN_BRIDGE

Definition at line 371 of file SField.h.

◆ STUInt128

using ripple::STUInt128 = typedef STBitString<128>

Definition at line 85 of file STBitString.h.

◆ STUInt160

using ripple::STUInt160 = typedef STBitString<160>

Definition at line 86 of file STBitString.h.

◆ STUInt192

using ripple::STUInt192 = typedef STBitString<192>

Definition at line 87 of file STBitString.h.

◆ STUInt256

using ripple::STUInt256 = typedef STBitString<256>

Definition at line 88 of file STBitString.h.

◆ STUInt8

using ripple::STUInt8 = typedef STInteger<unsigned char>

Definition at line 79 of file STInteger.h.

◆ STUInt16

Definition at line 80 of file STInteger.h.

◆ STUInt32

Definition at line 81 of file STInteger.h.

◆ STUInt64

Definition at line 82 of file STInteger.h.

◆ STInt32

Definition at line 84 of file STInteger.h.

◆ SLE

Definition at line 102 of file STLedgerEntry.h.

◆ TERUnderlyingType

using ripple::TERUnderlyingType = typedef int

Definition at line 38 of file TER.h.

◆ NotTEC

Definition at line 609 of file TER.h.

◆ TER

using ripple::TER = typedef TERSubset<CanCvtToTER>

Definition at line 649 of file TER.h.

◆ B58Result

template<class T >
using ripple::B58Result = typedef Expected<T, std::error_code>

Definition at line 36 of file tokens.h.

◆ Directory

Directory is an index into the directory of offer books.

The last 64 bits of this are the quality.

Definition at line 53 of file UintTypes.h.

◆ Currency

Currency is a hash representing a specific currency.

Definition at line 56 of file UintTypes.h.

◆ NodeID

NodeID is a 160-bit hash representing one node.

Definition at line 59 of file UintTypes.h.

◆ MPTID

using ripple::MPTID = typedef base_uint<192>

MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence (big endian) and a 160-bit account.

Definition at line 64 of file UintTypes.h.

◆ Domain

using ripple::Domain = typedef base_uint<256>

Domain is a 256-bit hash representing a specific domain.

Definition at line 67 of file UintTypes.h.

◆ FeeLevel

template<class T >
using ripple::FeeLevel = typedef unit::ValueUnit<unit::feelevelTag, T>

Definition at line 450 of file Units.h.

◆ FeeLevel64

Definition at line 451 of file Units.h.

◆ FeeLevelDouble

using ripple::FeeLevelDouble = typedef FeeLevel<double>

Definition at line 452 of file Units.h.

◆ Bips

template<class T >
using ripple::Bips = typedef unit::ValueUnit<unit::BipsTag, T>

Definition at line 456 of file Units.h.

◆ Bips16

using ripple::Bips16 = typedef Bips<std::uint16_t>

Definition at line 457 of file Units.h.

◆ Bips32

using ripple::Bips32 = typedef Bips<std::uint32_t>

Definition at line 458 of file Units.h.

◆ TenthBips

template<class T >
using ripple::TenthBips = typedef unit::ValueUnit<unit::TenthBipsTag, T>

Definition at line 460 of file Units.h.

◆ TenthBips16

Definition at line 461 of file Units.h.

◆ TenthBips32

Definition at line 462 of file Units.h.

◆ Endpoints

using ripple::Endpoints = typedef std::unordered_map<std::string, boost::asio::ip::tcp::endpoint>

Definition at line 40 of file ServerImpl.h.

◆ http_request_type

typedef boost::beast::http::request< boost::beast::http::dynamic_body > ripple::http_request_type

Definition at line 32 of file Handoff.h.

◆ http_response_type

typedef boost::beast::http::response< boost::beast::http::dynamic_body > ripple::http_response_type

Definition at line 35 of file Handoff.h.

◆ FullBelowCache

Definition at line 149 of file FullBelowCache.h.

◆ TreeNodeCache

Definition at line 29 of file TreeNodeCache.h.

◆ const_iterator

Definition at line 24 of file Dir.cpp.

◆ sha256_t

Definition at line 164 of file hardened_hash_test.cpp.

◆ RCLValidations

Alias for RCL-specific instantiation of generic Validations.

Definition at line 241 of file RCLValidations.h.

◆ CachedLedger

A ledger wrapped in a CachedView.

Definition at line 424 of file Ledger.h.

◆ OrderedTxs

Definition at line 46 of file OpenLedger.h.

◆ NodeCache

Definition at line 106 of file Application.h.

◆ CheckCancel

Definition at line 46 of file CancelCheck.h.

◆ OfferCancel

Definition at line 48 of file CancelOffer.h.

◆ CheckCash

using ripple::CheckCash = typedef CashCheck

Definition at line 46 of file CashCheck.h.

◆ EnableAmendment

Definition at line 64 of file Change.h.

◆ SetFee

using ripple::SetFee = typedef Change

Definition at line 65 of file Change.h.

◆ UNLModify

using ripple::UNLModify = typedef Change

Definition at line 66 of file Change.h.

◆ CheckCreate

Definition at line 46 of file CreateCheck.h.

◆ OfferCreate

Definition at line 98 of file CreateOffer.h.

◆ TicketCreate

Definition at line 85 of file CreateTicket.h.

◆ AccountDelete

Definition at line 52 of file DeleteAccount.h.

◆ OracleDelete

Definition at line 62 of file DeleteOracle.h.

◆ InvariantChecks

Definition at line 807 of file InvariantCheck.h.

◆ Offer

using ripple::Offer = typedef TOffer<>

Definition at line 195 of file Offer.h.

◆ PaymentChannelCreate

Definition at line 49 of file src/xrpld/app/tx/detail/PayChan.h.

◆ PaymentChannelFund

Definition at line 72 of file src/xrpld/app/tx/detail/PayChan.h.

◆ PaymentChannelClaim

Definition at line 101 of file src/xrpld/app/tx/detail/PayChan.h.

◆ AccountSet

using ripple::AccountSet = typedef SetAccount

Definition at line 57 of file SetAccount.h.

◆ OracleSet

using ripple::OracleSet = typedef SetOracle

Definition at line 55 of file SetOracle.h.

◆ SignerListSet

Definition at line 99 of file SetSignerList.h.

◆ TrustSet

using ripple::TrustSet = typedef SetTrust

Definition at line 54 of file SetTrust.h.

◆ XChainModifyBridge

Definition at line 74 of file XChainBridge.h.

◆ XChainAccountCreateCommit

Definition at line 257 of file XChainBridge.h.

◆ semaphore

Definition at line 107 of file semaphore.h.

◆ JobCounter

using ripple::JobCounter = typedef ClosureCounter<void>

Definition at line 152 of file Job.h.

◆ socket_type

using ripple::socket_type = typedef boost::beast::tcp_stream

Definition at line 41 of file Handshake.h.

◆ stream_type

using ripple::stream_type = typedef boost::beast::ssl_stream<socket_type>

Definition at line 42 of file Handshake.h.

◆ request_type

using ripple::request_type = typedef boost::beast::http::request<boost::beast::http::empty_body>

Definition at line 43 of file Handshake.h.

◆ ProtocolVersion

Represents a particular version of the peer-to-peer protocol.

The protocol is represented as two pairs of 16-bit integers; a major and a minor.

Definition at line 38 of file ProtocolVersion.h.

◆ TxnsData

Definition at line 43 of file AccountTx.cpp.

◆ TxnsDataBinary

Definition at line 44 of file AccountTx.cpp.

◆ TxnDataBinary

Definition at line 45 of file AccountTx.cpp.

◆ AccountTxArgs

Definition at line 46 of file AccountTx.cpp.

◆ AccountTxResult

Definition at line 47 of file AccountTx.cpp.

◆ LedgerShortcut

Definition at line 49 of file AccountTx.cpp.

◆ LedgerSpecifier

Definition at line 50 of file AccountTx.cpp.

◆ Prices

using ripple::Prices = typedef bimap< multiset_of<std::uint32_t, std::greater<std::uint32_t> >, multiset_of<STAmount> >

Definition at line 37 of file GetAggregatePrice.cpp.

◆ FunctionType

Definition at line 684 of file LedgerEntry.cpp.

Enumeration Type Documentation

◆ ReleaseStrongRefAction

enum class ripple::ReleaseStrongRefAction
strong

Action to perform when releasing a strong pointer.

noop: Do nothing. For example, a noop action will occur when a count is decremented to a non-zero value.

partialDestroy: Run the partialDestructor. This action will happen when a strong count is decremented to zero and the weak count is non-zero.

destroy: Run the destructor. This action will occur when either the strong count or weak count is decremented and the other count is also zero.

Enumerator
noop 
partialDestroy 
destroy 

Definition at line 41 of file IntrusiveRefCounts.h.

◆ ReleaseWeakRefAction

enum class ripple::ReleaseWeakRefAction
strong

Action to perform when releasing a weak pointer.

noop: Do nothing. For example, a noop action will occur when a count is decremented to a non-zero value.

destroy: Run the destructor. This action will occur when either the strong count or weak count is decremented and the other count is also zero.

Enumerator
noop 
destroy 

Definition at line 51 of file IntrusiveRefCounts.h.

◆ LogSeverity

Enumerator
lsINVALID 
lsTRACE 
lsDEBUG 
lsINFO 
lsWARNING 
lsERROR 
lsFATAL 

Definition at line 38 of file Log.h.

◆ ApplyFlags

Enumerator
tapNONE 
tapFAIL_HARD 
tapRETRY 
tapUNLIMITED 
tapBATCH 
tapDRY_RUN 

Definition at line 30 of file ApplyView.h.

◆ WaiveTransferFee

enum class ripple::WaiveTransferFee : bool
strong
Enumerator
No 
Yes 

Definition at line 43 of file View.h.

◆ SkipEntry

enum class ripple::SkipEntry : bool
strong
Enumerator
No 
Yes 

Definition at line 44 of file View.h.

◆ FreezeHandling

Controls the treatment of frozen account balances.

Enumerator
fhIGNORE_FREEZE 
fhZERO_IF_FROZEN 

Definition at line 77 of file View.h.

◆ AuthHandling

Controls the treatment of unauthorized MPT balances.

Enumerator
ahIGNORE_AUTH 
ahZERO_IF_UNAUTHORIZED 

Definition at line 80 of file View.h.

◆ AuthType

enum class ripple::AuthType
strong
Enumerator
StrongAuth 
WeakAuth 
Legacy 

Definition at line 786 of file View.h.

◆ TruncateShares

enum class ripple::TruncateShares : bool
strong
Enumerator
no 
yes 

Definition at line 949 of file View.h.

◆ NodeObjectType

The types of node objects.

Enumerator
hotUNKNOWN 
hotLEDGER 
hotACCOUNT_NODE 
hotTRANSACTION_NODE 
hotDUMMY 

Definition at line 32 of file NodeObject.h.

◆ TokenCodecErrc

enum class ripple::TokenCodecErrc
strong
Enumerator
success 
inputTooLarge 
inputTooSmall 
badB58Character 
outputTooSmall 
mismatchedTokenType 
mismatchedChecksum 
invalidEncodingChar 
overflowAdd 
unknown 

Definition at line 26 of file token_errors.h.

◆ error_code_i

Enumerator
rpcUNKNOWN 
rpcSUCCESS 
rpcBAD_SYNTAX 
rpcJSON_RPC 
rpcFORBIDDEN 
rpcWRONG_NETWORK 
rpcNO_PERMISSION 
rpcNO_EVENTS 
rpcTOO_BUSY 
rpcSLOW_DOWN 
rpcHIGH_FEE 
rpcNOT_ENABLED 
rpcNOT_READY 
rpcAMENDMENT_BLOCKED 
rpcNO_CLOSED 
rpcNO_CURRENT 
rpcNO_NETWORK 
rpcNOT_SYNCED 
rpcACT_NOT_FOUND 
rpcLGR_NOT_FOUND 
rpcLGR_NOT_VALIDATED 
rpcMASTER_DISABLED 
rpcTXN_NOT_FOUND 
rpcINVALID_HOTWALLET 
rpcINVALID_PARAMS 
rpcUNKNOWN_COMMAND 
rpcNO_PF_REQUEST 
rpcACT_MALFORMED 
rpcALREADY_MULTISIG 
rpcALREADY_SINGLE_SIG 
rpcBAD_FEATURE 
rpcBAD_ISSUER 
rpcBAD_MARKET 
rpcBAD_SECRET 
rpcBAD_SEED 
rpcCHANNEL_MALFORMED 
rpcCHANNEL_AMT_MALFORMED 
rpcCOMMAND_MISSING 
rpcDST_ACT_MALFORMED 
rpcDST_ACT_MISSING 
rpcDST_ACT_NOT_FOUND 
rpcDST_AMT_MALFORMED 
rpcDST_AMT_MISSING 
rpcDST_ISR_MALFORMED 
rpcLGR_IDXS_INVALID 
rpcLGR_IDX_MALFORMED 
rpcPUBLIC_MALFORMED 
rpcSIGNING_MALFORMED 
rpcSENDMAX_MALFORMED 
rpcSRC_ACT_MALFORMED 
rpcSRC_ACT_MISSING 
rpcSRC_ACT_NOT_FOUND 
rpcDELEGATE_ACT_NOT_FOUND 
rpcSRC_CUR_MALFORMED 
rpcSRC_ISR_MALFORMED 
rpcSTREAM_MALFORMED 
rpcATX_DEPRECATED 
rpcINTERNAL 
rpcNOT_IMPL 
rpcNOT_SUPPORTED 
rpcBAD_KEY_TYPE 
rpcDB_DESERIALIZATION 
rpcEXCESSIVE_LGR_RANGE 
rpcINVALID_LGR_RANGE 
rpcEXPIRED_VALIDATOR_LIST 
rpcREPORTING_UNSUPPORTED 
rpcOBJECT_NOT_FOUND 
rpcISSUE_MALFORMED 
rpcORACLE_MALFORMED 
rpcBAD_CREDENTIALS 
rpcTX_SIGNED 
rpcDOMAIN_MALFORMED 
rpcENTRY_NOT_FOUND 
rpcUNEXPECTED_LEDGER_TYPE 
rpcLAST 

Definition at line 40 of file ErrorCodes.h.

◆ warning_code_i

Codes returned in the warnings array of certain RPC commands.

These values need to remain stable.

Enumerator
warnRPC_UNSUPPORTED_MAJORITY 
warnRPC_AMENDMENT_BLOCKED 
warnRPC_EXPIRED_VALIDATOR_LIST 
warnRPC_FIELDS_DEPRECATED 

Definition at line 172 of file ErrorCodes.h.

◆ VoteBehavior

enum class ripple::VoteBehavior : int
strong
Enumerator
Obsolete 
DefaultNo 
DefaultYes 

Definition at line 87 of file Feature.h.

◆ AmendmentSupport

enum class ripple::AmendmentSupport : int
strong
Enumerator
Retired 
Supported 
Unsupported 

Definition at line 88 of file Feature.h.

◆ HashPrefix

enum class ripple::HashPrefix : std::uint32_t
strong

Prefix for hashing functions.

These prefixes are inserted before the source material used to generate various hashes. This is done to put each hash in its own "space." This way, two different types of objects with the same binary data will produce different hashes.

Each prefix is a 4-byte value with the last byte set to zero and the first three bytes formed from the ASCII equivalent of some arbitrary string. For example "TXN".

Note
Hash prefixes are part of the protocol; you cannot, arbitrarily, change the type or the value of any of these without causing breakage.
Enumerator
transactionID 

transaction plus signature to give transaction ID

txNode 

transaction plus metadata

leafNode 

account state

innerNode 

inner node in V1 tree

ledgerMaster 

ledger master data for signing

txSign 

inner transaction to sign

txMultiSign 

inner transaction to multi-sign

validation 

validation for signing

proposal 

proposal for signing

manifest 

Manifest.

paymentChannelClaim 

Payment Channel Claim.

credential 

Credentials signature.

batch 

Batch.

Definition at line 55 of file HashPrefix.h.

◆ KeyType

enum class ripple::KeyType
strong
Enumerator
secp256k1 
ed25519 

Definition at line 28 of file KeyType.h.

◆ LedgerEntryType

Identifiers for on-ledger objects.

Each ledger object requires a unique type identifier, which is stored within the object itself; this makes it possible to iterate the entire ledger and determine each object's type and verify that the object you retrieved from a given hash matches the expected type.

Warning
Since these values are stored inside objects stored on the ledger they are part of the protocol. Changing them should be avoided because without special handling, this will result in a hard fork.
Note
Values outside this range may be used internally by the code for various purposes, but attempting to use such values to identify on-ledger objects will results in an invariant failure.
When retiring types, the specific values should not be removed but should be marked as [[deprecated]]. This is to avoid accidental reuse of identifiers.
Enumerator
ltANY 

A special type, matching any ledger entry type.

The value does not represent a concrete type, but rather is used in
contexts where the specific type of a ledger object is unimportant,
unknown or unavailable.

Objects with this special type cannot be created or stored on the
ledger.

\sa keylet::unchecked
ltCHILD 

A special type, matching any ledger type except directory nodes.

The value does not represent a concrete type, but rather is used in
contexts where the ledger object must not be a directory node but
its specific type is otherwise unimportant, unknown or unavailable.

Objects with this special type cannot be created or stored on the
ledger.

\sa keylet::child
ltNICKNAME 

A legacy, deprecated type.

\deprecated **This object type is not supported and should not be used.**
            Support for this type of object was never implemented.
            No objects of this type were ever created.
ltCONTRACT 

A legacy, deprecated type.

\deprecated **This object type is not supported and should not be used.**
            Support for this type of object was never implemented.
            No objects of this type were ever created.
ltGENERATOR_MAP 

A legacy, deprecated type.

\deprecated **This object type is not supported and should not be used.**
            Support for this type of object was never implemented.
            No objects of this type were ever created.

Definition at line 53 of file LedgerFormats.h.

◆ LedgerSpecificFlags

Enumerator
lsfPasswordSpent 
lsfRequireDestTag 
lsfRequireAuth 
lsfDisallowXRP 
lsfDisableMaster 
lsfNoFreeze 
lsfGlobalFreeze 
lsfDefaultRipple 
lsfDepositAuth 
lsfDisallowIncomingNFTokenOffer 
lsfDisallowIncomingCheck 
lsfDisallowIncomingPayChan 
lsfDisallowIncomingTrustline 
lsfAllowTrustLineLocking 
lsfAllowTrustLineClawback 
lsfPassive 
lsfSell 
lsfHybrid 
lsfLowReserve 
lsfHighReserve 
lsfLowAuth 
lsfHighAuth 
lsfLowNoRipple 
lsfHighNoRipple 
lsfLowFreeze 
lsfHighFreeze 
lsfLowDeepFreeze 
lsfHighDeepFreeze 
lsfAMMNode 
lsfOneOwnerCount 
lsfNFTokenBuyOffers 
lsfNFTokenSellOffers 
lsfSellNFToken 
lsfMPTLocked 
lsfMPTCanLock 
lsfMPTRequireAuth 
lsfMPTCanEscrow 
lsfMPTCanTrade 
lsfMPTCanTransfer 
lsfMPTCanClawback 
lsmfMPTCanMutateCanLock 
lsmfMPTCanMutateRequireAuth 
lsmfMPTCanMutateCanEscrow 
lsmfMPTCanMutateCanTrade 
lsmfMPTCanMutateCanTransfer 
lsmfMPTCanMutateCanClawback 
lsmfMPTCanMutateMetadata 
lsmfMPTCanMutateTransferFee 
lsfMPTAuthorized 
lsfAccepted 
lsfVaultPrivate 

Definition at line 123 of file LedgerFormats.h.

◆ GranularPermissionType

We have both transaction type permissions and granular type permissions.

Since we will reuse the TransactionFormats to parse the Transaction Permissions, only the GranularPermissionType is defined here. To prevent conflicts with TxType, the GranularPermissionType is always set to a value greater than the maximum value of uint16.

Definition at line 39 of file Permissions.h.

◆ Delegation

Enumerator
delegatable 
notDelegatable 

Definition at line 51 of file Permissions.h.

◆ ECDSACanonicality

enum class ripple::ECDSACanonicality
strong
Enumerator
canonical 
fullyCanonical 

Definition at line 194 of file PublicKey.h.

◆ SerializedTypeID

Enumerator
XMACRO 

Definition at line 110 of file SField.h.

◆ SOEStyle

Kind of element in each entry of an SOTemplate.

Enumerator
soeINVALID 
soeREQUIRED 
soeOPTIONAL 
soeDEFAULT 

Definition at line 33 of file SOTemplate.h.

◆ SOETxMPTIssue

Amount fields that can support MPT.

Enumerator
soeMPTNone 
soeMPTSupported 
soeMPTNotSupported 

Definition at line 43 of file SOTemplate.h.

◆ TxnSql

enum ripple::TxnSql : char
Enumerator
txnSqlNew 
txnSqlConflict 
txnSqlHeld 
txnSqlValidated 
txnSqlIncluded 
txnSqlUnknown 

Definition at line 38 of file STTx.h.

◆ TELcodes

Enumerator
telLOCAL_ERROR 
telBAD_DOMAIN 
telBAD_PATH_COUNT 
telBAD_PUBLIC_KEY 
telFAILED_PROCESSING 
telINSUF_FEE_P 
telNO_DST_PARTIAL 
telCAN_NOT_QUEUE 
telCAN_NOT_QUEUE_BALANCE 
telCAN_NOT_QUEUE_BLOCKS 
telCAN_NOT_QUEUE_BLOCKED 
telCAN_NOT_QUEUE_FEE 
telCAN_NOT_QUEUE_FULL 
telWRONG_NETWORK 
telREQUIRES_NETWORK_ID 
telNETWORK_ID_MAKES_TX_NON_CANONICAL 
telENV_RPC_FAILED 

Definition at line 42 of file TER.h.

◆ TEMcodes

Enumerator
temMALFORMED 
temBAD_AMOUNT 
temBAD_CURRENCY 
temBAD_EXPIRATION 
temBAD_FEE 
temBAD_ISSUER 
temBAD_LIMIT 
temBAD_OFFER 
temBAD_PATH 
temBAD_PATH_LOOP 
temBAD_REGKEY 
temBAD_SEND_XRP_LIMIT 
temBAD_SEND_XRP_MAX 
temBAD_SEND_XRP_NO_DIRECT 
temBAD_SEND_XRP_PARTIAL 
temBAD_SEND_XRP_PATHS 
temBAD_SEQUENCE 
temBAD_SIGNATURE 
temBAD_SRC_ACCOUNT 
temBAD_TRANSFER_RATE 
temDST_IS_SRC 
temDST_NEEDED 
temINVALID 
temINVALID_FLAG 
temREDUNDANT 
temRIPPLE_EMPTY 
temDISABLED 
temBAD_SIGNER 
temBAD_QUORUM 
temBAD_WEIGHT 
temBAD_TICK_SIZE 
temINVALID_ACCOUNT_ID 
temCANNOT_PREAUTH_SELF 
temINVALID_COUNT 
temUNCERTAIN 
temUNKNOWN 
temSEQ_AND_TICKET 
temBAD_NFTOKEN_TRANSFER_FEE 
temBAD_AMM_TOKENS 
temXCHAIN_EQUAL_DOOR_ACCOUNTS 
temXCHAIN_BAD_PROOF 
temXCHAIN_BRIDGE_BAD_ISSUES 
temXCHAIN_BRIDGE_NONDOOR_OWNER 
temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT 
temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT 
temEMPTY_DID 
temARRAY_EMPTY 
temARRAY_TOO_LARGE 
temBAD_TRANSFER_FEE 
temINVALID_INNER_BATCH 

Definition at line 73 of file TER.h.

◆ TEFcodes

Enumerator
tefFAILURE 
tefALREADY 
tefBAD_ADD_AUTH 
tefBAD_AUTH 
tefBAD_LEDGER 
tefCREATED 
tefEXCEPTION 
tefINTERNAL 
tefNO_AUTH_REQUIRED 
tefPAST_SEQ 
tefWRONG_PRIOR 
tefMASTER_DISABLED 
tefMAX_LEDGER 
tefBAD_SIGNATURE 
tefBAD_QUORUM 
tefNOT_MULTI_SIGNING 
tefBAD_AUTH_MASTER 
tefINVARIANT_FAILED 
tefTOO_BIG 
tefNO_TICKET 
tefNFTOKEN_IS_NOT_TRANSFERABLE 
tefINVALID_LEDGER_FIX_TYPE 

Definition at line 148 of file TER.h.

◆ TERcodes

Enumerator
terRETRY 
terFUNDS_SPENT 
terINSUF_FEE_B 
terNO_ACCOUNT 
terNO_AUTH 
terNO_LINE 
terOWNERS 
terPRE_SEQ 
terLAST 
terNO_RIPPLE 
terQUEUED 
terPRE_TICKET 
terNO_AMM 
terADDRESS_COLLISION 
terNO_DELEGATE_PERMISSION 

Definition at line 192 of file TER.h.

◆ TEScodes

Enumerator
tesSUCCESS 

Definition at line 235 of file TER.h.

◆ TECcodes

Enumerator
tecCLAIM 
tecPATH_PARTIAL 
tecUNFUNDED_ADD 
tecUNFUNDED_OFFER 
tecUNFUNDED_PAYMENT 
tecFAILED_PROCESSING 
tecDIR_FULL 
tecINSUF_RESERVE_LINE 
tecINSUF_RESERVE_OFFER 
tecNO_DST 
tecNO_DST_INSUF_XRP 
tecNO_LINE_INSUF_RESERVE 
tecNO_LINE_REDUNDANT 
tecPATH_DRY 
tecUNFUNDED 
tecNO_ALTERNATIVE_KEY 
tecNO_REGULAR_KEY 
tecOWNERS 
tecNO_ISSUER 
tecNO_AUTH 
tecNO_LINE 
tecINSUFF_FEE 
tecFROZEN 
tecNO_TARGET 
tecNO_PERMISSION 
tecNO_ENTRY 
tecINSUFFICIENT_RESERVE 
tecNEED_MASTER_KEY 
tecDST_TAG_NEEDED 
tecINTERNAL 
tecOVERSIZE 
tecCRYPTOCONDITION_ERROR 
tecINVARIANT_FAILED 
tecEXPIRED 
tecDUPLICATE 
tecKILLED 
tecHAS_OBLIGATIONS 
tecTOO_SOON 
tecHOOK_REJECTED 
tecMAX_SEQUENCE_REACHED 
tecNO_SUITABLE_NFTOKEN_PAGE 
tecNFTOKEN_BUY_SELL_MISMATCH 
tecNFTOKEN_OFFER_TYPE_MISMATCH 
tecCANT_ACCEPT_OWN_NFTOKEN_OFFER 
tecINSUFFICIENT_FUNDS 
tecOBJECT_NOT_FOUND 
tecINSUFFICIENT_PAYMENT 
tecUNFUNDED_AMM 
tecAMM_BALANCE 
tecAMM_FAILED 
tecAMM_INVALID_TOKENS 
tecAMM_EMPTY 
tecAMM_NOT_EMPTY 
tecAMM_ACCOUNT 
tecINCOMPLETE 
tecXCHAIN_BAD_TRANSFER_ISSUE 
tecXCHAIN_NO_CLAIM_ID 
tecXCHAIN_BAD_CLAIM_ID 
tecXCHAIN_CLAIM_NO_QUORUM 
tecXCHAIN_PROOF_UNKNOWN_KEY 
tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE 
tecXCHAIN_WRONG_CHAIN 
tecXCHAIN_REWARD_MISMATCH 
tecXCHAIN_NO_SIGNERS_LIST 
tecXCHAIN_SENDING_ACCOUNT_MISMATCH 
tecXCHAIN_INSUFF_CREATE_AMOUNT 
tecXCHAIN_ACCOUNT_CREATE_PAST 
tecXCHAIN_ACCOUNT_CREATE_TOO_MANY 
tecXCHAIN_PAYMENT_FAILED 
tecXCHAIN_SELF_COMMIT 
tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR 
tecXCHAIN_CREATE_ACCOUNT_DISABLED 
tecEMPTY_DID 
tecINVALID_UPDATE_TIME 
tecTOKEN_PAIR_NOT_FOUND 
tecARRAY_EMPTY 
tecARRAY_TOO_LARGE 
tecLOCKED 
tecBAD_CREDENTIALS 
tecWRONG_ASSET 
tecLIMIT_EXCEEDED 
tecPSEUDO_ACCOUNT 
tecPRECISION_LOSS 
tecNO_DELEGATE_PERMISSION 

Definition at line 250 of file TER.h.

◆ TokenType

enum class ripple::TokenType : std::uint8_t
strong
Enumerator
None 
NodePublic 
NodePrivate 
AccountID 
AccountPublic 
AccountSecret 
FamilyGenerator 
FamilySeed 

Definition at line 38 of file tokens.h.

◆ TxType

Transaction type identifiers.

These are part of the binary message format. Transaction type identifiers

Each ledger object requires a unique type identifier, which is stored within the object itself; this makes it possible to iterate the entire ledger and determine each object's type and verify that the object you retrieved from a given hash matches the expected type.

Warning
Since these values are included in transactions, which are signed objects, and used by the code to determine the type of transaction being invoked, they are part of the protocol. Changing them should be avoided because without special handling, this will result in a hard fork.
Note
When retiring types, the specific values should not be removed but should be marked as [[deprecated]]. This is to avoid accidental reuse of identifiers.
Enumerator
ttNICKNAME_SET 

This transaction type is deprecated; it is retained for historical purposes.

ttCONTRACT 

This transaction type is deprecated; it is retained for historical purposes.

ttSPINAL_TAP 

This identifier was never used, but the slot is reserved for historical purposes.

ttHOOK_SET 

This transaction type installs a hook.

Definition at line 56 of file TxFormats.h.

◆ AttestationMatch

enum class ripple::AttestationMatch
strong
Enumerator
nonDstMismatch 
matchExceptDst 
match 

Definition at line 256 of file XChainAttestations.h.

◆ SHAMapState

enum class ripple::SHAMapState
strong

Describes the current state of a given SHAMap.

Enumerator
Modifying 

The map is in flux and objects can be added and removed.

Example: map underlying the open ledger.
Immutable 

The map is set in stone and cannot be changed.

Example: a map underlying a given closed ledger.
Synching 

The map's hash is fixed but valid nodes may be missing and can be added.

Example: a map that's syncing a given peer's closing ledger.
Invalid 

The map is known to not be valid.

Example: usually synching a corrupt ledger.

Definition at line 47 of file SHAMap.h.

◆ SHAMapType

enum class ripple::SHAMapType
strong
Enumerator
TRANSACTION 
STATE 
FREE 

Definition at line 33 of file SHAMapMissingNode.h.

◆ SHAMapNodeType

enum class ripple::SHAMapNodeType
strong
Enumerator
tnINNER 
tnTRANSACTION_NM 
tnTRANSACTION_MD 
tnACCOUNT_STATE 

Definition at line 43 of file SHAMapTreeNode.h.

◆ LedgerNameSpace

Type-specific prefix for calculating ledger indices.

The identifier for a given object within the ledger is calculated based on some object-specific parameters. To ensure that different types of objects have different indices, even if they happen to use the same set of parameters, we use "tagged hashing" by adding a type-specific prefix.

Note
These values are part of the protocol and CANNOT be arbitrarily changed. If they were, on-ledger objects may no longer be able to be located or addressed.

Additions to this list are OK, but changing existing entries to assign them a different values should never be needed.

Entries that are removed should be moved to the bottom of the enum and marked as [[deprecated]] to prevent accidental reuse.

Enumerator
ACCOUNT 
DIR_NODE 
TRUST_LINE 
OFFER 
OWNER_DIR 
BOOK_DIR 
SKIP_LIST 
ESCROW 
AMENDMENTS 
FEE_SETTINGS 
TICKET 
SIGNER_LIST 
XRP_PAYMENT_CHANNEL 
CHECK 
DEPOSIT_PREAUTH 
DEPOSIT_PREAUTH_CREDENTIALS 
NEGATIVE_UNL 
NFTOKEN_OFFER 
NFTOKEN_BUY_OFFERS 
NFTOKEN_SELL_OFFERS 
AMM 
BRIDGE 
XCHAIN_CLAIM_ID 
XCHAIN_CREATE_ACCOUNT_CLAIM_ID 
DID 
ORACLE 
MPTOKEN_ISSUANCE 
MPTOKEN 
CREDENTIAL 
PERMISSIONED_DOMAIN 
DELEGATE 
VAULT 
CONTRACT 
GENERATOR 
NICKNAME 

Definition at line 66 of file Indexes.cpp.

◆ BypassAccept

enum class ripple::BypassAccept : bool
strong
Enumerator
no 
yes 

Definition at line 37 of file RCLValidations.h.

◆ anonymous enum

anonymous enum
Enumerator
peerCountStart 
peerCountAdd 
ledgerTimeoutRetriesMax 
ledgerBecomeAggressiveThreshold 
missingNodesFind 
reqNodesReply 
reqNodes 

Definition at line 44 of file InboundLedger.cpp.

◆ anonymous enum

anonymous enum
Enumerator
startPeers 
setKeepRounds 

Definition at line 36 of file InboundTransactions.cpp.

◆ anonymous enum

anonymous enum
Enumerator
NORM_TIMEOUTS 
MAX_TIMEOUTS 

Definition at line 36 of file TransactionAcquire.cpp.

◆ IsDeposit

enum class ripple::IsDeposit : bool
strong
Enumerator
No 
Yes 

Definition at line 51 of file AMMHelpers.h.

◆ HashRouterFlags

Enumerator
UNDEFINED 
BAD 
SAVED 
HELD 
TRUSTED 
PRIVATE1 
PRIVATE2 
PRIVATE3 
PRIVATE4 
PRIVATE5 
PRIVATE6 

Definition at line 34 of file HashRouter.h.

◆ ManifestDisposition

enum class ripple::ManifestDisposition
strong
Enumerator
accepted 

Manifest is valid.

stale 

Sequence is too old.

badMasterKey 

The master key is not acceptable to us.

badEphemeralKey 

The ephemeral key is not acceptable to us.

invalid 

Timely, but invalid signature.

Definition at line 215 of file Manifest.h.

◆ OperatingMode

enum class ripple::OperatingMode
strong

Specifies the mode under which the server believes it's operating.

This has implications about how the server processes transactions and how it responds to requests (e.g. account balance request).

Note
Other code relies on the numerical values of these constants; do not change them without verifying each use and ensuring that it is not a breaking change.
Enumerator
DISCONNECTED 

not ready to process requests

CONNECTED 

convinced we are talking to the network

SYNCING 

fallen slightly behind

TRACKING 

convinced we agree with the network

FULL 

we have the ledger and can even validate

Definition at line 68 of file NetworkOPs.h.

◆ TransStatus

Enumerator
NEW 
INVALID 
INCLUDED 
CONFLICTED 
COMMITTED 
HELD 
REMOVED 
OBSOLETE 
INCOMPLETE 

Definition at line 46 of file Transaction.h.

◆ TxSearched

enum class ripple::TxSearched
strong
Enumerator
all 
some 
unknown 

Definition at line 58 of file Transaction.h.

◆ ListDisposition

enum class ripple::ListDisposition
strong
Enumerator
accepted 

List is valid.

expired 

List is expired, but has the largest non-pending sequence seen so far.

pending 

List will be valid in the future.

same_sequence 

Same sequence as current list.

known_sequence 

Future sequence already seen.

stale 

Trusted publisher key, but seq is too old.

untrusted 

List signed by untrusted publisher key.

unsupported_version 

List version is not supported.

invalid 

Invalid format or signature.

Definition at line 55 of file ValidatorList.h.

◆ PublisherStatus

enum class ripple::PublisherStatus
strong
Enumerator
available 
expired 
unavailable 
revoked 

Definition at line 87 of file ValidatorList.h.

◆ DebtDirection

enum class ripple::DebtDirection
strong
Enumerator
issues 
redeems 

Definition at line 42 of file Steps.h.

◆ QualityDirection

enum class ripple::QualityDirection
strong
Enumerator
in 
out 

Definition at line 43 of file Steps.h.

◆ StrandDirection

enum class ripple::StrandDirection
strong
Enumerator
forward 
reverse 

Definition at line 44 of file Steps.h.

◆ OfferCrossing

Enumerator
no 
yes 
sell 

Definition at line 45 of file Steps.h.

◆ LineDirection

enum class ripple::LineDirection : bool
strong

Describes how an account was found in a path, and how to find the next set of paths.

"Outgoing" is defined as the source account, or an account found via a trustline that has rippling enabled on the account's side. "Incoming" is defined as an account found via a trustline that has rippling disabled on the account's side. Any trust lines for an incoming account that have rippling disabled are unusable in paths.

Enumerator
incoming 
outgoing 

Definition at line 41 of file TrustLine.h.

◆ AmendmentVote

enum class ripple::AmendmentVote : int
strong
Enumerator
obsolete 
up 
down 

Definition at line 150 of file Wallet.h.

◆ Validity

enum class ripple::Validity
strong

Describes the pre-processing validity of a transaction.

See also
checkValidity, forceValidity
Enumerator
SigBad 

Signature is bad. Didn't do local checks.

SigGoodOnly 

Signature is good, but local checks fail.

Valid 

Signature and local checks are good / passed.

Definition at line 41 of file apply.h.

◆ ApplyTransactionResult

enum class ripple::ApplyTransactionResult
strong

Enum class for return value from applyTransaction

See also
applyTransaction
Enumerator
Success 

Applied to this ledger.

Fail 

Should not be retried in this ledger.

Retry 

Should be retried in this ledger.

Definition at line 135 of file apply.h.

◆ WithdrawAll

enum class ripple::WithdrawAll : bool
strong

AMMWithdraw implements AMM withdraw Transactor.

The withdraw transaction is used to remove liquidity from the AMM instance pool, thus redeeming some share of the pools that one owns in the form of LPTokens. If the trader withdraws proportional values of both assets without changing their relative pricing, no trading fee is charged on the transaction. The trader can specify different combination of the fields in the withdrawal. LPTokens - transaction assumes proportional withdrawal of pool assets for the amount of LPTokens. Asset1Out - transaction assumes withdrawal of single asset equivalent to the amount specified in Asset1Out. Asset1Out and Asset2Out - transaction assumes all assets withdrawal with the constraints on the maximum amount of each asset that the trader is willing to withdraw. Asset1Out and LPTokens - transaction assumes withdrawal of single asset specified in Asset1Out proportional to the share represented by the amount of LPTokens. Asset1Out and EPrice - transaction assumes withdrawal of single asset with the following constraints: a. Amount of asset1 if specified (not 0) in Asset1Out specifies the minimum amount of asset1 that the trader is willing to withdraw. b. The effective price of asset traded out does not exceed the amount specified in EPrice. Following updates after a successful transaction: The withdrawn asset, if XRP, is transferred from AMM instance account to the account that initiated the transaction, thus changing the Balance field of each account. The withdrawn asset, if token, is balanced between the AMM instance account and the issuer account. The LPTokens ~ are balanced between the AMM instance account and the account that initiated the transaction. The pool composition is updated.

See also
XLS30d:AMMWithdraw transaction
Enumerator
No 
Yes 

Definition at line 68 of file AMMWithdraw.h.

◆ Privilege

Enumerator
noPriv 
createAcct 
createPseudoAcct 
mustDeleteAcct 
mayDeleteAcct 
overrideFreeze 
changeNFTCounts 
createMPTIssuance 
destroyMPTIssuance 
mustAuthorizeMPT 
mayAuthorizeMPT 
mayDeleteMPT 
mustModifyVault 

Definition at line 68 of file InvariantCheck.cpp.

◆ ConsensusMode

enum class ripple::ConsensusMode
strong

Represents how a node currently participates in Consensus.

A node participates in consensus in varying modes, depending on how the node was configured by its operator and how well it stays in sync with the network during consensus.

\ /
\---> wrongLedger <---/
^
|
|
v
@ wrongLedger
We have the wrong ledger and are attempting to acquire it.
@ proposing
We are normal participant in consensus and propose our position.
@ switchedLedger
We switched ledgers since we started this consensus round but are now running on what we believe is t...
@ observing
We are observing peer positions, but not proposing our position.

We enter the round proposing or observing. If we detect we are working on the wrong prior ledger, we go to wrongLedger and attempt to acquire the right one. Once we acquire the right one, we go to the switchedLedger mode. It is possible we fall behind again and find there is a new better ledger, moving back and forth between wrongLedger and switchLedger as we attempt to catch up.

Enumerator
proposing 

We are normal participant in consensus and propose our position.

observing 

We are observing peer positions, but not proposing our position.

wrongLedger 

We have the wrong ledger and are attempting to acquire it.

switchedLedger 

We switched ledgers since we started this consensus round but are now running on what we believe is the correct ledger.

This mode is as if we entered the round observing, but is used to indicate we did have the wrongLedger at some point.

Definition at line 57 of file ConsensusTypes.h.

◆ ConsensusPhase

enum class ripple::ConsensusPhase
strong

Phases of consensus for a single ledger round.

"close" "accept"
open ------- > establish ---------> accepted
^ | |
|---------------| |
^ "startRound" |
|------------------------------------|
@ open
We haven't closed our ledger yet, but others might have.
@ establish
Establishing consensus by exchanging proposals with our peers.
@ accepted
Manifest is valid.

The typical transition goes from open to establish to accepted and then a call to startRound begins the process anew. However, if a wrong prior ledger is detected and recovered during the establish or accept phase, consensus will internally go back to open (see Consensus::handleWrongLedger).

Enumerator
open 

We haven't closed our ledger yet, but others might have.

establish 

Establishing consensus by exchanging proposals with our peers.

accepted 

We have accepted a new last closed ledger and are waiting on a call to startRound to begin the next consensus round.

No changes to consensus phase occur while in this phase.

Definition at line 105 of file ConsensusTypes.h.

◆ ConsensusState

enum class ripple::ConsensusState
strong

Whether we have or don't have a consensus.

Enumerator
No 

We do not have consensus.

MovedOn 

The network has consensus without us.

Expired 

Consensus time limit has hard-expired.

Yes 

We have consensus along with the network.

Definition at line 188 of file ConsensusTypes.h.

◆ ValStatus

enum class ripple::ValStatus
strong

Status of validation we received.

Enumerator
current 

This was a new validation and was added.

stale 

Not current or was older than current from this node.

badSeq 

A validation violates the increasing seq requirement.

multiple 

Multiple validations by a validator for the same ledger.

conflicting 

Multiple validations by a validator for different ledgers.

Definition at line 169 of file Validations.h.

◆ SizedItem

enum class ripple::SizedItem : std::size_t
strong
Enumerator
sweepInterval 
treeCacheSize 
treeCacheAge 
ledgerSize 
ledgerAge 
ledgerFetch 
hashNodeDBCache 
txnDBCache 
lgrDBCache 
openFinalLimit 
burstSize 
ramSizeGB 
accountIdCacheSize 

Definition at line 44 of file Config.h.

◆ JobType

Enumerator
jtINVALID 
jtPACK 
jtPUBOLDLEDGER 
jtCLIENT 
jtCLIENT_SUBSCRIBE 
jtCLIENT_FEE_CHANGE 
jtCLIENT_CONSENSUS 
jtCLIENT_ACCT_HIST 
jtCLIENT_RPC 
jtCLIENT_WEBSOCKET 
jtRPC 
jtSWEEP 
jtVALIDATION_ut 
jtMANIFEST 
jtUPDATE_PF 
jtTRANSACTION_l 
jtREPLAY_REQ 
jtLEDGER_REQ 
jtPROPOSAL_ut 
jtREPLAY_TASK 
jtTRANSACTION 
jtMISSING_TXN 
jtREQUESTED_TXN 
jtBATCH 
jtLEDGER_DATA 
jtADVANCE 
jtPUBLEDGER 
jtTXN_DATA 
jtWAL 
jtVALIDATION_t 
jtWRITE 
jtACCEPT 
jtPROPOSAL_t 
jtNETOP_CLUSTER 
jtNETOP_TIMER 
jtADMIN 
jtPEER 
jtDISK 
jtTXN_PROC 
jtOB_SETUP 
jtPATH_FIND 
jtHO_READ 
jtHO_WRITE 
jtGENERIC 
jtNS_SYNC_READ 
jtNS_ASYNC_READ 
jtNS_WRITE 

Definition at line 35 of file Job.h.

◆ ProtocolFeature

enum class ripple::ProtocolFeature
strong
Enumerator
ValidatorListPropagation 
ValidatorList2Propagation 
LedgerReplay 

Definition at line 36 of file xrpld/overlay/Peer.h.

◆ Role

enum class ripple::Role
strong

Indicates the level of administrative permission to grant.

IDENTIFIED role has unlimited resources but cannot perform some RPC commands. ADMIN role has unlimited resources and is able to perform all RPC commands.

Enumerator
GUEST 
USER 
IDENTIFIED 
ADMIN 
PROXY 
FORBID 

Definition at line 44 of file Role.h.

Function Documentation

◆ generalized_set_intersection()

template<class InputIter1 , class InputIter2 , class Action , class Comp >
void ripple::generalized_set_intersection ( InputIter1  first1,
InputIter1  last1,
InputIter2  first2,
InputIter2  last2,
Action  action,
Comp  comp 
)

Definition at line 36 of file algorithm.h.

◆ remove_if_intersect_or_match()

template<class FwdIter1 , class InputIter2 , class Pred , class Comp >
FwdIter1 ripple::remove_if_intersect_or_match ( FwdIter1  first1,
FwdIter1  last1,
InputIter2  first2,
InputIter2  last2,
Pred  pred,
Comp  comp 
)

Definition at line 74 of file algorithm.h.

◆ extractTarLz4()

void ripple::extractTarLz4 ( boost::filesystem::path const &  src,
boost::filesystem::path const &  dst 
)

Extract a tar archive compressed with lz4.

Parameters
srcthe path of the archive to be extracted
dstthe directory to extract to
Exceptions
runtime_error

Definition at line 36 of file Archive.cpp.

◆ base64_encode() [1/2]

std::string ripple::base64_encode ( std::uint8_t const *  data,
std::size_t  len 
)

Definition at line 239 of file libxrpl/basics/base64.cpp.

◆ base64_encode() [2/2]

std::string ripple::base64_encode ( std::string const &  s)

Definition at line 69 of file base64.h.

◆ base64_decode()

std::string ripple::base64_decode ( std::string_view  data)

Definition at line 248 of file libxrpl/basics/base64.cpp.

◆ operator<=>() [1/7]

template<std::size_t Bits, class Tag >
constexpr std::strong_ordering ripple::operator<=> ( base_uint< Bits, Tag > const &  lhs,
base_uint< Bits, Tag > const &  rhs 
)
constexpr

Definition at line 562 of file base_uint.h.

◆ operator==() [1/28]

template<std::size_t Bits, typename Tag >
constexpr bool ripple::operator== ( base_uint< Bits, Tag > const &  lhs,
base_uint< Bits, Tag > const &  rhs 
)
constexpr

Definition at line 585 of file base_uint.h.

◆ operator==() [2/28]

template<std::size_t Bits, class Tag >
constexpr bool ripple::operator== ( base_uint< Bits, Tag > const &  a,
std::uint64_t  b 
)
constexpr

Definition at line 593 of file base_uint.h.

◆ operator^()

template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > ripple::operator^ ( base_uint< Bits, Tag > const &  a,
base_uint< Bits, Tag > const &  b 
)
constexpr

Definition at line 601 of file base_uint.h.

◆ operator&() [1/3]

template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > ripple::operator& ( base_uint< Bits, Tag > const &  a,
base_uint< Bits, Tag > const &  b 
)
constexpr

Definition at line 608 of file base_uint.h.

◆ operator|() [1/4]

template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > ripple::operator| ( base_uint< Bits, Tag > const &  a,
base_uint< Bits, Tag > const &  b 
)
constexpr

Definition at line 615 of file base_uint.h.

◆ operator+() [1/3]

template<std::size_t Bits, class Tag >
constexpr base_uint< Bits, Tag > ripple::operator+ ( base_uint< Bits, Tag > const &  a,
base_uint< Bits, Tag > const &  b 
)
constexpr

Definition at line 622 of file base_uint.h.

◆ to_string() [1/29]

template<std::size_t Bits, class Tag >
std::string ripple::to_string ( base_uint< Bits, Tag > const &  a)

Definition at line 630 of file base_uint.h.

◆ to_short_string()

template<std::size_t Bits, class Tag >
std::string ripple::to_short_string ( base_uint< Bits, Tag > const &  a)

Definition at line 637 of file base_uint.h.

◆ operator<<() [1/16]

template<std::size_t Bits, class Tag >
std::ostream & ripple::operator<< ( std::ostream out,
base_uint< Bits, Tag > const &  u 
)

Definition at line 646 of file base_uint.h.

◆ extract() [1/4]

template<>
std::size_t ripple::extract ( uint256 const &  key)

Definition at line 654 of file base_uint.h.

◆ set() [1/5]

template<class T >
bool ripple::set ( T &  target,
std::string const &  name,
Section const &  section 
)

Set a value from a configuration Section If the named value is not found or doesn't parse as a T, the variable is unchanged.

Returns
true if value was set.

Definition at line 315 of file BasicConfig.h.

◆ set() [2/5]

template<class T >
bool ripple::set ( T &  target,
T const &  defaultValue,
std::string const &  name,
Section const &  section 
)

Set a value from a configuration Section If the named value is not found or doesn't cast to T, the variable is assigned the default.

Returns
true if the named value was found and is valid.

Definition at line 337 of file BasicConfig.h.

◆ get() [1/7]

template<class T = std::string>
T ripple::get ( Section const &  section,
std::string const &  name,
T const &  defaultValue = T{} 
)

Retrieve a key/value pair from a section.

Returns
The value string converted to T if it exists and can be parsed, or else defaultValue.

Definition at line 355 of file BasicConfig.h.

◆ get() [2/7]

std::string ripple::get ( Section const &  section,
std::string const &  name,
char const *  defaultValue 
)

Definition at line 370 of file BasicConfig.h.

◆ get_if_exists()

template<class T >
bool ripple::get_if_exists ( Section const &  section,
std::string const &  name,
T &  v 
)

Definition at line 386 of file BasicConfig.h.

◆ get_if_exists< bool >()

template<>
bool ripple::get_if_exists< bool > ( Section const &  section,
std::string const &  name,
bool &  v 
)

Definition at line 392 of file BasicConfig.h.

◆ operator==() [3/28]

bool ripple::operator== ( Buffer const &  lhs,
Buffer const &  rhs 
)
noexcept

Definition at line 220 of file Buffer.h.

◆ operator!=() [1/9]

bool ripple::operator!= ( Buffer const &  lhs,
Buffer const &  rhs 
)
noexcept

Definition at line 232 of file Buffer.h.

◆ kilobytes()

template<class T >
constexpr auto ripple::kilobytes ( value)
constexprnoexcept

Definition at line 27 of file ByteUtilities.h.

◆ megabytes()

template<class T >
constexpr auto ripple::megabytes ( value)
constexprnoexcept

Definition at line 34 of file ByteUtilities.h.

◆ to_string() [2/29]

template<class Duration >
std::string ripple::to_string ( date::sys_time< Duration >  tp)

Definition at line 76 of file chrono.h.

◆ to_string() [3/29]

std::string ripple::to_string ( NetClock::time_point  tp)

Definition at line 82 of file chrono.h.

◆ to_string_iso() [1/2]

template<class Duration >
std::string ripple::to_string_iso ( date::sys_time< Duration >  tp)

Definition at line 92 of file chrono.h.

◆ to_string_iso() [2/2]

std::string ripple::to_string_iso ( NetClock::time_point  tp)

Definition at line 99 of file chrono.h.

◆ stopwatch()

Stopwatch & ripple::stopwatch ( )

Returns an instance of a wall clock.

Definition at line 119 of file chrono.h.

◆ LogThrow()

void ripple::LogThrow ( std::string const &  title)

Generates and logs a call stack.

Definition at line 31 of file libxrpl/basics/contract.cpp.

◆ Rethrow()

void ripple::Rethrow ( )

Rethrow the exception currently being handled.

When called from within a catch block, it will pass control to the next matching exception handler, if any. Otherwise, std::terminate will be called.

Definition at line 48 of file contract.h.

◆ Throw()

template<class E , class... Args>
void ripple::Throw ( Args &&...  args)

Definition at line 56 of file contract.h.

◆ LogicError()

void ripple::LogicError ( std::string const &  how)
noexcept

Called when faulty logic causes a broken invariant.

Definition at line 37 of file libxrpl/basics/contract.cpp.

◆ Unexpected()

template<typename E , std::size_t N>
ripple::Unexpected ( E(&)  [N]) -> Unexpected< E const * >

◆ getFileContents()

std::string ripple::getFileContents ( boost::system::error_code &  ec,
boost::filesystem::path const &  sourcePath,
std::optional< std::size_t maxSize = std::nullopt 
)

Definition at line 40 of file FileUtilities.cpp.

◆ writeFileContents()

void ripple::writeFileContents ( boost::system::error_code &  ec,
boost::filesystem::path const &  destPath,
std::string const &  contents 
)

Definition at line 81 of file FileUtilities.cpp.

◆ make_SharedIntrusive()

template<class TT , class... Args>
SharedIntrusive< TT > ripple::make_SharedIntrusive ( Args &&...  args)

Create a shared intrusive pointer.

Note: unlike std::shared_ptr, where there is an advantage of allocating the pointer and control block together, there is no benefit for intrusive pointers.

Definition at line 467 of file IntrusivePointer.h.

◆ partialDestructorFinished()

template<class T >
void ripple::partialDestructorFinished ( T **  o)

Definition at line 479 of file IntrusiveRefCounts.h.

◆ join()

template<class Stream , class Iter >
Stream & ripple::join ( Stream &  s,
Iter  iter,
Iter  end,
std::string const &  delimiter 
)

Definition at line 28 of file join.h.

◆ setDebugLogSink()

Set the sink for the debug journal.

Parameters
sinkunique_ptr to new debug Sink.
Returns
unique_ptr to the previous Sink. nullptr if there was no Sink.

Definition at line 470 of file Log.cpp.

◆ debugLog()

beast::Journal ripple::debugLog ( )

Returns a debug journal.

The journal may drain to a null sink, so its output may never be seen. Never use it for critical information.

Definition at line 476 of file Log.cpp.

◆ make_SSLContext()

std::shared_ptr< boost::asio::ssl::context > ripple::make_SSLContext ( std::string const &  cipherList)

Create a self-signed SSL context that allows anonymous Diffie Hellman.

Definition at line 385 of file make_SSLContext.cpp.

◆ make_SSLContextAuthed()

std::shared_ptr< boost::asio::ssl::context > ripple::make_SSLContextAuthed ( std::string const &  keyFile,
std::string const &  certFile,
std::string const &  chainFile,
std::string const &  cipherList 
)

Create an authenticated SSL context using the specified files.

Definition at line 396 of file make_SSLContext.cpp.

◆ calculatePercent()

constexpr std::size_t ripple::calculatePercent ( std::size_t  count,
std::size_t  total 
)
constexpr

Calculate one number divided by another number in percentage.

The result is rounded up to the next integer, and capped in the range [0,100] E.g. calculatePercent(1, 100) = 1 because 1/100 = 0.010000 calculatePercent(1, 99) = 2 because 1/99 = 0.010101 calculatePercent(0, 100) = 0 calculatePercent(100, 100) = 100 calculatePercent(200, 100) = 100 because the result is capped to 100

Parameters
countdividend
totaldivisor
Returns
the percentage, in [0, 100]
Note
total cannot be zero.

Definition at line 44 of file MathUtilities.h.

◆ mulDiv() [1/7]

std::optional< std::uint64_t > ripple::mulDiv ( std::uint64_t  value,
std::uint64_t  mul,
std::uint64_t  div 
)

Return value*mul/div accurately.

Computes the result of the multiplication and division in a single step, avoiding overflow and retaining precision. Throws: None Returns: std::optional: std::nullopt if the calculation overflows. Otherwise, value * mul / div.

Definition at line 32 of file libxrpl/basics/mulDiv.cpp.

◆ to_string() [4/29]

std::string ripple::to_string ( Number const &  amount)

Definition at line 515 of file Number.cpp.

◆ operator+() [2/3]

Number ripple::operator+ ( Number const &  x,
Number const &  y 
)

Definition at line 292 of file Number.h.

◆ operator-() [1/3]

Number ripple::operator- ( Number const &  x,
Number const &  y 
)

Definition at line 300 of file Number.h.

◆ operator*()

Number ripple::operator* ( Number const &  x,
Number const &  y 
)

Definition at line 308 of file Number.h.

◆ operator/()

Number ripple::operator/ ( Number const &  x,
Number const &  y 
)

Definition at line 316 of file Number.h.

◆ abs()

constexpr Number ripple::abs ( Number  x)
constexprnoexcept

Definition at line 350 of file Number.h.

◆ power() [1/2]

Number ripple::power ( Number const &  f,
unsigned  n 
)

Definition at line 613 of file Number.cpp.

◆ root()

Number ripple::root ( Number  f,
unsigned  d 
)

Definition at line 636 of file Number.cpp.

◆ root2()

Number ripple::root2 ( Number  f)

Definition at line 701 of file Number.cpp.

◆ power() [2/2]

Number ripple::power ( Number const &  f,
unsigned  n,
unsigned  d 
)

Definition at line 741 of file Number.cpp.

◆ squelch()

constexpr Number ripple::squelch ( Number const &  x,
Number const &  limit 
)
constexprnoexcept

Definition at line 381 of file Number.h.

◆ extract() [2/4]

template<typename Key >
static std::size_t ripple::extract ( Key const &  key)
static

Definition at line 38 of file partitioned_unordered_map.h.

◆ extract() [3/4]

template<>
std::size_t ripple::extract ( std::string const &  key)

Definition at line 45 of file partitioned_unordered_map.h.

◆ default_prng()

beast::xor_shift_engine & ripple::default_prng ( )

Return the default random engine.

This engine is guaranteed to be deterministic, but by default will be randomly seeded. It is NOT cryptographically secure and MUST NOT be used to generate randomness that will be used for keys, secure cookies, IVs, padding, etc.

Each thread gets its own instance of the engine which will be randomly seeded.

Definition at line 65 of file include/xrpl/basics/random.h.

◆ rand_int() [1/6]

template<class Engine , class Integral >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > ripple::rand_int ( Engine &  engine,
Integral  min,
Integral  max 
)

Return a uniformly distributed random integer.

Parameters
minThe smallest value to return. If not specified the value defaults to 0.
maxThe largest value to return. If not specified the value defaults to the largest value that can be represented.

The randomness is generated by the specified engine (or the default engine if one is not specified). The result is cryptographically secure only when the engine passed into the function is cryptographically secure.

Note
The range is always a closed interval, so calling rand_int(-5, 15) can return any integer in the closed interval [-5, 15]; similarly, calling rand_int(7) can return any integer in the closed interval [0, 7].

Definition at line 115 of file include/xrpl/basics/random.h.

◆ rand_int() [2/6]

template<class Integral >
std::enable_if_t< std::is_integral< Integral >::value, Integral > ripple::rand_int ( Integral  min,
Integral  max 
)

Definition at line 127 of file include/xrpl/basics/random.h.

◆ rand_int() [3/6]

template<class Engine , class Integral >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > ripple::rand_int ( Engine &  engine,
Integral  max 
)

Definition at line 136 of file include/xrpl/basics/random.h.

◆ rand_int() [4/6]

template<class Integral >
std::enable_if_t< std::is_integral< Integral >::value, Integral > ripple::rand_int ( Integral  max)

Definition at line 143 of file include/xrpl/basics/random.h.

◆ rand_int() [5/6]

template<class Integral , class Engine >
std::enable_if_t< std::is_integral< Integral >::value &&detail::is_engine< Engine >::value, Integral > ripple::rand_int ( Engine &  engine)

Definition at line 152 of file include/xrpl/basics/random.h.

◆ rand_int() [6/6]

template<class Integral = int>
std::enable_if_t< std::is_integral< Integral >::value, Integral > ripple::rand_int ( )

Definition at line 159 of file include/xrpl/basics/random.h.

◆ rand_byte() [1/2]

template<class Byte , class Engine >
std::enable_if_t<(std::is_same< Byte, unsigned char >::value|| std::is_same< Byte, std::uint8_t >::value) && detail::is_engine< Engine >::value, Byte > ripple::rand_byte ( Engine &  engine)

Return a random byte.

Definition at line 173 of file include/xrpl/basics/random.h.

◆ rand_byte() [2/2]

template<class Byte = std::uint8_t>
std::enable_if_t<(std::is_same< Byte, unsigned char >::value|| std::is_same< Byte, std::uint8_t >::value), Byte > ripple::rand_byte ( )

Definition at line 186 of file include/xrpl/basics/random.h.

◆ rand_bool() [1/2]

template<class Engine >
bool ripple::rand_bool ( Engine &  engine)

Return a random boolean value.

Definition at line 196 of file include/xrpl/basics/random.h.

◆ rand_bool() [2/2]

bool ripple::rand_bool ( )

Definition at line 202 of file include/xrpl/basics/random.h.

◆ range()

template<class T >
ClosedInterval< T > ripple::range ( low,
high 
)

Create a closed range interval.

Helper function to create a closed range interval without having to qualify the template argument.

Definition at line 54 of file RangeSet.h.

◆ to_string() [5/29]

template<class T >
std::string ripple::to_string ( ClosedInterval< T > const &  ci)

Convert a ClosedInterval to a styled string.

The styled string is "c.first()-c.last()" if c.first() != c.last() "c.first()" if c.first() == c.last()

Parameters
ciThe closed interval to convert
Returns
The style string

Definition at line 83 of file RangeSet.h.

◆ to_string() [6/29]

template<class T >
std::string ripple::to_string ( RangeSet< T > const &  rs)

Convert the given RangeSet to a styled string.

The styled string representation is the set of disjoint intervals joined by commas. The string "empty" is returned if the set is empty.

Parameters
rsThe rangeset to convert
Returns
The styled string

Definition at line 100 of file RangeSet.h.

◆ from_string()

template<class T >
bool ripple::from_string ( RangeSet< T > &  rs,
std::string const &  s 
)

Convert the given styled string to a RangeSet.

The styled string representation is the set of disjoint intervals joined by commas.

Parameters
rsThe set to be populated
sThe styled string to convert
Returns
True on successfully converting styled string

Definition at line 124 of file RangeSet.h.

◆ prevMissing()

template<class T >
std::optional< T > ripple::prevMissing ( RangeSet< T > const &  rs,
t,
minVal = 0 
)

Find the largest value not in the set that is less than a given value.

Parameters
rsThe set of interest
tThe value that must be larger than the result
minVal(Default is 0) The smallest allowed value
Returns
The largest v such that minV <= v < t and !contains(rs, v) or std::nullopt if no such v exists.

Definition at line 183 of file RangeSet.h.

◆ safe_cast() [1/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > ripple::safe_cast ( Src  s)
constexprnoexcept

Definition at line 41 of file safe_cast.h.

◆ safe_cast() [2/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_enum_v< Dest > &&std::is_integral_v< Src >, Dest > ripple::safe_cast ( Src  s)
constexprnoexcept

Definition at line 57 of file safe_cast.h.

◆ safe_cast() [3/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_integral_v< Dest > &&std::is_enum_v< Src >, Dest > ripple::safe_cast ( Src  s)
constexprnoexcept

Definition at line 65 of file safe_cast.h.

◆ unsafe_cast() [1/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > ripple::unsafe_cast ( Src  s)
constexprnoexcept

Definition at line 77 of file safe_cast.h.

◆ unsafe_cast() [2/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_enum_v< Dest > &&std::is_integral_v< Src >, Dest > ripple::unsafe_cast ( Src  s)
constexprnoexcept

Definition at line 89 of file safe_cast.h.

◆ unsafe_cast() [3/4]

template<class Dest , class Src >
constexpr std:: enable_if_t< std::is_integral_v< Dest > &&std::is_enum_v< Src >, Dest > ripple::unsafe_cast ( Src  s)
constexprnoexcept

Definition at line 97 of file safe_cast.h.

◆ scope_exit()

template<class EF >
ripple::scope_exit ( EF  ) -> scope_exit< EF >

◆ scope_fail()

template<class EF >
ripple::scope_fail ( EF  ) -> scope_fail< EF >

◆ scope_success()

template<class EF >
ripple::scope_success ( EF  ) -> scope_success< EF >

◆ scope_unlock()

template<class Mutex >
ripple::scope_unlock ( std::unique_lock< Mutex > &  ) -> scope_unlock< Mutex >

◆ operator!=() [2/9]

bool ripple::operator!= ( SHAMapHash const &  x,
SHAMapHash const &  y 
)

Definition at line 107 of file SHAMapHash.h.

◆ extract() [4/4]

template<>
std::size_t ripple::extract ( SHAMapHash const &  key)

Definition at line 114 of file SHAMapHash.h.

◆ hash_append() [1/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
Slice const &  v 
)

Definition at line 199 of file Slice.h.

◆ operator==() [4/28]

bool ripple::operator== ( Slice const &  lhs,
Slice const &  rhs 
)
noexcept

Definition at line 205 of file Slice.h.

◆ operator!=() [3/9]

bool ripple::operator!= ( Slice const &  lhs,
Slice const &  rhs 
)
noexcept

Definition at line 217 of file Slice.h.

◆ operator<() [1/13]

bool ripple::operator< ( Slice const &  lhs,
Slice const &  rhs 
)
noexcept

Definition at line 222 of file Slice.h.

◆ operator<<() [2/16]

template<class Stream >
Stream & ripple::operator<< ( Stream &  s,
Slice const &  v 
)

Definition at line 233 of file Slice.h.

◆ makeSlice() [1/3]

template<class T , std::size_t N>
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > ripple::makeSlice ( std::array< T, N > const &  a)

Definition at line 244 of file Slice.h.

◆ makeSlice() [2/3]

template<class T , class Alloc >
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > ripple::makeSlice ( std::vector< T, Alloc > const &  v)

Definition at line 253 of file Slice.h.

◆ makeSlice() [3/3]

template<class Traits , class Alloc >
Slice ripple::makeSlice ( std::basic_string< char, Traits, Alloc > const &  s)

Definition at line 260 of file Slice.h.

◆ strHex() [1/2]

template<class FwdIt >
std::string ripple::strHex ( FwdIt  begin,
FwdIt  end 
)

Definition at line 30 of file strHex.h.

◆ strHex() [2/2]

template<class T , class = decltype(std::declval<T>().begin())>
std::string ripple::strHex ( T const &  from)

Definition at line 45 of file strHex.h.

◆ sqlBlobLiteral()

std::string ripple::sqlBlobLiteral ( Blob const &  blob)

Format arbitrary binary data as an SQLite "blob literal".

In SQLite, blob literals must be encoded when used in a query. Per https://sqlite.org/lang_expr.html#literal_values_constants_ they are encoded as string literals containing hexadecimal data and preceded by a single 'X' character.

Parameters
blobAn arbitrary blob of binary data
Returns
The input, encoded as a blob literal.

Definition at line 42 of file StringUtilities.cpp.

◆ strUnHex() [1/2]

template<class Iterator >
std::optional< Blob > ripple::strUnHex ( std::size_t  strSize,
Iterator  begin,
Iterator  end 
)

Definition at line 51 of file StringUtilities.h.

◆ strUnHex() [2/2]

std::optional< Blob > ripple::strUnHex ( std::string const &  strSrc)

Definition at line 106 of file StringUtilities.h.

◆ strViewUnHex()

std::optional< Blob > ripple::strViewUnHex ( std::string_view  strSrc)

Definition at line 112 of file StringUtilities.h.

◆ parseUrl()

bool ripple::parseUrl ( parsedURL pUrl,
std::string const &  strUrl 
)

Definition at line 56 of file StringUtilities.cpp.

◆ trim_whitespace()

std::string ripple::trim_whitespace ( std::string  str)

Definition at line 116 of file StringUtilities.cpp.

◆ to_uint64()

std::optional< std::uint64_t > ripple::to_uint64 ( std::string const &  s)

Definition at line 123 of file StringUtilities.cpp.

◆ isProperlyFormedTomlDomain()

bool ripple::isProperlyFormedTomlDomain ( std::string_view  domain)

Determines if the given string looks like a TOML-file hosting domain.

Do not use this function to determine if a particular string is a valid domain, as this function may reject domains that are otherwise valid and doesn't check whether the TLD is valid.

Definition at line 132 of file StringUtilities.cpp.

◆ to_string() [7/29]

template<class T >
std::enable_if< std::is_arithmetic< T >::value, std::string >::type ripple::to_string ( t)

to_string() generalizes std::to_string to handle bools, chars, and strings.

It's also possible to provide implementation of to_string for a class which needs a string implementation.

Definition at line 36 of file ToString.h.

◆ to_string() [8/29]

std::string ripple::to_string ( bool  b)

Definition at line 42 of file ToString.h.

◆ to_string() [9/29]

std::string ripple::to_string ( char  c)

Definition at line 48 of file ToString.h.

◆ to_string() [10/29]

std::string ripple::to_string ( std::string  s)

Definition at line 54 of file ToString.h.

◆ to_string() [11/29]

std::string ripple::to_string ( char const *  s)

Definition at line 60 of file ToString.h.

◆ crypto_prng()

csprng_engine & ripple::crypto_prng ( )

The default cryptographically secure PRNG.

Use this when you need to generate random numbers or data that will be used for encryption or passed into cryptographic routines.

This meets the requirements of UniformRandomNumberEngine

Definition at line 103 of file libxrpl/crypto/csprng.cpp.

◆ secure_erase()

void ripple::secure_erase ( void *  dest,
std::size_t  bytes 
)

Attempts to clear the given blob of memory.

The underlying implementation of this function takes pains to attempt to outsmart the compiler from optimizing the clearing away. Please note that, despite that, remnants of content may remain floating around in memory as well as registers, caches and more.

For a more in-depth discussion of the subject please see the below posts by Colin Percival:

http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buffer.html http://www.daemonology.net/blog/2014-09-06-zeroing-buffers-is-insufficient.html

Definition at line 29 of file secure_erase.cpp.

◆ operator|() [2/4]

constexpr ApplyFlags ripple::operator| ( ApplyFlags const &  lhs,
ApplyFlags const &  rhs 
)
constexpr

Definition at line 53 of file ApplyView.h.

◆ operator&() [2/3]

constexpr ApplyFlags ripple::operator& ( ApplyFlags const &  lhs,
ApplyFlags const &  rhs 
)
constexpr

Definition at line 68 of file ApplyView.h.

◆ operator~() [1/2]

constexpr ApplyFlags ripple::operator~ ( ApplyFlags const &  flags)
constexpr

Definition at line 79 of file ApplyView.h.

◆ operator|=() [1/2]

ApplyFlags ripple::operator|= ( ApplyFlags lhs,
ApplyFlags const &  rhs 
)

Definition at line 90 of file ApplyView.h.

◆ operator&=() [1/2]

ApplyFlags ripple::operator&= ( ApplyFlags lhs,
ApplyFlags const &  rhs 
)

Definition at line 97 of file ApplyView.h.

◆ verifyValidDomain()

TER ripple::verifyValidDomain ( ApplyView view,
AccountID const &  account,
uint256  domainID,
beast::Journal  j 
)

Definition at line 323 of file CredentialHelpers.cpp.

◆ verifyDepositPreauth()

TER ripple::verifyDepositPreauth ( STTx const &  tx,
ApplyView view,
AccountID const &  src,
AccountID const &  dst,
std::shared_ptr< SLE > const &  sleDst,
beast::Journal  j 
)

Definition at line 361 of file CredentialHelpers.cpp.

◆ makeRulesGivenLedger() [1/2]

Rules ripple::makeRulesGivenLedger ( DigestAwareReadView const &  ledger,
Rules const &  current 
)

Definition at line 69 of file ReadView.cpp.

◆ makeRulesGivenLedger() [2/2]

Rules ripple::makeRulesGivenLedger ( DigestAwareReadView const &  ledger,
std::unordered_set< uint256, beast::uhash<> > const &  presets 
)

Definition at line 75 of file ReadView.cpp.

◆ hasExpired()

bool ripple::hasExpired ( ReadView const &  view,
std::optional< std::uint32_t > const &  exp 
)

Determines whether the given expiration time has passed.

In the XRP Ledger, expiration times are defined as the number of whole seconds after the "Ripple Epoch" which, for historical reasons, is set to January 1, 2000 (00:00 UTC).

This is like the way the Unix epoch works, except the Ripple Epoch is precisely 946,684,800 seconds after the Unix Epoch.

See https://xrpl.org/basic-data-types.html#specifying-time

Expiration is defined in terms of the close time of the parent ledger, because we definitively know the time that it closed (since consensus agrees on time) but we do not know the closing time of the ledger that is under construction.

Parameters
viewThe ledger whose parent time is used as the clock.
expThe optional expiration time we want to check.
Returns
true if exp is in the past; false otherwise.

Definition at line 173 of file View.cpp.

◆ isGlobalFrozen() [1/3]

bool ripple::isGlobalFrozen ( ReadView const &  view,
AccountID const &  issuer 
)

Definition at line 182 of file View.cpp.

◆ isGlobalFrozen() [2/3]

bool ripple::isGlobalFrozen ( ReadView const &  view,
MPTIssue const &  mptIssue 
)

Definition at line 192 of file View.cpp.

◆ isGlobalFrozen() [3/3]

bool ripple::isGlobalFrozen ( ReadView const &  view,
Asset const &  asset 
)

Definition at line 200 of file View.cpp.

◆ isVaultPseudoAccountFrozen()

bool ripple::isVaultPseudoAccountFrozen ( ReadView const &  view,
AccountID const &  account,
MPTIssue const &  mptShare,
int  depth 
)

Definition at line 307 of file View.cpp.

◆ isIndividualFrozen() [1/4]

bool ripple::isIndividualFrozen ( ReadView const &  view,
AccountID const &  account,
Currency const &  currency,
AccountID const &  issuer 
)

Definition at line 213 of file View.cpp.

◆ isIndividualFrozen() [2/4]

bool ripple::isIndividualFrozen ( ReadView const &  view,
AccountID const &  account,
Issue const &  issue 
)

Definition at line 107 of file View.h.

◆ isIndividualFrozen() [3/4]

bool ripple::isIndividualFrozen ( ReadView const &  view,
AccountID const &  account,
MPTIssue const &  mptIssue 
)

Definition at line 233 of file View.cpp.

◆ isIndividualFrozen() [4/4]

bool ripple::isIndividualFrozen ( ReadView const &  view,
AccountID const &  account,
Asset const &  asset 
)

Definition at line 122 of file View.h.

◆ isFrozen() [1/4]

bool ripple::isFrozen ( ReadView const &  view,
AccountID const &  account,
Currency const &  currency,
AccountID const &  issuer 
)

Definition at line 247 of file View.cpp.

◆ isFrozen() [2/4]

bool ripple::isFrozen ( ReadView const &  view,
AccountID const &  account,
Issue const &  issue,
int  = 0 
)

Definition at line 142 of file View.h.

◆ isFrozen() [3/4]

bool ripple::isFrozen ( ReadView const &  view,
AccountID const &  account,
MPTIssue const &  mptIssue,
int  depth = 0 
)

Definition at line 270 of file View.cpp.

◆ isFrozen() [4/4]

bool ripple::isFrozen ( ReadView const &  view,
AccountID const &  account,
Asset const &  asset,
int  depth = 0 
)

isFrozen check is recursive for MPT shares in a vault, descending to assets in the vault, up to maxAssetCheckDepth recursion depth.

This is purely defensive, as we currently do not allow such vaults to be created.

Definition at line 164 of file View.h.

◆ checkFrozen() [1/3]

TER ripple::checkFrozen ( ReadView const &  view,
AccountID const &  account,
Issue const &  issue 
)

Definition at line 178 of file View.h.

◆ checkFrozen() [2/3]

TER ripple::checkFrozen ( ReadView const &  view,
AccountID const &  account,
MPTIssue const &  mptIssue 
)

Definition at line 184 of file View.h.

◆ checkFrozen() [3/3]

TER ripple::checkFrozen ( ReadView const &  view,
AccountID const &  account,
Asset const &  asset 
)

Definition at line 193 of file View.h.

◆ isAnyFrozen() [1/3]

bool ripple::isAnyFrozen ( ReadView const &  view,
std::initializer_list< AccountID > const &  accounts,
MPTIssue const &  mptIssue,
int  depth = 0 
)

Definition at line 282 of file View.cpp.

◆ isAnyFrozen() [2/3]

bool ripple::isAnyFrozen ( ReadView const &  view,
std::initializer_list< AccountID > const &  accounts,
Issue const &  issue 
)

Definition at line 208 of file View.h.

◆ isAnyFrozen() [3/3]

bool ripple::isAnyFrozen ( ReadView const &  view,
std::initializer_list< AccountID > const &  accounts,
Asset const &  asset,
int  depth = 0 
)

Definition at line 222 of file View.h.

◆ isDeepFrozen()

bool ripple::isDeepFrozen ( ReadView const &  view,
AccountID const &  account,
Currency const &  currency,
AccountID const &  issuer 
)

Definition at line 350 of file View.cpp.

◆ isLPTokenFrozen()

bool ripple::isLPTokenFrozen ( ReadView const &  view,
AccountID const &  account,
Issue const &  asset,
Issue const &  asset2 
)

Definition at line 376 of file View.cpp.

◆ accountHolds() [1/4]

STAmount ripple::accountHolds ( ReadView const &  view,
AccountID const &  account,
Currency const &  currency,
AccountID const &  issuer,
FreezeHandling  zeroIfFrozen,
beast::Journal  j 
)

Definition at line 387 of file View.cpp.

◆ accountHolds() [2/4]

STAmount ripple::accountHolds ( ReadView const &  view,
AccountID const &  account,
Issue const &  issue,
FreezeHandling  zeroIfFrozen,
beast::Journal  j 
)

Definition at line 470 of file View.cpp.

◆ accountHolds() [3/4]

STAmount ripple::accountHolds ( ReadView const &  view,
AccountID const &  account,
MPTIssue const &  mptIssue,
FreezeHandling  zeroIfFrozen,
AuthHandling  zeroIfUnauthorized,
beast::Journal  j 
)

Definition at line 482 of file View.cpp.

◆ accountHolds() [4/4]

STAmount ripple::accountHolds ( ReadView const &  view,
AccountID const &  account,
Asset const &  asset,
FreezeHandling  zeroIfFrozen,
AuthHandling  zeroIfUnauthorized,
beast::Journal  j 
)

Definition at line 531 of file View.cpp.

◆ accountFunds()

STAmount ripple::accountFunds ( ReadView const &  view,
AccountID const &  id,
STAmount const &  saDefault,
FreezeHandling  freezeHandling,
beast::Journal  j 
)

Definition at line 554 of file View.cpp.

◆ xrpLiquid()

XRPAmount ripple::xrpLiquid ( ReadView const &  view,
AccountID const &  id,
std::int32_t  ownerCountAdj,
beast::Journal  j 
)

Definition at line 618 of file View.cpp.

◆ forEachItem() [1/2]

void ripple::forEachItem ( ReadView const &  view,
Keylet const &  root,
std::function< void(std::shared_ptr< SLE const > const &)> const &  f 
)

Iterate all items in the given directory.

Definition at line 656 of file View.cpp.

◆ forEachItemAfter() [1/2]

bool ripple::forEachItemAfter ( ReadView const &  view,
Keylet const &  root,
uint256 const &  after,
std::uint64_t const  hint,
unsigned int  limit,
std::function< bool(std::shared_ptr< SLE const > const &)> const &  f 
)

Iterate all items after an item in the given directory.

Parameters
afterThe key of the item to start after
hintThe directory page containing after
limitThe maximum number of items to return
Returns
false if the iteration failed

Definition at line 684 of file View.cpp.

◆ forEachItem() [2/2]

void ripple::forEachItem ( ReadView const &  view,
AccountID const &  id,
std::function< void(std::shared_ptr< SLE const > const &)> const &  f 
)

Iterate all items in an account's owner directory.

Definition at line 340 of file View.h.

◆ forEachItemAfter() [2/2]

bool ripple::forEachItemAfter ( ReadView const &  view,
AccountID const &  id,
uint256 const &  after,
std::uint64_t const  hint,
unsigned int  limit,
std::function< bool(std::shared_ptr< SLE const > const &)> const &  f 
)

Iterate all items after an item in an owner directory.

Parameters
afterThe key of the item to start after
hintThe directory page containing after
limitThe maximum number of items to return
Returns
false if the iteration failed

Definition at line 355 of file View.h.

◆ transferRate() [1/3]

Rate ripple::transferRate ( ReadView const &  view,
AccountID const &  issuer 
)

Returns IOU issuer transfer fee as Rate.

Rate specifies the fee as fractions of 1 billion. For example, 1% transfer rate is represented as 1,010,000,000.

Parameters
issuerThe IOU issuer

Definition at line 762 of file View.cpp.

◆ transferRate() [2/3]

Rate ripple::transferRate ( ReadView const &  view,
MPTID const &  issuanceID 
)

Returns MPT transfer fee as Rate.

Rate specifies the fee as fractions of 1 billion. For example, 1% transfer rate is represented as 1,010,000,000.

Parameters
issuanceIDMPTokenIssuanceID of MPTTokenIssuance object

Definition at line 773 of file View.cpp.

◆ transferRate() [3/3]

Rate ripple::transferRate ( ReadView const &  view,
STAmount const &  amount 
)

Returns the transfer fee as Rate based on the type of token.

Parameters
viewThe ledger view
amountThe amount to transfer

Definition at line 786 of file View.cpp.

◆ dirIsEmpty()

bool ripple::dirIsEmpty ( ReadView const &  view,
Keylet const &  k 
)

Returns true if the directory is empty.

Parameters
keyThe key of the directory

Definition at line 907 of file View.cpp.

◆ getEnabledAmendments()

std::set< uint256 > ripple::getEnabledAmendments ( ReadView const &  view)

Definition at line 921 of file View.cpp.

◆ getMajorityAmendments()

majorityAmendments_t ripple::getMajorityAmendments ( ReadView const &  view)

Definition at line 938 of file View.cpp.

◆ hashOfSeq()

std::optional< uint256 > ripple::hashOfSeq ( ReadView const &  ledger,
LedgerIndex  seq,
beast::Journal  journal 
)

Return the hash of a ledger by sequence.

The hash is retrieved by looking up the "skip list" in the passed ledger. As the skip list is limited in size, if the requested ledger sequence number is out of the range of ledgers represented in the skip list, then std::nullopt is returned.

Returns
The hash of the ledger with the given sequence number or std::nullopt.

Definition at line 961 of file View.cpp.

◆ getCandidateLedger()

LedgerIndex ripple::getCandidateLedger ( LedgerIndex  requested)

Find a ledger index from which we could easily get the requested ledger.

The index that we return should meet two requirements: 1) It must be the index of a ledger that has the hash of the ledger we are looking for. This means that its sequence must be equal to greater than the sequence that we want but not more than 256 greater since each ledger contains the hashes of the 256 previous ledgers.

2) Its hash must be easy for us to find. This means it must be 0 mod 256 because every such ledger is permanently enshrined in a LedgerHashes page which we can easily retrieve via the skip list.

Definition at line 429 of file View.h.

◆ areCompatible() [1/2]

bool ripple::areCompatible ( ReadView const &  validLedger,
ReadView const &  testLedger,
beast::Journal::Stream s,
char const *  reason 
)

Return false if the test ledger is provably incompatible with the valid ledger, that is, they could not possibly both be valid.

Use the first form if you have both ledgers, use the second form if you have not acquired the valid ledger yet

Definition at line 799 of file View.cpp.

◆ areCompatible() [2/2]

bool ripple::areCompatible ( uint256 const &  validHash,
LedgerIndex  validIndex,
ReadView const &  testLedger,
beast::Journal::Stream s,
char const *  reason 
)

Definition at line 862 of file View.cpp.

◆ adjustOwnerCount() [1/2]

void ripple::adjustOwnerCount ( ApplyView view,
std::shared_ptr< SLE > const &  sle,
std::int32_t  amount,
beast::Journal  j 
)

Adjust the owner count up or down.

Definition at line 1032 of file View.cpp.

◆ cdirFirst()

bool ripple::cdirFirst ( ReadView const &  view,
uint256 const &  root,
std::shared_ptr< SLE const > &  page,
unsigned int &  index,
uint256 entry 
)

Returns the first entry in the directory, advancing the index.

Parameters
viewThe view against which to operate
rootThe root (i.e. first page) of the directory to iterate
pageThe current page
indexThe index inside the current page
entryThe entry at the current index
Returns
true if the directory isn't empty; false otherwise

Definition at line 145 of file View.cpp.

◆ dirFirst()

bool ripple::dirFirst ( ApplyView view,
uint256 const &  root,
std::shared_ptr< SLE > &  page,
unsigned int &  index,
uint256 entry 
)

Definition at line 123 of file View.cpp.

◆ cdirNext()

bool ripple::cdirNext ( ReadView const &  view,
uint256 const &  root,
std::shared_ptr< SLE const > &  page,
unsigned int &  index,
uint256 entry 
)

Returns the next entry in the directory, advancing the index.

Parameters
viewThe view against which to operate
rootThe root (i.e. first page) of the directory to iterate
pageThe current page
indexThe index inside the current page
entryThe entry at the current index
Returns
true if the directory isn't empty; false otherwise

Definition at line 156 of file View.cpp.

◆ dirNext()

bool ripple::dirNext ( ApplyView view,
uint256 const &  root,
std::shared_ptr< SLE > &  page,
unsigned int &  index,
uint256 entry 
)

Definition at line 134 of file View.cpp.

◆ describeOwnerDir()

std::function< void(SLE::ref)> ripple::describeOwnerDir ( AccountID const &  account)

Definition at line 1050 of file View.cpp.

◆ dirLink()

TER ripple::dirLink ( ApplyView view,
AccountID const &  owner,
std::shared_ptr< SLE > &  object 
)

Definition at line 1058 of file View.cpp.

◆ pseudoAccountAddress()

AccountID ripple::pseudoAccountAddress ( ReadView const &  view,
uint256 const &  pseudoOwnerKey 
)

Definition at line 1069 of file View.cpp.

◆ createPseudoAccount()

Expected< std::shared_ptr< SLE >, TER > ripple::createPseudoAccount ( ApplyView view,
uint256 const &  pseudoOwnerKey,
SField const &  ownerField 
)

Create pseudo-account, storing pseudoOwnerKey into ownerField.

The list of valid ownerField is maintained in View.cpp and the caller to this function must perform necessary amendment check(s) before using a field. The amendment check is not performed in createPseudoAccount.

Definition at line 1132 of file View.cpp.

◆ isPseudoAccount() [1/2]

bool ripple::isPseudoAccount ( std::shared_ptr< SLE const >  sleAcct)

Definition at line 1118 of file View.cpp.

◆ getPseudoAccountFields()

std::vector< SField const * > const & ripple::getPseudoAccountFields ( )

Definition at line 1092 of file View.cpp.

◆ isPseudoAccount() [2/2]

bool ripple::isPseudoAccount ( ReadView const &  view,
AccountID  accountId 
)

Definition at line 576 of file View.h.

◆ canAddHolding() [1/3]

TER ripple::canAddHolding ( ReadView const &  view,
Asset const &  asset 
)

Definition at line 1206 of file View.cpp.

◆ addEmptyHolding() [1/3]

TER ripple::addEmptyHolding ( ApplyView view,
AccountID const &  accountID,
XRPAmount  priorBalance,
Issue const &  issue,
beast::Journal  journal 
)

Any transactors that call addEmptyHolding() in doApply must call canAddHolding() in preflight with the same View and Asset.

Definition at line 1216 of file View.cpp.

◆ addEmptyHolding() [2/3]

TER ripple::addEmptyHolding ( ApplyView view,
AccountID const &  accountID,
XRPAmount  priorBalance,
MPTIssue const &  mptIssue,
beast::Journal  journal 
)

Definition at line 1270 of file View.cpp.

◆ addEmptyHolding() [3/3]

TER ripple::addEmptyHolding ( ApplyView view,
AccountID const &  accountID,
XRPAmount  priorBalance,
Asset const &  asset,
beast::Journal  journal 
)

Definition at line 603 of file View.h.

◆ authorizeMPToken()

TER ripple::authorizeMPToken ( ApplyView view,
XRPAmount const &  priorBalance,
MPTID const &  mptIssuanceID,
AccountID const &  account,
beast::Journal  journal,
std::uint32_t  flags = 0,
std::optional< AccountID holderID = std::nullopt 
)

Definition at line 1290 of file View.cpp.

◆ trustCreate()

TER ripple::trustCreate ( ApplyView view,
bool const  bSrcHigh,
AccountID const &  uSrcAccountID,
AccountID const &  uDstAccountID,
uint256 const &  uIndex,
SLE::ref  sleAccount,
bool const  bAuth,
bool const  bNoRipple,
bool const  bFreeze,
bool  bDeepFreeze,
STAmount const &  saBalance,
STAmount const &  saLimit,
std::uint32_t  uSrcQualityIn,
std::uint32_t  uSrcQualityOut,
beast::Journal  j 
)

Create a trust line.

This can set an initial balance.

Definition at line 1398 of file View.cpp.

◆ removeEmptyHolding() [1/3]

TER ripple::removeEmptyHolding ( ApplyView view,
AccountID const &  accountID,
Issue const &  issue,
beast::Journal  journal 
)

Definition at line 1517 of file View.cpp.

◆ removeEmptyHolding() [2/3]

TER ripple::removeEmptyHolding ( ApplyView view,
AccountID const &  accountID,
MPTIssue const &  mptIssue,
beast::Journal  journal 
)

Definition at line 1583 of file View.cpp.

◆ removeEmptyHolding() [3/3]

TER ripple::removeEmptyHolding ( ApplyView view,
AccountID const &  accountID,
Asset const &  asset,
beast::Journal  journal 
)

Definition at line 670 of file View.h.

◆ trustDelete()

TER ripple::trustDelete ( ApplyView view,
std::shared_ptr< SLE > const &  sleRippleState,
AccountID const &  uLowAccountID,
AccountID const &  uHighAccountID,
beast::Journal  j 
)

Definition at line 1607 of file View.cpp.

◆ offerDelete()

TER ripple::offerDelete ( ApplyView view,
std::shared_ptr< SLE > const &  sle,
beast::Journal  j 
)

Delete an offer.

Requirements: The passed sle be obtained from a prior call to view.peek()

Definition at line 1647 of file View.cpp.

◆ rippleCredit()

TER ripple::rippleCredit ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
bool  bCheckIssuer,
beast::Journal  j 
)

Calls static rippleCreditIOU if saAmount represents Issue.

Calls static rippleCreditMPT if saAmount represents MPTIssue.

Definition at line 2856 of file View.cpp.

◆ rippleLockEscrowMPT()

TER ripple::rippleLockEscrowMPT ( ApplyView view,
AccountID const &  uGrantorID,
STAmount const &  saAmount,
beast::Journal  j 
)

Definition at line 2995 of file View.cpp.

◆ rippleUnlockEscrowMPT()

TER ripple::rippleUnlockEscrowMPT ( ApplyView view,
AccountID const &  uGrantorID,
AccountID const &  uGranteeID,
STAmount const &  netAmount,
STAmount const &  grossAmount,
beast::Journal  j 
)

Definition at line 3092 of file View.cpp.

◆ accountSend()

TER ripple::accountSend ( ApplyView view,
AccountID const &  from,
AccountID const &  to,
STAmount const &  saAmount,
beast::Journal  j,
WaiveTransferFee  waiveFee = WaiveTransferFee::No 
)

Calls static accountSendIOU if saAmount represents Issue.

Calls static accountSendMPT if saAmount represents MPTIssue.

Definition at line 2191 of file View.cpp.

◆ issueIOU()

TER ripple::issueIOU ( ApplyView view,
AccountID const &  account,
STAmount const &  amount,
Issue const &  issue,
beast::Journal  j 
)

Definition at line 2265 of file View.cpp.

◆ redeemIOU()

TER ripple::redeemIOU ( ApplyView view,
AccountID const &  account,
STAmount const &  amount,
Issue const &  issue,
beast::Journal  j 
)

Definition at line 2365 of file View.cpp.

◆ transferXRP()

TER ripple::transferXRP ( ApplyView view,
AccountID const &  from,
AccountID const &  to,
STAmount const &  amount,
beast::Journal  j 
)

Definition at line 2440 of file View.cpp.

◆ requireAuth() [1/3]

TER ripple::requireAuth ( ReadView const &  view,
Issue const &  issue,
AccountID const &  account,
AuthType  authType = AuthType::Legacy 
)

Check if the account lacks required authorization.

Return tecNO_AUTH or tecNO_LINE if it does and tesSUCCESS otherwise.

If StrongAuth then return tecNO_LINE if the RippleState doesn't exist. Return tecNO_AUTH if lsfRequireAuth is set on the issuer's AccountRoot, and the RippleState does exist, and the RippleState is not authorized.

If WeakAuth then return tecNO_AUTH if lsfRequireAuth is set, and the RippleState exists, and is not authorized. Return tecNO_LINE if lsfRequireAuth is set and the RippleState doesn't exist. Consequently, if WeakAuth and lsfRequireAuth is not set, this function will return tesSUCCESS even if RippleState does not exist.

The default "Legacy" auth type is equivalent to WeakAuth.

Definition at line 2485 of file View.cpp.

◆ requireAuth() [2/3]

TER ripple::requireAuth ( ReadView const &  view,
MPTIssue const &  mptIssue,
AccountID const &  account,
AuthType  authType = AuthType::Legacy,
int  depth = 0 
)

Check if the account lacks required authorization.

This will also check for expired credentials. If it is called directly from preclaim, the user should convert result tecEXPIRED to tesSUCCESS and proceed to also check permissions with enforceMPTokenAuthorization inside doApply. This will ensure that any expired credentials are deleted.

requireAuth check is recursive for MPT shares in a vault, descending to assets in the vault, up to maxAssetCheckDepth recursion depth. This is purely defensive, as we currently do not allow such vaults to be created.

If StrongAuth then return tecNO_AUTH if MPToken doesn't exist or lsfMPTRequireAuth is set and MPToken is not authorized.

If WeakAuth then return tecNO_AUTH if lsfMPTRequireAuth is set and MPToken doesn't exist or is not authorized (explicitly or via credentials, if DomainID is set in MPTokenIssuance). Consequently, if WeakAuth and lsfMPTRequireAuth is not set, this function will return true even if MPToken does not exist.

The default "Legacy" auth type is equivalent to StrongAuth.

Definition at line 2517 of file View.cpp.

◆ requireAuth() [3/3]

TER ripple::requireAuth ( ReadView const &  view,
Asset const &  asset,
AccountID const &  account,
AuthType  authType = AuthType::Legacy 
)

Definition at line 842 of file View.h.

◆ enforceMPTokenAuthorization()

TER ripple::enforceMPTokenAuthorization ( ApplyView view,
MPTID const &  mptIssuanceID,
AccountID const &  account,
XRPAmount const &  priorBalance,
beast::Journal  j 
)

Enforce account has MPToken to match its authorization.

Called from doApply - it will check for expired (and delete if found any) credentials matching DomainID set in MPTokenIssuance. Must be called if requireAuth(...MPTIssue...) returned tesSUCCESS or tecEXPIRED in preclaim, which implies that preclaim should replace tecEXPIRED with tesSUCCESS in order for the transactor to proceed to doApply.

This function will create MPToken (if needed) on the basis of any non-expired credentials and will delete any expired credentials, indirectly via verifyValidDomain, as per DomainID (if set in MPTokenIssuance).

The caller does NOT need to ensure that DomainID is actually set - this function handles gracefully both cases when DomainID is set and when not.

The caller does NOT need to look for existing MPToken to match mptIssue/account - this function checks lsfMPTAuthorized of an existing MPToken iff DomainID is not set.

Do not use for accounts which hold implied permission e.g. object owners or if MPTokenIssuance does not require authorization. In both cases use MPTokenAuthorize::authorize if MPToken does not yet exist.

Definition at line 2603 of file View.cpp.

◆ canTransfer()

TER ripple::canTransfer ( ReadView const &  view,
MPTIssue const &  mptIssue,
AccountID const &  from,
AccountID const &  to 
)

Check if the destination account is allowed to receive MPT.

Return tecNO_AUTH if it doesn't and tesSUCCESS otherwise.

Definition at line 2704 of file View.cpp.

◆ cleanupOnAccountDelete() [1/2]

TER ripple::cleanupOnAccountDelete ( ApplyView view,
Keylet const &  ownerDirKeylet,
EntryDeleter const &  deleter,
beast::Journal  j,
std::optional< std::uint16_t maxNodesToDelete = std::nullopt 
)

Cleanup owner directory entries on account delete.

Used for a regular and AMM accounts deletion. The caller has to provide the deleter function, which handles details of specific account-owned object deletion.

Returns
tecINCOMPLETE indicates maxNodesToDelete are deleted and there remains more nodes to delete.

◆ deleteAMMTrustLine()

TER ripple::deleteAMMTrustLine ( ApplyView view,
std::shared_ptr< SLE sleState,
std::optional< AccountID > const &  ammAccountID,
beast::Journal  j 
)

Delete trustline to AMM.

The passed sle must be obtained from a prior call to view.peek(). Fail if neither side of the trustline is AMM or if ammAccountID is seated and is not one of the trustline's side.

Definition at line 2806 of file View.cpp.

◆ assetsToSharesDeposit()

std::optional< STAmount > ripple::assetsToSharesDeposit ( std::shared_ptr< SLE const > const &  vault,
std::shared_ptr< SLE const > const &  issuance,
STAmount const &  assets 
)

Definition at line 2884 of file View.cpp.

◆ sharesToAssetsDeposit()

std::optional< STAmount > ripple::sharesToAssetsDeposit ( std::shared_ptr< SLE const > const &  vault,
std::shared_ptr< SLE const > const &  issuance,
STAmount const &  shares 
)

Definition at line 2912 of file View.cpp.

◆ assetsToSharesWithdraw()

std::optional< STAmount > ripple::assetsToSharesWithdraw ( std::shared_ptr< SLE const > const &  vault,
std::shared_ptr< SLE const > const &  issuance,
STAmount const &  assets,
TruncateShares  truncate = TruncateShares::no 
)

Definition at line 2941 of file View.cpp.

◆ sharesToAssetsWithdraw()

std::optional< STAmount > ripple::sharesToAssetsWithdraw ( std::shared_ptr< SLE const > const &  vault,
std::shared_ptr< SLE const > const &  issuance,
STAmount const &  shares 
)

Definition at line 2970 of file View.cpp.

◆ after()

bool ripple::after ( NetClock::time_point  now,
std::uint32_t  mark 
)

Has the specified time passed?

Parameters
nowthe current time
markthe cutoff point
Returns
true if now refers to a time strictly after mark, else false.

Definition at line 3266 of file View.cpp.

◆ registerSSLCerts()

void ripple::registerSSLCerts ( boost::asio::ssl::context &  ctx,
boost::system::error_code &  ec,
beast::Journal  j 
)

Register default SSL certificates.

Register the system default SSL root certificates. On linux/mac, this just calls asio's set_default_verify_paths to look in standard operating system locations. On windows, it uses the OS certificate store accessible via CryptoAPI.

Definition at line 38 of file RegisterSSLCerts.cpp.

◆ toBase58() [1/4]

std::string ripple::toBase58 ( AccountID const &  v)

Convert AccountID to base58 checked string.

Definition at line 114 of file AccountID.cpp.

◆ parseBase58() [1/10]

template<>
std::optional< AccountID > ripple::parseBase58 ( std::string const &  s)

Parse AccountID from checked, base58 string.

Returns
std::nullopt if a parse error occurs

Definition at line 124 of file AccountID.cpp.

◆ xrpAccount()

AccountID const & ripple::xrpAccount ( )

Compute AccountID from public key.

The account ID is computed as the 160-bit hash of the public key data. This excludes the version byte and guard bytes included in the base58 representation. A special account that's used as the "issuer" for XRP.

Definition at line 178 of file AccountID.cpp.

◆ noAccount()

AccountID const & ripple::noAccount ( )

A placeholder for empty accounts.

Definition at line 185 of file AccountID.cpp.

◆ to_issuer()

bool ripple::to_issuer ( AccountID issuer,
std::string const &  s 
)

Convert hex or base58 string to AccountID.

Returns
true if the parsing was successful.

Definition at line 192 of file AccountID.cpp.

◆ isXRP() [1/5]

bool ripple::isXRP ( AccountID const &  c)

Definition at line 90 of file AccountID.h.

◆ to_string() [12/29]

std::string ripple::to_string ( AccountID const &  account)

Returns "", "XRP", or three letter ISO code.

Definition at line 97 of file AccountID.h.

◆ operator<<() [3/16]

std::ostream & ripple::operator<< ( std::ostream os,
AccountID const &  x 
)

Definition at line 103 of file AccountID.h.

◆ initAccountIdCache()

void ripple::initAccountIdCache ( std::size_t  count)

Initialize the global cache used to map AccountID to base58 conversions.

The cache is optional and need not be initialized. But because conversion is expensive (it requires a SHA-256 operation) in most cases the overhead of the cache is worth the benefit.

Parameters
countThe number of entries the cache should accommodate. Zero will disable the cache, releasing any memory associated with it.
Note
The function will only initialize the cache the first time it is invoked. Subsequent invocations do nothing.

Definition at line 107 of file AccountID.cpp.

◆ ammLPTCurrency()

Currency ripple::ammLPTCurrency ( Currency const &  cur1,
Currency const &  cur2 
)

Calculate Liquidity Provider Token (LPT) Currency.

Definition at line 43 of file AMMCore.cpp.

◆ ammLPTIssue()

Issue ripple::ammLPTIssue ( Currency const &  cur1,
Currency const &  cur2,
AccountID const &  ammAccountID 
)

Calculate LPT Issue from AMM asset pair.

Definition at line 57 of file AMMCore.cpp.

◆ invalidAMMAmount()

NotTEC ripple::invalidAMMAmount ( STAmount const &  amount,
std::optional< std::pair< Issue, Issue > > const &  pair = std::nullopt,
bool  validZero = false 
)

Validate the amount.

If validZero is false and amount is beast::zero then invalid amount. Return error code if invalid amount. If pair then validate amount's issue matches one of the pair's issue.

Definition at line 95 of file AMMCore.cpp.

◆ invalidAMMAsset()

NotTEC ripple::invalidAMMAsset ( Issue const &  issue,
std::optional< std::pair< Issue, Issue > > const &  pair = std::nullopt 
)

Definition at line 66 of file AMMCore.cpp.

◆ invalidAMMAssetPair()

NotTEC ripple::invalidAMMAssetPair ( Issue const &  issue1,
Issue const &  issue2,
std::optional< std::pair< Issue, Issue > > const &  pair = std::nullopt 
)

Definition at line 80 of file AMMCore.cpp.

◆ ammAuctionTimeSlot()

std::optional< std::uint8_t > ripple::ammAuctionTimeSlot ( std::uint64_t  current,
STObject const &  auctionSlot 
)

Get time slot of the auction slot.

Definition at line 108 of file AMMCore.cpp.

◆ ammEnabled()

bool ripple::ammEnabled ( Rules const &  rules)

Return true if required AMM amendments are enabled.

Definition at line 129 of file AMMCore.cpp.

◆ getFee()

Number ripple::getFee ( std::uint16_t  tfee)

Convert to the fee from the basis points.

Parameters
tfeetrading fee in {0, 1000} 1 = 1/10bps or 0.001%, 1000 = 1%

Definition at line 101 of file AMMCore.h.

◆ feeMult()

Number ripple::feeMult ( std::uint16_t  tfee)

Get fee multiplier (1 - tfee) @tfee trading fee in basis points.

Definition at line 110 of file AMMCore.h.

◆ feeMultHalf()

Number ripple::feeMultHalf ( std::uint16_t  tfee)

Get fee multiplier (1 - tfee / 2) @tfee trading fee in basis points.

Definition at line 119 of file AMMCore.h.

◆ toSTAmount() [1/6]

STAmount ripple::toSTAmount ( IOUAmount const &  iou,
Issue const &  iss 
)

Definition at line 32 of file AmountConversions.h.

◆ toSTAmount() [2/6]

STAmount ripple::toSTAmount ( IOUAmount const &  iou)

Definition at line 40 of file AmountConversions.h.

◆ toSTAmount() [3/6]

STAmount ripple::toSTAmount ( XRPAmount const &  xrp)

Definition at line 46 of file AmountConversions.h.

◆ toSTAmount() [4/6]

STAmount ripple::toSTAmount ( XRPAmount const &  xrp,
Issue const &  iss 
)

Definition at line 54 of file AmountConversions.h.

◆ toAmount() [1/4]

template<class T >
T ripple::toAmount ( STAmount const &  amt)
delete

◆ toAmount< STAmount >()

template<>
STAmount ripple::toAmount< STAmount > ( STAmount const &  amt)

Definition at line 67 of file AmountConversions.h.

◆ toAmount< IOUAmount >() [1/2]

template<>
IOUAmount ripple::toAmount< IOUAmount > ( STAmount const &  amt)

Definition at line 74 of file AmountConversions.h.

◆ toAmount< XRPAmount >() [1/2]

template<>
XRPAmount ripple::toAmount< XRPAmount > ( STAmount const &  amt)

Definition at line 89 of file AmountConversions.h.

◆ toAmount() [2/4]

template<class T >
T ripple::toAmount ( IOUAmount const &  amt)
delete

◆ toAmount< IOUAmount >() [2/2]

template<>
IOUAmount ripple::toAmount< IOUAmount > ( IOUAmount const &  amt)

Definition at line 108 of file AmountConversions.h.

◆ toAmount() [3/4]

template<class T >
T ripple::toAmount ( XRPAmount const &  amt)
delete

◆ toAmount< XRPAmount >() [2/2]

template<>
XRPAmount ripple::toAmount< XRPAmount > ( XRPAmount const &  amt)

Definition at line 119 of file AmountConversions.h.

◆ toAmount() [4/4]

template<typename T >
T ripple::toAmount ( Issue const &  issue,
Number const &  n,
Number::rounding_mode  mode = Number::getround() 
)

Definition at line 127 of file AmountConversions.h.

◆ toMaxAmount()

template<typename T >
T ripple::toMaxAmount ( Issue const &  issue)

Definition at line 155 of file AmountConversions.h.

◆ toSTAmount() [5/6]

STAmount ripple::toSTAmount ( Issue const &  issue,
Number const &  n,
Number::rounding_mode  mode = Number::getround() 
)

Definition at line 176 of file AmountConversions.h.

◆ getIssue() [1/2]

template<typename T >
Issue ripple::getIssue ( T const &  amt)

Definition at line 186 of file AmountConversions.h.

◆ get() [3/7]

template<typename T >
constexpr T ripple::get ( STAmount const &  a)
constexpr

Definition at line 203 of file AmountConversions.h.

◆ forApiVersions()

template<unsigned minVer, unsigned maxVer, typename Fn , typename... Args>
requires (maxVer >= minVer) && (minVer >= RPC::apiMinimumSupportedVersion) && (RPC::apiMaximumValidVersion >= maxVer) && requires { fn(std::integral_constant<unsigned int, minVer>{}, std::forward<Args>(args)...); fn(std::integral_constant<unsigned int, maxVer>{}, std::forward<Args>(args)...); }
void ripple::forApiVersions ( Fn const &  fn,
Args &&...  args 
)

Definition at line 155 of file ApiVersion.h.

◆ forAllApiVersions()

template<typename Fn , typename... Args>
requires requires { forApiVersions< RPC::apiMinimumSupportedVersion, RPC::apiMaximumValidVersion>(fn, std::forward<Args>(args)...); }
void ripple::forAllApiVersions ( Fn const &  fn,
Args &&...  args 
)

Definition at line 177 of file ApiVersion.h.

◆ to_json() [1/4]

Json::Value ripple::to_json ( Asset const &  asset)

Definition at line 123 of file Asset.h.

◆ operator==() [5/28]

constexpr bool ripple::operator== ( Asset const &  lhs,
Asset const &  rhs 
)
constexpr

Definition at line 162 of file Asset.h.

◆ operator<=>() [2/7]

constexpr std::weak_ordering ripple::operator<=> ( Asset const &  lhs,
Asset const &  rhs 
)
constexpr

Definition at line 176 of file Asset.h.

◆ operator==() [6/28]

constexpr bool ripple::operator== ( Currency const &  lhs,
Asset const &  rhs 
)
constexpr

Definition at line 195 of file Asset.h.

◆ equalTokens()

constexpr bool ripple::equalTokens ( Asset const &  lhs,
Asset const &  rhs 
)
constexpr

Otherwise return false.

Definition at line 201 of file Asset.h.

◆ isXRP() [2/5]

bool ripple::isXRP ( Asset const &  asset)

Definition at line 221 of file Asset.h.

◆ to_string() [13/29]

std::string ripple::to_string ( Asset const &  asset)

Definition at line 62 of file Asset.cpp.

◆ validJSONAsset()

bool ripple::validJSONAsset ( Json::Value const &  jv)

Definition at line 69 of file Asset.cpp.

◆ assetFromJson()

Asset ripple::assetFromJson ( Json::Value const &  jv)

Definition at line 77 of file Asset.cpp.

◆ serializeBatch()

void ripple::serializeBatch ( Serializer msg,
std::uint32_t const &  flags,
std::vector< uint256 > const &  txids 
)

Definition at line 25 of file include/xrpl/protocol/Batch.h.

◆ isConsistent() [1/2]

bool ripple::isConsistent ( Book const &  book)

Definition at line 29 of file Book.cpp.

◆ to_string() [14/29]

std::string ripple::to_string ( Book const &  book)

Definition at line 36 of file Book.cpp.

◆ operator<<() [4/16]

std::ostream & ripple::operator<< ( std::ostream os,
Book const &  x 
)

Definition at line 41 of file Book.cpp.

◆ hash_append() [2/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
Book const &  b 
)

Definition at line 66 of file Book.h.

◆ reversed()

Book ripple::reversed ( Book const &  book)

Definition at line 49 of file Book.cpp.

◆ operator==() [7/28]

constexpr bool ripple::operator== ( Book const &  lhs,
Book const &  rhs 
)
constexpr

Equality comparison.

Definition at line 80 of file Book.h.

◆ operator<=>() [3/7]

constexpr std::weak_ordering ripple::operator<=> ( Book const &  lhs,
Book const &  rhs 
)
constexpr

Strict weak ordering.

Definition at line 89 of file Book.h.

◆ secp256k1Context()

template<class = void>
secp256k1_context const * ripple::secp256k1Context ( )

Definition at line 29 of file secp256k1.h.

◆ TokenCodecErrcCategory()

ripple::detail::TokenCodecErrcCategory const & ripple::TokenCodecErrcCategory ( )

Definition at line 90 of file token_errors.h.

◆ make_error_code()

std::error_code ripple::make_error_code ( ripple::TokenCodecErrc  e)

Definition at line 97 of file token_errors.h.

◆ sha512Half()

template<class... Args>
sha512_half_hasher::result_type ripple::sha512Half ( Args const &...  args)

Returns the SHA512-Half of a series of objects.

Definition at line 224 of file digest.h.

◆ sha512Half_s()

template<class... Args>
sha512_half_hasher_s::result_type ripple::sha512Half_s ( Args const &...  args)

Returns the SHA512-Half of a series of objects.

Postconditions: Temporary memory storing copies of input messages will be cleared.

Definition at line 240 of file digest.h.

◆ rpcErrorString()

std::string ripple::rpcErrorString ( Json::Value const &  jv)

Returns a single string with the contents of an RPC error.

Definition at line 223 of file ErrorCodes.cpp.

◆ allAmendments()

std::map< std::string, AmendmentSupport > const & ripple::allAmendments ( )

All amendments libxrpl knows about.

All amendments libxrpl knows of.

Definition at line 351 of file Feature.cpp.

◆ getRegisteredFeature()

std::optional< uint256 > ripple::getRegisteredFeature ( std::string const &  name)

Definition at line 382 of file Feature.cpp.

◆ featureToBitsetIndex()

size_t ripple::featureToBitsetIndex ( uint256 const &  f)

Definition at line 409 of file Feature.cpp.

◆ bitsetIndexToFeature()

uint256 ripple::bitsetIndexToFeature ( size_t  i)

Definition at line 415 of file Feature.cpp.

◆ featureToName()

std::string ripple::featureToName ( uint256 const &  f)

Definition at line 421 of file Feature.cpp.

◆ foreachFeature()

template<class F >
void ripple::foreachFeature ( FeatureBitset  bs,
F &&  f 
)

Definition at line 350 of file Feature.h.

◆ hash_append() [3/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
HashPrefix const &  hp 
)
noexcept

Definition at line 98 of file HashPrefix.h.

◆ getBookBase()

uint256 ripple::getBookBase ( Book const &  book)

Definition at line 115 of file Indexes.cpp.

◆ getQualityNext()

uint256 ripple::getQualityNext ( uint256 const &  uBase)

Definition at line 141 of file Indexes.cpp.

◆ getQuality()

std::uint64_t ripple::getQuality ( uint256 const &  uBase)

Definition at line 149 of file Indexes.cpp.

◆ getTicketIndex() [1/2]

uint256 ripple::getTicketIndex ( AccountID const &  account,
std::uint32_t  uSequence 
)

Definition at line 156 of file Indexes.cpp.

◆ getTicketIndex() [2/2]

uint256 ripple::getTicketIndex ( AccountID const &  account,
SeqProxy  ticketSeq 
)

Definition at line 163 of file Indexes.cpp.

◆ makeMptID()

MPTID ripple::makeMptID ( std::uint32_t  sequence,
AccountID const &  account 
)

Definition at line 170 of file Indexes.cpp.

◆ to_string() [15/29]

std::string ripple::to_string ( IOUAmount const &  amount)

Definition at line 184 of file IOUAmount.cpp.

◆ mulRatio() [1/3]

IOUAmount ripple::mulRatio ( IOUAmount const &  amt,
std::uint32_t  num,
std::uint32_t  den,
bool  roundUp 
)

Definition at line 190 of file IOUAmount.cpp.

◆ getSTNumberSwitchover()

bool ripple::getSTNumberSwitchover ( )

Definition at line 50 of file IOUAmount.cpp.

◆ setSTNumberSwitchover()

void ripple::setSTNumberSwitchover ( bool  v)

Definition at line 56 of file IOUAmount.cpp.

◆ isConsistent() [2/2]

bool ripple::isConsistent ( Issue const &  ac)

Definition at line 72 of file Issue.cpp.

◆ to_string() [16/29]

std::string ripple::to_string ( Issue const &  ac)

Definition at line 78 of file Issue.cpp.

◆ to_json() [2/4]

Json::Value ripple::to_json ( Issue const &  is)

Definition at line 87 of file Issue.cpp.

◆ issueFromJson() [1/2]

Issue ripple::issueFromJson ( Json::Value const &  v)

Definition at line 95 of file Issue.cpp.

◆ operator<<() [5/16]

std::ostream & ripple::operator<< ( std::ostream os,
Issue const &  x 
)

Definition at line 147 of file Issue.cpp.

◆ hash_append() [4/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
Issue const &  r 
)

Definition at line 80 of file Issue.h.

◆ operator==() [8/28]

constexpr bool ripple::operator== ( Issue const &  lhs,
Issue const &  rhs 
)
constexpr

Equality comparison.

Definition at line 89 of file Issue.h.

◆ operator<=>() [4/7]

constexpr std::weak_ordering ripple::operator<=> ( Issue const &  lhs,
Issue const &  rhs 
)
constexpr

Strict weak ordering.

Definition at line 98 of file Issue.h.

◆ xrpIssue()

Issue const & ripple::xrpIssue ( )

Returns an asset specifier that represents XRP.

Definition at line 115 of file Issue.h.

◆ noIssue()

Issue const & ripple::noIssue ( )

Returns an asset specifier that represents no account and currency.

Definition at line 123 of file Issue.h.

◆ isXRP() [3/5]

bool ripple::isXRP ( Issue const &  issue)

Definition at line 130 of file Issue.h.

◆ keyTypeFromString()

std::optional< KeyType > ripple::keyTypeFromString ( std::string const &  s)

Definition at line 34 of file KeyType.h.

◆ to_string() [17/29]

char const * ripple::to_string ( KeyType  type)

Definition at line 46 of file KeyType.h.

◆ operator<<() [6/16]

template<class Stream >
Stream & ripple::operator<< ( Stream &  s,
KeyType  type 
)

Definition at line 58 of file KeyType.h.

◆ getCloseAgree()

bool ripple::getCloseAgree ( LedgerHeader const &  info)

Definition at line 85 of file LedgerHeader.h.

◆ addRaw()

void ripple::addRaw ( LedgerHeader const &  info,
Serializer s,
bool  includeHash = false 
)

Definition at line 28 of file libxrpl/protocol/LedgerHeader.cpp.

◆ deserializeHeader()

LedgerHeader ripple::deserializeHeader ( Slice  data,
bool  hasHash = false 
)

Deserialize a ledger header from a byte array.

Definition at line 45 of file libxrpl/protocol/LedgerHeader.cpp.

◆ deserializePrefixedHeader()

LedgerHeader ripple::deserializePrefixedHeader ( Slice  data,
bool  hasHash = false 
)

Deserialize a ledger header (prefixed with 4 bytes) from a byte array.

Definition at line 69 of file libxrpl/protocol/LedgerHeader.cpp.

◆ to_string() [18/29]

std::string ripple::to_string ( MPTAmount const &  amount)

Definition at line 139 of file MPTAmount.h.

◆ mulRatio() [2/3]

MPTAmount ripple::mulRatio ( MPTAmount const &  amt,
std::uint32_t  num,
std::uint32_t  den,
bool  roundUp 
)

Definition at line 145 of file MPTAmount.h.

◆ operator==() [9/28]

constexpr bool ripple::operator== ( MPTIssue const &  lhs,
MPTIssue const &  rhs 
)
constexpr

Definition at line 71 of file MPTIssue.h.

◆ operator<=>() [5/7]

constexpr std::weak_ordering ripple::operator<=> ( MPTIssue const &  lhs,
MPTIssue const &  rhs 
)
constexpr

Definition at line 76 of file MPTIssue.h.

◆ isXRP() [4/5]

bool ripple::isXRP ( MPTID const &  )

MPT is a non-native token.

Definition at line 85 of file MPTIssue.h.

◆ to_json() [3/4]

Json::Value ripple::to_json ( MPTIssue const &  mptIssue)

Definition at line 64 of file MPTIssue.cpp.

◆ to_string() [19/29]

std::string ripple::to_string ( MPTIssue const &  mptIssue)

Definition at line 72 of file MPTIssue.cpp.

◆ mptIssueFromJson()

MPTIssue ripple::mptIssueFromJson ( Json::Value const &  jv)

Definition at line 78 of file MPTIssue.cpp.

◆ canHaveNFTokenID()

bool ripple::canHaveNFTokenID ( std::shared_ptr< STTx const > const &  serializedTx,
TxMeta const &  transactionMeta 
)

Add a nftoken_ids field to the meta output parameter.

The field is only added to successful NFTokenMint, NFTokenAcceptOffer, and NFTokenCancelOffer transactions.

Helper functions are not static because they can be used by Clio.

Definition at line 42 of file NFTokenID.cpp.

◆ getNFTokenIDFromPage()

std::optional< uint256 > ripple::getNFTokenIDFromPage ( TxMeta const &  transactionMeta)

Definition at line 62 of file NFTokenID.cpp.

◆ getNFTokenIDFromDeletedOffer()

std::vector< uint256 > ripple::getNFTokenIDFromDeletedOffer ( TxMeta const &  transactionMeta)

Definition at line 147 of file NFTokenID.cpp.

◆ insertNFTokenID()

void ripple::insertNFTokenID ( Json::Value response,
std::shared_ptr< STTx const > const &  transaction,
TxMeta const &  transactionMeta 
)

Definition at line 172 of file NFTokenID.cpp.

◆ canHaveNFTokenOfferID()

bool ripple::canHaveNFTokenOfferID ( std::shared_ptr< STTx const > const &  serializedTx,
TxMeta const &  transactionMeta 
)

Add an offer_id field to the meta output parameter.

The field is only added to successful NFTokenCreateOffer transactions.

Helper functions are not static because they can be used by Clio.

Definition at line 38 of file NFTokenOfferID.cpp.

◆ getOfferIDFromCreatedOffer()

std::optional< uint256 > ripple::getOfferIDFromCreatedOffer ( TxMeta const &  transactionMeta)

Definition at line 58 of file NFTokenOfferID.cpp.

◆ insertNFTokenOfferID()

void ripple::insertNFTokenOfferID ( Json::Value response,
std::shared_ptr< STTx const > const &  transaction,
TxMeta const &  transactionMeta 
)

Definition at line 72 of file NFTokenOfferID.cpp.

◆ serializePayChanAuthorization()

void ripple::serializePayChanAuthorization ( Serializer msg,
uint256 const &  key,
XRPAmount const &  amt 
)

Definition at line 31 of file include/xrpl/protocol/PayChan.h.

◆ operator<<() [7/16]

std::ostream & ripple::operator<< ( std::ostream os,
PublicKey const &  pk 
)

Print the public key to a stream.

Definition at line 46 of file PublicKey.cpp.

◆ operator==() [10/28]

bool ripple::operator== ( PublicKey const &  lhs,
PublicKey const &  rhs 
)

Definition at line 140 of file PublicKey.h.

◆ operator<() [2/13]

bool ripple::operator< ( PublicKey const &  lhs,
PublicKey const &  rhs 
)

Definition at line 145 of file PublicKey.h.

◆ hash_append() [5/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
PublicKey const &  pk 
)

Definition at line 157 of file PublicKey.h.

◆ toBase58() [2/4]

std::string ripple::toBase58 ( TokenType  type,
PublicKey const &  pk 
)

Definition at line 185 of file PublicKey.h.

◆ parseBase58() [2/10]

template<>
std::optional< PublicKey > ripple::parseBase58 ( TokenType  type,
std::string const &  s 
)

Definition at line 55 of file PublicKey.cpp.

◆ ecdsaCanonicality()

std::optional< ECDSACanonicality > ripple::ecdsaCanonicality ( Slice const &  sig)

Determines the canonicality of a signature.

Determine whether a signature is canonical.

A canonical signature is in its most reduced form. For example the R and S components do not contain additional leading zeroes. However, even in canonical form, (R,S) and (R,G-S) are both valid signatures for message M.

Therefore, to prevent malleability attacks we define a fully canonical signature as one where:

R < G - S

where G is the curve order.

This routine returns std::nullopt if the format of the signature is invalid (for example, the points are encoded incorrectly).

Returns
std::nullopt if the signature fails validity checks.
Note
Only the format of the signature is checked, no verification cryptography is performed.

Canonical signatures are important to protect against signature morphing attacks.

Parameters
vSigthe signature data
sigLenthe length of the signature
strict_paramwhether to enforce strictly canonical semantics
Note
For more details please see: https://xrpl.org/transaction-malleability.html https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623 https://github.com/sipa/bitcoin/commit/58bc86e37fda1aec270bccb3df6c20fbd2a6591c

Definition at line 130 of file PublicKey.cpp.

◆ publicKeyType() [1/2]

std::optional< KeyType > ripple::publicKeyType ( Slice const &  slice)

Returns the type of public key.

Returns
std::nullopt If the public key does not represent a known type.

Definition at line 224 of file PublicKey.cpp.

◆ publicKeyType() [2/2]

std::optional< KeyType > ripple::publicKeyType ( PublicKey const &  publicKey)

Definition at line 234 of file PublicKey.h.

◆ verifyDigest()

bool ripple::verifyDigest ( PublicKey const &  publicKey,
uint256 const &  digest,
Slice const &  sig,
bool  mustBeFullyCanonical = true 
)
noexcept

Verify a secp256k1 signature on the digest of a message.

Definition at line 239 of file PublicKey.cpp.

◆ verify() [1/2]

bool ripple::verify ( PublicKey const &  publicKey,
Slice const &  m,
Slice const &  sig,
bool  mustBeFullyCanonical = true 
)
noexcept

Verify a signature on a message.

With secp256k1 signatures, the data is first hashed with SHA512-Half, and the resulting digest is signed.

Definition at line 289 of file PublicKey.cpp.

◆ calcNodeID()

NodeID ripple::calcNodeID ( PublicKey const &  pk)

Calculate the 160-bit node ID from a node public key.

Definition at line 320 of file PublicKey.cpp.

◆ calcAccountID()

AccountID ripple::calcAccountID ( PublicKey const &  pk)

Definition at line 168 of file AccountID.cpp.

◆ getFingerprint()

std::string ripple::getFingerprint ( beast::IP::Endpoint const &  address,
std::optional< PublicKey > const &  publicKey = std::nullopt,
std::optional< std::string > const &  id = std::nullopt 
)

Definition at line 269 of file PublicKey.h.

◆ operator==() [11/28]

bool ripple::operator== ( Rate const &  lhs,
Rate const &  rhs 
)
noexcept

Definition at line 51 of file Rate.h.

◆ operator<() [3/13]

bool ripple::operator< ( Rate const &  lhs,
Rate const &  rhs 
)
noexcept

Definition at line 56 of file Rate.h.

◆ operator<<() [8/16]

std::ostream & ripple::operator<< ( std::ostream os,
Rate const &  rate 
)

Definition at line 62 of file Rate.h.

◆ multiply() [1/3]

STAmount ripple::multiply ( STAmount const &  amount,
Rate const &  rate 
)

Definition at line 53 of file Rate2.cpp.

◆ multiplyRound() [1/2]

STAmount ripple::multiplyRound ( STAmount const &  amount,
Rate const &  rate,
bool  roundUp 
)

Definition at line 64 of file Rate2.cpp.

◆ multiplyRound() [2/2]

STAmount ripple::multiplyRound ( STAmount const &  amount,
Rate const &  rate,
Asset const &  asset,
bool  roundUp 
)

Definition at line 75 of file Rate2.cpp.

◆ divide() [1/2]

STAmount ripple::divide ( STAmount const &  amount,
Rate const &  rate 
)

Definition at line 93 of file Rate2.cpp.

◆ divideRound() [1/2]

STAmount ripple::divideRound ( STAmount const &  amount,
Rate const &  rate,
bool  roundUp 
)

Definition at line 104 of file Rate2.cpp.

◆ divideRound() [2/2]

STAmount ripple::divideRound ( STAmount const &  amount,
Rate const &  rate,
Asset const &  asset,
bool  roundUp 
)

Definition at line 115 of file Rate2.cpp.

◆ isRpcError()

bool ripple::isRpcError ( Json::Value  jvResult)

Definition at line 40 of file RPCErr.cpp.

◆ rpcError()

Json::Value ripple::rpcError ( int  iError)

Definition at line 31 of file RPCErr.cpp.

◆ isFeatureEnabled()

bool ripple::isFeatureEnabled ( uint256 const &  feature)

Definition at line 155 of file Rules.cpp.

◆ getCurrentTransactionRules()

std::optional< Rules > const & ripple::getCurrentTransactionRules ( )

Definition at line 47 of file Rules.cpp.

◆ setCurrentTransactionRules()

void ripple::setCurrentTransactionRules ( std::optional< Rules r)

Definition at line 53 of file Rules.cpp.

◆ operator==() [12/28]

bool ripple::operator== ( SecretKey const &  lhs,
SecretKey const &  rhs 
)

Definition at line 101 of file SecretKey.h.

◆ operator!=() [4/9]

bool ripple::operator!= ( SecretKey const &  lhs,
SecretKey const &  rhs 
)

Definition at line 108 of file SecretKey.h.

◆ parseBase58() [3/10]

template<>
std::optional< SecretKey > ripple::parseBase58 ( TokenType  type,
std::string const &  s 
)

Parse a secret key.

Definition at line 55 of file PublicKey.cpp.

◆ toBase58() [3/4]

std::string ripple::toBase58 ( TokenType  type,
SecretKey const &  sk 
)

Definition at line 121 of file SecretKey.h.

◆ randomSecretKey()

SecretKey ripple::randomSecretKey ( )

Create a secret key using secure random numbers.

Definition at line 299 of file SecretKey.cpp.

◆ generateSecretKey()

SecretKey ripple::generateSecretKey ( KeyType  type,
Seed const &  seed 
)

Generate a new secret key deterministically.

Definition at line 309 of file SecretKey.cpp.

◆ derivePublicKey()

PublicKey ripple::derivePublicKey ( KeyType  type,
SecretKey const &  sk 
)

Derive the public key from a secret key.

Definition at line 331 of file SecretKey.cpp.

◆ generateKeyPair()

std::pair< PublicKey, SecretKey > ripple::generateKeyPair ( KeyType  type,
Seed const &  seed 
)

Generate a key pair deterministically.

This algorithm is specific to Ripple:

For secp256k1 key pairs, the seed is converted to a Generator and used to compute the key pair corresponding to ordinal 0 for the generator.

Definition at line 369 of file SecretKey.cpp.

◆ randomKeyPair()

std::pair< PublicKey, SecretKey > ripple::randomKeyPair ( KeyType  type)

Create a key pair using secure random numbers.

Definition at line 386 of file SecretKey.cpp.

◆ signDigest() [1/2]

Buffer ripple::signDigest ( PublicKey const &  pk,
SecretKey const &  sk,
uint256 const &  digest 
)

Generate a signature for a message digest.

This can only be used with secp256k1 since Ed25519's security properties come, in part, from how the message is hashed.

Definition at line 230 of file SecretKey.cpp.

◆ signDigest() [2/2]

Buffer ripple::signDigest ( KeyType  type,
SecretKey const &  sk,
uint256 const &  digest 
)

Definition at line 163 of file SecretKey.h.

◆ sign() [1/3]

Buffer ripple::sign ( PublicKey const &  pk,
SecretKey const &  sk,
Slice const &  message 
)

Generate a signature for a message.

With secp256k1 signatures, the data is first hashed with SHA512-Half, and the resulting digest is signed.

Definition at line 256 of file SecretKey.cpp.

◆ sign() [2/3]

Buffer ripple::sign ( KeyType  type,
SecretKey const &  sk,
Slice const &  message 
)

Definition at line 178 of file SecretKey.h.

◆ randomSeed()

Seed ripple::randomSeed ( )

Create a seed using secure random numbers.

Definition at line 66 of file Seed.cpp.

◆ generateSeed()

Seed ripple::generateSeed ( std::string const &  passPhrase)

Generate a seed deterministically.

The algorithm is specific to Ripple:

The seed is calculated as the first 128 bits
of the SHA512-Half of the string text excluding
any terminating null.
Note
This will not attempt to determine the format of the string (e.g. hex or base58).

Definition at line 76 of file Seed.cpp.

◆ parseBase58() [4/10]

template<>
std::optional< Seed > ripple::parseBase58 ( std::string const &  s)

Parse a Base58 encoded string into a seed.

Parse a Base58 encoded string into a seed.

Returns
std::nullopt if a parse error occurs

Definition at line 124 of file AccountID.cpp.

◆ parseGenericSeed()

std::optional< Seed > ripple::parseGenericSeed ( std::string const &  str,
bool  rfc1751 = true 
)

Attempt to parse a string as a seed.

Parameters
strthe string to parse
rfc1751true if we should attempt RFC1751 style parsing (deprecated)

Definition at line 97 of file Seed.cpp.

◆ seedAs1751()

std::string ripple::seedAs1751 ( Seed const &  seed)

Encode a Seed in RFC1751 format.

Definition at line 135 of file Seed.cpp.

◆ toBase58() [4/4]

std::string ripple::toBase58 ( Seed const &  seed)

Format a seed as a Base58 string.

Definition at line 134 of file Seed.h.

◆ serializeBlob()

template<class Object >
Blob ripple::serializeBlob ( Object const &  o)

Serialize an object to a blob.

Definition at line 32 of file serialize.h.

◆ serializeHex()

std::string ripple::serializeHex ( STObject const &  o)

Serialize an object to a hex string.

Definition at line 41 of file serialize.h.

◆ field_code() [1/2]

int ripple::field_code ( SerializedTypeID  id,
int  index 
)

Definition at line 123 of file SField.h.

◆ field_code() [2/2]

int ripple::field_code ( int  id,
int  index 
)

Definition at line 130 of file SField.h.

◆ operator~() [2/2]

template<class T >
OptionaledField< T > ripple::operator~ ( TypedField< T > const &  f)

Definition at line 340 of file SField.h.

◆ sign() [3/3]

void ripple::sign ( STObject st,
HashPrefix const &  prefix,
KeyType  type,
SecretKey const &  sk,
SF_VL const &  sigField = sfSignature 
)

Sign an STObject.

Parameters
stObject to sign
prefixPrefix to insert before serialized object when hashing
typeSigning key type used to derive public key
skSigning secret key
sigFieldField in which to store the signature on the object. If not specified the value defaults to sfSignature.
Note
If a signature already exists, it is overwritten.

Definition at line 34 of file Sign.cpp.

◆ verify() [2/2]

bool ripple::verify ( STObject const &  st,
HashPrefix const &  prefix,
PublicKey const &  pk,
SF_VL const &  sigField = sfSignature 
)

Returns true if STObject contains valid signature.

Parameters
stSigned object
prefixPrefix inserted before serialized object when hashing
pkPublic key for verifying signature
sigFieldObject's field containing the signature. If not specified the value defaults to sfSignature.

Definition at line 48 of file Sign.cpp.

◆ buildMultiSigningData()

Serializer ripple::buildMultiSigningData ( STObject const &  obj,
AccountID const &  signingID 
)

Return a Serializer suitable for computing a multisigning TxnSignature.

Definition at line 96 of file Sign.cpp.

◆ startMultiSigningData()

Serializer ripple::startMultiSigningData ( STObject const &  obj)

Break the multi-signing hash computation into 2 parts for optimization.

We can optimize verifying multiple multisignatures by splitting the data building into two parts; o A large part that is shared by all of the computations. o A small part that is unique to each signer in the multisignature.

The following methods support that optimization:

  1. startMultiSigningData provides the large part which can be shared.
  2. finishMultiSigningData caps the passed in serializer with each signer's unique data.

Definition at line 104 of file Sign.cpp.

◆ finishMultiSigningData()

void ripple::finishMultiSigningData ( AccountID const &  signingID,
Serializer s 
)

Definition at line 84 of file Sign.h.

◆ operator==() [13/28]

bool ripple::operator== ( STAccount const &  lhs,
STAccount const &  rhs 
)

Definition at line 105 of file STAccount.h.

◆ operator<() [4/13]

auto ripple::operator< ( STAccount const &  lhs,
STAccount const &  rhs 
)

Definition at line 110 of file STAccount.h.

◆ operator==() [14/28]

bool ripple::operator== ( STAccount const &  lhs,
AccountID const &  rhs 
)

Definition at line 117 of file STAccount.h.

◆ operator<() [5/13]

auto ripple::operator< ( STAccount const &  lhs,
AccountID const &  rhs 
)

Definition at line 122 of file STAccount.h.

◆ operator<() [6/13]

auto ripple::operator< ( AccountID const &  lhs,
STAccount const &  rhs 
)

Definition at line 128 of file STAccount.h.

◆ amountFromQuality()

STAmount ripple::amountFromQuality ( std::uint64_t  rate)

Definition at line 984 of file STAmount.cpp.

◆ amountFromString()

STAmount ripple::amountFromString ( Asset const &  asset,
std::string const &  amount 
)

Definition at line 996 of file STAmount.cpp.

◆ amountFromJson()

STAmount ripple::amountFromJson ( SField const &  name,
Json::Value const &  v 
)

Definition at line 1006 of file STAmount.cpp.

◆ amountFromJsonNoThrow()

bool ripple::amountFromJsonNoThrow ( STAmount result,
Json::Value const &  jvSource 
)

Definition at line 1134 of file STAmount.cpp.

◆ toSTAmount() [6/6]

STAmount const & ripple::toSTAmount ( STAmount const &  a)

Definition at line 440 of file STAmount.h.

◆ isLegalNet()

bool ripple::isLegalNet ( STAmount const &  value)

Definition at line 600 of file STAmount.h.

◆ operator==() [15/28]

bool ripple::operator== ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 1156 of file STAmount.cpp.

◆ operator<() [7/13]

bool ripple::operator< ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 1162 of file STAmount.cpp.

◆ operator!=() [5/9]

bool ripple::operator!= ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 617 of file STAmount.h.

◆ operator>() [1/2]

bool ripple::operator> ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 623 of file STAmount.h.

◆ operator<=() [1/2]

bool ripple::operator<= ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 628 of file STAmount.h.

◆ operator>=() [1/2]

bool ripple::operator>= ( STAmount const &  lhs,
STAmount const &  rhs 
)

Definition at line 635 of file STAmount.h.

◆ operator-() [2/3]

STAmount ripple::operator- ( STAmount const &  value)

Definition at line 1198 of file STAmount.cpp.

◆ operator+() [3/3]

STAmount ripple::operator+ ( STAmount const &  v1,
STAmount const &  v2 
)

Definition at line 364 of file STAmount.cpp.

◆ operator-() [3/3]

STAmount ripple::operator- ( STAmount const &  v1,
STAmount const &  v2 
)

Definition at line 438 of file STAmount.cpp.

◆ divide() [2/2]

STAmount ripple::divide ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset 
)

Definition at line 1265 of file STAmount.cpp.

◆ multiply() [2/3]

STAmount ripple::multiply ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset 
)

Definition at line 1310 of file STAmount.cpp.

◆ mulRound()

STAmount ripple::mulRound ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset,
bool  roundUp 
)

Definition at line 1615 of file STAmount.cpp.

◆ mulRoundStrict()

STAmount ripple::mulRoundStrict ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset,
bool  roundUp 
)

Definition at line 1626 of file STAmount.cpp.

◆ divRound()

STAmount ripple::divRound ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset,
bool  roundUp 
)

Definition at line 1722 of file STAmount.cpp.

◆ divRoundStrict()

STAmount ripple::divRoundStrict ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset,
bool  roundUp 
)

Definition at line 1732 of file STAmount.cpp.

◆ getRate()

std::uint64_t ripple::getRate ( STAmount const &  offerOut,
STAmount const &  offerIn 
)

Definition at line 463 of file STAmount.cpp.

◆ isXRP() [5/5]

bool ripple::isXRP ( STAmount const &  amount)

Definition at line 701 of file STAmount.h.

◆ canAdd()

bool ripple::canAdd ( STAmount const &  a,
STAmount const &  b 
)

Safely checks if two STAmount values can be added without overflow, underflow, or precision loss.

This function determines whether the addition of two STAmount objects is safe, depending on their type:

  • For XRP amounts, it checks for integer overflow and underflow.
  • For IOU amounts, it checks for acceptable precision loss.
  • For MPT amounts, it checks for overflow and underflow within 63-bit signed integer limits.
  • If either amount is zero, addition is always considered safe.
  • If the amounts are of different currencies or types, addition is not allowed.
Parameters
aThe first STAmount to add.
bThe second STAmount to add.
Returns
true if the addition is safe; false otherwise.

Definition at line 505 of file STAmount.cpp.

◆ canSubtract()

bool ripple::canSubtract ( STAmount const &  a,
STAmount const &  b 
)

Determines if it is safe to subtract one STAmount from another.

This function checks whether subtracting amount b from amount a is valid, considering currency compatibility and underflow conditions for specific types.

  • Subtracting zero is always allowed.
  • Subtraction is only allowed between comparable currencies.
  • For XRP amounts, ensures no underflow or overflow occurs.
  • For IOU amounts, subtraction is always allowed (no underflow).
  • For MPT amounts, ensures no underflow or overflow occurs.
Parameters
aThe minuend (amount to subtract from).
bThe subtrahend (amount to subtract).
Returns
true if subtraction is allowed, false otherwise.

Definition at line 585 of file STAmount.cpp.

◆ to_json() [4/4]

template<typename T >
requires requires(T const& t) { { t.getJson(JsonOptions::none) } -> std::convertible_to<Json::Value>; }
Json::Value ripple::to_json ( T const &  t)

Definition at line 99 of file STBase.h.

◆ operator<<() [9/16]

std::ostream & ripple::operator<< ( std::ostream out,
STBase const &  t 
)

Definition at line 158 of file STBase.cpp.

◆ currencyFromJson()

STCurrency ripple::currencyFromJson ( SField const &  name,
Json::Value const &  v 
)

Definition at line 106 of file STCurrency.cpp.

◆ operator==() [16/28]

bool ripple::operator== ( STCurrency const &  lhs,
STCurrency const &  rhs 
)

Definition at line 107 of file STCurrency.h.

◆ operator!=() [6/9]

bool ripple::operator!= ( STCurrency const &  lhs,
STCurrency const &  rhs 
)

Definition at line 113 of file STCurrency.h.

◆ operator<() [8/13]

bool ripple::operator< ( STCurrency const &  lhs,
STCurrency const &  rhs 
)

Definition at line 118 of file STCurrency.h.

◆ operator==() [17/28]

bool ripple::operator== ( STCurrency const &  lhs,
Currency const &  rhs 
)

Definition at line 125 of file STCurrency.h.

◆ operator<() [9/13]

bool ripple::operator< ( STCurrency const &  lhs,
Currency const &  rhs 
)

Definition at line 130 of file STCurrency.h.

◆ get() [4/7]

template<class T , class U >
std::optional< T > ripple::get ( STObject const &  st,
TypedField< U > const &  f 
)

Return the value of a field in an STObject as a given type.

Definition at line 116 of file STExchange.h.

◆ get() [5/7]

template<class U >
std::optional< typename STExchange< U, typename U::value_type >::value_type > ripple::get ( STObject const &  st,
TypedField< U > const &  f 
)

Definition at line 135 of file STExchange.h.

◆ set() [3/5]

template<class U , class T >
void ripple::set ( STObject st,
TypedField< U > const &  f,
T &&  t 
)

Set a field value in an STObject.

Definition at line 144 of file STExchange.h.

◆ set() [4/5]

template<class Init >
void ripple::set ( STObject st,
TypedField< STBlob > const &  f,
std::size_t  size,
Init &&  init 
)

Set a blob field using an init function.

Definition at line 153 of file STExchange.h.

◆ set() [5/5]

template<class = void>
void ripple::set ( STObject st,
TypedField< STBlob > const &  f,
void const *  data,
std::size_t  size 
)

Set a blob field from data.

Definition at line 161 of file STExchange.h.

◆ erase()

template<class U >
void ripple::erase ( STObject st,
TypedField< U > const &  f 
)

Remove a field in an STObject.

Definition at line 172 of file STExchange.h.

◆ issueFromJson() [2/2]

STIssue ripple::issueFromJson ( SField const &  name,
Json::Value const &  v 
)

Definition at line 156 of file STIssue.cpp.

◆ operator==() [18/28]

constexpr bool ripple::operator== ( STIssue const &  lhs,
STIssue const &  rhs 
)
constexpr

Definition at line 149 of file STIssue.h.

◆ operator<=>() [6/7]

constexpr std::weak_ordering ripple::operator<=> ( STIssue const &  lhs,
STIssue const &  rhs 
)
constexpr

Definition at line 154 of file STIssue.h.

◆ operator==() [19/28]

constexpr bool ripple::operator== ( STIssue const &  lhs,
Asset const &  rhs 
)
constexpr

Definition at line 161 of file STIssue.h.

◆ operator<=>() [7/7]

constexpr std::weak_ordering ripple::operator<=> ( STIssue const &  lhs,
Asset const &  rhs 
)
constexpr

Definition at line 166 of file STIssue.h.

◆ operator<<() [10/16]

std::ostream & ripple::operator<< ( std::ostream out,
STNumber const &  rhs 
)

Definition at line 116 of file STNumber.cpp.

◆ partsFromString()

NumberParts ripple::partsFromString ( std::string const &  number)

Definition at line 123 of file STNumber.cpp.

◆ numberFromJson()

STNumber ripple::numberFromJson ( SField const &  field,
Json::Value const &  value 
)

Definition at line 179 of file STNumber.cpp.

◆ throwFieldNotFound()

void ripple::throwFieldNotFound ( SField const &  field)

Definition at line 51 of file STObject.h.

◆ passesLocalChecks()

bool ripple::passesLocalChecks ( STObject const &  st,
std::string reason 
)

Definition at line 831 of file STTx.cpp.

◆ sterilize()

std::shared_ptr< STTx const > ripple::sterilize ( STTx const &  stx)

Sterilize a transaction.

The transaction is serialized and then deserialized, ensuring that all equivalent transactions are in canonical form. This also ensures that program metadata such as the transaction's digest, are all computed.

Definition at line 861 of file STTx.cpp.

◆ isPseudoTx()

bool ripple::isPseudoTx ( STObject const &  tx)

Check whether a transaction is a pseudo-transaction.

Definition at line 870 of file STTx.cpp.

◆ operator==() [20/28]

bool ripple::operator== ( STXChainBridge const &  lhs,
STXChainBridge const &  rhs 
)

Definition at line 135 of file STXChainBridge.h.

◆ operator<() [10/13]

bool ripple::operator< ( STXChainBridge const &  lhs,
STXChainBridge const &  rhs 
)

Definition at line 149 of file STXChainBridge.h.

◆ systemName()

static std::string const & ripple::systemName ( )
static

Definition at line 35 of file SystemParameters.h.

◆ isLegalAmount()

bool ripple::isLegalAmount ( XRPAmount const &  amount)

Returns true if the amount does not exceed the initial XRP in existence.

Definition at line 48 of file SystemParameters.h.

◆ isLegalAmountSigned()

bool ripple::isLegalAmountSigned ( XRPAmount const &  amount)

Returns true if the absolute value of the amount does not exceed the initial XRP in existence.

Definition at line 56 of file SystemParameters.h.

◆ systemCurrencyCode()

static std::string const & ripple::systemCurrencyCode ( )
static

Definition at line 63 of file SystemParameters.h.

◆ TERtoInt() [1/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TELcodes  v)
constexpr

Definition at line 375 of file TER.h.

◆ TERtoInt() [2/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TEMcodes  v)
constexpr

Definition at line 381 of file TER.h.

◆ TERtoInt() [3/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TEFcodes  v)
constexpr

Definition at line 387 of file TER.h.

◆ TERtoInt() [4/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TERcodes  v)
constexpr

Definition at line 393 of file TER.h.

◆ TERtoInt() [5/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TEScodes  v)
constexpr

Definition at line 399 of file TER.h.

◆ TERtoInt() [6/6]

constexpr TERUnderlyingType ripple::TERtoInt ( TECcodes  v)
constexpr

Definition at line 405 of file TER.h.

◆ operator==() [21/28]

template<typename L , typename R >
constexpr auto ripple::operator== ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 510 of file TER.h.

◆ operator!=() [7/9]

template<typename L , typename R >
constexpr auto ripple::operator!= ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 521 of file TER.h.

◆ operator<() [11/13]

template<typename L , typename R >
constexpr auto ripple::operator< ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 531 of file TER.h.

◆ operator<=() [2/2]

template<typename L , typename R >
constexpr auto ripple::operator<= ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 542 of file TER.h.

◆ operator>() [2/2]

template<typename L , typename R >
constexpr auto ripple::operator> ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 554 of file TER.h.

◆ operator>=() [2/2]

template<typename L , typename R >
constexpr auto ripple::operator>= ( L const &  lhs,
R const &  rhs 
) -> std::enable_if_t< std::is_same<decltype(TERtoInt(lhs)), int>::value && std::is_same<decltype(TERtoInt(rhs)), int>::value, bool>
constexpr

Definition at line 565 of file TER.h.

◆ isTelLocal()

bool ripple::isTelLocal ( TER  x)
noexcept

Definition at line 654 of file TER.h.

◆ isTemMalformed()

bool ripple::isTemMalformed ( TER  x)
noexcept

Definition at line 660 of file TER.h.

◆ isTefFailure()

bool ripple::isTefFailure ( TER  x)
noexcept

Definition at line 666 of file TER.h.

◆ isTerRetry()

bool ripple::isTerRetry ( TER  x)
noexcept

Definition at line 672 of file TER.h.

◆ isTesSuccess()

bool ripple::isTesSuccess ( TER  x)
noexcept

Definition at line 678 of file TER.h.

◆ isTecClaim()

bool ripple::isTecClaim ( TER  x)
noexcept

Definition at line 685 of file TER.h.

◆ transResults()

std::unordered_map< TERUnderlyingType, std::pair< char const *const, char const *const > > const & ripple::transResults ( )

Definition at line 35 of file TER.cpp.

◆ transResultInfo()

bool ripple::transResultInfo ( TER  code,
std::string token,
std::string text 
)

Definition at line 249 of file TER.cpp.

◆ transToken()

std::string ripple::transToken ( TER  code)

Definition at line 264 of file TER.cpp.

◆ transHuman()

std::string ripple::transHuman ( TER  code)

Definition at line 273 of file TER.cpp.

◆ transCode()

std::optional< TER > ripple::transCode ( std::string const &  token)

Definition at line 282 of file TER.cpp.

◆ parseBase58() [5/10]

template<class T >
std::optional< T > ripple::parseBase58 ( std::string const &  s)

◆ parseBase58() [6/10]

template<class T >
std::optional< T > ripple::parseBase58 ( TokenType  type,
std::string const &  s 
)

◆ encodeBase58Token()

std::string ripple::encodeBase58Token ( TokenType  type,
void const *  token,
std::size_t  size 
)

Encode data in Base58Check format using XRPL alphabet.

For details on the format see https://xrpl.org/base58-encodings.html#base58-encodings

Parameters
typeThe type of token to encode.
tokenPointer to the data to encode.
sizeThe size of the data to encode.
Returns
the encoded token.

Definition at line 199 of file tokens.cpp.

◆ decodeBase58Token()

std::string ripple::decodeBase58Token ( std::string const &  s,
TokenType  type 
)

Definition at line 209 of file tokens.cpp.

◆ xrpCurrency()

Currency const & ripple::xrpCurrency ( )

XRP currency.

Definition at line 119 of file UintTypes.cpp.

◆ noCurrency()

Currency const & ripple::noCurrency ( )

A placeholder for empty currencies.

Definition at line 126 of file UintTypes.cpp.

◆ badCurrency()

Currency const & ripple::badCurrency ( )

We deliberately disallow the currency that looks like "XRP" because too many people were using it instead of the correct XRP currency.

Definition at line 133 of file UintTypes.cpp.

◆ to_currency() [1/2]

bool ripple::to_currency ( Currency currency,
std::string const &  code 
)

Tries to convert a string to a Currency, returns true on success.

Note
This function will return success if the resulting currency is badCurrency(). This legacy behavior is unfortunate; changing this will require very careful checking everywhere and may mean having to rewrite some unit test code.

Definition at line 84 of file UintTypes.cpp.

◆ to_currency() [2/2]

Currency ripple::to_currency ( std::string const &  code)

Tries to convert a string to a Currency, returns noCurrency() on failure.

Note
This function can return badCurrency(). This legacy behavior is unfortunate; changing this will require very careful checking everywhere and may mean having to rewrite some unit test code.

Definition at line 110 of file UintTypes.cpp.

◆ mulDiv() [2/7]

template<class Source1 , class Source2 , unit::muldivable< Source1, Source2 > Dest>
std::optional< Dest > ripple::mulDiv ( Source1  value,
Dest  mul,
Source2  div 
)

Definition at line 466 of file Units.h.

◆ mulDiv() [3/7]

template<class Source1 , class Source2 , unit::muldivCommutable< Source1, Source2 > Dest>
std::optional< Dest > ripple::mulDiv ( Dest  value,
Source1  mul,
Source2  div 
)

Definition at line 476 of file Units.h.

◆ mulDiv() [4/7]

template<unit::muldivDest Dest>
std::optional< Dest > ripple::mulDiv ( std::uint64_t  value,
Dest  mul,
std::uint64_t  div 
)

Definition at line 484 of file Units.h.

◆ mulDiv() [5/7]

template<unit::muldivDest Dest>
std::optional< Dest > ripple::mulDiv ( Dest  value,
std::uint64_t  mul,
std::uint64_t  div 
)

Definition at line 493 of file Units.h.

◆ mulDiv() [6/7]

template<unit::muldivSource Source1, unit::muldivSources< Source1 > Source2>
std::optional< std::uint64_t > ripple::mulDiv ( Source1  value,
std::uint64_t  mul,
Source2  div 
)

Definition at line 501 of file Units.h.

◆ mulDiv() [7/7]

template<unit::muldivSource Source1, unit::muldivSources< Source1 > Source2>
std::optional< std::uint64_t > ripple::mulDiv ( std::uint64_t  value,
Source1  mul,
Source2  div 
)

Definition at line 515 of file Units.h.

◆ safe_cast() [4/4]

template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src>
constexpr Dest ripple::safe_cast ( Src  s)
constexprnoexcept

Definition at line 523 of file Units.h.

◆ unsafe_cast() [4/4]

template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src>
constexpr Dest ripple::unsafe_cast ( Src  s)
constexprnoexcept

Definition at line 539 of file Units.h.

◆ operator==() [22/28]

template<class TAttestation >
bool ripple::operator== ( XChainAttestationsBase< TAttestation > const &  lhs,
XChainAttestationsBase< TAttestation > const &  rhs 
)

Definition at line 442 of file XChainAttestations.h.

◆ operator<<() [11/16]

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & ripple::operator<< ( std::basic_ostream< Char, Traits > &  os,
XRPAmount const &  q 
)

Definition at line 262 of file XRPAmount.h.

◆ to_string() [20/29]

std::string ripple::to_string ( XRPAmount const &  amount)

Definition at line 276 of file XRPAmount.h.

◆ mulRatio() [3/3]

XRPAmount ripple::mulRatio ( XRPAmount const &  amt,
std::uint32_t  num,
std::uint32_t  den,
bool  roundUp 
)

Definition at line 282 of file XRPAmount.h.

◆ HTTPReply()

void ripple::HTTPReply ( int  nStatus,
std::string const &  strMsg,
Json::Output const &  output,
beast::Journal  j 
)

Definition at line 58 of file JSONRPCUtil.cpp.

◆ get_lowest_layer()

template<class T >
decltype(auto) ripple::get_lowest_layer ( T &  t)
noexcept

Definition at line 35 of file LowestLayer.h.

◆ operator<<() [12/16]

std::ostream & ripple::operator<< ( std::ostream os,
Port const &  p 
)

Definition at line 61 of file Port.cpp.

◆ parse_Port()

void ripple::parse_Port ( ParsedPort port,
Section const &  section,
std::ostream log 
)

Definition at line 214 of file Port.cpp.

◆ make_Server()

template<class Handler >
std::unique_ptr< Server > ripple::make_Server ( Handler &  handler,
boost::asio::io_context &  io_context,
beast::Journal  journal 
)

Create the HTTP server using the specified handler.

Definition at line 35 of file Server.h.

◆ popcnt16()

int ripple::popcnt16 ( std::uint16_t  a)

Definition at line 224 of file TaggedPointer.h.

◆ operator==() [23/28]

bool ripple::operator== ( SHAMap::const_iterator const &  x,
SHAMap::const_iterator const &  y 
)

Definition at line 739 of file SHAMap.h.

◆ operator!=() [8/9]

bool ripple::operator!= ( SHAMap::const_iterator const &  x,
SHAMap::const_iterator const &  y 
)

Definition at line 749 of file SHAMap.h.

◆ intrusive_ptr_add_ref()

void ripple::intrusive_ptr_add_ref ( SHAMapItem const *  x)

Definition at line 132 of file SHAMapItem.h.

◆ intrusive_ptr_release()

void ripple::intrusive_ptr_release ( SHAMapItem const *  x)

Definition at line 141 of file SHAMapItem.h.

◆ make_shamapitem() [1/2]

boost::intrusive_ptr< SHAMapItem > ripple::make_shamapitem ( uint256 const &  tag,
Slice  data 
)

Definition at line 161 of file SHAMapItem.h.

◆ make_shamapitem() [2/2]

boost::intrusive_ptr< SHAMapItem > ripple::make_shamapitem ( SHAMapItem const &  other)

Definition at line 185 of file SHAMapItem.h.

◆ to_string() [21/29]

std::string ripple::to_string ( SHAMapType  t)

Definition at line 40 of file SHAMapMissingNode.h.

◆ to_string() [22/29]

std::string ripple::to_string ( SHAMapNodeID const &  node)

Definition at line 123 of file SHAMapNodeID.h.

◆ operator<<() [13/16]

std::ostream & ripple::operator<< ( std::ostream out,
SHAMapNodeID const &  node 
)

Definition at line 132 of file SHAMapNodeID.h.

◆ deserializeSHAMapNodeID() [1/2]

std::optional< SHAMapNodeID > ripple::deserializeSHAMapNodeID ( void const *  data,
std::size_t  size 
)

Return an object representing a serialized SHAMap Node ID.

Parameters
sA string of bytes
dataa non-null pointer to a buffer of
sizebytes.
sizethe size, in bytes, of the buffer pointed to by
data.
Returns
A seated optional if the buffer contained a serialized SHAMap node ID and an unseated optional otherwise.

Definition at line 108 of file SHAMapNodeID.cpp.

◆ deserializeSHAMapNodeID() [2/2]

std::optional< SHAMapNodeID > ripple::deserializeSHAMapNodeID ( std::string const &  s)

Definition at line 151 of file SHAMapNodeID.h.

◆ selectBranch()

unsigned int ripple::selectBranch ( SHAMapNodeID const &  id,
uint256 const &  hash 
)

Returns the branch that would contain the given hash.

Definition at line 128 of file SHAMapNodeID.cpp.

◆ operator<<() [14/16]

std::ostream & ripple::operator<< ( std::ostream os,
Section const &  section 
)

Definition at line 119 of file BasicConfig.cpp.

◆ operator<<() [15/16]

std::ostream & ripple::operator<< ( std::ostream ss,
BasicConfig const &  c 
)

Definition at line 197 of file BasicConfig.cpp.

◆ debugSink()

static DebugSink & ripple::debugSink ( )
static

Definition at line 463 of file Log.cpp.

◆ divu10()

static unsigned ripple::divu10 ( uint128_t &  u)
static

Definition at line 354 of file Number.cpp.

◆ confineOwnerCount()

static std::uint32_t ripple::confineOwnerCount ( std::uint32_t  current,
std::int32_t  adjustment,
std::optional< AccountID > const &  id = std::nullopt,
beast::Journal  j = beast::Journal{beast::Journal::getNullSink()} 
)
static

Definition at line 580 of file View.cpp.

◆ canAddHolding() [2/3]

TER ripple::canAddHolding ( ReadView const &  view,
Issue const &  issue 
)

Definition at line 1178 of file View.cpp.

◆ canAddHolding() [3/3]

TER ripple::canAddHolding ( ReadView const &  view,
MPTIssue const &  mptIssue 
)

Definition at line 1193 of file View.cpp.

◆ rippleCreditIOU()

static TER ripple::rippleCreditIOU ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
bool  bCheckIssuer,
beast::Journal  j 
)
static

Definition at line 1708 of file View.cpp.

◆ rippleSendIOU()

static TER ripple::rippleSendIOU ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
STAmount saActual,
beast::Journal  j,
WaiveTransferFee  waiveFee 
)
static

Definition at line 1862 of file View.cpp.

◆ accountSendIOU()

static TER ripple::accountSendIOU ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
beast::Journal  j,
WaiveTransferFee  waiveFee 
)
static

Definition at line 1914 of file View.cpp.

◆ rippleCreditMPT()

static TER ripple::rippleCreditMPT ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
beast::Journal  j 
)
static

Definition at line 2038 of file View.cpp.

◆ rippleSendMPT()

static TER ripple::rippleSendMPT ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
STAmount saActual,
beast::Journal  j,
WaiveTransferFee  waiveFee 
)
static

Definition at line 2100 of file View.cpp.

◆ accountSendMPT()

static TER ripple::accountSendMPT ( ApplyView view,
AccountID const &  uSenderID,
AccountID const &  uReceiverID,
STAmount const &  saAmount,
beast::Journal  j,
WaiveTransferFee  waiveFee 
)
static

Definition at line 2166 of file View.cpp.

◆ updateTrustLine()

static bool ripple::updateTrustLine ( ApplyView view,
SLE::pointer  state,
bool  bSenderHigh,
AccountID const &  sender,
STAmount const &  before,
STAmount const &  after,
beast::Journal  j 
)
static

Definition at line 2212 of file View.cpp.

◆ cleanupOnAccountDelete() [2/2]

TER ripple::cleanupOnAccountDelete ( ApplyView view,
Keylet const &  ownerDirKeylet,
EntryDeleter const &  deleter,
beast::Journal  j,
std::optional< uint16_t >  maxNodesToDelete 
)

Definition at line 2724 of file View.cpp.

◆ parseBase58() [7/10]

template<>
std::optional< AccountID > ripple::parseBase58 ( std::string const &  s)

Parse AccountID from checked, base58 string.

Parse a Base58 encoded string into a seed.

Returns
std::nullopt if a parse error occurs

Definition at line 124 of file AccountID.cpp.

◆ hash_value()

std::size_t ripple::hash_value ( ripple::uint256 const &  feature)

Definition at line 44 of file Feature.cpp.

◆ registerFeature()

uint256 ripple::registerFeature ( std::string const &  name,
Supported  support,
VoteBehavior  vote 
)

Definition at line 388 of file Feature.cpp.

◆ retireFeature()

uint256 ripple::retireFeature ( std::string const &  name)

Definition at line 396 of file Feature.cpp.

◆ registrationIsDone()

bool ripple::registrationIsDone ( )

Tell FeatureCollections when registration is complete.

Definition at line 403 of file Feature.cpp.

◆ indexHash()

template<class... Args>
static uint256 ripple::indexHash ( LedgerNameSpace  space,
Args const &...  args 
)
static

Definition at line 109 of file Indexes.cpp.

◆ parseBase58() [8/10]

template<>
std::optional< PublicKey > ripple::parseBase58 ( TokenType  type,
std::string const &  s 
)

Parse a secret key.

Definition at line 55 of file PublicKey.cpp.

◆ sigPart()

static std::optional< Slice > ripple::sigPart ( Slice buf)
static

Definition at line 69 of file PublicKey.cpp.

◆ sliceToHex()

static std::string ripple::sliceToHex ( Slice const &  slice)
static

Definition at line 95 of file PublicKey.cpp.

◆ ed25519Canonical()

static bool ripple::ed25519Canonical ( Slice const &  sig)
static

Definition at line 172 of file PublicKey.cpp.

◆ ceil_in_impl()

template<STAmount( *DivRoundFunc)(STAmount const &, STAmount const &, Asset const &, bool) >
static Amounts ripple::ceil_in_impl ( Amounts const &  amount,
STAmount const &  limit,
bool  roundUp,
Quality const &  quality 
)
static

Definition at line 77 of file Quality.cpp.

◆ ceil_out_impl()

template<STAmount( *MulRoundFunc)(STAmount const &, STAmount const &, Asset const &, bool) >
static Amounts ripple::ceil_out_impl ( Amounts const &  amount,
STAmount const &  limit,
bool  roundUp,
Quality const &  quality 
)
static

Definition at line 118 of file Quality.cpp.

◆ composed_quality()

Quality ripple::composed_quality ( Quality const &  lhs,
Quality const &  rhs 
)

Definition at line 158 of file Quality.cpp.

◆ parityRate()

Rate const ripple::parityRate ( QUALITY_ONE  )

◆ parseBase58() [9/10]

template<>
std::optional< SecretKey > ripple::parseBase58 ( TokenType  type,
std::string const &  s 
)

Parse a secret key.

Definition at line 394 of file SecretKey.cpp.

◆ parseBase58() [10/10]

template<>
std::optional< Seed > ripple::parseBase58 ( std::string const &  s)

Parse AccountID from checked, base58 string.

Parse a Base58 encoded string into a seed.

Returns
std::nullopt if a parse error occurs

Definition at line 86 of file Seed.cpp.

◆ sfInvalid()

SField const ripple::sfInvalid ( access  ,
1,
""   
)

◆ sfGeneric()

SField const ripple::sfGeneric ( access  ,
,
"Generic"   
)

◆ getInt64Value()

static std::int64_t ripple::getInt64Value ( STAmount const &  amount,
bool  valid,
char const *  error 
)
static

Definition at line 77 of file STAmount.cpp.

◆ getSNValue()

static std::int64_t ripple::getSNValue ( STAmount const &  amount)
static

Definition at line 97 of file STAmount.cpp.

◆ getMPTValue()

static std::int64_t ripple::getMPTValue ( STAmount const &  amount)
static

Definition at line 103 of file STAmount.cpp.

◆ areComparable()

static bool ripple::areComparable ( STAmount const &  v1,
STAmount const &  v2 
)
static

Definition at line 110 of file STAmount.cpp.

◆ muldiv()

static std::uint64_t ripple::muldiv ( std::uint64_t  multiplier,
std::uint64_t  multiplicand,
std::uint64_t  divisor 
)
static

Definition at line 1220 of file STAmount.cpp.

◆ muldiv_round()

static std::uint64_t ripple::muldiv_round ( std::uint64_t  multiplier,
std::uint64_t  multiplicand,
std::uint64_t  divisor,
std::uint64_t  rounding 
)
static

Definition at line 1241 of file STAmount.cpp.

◆ canonicalizeRound()

static void ripple::canonicalizeRound ( bool  native,
std::uint64_t value,
int &  offset,
bool   
)
static

Definition at line 1403 of file STAmount.cpp.

◆ canonicalizeRoundStrict()

static void ripple::canonicalizeRoundStrict ( bool  native,
std::uint64_t value,
int &  offset,
bool  roundUp 
)
static

Definition at line 1442 of file STAmount.cpp.

◆ mulRoundImpl()

template<void(*)(bool, std::uint64_t &, int &, bool) CanonicalizeFunc, typename MightSaveRound >
static STAmount ripple::mulRoundImpl ( STAmount const &  v1,
STAmount const &  v2,
Asset const &  asset,
bool  roundUp 
)
static

Definition at line 1510 of file STAmount.cpp.

◆ divRoundImpl()

template<typename MightSaveRound >
static STAmount ripple::divRoundImpl ( STAmount const &  num,
STAmount const &  den,
Asset const &  asset,
bool  roundUp 
)
static

Definition at line 1640 of file STAmount.cpp.

◆ getTxFormat()

static auto ripple::getTxFormat ( TxType  type)
static

Definition at line 76 of file STTx.cpp.

◆ getSigningData()

static Blob ripple::getSigningData ( STTx const &  that)
static

Definition at line 188 of file STTx.cpp.

◆ singleSignHelper()

static Expected< void, std::string > ripple::singleSignHelper ( STObject const &  sigObject,
Slice const &  data,
bool const  fullyCanonical 
)
static

Definition at line 417 of file STTx.cpp.

◆ multiSignHelper()

Expected< void, std::string > ripple::multiSignHelper ( STObject const &  sigObject,
std::optional< AccountID txnAccountID,
bool const  fullyCanonical,
std::function< Serializer(AccountID const &)>  makeMsg,
Rules const &  rules 
)

Definition at line 477 of file STTx.cpp.

◆ isMemoOkay()

static bool ripple::isMemoOkay ( STObject const &  st,
std::string reason 
)
static

Definition at line 656 of file STTx.cpp.

◆ isAccountFieldOkay()

static bool ripple::isAccountFieldOkay ( STObject const &  st)
static

Definition at line 748 of file STTx.cpp.

◆ invalidMPTAmountInTx()

static bool ripple::invalidMPTAmountInTx ( STObject const &  tx)
static

Definition at line 761 of file STTx.cpp.

◆ isRawTransactionOkay()

static bool ripple::isRawTransactionOkay ( STObject const &  st,
std::string reason 
)
static

Definition at line 789 of file STTx.cpp.

◆ digest() [1/2]

template<class Hasher >
static Hasher::result_type ripple::digest ( void const *  data,
std::size_t  size 
)
staticnoexcept

Definition at line 156 of file tokens.cpp.

◆ digest() [2/2]

template<class Hasher , class T , std::size_t N, class = std::enable_if_t<sizeof(T) == 1>>
static Hasher::result_type ripple::digest ( std::array< T, N > const &  v)
static

Definition at line 169 of file tokens.cpp.

◆ digest2()

template<class Hasher , class... Args>
static Hasher::result_type ripple::digest2 ( Args const &...  args)
static

Definition at line 177 of file tokens.cpp.

◆ checksum()

static void ripple::checksum ( void *  out,
void const *  message,
std::size_t  size 
)
static

Calculate a 4-byte checksum of the data.

The checksum is calculated as the first 4 bytes of the SHA256 digest of the message. This is added to the base58 encoding of identifiers to detect user error in data entry.

Note
This checksum algorithm is part of the client API

Definition at line 192 of file tokens.cpp.

◆ operator==() [24/28]

bool ripple::operator== ( XChainClaimAttestation const &  lhs,
XChainClaimAttestation const &  rhs 
)

Definition at line 519 of file XChainAttestations.cpp.

◆ operator==() [25/28]

bool ripple::operator== ( XChainCreateAccountAttestation const &  lhs,
XChainCreateAccountAttestation const &  rhs 
)

Definition at line 654 of file XChainAttestations.cpp.

◆ getHTTPHeaderTimestamp()

std::string ripple::getHTTPHeaderTimestamp ( )

Definition at line 33 of file JSONRPCUtil.cpp.

◆ populate()

static void ripple::populate ( Section const &  section,
std::string const &  field,
std::ostream log,
std::vector< boost::asio::ip::network_v4 > &  nets4,
std::vector< boost::asio::ip::network_v6 > &  nets6 
)
static

Definition at line 103 of file Port.cpp.

◆ makeTypedLeaf()

intr_ptr::SharedPtr< SHAMapLeafNode > ripple::makeTypedLeaf ( SHAMapNodeType  type,
boost::intrusive_ptr< SHAMapItem const >  item,
std::uint32_t  owner 
)

Definition at line 32 of file SHAMap.cpp.

◆ depthMask()

static uint256 const & ripple::depthMask ( unsigned int  depth)
static

Definition at line 29 of file SHAMapNodeID.cpp.

◆ BEAST_DEFINE_TESTSUITE() [1/63]

ripple::BEAST_DEFINE_TESTSUITE ( AccountTxPaging  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [2/63]

ripple::BEAST_DEFINE_TESTSUITE ( AmendmentTable  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [3/63]

ripple::BEAST_DEFINE_TESTSUITE ( Check  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [4/63]

ripple::BEAST_DEFINE_TESTSUITE ( Clawback  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [5/63]

ripple::BEAST_DEFINE_TESTSUITE ( Discrepancy  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [6/63]

ripple::BEAST_DEFINE_TESTSUITE ( FixNFTokenPageLinks  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [7/63]

ripple::BEAST_DEFINE_TESTSUITE ( Freeze  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [8/63]

ripple::BEAST_DEFINE_TESTSUITE ( LedgerLoad  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [9/63]

ripple::BEAST_DEFINE_TESTSUITE ( LoadFeeTrack  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [1/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenBaseUtil  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [2/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenDisallowIncoming  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [3/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenWOMintOffer  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [4/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenWOModify  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [5/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenAllFeatures  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [6/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenAuth  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [7/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenBurn  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [8/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( NFTokenDir  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE() [10/63]

ripple::BEAST_DEFINE_TESTSUITE ( OfferStream  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [11/63]

ripple::BEAST_DEFINE_TESTSUITE ( SetRegularKey  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [12/63]

ripple::BEAST_DEFINE_TESTSUITE ( Ticket  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [13/63]

ripple::BEAST_DEFINE_TESTSUITE ( TrustAndBalance  ,
app  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [14/63]

ripple::BEAST_DEFINE_TESTSUITE ( Apply  ,
tx  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [9/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( Vault  ,
app  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE() [15/63]

ripple::BEAST_DEFINE_TESTSUITE ( FileUtilities  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [16/63]

ripple::BEAST_DEFINE_TESTSUITE ( hardened_hash  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [17/63]

ripple::BEAST_DEFINE_TESTSUITE ( IOUAmount  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [18/63]

ripple::BEAST_DEFINE_TESTSUITE ( KeyCache  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [19/63]

ripple::BEAST_DEFINE_TESTSUITE ( Number  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [20/63]

ripple::BEAST_DEFINE_TESTSUITE ( PerfLog  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [21/63]

ripple::BEAST_DEFINE_TESTSUITE ( StringUtilities  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [22/63]

ripple::BEAST_DEFINE_TESTSUITE ( TaggedCache  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [23/63]

ripple::BEAST_DEFINE_TESTSUITE ( XRPAmount  ,
basics  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [24/63]

ripple::BEAST_DEFINE_TESTSUITE ( Config  ,
core  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [25/63]

ripple::BEAST_DEFINE_TESTSUITE ( SociDB  ,
core  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [26/63]

ripple::BEAST_DEFINE_TESTSUITE ( Workers  ,
core  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [27/63]

ripple::BEAST_DEFINE_TESTSUITE ( ProtocolVersion  ,
overlay  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [28/63]

ripple::BEAST_DEFINE_TESTSUITE ( short_read  ,
overlay  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [29/63]

ripple::BEAST_DEFINE_TESTSUITE ( BuildInfo  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [30/63]

ripple::BEAST_DEFINE_TESTSUITE ( Hooks  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [31/63]

ripple::BEAST_DEFINE_TESTSUITE ( InnerObjectFormatsParsedJSON  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [32/63]

ripple::BEAST_DEFINE_TESTSUITE ( Issue  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [33/63]

ripple::BEAST_DEFINE_TESTSUITE ( Memo  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [34/63]

ripple::BEAST_DEFINE_TESTSUITE ( PublicKey  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [35/63]

ripple::BEAST_DEFINE_TESTSUITE ( Quality  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [36/63]

ripple::BEAST_DEFINE_TESTSUITE ( SecretKey  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [37/63]

ripple::BEAST_DEFINE_TESTSUITE ( Seed  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [38/63]

ripple::BEAST_DEFINE_TESTSUITE ( SeqProxy  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [39/63]

ripple::BEAST_DEFINE_TESTSUITE ( Serializer  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [40/63]

ripple::BEAST_DEFINE_TESTSUITE ( STAccount  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [41/63]

ripple::BEAST_DEFINE_TESTSUITE ( STAmount  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [42/63]

ripple::BEAST_DEFINE_TESTSUITE ( STInteger  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [43/63]

ripple::BEAST_DEFINE_TESTSUITE ( STNumber  ,
protocol  ,
ripple   
)

◆ testCompile()

void ripple::testCompile ( std::ostream out)

Definition at line 281 of file STNumber_test.cpp.

◆ BEAST_DEFINE_TESTSUITE() [44/63]

ripple::BEAST_DEFINE_TESTSUITE ( STObject  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [45/63]

ripple::BEAST_DEFINE_TESTSUITE ( STParsedJSON  ,
protocol  ,
ripple   
)

◆ matches()

bool ripple::matches ( char const *  string,
char const *  regex 
)

Return true if the string loosely matches the regex.

Meant for testing human-readable strings that may change over time.

Definition at line 41 of file STTx_test.cpp.

◆ BEAST_DEFINE_TESTSUITE() [46/63]

ripple::BEAST_DEFINE_TESTSUITE ( STTx  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [47/63]

ripple::BEAST_DEFINE_TESTSUITE ( InnerObjectFormatsSerializer  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [48/63]

ripple::BEAST_DEFINE_TESTSUITE ( STValidation  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [49/63]

ripple::BEAST_DEFINE_TESTSUITE ( TER  ,
protocol  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [50/63]

ripple::BEAST_DEFINE_TESTSUITE ( AccountCurrencies  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [10/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( AccountSet  ,
rpc  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE() [51/63]

ripple::BEAST_DEFINE_TESTSUITE ( AmendmentBlocked  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [52/63]

ripple::BEAST_DEFINE_TESTSUITE ( Connect  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [53/63]

ripple::BEAST_DEFINE_TESTSUITE ( Feature  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [54/63]

ripple::BEAST_DEFINE_TESTSUITE ( GetCounts  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [55/63]

ripple::BEAST_DEFINE_TESTSUITE ( LedgerClosed  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE_PRIO() [11/11]

ripple::BEAST_DEFINE_TESTSUITE_PRIO ( LedgerData  ,
rpc  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE() [56/63]

ripple::BEAST_DEFINE_TESTSUITE ( LedgerHeader  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [57/63]

ripple::BEAST_DEFINE_TESTSUITE ( NoRippleCheck  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE_MANUAL_PRIO()

ripple::BEAST_DEFINE_TESTSUITE_MANUAL_PRIO ( NoRippleCheckLimits  ,
rpc  ,
ripple  ,
 
)

◆ BEAST_DEFINE_TESTSUITE() [58/63]

ripple::BEAST_DEFINE_TESTSUITE ( OwnerInfo  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [59/63]

ripple::BEAST_DEFINE_TESTSUITE ( Peers  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [60/63]

ripple::BEAST_DEFINE_TESTSUITE ( Transaction  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [61/63]

ripple::BEAST_DEFINE_TESTSUITE ( TransactionEntry  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [62/63]

ripple::BEAST_DEFINE_TESTSUITE ( TransactionHistory  ,
rpc  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [63/63]

ripple::BEAST_DEFINE_TESTSUITE ( Version  ,
rpc  ,
ripple   
)

◆ TEST_SUITE_BEGIN()

ripple::TEST_SUITE_BEGIN ( "json_value"  )

◆ TEST_CASE() [1/16]

ripple::TEST_CASE ( "construct and compare Json::StaticString"  )

Definition at line 37 of file Value.cpp.

◆ TEST_CASE() [2/16]

ripple::TEST_CASE ( "different types"  )

Definition at line 61 of file Value.cpp.

◆ TEST_CASE() [3/16]

ripple::TEST_CASE ( "compare strings"  )

Definition at line 215 of file Value.cpp.

◆ TEST_CASE() [4/16]

ripple::TEST_CASE ( "bool"  )

Definition at line 569 of file Value.cpp.

◆ TEST_CASE() [5/16]

ripple::TEST_CASE ( "bad json"  )

Definition at line 592 of file Value.cpp.

◆ TEST_CASE() [6/16]

ripple::TEST_CASE ( "edge cases"  )

Definition at line 602 of file Value.cpp.

◆ TEST_CASE() [7/16]

ripple::TEST_CASE ( "copy"  )

Definition at line 681 of file Value.cpp.

◆ TEST_CASE() [8/16]

ripple::TEST_CASE ( "move"  )

Definition at line 702 of file Value.cpp.

◆ TEST_CASE() [9/16]

ripple::TEST_CASE ( "comparisons"  )

Definition at line 721 of file Value.cpp.

◆ TEST_CASE() [10/16]

ripple::TEST_CASE ( "compact"  )

Definition at line 776 of file Value.cpp.

◆ TEST_CASE() [11/16]

ripple::TEST_CASE ( "conversions"  )

Definition at line 801 of file Value.cpp.

◆ TEST_CASE() [12/16]

ripple::TEST_CASE ( "access members"  )

Definition at line 1009 of file Value.cpp.

◆ TEST_CASE() [13/16]

ripple::TEST_CASE ( "remove members"  )

Definition at line 1102 of file Value.cpp.

◆ TEST_CASE() [14/16]

ripple::TEST_CASE ( "iterator"  )

Definition at line 1129 of file Value.cpp.

◆ TEST_CASE() [15/16]

ripple::TEST_CASE ( "nest limits"  )

Definition at line 1215 of file Value.cpp.

◆ TEST_CASE() [16/16]

ripple::TEST_CASE ( "memory leak"  )

Definition at line 1261 of file Value.cpp.

◆ TEST_SUITE_END()

ripple::TEST_SUITE_END ( )

◆ proposalUniqueId()

uint256 ripple::proposalUniqueId ( uint256 const &  proposeHash,
uint256 const &  previousLedger,
std::uint32_t  proposeSeq,
NetClock::time_point  closeTime,
Slice const &  publicKey,
Slice const &  signature 
)

Calculate a unique identifier for a signed proposal.

The identifier is based on all the fields that contribute to the signature, as well as the signature itself. The "last closed ledger" field may be omitted, but the signer will compute the signature as if this field was present. Recipients of the proposal will inject the last closed ledger in order to validate the signature. If the last closed ledger is left out, then it is considered as all zeroes for the purposes of signing.

Parameters
proposeHashThe hash of the proposed position
previousLedgerThe hash of the ledger the proposal is based upon
proposeSeqSequence number of the proposal
closeTimeClose time of the proposal
publicKeySigner's public key
signatureProposal signature

Definition at line 66 of file RCLCxPeerPos.cpp.

◆ mismatch()

RCLValidatedLedger::Seq ripple::mismatch ( RCLValidatedLedger const &  a,
RCLValidatedLedger const &  b 
)

Definition at line 99 of file RCLValidations.cpp.

◆ handleNewValidation()

void ripple::handleNewValidation ( Application app,
std::shared_ptr< STValidation > const &  val,
std::string const &  source,
BypassAccept const  bypassAccept = BypassAccept::no,
std::optional< beast::Journal j = std::nullopt 
)

Handle a new validation.

Also sets the trust status of a validation based on the validating node's public key and this node's current UNL.

Parameters
appApplication object containing validations and ledgerMaster
valThe validation to add
sourceName associated with validation used in logging

Definition at line 165 of file RCLValidations.cpp.

◆ buildLedger() [1/2]

std::shared_ptr< Ledger > ripple::buildLedger ( std::shared_ptr< Ledger const > const &  parent,
NetClock::time_point  closeTime,
bool const  closeTimeCorrect,
NetClock::duration  closeResolution,
Application app,
CanonicalTXSet txns,
std::set< TxID > &  failedTxs,
beast::Journal  j 
)

Build a new ledger by applying consensus transactions.

Build a new ledger by applying a set of transactions accepted as part of consensus.

Parameters
parentThe ledger to apply transactions to
closeTimeThe time the ledger closed
closeTimeCorrectWhether consensus agreed on close time
closeResolutionResolution used to determine consensus close time
appHandle to application instance
txsOn entry, transactions to apply; on exit, transactions that must be retried in next round.
failedTxsPopulated with transactions that failed in this round
jJournal to use for logging
Returns
The newly built ledger

Definition at line 182 of file BuildLedger.cpp.

◆ buildLedger() [2/2]

std::shared_ptr< Ledger > ripple::buildLedger ( LedgerReplay const &  replayData,
ApplyFlags  applyFlags,
Application app,
beast::Journal  j 
)

Build a new ledger by replaying transactions.

Build a new ledger by replaying transactions accepted into a prior ledger.

Parameters
replayDataData of the ledger to replay
applyFlagsFlags to use when applying transactions
appHandle to application instance
jJournal to use for logging
Returns
The newly built ledger

Definition at line 227 of file BuildLedger.cpp.

◆ buildLedgerImpl()

template<class ApplyTxs >
std::shared_ptr< Ledger > ripple::buildLedgerImpl ( std::shared_ptr< Ledger const > const &  parent,
NetClock::time_point  closeTime,
bool const  closeTimeCorrect,
NetClock::duration  closeResolution,
Application app,
beast::Journal  j,
ApplyTxs &&  applyTxs 
)

Definition at line 39 of file BuildLedger.cpp.

◆ applyTransactions()

std::size_t ripple::applyTransactions ( Application app,
std::shared_ptr< Ledger const > const &  built,
CanonicalTXSet txns,
std::set< TxID > &  failed,
OpenView view,
beast::Journal  j 
)

Apply a set of consensus transactions to a ledger.

Parameters
appHandle to application
txnsthe set of transactions to apply,
failedset of transactions that failed to apply
viewledger to apply to
jJournal for logging
Returns
number of transactions applied; transactions to retry left in txns

Definition at line 99 of file BuildLedger.cpp.

◆ neededHashes()

static std::vector< uint256 > ripple::neededHashes ( uint256 const &  root,
SHAMap map,
int  max,
SHAMapSyncFilter filter 
)
static

Definition at line 201 of file InboundLedger.cpp.

◆ make_InboundLedgers()

std::unique_ptr< InboundLedgers > ripple::make_InboundLedgers ( Application app,
InboundLedgers::clock_type clock,
beast::insight::Collector::ptr const &  collector 
)

Definition at line 471 of file InboundLedgers.cpp.

◆ make_InboundTransactions()

std::unique_ptr< InboundTransactions > ripple::make_InboundTransactions ( Application app,
beast::insight::Collector::ptr const &  collector,
std::function< void(std::shared_ptr< SHAMap > const &, bool)>  gotSet 
)

Definition at line 271 of file InboundTransactions.cpp.

◆ make_LedgerCleaner()

std::unique_ptr< LedgerCleaner > ripple::make_LedgerCleaner ( Application app,
beast::Journal  journal 
)

Definition at line 460 of file LedgerCleaner.cpp.

◆ shouldAcquire()

static bool ripple::shouldAcquire ( std::uint32_t const  currentLedger,
std::uint32_t const  ledgerHistory,
std::optional< LedgerIndex > const  minimumOnline,
std::uint32_t const  candidateLedger,
beast::Journal  j 
)
static

Definition at line 73 of file LedgerMaster.cpp.

◆ populateFetchPack()

static void ripple::populateFetchPack ( SHAMap const &  want,
SHAMap const *  have,
std::uint32_t  cnt,
protocol::TMGetObjectByHash *  into,
std::uint32_t  seq,
bool  withLeaves = true 
)
static

Populate a fetch pack with data from the map the recipient wants.

A recipient may or may not have the map that they are asking for. If they do, we can optimize the transfer by not including parts of the map that they are already have.

Parameters
haveThe map that the recipient already has (if any).
cntThe maximum number of nodes to return.
intoThe protocol object into which we add information.
seqThe sequence number of the ledger the map is a part of.
withLeavesTrue if leaf nodes should be included.
Note
: The withLeaves parameter is configurable even though the code, so far, only ever sets the parameter to true.

The rationale is that for transaction trees, it may make sense to not include the leaves if the fetch pack is being constructed for someone attempting to get a recent ledger for which they already have the transactions.

However, for historical ledgers, which is the only use we have for fetch packs right now, it makes sense to include the transactions because the caller is unlikely to have them.

Definition at line 2065 of file LedgerMaster.cpp.

◆ addJson()

void ripple::addJson ( Json::Value json,
LedgerFill const &  fill 
)

Given a Ledger and options, fill a Json::Object or Json::Value with a description of the ledger.

Definition at line 347 of file LedgerToJson.cpp.

◆ getJson()

Json::Value ripple::getJson ( LedgerFill const &  fill)

Return a new Json::Value representing the ledger with given options.

Definition at line 357 of file LedgerToJson.cpp.

◆ make_LocalTxs()

std::unique_ptr< LocalTxs > ripple::make_LocalTxs ( )

Definition at line 192 of file LocalTxs.cpp.

◆ debugTxstr()

std::string ripple::debugTxstr ( std::shared_ptr< STTx const > const &  tx)

Definition at line 194 of file OpenLedger.cpp.

◆ debugTostr() [1/3]

std::string ripple::debugTostr ( OrderedTxs const &  set)

Definition at line 202 of file OpenLedger.cpp.

◆ debugTostr() [2/3]

std::string ripple::debugTostr ( SHAMap const &  set)

Definition at line 211 of file OpenLedger.cpp.

◆ debugTostr() [3/3]

std::string ripple::debugTostr ( std::shared_ptr< ReadView const > const &  view)

Definition at line 231 of file OpenLedger.cpp.

◆ calculateLedgerHash()

uint256 ripple::calculateLedgerHash ( LedgerInfo const &  info)

Definition at line 54 of file Ledger.cpp.

◆ deserializeTx()

std::shared_ptr< STTx const > ripple::deserializeTx ( SHAMapItem const &  item)

Deserialize a SHAMapItem containing a single STTx.

Throw:

May throw on deserializaton error

Definition at line 382 of file Ledger.cpp.

◆ deserializeTxPlusMeta()

std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > ripple::deserializeTxPlusMeta ( SHAMapItem const &  item)

Deserialize a SHAMapItem containing STTx + STObject metadata.

The SHAMap must contain two variable length serialization objects.

Throw:

May throw on deserializaton error

Definition at line 389 of file Ledger.cpp.

◆ isFlagLedger()

bool ripple::isFlagLedger ( LedgerIndex  seq)

Returns true if the given ledgerIndex is a flag ledgerIndex.

Definition at line 961 of file Ledger.cpp.

◆ saveValidatedLedger()

static bool ripple::saveValidatedLedger ( Application app,
std::shared_ptr< Ledger const > const &  ledger,
bool  current 
)
static

Definition at line 967 of file Ledger.cpp.

◆ pendSaveValidated()

bool ripple::pendSaveValidated ( Application app,
std::shared_ptr< Ledger const > const &  ledger,
bool  isSynchronous,
bool  isCurrent 
)

Save, or arrange to save, a fully-validated ledger Returns false on error.

Definition at line 997 of file Ledger.cpp.

◆ loadLedgerHelper()

std::shared_ptr< Ledger > ripple::loadLedgerHelper ( LedgerInfo const &  info,
Application app,
bool  acquire 
)

Definition at line 1070 of file Ledger.cpp.

◆ finishLoadByIndexOrHash()

static void ripple::finishLoadByIndexOrHash ( std::shared_ptr< Ledger > const &  ledger,
Config const &  config,
beast::Journal  j 
)
static

Definition at line 1088 of file Ledger.cpp.

◆ getLatestLedger()

std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256 > ripple::getLatestLedger ( Application app)

Definition at line 1108 of file Ledger.cpp.

◆ loadByIndex()

std::shared_ptr< Ledger > ripple::loadByIndex ( std::uint32_t  ledgerIndex,
Application app,
bool  acquire 
)

Definition at line 1118 of file Ledger.cpp.

◆ loadByHash()

std::shared_ptr< Ledger > ripple::loadByHash ( uint256 const &  ledgerHash,
Application app,
bool  acquire 
)

Definition at line 1131 of file Ledger.cpp.

◆ log_one()

static void ripple::log_one ( ReadView const &  ledger,
uint256 const &  tx,
char const *  msg,
beast::Journal j 
)
static

Definition at line 160 of file LedgerHistory.cpp.

◆ log_metadata_difference()

static void ripple::log_metadata_difference ( ReadView const &  builtLedger,
ReadView const &  validLedger,
uint256 const &  tx,
beast::Journal  j 
)
static

Definition at line 182 of file LedgerHistory.cpp.

◆ leaves()

static std::vector< SHAMapItem const * > ripple::leaves ( SHAMap const &  sm)
static

Definition at line 326 of file LedgerHistory.cpp.

◆ fixConfigPorts()

void ripple::fixConfigPorts ( Config config,
Endpoints const &  endpoints 
)
static

Definition at line 2209 of file Application.cpp.

◆ make_Application()

std::unique_ptr< Application > ripple::make_Application ( std::unique_ptr< Config config,
std::unique_ptr< Logs logs,
std::unique_ptr< TimeKeeper timeKeeper 
)

Definition at line 2199 of file Application.cpp.

◆ make_CollectorManager()

std::unique_ptr< CollectorManager > ripple::make_CollectorManager ( Section const &  params,
beast::Journal  journal 
)

Definition at line 73 of file CollectorManager.cpp.

◆ make_LoadManager()

std::unique_ptr< LoadManager > ripple::make_LoadManager ( Application app,
beast::Journal  journal 
)

Definition at line 199 of file LoadManager.cpp.

◆ adjustDescriptorLimit()

bool ripple::adjustDescriptorLimit ( int  needed,
beast::Journal  j 
)

Definition at line 78 of file Main.cpp.

◆ printHelp()

void ripple::printHelp ( po::options_description const &  desc)

Definition at line 123 of file Main.cpp.

◆ run()

int ripple::run ( int  argc,
char **  argv 
)

Definition at line 349 of file Main.cpp.

◆ getNodeIdentity() [1/2]

std::pair< PublicKey, SecretKey > ripple::getNodeIdentity ( Application app,
boost::program_options::variables_map const &  cmdline 
)

The cryptographic credentials identifying this server instance.

Parameters
appThe application object
cmdlineThe command line parameters passed into the application.

Definition at line 29 of file NodeIdentity.cpp.

◆ make_AmendmentTable()

std::unique_ptr< AmendmentTable > ripple::make_AmendmentTable ( Application app,
std::chrono::seconds  majorityTime,
std::vector< AmendmentTable::FeatureInfo > const &  supported,
Section const &  enabled,
Section const &  vetoed,
beast::Journal  journal 
)

Definition at line 1052 of file AmendmentTable.cpp.

◆ ammLPTokens()

STAmount ripple::ammLPTokens ( STAmount const &  asset1,
STAmount const &  asset2,
Issue const &  lptIssue 
)

Calculate LP Tokens given AMM pool reserves.

Parameters
asset1AMM one side of the pool reserve
asset2AMM another side of the pool reserve
Returns
LP Tokens as IOU

Definition at line 25 of file AMMHelpers.cpp.

◆ lpTokensOut()

STAmount ripple::lpTokensOut ( STAmount const &  asset1Balance,
STAmount const &  asset1Deposit,
STAmount const &  lptAMMBalance,
std::uint16_t  tfee 
)

Calculate LP Tokens given asset's deposit amount.

Parameters
asset1Balancecurrent AMM asset1 balance
asset1Depositrequested asset1 deposit amount
lptAMMBalanceAMM LPT balance
tfeetrading fee in basis points
Returns
tokens

Definition at line 45 of file AMMHelpers.cpp.

◆ ammAssetIn()

STAmount ripple::ammAssetIn ( STAmount const &  asset1Balance,
STAmount const &  lptAMMBalance,
STAmount const &  lpTokens,
std::uint16_t  tfee 
)

Calculate asset deposit given LP Tokens.

Parameters
asset1Balancecurrent AMM asset1 balance
lpTokensLP Tokens
lptAMMBalanceAMM LPT balance
tfeetrading fee in basis points
Returns

Definition at line 80 of file AMMHelpers.cpp.

◆ lpTokensIn()

STAmount ripple::lpTokensIn ( STAmount const &  asset1Balance,
STAmount const &  asset1Withdraw,
STAmount const &  lptAMMBalance,
std::uint16_t  tfee 
)

Calculate LP Tokens given asset's withdraw amount.

Return 0 if can't calculate.

Parameters
asset1Balancecurrent AMM asset1 balance
asset1Withdrawrequested asset1 withdraw amount
lptAMMBalanceAMM LPT balance
tfeetrading fee in basis points
Returns
tokens out amount

Definition at line 112 of file AMMHelpers.cpp.

◆ ammAssetOut()

STAmount ripple::ammAssetOut ( STAmount const &  assetBalance,
STAmount const &  lptAMMBalance,
STAmount const &  lpTokens,
std::uint16_t  tfee 
)

Calculate asset withdrawal by tokens.

Parameters
assetBalancebalance of the asset being withdrawn
lptAMMBalancetotal AMM Tokens balance
lpTokensLP Tokens balance
tfeetrading fee in basis points
Returns
calculated asset amount

Definition at line 145 of file AMMHelpers.cpp.

◆ withinRelativeDistance() [1/2]

bool ripple::withinRelativeDistance ( Quality const &  calcQuality,
Quality const &  reqQuality,
Number const &  dist 
)

Check if the relative distance between the qualities is within the requested distance.

Parameters
calcQualitycalculated quality
reqQualityrequested quality
distrequested relative distance
Returns
true if within dist, false otherwise

Definition at line 129 of file AMMHelpers.h.

◆ withinRelativeDistance() [2/2]

template<typename Amt >
requires ( std::is_same_v<Amt, STAmount> || std::is_same_v<Amt, IOUAmount> || std::is_same_v<Amt, XRPAmount> || std::is_same_v<Amt, Number>)
bool ripple::withinRelativeDistance ( Amt const &  calc,
Amt const &  req,
Number const &  dist 
)

Check if the relative distance between the amounts is within the requested distance.

Parameters
calccalculated amount
reqrequested amount
distrequested relative distance
Returns
true if within dist, false otherwise

Definition at line 156 of file AMMHelpers.h.

◆ solveQuadraticEqSmallest()

std::optional< Number > ripple::solveQuadraticEqSmallest ( Number const &  a,
Number const &  b,
Number const &  c 
)

Solve quadratic equation to find takerGets or takerPays.

Round to minimize the amount in order to maximize the quality.

Definition at line 271 of file AMMHelpers.cpp.

◆ getAMMOfferStartWithTakerGets()

template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > ripple::getAMMOfferStartWithTakerGets ( TAmounts< TIn, TOut > const &  pool,
Quality const &  targetQuality,
std::uint16_t const &  tfee 
)

Generate AMM offer starting with takerGets when AMM pool from the payment perspective is IOU(in)/XRP(out) Equations: Spot Price Quality after the offer is consumed: Qsp = (O - o) / (I + i) – equation (1) where O is poolPays, I is poolGets, o is takerGets, i is takerPays Swap out: i = (I * o) / (O - o) * f – equation (2) where f is (1 - tfee/100000), tfee is in basis points Effective price targetQuality: Qep = o / i – equation (3) There are two scenarios to consider A) Qsp = Qep.

Substitute i in (1) with (2) and solve for o and Qsp = targetQuality(Qt): o**2 + o * (I * Qt * (1 - 1 / f) - 2 * O) + O**2 - Qt * I * O = 0 B) Qep = Qsp. Substitute i in (3) with (2) and solve for o and Qep = targetQuality(Qt): o = O - I * Qt / f Since the scenario is not known a priori, both A and B are solved and the lowest value of o is takerGets. takerPays is calculated with swap out eq (2). If o is less or equal to 0 then the offer can't be generated.

Definition at line 196 of file AMMHelpers.h.

◆ getAMMOfferStartWithTakerPays()

template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > ripple::getAMMOfferStartWithTakerPays ( TAmounts< TIn, TOut > const &  pool,
Quality const &  targetQuality,
std::uint16_t  tfee 
)

Generate AMM offer starting with takerPays when AMM pool from the payment perspective is XRP(in)/IOU(out) or IOU(in)/IOU(out).

Equations: Spot Price Quality after the offer is consumed: Qsp = (O - o) / (I + i) – equation (1) where O is poolPays, I is poolGets, o is takerGets, i is takerPays Swap in: o = (O * i * f) / (I + i * f) – equation (2) where f is (1 - tfee/100000), tfee is in basis points Effective price quality: Qep = o / i – equation (3) There are two scenarios to consider A) Qsp = Qep. Substitute o in (1) with (2) and solve for i and Qsp = targetQuality(Qt): i**2 * f + i * I * (1 + f) + I**2 - I * O / Qt = 0 B) Qep = Qsp. Substitute i in (3) with (2) and solve for i and Qep = targetQuality(Qt): i = O / Qt - I / f Since the scenario is not known a priori, both A and B are solved and the lowest value of i is takerPays. takerGets is calculated with swap in eq (2). If i is less or equal to 0 then the offer can't be generated.

Definition at line 267 of file AMMHelpers.h.

◆ changeSpotPriceQuality()

template<typename TIn , typename TOut >
std::optional< TAmounts< TIn, TOut > > ripple::changeSpotPriceQuality ( TAmounts< TIn, TOut > const &  pool,
Quality const &  quality,
std::uint16_t  tfee,
Rules const &  rules,
beast::Journal  j 
)

Generate AMM offer so that either updated Spot Price Quality (SPQ) is equal to LOB quality (in this case AMM offer quality is better than LOB quality) or AMM offer is equal to LOB quality (in this case SPQ is better than LOB quality).

Pre-amendment code calculates takerPays first. If takerGets is XRP, it is rounded down, which results in worse offer quality than LOB quality, and the offer might fail to generate. Post-amendment code calculates the XRP offer side first. The result is rounded down, which makes the offer quality better. It might not be possible to match either SPQ or AMM offer to LOB quality. This generally happens at higher fees.

Parameters
poolAMM pool balances
qualityrequested quality
tfeetrading fee in basis points
Returns
seated in/out amounts if the quality can be changed

Definition at line 331 of file AMMHelpers.h.

◆ swapAssetIn()

template<typename TIn , typename TOut >
TOut ripple::swapAssetIn ( TAmounts< TIn, TOut > const &  pool,
TIn const &  assetIn,
std::uint16_t  tfee 
)

AMM pool invariant - the product (A * B) after swap in/out has to remain at least the same: (A + in) * (B - out) >= A * B XRP round-off may result in a smaller product after swap in/out.

To address this:

  • if on swapIn the out is XRP then the amount is round-off downward, making the product slightly larger since out value is reduced.
  • if on swapOut the in is XRP then the amount is round-off upward, making the product slightly larger since in value is increased. Swap assetIn into the pool and swap out a proportional amount of the other asset. Implements AMM Swap in.
    See also
    XLS30d:AMM Swap
    Parameters
    poolcurrent AMM pool balances
    assetInamount to swap in
    tfeetrading fee in basis points
    Returns

Definition at line 464 of file AMMHelpers.h.

◆ swapAssetOut()

template<typename TIn , typename TOut >
TIn ripple::swapAssetOut ( TAmounts< TIn, TOut > const &  pool,
TOut const &  assetOut,
std::uint16_t  tfee 
)

Swap assetOut out of the pool and swap in a proportional amount of the other asset.

Implements AMM Swap out.

See also
XLS30d:AMM Swap
Parameters
poolcurrent AMM pool balances
assetOutamount to swap out
tfeetrading fee in basis points
Returns

Definition at line 537 of file AMMHelpers.h.

◆ square()

Number ripple::square ( Number const &  n)

Return square of n.

Definition at line 167 of file AMMHelpers.cpp.

◆ adjustLPTokens()

STAmount ripple::adjustLPTokens ( STAmount const &  lptAMMBalance,
STAmount const &  lpTokens,
IsDeposit  isDeposit 
)

Adjust LP tokens to deposit/withdraw.

Amount type keeps 16 digits. Maintaining the LP balance by adding deposited tokens or subtracting withdrawn LP tokens from LP balance results in losing precision in LP balance. I.e. the resulting LP balance is less than the actual sum of LP tokens. To adjust for this, subtract old tokens balance from the new one for deposit or vice versa for withdraw to cancel out the precision loss.

Parameters
lptAMMBalanceLPT AMM Balance
lpTokensLP tokens to deposit or withdraw
isDepositYes if deposit, No if withdraw

Definition at line 173 of file AMMHelpers.cpp.

◆ adjustAmountsByLPTokens()

std::tuple< STAmount, std::optional< STAmount >, STAmount > ripple::adjustAmountsByLPTokens ( STAmount const &  amountBalance,
STAmount const &  amount,
std::optional< STAmount > const &  amount2,
STAmount const &  lptAMMBalance,
STAmount const &  lpTokens,
std::uint16_t  tfee,
IsDeposit  isDeposit 
)

Calls adjustLPTokens() and adjusts deposit or withdraw amounts if the adjusted LP tokens are less than the provided LP tokens.

Parameters
amountBalanceasset1 pool balance
amountasset1 to deposit or withdraw
amount2asset2 to deposit or withdraw
lptAMMBalanceLPT AMM Balance
lpTokensLP tokens to deposit or withdraw
tfeetrading fee in basis points
isDepositYes if deposit, No if withdraw
Returns

Definition at line 187 of file AMMHelpers.cpp.

◆ solveQuadraticEq()

Number ripple::solveQuadraticEq ( Number const &  a,
Number const &  b,
Number const &  c 
)

Positive solution for quadratic equation: x = (-b + sqrt(b**2 + 4*a*c))/(2*a)

Definition at line 264 of file AMMHelpers.cpp.

◆ multiply() [3/3]

STAmount ripple::multiply ( STAmount const &  amount,
Number const &  frac,
Number::rounding_mode  rm 
)

Definition at line 285 of file AMMHelpers.cpp.

◆ getRoundedAsset() [1/2]

template<typename A >
STAmount ripple::getRoundedAsset ( Rules const &  rules,
STAmount const &  balance,
A const &  frac,
IsDeposit  isDeposit 
)

Round AMM equal deposit/withdrawal amount.

Deposit/withdrawal formulas calculate the amount as a fractional value of the pool balance. The rounding takes place on the last step of multiplying the balance by the fraction if AMMv1_3 is enabled.

Definition at line 678 of file AMMHelpers.h.

◆ getRoundedAsset() [2/2]

STAmount ripple::getRoundedAsset ( Rules const &  rules,
std::function< Number()> &&  noRoundCb,
STAmount const &  balance,
std::function< Number()> &&  productCb,
IsDeposit  isDeposit 
)

Round AMM single deposit/withdrawal amount.

The lambda's are used to delay evaluation until the function is executed so that the calculation is not done twice. noRoundCb() is called if AMMv1_3 is disabled. Otherwise, the rounding is set and the amount is: isDeposit is Yes - the balance multiplied by productCb() isDeposit is No - the result of productCb(). The rounding is the same for all calculations in productCb()

Definition at line 293 of file AMMHelpers.cpp.

◆ getRoundedLPTokens() [1/2]

STAmount ripple::getRoundedLPTokens ( Rules const &  rules,
STAmount const &  balance,
Number const &  frac,
IsDeposit  isDeposit 
)

Round AMM deposit/withdrawal LPToken amount.

Deposit/withdrawal formulas calculate the lptokens as a fractional value of the AMM total lptokens. The rounding takes place on the last step of multiplying the balance by the fraction if AMMv1_3 is enabled. The tokens are then adjusted to factor in the loss in precision (we only keep 16 significant digits) when adding the lptokens to the balance.

Definition at line 311 of file AMMHelpers.cpp.

◆ getRoundedLPTokens() [2/2]

STAmount ripple::getRoundedLPTokens ( Rules const &  rules,
std::function< Number()> &&  noRoundCb,
STAmount const &  lptAMMBalance,
std::function< Number()> &&  productCb,
IsDeposit  isDeposit 
)

Round AMM single deposit/withdrawal LPToken amount.

The lambda's are used to delay evaluation until the function is executed so that the calculations are not done twice. noRoundCb() is called if AMMv1_3 is disabled. Otherwise, the rounding is set and the lptokens are: if isDeposit is Yes - the result of productCb(). The rounding is the same for all calculations in productCb() if isDeposit is No - the balance multiplied by productCb() The lptokens are then adjusted to factor in the loss in precision (we only keep 16 significant digits) when adding the lptokens to the balance.

Definition at line 326 of file AMMHelpers.cpp.

◆ adjustAssetInByTokens()

std::pair< STAmount, STAmount > ripple::adjustAssetInByTokens ( Rules const &  rules,
STAmount const &  balance,
STAmount const &  amount,
STAmount const &  lptAMMBalance,
STAmount const &  tokens,
std::uint16_t  tfee 
)

Definition at line 349 of file AMMHelpers.cpp.

◆ adjustAssetOutByTokens()

std::pair< STAmount, STAmount > ripple::adjustAssetOutByTokens ( Rules const &  rules,
STAmount const &  balance,
STAmount const &  amount,
STAmount const &  lptAMMBalance,
STAmount const &  tokens,
std::uint16_t  tfee 
)

Definition at line 375 of file AMMHelpers.cpp.

◆ adjustFracByTokens()

Number ripple::adjustFracByTokens ( Rules const &  rules,
STAmount const &  lptAMMBalance,
STAmount const &  tokens,
Number const &  frac 
)

Find a fraction of tokens after the tokens are adjusted.

The fraction is used to adjust equal deposit/withdraw amount.

Definition at line 401 of file AMMHelpers.cpp.

◆ ammPoolHolds()

std::pair< STAmount, STAmount > ripple::ammPoolHolds ( ReadView const &  view,
AccountID const &  ammAccountID,
Issue const &  issue1,
Issue const &  issue2,
FreezeHandling  freezeHandling,
beast::Journal const  j 
)

Get AMM pool balances.

Definition at line 31 of file AMMUtils.cpp.

◆ ammHolds()

Expected< std::tuple< STAmount, STAmount, STAmount >, TER > ripple::ammHolds ( ReadView const &  view,
SLE const &  ammSle,
std::optional< Issue > const &  optIssue1,
std::optional< Issue > const &  optIssue2,
FreezeHandling  freezeHandling,
beast::Journal const  j 
)

Get AMM pool and LP token balances.

If both optIssue are provided then they are used as the AMM token pair issues. Otherwise the missing issues are fetched from ammSle.

Definition at line 47 of file AMMUtils.cpp.

◆ ammLPHolds() [1/2]

STAmount ripple::ammLPHolds ( ReadView const &  view,
Currency const &  cur1,
Currency const &  cur2,
AccountID const &  ammAccount,
AccountID const &  lpAccount,
beast::Journal const  j 
)

Get the balance of LP tokens.

Definition at line 113 of file AMMUtils.cpp.

◆ ammLPHolds() [2/2]

STAmount ripple::ammLPHolds ( ReadView const &  view,
SLE const &  ammSle,
AccountID const &  lpAccount,
beast::Journal const  j 
)

Definition at line 163 of file AMMUtils.cpp.

◆ getTradingFee()

std::uint16_t ripple::getTradingFee ( ReadView const &  view,
SLE const &  ammSle,
AccountID const &  account 
)

Get AMM trading fee for the given account.

The fee is discounted if the account is the auction slot owner or one of the slot's authorized accounts.

Definition at line 179 of file AMMUtils.cpp.

◆ ammAccountHolds()

STAmount ripple::ammAccountHolds ( ReadView const &  view,
AccountID const &  ammAccountID,
Issue const &  issue 
)

Returns total amount held by AMM for the given token.

Definition at line 211 of file AMMUtils.cpp.

◆ deleteAMMAccount()

TER ripple::deleteAMMAccount ( Sandbox view,
Issue const &  asset,
Issue const &  asset2,
beast::Journal  j 
)

Delete trustlines to AMM.

If all trustlines are deleted then AMM object and account are deleted. Otherwise tecIMPCOMPLETE is returned.

Definition at line 283 of file AMMUtils.cpp.

◆ initializeFeeAuctionVote()

void ripple::initializeFeeAuctionVote ( ApplyView view,
std::shared_ptr< SLE > &  ammSle,
AccountID const &  account,
Issue const &  lptIssue,
std::uint16_t  tfee 
)

Initialize Auction and Voting slots and set the trading/discounted fee.

Definition at line 340 of file AMMUtils.cpp.

◆ isOnlyLiquidityProvider()

Expected< bool, TER > ripple::isOnlyLiquidityProvider ( ReadView const &  view,
Issue const &  ammIssue,
AccountID const &  lpAccount 
)

Return true if the Liquidity Provider is the only AMM provider, false otherwise.

Return tecINTERNAL if encountered an unexpected condition, for instance Liquidity Provider has more than one LPToken trustline.

Definition at line 387 of file AMMUtils.cpp.

◆ verifyAndAdjustLPTokenBalance()

Expected< bool, TER > ripple::verifyAndAdjustLPTokenBalance ( Sandbox sb,
STAmount const &  lpTokens,
std::shared_ptr< SLE > &  ammSle,
AccountID const &  account 
)

Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance.

If it's within the tolerance, update LPTokenBalance to match the LP's trustline balance.

Definition at line 469 of file AMMUtils.cpp.

◆ operator<() [12/13]

bool ripple::operator< ( CanonicalTXSet::Key const &  lhs,
CanonicalTXSet::Key const &  rhs 
)

Definition at line 24 of file CanonicalTXSet.cpp.

◆ checkTxPermission()

NotTEC ripple::checkTxPermission ( std::shared_ptr< SLE const > const &  delegate,
STTx const &  tx 
)

Check if the delegate account has permission to execute the transaction.

Parameters
delegateThe delegate account.
txThe transaction that the delegate account intends to execute.
Returns
tesSUCCESS if the transaction is allowed, terNO_DELEGATE_PERMISSION if not.

Definition at line 26 of file DelegateUtils.cpp.

◆ loadGranularPermission()

void ripple::loadGranularPermission ( std::shared_ptr< SLE const > const &  delegate,
TxType const &  type,
std::unordered_set< GranularPermissionType > &  granularPermissions 
)

Load the granular permissions granted to the delegate account for the specified transaction type.

Parameters
delegateThe delegate account.
typeUsed to determine which granted granular permissions to load, based on the transaction type.
granularPermissionsGranted granular permissions tied to the transaction type.

Definition at line 45 of file DelegateUtils.cpp.

◆ convertBlobsToTxResult()

void ripple::convertBlobsToTxResult ( RelationalDatabase::AccountTxs to,
std::uint32_t  ledger_index,
std::string const &  status,
Blob const &  rawTxn,
Blob const &  rawMeta,
Application app 
)

Definition at line 30 of file AccountTxPaging.cpp.

◆ saveLedgerAsync()

void ripple::saveLedgerAsync ( Application app,
std::uint32_t  seq 
)

Definition at line 60 of file AccountTxPaging.cpp.

◆ parseSection()

static std::vector< std::pair< uint256, std::string > > ripple::parseSection ( Section const &  section)
static

Definition at line 41 of file AmendmentTable.cpp.

◆ deleteAMMTrustLines()

static TER ripple::deleteAMMTrustLines ( Sandbox sb,
AccountID const &  ammAccountID,
std::uint16_t  maxTrustlinesToDelete,
beast::Journal  j 
)
static

Definition at line 237 of file AMMUtils.cpp.

◆ scaleFeeLoad()

XRPAmount ripple::scaleFeeLoad ( XRPAmount  fee,
LoadFeeTrack const &  feeTrack,
Fees const &  fees,
bool  bUnlimited 
)

Definition at line 84 of file LoadFeeTrack.cpp.

◆ to_string() [23/29]

std::string ripple::to_string ( Manifest const &  m)

Format the specified manifest to a string for debugging purposes.

Definition at line 39 of file Manifest.cpp.

◆ deserializeManifest() [1/3]

std::optional< Manifest > ripple::deserializeManifest ( Slice  s,
beast::Journal  journal 
)

Constructs Manifest from serialized string.

Parameters
sSerialized manifest string
Returns
std::nullopt if string is invalid
Note
This does not verify manifest signatures. Manifest::verify should be called after constructing manifest.

Definition at line 54 of file Manifest.cpp.

◆ logMftAct() [1/2]

template<class Stream >
Stream & ripple::logMftAct ( Stream &  s,
std::string const &  action,
PublicKey const &  pk,
std::uint32_t  seq 
)

Definition at line 168 of file Manifest.cpp.

◆ logMftAct() [2/2]

template<class Stream >
Stream & ripple::logMftAct ( Stream &  s,
std::string const &  action,
PublicKey const &  pk,
std::uint32_t  seq,
std::uint32_t  oldSeq 
)

Definition at line 182 of file Manifest.cpp.

◆ loadValidatorToken()

std::optional< ValidatorToken > ripple::loadValidatorToken ( std::vector< std::string > const &  blob,
beast::Journal  journal 
)

Definition at line 264 of file Manifest.cpp.

◆ getFeeLevelPaid()

static FeeLevel64 ripple::getFeeLevelPaid ( ReadView const &  view,
STTx const &  tx 
)
static

Definition at line 39 of file TxQ.cpp.

◆ getLastLedgerSequence()

static std::optional< LedgerIndex > ripple::getLastLedgerSequence ( STTx const &  tx)
static

Definition at line 67 of file TxQ.cpp.

◆ increase()

static FeeLevel64 ripple::increase ( FeeLevel64  level,
std::uint32_t  increasePercent 
)
static

Definition at line 75 of file TxQ.cpp.

◆ setup_TxQ()

TxQ::Setup ripple::setup_TxQ ( Config const &  config)

Build a TxQ::Setup object from application configuration.

Definition at line 1913 of file TxQ.cpp.

◆ to_string() [24/29]

std::string ripple::to_string ( ListDisposition  disposition)

Definition at line 45 of file ValidatorList.cpp.

◆ splitMessageParts()

std::size_t ripple::splitMessageParts ( std::vector< ValidatorList::MessageWithHash > &  messages,
protocol::TMValidatorListCollection const &  largeMsg,
std::size_t  maxSize,
std::size_t  begin,
std::size_t  end 
)

Definition at line 523 of file ValidatorList.cpp.

◆ splitMessage()

std::size_t ripple::splitMessage ( std::vector< ValidatorList::MessageWithHash > &  messages,
protocol::TMValidatorListCollection const &  largeMsg,
std::size_t  maxSize,
std::size_t  begin = 0,
std::size_t  end = 0 
)

Definition at line 502 of file ValidatorList.cpp.

◆ buildValidatorListMessage() [1/2]

std::size_t ripple::buildValidatorListMessage ( std::vector< ValidatorList::MessageWithHash > &  messages,
std::uint32_t  rawVersion,
std::string const &  rawManifest,
ValidatorBlobInfo const &  currentBlob,
std::size_t  maxSize 
)

Definition at line 588 of file ValidatorList.cpp.

◆ buildValidatorListMessage() [2/2]

std::size_t ripple::buildValidatorListMessage ( std::vector< ValidatorList::MessageWithHash > &  messages,
std::uint64_t  peerSequence,
std::uint32_t  rawVersion,
std::string const &  rawManifest,
std::map< std::size_t, ValidatorBlobInfo > const &  blobInfos,
std::size_t  maxSize 
)

Definition at line 623 of file ValidatorList.cpp.

◆ make_FeeVote()

std::unique_ptr< FeeVote > ripple::make_FeeVote ( FeeSetup const &  setup,
beast::Journal  journal 
)

Create an instance of the FeeVote logic.

Parameters
setupThe fee schedule to vote for.
journalWhere to log.

Definition at line 340 of file FeeVoteImpl.cpp.

◆ setup_HashRouter()

HashRouter::Setup ripple::setup_HashRouter ( Config const &  config)

Definition at line 137 of file HashRouter.cpp.

◆ operator|() [3/4]

constexpr HashRouterFlags ripple::operator| ( HashRouterFlags  lhs,
HashRouterFlags  rhs 
)
constexpr

Definition at line 53 of file HashRouter.h.

◆ operator|=() [2/2]

constexpr HashRouterFlags & ripple::operator|= ( HashRouterFlags lhs,
HashRouterFlags  rhs 
)
constexpr

Definition at line 61 of file HashRouter.h.

◆ operator&() [3/3]

constexpr HashRouterFlags ripple::operator& ( HashRouterFlags  lhs,
HashRouterFlags  rhs 
)
constexpr

Definition at line 68 of file HashRouter.h.

◆ operator&=() [2/2]

constexpr HashRouterFlags & ripple::operator&= ( HashRouterFlags lhs,
HashRouterFlags  rhs 
)
constexpr

Definition at line 76 of file HashRouter.h.

◆ any()

constexpr bool ripple::any ( HashRouterFlags  flags)
constexpr

Definition at line 83 of file HashRouter.h.

◆ deserializeManifest() [2/3]

std::optional< Manifest > ripple::deserializeManifest ( std::string const &  s,
beast::Journal  journal = beast::Journal(beast::Journal::getNullSink()) 
)

Definition at line 168 of file Manifest.h.

◆ deserializeManifest() [3/3]

template<class T , class = std::enable_if_t< std::is_same<T, char>::value || std::is_same<T, unsigned char>::value>>
std::optional< Manifest > ripple::deserializeManifest ( std::vector< T > const &  v,
beast::Journal  journal = beast::Journal(beast::Journal::getNullSink()) 
)

Definition at line 180 of file Manifest.h.

◆ operator==() [26/28]

bool ripple::operator== ( Manifest const &  lhs,
Manifest const &  rhs 
)

Definition at line 189 of file Manifest.h.

◆ operator!=() [9/9]

bool ripple::operator!= ( Manifest const &  lhs,
Manifest const &  rhs 
)

Definition at line 199 of file Manifest.h.

◆ to_string() [25/29]

std::string ripple::to_string ( ManifestDisposition  m)

Definition at line 233 of file Manifest.h.

◆ trunc32()

static std::uint32_t ripple::trunc32 ( std::uint64_t  v)
static

Definition at line 2306 of file NetworkOPs.cpp.

◆ make_NetworkOPs()

std::unique_ptr< NetworkOPs > ripple::make_NetworkOPs ( Application app,
NetworkOPs::clock_type clock,
bool  standalone,
std::size_t  minPeerCount,
bool  startvalid,
JobQueue job_queue,
LedgerMaster ledgerMaster,
ValidatorKeys const &  validatorKeys,
boost::asio::io_context &  io_svc,
beast::Journal  journal,
beast::insight::Collector::ptr const &  collector 
)

Definition at line 4883 of file NetworkOPs.cpp.

◆ make_SHAMapStore()

std::unique_ptr< SHAMapStore > ripple::make_SHAMapStore ( Application app,
NodeStore::Scheduler scheduler,
beast::Journal  journal 
)

Definition at line 683 of file SHAMapStoreImp.cpp.

◆ toDrops()

template<class T >
XRPAmount ripple::toDrops ( FeeLevel< T > const &  level,
XRPAmount  baseFee 
)

Definition at line 863 of file TxQ.h.

◆ toFeeLevel()

FeeLevel64 ripple::toFeeLevel ( XRPAmount const &  drops,
XRPAmount const &  baseFee 
)

Definition at line 870 of file TxQ.h.

◆ hash_append() [6/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
ValidatorBlobInfo const &  blobInfo 
)

Definition at line 920 of file ValidatorList.h.

◆ hash_append() [7/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
std::vector< ValidatorBlobInfo > const &  blobs 
)

Definition at line 932 of file ValidatorList.h.

◆ hash_append() [8/8]

template<class Hasher >
void ripple::hash_append ( Hasher &  h,
std::map< std::size_t, ValidatorBlobInfo > const &  blobs 
)

Definition at line 940 of file ValidatorList.h.

◆ accountSourceCurrencies()

hash_set< Currency > ripple::accountSourceCurrencies ( AccountID const &  account,
std::shared_ptr< RippleLineCache > const &  lrCache,
bool  includeXRP 
)

Definition at line 25 of file AccountCurrencies.cpp.

◆ accountDestCurrencies()

hash_set< Currency > ripple::accountDestCurrencies ( AccountID const &  account,
std::shared_ptr< RippleLineCache > const &  lrCache,
bool  includeXRP 
)

Definition at line 61 of file AccountCurrencies.cpp.

◆ creditLimit()

STAmount ripple::creditLimit ( ReadView const &  view,
AccountID const &  account,
AccountID const &  issuer,
Currency const &  currency 
)

Calculate the maximum amount of IOUs that an account can hold.

Parameters
ledgerthe ledger to check against.
accountthe account of interest.
issuerthe issuer of the IOU.
currencythe IOU to check.
Returns
The maximum amount that can be held.

Definition at line 28 of file Credit.cpp.

◆ creditLimit2()

IOUAmount ripple::creditLimit2 ( ReadView const &  v,
AccountID const &  acc,
AccountID const &  iss,
Currency const &  cur 
)

Definition at line 55 of file Credit.cpp.

◆ creditBalance()

STAmount ripple::creditBalance ( ReadView const &  view,
AccountID const &  account,
AccountID const &  issuer,
Currency const &  currency 
)

Returns the amount of IOUs issued by issuer that are held by an account.

Parameters
ledgerthe ledger to check against.
accountthe account of interest.
issuerthe issuer of the IOU.
currencythe IOU to check.

Definition at line 65 of file Credit.cpp.

◆ get() [6/7]

template<class T >
T & ripple::get ( EitherAmount amt)

Definition at line 118 of file AmountSpec.h.

◆ get< IOUAmount >() [1/2]

template<>
IOUAmount & ripple::get< IOUAmount > ( EitherAmount amt)

Definition at line 125 of file AmountSpec.h.

◆ get< XRPAmount >() [1/2]

template<>
XRPAmount & ripple::get< XRPAmount > ( EitherAmount amt)

Definition at line 134 of file AmountSpec.h.

◆ get() [7/7]

template<class T >
T const & ripple::get ( EitherAmount const &  amt)

Definition at line 143 of file AmountSpec.h.

◆ get< IOUAmount >() [2/2]

template<>
IOUAmount const & ripple::get< IOUAmount > ( EitherAmount const &  amt)

Definition at line 150 of file AmountSpec.h.

◆ get< XRPAmount >() [2/2]

template<>
XRPAmount const & ripple::get< XRPAmount > ( EitherAmount const &  amt)

Definition at line 160 of file AmountSpec.h.

◆ toAmountSpec() [1/2]

AmountSpec ripple::toAmountSpec ( STAmount const &  amt)

Definition at line 169 of file AmountSpec.h.

◆ toEitherAmount()

EitherAmount ripple::toEitherAmount ( STAmount const &  amt)

Definition at line 195 of file AmountSpec.h.

◆ toAmountSpec() [2/2]

AmountSpec ripple::toAmountSpec ( EitherAmount const &  ea,
std::optional< Currency > const &  c 
)

Definition at line 203 of file AmountSpec.h.

◆ limitStepIn()

template<class TIn , class TOut , class Offer >
static void ripple::limitStepIn ( Offer const &  offer,
TAmounts< TIn, TOut > &  ofrAmt,
TAmounts< TIn, TOut > &  stpAmt,
TOut &  ownerGives,
std::uint32_t  transferRateIn,
std::uint32_t  transferRateOut,
TIn const &  limit 
)
static

Definition at line 651 of file BookStep.cpp.

◆ limitStepOut()

template<class TIn , class TOut , class Offer >
static void ripple::limitStepOut ( Offer const &  offer,
TAmounts< TIn, TOut > &  ofrAmt,
TAmounts< TIn, TOut > &  stpAmt,
TOut &  ownerGives,
std::uint32_t  transferRateIn,
std::uint32_t  transferRateOut,
TOut const &  limit 
)
static

Definition at line 682 of file BookStep.cpp.

◆ sum()

template<class TCollection >
static auto ripple::sum ( TCollection const &  col)
static

Definition at line 995 of file BookStep.cpp.

◆ make_BookStepHelper()

template<class TIn , class TOut >
static std::pair< TER, std::unique_ptr< Step > > ripple::make_BookStepHelper ( StrandContext const &  ctx,
Issue const &  in,
Issue const &  out 
)
static

Definition at line 1429 of file BookStep.cpp.

◆ make_BookStepII()

std::pair< TER, std::unique_ptr< Step > > ripple::make_BookStepII ( StrandContext const &  ctx,
Issue const &  in,
Issue const &  out 
)

Definition at line 1454 of file BookStep.cpp.

◆ make_BookStepIX()

std::pair< TER, std::unique_ptr< Step > > ripple::make_BookStepIX ( StrandContext const &  ctx,
Issue const &  in 
)

Definition at line 1460 of file BookStep.cpp.

◆ make_BookStepXI()

std::pair< TER, std::unique_ptr< Step > > ripple::make_BookStepXI ( StrandContext const &  ctx,
Issue const &  out 
)

Definition at line 1466 of file BookStep.cpp.

◆ make_DirectStepI()

std::pair< TER, std::unique_ptr< Step > > ripple::make_DirectStepI ( StrandContext const &  ctx,
AccountID const &  src,
AccountID const &  dst,
Currency const &  c 
)

Definition at line 969 of file DirectStep.cpp.

◆ SetUnion()

template<class T >
void ripple::SetUnion ( boost::container::flat_set< T > &  dst,
boost::container::flat_set< T > const &  src 
)

Given two flat sets dst and src, compute dst = dst union src.

Parameters
dstset to store the resulting union, and also a source of elements for the union
srcsecond source of elements for the union

Definition at line 35 of file FlatSets.h.

◆ largestAmount()

STAmount ripple::largestAmount ( STAmount const &  amt)

Definition at line 28 of file PathfinderUtils.h.

◆ convertAmount()

STAmount ripple::convertAmount ( STAmount const &  amt,
bool  all 
)

Definition at line 37 of file PathfinderUtils.h.

◆ convertAllCheck()

bool ripple::convertAllCheck ( STAmount const &  a)

Definition at line 46 of file PathfinderUtils.h.

◆ checkNear() [1/2]

bool ripple::checkNear ( IOUAmount const &  expected,
IOUAmount const &  actual 
)

Definition at line 34 of file PaySteps.cpp.

◆ checkNear() [2/2]

bool ripple::checkNear ( XRPAmount const &  expected,
XRPAmount const &  actual 
)

Definition at line 58 of file PaySteps.cpp.

◆ isXRPAccount()

static bool ripple::isXRPAccount ( STPathElement const &  pe)
static

Definition at line 64 of file PaySteps.cpp.

◆ toStep()

static std::pair< TER, std::unique_ptr< Step > > ripple::toStep ( StrandContext const &  ctx,
STPathElement const *  e1,
STPathElement const *  e2,
Issue const &  curIssue 
)
static

Definition at line 72 of file PaySteps.cpp.

◆ toStrand()

std::pair< TER, Strand > ripple::toStrand ( ReadView const &  sb,
AccountID const &  src,
AccountID const &  dst,
Issue const &  deliver,
std::optional< Quality > const &  limitQuality,
std::optional< Issue > const &  sendMaxIssue,
STPath const &  path,
bool  ownerPaysTransferFee,
OfferCrossing  offerCrossing,
AMMContext ammContext,
std::optional< uint256 > const &  domainID,
beast::Journal  j 
)

Create a Strand for the specified path.

Parameters
sbview for trust lines, balances, and attributes like auth and freeze
srcAccount that is sending assets
dstAccount that is receiving assets
deliverAsset the dst account will receive (if issuer of deliver == dst, then accept any issuer)
limitQualityOffer crossing BookSteps use this value in an optimization. If, during direct offer crossing, the quality of the tip of the book drops below this value, then evaluating the strand can stop.
sendMaxIssueOptional asset to send.
pathLiquidity sources to use for this strand of the payment. The path contains an ordered collection of the offer books to use and accounts to ripple through.
ownerPaysTransferFeefalse -> charge sender; true -> charge offer owner
offerCrossingfalse -> payment; true -> offer crossing
ammContextcounts iterations with AMM offers
domainIDthe domain that order books will use
jJournal for logging messages
Returns
Error code and constructed Strand

Definition at line 136 of file PaySteps.cpp.

◆ toStrands()

std::pair< TER, std::vector< Strand > > ripple::toStrands ( ReadView const &  sb,
AccountID const &  src,
AccountID const &  dst,
Issue const &  deliver,
std::optional< Quality > const &  limitQuality,
std::optional< Issue > const &  sendMax,
STPathSet const &  paths,
bool  addDefaultPath,
bool  ownerPaysTransferFee,
OfferCrossing  offerCrossing,
AMMContext ammContext,
std::optional< uint256 > const &  domainID,
beast::Journal  j 
)

Create a Strand for each specified path (including the default path, if indicated)

Parameters
sbView for trust lines, balances, and attributes like auth and freeze
srcAccount that is sending assets
dstAccount that is receiving assets
deliverAsset the dst account will receive (if issuer of deliver == dst, then accept any issuer)
limitQualityOffer crossing BookSteps use this value in an optimization. If, during direct offer crossing, the quality of the tip of the book drops below this value, then evaluating the strand can stop.
sendMaxOptional asset to send.
pathsPaths to use to fulfill the payment. Each path in the pathset contains an ordered collection of the offer books to use and accounts to ripple through.
addDefaultPathDetermines if the default path should be included
ownerPaysTransferFeefalse -> charge sender; true -> charge offer owner
offerCrossingfalse -> payment; true -> offer crossing
ammContextcounts iterations with AMM offers
domainIDthe domain that order books will use
jJournal for logging messages
Returns
error code and collection of strands

Definition at line 475 of file PaySteps.cpp.

◆ isDirectXrpToXrp()

template<class InAmt , class OutAmt >
bool ripple::isDirectXrpToXrp ( Strand const &  strand)

Definition at line 630 of file PaySteps.cpp.

◆ isDirectXrpToXrp< XRPAmount, XRPAmount >()

template<>
bool ripple::isDirectXrpToXrp< XRPAmount, XRPAmount > ( Strand const &  strand)

Definition at line 636 of file PaySteps.cpp.

◆ isDirectXrpToXrp< XRPAmount, IOUAmount >()

template bool ripple::isDirectXrpToXrp< XRPAmount, IOUAmount > ( Strand const &  strand)

◆ isDirectXrpToXrp< IOUAmount, XRPAmount >()

template bool ripple::isDirectXrpToXrp< IOUAmount, XRPAmount > ( Strand const &  strand)

◆ isDirectXrpToXrp< IOUAmount, IOUAmount >()

template bool ripple::isDirectXrpToXrp< IOUAmount, IOUAmount > ( Strand const &  strand)

◆ checkFreeze()

TER ripple::checkFreeze ( ReadView const &  view,
AccountID const &  src,
AccountID const &  dst,
Currency const &  currency 
)

Definition at line 33 of file StepChecks.h.

◆ checkNoRipple()

TER ripple::checkNoRipple ( ReadView const &  view,
AccountID const &  prev,
AccountID const &  cur,
AccountID const &  next,
Currency const &  currency,
beast::Journal  j 
)

Definition at line 88 of file StepChecks.h.

◆ redeems()

bool ripple::redeems ( DebtDirection  dir)

Definition at line 48 of file Steps.h.

◆ issues()

bool ripple::issues ( DebtDirection  dir)

Definition at line 54 of file Steps.h.

◆ normalizePath()

std::pair< TER, STPath > ripple::normalizePath ( AccountID const &  src,
AccountID const &  dst,
Issue const &  deliver,
std::optional< Issue > const &  sendMaxIssue,
STPath const &  path 
)

◆ flow() [1/3]

template<class TInAmt , class TOutAmt >
StrandResult< TInAmt, TOutAmt > ripple::flow ( PaymentSandbox const &  baseView,
Strand const &  strand,
std::optional< TInAmt > const &  maxIn,
TOutAmt const &  out,
beast::Journal  j 
)

Request out amount from a strand.

Parameters
baseViewTrust lines and balances
strandSteps of Accounts to ripple through and offer books to use
maxInMax amount of input allowed
outAmount of output requested from the strand
jJournal to write log messages to
Returns
Actual amount in and out from the strand, errors, offers to remove, and payment sandbox

Definition at line 105 of file StrandFlow.h.

◆ flow() [2/3]

template<class TInAmt , class TOutAmt >
FlowResult< TInAmt, TOutAmt > ripple::flow ( PaymentSandbox const &  baseView,
std::vector< Strand > const &  strands,
TOutAmt const &  outReq,
bool  partialPayment,
OfferCrossing  offerCrossing,
std::optional< Quality > const &  limitQuality,
std::optional< STAmount > const &  sendMaxST,
beast::Journal  j,
AMMContext ammContext,
path::detail::FlowDebugInfo flowDebugInfo = nullptr 
)

Request out amount from a collection of strands.

Attempt to fulfill the payment by using liquidity from the strands in order from least expensive to most expensive

Parameters
baseViewTrust lines and balances
strandsEach strand contains the steps of accounts to ripple through and offer books to use
outReqAmount of output requested from the strand
partialPaymentIf true allow less than the full payment
offerCrossingIf true offer crossing, not handling a standard payment
limitQualityIf present, the minimum quality for any strand taken
sendMaxSTIf present, the maximum STAmount to send
jJournal to write journal messages to
ammContextcounts iterations with AMM offers
flowDebugInfoIf pointer is non-null, write flow debug info here
Returns
Actual amount in and out from the strands, errors, and payment sandbox

Definition at line 569 of file StrandFlow.h.

◆ operator==() [27/28]

template<class TDerived >
bool ripple::operator== ( XRPEndpointStep< TDerived > const &  lhs,
XRPEndpointStep< TDerived > const &  rhs 
)

Definition at line 237 of file XRPEndpointStep.cpp.

◆ make_XRPEndpointStep()

std::pair< TER, std::unique_ptr< Step > > ripple::make_XRPEndpointStep ( StrandContext const &  ctx,
AccountID const &  acc 
)

Definition at line 395 of file XRPEndpointStep.cpp.

◆ finishFlow()

template<class FlowResult >
static auto ripple::finishFlow ( PaymentSandbox sb,
Issue const &  srcIssue,
Issue const &  dstIssue,
FlowResult &&  f 
)
static

Definition at line 35 of file Flow.cpp.

◆ flow() [3/3]

path::RippleCalc::Output ripple::flow ( PaymentSandbox view,
STAmount const &  deliver,
AccountID const &  src,
AccountID const &  dst,
STPathSet const &  paths,
bool  defaultPaths,
bool  partialPayment,
bool  ownerPaysTransferFee,
OfferCrossing  offerCrossing,
std::optional< Quality > const &  limitQuality,
std::optional< STAmount > const &  sendMax,
std::optional< uint256 > const &  domainID,
beast::Journal  j,
path::detail::FlowDebugInfo flowDebugInfo = nullptr 
)

Make a payment from the src account to the dst account.

Parameters
viewTrust lines and balances
deliverAmount to deliver to the dst account
srcAccount providing input funds for the payment
dstAccount receiving the payment
pathsSet of paths to explore for liquidity
defaultPathsInclude defaultPaths in the path set
partialPaymentIf the payment cannot deliver the entire requested amount, deliver as much as possible, given the constraints
ownerPaysTransferFeeIf true then owner, not sender, pays fee
offerCrossingIf Yes or Sell then flow is executing offer crossing, not payments
limitQualityDo not use liquidity below this quality threshold
sendMaxDo not spend more than this amount
jJournal to write journal messages to
flowDebugInfoIf non-null a pointer to FlowDebugInfo for debugging
Returns
Actual amount in and out, and the result code

Definition at line 55 of file Flow.cpp.

◆ isDefaultPath()

static bool ripple::isDefaultPath ( STPath const &  path)
static

Definition at line 463 of file Pathfinder.cpp.

◆ removeIssuer()

static STPath ripple::removeIssuer ( STPath const &  path)
static

Definition at line 482 of file Pathfinder.cpp.

◆ addUniquePath()

void ripple::addUniquePath ( STPathSet pathSet,
STPath const &  path 
)

Definition at line 940 of file Pathfinder.cpp.

◆ getSQLiteDatabase()

std::unique_ptr< RelationalDatabase > ripple::getSQLiteDatabase ( Application app,
Config const &  config,
JobQueue jobQueue 
)

Definition at line 856 of file SQLiteDatabase.cpp.

◆ initPeerFinderDB()

void ripple::initPeerFinderDB ( soci::session &  session,
BasicConfig const &  config,
beast::Journal  j 
)

initPeerFinderDB Opens a session with the peer finder database.

Parameters
sessionSession with the peer finder database.
configPath to the database and other opening parameters.
jJournal.

Definition at line 25 of file PeerFinder.cpp.

◆ updatePeerFinderDB()

void ripple::updatePeerFinderDB ( soci::session &  session,
int  currentSchemaVersion,
beast::Journal  j 
)

updatePeerFinderDB Updates the peer finder database to a new version.

Parameters
sessionSession with the database.
currentSchemaVersionNew version of the database.
jJournal.

Definition at line 61 of file PeerFinder.cpp.

◆ readPeerFinderDB()

void ripple::readPeerFinderDB ( soci::session &  session,
std::function< void(std::string const &, int)> const &  func 
)

readPeerFinderDB Reads all entries from the peer finder database and invokes the given callback for each entry.

Parameters
sessionSession with the database.
funcCallback to invoke for each entry.

Definition at line 217 of file PeerFinder.cpp.

◆ savePeerFinderDB()

void ripple::savePeerFinderDB ( soci::session &  session,
std::vector< PeerFinder::Store::Entry > const &  v 
)

savePeerFinderDB Saves a new entry to the peer finder database.

Parameters
sessionSession with the database.
vEntry to save which contains information about a new peer.

Definition at line 239 of file PeerFinder.cpp.

◆ initStateDB()

void ripple::initStateDB ( soci::session &  session,
BasicConfig const &  config,
std::string const &  dbName 
)

initStateDB Opens a session with the State database.

Parameters
sessionProvides a session with the database.
configPath to the database and other opening parameters.
dbNameName of the database.

Definition at line 25 of file State.cpp.

◆ getCanDelete()

LedgerIndex ripple::getCanDelete ( soci::session &  session)

getCanDelete Returns the ledger sequence which can be deleted.

Parameters
sessionSession with the database.
Returns
Ledger sequence.

Definition at line 81 of file State.cpp.

◆ setCanDelete()

LedgerIndex ripple::setCanDelete ( soci::session &  session,
LedgerIndex  canDelete 
)

setCanDelete Updates the ledger sequence which can be deleted.

Parameters
sessionSession with the database.
canDeleteLedger sequence to save.
Returns
Previous value of the ledger sequence which can be deleted.

Definition at line 91 of file State.cpp.

◆ getSavedState()

SavedState ripple::getSavedState ( soci::session &  session)

getSavedState Returns the saved state.

Parameters
sessionSession with the database.
Returns
The SavedState structure which contains the names of the writable database, the archive database and the last rotated ledger sequence.

Definition at line 99 of file State.cpp.

◆ setSavedState()

void ripple::setSavedState ( soci::session &  session,
SavedState const &  state 
)

setSavedState Saves the given state.

Parameters
sessionSession with the database.
stateThe SavedState structure which contains the names of the writable database, the archive database and the last rotated ledger sequence.

Definition at line 111 of file State.cpp.

◆ setLastRotated()

void ripple::setLastRotated ( soci::session &  session,
LedgerIndex  seq 
)

setLastRotated Updates the last rotated ledger sequence.

Parameters
sessionSession with the database.
seqNew value of the last rotated ledger sequence.

Definition at line 123 of file State.cpp.

◆ doVacuumDB()

bool ripple::doVacuumDB ( DatabaseCon::Setup const &  setup,
beast::Journal  j 
)

doVacuumDB Creates, initialises, and performs cleanup on a database.

Parameters
setupPath to the database and other opening parameters.
jJournal.
Returns
True if the vacuum process completed successfully.

Definition at line 27 of file Vacuum.cpp.

◆ makeWalletDB()

std::unique_ptr< DatabaseCon > ripple::makeWalletDB ( DatabaseCon::Setup const &  setup,
beast::Journal  j 
)

makeWalletDB Opens the wallet database and returns it.

Parameters
setupPath to the database and other opening parameters.
jJournal.
Returns
Unique pointer to the database descriptor.

Definition at line 27 of file Wallet.cpp.

◆ makeTestWalletDB()

std::unique_ptr< DatabaseCon > ripple::makeTestWalletDB ( DatabaseCon::Setup const &  setup,
std::string const &  dbname,
beast::Journal  j 
)

makeTestWalletDB Opens a test wallet database with an arbitrary name.

Parameters
setupPath to the database and other opening parameters.
dbnameName of the database.
jJournal.
Returns
Unique pointer to the database descriptor.

Definition at line 35 of file Wallet.cpp.

◆ getManifests()

void ripple::getManifests ( soci::session &  session,
std::string const &  dbTable,
ManifestCache mCache,
beast::Journal  j 
)

getManifests Loads a manifest from the wallet database and stores it in the cache.

Parameters
sessionSession with the database.
dbTableName of the database table from which the manifest will be extracted.
mCacheCache for storing the manifest.
jJournal.

Definition at line 46 of file Wallet.cpp.

◆ saveManifest()

static void ripple::saveManifest ( soci::session &  session,
std::string const &  dbTable,
std::string const &  serialized 
)
static

Definition at line 79 of file Wallet.cpp.

◆ saveManifests()

void ripple::saveManifests ( soci::session &  session,
std::string const &  dbTable,
std::function< bool(PublicKey const &)> const &  isTrusted,
hash_map< PublicKey, Manifest > const &  map,
beast::Journal  j 
)

saveManifests Saves all given manifests to the database.

Parameters
sessionSession with the database.
dbTableName of the database table that will store the manifest.
isTrustedCallback that returns true if the key is trusted.
mapMaps public keys to manifests.
jJournal.

Definition at line 94 of file Wallet.cpp.

◆ addValidatorManifest()

void ripple::addValidatorManifest ( soci::session &  session,
std::string const &  serialized 
)

addValidatorManifest Saves the manifest of a validator to the database.

Parameters
sessionSession with the database.
serializedManifest of the validator in raw format.

Definition at line 119 of file Wallet.cpp.

◆ clearNodeIdentity()

void ripple::clearNodeIdentity ( soci::session &  session)

Delete any saved public/private key associated with this node.

Definition at line 127 of file Wallet.cpp.

◆ getNodeIdentity() [2/2]

std::pair< PublicKey, SecretKey > ripple::getNodeIdentity ( soci::session &  session)

Returns a stable public and private key for this node.

The node's public identity is defined by a secp256k1 keypair that is (normally) randomly generated. This function will return such a keypair, securely generating one if needed.

Parameters
sessionSession with the database.
Returns
Pair of public and private secp256k1 keys.

Definition at line 133 of file Wallet.cpp.

◆ getPeerReservationTable()

std::unordered_set< PeerReservation, beast::uhash<>, KeyEqual > ripple::getPeerReservationTable ( soci::session &  session,
beast::Journal  j 
)

getPeerReservationTable Returns the peer reservation table.

Parameters
sessionSession with the database.
jJournal.
Returns
Peer reservation hash table.

Definition at line 170 of file Wallet.cpp.

◆ insertPeerReservation()

void ripple::insertPeerReservation ( soci::session &  session,
PublicKey const &  nodeId,
std::string const &  description 
)

insertPeerReservation Adds an entry to the peer reservation table.

Parameters
sessionSession with the database.
nodeIdPublic key of the node.
descriptionDescription of the node.

Definition at line 207 of file Wallet.cpp.

◆ deletePeerReservation()

void ripple::deletePeerReservation ( soci::session &  session,
PublicKey const &  nodeId 
)

deletePeerReservation Deletes an entry from the peer reservation table.

Parameters
sessionSession with the database.
nodeIdPublic key of the node to remove.

Definition at line 221 of file Wallet.cpp.

◆ createFeatureVotes()

bool ripple::createFeatureVotes ( soci::session &  session)

createFeatureVotes Creates the FeatureVote table if it does not exist.

Parameters
sessionSession with the wallet database.
Returns
true if the table already exists

Definition at line 229 of file Wallet.cpp.

◆ readAmendments()

void ripple::readAmendments ( soci::session &  session,
std::function< void(boost::optional< std::string > amendment_hash, boost::optional< std::string > amendment_name, boost::optional< AmendmentVote > vote)> const &  callback 
)

readAmendments Reads all amendments from the FeatureVotes table.

Parameters
sessionSession with the wallet database.
callbackCallback called for each amendment with its hash, name and optionally a flag denoting whether the amendment should be vetoed.

Definition at line 253 of file Wallet.cpp.

◆ voteAmendment()

void ripple::voteAmendment ( soci::session &  session,
uint256 const &  amendment,
std::string const &  name,
AmendmentVote  vote 
)

voteAmendment Set the veto value for a particular amendment.

Parameters
sessionSession with the wallet database.
amendmentHash of the amendment.
nameName of the amendment.
voteWhether to vote in favor of this amendment.

Definition at line 289 of file Wallet.cpp.

◆ rangeCheckedCast()

template<class T , class C >
T ripple::rangeCheckedCast ( c)

Definition at line 230 of file RelationalDatabase.h.

◆ checkValidity()

std::pair< Validity, std::string > ripple::checkValidity ( HashRouter router,
STTx const &  tx,
Rules const &  rules,
Config const &  config 
)

Checks transaction signature and local checks.

Returns
A Validity enum representing how valid the STTx is and, if not Valid, a reason string.
Note
Results are cached internally, so tests will not be repeated over repeated calls, unless cache expires.
Returns
std::pair, where .first is the status, and .second is the reason if appropriate.
See also
Validity

Definition at line 44 of file apply.cpp.

◆ forceValidity()

void ripple::forceValidity ( HashRouter router,
uint256 const &  txid,
Validity  validity 
)

Sets the validity of a given transaction in the cache.

Warning
Use with extreme care.
Note
Can only raise the validity to a more valid state, and can not override anything cached bad.
See also
checkValidity, Validity

Definition at line 118 of file apply.cpp.

◆ apply() [1/3]

ApplyResult ripple::apply ( Application app,
OpenView view,
STTx const &  tx,
ApplyFlags  flags,
beast::Journal  journal 
)

Apply a transaction to an OpenView.

This function is the canonical way to apply a transaction to a ledger. It rolls the validation and application steps into one function. To do the steps manually, the correct calling order is:

PreflightResult preflight(Application &app, Rules const &rules, STTx const &tx, ApplyFlags flags, beast::Journal j)
Gate a transaction based on static information.
ApplyResult doApply(PreclaimResult const &preclaimResult, Application &app, OpenView &view)
Apply a prechecked transaction to an OpenView.
PreclaimResult preclaim(PreflightResult const &preflightResult, Application &app, OpenView const &view)
Gate a transaction based on static ledger information.

The result of one function must be passed to the next. The preflight result can be safely cached and reused asynchronously, but preclaim and doApply must be called in the same thread and with the same view.

Note
Does not throw.

For open ledgers, the Transactor will catch exceptions and return tefEXCEPTION. For closed ledgers, the Transactor will attempt to only charge a fee, and return tecFAILED_PROCESSING.

If the Transactor gets an exception while trying to charge the fee, it will be caught and turned into tefEXCEPTION.

For network health, a Transactor makes its best effort to at least charge a fee if the ledger is closed.

Parameters
appThe current running Application.
viewThe open ledger that the transaction will attempt to be applied to.
txThe transaction to be checked.
flagsApplyFlags describing processing options.
journalA journal.
See also
preflight, preclaim, doApply
Returns
A pair with the TER and a bool indicating whether or not the transaction was applied.

Definition at line 146 of file apply.cpp.

◆ applyTransaction()

ApplyTransactionResult ripple::applyTransaction ( Application app,
OpenView view,
STTx const &  tx,
bool  retryAssured,
ApplyFlags  flags,
beast::Journal  journal 
)

Transaction application helper.

Provides more detailed logging and decodes the correct behavior based on the TER type

See also
ApplyTransactionResult

Definition at line 239 of file apply.cpp.

◆ isTecClaimHardFail()

bool ripple::isTecClaimHardFail ( TER  ter,
ApplyFlags  flags 
)

Return true if the transaction can claim a fee (tec), and the ApplyFlags do not allow soft failures.

Definition at line 48 of file applySteps.h.

◆ preflight() [1/2]

PreflightResult ripple::preflight ( Application app,
Rules const &  rules,
STTx const &  tx,
ApplyFlags  flags,
beast::Journal  j 
)

Gate a transaction based on static information.

The transaction is checked against all possible validity constraints that do not require a ledger.

Parameters
appThe current running Application.
rulesThe Rules in effect at the time of the check.
txThe transaction to be checked.
flagsApplyFlags describing processing options.
jA journal.
See also
PreflightResult, preclaim, doApply, apply
Returns
A PreflightResult object containing, among other things, the TER code.

Definition at line 304 of file applySteps.cpp.

◆ preflight() [2/2]

PreflightResult ripple::preflight ( Application app,
Rules const &  rules,
uint256 const &  parentBatchId,
STTx const &  tx,
ApplyFlags  flags,
beast::Journal  j 
)

Definition at line 324 of file applySteps.cpp.

◆ preclaim()

PreclaimResult ripple::preclaim ( PreflightResult const &  preflightResult,
Application app,
OpenView const &  view 
)

Gate a transaction based on static ledger information.

The transaction is checked against all possible validity constraints that DO require a ledger.

If preclaim succeeds, then the transaction is very likely to claim a fee. This will determine if the transaction is safe to relay without being applied to the open ledger.

"Succeeds" in this case is defined as returning a tes or tec, since both lead to claiming a fee.

Precondition
The transaction has been checked and validated using preflight
Parameters
preflightResultThe result of a previous call to preflight for the transaction.
appThe current running Application.
viewThe open ledger that the transaction will attempt to be applied to.
See also
PreclaimResult, preflight, doApply, apply
Returns
A PreclaimResult object containing, among other things the TER code and the base fee value for this transaction.

Definition at line 345 of file applySteps.cpp.

◆ calculateBaseFee()

XRPAmount ripple::calculateBaseFee ( ReadView const &  view,
STTx const &  tx 
)

Compute only the expected base fee for a transaction.

Base fees are transaction specific, so any calculation needing them must get the base fee for each transaction.

No validation is done or implied by this function.

Caller is responsible for handling any exceptions. Since none should be thrown, that will usually mean terminating.

Parameters
viewThe current open ledger.
txThe transaction to be checked.
Returns
The base fee.

Definition at line 406 of file applySteps.cpp.

◆ calculateDefaultBaseFee()

XRPAmount ripple::calculateDefaultBaseFee ( ReadView const &  view,
STTx const &  tx 
)

Return the minimum fee that an "ordinary" transaction would pay.

When computing the FeeLevel for a transaction the TxQ sometimes needs the know what an "ordinary" or reference transaction would be required to pay.

Parameters
viewThe current open ledger.
txThe transaction so the correct multisigner count is used.
Returns
The base fee in XRPAmount.

Definition at line 412 of file applySteps.cpp.

◆ doApply()

ApplyResult ripple::doApply ( PreclaimResult const &  preclaimResult,
Application app,
OpenView view 
)

Apply a prechecked transaction to an OpenView.

Precondition
The transaction has been checked and validated using preflight and preclaim
Parameters
preclaimResultThe result of a previous call to preclaim for the transaction.
appThe current running Application.
viewThe open ledger that the transaction will attempt to be applied to.
See also
preflight, preclaim, apply
Returns
A pair with the TER and a bool indicating whether or not the transaction was applied.

Definition at line 418 of file applySteps.cpp.

◆ applyBid()

static std::pair< TER, bool > ripple::applyBid ( ApplyContext ctx_,
Sandbox sb,
AccountID const &  account_,
beast::Journal  j_ 
)
static

Definition at line 172 of file AMMBid.cpp.

◆ applyCreate()

static std::pair< TER, bool > ripple::applyCreate ( ApplyContext ctx_,
Sandbox sb,
AccountID const &  account_,
beast::Journal  j_ 
)
static

Definition at line 212 of file AMMCreate.cpp.

◆ adjustLPTokensOut()

static STAmount ripple::adjustLPTokensOut ( Rules const &  rules,
STAmount const &  lptAMMBalance,
STAmount const &  lpTokensDeposit 
)
static

Definition at line 631 of file AMMDeposit.cpp.

◆ applyVote()

static std::pair< TER, bool > ripple::applyVote ( ApplyContext ctx_,
Sandbox sb,
AccountID const &  account_,
beast::Journal  j_ 
)
static

Definition at line 79 of file AMMVote.cpp.

◆ tokensWithdraw()

static std::optional< STAmount > ripple::tokensWithdraw ( STAmount const &  lpTokens,
std::optional< STAmount > const &  tokensIn,
std::uint32_t  flags 
)
static

Definition at line 158 of file AMMWithdraw.cpp.

◆ adjustLPTokensIn()

static STAmount ripple::adjustLPTokensIn ( Rules const &  rules,
STAmount const &  lptAMMBalance,
STAmount const &  lpTokensWithdraw,
WithdrawAll  withdrawAll 
)
static

Definition at line 675 of file AMMWithdraw.cpp.

◆ apply() [2/3]

template<typename PreflightChecks >
ApplyResult ripple::apply ( Application app,
OpenView view,
PreflightChecks &&  preflightChecks 
)

Definition at line 139 of file apply.cpp.

◆ apply() [3/3]

ApplyResult ripple::apply ( Application app,
OpenView view,
uint256 const &  parentBatchId,
STTx const &  tx,
ApplyFlags  flags,
beast::Journal  j 
)

Definition at line 159 of file apply.cpp.

◆ applyBatchTransactions()

static bool ripple::applyBatchTransactions ( Application app,
OpenView batchView,
STTx const &  batchTxn,
beast::Journal  j 
)
static

Definition at line 173 of file apply.cpp.

◆ consequences_helper() [1/3]

template<class T >
requires (T::ConsequencesFactory == Transactor::Normal)
TxConsequences ripple::consequences_helper ( PreflightContext const &  ctx)

Definition at line 92 of file applySteps.cpp.

◆ consequences_helper() [2/3]

template<class T >
requires (T::ConsequencesFactory == Transactor::Blocker)
TxConsequences ripple::consequences_helper ( PreflightContext const &  ctx)

Definition at line 101 of file applySteps.cpp.

◆ consequences_helper() [3/3]

template<class T >
requires (T::ConsequencesFactory == Transactor::Custom)
TxConsequences ripple::consequences_helper ( PreflightContext const &  ctx)

Definition at line 110 of file applySteps.cpp.

◆ invoke_preflight()

static std::pair< NotTEC, TxConsequences > ripple::invoke_preflight ( PreflightContext const &  ctx)
static

Definition at line 117 of file applySteps.cpp.

◆ invoke_preclaim()

static TER ripple::invoke_preclaim ( PreclaimContext const &  ctx)
static

Definition at line 142 of file applySteps.cpp.

◆ invoke_calculateBaseFee()

static XRPAmount ripple::invoke_calculateBaseFee ( ReadView const &  view,
STTx const &  tx 
)
static

Calculates the base fee for a given transaction.

This function determines the base fee required for the specified transaction by invoking the appropriate fee calculation logic based on the transaction type. It uses a type-dispatch mechanism to select the correct calculation method.

Parameters
viewThe ledger view to use for fee calculation.
txThe transaction for which the base fee is to be calculated.
Returns
The calculated base fee as an XRPAmount.
Exceptions
std::exceptionIf an error occurs during fee calculation, including but not limited to unknown transaction types or internal errors, the function logs an error and returns an XRPAmount of zero.

Definition at line 222 of file applySteps.cpp.

◆ invoke_apply()

static ApplyResult ripple::invoke_apply ( ApplyContext ctx)
static

Definition at line 282 of file applySteps.cpp.

◆ preflightHelper()

template<ValidIssueType T>
static NotTEC ripple::preflightHelper ( PreflightContext const &  ctx)
static

◆ preflightHelper< Issue >()

template<>
NotTEC ripple::preflightHelper< Issue > ( PreflightContext const &  ctx)

Definition at line 36 of file Clawback.cpp.

◆ preflightHelper< MPTIssue >()

template<>
NotTEC ripple::preflightHelper< MPTIssue > ( PreflightContext const &  ctx)

Definition at line 55 of file Clawback.cpp.

◆ preclaimHelper()

template<ValidIssueType T>
static TER ripple::preclaimHelper ( PreclaimContext const &  ctx,
SLE const &  sleIssuer,
AccountID const &  issuer,
AccountID const &  holder,
STAmount const &  clawAmount 
)
static

◆ preclaimHelper< Issue >()

template<>
TER ripple::preclaimHelper< Issue > ( PreclaimContext const &  ctx,
SLE const &  sleIssuer,
AccountID const &  issuer,
AccountID const &  holder,
STAmount const &  clawAmount 
)

Definition at line 106 of file Clawback.cpp.

◆ preclaimHelper< MPTIssue >()

template<>
TER ripple::preclaimHelper< MPTIssue > ( PreclaimContext const &  ctx,
SLE const &  sleIssuer,
AccountID const &  issuer,
AccountID const &  holder,
STAmount const &  clawAmount 
)

Definition at line 159 of file Clawback.cpp.

◆ applyHelper()

template<ValidIssueType T>
static TER ripple::applyHelper ( ApplyContext ctx)
static

◆ applyHelper< Issue >()

template<>
TER ripple::applyHelper< Issue > ( ApplyContext ctx)

Definition at line 228 of file Clawback.cpp.

◆ applyHelper< MPTIssue >()

template<>
TER ripple::applyHelper< MPTIssue > ( ApplyContext ctx)

Definition at line 259 of file Clawback.cpp.

◆ addSLE()

TER ripple::addSLE ( ApplyContext ctx,
std::shared_ptr< SLE > const &  sle,
AccountID const &  owner 
)

Definition at line 72 of file DID.cpp.

◆ escrowCreatePreflightHelper()

template<ValidIssueType T>
static NotTEC ripple::escrowCreatePreflightHelper ( PreflightContext const &  ctx)
static

◆ escrowCreatePreflightHelper< Issue >()

Definition at line 93 of file Escrow.cpp.

◆ escrowCreatePreflightHelper< MPTIssue >()

Definition at line 107 of file Escrow.cpp.

◆ escrowCreatePreclaimHelper()

template<ValidIssueType T>
static TER ripple::escrowCreatePreclaimHelper ( PreclaimContext const &  ctx,
AccountID const &  account,
AccountID const &  dest,
STAmount const &  amount 
)
static

◆ escrowCreatePreclaimHelper< Issue >()

template<>
TER ripple::escrowCreatePreclaimHelper< Issue > ( PreclaimContext const &  ctx,
AccountID const &  account,
AccountID const &  dest,
STAmount const &  amount 
)

Definition at line 195 of file Escrow.cpp.

◆ escrowCreatePreclaimHelper< MPTIssue >()

template<>
TER ripple::escrowCreatePreclaimHelper< MPTIssue > ( PreclaimContext const &  ctx,
AccountID const &  account,
AccountID const &  dest,
STAmount const &  amount 
)

Definition at line 273 of file Escrow.cpp.

◆ escrowLockApplyHelper()

template<ValidIssueType T>
static TER ripple::escrowLockApplyHelper ( ApplyView view,
AccountID const &  issuer,
AccountID const &  sender,
STAmount const &  amount,
beast::Journal  journal 
)
static

◆ escrowLockApplyHelper< Issue >()

template<>
TER ripple::escrowLockApplyHelper< Issue > ( ApplyView view,
AccountID const &  issuer,
AccountID const &  sender,
STAmount const &  amount,
beast::Journal  journal 
)

Definition at line 398 of file Escrow.cpp.

◆ escrowLockApplyHelper< MPTIssue >()

template<>
TER ripple::escrowLockApplyHelper< MPTIssue > ( ApplyView view,
AccountID const &  issuer,
AccountID const &  sender,
STAmount const &  amount,
beast::Journal  journal 
)

Definition at line 423 of file Escrow.cpp.

◆ checkCondition()

static bool ripple::checkCondition ( Slice  f,
Slice  c 
)
static

Definition at line 578 of file Escrow.cpp.

◆ escrowFinishPreclaimHelper()

template<ValidIssueType T>
static TER ripple::escrowFinishPreclaimHelper ( PreclaimContext const &  ctx,
AccountID const &  dest,
STAmount const &  amount 
)
static

◆ escrowFinishPreclaimHelper< Issue >()

template<>
TER ripple::escrowFinishPreclaimHelper< Issue > ( PreclaimContext const &  ctx,
AccountID const &  dest,
STAmount const &  amount 
)

Definition at line 669 of file Escrow.cpp.

◆ escrowFinishPreclaimHelper< MPTIssue >()

template<>
TER ripple::escrowFinishPreclaimHelper< MPTIssue > ( PreclaimContext const &  ctx,
AccountID const &  dest,
STAmount const &  amount 
)

Definition at line 693 of file Escrow.cpp.

◆ escrowUnlockApplyHelper()

template<ValidIssueType T>
static TER ripple::escrowUnlockApplyHelper ( ApplyView view,
Rate  lockedRate,
std::shared_ptr< SLE > const &  sleDest,
STAmount const &  xrpBalance,
STAmount const &  amount,
AccountID const &  issuer,
AccountID const &  sender,
AccountID const &  receiver,
bool  createAsset,
beast::Journal  journal 
)
static

◆ escrowUnlockApplyHelper< Issue >()

template<>
TER ripple::escrowUnlockApplyHelper< Issue > ( ApplyView view,
Rate  lockedRate,
std::shared_ptr< SLE > const &  sleDest,
STAmount const &  xrpBalance,
STAmount const &  amount,
AccountID const &  issuer,
AccountID const &  sender,
AccountID const &  receiver,
bool  createAsset,
beast::Journal  journal 
)

Definition at line 776 of file Escrow.cpp.

◆ escrowUnlockApplyHelper< MPTIssue >()

template<>
TER ripple::escrowUnlockApplyHelper< MPTIssue > ( ApplyView view,
Rate  lockedRate,
std::shared_ptr< SLE > const &  sleDest,
STAmount const &  xrpBalance,
STAmount const &  amount,
AccountID const &  issuer,
AccountID const &  sender,
AccountID const &  receiver,
bool  createAsset,
beast::Journal  journal 
)

Definition at line 909 of file Escrow.cpp.

◆ escrowCancelPreclaimHelper()

template<ValidIssueType T>
static TER ripple::escrowCancelPreclaimHelper ( PreclaimContext const &  ctx,
AccountID const &  account,
STAmount const &  amount 
)
static

◆ escrowCancelPreclaimHelper< Issue >()

template<>
TER ripple::escrowCancelPreclaimHelper< Issue > ( PreclaimContext const &  ctx,
AccountID const &  account,
STAmount const &  amount 
)

Definition at line 1173 of file Escrow.cpp.

◆ escrowCancelPreclaimHelper< MPTIssue >()

template<>
TER ripple::escrowCancelPreclaimHelper< MPTIssue > ( PreclaimContext const &  ctx,
AccountID const &  account,
STAmount const &  amount 
)

Definition at line 1193 of file Escrow.cpp.

◆ operator|() [4/4]

constexpr Privilege ripple::operator| ( Privilege  lhs,
Privilege  rhs 
)
constexpr

Definition at line 94 of file InvariantCheck.cpp.

◆ hasPrivilege()

bool ripple::hasPrivilege ( STTx const &  tx,
Privilege  priv 
)

Definition at line 110 of file InvariantCheck.cpp.

◆ validBalances()

static bool ripple::validBalances ( STAmount const &  amount,
STAmount const &  amount2,
STAmount const &  lptAMMBalance,
ValidAMM::ZeroAllowed  zeroAllowed 
)
static

Definition at line 1917 of file InvariantCheck.cpp.

◆ getInvariantChecks()

InvariantChecks ripple::getInvariantChecks ( )

get a tuple of all invariant checks

Returns
std::tuple of instances that implement the required invariant check methods
See also
ripple::InvariantChecker_PROTOTYPE

Definition at line 839 of file InvariantCheck.h.

◆ extractNFTokenFlagsFromTxFlags()

static std::uint16_t ripple::extractNFTokenFlagsFromTxFlags ( std::uint32_t  txFlags)
static

Definition at line 36 of file NFTokenMint.cpp.

◆ hasOfferFields()

static bool ripple::hasOfferFields ( PreflightContext const &  ctx)
static

Definition at line 42 of file NFTokenMint.cpp.

◆ operator<<() [16/16]

template<class TIn , class TOut >
std::ostream & ripple::operator<< ( std::ostream os,
TOffer< TIn, TOut > const &  offer 
)

Definition at line 335 of file Offer.h.

◆ accountFundsHelper() [1/3]

static STAmount ripple::accountFundsHelper ( ReadView const &  view,
AccountID const &  id,
STAmount const &  saDefault,
Issue const &  ,
FreezeHandling  freezeHandling,
beast::Journal  j 
)
static

Definition at line 100 of file OfferStream.cpp.

◆ accountFundsHelper() [2/3]

static IOUAmount ripple::accountFundsHelper ( ReadView const &  view,
AccountID const &  id,
IOUAmount const &  amtDefault,
Issue const &  issue,
FreezeHandling  freezeHandling,
beast::Journal  j 
)
static

Definition at line 112 of file OfferStream.cpp.

◆ accountFundsHelper() [3/3]

static XRPAmount ripple::accountFundsHelper ( ReadView const &  view,
AccountID const &  id,
XRPAmount const &  amtDefault,
Issue const &  issue,
FreezeHandling  freezeHandling,
beast::Journal  j 
)
static

Definition at line 129 of file OfferStream.cpp.

◆ closeChannel()

static TER ripple::closeChannel ( std::shared_ptr< SLE > const &  slep,
ApplyView view,
uint256 const &  key,
beast::Journal  j 
)
static

Definition at line 117 of file PayChan.cpp.

◆ getMaxSourceAmount()

STAmount ripple::getMaxSourceAmount ( AccountID const &  account,
STAmount const &  dstAmount,
std::optional< STAmount > const &  sendMax 
)

Definition at line 51 of file Payment.cpp.

◆ tokenPairKey()

static std::pair< Currency, Currency > ripple::tokenPairKey ( STObject const &  pair)
static

Definition at line 32 of file SetOracle.cpp.

◆ adjustOwnerCount() [2/2]

static bool ripple::adjustOwnerCount ( ApplyContext ctx,
int  count 
)
static

Definition at line 177 of file SetOracle.cpp.

◆ setPriceDataInnerObjTemplate()

static void ripple::setPriceDataInnerObjTemplate ( STObject obj)
static

Definition at line 190 of file SetOracle.cpp.

◆ signerCountBasedOwnerCountDelta()

static int ripple::signerCountBasedOwnerCountDelta ( std::size_t  entryCount,
Rules const &  rules 
)
static

Definition at line 169 of file SetSignerList.cpp.

◆ removeSignersFromLedger()

static TER ripple::removeSignersFromLedger ( Application app,
ApplyView view,
Keylet const &  accountKeylet,
Keylet const &  ownerDirKeylet,
Keylet const &  signerListKeylet,
beast::Journal  j 
)
static

Definition at line 196 of file SetSignerList.cpp.

◆ preflight0()

NotTEC ripple::preflight0 ( PreflightContext const &  ctx,
std::uint32_t  flagMask 
)

Performs early sanity checks on the txid.

Performs early sanity checks on the txid and flags.

Definition at line 44 of file Transactor.cpp.

◆ removeUnfundedOffers()

static void ripple::removeUnfundedOffers ( ApplyView view,
std::vector< uint256 > const &  offers,
beast::Journal  viewJ 
)
static

Definition at line 988 of file Transactor.cpp.

◆ removeExpiredNFTokenOffers()

static void ripple::removeExpiredNFTokenOffers ( ApplyView view,
std::vector< uint256 > const &  offers,
beast::Journal  viewJ 
)
static

Definition at line 1008 of file Transactor.cpp.

◆ removeExpiredCredentials()

static void ripple::removeExpiredCredentials ( ApplyView view,
std::vector< uint256 > const &  creds,
beast::Journal  viewJ 
)
static

Definition at line 1027 of file Transactor.cpp.

◆ removeDeletedTrustLines()

static void ripple::removeDeletedTrustLines ( ApplyView view,
std::vector< uint256 > const &  trustLines,
beast::Journal  viewJ 
)
static

Definition at line 1040 of file Transactor.cpp.

◆ shouldCloseLedger()

bool ripple::shouldCloseLedger ( bool  anyTransactions,
std::size_t  prevProposers,
std::size_t  proposersClosed,
std::size_t  proposersValidated,
std::chrono::milliseconds  prevRoundTime,
std::chrono::milliseconds  timeSincePrevClose,
std::chrono::milliseconds  openTime,
std::chrono::milliseconds  idleInterval,
ConsensusParms const &  parms,
beast::Journal  j,
std::unique_ptr< std::stringstream > const &  clog = {} 
)

Determines whether the current ledger should close at this time.

This function should be called when a ledger is open and there is no close in progress, or when a transaction is received and no close is in progress.

Parameters
anyTransactionsindicates whether any transactions have been received
prevProposersproposers in the last closing
proposersClosedproposers who have currently closed this ledger
proposersValidatedproposers who have validated the last closed ledger
prevRoundTimetime for the previous ledger to reach consensus
timeSincePrevClosetime since the previous ledger's (possibly rounded) close time
openTimeduration this ledger has been open
idleIntervalthe network's desired idle interval
parmsConsensus constant parameters
jjournal for logging
cloglog object to which to append

Definition at line 27 of file Consensus.cpp.

◆ checkConsensusReached()

bool ripple::checkConsensusReached ( std::size_t  agreeing,
std::size_t  total,
bool  count_self,
std::size_t  minConsensusPct,
bool  reachedMax,
bool  stalled,
std::unique_ptr< std::stringstream > const &  clog 
)

Definition at line 106 of file Consensus.cpp.

◆ checkConsensus()

ConsensusState ripple::checkConsensus ( std::size_t  prevProposers,
std::size_t  currentProposers,
std::size_t  currentAgree,
std::size_t  currentFinished,
std::chrono::milliseconds  previousAgreeTime,
std::chrono::milliseconds  currentAgreeTime,
bool  stalled,
ConsensusParms const &  parms,
bool  proposing,
beast::Journal  j,
std::unique_ptr< std::stringstream > const &  clog = {} 
)

Determine whether the network reached consensus and whether we joined.

Parameters
prevProposersproposers in the last closing (not including us)
currentProposersproposers in this closing so far (not including us)
currentAgreeproposers who agree with us
currentFinishedproposers who have validated a ledger after this one
previousAgreeTimehow long, in milliseconds, it took to agree on the last ledger
currentAgreeTimehow long, in milliseconds, we've been trying to agree
stalledthe network appears to be stalled, where neither we nor our peers have changed their vote on any disputes in a while. This is undesirable, and should be rare, and will cause us to end consensus without 80% agreement.
parmsConsensus constant parameters
proposingwhether we should count ourselves
jjournal for logging
cloglog object to which to append

Definition at line 177 of file Consensus.cpp.

◆ participantsNeeded()

int ripple::participantsNeeded ( int  participants,
int  percent 
)

How many of the participants must agree to reach a given threshold?

Note that the number may not precisely yield the requested percentage. For example, with with size = 5 and percent = 70, we return 3, but 3 out of 5 works out to 60%. There are no security implications to this.

Parameters
participantsThe number of participants (i.e. validators)
percentThe percent that we want to reach
Returns
the number of participants which must agree

Definition at line 1483 of file Consensus.h.

◆ getNeededWeight()

std::pair< std::size_t, std::optional< ConsensusParms::AvalancheState > > ripple::getNeededWeight ( ConsensusParms const &  p,
ConsensusParms::AvalancheState  currentState,
int  percentTime,
std::size_t  currentRounds,
std::size_t  minimumRounds 
)

Definition at line 173 of file ConsensusParms.h.

◆ operator==() [28/28]

template<class NodeID_t , class LedgerID_t , class Position_t >
bool ripple::operator== ( ConsensusProposal< NodeID_t, LedgerID_t, Position_t > const &  a,
ConsensusProposal< NodeID_t, LedgerID_t, Position_t > const &  b 
)

Definition at line 276 of file ConsensusProposal.h.

◆ to_string() [26/29]

std::string ripple::to_string ( ConsensusMode  m)

Definition at line 72 of file ConsensusTypes.h.

◆ to_string() [27/29]

std::string ripple::to_string ( ConsensusPhase  p)

Definition at line 119 of file ConsensusTypes.h.

◆ getNextLedgerTimeResolution()

template<class Rep , class Period , class Seq >
std::chrono::duration< Rep, Period > ripple::getNextLedgerTimeResolution ( std::chrono::duration< Rep, Period >  previousResolution,
bool  previousAgree,
Seq  ledgerSeq 
)

Calculates the close time resolution for the specified ledger.

The Ripple protocol uses binning to represent time intervals using only one timestamp. This allows servers to derive a common time for the next ledger, without the need for perfectly synchronized clocks. The time resolution (i.e. the size of the intervals) is adjusted dynamically based on what happened in the last ledger, to try to avoid disagreements.

Parameters
previousResolutionthe resolution used for the prior ledger
previousAgreewhether consensus agreed on the close time of the prior ledger
ledgerSeqthe sequence number of the new ledger
Precondition
previousResolution must be a valid bin from ledgerPossibleTimeResolutions
Template Parameters
RepType representing number of ticks in std::chrono::duration
PeriodAn std::ratio representing tick period in std::chrono::duration
SeqUnsigned integer-like type corresponding to the ledger sequence number. It should be comparable to 0 and support modular division. Built-in and tagged_integers are supported.

Definition at line 80 of file LedgerTiming.h.

◆ roundCloseTime()

template<class Clock , class Duration , class Rep , class Period >
std::chrono::time_point< Clock, Duration > ripple::roundCloseTime ( std::chrono::time_point< Clock, Duration >  closeTime,
std::chrono::duration< Rep, Period >  closeResolution 
)

Calculates the close time for a ledger, given a close time resolution.

Parameters
closeTimeThe time to be rounded
closeResolutionThe resolution
Returns
closeTime rounded to the nearest multiple of closeResolution. Rounds up if closeTime is midway between multiples of closeResolution.

Definition at line 133 of file LedgerTiming.h.

◆ effCloseTime()

template<class Clock , class Duration , class Rep , class Period >
std::chrono::time_point< Clock, Duration > ripple::effCloseTime ( std::chrono::time_point< Clock, Duration >  closeTime,
std::chrono::duration< Rep, Period >  resolution,
std::chrono::time_point< Clock, Duration >  priorCloseTime 
)

Calculate the effective ledger close time.

After adjusting the ledger close time based on the current resolution, also ensure it is sufficiently separated from the prior close time.

Parameters
closeTimeThe raw ledger close time
resolutionThe current close time resolution
priorCloseTimeThe close time of the prior ledger

Definition at line 156 of file LedgerTiming.h.

◆ isCurrent()

bool ripple::isCurrent ( ValidationParms const &  p,
NetClock::time_point  now,
NetClock::time_point  signTime,
NetClock::time_point  seenTime 
)

Whether a validation is still current.

Determines whether a validation can still be considered the current validation from a node based on when it was signed by that node and first seen by this node.

Parameters
pValidationParms with timing parameters
nowCurrent time
signTimeWhen the validation was signed
seenTimeWhen the validation was first seen locally

Definition at line 149 of file Validations.h.

◆ to_string() [28/29]

std::string ripple::to_string ( ValStatus  m)

Definition at line 183 of file Validations.h.

◆ setup_FeeVote()

FeeSetup ripple::setup_FeeVote ( Section const &  section)

Definition at line 1129 of file Config.cpp.

◆ checkpointerFromId()

std::shared_ptr< Checkpointer > ripple::checkpointerFromId ( std::uintptr_t  id)

Definition at line 80 of file DatabaseCon.cpp.

◆ setup_DatabaseCon()

DatabaseCon::Setup ripple::setup_DatabaseCon ( Config const &  c,
std::optional< beast::Journal j = std::nullopt 
)

Definition at line 107 of file DatabaseCon.cpp.

◆ parseIniFile()

IniFileSections ripple::parseIniFile ( std::string const &  strInput,
bool const  bTrim 
)

Definition at line 161 of file Config.cpp.

◆ getIniFileSection()

IniFileSections::mapped_type * ripple::getIniFileSection ( IniFileSections secSource,
std::string const &  strSection 
)

Definition at line 209 of file Config.cpp.

◆ getSingleSection()

bool ripple::getSingleSection ( IniFileSections secSource,
std::string const &  strSection,
std::string strValue,
beast::Journal  j 
)

Definition at line 218 of file Config.cpp.

◆ getEnvVar()

static std::string ripple::getEnvVar ( char const *  name)
static

Definition at line 252 of file Config.cpp.

◆ checkZeroPorts()

static void ripple::checkZeroPorts ( Config const &  config)
static

Definition at line 429 of file Config.cpp.

◆ open() [1/2]

void ripple::open ( soci::session &  s,
BasicConfig const &  config,
std::string const &  dbName 
)

Open a soci session.

Parameters
sSession to open.
configParameters to pick the soci backend and how to connect to that backend.
dbNameName of the database. This has different meaning for different backends. Sometimes it is part of a filename (sqlite3), other times it is a database name (postgresql).

Definition at line 101 of file SociDB.cpp.

◆ open() [2/2]

void ripple::open ( soci::session &  s,
std::string const &  beName,
std::string const &  connectionString 
)

Open a soci session.

Parameters
sSession to open.
beNameBackend name.
connectionStringConnection string to forward to soci::open. see the soci::open documentation for how to use this.

Definition at line 107 of file SociDB.cpp.

◆ getConnection()

static sqlite_api::sqlite3 * ripple::getConnection ( soci::session &  s)
static

Definition at line 119 of file SociDB.cpp.

◆ getKBUsedAll()

std::uint32_t ripple::getKBUsedAll ( soci::session &  s)

Definition at line 133 of file SociDB.cpp.

◆ getKBUsedDB()

std::uint32_t ripple::getKBUsedDB ( soci::session &  s)

Definition at line 142 of file SociDB.cpp.

◆ convert() [1/4]

void ripple::convert ( soci::blob &  from,
std::vector< std::uint8_t > &  to 
)

Definition at line 157 of file SociDB.cpp.

◆ convert() [2/4]

void ripple::convert ( soci::blob &  from,
std::string to 
)

Definition at line 166 of file SociDB.cpp.

◆ convert() [3/4]

void ripple::convert ( std::vector< std::uint8_t > const &  from,
soci::blob &  to 
)

Definition at line 174 of file SociDB.cpp.

◆ convert() [4/4]

void ripple::convert ( std::string const &  from,
soci::blob &  to 
)

Definition at line 183 of file SociDB.cpp.

◆ makeCheckpointer()

std::shared_ptr< Checkpointer > ripple::makeCheckpointer ( std::uintptr_t  id,
std::weak_ptr< soci::session >  ,
JobQueue ,
Logs  
)

Returns a new checkpointer which makes checkpoints of a soci database every checkpointPageCount pages, using a job on the job queue.

The checkpointer contains references to the session and job queue and so must outlive them both.

Definition at line 336 of file SociDB.cpp.

◆ getFeatureValue()

std::optional< std::string > ripple::getFeatureValue ( boost::beast::http::fields const &  headers,
std::string const &  feature 
)

Get feature's header value.

Parameters
headersrequest/response header
featurename
Returns
seated optional with feature's value if the feature is found in the header, unseated optional otherwise

Definition at line 39 of file Handshake.cpp.

◆ isFeatureValue()

bool ripple::isFeatureValue ( boost::beast::http::fields const &  headers,
std::string const &  feature,
std::string const &  value 
)

Check if a feature's value is equal to the specified value.

Parameters
headersrequest/response header
featureto check
valueof the feature to check, must be a single value; i.e. not value1,value2...
Returns
true if the feature's value matches the specified value, false if doesn't match or the feature is not found in the header

Definition at line 55 of file Handshake.cpp.

◆ featureEnabled()

bool ripple::featureEnabled ( boost::beast::http::fields const &  headers,
std::string const &  feature 
)

Check if a feature is enabled.

Parameters
headersrequest/response header
featureto check
Returns
true if enabled

Definition at line 67 of file Handshake.cpp.

◆ makeFeaturesRequestHeader()

std::string ripple::makeFeaturesRequestHeader ( bool  comprEnabled,
bool  ledgerReplayEnabled,
bool  txReduceRelayEnabled,
bool  vpReduceRelayEnabled 
)

Make request header X-Protocol-Ctl value with supported features.

Parameters
comprEnabledif true then compression feature is enabled
ledgerReplayEnabledif true then ledger-replay feature is enabled
txReduceRelayEnabledif true then transaction reduce-relay feature is enabled
vpReduceRelayEnabledif true then validation/proposal reduce-relay base squelch feature is enabled
Returns
X-Protocol-Ctl header value

Definition at line 75 of file Handshake.cpp.

◆ makeFeaturesResponseHeader()

std::string ripple::makeFeaturesResponseHeader ( http_request_type const &  headers,
bool  comprEnabled,
bool  ledgerReplayEnabled,
bool  txReduceRelayEnabled,
bool  vpReduceRelayEnabled 
)

Make response header X-Protocol-Ctl value with supported features.

If the request has a feature that we support enabled and the feature's configuration is enabled then enable this feature in the response header.

Parameters
headerrequest's header
comprEnabledif true then compression feature is enabled
ledgerReplayEnabledif true then ledger-replay feature is enabled
txReduceRelayEnabledif true then transaction reduce-relay feature is enabled
vpReduceRelayEnabledif true then validation/proposal reduce-relay base squelch feature is enabled
Returns
X-Protocol-Ctl header value

Definition at line 94 of file Handshake.cpp.

◆ hashLastMessage()

static std::optional< base_uint< 512 > > ripple::hashLastMessage ( SSL const *  ssl,
size_t(*)(const SSL *, void *, size_t)  get 
)
static

Hashes the latest finished message from an SSL stream.

Parameters
sslthe session to get the message from.
geta pointer to the function to call to retrieve the finished message. This can be either:
  • SSL_get_finished or
  • SSL_get_peer_finished.
Returns
true if successful, false otherwise.
Note
This construct is non-standard. There are potential "standard" alternatives that should be considered. For a discussion, on this topic, see https://github.com/openssl/openssl/issues/5509 and https://github.com/ripple/rippled/issues/2413.

Definition at line 128 of file Handshake.cpp.

◆ makeSharedValue()

std::optional< uint256 > ripple::makeSharedValue ( stream_type ssl,
beast::Journal  journal 
)

Computes a shared value based on the SSL connection state.

When there is no man in the middle, both sides will compute the same value. In the presence of an attacker, the computed values will be different.

Parameters
sslthe SSL/TLS connection state.
Returns
A 256-bit value on success; an unseated optional otherwise.

Definition at line 146 of file Handshake.cpp.

◆ buildHandshake()

void ripple::buildHandshake ( boost::beast::http::fields &  h,
ripple::uint256 const &  sharedValue,
std::optional< std::uint32_t networkID,
beast::IP::Address  public_ip,
beast::IP::Address  remote_ip,
Application app 
)

Insert fields headers necessary for upgrading the link to the peer protocol.

Definition at line 178 of file Handshake.cpp.

◆ verifyHandshake()

PublicKey ripple::verifyHandshake ( boost::beast::http::fields const &  headers,
uint256 const &  sharedValue,
std::optional< std::uint32_t networkID,
beast::IP::Address  public_ip,
beast::IP::Address  remote,
Application app 
)

Validate header fields necessary for upgrading the link to the peer protocol.

This performs critical security checks that ensure that prevent MITM attacks on our peer-to-peer links and that the remote peer has the private keys that correspond to the public identity it claims.

Returns
The public key of the remote peer.
Exceptions
Aclass derived from std::exception.

Definition at line 227 of file Handshake.cpp.

◆ makeRequest()

request_type ripple::makeRequest ( bool  crawlPublic,
bool  comprEnabled,
bool  ledgerReplayEnabled,
bool  txReduceRelayEnabled,
bool  vpReduceRelayEnabled 
)

Make outbound http request.

Parameters
crawlPublicif true then server's IP/Port are included in crawl
comprEnabledif true then compression feature is enabled
ledgerReplayEnabledif true then ledger-replay feature is enabled
txReduceRelayEnabledif true then transaction reduce-relay feature is enabled
vpReduceRelayEnabledif true then validation/proposal reduce-relay feature is enabled
Returns
http request with empty body

Definition at line 365 of file Handshake.cpp.

◆ makeResponse()

http_response_type ripple::makeResponse ( bool  crawlPublic,
http_request_type const &  req,
beast::IP::Address  public_ip,
beast::IP::Address  remote_ip,
uint256 const &  sharedValue,
std::optional< std::uint32_t networkID,
ProtocolVersion  version,
Application app 
)

Make http response.

Parameters
crawlPublicif true then server's IP/Port are included in crawl
reqincoming http request
public_ipserver's public IP
remote_ippeer's IP
sharedValueshared value based on the SSL connection state
networkIDspecifies what network we intend to connect to
versionsupported protocol version
appApplication's reference to access some common properties
Returns
http response

Definition at line 392 of file Handshake.cpp.

◆ peerFeatureEnabled() [1/2]

template<typename headers >
bool ripple::peerFeatureEnabled ( headers const &  request,
std::string const &  feature,
std::string  value,
bool  config 
)

Check if a feature should be enabled for a peer.

The feature is enabled if its configured value is true and the http header has the specified feature value.

Template Parameters
headersrequest (inbound) or response (outbound) header
Parameters
requesthttp headers
featureto check
configfeature's configuration value
valuefeature's value to check in the headers
Returns
true if the feature is enabled

Definition at line 198 of file Handshake.h.

◆ peerFeatureEnabled() [2/2]

template<typename headers >
bool ripple::peerFeatureEnabled ( headers const &  request,
std::string const &  feature,
bool  config 
)

Wrapper for enable(1)/disable type(0) of feature.

Definition at line 210 of file Handshake.h.

◆ makeSquelchMessage()

std::shared_ptr< Message > ripple::makeSquelchMessage ( PublicKey const &  validator,
bool  squelch,
uint32_t  squelchDuration 
)

Definition at line 1391 of file OverlayImpl.cpp.

◆ setup_Overlay() [1/2]

Overlay::Setup ripple::setup_Overlay ( BasicConfig const &  config)

Definition at line 1499 of file OverlayImpl.cpp.

◆ make_Overlay()

std::unique_ptr< Overlay > ripple::make_Overlay ( Application app,
Overlay::Setup const &  setup,
ServerHandler serverHandler,
Resource::Manager resourceManager,
Resolver resolver,
boost::asio::io_context &  io_context,
BasicConfig const &  config,
beast::insight::Collector::ptr const &  collector 
)

Creates the implementation of Overlay.

Definition at line 1604 of file OverlayImpl.cpp.

◆ stringIsUint256Sized()

static bool ripple::stringIsUint256Sized ( std::string const &  pBuffStr)
static

Definition at line 157 of file PeerImp.cpp.

◆ getPeerWithTree()

static std::shared_ptr< PeerImp > ripple::getPeerWithTree ( OverlayImpl ov,
uint256 const &  rootHash,
PeerImp const *  skip 
)
static

Definition at line 3164 of file PeerImp.cpp.

◆ getPeerWithLedger()

static std::shared_ptr< PeerImp > ripple::getPeerWithLedger ( OverlayImpl ov,
uint256 const &  ledgerHash,
LedgerIndex  ledger,
PeerImp const *  skip 
)
static

Definition at line 3188 of file PeerImp.cpp.

◆ make_PeerSetBuilder()

std::unique_ptr< PeerSetBuilder > ripple::make_PeerSetBuilder ( Application app)

Definition at line 144 of file PeerSet.cpp.

◆ make_DummyPeerSet()

std::unique_ptr< PeerSet > ripple::make_DummyPeerSet ( Application app)

Make a dummy PeerSet that does not do anything.

Note
For the use case of InboundLedger in ApplicationImp::loadOldLedger(), where a real PeerSet is not needed.

Definition at line 187 of file PeerSet.cpp.

◆ protocolMessageType() [1/3]

protocol::MessageType ripple::protocolMessageType ( protocol::TMGetLedger const &  )

Definition at line 41 of file ProtocolMessage.h.

◆ protocolMessageType() [2/3]

protocol::MessageType ripple::protocolMessageType ( protocol::TMReplayDeltaRequest const &  )

Definition at line 47 of file ProtocolMessage.h.

◆ protocolMessageType() [3/3]

protocol::MessageType ripple::protocolMessageType ( protocol::TMProofPathRequest const &  )

Definition at line 53 of file ProtocolMessage.h.

◆ protocolMessageName()

template<class = void>
std::string ripple::protocolMessageName ( int  type)

Returns the name of a protocol message given its type.

Definition at line 61 of file ProtocolMessage.h.

◆ invokeProtocolMessage()

template<class Buffers , class Handler >
std::pair< std::size_t, boost::system::error_code > ripple::invokeProtocolMessage ( Buffers const &  buffers,
Handler &  handler,
std::size_t hint 
)

Calls the handler for up to one protocol message in the passed buffers.

If there is insufficient data to produce a complete protocol message, zero is returned for the number of bytes consumed.

Parameters
buffersThe buffer that contains the data we've received
handlerThe handler that will be used to process the message
hintIf possible, a hint as to the amount of data to read next. The returned value MAY be zero, which means "no hint"
Returns
The number of bytes consumed, or the error code if any.

Definition at line 336 of file ProtocolMessage.h.

◆ to_string() [29/29]

std::string ripple::to_string ( ProtocolVersion const &  p)

Print a protocol version a human-readable string.

Definition at line 75 of file ProtocolVersion.cpp.

◆ parseProtocolVersions()

std::vector< ProtocolVersion > ripple::parseProtocolVersions ( boost::beast::string_view const &  s)

Parse a set of protocol versions.

Given a comma-separated string, extract and return all those that look like valid protocol versions (i.e. XRPL/2.0 and later). Strings that are not parseable as valid protocol strings are excluded from the result set.

Returns
A list of all apparently valid protocol versions.
Note
The returned list of protocol versions is guaranteed to contain no duplicates and will be sorted in ascending protocol order.

Definition at line 81 of file ProtocolVersion.cpp.

◆ negotiateProtocolVersion() [1/2]

std::optional< ProtocolVersion > ripple::negotiateProtocolVersion ( std::vector< ProtocolVersion > const &  versions)

Given a list of supported protocol versions, choose the one we prefer.

Definition at line 128 of file ProtocolVersion.cpp.

◆ negotiateProtocolVersion() [2/2]

std::optional< ProtocolVersion > ripple::negotiateProtocolVersion ( boost::beast::string_view const &  versions)

Given a list of supported protocol versions, choose the one we prefer.

Definition at line 151 of file ProtocolVersion.cpp.

◆ supportedProtocolVersions()

std::string const & ripple::supportedProtocolVersions ( )

The list of all the protocol versions we support.

Definition at line 159 of file ProtocolVersion.cpp.

◆ isProtocolSupported()

bool ripple::isProtocolSupported ( ProtocolVersion const &  v)

Determine whether we support a specific protocol version.

Definition at line 177 of file ProtocolVersion.cpp.

◆ make_protocol()

constexpr ProtocolVersion ripple::make_protocol ( std::uint16_t  major,
std::uint16_t  minor 
)
constexpr

Definition at line 41 of file ProtocolVersion.h.

◆ send_if()

template<typename Predicate >
send_if_pred< Predicate > ripple::send_if ( std::shared_ptr< Message > const &  m,
Predicate const &  f 
)

Helper function to aid in type deduction.

Definition at line 75 of file predicates.h.

◆ send_if_not()

template<typename Predicate >
send_if_not_pred< Predicate > ripple::send_if_not ( std::shared_ptr< Message > const &  m,
Predicate const &  f 
)

Helper function to aid in type deduction.

Definition at line 107 of file predicates.h.

◆ passwordUnrequiredOrSentCorrect()

bool ripple::passwordUnrequiredOrSentCorrect ( Port const &  port,
Json::Value const &  params 
)

Definition at line 30 of file Role.cpp.

◆ ipAllowed()

bool ripple::ipAllowed ( beast::IP::Address const &  remoteIp,
std::vector< boost::asio::ip::network_v4 > const &  nets4,
std::vector< boost::asio::ip::network_v6 > const &  nets6 
)

True if remoteIp is in any of adminIp.

Parameters
remoteIpRemote address for which to search.
adminIpList of IP's in which to search.
Returns
Whether remoteIp is in adminIp.

Definition at line 46 of file Role.cpp.

◆ isAdmin()

bool ripple::isAdmin ( Port const &  port,
Json::Value const &  params,
beast::IP::Address const &  remoteIp 
)

Definition at line 85 of file Role.cpp.

◆ requestRole()

Role ripple::requestRole ( Role const &  required,
Port const &  port,
Json::Value const &  params,
beast::IP::Endpoint const &  remoteIp,
std::string_view  user 
)

Return the allowed privilege role.

params must meet the requirements of the JSON-RPC specification. It must be of type Object, containing the key params which is an array with at least one object. Inside this object are the optional keys 'admin_user' and 'admin_password' used to validate the credentials. If user is non-blank, it's username passed in the HTTP header by a secure_gateway proxy.

Definition at line 95 of file Role.cpp.

◆ isUnlimited() [1/2]

bool ripple::isUnlimited ( Role const &  role)

ADMIN and IDENTIFIED roles shall have unlimited resources.

Check if the role entitles the user to unlimited resources.

Definition at line 125 of file Role.cpp.

◆ isUnlimited() [2/2]

bool ripple::isUnlimited ( Role const &  required,
Port const &  port,
Json::Value const &  params,
beast::IP::Endpoint const &  remoteIp,
std::string const &  user 
)

Definition at line 131 of file Role.cpp.

◆ requestInboundEndpoint()

Resource::Consumer ripple::requestInboundEndpoint ( Resource::Manager manager,
beast::IP::Endpoint const &  remoteAddress,
Role const &  role,
std::string_view  user,
std::string_view  forwardedFor 
)

Definition at line 142 of file Role.cpp.

◆ extractIpAddrFromField()

static std::string_view ripple::extractIpAddrFromField ( std::string_view  field)
static

Definition at line 157 of file Role.cpp.

◆ forwardedFor()

std::string_view ripple::forwardedFor ( http_request_type const &  request)

Definition at line 262 of file Role.cpp.

◆ createHTTPPost()

std::string ripple::createHTTPPost ( std::string const &  strHost,
std::string const &  strPath,
std::string const &  strMsg,
std::unordered_map< std::string, std::string > const &  mapRequestHeaders 
)

Definition at line 62 of file RPCCall.cpp.

◆ JSONRPCRequest()

std::string ripple::JSONRPCRequest ( std::string const &  strMethod,
Json::Value const &  params,
Json::Value const &  id 
)

Definition at line 1349 of file RPCCall.cpp.

◆ rpcCmdToJson()

Json::Value ripple::rpcCmdToJson ( std::vector< std::string > const &  args,
Json::Value retParams,
unsigned int  apiVersion,
beast::Journal  j 
)

Definition at line 1451 of file RPCCall.cpp.

◆ rpcClient()

std::pair< int, Json::Value > ripple::rpcClient ( std::vector< std::string > const &  args,
Config const &  config,
Logs logs,
unsigned int  apiVersion,
std::unordered_map< std::string, std::string > const &  headers = {} 
)

Internal invocation of RPC client.

Used by both rippled command line as well as rippled unit tests

Definition at line 1492 of file RPCCall.cpp.

◆ make_RPCSub()

std::shared_ptr< RPCSub > ripple::make_RPCSub ( InfoSub::Source source,
boost::asio::io_context &  io_context,
JobQueue jobQueue,
std::string const &  strUrl,
std::string const &  strUsername,
std::string const &  strPassword,
Logs logs 
)

Definition at line 208 of file RPCSub.cpp.

◆ isStatusRequest()

static bool ripple::isStatusRequest ( http_request_type const &  request)
static

Definition at line 58 of file ServerHandler.cpp.

◆ statusRequestResponse()

static Handoff ripple::statusRequestResponse ( http_request_type const &  request,
boost::beast::http::status  status 
)
static

Definition at line 66 of file ServerHandler.cpp.

◆ authorized()

static bool ripple::authorized ( Port const &  port,
std::map< std::string, std::string > const &  h 
)
static

Definition at line 86 of file ServerHandler.cpp.

◆ makeOutput()

static Json::Output ripple::makeOutput ( Session session)
static

Definition at line 258 of file ServerHandler.cpp.

◆ build_map()

static std::map< std::string, std::string > ripple::build_map ( boost::beast::http::fields const &  h)
static

Definition at line 266 of file ServerHandler.cpp.

◆ buffers_to_string()

template<class ConstBufferSequence >
static std::string ripple::buffers_to_string ( ConstBufferSequence const &  bs)
static

Definition at line 284 of file ServerHandler.cpp.

◆ logDuration()

template<class T >
void ripple::logDuration ( Json::Value const &  request,
T const &  duration,
beast::Journal journal 
)

Definition at line 405 of file ServerHandler.cpp.

◆ make_json_error()

static Json::Value ripple::make_json_error ( Json::Int  code,
Json::Value &&  message 
)
static

Definition at line 597 of file ServerHandler.cpp.

◆ to_Port()

static Port ripple::to_Port ( ParsedPort const &  parsed,
std::ostream log 
)
static

Definition at line 1104 of file ServerHandler.cpp.

◆ parse_Ports()

static std::vector< Port > ripple::parse_Ports ( Config const &  config,
std::ostream log 
)
static

Definition at line 1150 of file ServerHandler.cpp.

◆ setup_Client()

static void ripple::setup_Client ( ServerHandler::Setup setup)
static

Definition at line 1221 of file ServerHandler.cpp.

◆ setup_Overlay() [2/2]

static void ripple::setup_Overlay ( ServerHandler::Setup setup)
static

Definition at line 1245 of file ServerHandler.cpp.

◆ setup_ServerHandler()

ServerHandler::Setup ripple::setup_ServerHandler ( Config const &  config,
std::ostream &&  log 
)

Definition at line 1260 of file ServerHandler.cpp.

◆ make_ServerHandler()

std::unique_ptr< ServerHandler > ripple::make_ServerHandler ( Application app,
boost::asio::io_context &  io_context,
JobQueue jobQueue,
NetworkOPs networkOPs,
Resource::Manager resourceManager,
CollectorManager cm 
)

Definition at line 1272 of file ServerHandler.cpp.

◆ doLedgerGrpc()

std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > ripple::doLedgerGrpc ( RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > &  context)

Definition at line 100 of file LedgerHandler.cpp.

◆ doLedgerEntryGrpc()

std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > ripple::doLedgerEntryGrpc ( RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &  context)

Definition at line 837 of file LedgerEntry.cpp.

◆ doLedgerDataGrpc()

std::pair< org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status > ripple::doLedgerDataGrpc ( RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDataRequest > &  context)

Definition at line 136 of file LedgerData.cpp.

◆ doLedgerDiffGrpc()

std::pair< org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status > ripple::doLedgerDiffGrpc ( RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDiffRequest > &  context)

Definition at line 6 of file LedgerDiff.cpp.

◆ addChannel()

void ripple::addChannel ( Json::Value jsonLines,
SLE const &  line 
)

Definition at line 35 of file AccountChannels.cpp.

◆ doAccountChannels()

Json::Value ripple::doAccountChannels ( RPC::JsonContext context)

Definition at line 68 of file AccountChannels.cpp.

◆ doAccountCurrencies()

Json::Value ripple::doAccountCurrencies ( RPC::JsonContext context)

Definition at line 32 of file AccountCurrenciesHandler.cpp.

◆ doAccountInfo()

Json::Value ripple::doAccountInfo ( RPC::JsonContext context)

Definition at line 50 of file AccountInfo.cpp.

◆ addLine()

void ripple::addLine ( Json::Value jsonLines,
RPCTrustLine const &  line 
)

Definition at line 34 of file AccountLines.cpp.

◆ doAccountLines()

Json::Value ripple::doAccountLines ( RPC::JsonContext context)

Definition at line 81 of file AccountLines.cpp.

◆ doAccountNFTs()

Json::Value ripple::doAccountNFTs ( RPC::JsonContext context)

General RPC command that can retrieve objects in the account root.

{ account: <account> ledger_hash: <string> // optional ledger_index: <string | unsigned integer> // optional type: <string> // optional, defaults to all account objects types limit: <integer> // optional marker: <opaque> // optional, resume previous query }

Definition at line 50 of file AccountObjects.cpp.

◆ doAccountObjects()

Json::Value ripple::doAccountObjects ( RPC::JsonContext context)

Definition at line 181 of file AccountObjects.cpp.

◆ appendOfferJson()

void ripple::appendOfferJson ( std::shared_ptr< SLE const > const &  offer,
Json::Value offers 
)

Definition at line 35 of file AccountOffers.cpp.

◆ doAccountOffers()

Json::Value ripple::doAccountOffers ( RPC::JsonContext context)

Definition at line 57 of file AccountOffers.cpp.

◆ parseLedgerArgs()

std::variant< std::optional< LedgerSpecifier >, Json::Value > ripple::parseLedgerArgs ( RPC::Context context,
Json::Value const &  params 
)

Definition at line 54 of file AccountTx.cpp.

◆ getLedgerRange()

std::variant< LedgerRange, RPC::Status > ripple::getLedgerRange ( RPC::Context context,
std::optional< LedgerSpecifier > const &  ledgerSpecifier 
)

Definition at line 133 of file AccountTx.cpp.

◆ doAccountTxHelp()

std::pair< AccountTxResult, RPC::Status > ripple::doAccountTxHelp ( RPC::Context context,
AccountTxArgs const &  args 
)

Definition at line 216 of file AccountTx.cpp.

◆ populateJsonResponse() [1/2]

Json::Value ripple::populateJsonResponse ( std::pair< AccountTxResult, RPC::Status > const &  res,
AccountTxArgs const &  args,
RPC::JsonContext const &  context 
)

Definition at line 285 of file AccountTx.cpp.

◆ doAccountTxJson()

Json::Value ripple::doAccountTxJson ( RPC::JsonContext context)

Definition at line 410 of file AccountTx.cpp.

◆ getAccount()

std::optional< AccountID > ripple::getAccount ( Json::Value const &  v,
Json::Value result 
)

Definition at line 35 of file AMMInfo.cpp.

◆ getIssue() [2/2]

Expected< Issue, error_code_i > ripple::getIssue ( Json::Value const &  v,
beast::Journal  j 
)

Definition at line 51 of file AMMInfo.cpp.

◆ to_iso8601()

std::string ripple::to_iso8601 ( NetClock::time_point  tp)

Definition at line 65 of file AMMInfo.cpp.

◆ doAMMInfo()

Json::Value ripple::doAMMInfo ( RPC::JsonContext context)

Definition at line 76 of file AMMInfo.cpp.

◆ doBlackList()

Json::Value ripple::doBlackList ( RPC::JsonContext context)

Definition at line 29 of file BlackList.cpp.

◆ doBookOffers()

Json::Value ripple::doBookOffers ( RPC::JsonContext context)

Definition at line 37 of file BookOffers.cpp.

◆ doBookChanges()

Json::Value ripple::doBookChanges ( RPC::JsonContext context)

Definition at line 222 of file BookOffers.cpp.

◆ doCanDelete()

Json::Value ripple::doCanDelete ( RPC::JsonContext context)

Definition at line 35 of file CanDelete.cpp.

◆ doConnect()

Json::Value ripple::doConnect ( RPC::JsonContext context)

Definition at line 39 of file Connect.cpp.

◆ doConsensusInfo()

Json::Value ripple::doConsensusInfo ( RPC::JsonContext context)

Definition at line 30 of file ConsensusInfo.cpp.

◆ doDepositAuthorized()

Json::Value ripple::doDepositAuthorized ( RPC::JsonContext context)

Definition at line 41 of file DepositAuthorized.cpp.

◆ doManifest()

Json::Value ripple::doManifest ( RPC::JsonContext context)

Definition at line 30 of file DoManifest.cpp.

◆ doFeature()

Json::Value ripple::doFeature ( RPC::JsonContext context)

Definition at line 36 of file Feature1.cpp.

◆ doFee()

Json::Value ripple::doFee ( RPC::JsonContext context)

Definition at line 30 of file Fee1.cpp.

◆ doFetchInfo()

Json::Value ripple::doFetchInfo ( RPC::JsonContext context)

Definition at line 30 of file FetchInfo.cpp.

◆ doGatewayBalances()

Json::Value ripple::doGatewayBalances ( RPC::JsonContext context)

Definition at line 54 of file GatewayBalances.cpp.

◆ iteratePriceData()

static void ripple::iteratePriceData ( RPC::JsonContext context,
std::shared_ptr< SLE const > const &  sle,
std::function< bool(STObject const &)> &&  f 
)
static

Calls callback "f" on the ledger-object sle and up to three previous metadata objects.

Stops early if the callback returns true.

Definition at line 45 of file GetAggregatePrice.cpp.

◆ getStats()

static std::tuple< STAmount, Number, std::uint16_t > ripple::getStats ( Prices::right_const_iterator const &  begin,
Prices::right_const_iterator const &  end 
)
static

Definition at line 121 of file GetAggregatePrice.cpp.

◆ doGetAggregatePrice()

Json::Value ripple::doGetAggregatePrice ( RPC::JsonContext context)

oracles: array of {account, oracle_document_id} base_asset: is the asset to be priced quote_asset: is the denomination in which the prices are expressed trim : percentage of outliers to trim [optional] time_threshold : defines a range of prices to include based on the timestamp range - {most recent, most recent - time_threshold} [optional]

Definition at line 153 of file GetAggregatePrice.cpp.

◆ textTime()

static void ripple::textTime ( std::string text,
UptimeClock::time_point seconds,
char const *  unitName,
std::chrono::seconds  unitVal 
)
static

Definition at line 37 of file GetCounts.cpp.

◆ getCountsJson()

Json::Value ripple::getCountsJson ( Application app,
int  minObjectCount 
)

Definition at line 62 of file GetCounts.cpp.

◆ doGetCounts()

Json::Value ripple::doGetCounts ( RPC::JsonContext context)

Definition at line 138 of file GetCounts.cpp.

◆ doChannelAuthorize()

Json::Value ripple::doChannelAuthorize ( RPC::JsonContext context)

Definition at line 42 of file PayChanClaim.cpp.

◆ doChannelVerify()

Json::Value ripple::doChannelVerify ( RPC::JsonContext context)

Definition at line 113 of file PayChanClaim.cpp.

◆ doLedgerAccept()

Json::Value ripple::doLedgerAccept ( RPC::JsonContext context)

Definition at line 34 of file LedgerAccept.cpp.

◆ doLedgerCleaner()

Json::Value ripple::doLedgerCleaner ( RPC::JsonContext context)

Definition at line 30 of file LedgerCleanerHandler.cpp.

◆ doLedgerClosed()

Json::Value ripple::doLedgerClosed ( RPC::JsonContext context)

Definition at line 30 of file LedgerClosed.cpp.

◆ doLedgerCurrent()

Json::Value ripple::doLedgerCurrent ( RPC::JsonContext context)

Definition at line 30 of file LedgerCurrent.cpp.

◆ doLedgerData()

Json::Value ripple::doLedgerData ( RPC::JsonContext context)

Definition at line 46 of file LedgerData.cpp.

◆ doLedgerEntry()

Json::Value ripple::doLedgerEntry ( RPC::JsonContext context)

Definition at line 701 of file LedgerEntry.cpp.

◆ doLedgerHeader()

Json::Value ripple::doLedgerHeader ( RPC::JsonContext context)

Definition at line 34 of file xrpld/rpc/handlers/LedgerHeader.cpp.

◆ doLedgerRequest()

Json::Value ripple::doLedgerRequest ( RPC::JsonContext context)

Definition at line 36 of file LedgerRequest.cpp.

◆ doLogLevel()

Json::Value ripple::doLogLevel ( RPC::JsonContext context)

Definition at line 34 of file LogLevel.cpp.

◆ doLogRotate()

Json::Value ripple::doLogRotate ( RPC::JsonContext context)

Definition at line 29 of file LogRotate.cpp.

◆ doNFTBuyOffers()

Json::Value ripple::doNFTBuyOffers ( RPC::JsonContext context)

Definition at line 165 of file NFTOffers.cpp.

◆ doNFTSellOffers()

Json::Value ripple::doNFTSellOffers ( RPC::JsonContext context)

Definition at line 151 of file NFTOffers.cpp.

◆ doNoRippleCheck()

Json::Value ripple::doNoRippleCheck ( RPC::JsonContext context)

Definition at line 62 of file NoRippleCheck.cpp.

◆ doOwnerInfo()

Json::Value ripple::doOwnerInfo ( RPC::JsonContext context)

Definition at line 35 of file OwnerInfo.cpp.

◆ doPathFind()

Json::Value ripple::doPathFind ( RPC::JsonContext context)

Definition at line 33 of file PathFind.cpp.

◆ doPause()

Json::Value ripple::doPause ( RPC::JsonContext )

◆ doPeers()

Json::Value ripple::doPeers ( RPC::JsonContext context)

Definition at line 33 of file Peers.cpp.

◆ doPing()

Json::Value ripple::doPing ( RPC::JsonContext context)

Definition at line 33 of file Ping.cpp.

◆ doPrint()

Json::Value ripple::doPrint ( RPC::JsonContext context)

Definition at line 30 of file Print.cpp.

◆ doRandom()

Json::Value ripple::doRandom ( RPC::JsonContext context)

Definition at line 39 of file Random.cpp.

◆ doResume()

Json::Value ripple::doResume ( RPC::JsonContext )

◆ doPeerReservationsAdd()

Json::Value ripple::doPeerReservationsAdd ( RPC::JsonContext context)

Definition at line 36 of file Reservations.cpp.

◆ doPeerReservationsDel()

Json::Value ripple::doPeerReservationsDel ( RPC::JsonContext context)

Definition at line 89 of file Reservations.cpp.

◆ doPeerReservationsList()

Json::Value ripple::doPeerReservationsList ( RPC::JsonContext context)

Definition at line 116 of file Reservations.cpp.

◆ doRipplePathFind()

Json::Value ripple::doRipplePathFind ( RPC::JsonContext context)

Definition at line 33 of file RipplePathFind.cpp.

◆ doServerDefinitions()

Json::Value ripple::doServerDefinitions ( RPC::JsonContext context)

Definition at line 298 of file ServerDefinitions.cpp.

◆ doServerInfo()

Json::Value ripple::doServerInfo ( RPC::JsonContext context)

Definition at line 31 of file ServerInfo.cpp.

◆ doServerState()

Json::Value ripple::doServerState ( RPC::JsonContext context)

Definition at line 30 of file ServerState.cpp.

◆ doSign()

Json::Value ripple::doSign ( RPC::JsonContext context)

Definition at line 34 of file SignHandler.cpp.

◆ doSignFor()

Json::Value ripple::doSignFor ( RPC::JsonContext context)

Definition at line 35 of file SignFor.cpp.

◆ doSimulate()

Json::Value ripple::doSimulate ( RPC::JsonContext context)

Definition at line 320 of file Simulate.cpp.

◆ doStop()

Json::Value ripple::doStop ( RPC::JsonContext context)

Definition at line 32 of file Stop.cpp.

◆ doSubmit()

Json::Value ripple::doSubmit ( RPC::JsonContext context)

Definition at line 45 of file Submit.cpp.

◆ doSubmitMultiSigned()

Json::Value ripple::doSubmitMultiSigned ( RPC::JsonContext context)

Definition at line 34 of file SubmitMultiSigned.cpp.

◆ doSubscribe()

Json::Value ripple::doSubscribe ( RPC::JsonContext context)

Definition at line 38 of file Subscribe.cpp.

◆ doTransactionEntry()

Json::Value ripple::doTransactionEntry ( RPC::JsonContext context)

Definition at line 38 of file TransactionEntry.cpp.

◆ doTxJson()

Json::Value ripple::doTxJson ( RPC::JsonContext context)

Definition at line 285 of file Tx.cpp.

◆ doTxHistory()

Json::Value ripple::doTxHistory ( RPC::JsonContext context)

Definition at line 39 of file TxHistory.cpp.

◆ doTxReduceRelay()

Json::Value ripple::doTxReduceRelay ( RPC::JsonContext context)

Definition at line 29 of file TxReduceRelay.cpp.

◆ doUnlList()

Json::Value ripple::doUnlList ( RPC::JsonContext context)

Definition at line 30 of file UnlList.cpp.

◆ doUnsubscribe()

Json::Value ripple::doUnsubscribe ( RPC::JsonContext context)

Definition at line 33 of file Unsubscribe.cpp.

◆ doValidationCreate()

Json::Value ripple::doValidationCreate ( RPC::JsonContext context)

Definition at line 45 of file ValidationCreate.cpp.

◆ doWalletPropose()

Json::Value ripple::doWalletPropose ( RPC::JsonContext context)

Definition at line 68 of file WalletPropose.cpp.

◆ doValidators()

Json::Value ripple::doValidators ( RPC::JsonContext context)

Definition at line 29 of file Validators.cpp.

◆ doValidatorListSites()

Json::Value ripple::doValidatorListSites ( RPC::JsonContext context)

Definition at line 29 of file ValidatorListSites.cpp.

◆ doValidatorInfo()

Json::Value ripple::doValidatorInfo ( RPC::JsonContext context)

Definition at line 31 of file ValidatorInfo.cpp.

◆ doVaultInfo()

Json::Value ripple::doVaultInfo ( RPC::JsonContext context)

Definition at line 79 of file VaultInfo.cpp.

◆ parseObjectID()

static Expected< uint256, Json::Value > ripple::parseObjectID ( Json::Value const &  params,
Json::StaticString const  fieldName,
std::string const &  expectedType = "hex string or object" 
)
static

Definition at line 43 of file LedgerEntry.cpp.

◆ parseIndex()

static Expected< uint256, Json::Value > ripple::parseIndex ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 57 of file LedgerEntry.cpp.

◆ parseAccountRoot()

static Expected< uint256, Json::Value > ripple::parseAccountRoot ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 63 of file LedgerEntry.cpp.

◆ parseAmendments()

static Expected< uint256, Json::Value > ripple::parseAmendments ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 75 of file LedgerEntry.cpp.

◆ parseAMM()

static Expected< uint256, Json::Value > ripple::parseAMM ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 81 of file LedgerEntry.cpp.

◆ parseBridge()

static Expected< uint256, Json::Value > ripple::parseBridge ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 108 of file LedgerEntry.cpp.

◆ parseCheck()

static Expected< uint256, Json::Value > ripple::parseCheck ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 139 of file LedgerEntry.cpp.

◆ parseCredential()

static Expected< uint256, Json::Value > ripple::parseCredential ( Json::Value const &  cred,
Json::StaticString const  fieldName 
)
static

Definition at line 145 of file LedgerEntry.cpp.

◆ parseDelegate()

static Expected< uint256, Json::Value > ripple::parseDelegate ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 176 of file LedgerEntry.cpp.

◆ parseAuthorizeCredentials()

static Expected< STArray, Json::Value > ripple::parseAuthorizeCredentials ( Json::Value const &  jv)
static

Definition at line 197 of file LedgerEntry.cpp.

◆ parseDepositPreauth()

static Expected< uint256, Json::Value > ripple::parseDepositPreauth ( Json::Value const &  dp,
Json::StaticString const  fieldName 
)
static

Definition at line 244 of file LedgerEntry.cpp.

◆ parseDID()

static Expected< uint256, Json::Value > ripple::parseDID ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 304 of file LedgerEntry.cpp.

◆ parseDirectoryNode()

static Expected< uint256, Json::Value > ripple::parseDirectoryNode ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 317 of file LedgerEntry.cpp.

◆ parseEscrow()

static Expected< uint256, Json::Value > ripple::parseEscrow ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 372 of file LedgerEntry.cpp.

◆ parseFeeSettings()

static Expected< uint256, Json::Value > ripple::parseFeeSettings ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 392 of file LedgerEntry.cpp.

◆ parseLedgerHashes()

static Expected< uint256, Json::Value > ripple::parseLedgerHashes ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 398 of file LedgerEntry.cpp.

◆ parseMPToken()

static Expected< uint256, Json::Value > ripple::parseMPToken ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 404 of file LedgerEntry.cpp.

◆ parseMPTokenIssuance()

static Expected< uint256, Json::Value > ripple::parseMPTokenIssuance ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 425 of file LedgerEntry.cpp.

◆ parseNFTokenOffer()

static Expected< uint256, Json::Value > ripple::parseNFTokenOffer ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 438 of file LedgerEntry.cpp.

◆ parseNFTokenPage()

static Expected< uint256, Json::Value > ripple::parseNFTokenPage ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 444 of file LedgerEntry.cpp.

◆ parseNegativeUNL()

static Expected< uint256, Json::Value > ripple::parseNegativeUNL ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 450 of file LedgerEntry.cpp.

◆ parseOffer()

static Expected< uint256, Json::Value > ripple::parseOffer ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 456 of file LedgerEntry.cpp.

◆ parseOracle()

static Expected< uint256, Json::Value > ripple::parseOracle ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 477 of file LedgerEntry.cpp.

◆ parsePayChannel()

static Expected< uint256, Json::Value > ripple::parsePayChannel ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 498 of file LedgerEntry.cpp.

◆ parsePermissionedDomain()

static Expected< uint256, Json::Value > ripple::parsePermissionedDomain ( Json::Value const &  pd,
Json::StaticString const  fieldName 
)
static

Definition at line 504 of file LedgerEntry.cpp.

◆ parseRippleState()

static Expected< uint256, Json::Value > ripple::parseRippleState ( Json::Value const &  jvRippleState,
Json::StaticString const  fieldName 
)
static

Definition at line 533 of file LedgerEntry.cpp.

◆ parseSignerList()

static Expected< uint256, Json::Value > ripple::parseSignerList ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 585 of file LedgerEntry.cpp.

◆ parseTicket()

static Expected< uint256, Json::Value > ripple::parseTicket ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 591 of file LedgerEntry.cpp.

◆ parseVault() [1/2]

static Expected< uint256, Json::Value > ripple::parseVault ( Json::Value const &  params,
Json::StaticString const  fieldName 
)
static

Definition at line 612 of file LedgerEntry.cpp.

◆ parseXChainOwnedClaimID()

static Expected< uint256, Json::Value > ripple::parseXChainOwnedClaimID ( Json::Value const &  claim_id,
Json::StaticString const  fieldName 
)
static

Definition at line 633 of file LedgerEntry.cpp.

◆ parseXChainOwnedCreateAccountClaimID()

static Expected< uint256, Json::Value > ripple::parseXChainOwnedCreateAccountClaimID ( Json::Value const &  claim_id,
Json::StaticString const  fieldName 
)
static

Definition at line 658 of file LedgerEntry.cpp.

◆ appendNftOfferJson()

static void ripple::appendNftOfferJson ( Application const &  app,
std::shared_ptr< SLE const > const &  offer,
Json::Value offers 
)
static

Definition at line 35 of file NFTOffers.cpp.

◆ enumerateNFTOffers()

static Json::Value ripple::enumerateNFTOffers ( RPC::JsonContext context,
uint256 const &  nftId,
Keylet const &  directory 
)
static

Definition at line 63 of file NFTOffers.cpp.

◆ fillTransaction()

static void ripple::fillTransaction ( RPC::JsonContext context,
Json::Value txArray,
AccountID const &  accountID,
std::uint32_t sequence,
ReadView const &  ledger 
)
static

Definition at line 36 of file NoRippleCheck.cpp.

◆ getAutofillSequence()

static Expected< std::uint32_t, Json::Value > ripple::getAutofillSequence ( Json::Value const &  tx_json,
RPC::JsonContext context 
)
static

Definition at line 41 of file Simulate.cpp.

◆ autofillSignature()

static std::optional< Json::Value > ripple::autofillSignature ( Json::Value sigObject)
static

Definition at line 75 of file Simulate.cpp.

◆ autofillTx()

static std::optional< Json::Value > ripple::autofillTx ( Json::Value tx_json,
RPC::JsonContext context 
)
static

Definition at line 130 of file Simulate.cpp.

◆ getTxJsonFromParams()

static Json::Value ripple::getTxJsonFromParams ( Json::Value const &  params)
static

Definition at line 171 of file Simulate.cpp.

◆ simulateTxn()

static Json::Value ripple::simulateTxn ( RPC::JsonContext context,
std::shared_ptr< Transaction transaction 
)
static

Definition at line 233 of file Simulate.cpp.

◆ getFailHard()

static NetworkOPs::FailHard ripple::getFailHard ( RPC::JsonContext const &  context)
static

Definition at line 33 of file Submit.cpp.

◆ isValidated()

static bool ripple::isValidated ( LedgerMaster ledgerMaster,
std::uint32_t  seq,
uint256 const &  hash 
)
static

Definition at line 43 of file Tx.cpp.

◆ doTxHelp()

std::pair< TxResult, RPC::Status > ripple::doTxHelp ( RPC::Context context,
TxArgs  args 
)

Definition at line 74 of file Tx.cpp.

◆ populateJsonResponse() [2/2]

Json::Value ripple::populateJsonResponse ( std::pair< TxResult, RPC::Status > const &  res,
TxArgs const &  args,
RPC::JsonContext const &  context 
)

Definition at line 188 of file Tx.cpp.

◆ validationSeed()

static std::optional< Seed > ripple::validationSeed ( Json::Value const &  params)
static

Definition at line 30 of file ValidationCreate.cpp.

◆ parseVault() [2/2]

static std::optional< uint256 > ripple::parseVault ( Json::Value const &  params,
Json::Value jvResult 
)
static

Definition at line 33 of file VaultInfo.cpp.

◆ estimate_entropy()

double ripple::estimate_entropy ( std::string const &  input)

Definition at line 39 of file WalletPropose.cpp.

◆ walletPropose()

Json::Value ripple::walletPropose ( Json::Value const &  params)

Definition at line 74 of file WalletPropose.cpp.

◆ operator<() [13/13]

bool ripple::operator< ( Port const &  lhs,
Port const &  rhs 
)

Definition at line 44 of file ServerHandler.h.

Variable Documentation

◆ epoch_offset

constexpr std::chrono::seconds ripple::epoch_offset
staticconstexpr
Initial value:
=
date::sys_days{date::year{2000} / 1 / 1} -
date::sys_days{date::year{1970} / 1 / 1}

Clock for measuring the network time.

The epoch is January 1, 2000

epoch_offset = date(2000-01-01) - date(1970-0-01) = days(10957) = seconds(946684800)

Definition at line 55 of file chrono.h.

◆ muldiv_max

auto constexpr ripple::muldiv_max = std::numeric_limits<std::uint64_t>::max()
constexpr

Definition at line 28 of file mulDiv.h.

◆ open_ledger

constexpr struct ripple::open_ledger_t ripple::open_ledger

◆ batch_view

constexpr struct ripple::batch_view_t ripple::batch_view

◆ TRADING_FEE_THRESHOLD

std::uint16_t constexpr ripple::TRADING_FEE_THRESHOLD = 1000
constexpr

Definition at line 31 of file AMMCore.h.

◆ TOTAL_TIME_SLOT_SECS

std::uint32_t constexpr ripple::TOTAL_TIME_SLOT_SECS = 24 * 3600
constexpr

Definition at line 34 of file AMMCore.h.

◆ AUCTION_SLOT_TIME_INTERVALS

std::uint16_t constexpr ripple::AUCTION_SLOT_TIME_INTERVALS = 20
constexpr

Definition at line 35 of file AMMCore.h.

◆ AUCTION_SLOT_MAX_AUTH_ACCOUNTS

std::uint16_t constexpr ripple::AUCTION_SLOT_MAX_AUTH_ACCOUNTS = 4
constexpr

Definition at line 36 of file AMMCore.h.

◆ AUCTION_SLOT_FEE_SCALE_FACTOR

std::uint32_t constexpr ripple::AUCTION_SLOT_FEE_SCALE_FACTOR = 100000
constexpr

Definition at line 37 of file AMMCore.h.

◆ AUCTION_SLOT_DISCOUNTED_FEE_FRACTION

std::uint32_t constexpr ripple::AUCTION_SLOT_DISCOUNTED_FEE_FRACTION = 10
constexpr

Definition at line 38 of file AMMCore.h.

◆ AUCTION_SLOT_MIN_FEE_FRACTION

std::uint32_t constexpr ripple::AUCTION_SLOT_MIN_FEE_FRACTION = 25
constexpr

Definition at line 39 of file AMMCore.h.

◆ AUCTION_SLOT_INTERVAL_DURATION

std::uint32_t constexpr ripple::AUCTION_SLOT_INTERVAL_DURATION
constexpr
Initial value:
=
std::uint32_t constexpr TOTAL_TIME_SLOT_SECS
Definition AMMCore.h:34
std::uint16_t constexpr AUCTION_SLOT_TIME_INTERVALS
Definition AMMCore.h:35

Definition at line 40 of file AMMCore.h.

◆ VOTE_MAX_SLOTS

std::uint16_t constexpr ripple::VOTE_MAX_SLOTS = 8
constexpr

Definition at line 44 of file AMMCore.h.

◆ VOTE_WEIGHT_SCALE_FACTOR

std::uint32_t constexpr ripple::VOTE_WEIGHT_SCALE_FACTOR = 100000
constexpr

Definition at line 45 of file AMMCore.h.

◆ directAccountKeylets

std::array<keyletDesc<AccountID const&>, 6> const ripple::directAccountKeylets
Initial value:
{
{{&keylet::account, jss::AccountRoot, false},
{&keylet::ownerDir, jss::DirectoryNode, true},
{&keylet::signers, jss::SignerList, true},
{&keylet::nftpage_min, jss::NFTokenPage, true},
{&keylet::nftpage_max, jss::NFTokenPage, true},
{&keylet::did, jss::DID, true}}}

Definition at line 384 of file Indexes.h.

◆ sLCF_NoConsensusTime

std::uint32_t const ripple::sLCF_NoConsensusTime = 0x01
static

Definition at line 82 of file LedgerHeader.h.

◆ txMinSizeBytes

std::size_t constexpr ripple::txMinSizeBytes = 32
constexpr

Protocol specific constants.

This information is, implicitly, part of the protocol.

Note
Changing these values without adding code to the server to detect "pre-change" and "post-change" will result in a hard fork. Smallest legal byte size of a transaction.

Definition at line 41 of file Protocol.h.

◆ txMaxSizeBytes

std::size_t constexpr ripple::txMaxSizeBytes = megabytes(1)
constexpr

Largest legal byte size of a transaction.

Definition at line 44 of file Protocol.h.

◆ unfundedOfferRemoveLimit

std::size_t constexpr ripple::unfundedOfferRemoveLimit = 1000
constexpr

The maximum number of unfunded offers to delete at once.

Definition at line 47 of file Protocol.h.

◆ expiredOfferRemoveLimit

std::size_t constexpr ripple::expiredOfferRemoveLimit = 256
constexpr

The maximum number of expired offers to delete at once.

Definition at line 50 of file Protocol.h.

◆ oversizeMetaDataCap

std::size_t constexpr ripple::oversizeMetaDataCap = 5200
constexpr

The maximum number of metadata entries allowed in one transaction.

Definition at line 53 of file Protocol.h.

◆ dirNodeMaxEntries

std::size_t constexpr ripple::dirNodeMaxEntries = 32
constexpr

The maximum number of entries per directory page.

Definition at line 56 of file Protocol.h.

◆ dirNodeMaxPages

std::uint64_t constexpr ripple::dirNodeMaxPages = 262144
constexpr

The maximum number of pages allowed in a directory.

Made obsolete by fixDirectoryLimit amendment.

Definition at line 62 of file Protocol.h.

◆ dirMaxTokensPerPage

std::size_t constexpr ripple::dirMaxTokensPerPage = 32
constexpr

The maximum number of items in an NFT page.

Definition at line 65 of file Protocol.h.

◆ maxDeletableDirEntries

std::size_t constexpr ripple::maxDeletableDirEntries = 1000
constexpr

The maximum number of owner directory entries for account to be deletable.

Definition at line 68 of file Protocol.h.

◆ maxTokenOfferCancelCount

std::size_t constexpr ripple::maxTokenOfferCancelCount = 500
constexpr

The maximum number of token offers that can be canceled at once.

Definition at line 71 of file Protocol.h.

◆ maxDeletableTokenOfferEntries

std::size_t constexpr ripple::maxDeletableTokenOfferEntries = 500
constexpr

The maximum number of offers in an offer directory for NFT to be burnable.

Definition at line 74 of file Protocol.h.

◆ maxTransferFee

std::uint16_t constexpr ripple::maxTransferFee = 50000
constexpr

The maximum token transfer fee allowed.

Token transfer fees can range from 0% to 50% and are specified in tenths of a basis point; that is a value of 1000 represents a transfer fee of 1% and a value of 10000 represents a transfer fee of 10%.

Note that for extremely low transfer fees values, it is possible that the calculated fee will be 0.

Definition at line 85 of file Protocol.h.

◆ maxTokenURILength

std::size_t constexpr ripple::maxTokenURILength = 256
constexpr

The maximum length of a URI inside an NFT.

Definition at line 88 of file Protocol.h.

◆ maxDIDDocumentLength

std::size_t constexpr ripple::maxDIDDocumentLength = 256
constexpr

The maximum length of a Data element inside a DID.

Definition at line 91 of file Protocol.h.

◆ maxDIDURILength

std::size_t constexpr ripple::maxDIDURILength = 256
constexpr

The maximum length of a URI inside a DID.

Definition at line 94 of file Protocol.h.

◆ maxDIDAttestationLength

std::size_t constexpr ripple::maxDIDAttestationLength = 256
constexpr

The maximum length of an Attestation inside a DID.

Definition at line 97 of file Protocol.h.

◆ maxDomainLength

std::size_t constexpr ripple::maxDomainLength = 256
constexpr

The maximum length of a domain.

Definition at line 100 of file Protocol.h.

◆ maxCredentialURILength

std::size_t constexpr ripple::maxCredentialURILength = 256
constexpr

The maximum length of a URI inside a Credential.

Definition at line 103 of file Protocol.h.

◆ maxCredentialTypeLength

std::size_t constexpr ripple::maxCredentialTypeLength = 64
constexpr

The maximum length of a CredentialType inside a Credential.

Definition at line 106 of file Protocol.h.

◆ maxCredentialsArraySize

std::size_t constexpr ripple::maxCredentialsArraySize = 8
constexpr

The maximum number of credentials can be passed in array.

Definition at line 109 of file Protocol.h.

◆ maxPermissionedDomainCredentialsArraySize

std::size_t constexpr ripple::maxPermissionedDomainCredentialsArraySize = 10
constexpr

The maximum number of credentials can be passed in array for permissioned domain.

Definition at line 113 of file Protocol.h.

◆ maxMPTokenMetadataLength

std::size_t constexpr ripple::maxMPTokenMetadataLength = 1024
constexpr

The maximum length of MPTokenMetadata.

Definition at line 116 of file Protocol.h.

◆ maxMPTokenAmount

std::uint64_t constexpr ripple::maxMPTokenAmount = 0x7FFF'FFFF'FFFF'FFFFull
constexpr

The maximum amount of MPTokenIssuance.

Definition at line 119 of file Protocol.h.

◆ maxDataPayloadLength

std::size_t constexpr ripple::maxDataPayloadLength = 256
constexpr

The maximum length of Data payload.

Definition at line 122 of file Protocol.h.

◆ vaultStrategyFirstComeFirstServe

std::uint8_t constexpr ripple::vaultStrategyFirstComeFirstServe = 1
constexpr

Vault withdrawal policies.

Definition at line 125 of file Protocol.h.

◆ vaultDefaultIOUScale

std::uint8_t constexpr ripple::vaultDefaultIOUScale = 6
constexpr

Default IOU scale factor for a Vault.

Definition at line 128 of file Protocol.h.

◆ vaultMaximumIOUScale

std::uint8_t constexpr ripple::vaultMaximumIOUScale = 18
constexpr

Maximum scale factor for a Vault.

The number is chosen to ensure that 1 IOU can be always converted to shares. 10^19 > maxMPTokenAmount (2^64-1) > 10^18

Definition at line 132 of file Protocol.h.

◆ maxAssetCheckDepth

std::uint8_t constexpr ripple::maxAssetCheckDepth = 5
constexpr

Maximum recursion depth for vault shares being put as an asset inside another vault; counted from 0.

Definition at line 136 of file Protocol.h.

◆ maxDeletableAMMTrustLines

std::uint16_t constexpr ripple::maxDeletableAMMTrustLines = 512
constexpr

The maximum number of trustlines to delete as part of AMM account deletion cleanup.

Definition at line 150 of file Protocol.h.

◆ maxOracleURI

std::size_t constexpr ripple::maxOracleURI = 256
constexpr

The maximum length of a URI inside an Oracle.

Definition at line 153 of file Protocol.h.

◆ maxOracleProvider

std::size_t constexpr ripple::maxOracleProvider = 256
constexpr

The maximum length of a Provider inside an Oracle.

Definition at line 156 of file Protocol.h.

◆ maxOracleDataSeries

std::size_t constexpr ripple::maxOracleDataSeries = 10
constexpr

The maximum size of a data series array inside an Oracle.

Definition at line 159 of file Protocol.h.

◆ maxOracleSymbolClass

std::size_t constexpr ripple::maxOracleSymbolClass = 16
constexpr

The maximum length of a SymbolClass inside an Oracle.

Definition at line 162 of file Protocol.h.

◆ maxLastUpdateTimeDelta

std::size_t constexpr ripple::maxLastUpdateTimeDelta = 300
constexpr

The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.

Definition at line 167 of file Protocol.h.

◆ maxPriceScale

std::size_t constexpr ripple::maxPriceScale = 20
constexpr

The maximum price scaling factor.

Definition at line 171 of file Protocol.h.

◆ maxTrim

std::size_t constexpr ripple::maxTrim = 25
constexpr

The maximum percentage of outliers to trim.

Definition at line 175 of file Protocol.h.

◆ permissionMaxSize

std::size_t constexpr ripple::permissionMaxSize = 10
constexpr

The maximum number of delegate permissions an account can grant.

Definition at line 179 of file Protocol.h.

◆ maxBatchTxCount

std::size_t constexpr ripple::maxBatchTxCount = 8
constexpr

The maximum number of transactions that can be in a batch.

Definition at line 182 of file Protocol.h.

◆ parityRate

Rate const ripple::parityRate(QUALITY_ONE)

A transfer rate signifying a 1:1 exchange.

◆ sTypeMap

std::map<std::string, int> const ripple::sTypeMap = {XMACRO(TO_MAP)}
static

Definition at line 112 of file SField.h.

◆ sfInvalid

SField const ripple::sfInvalid(access, -1, "")

◆ sfGeneric

SField const ripple::sfGeneric(access, 0, "Generic")

◆ vfFullValidation

constexpr std::uint32_t ripple::vfFullValidation = 0x00000001
constexpr

Definition at line 39 of file STValidation.h.

◆ vfFullyCanonicalSig

constexpr std::uint32_t ripple::vfFullyCanonicalSig = 0x80000000
constexpr

Definition at line 42 of file STValidation.h.

◆ INITIAL_XRP

constexpr XRPAmount ripple::INITIAL_XRP {100'000'000'000 * DROPS_PER_XRP}
constexpr

Configure the native currency.

Number of drops in the genesis account.

Definition at line 44 of file SystemParameters.h.

◆ XRP_LEDGER_EARLIEST_SEQ

constexpr std::uint32_t ripple::XRP_LEDGER_EARLIEST_SEQ {32570u}
staticconstexpr

The XRP ledger network's earliest allowed sequence.

Definition at line 70 of file SystemParameters.h.

◆ XRP_LEDGER_EARLIEST_FEES

constexpr std::uint32_t ripple::XRP_LEDGER_EARLIEST_FEES {562177u}
staticconstexpr

The XRP Ledger mainnet's earliest ledger with a FeeSettings object.

Only used in asserts and tests.

Definition at line 74 of file SystemParameters.h.

◆ amendmentMajorityCalcThreshold

constexpr std::ratio<80, 100> ripple::amendmentMajorityCalcThreshold
constexpr

The minimum amount of support an amendment should have.

Definition at line 77 of file SystemParameters.h.

◆ defaultAmendmentMajorityTime

constexpr std::chrono::seconds const ripple::defaultAmendmentMajorityTime = weeks{2}
constexpr

The minimum amount of time an amendment must hold a majority.

Definition at line 80 of file SystemParameters.h.

◆ tfFullyCanonicalSig

constexpr std::uint32_t ripple::tfFullyCanonicalSig = 0x80000000
constexpr

Transaction flags.

These flags are specified in a transaction's 'Flags' field and modify the behavior of that transaction.

There are two types of flags:

(1) Universal flags: these are flags which apply to, and are interpreted
                     the same way by, all transactions, except, perhaps,
                     to special pseudo-transactions.

(2) Tx-Specific flags: these are flags which are interpreted according
                       to the type of the transaction being executed.
                       That is, the same numerical flag value may have
                       different effects, depending on the transaction
                       being executed.
Note
The universal transaction flags occupy the high-order 8 bits. The tx-specific flags occupy the remaining 24 bits.
Warning
Transaction flags form part of the protocol. Changing them should be avoided because without special handling, this will result in a hard fork.

Definition at line 60 of file TxFlags.h.

◆ tfInnerBatchTxn

constexpr std::uint32_t ripple::tfInnerBatchTxn = 0x40000000
constexpr

Definition at line 61 of file TxFlags.h.

◆ tfUniversal

constexpr std::uint32_t ripple::tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn
constexpr

Definition at line 62 of file TxFlags.h.

◆ tfUniversalMask

constexpr std::uint32_t ripple::tfUniversalMask = ~tfUniversal
constexpr

Definition at line 63 of file TxFlags.h.

◆ tfRequireDestTag

constexpr std::uint32_t ripple::tfRequireDestTag = 0x00010000
constexpr

Definition at line 66 of file TxFlags.h.

◆ tfOptionalDestTag

constexpr std::uint32_t ripple::tfOptionalDestTag = 0x00020000
constexpr

Definition at line 67 of file TxFlags.h.

◆ tfRequireAuth

constexpr std::uint32_t ripple::tfRequireAuth = 0x00040000
constexpr

Definition at line 68 of file TxFlags.h.

◆ tfOptionalAuth

constexpr std::uint32_t ripple::tfOptionalAuth = 0x00080000
constexpr

Definition at line 69 of file TxFlags.h.

◆ tfDisallowXRP

constexpr std::uint32_t ripple::tfDisallowXRP = 0x00100000
constexpr

Definition at line 70 of file TxFlags.h.

◆ tfAllowXRP

constexpr std::uint32_t ripple::tfAllowXRP = 0x00200000
constexpr

Definition at line 71 of file TxFlags.h.

◆ tfAccountSetMask

constexpr std::uint32_t ripple::tfAccountSetMask
constexpr
Initial value:
=
constexpr std::uint32_t tfAllowXRP
Definition TxFlags.h:71
constexpr std::uint32_t tfOptionalDestTag
Definition TxFlags.h:67
constexpr std::uint32_t tfRequireDestTag
Definition TxFlags.h:66
constexpr std::uint32_t tfRequireAuth
Definition TxFlags.h:68
constexpr std::uint32_t tfUniversal
Definition TxFlags.h:62
constexpr std::uint32_t tfOptionalAuth
Definition TxFlags.h:69
constexpr std::uint32_t tfDisallowXRP
Definition TxFlags.h:70

Definition at line 72 of file TxFlags.h.

◆ asfRequireDest

constexpr std::uint32_t ripple::asfRequireDest = 1
constexpr

Definition at line 77 of file TxFlags.h.

◆ asfRequireAuth

constexpr std::uint32_t ripple::asfRequireAuth = 2
constexpr

Definition at line 78 of file TxFlags.h.

◆ asfDisallowXRP

constexpr std::uint32_t ripple::asfDisallowXRP = 3
constexpr

Definition at line 79 of file TxFlags.h.

◆ asfDisableMaster

constexpr std::uint32_t ripple::asfDisableMaster = 4
constexpr

Definition at line 80 of file TxFlags.h.

◆ asfAccountTxnID

constexpr std::uint32_t ripple::asfAccountTxnID = 5
constexpr

Definition at line 81 of file TxFlags.h.

◆ asfNoFreeze

constexpr std::uint32_t ripple::asfNoFreeze = 6
constexpr

Definition at line 82 of file TxFlags.h.

◆ asfGlobalFreeze

constexpr std::uint32_t ripple::asfGlobalFreeze = 7
constexpr

Definition at line 83 of file TxFlags.h.

◆ asfDefaultRipple

constexpr std::uint32_t ripple::asfDefaultRipple = 8
constexpr

Definition at line 84 of file TxFlags.h.

◆ asfDepositAuth

constexpr std::uint32_t ripple::asfDepositAuth = 9
constexpr

Definition at line 85 of file TxFlags.h.

◆ asfAuthorizedNFTokenMinter

constexpr std::uint32_t ripple::asfAuthorizedNFTokenMinter = 10
constexpr

Definition at line 86 of file TxFlags.h.

◆ asfDisallowIncomingNFTokenOffer

constexpr std::uint32_t ripple::asfDisallowIncomingNFTokenOffer = 12
constexpr

Definition at line 90 of file TxFlags.h.

◆ asfDisallowIncomingCheck

constexpr std::uint32_t ripple::asfDisallowIncomingCheck = 13
constexpr

Definition at line 91 of file TxFlags.h.

◆ asfDisallowIncomingPayChan

constexpr std::uint32_t ripple::asfDisallowIncomingPayChan = 14
constexpr

Definition at line 92 of file TxFlags.h.

◆ asfDisallowIncomingTrustline

constexpr std::uint32_t ripple::asfDisallowIncomingTrustline = 15
constexpr

Definition at line 93 of file TxFlags.h.

◆ asfAllowTrustLineClawback

constexpr std::uint32_t ripple::asfAllowTrustLineClawback = 16
constexpr

Definition at line 94 of file TxFlags.h.

◆ asfAllowTrustLineLocking

constexpr std::uint32_t ripple::asfAllowTrustLineLocking = 17
constexpr

Definition at line 95 of file TxFlags.h.

◆ tfPassive

constexpr std::uint32_t ripple::tfPassive = 0x00010000
constexpr

Definition at line 98 of file TxFlags.h.

◆ tfImmediateOrCancel

constexpr std::uint32_t ripple::tfImmediateOrCancel = 0x00020000
constexpr

Definition at line 99 of file TxFlags.h.

◆ tfFillOrKill

constexpr std::uint32_t ripple::tfFillOrKill = 0x00040000
constexpr

Definition at line 100 of file TxFlags.h.

◆ tfSell

constexpr std::uint32_t ripple::tfSell = 0x00080000
constexpr

Definition at line 101 of file TxFlags.h.

◆ tfHybrid

constexpr std::uint32_t ripple::tfHybrid = 0x00100000
constexpr

Definition at line 102 of file TxFlags.h.

◆ tfOfferCreateMask

constexpr std::uint32_t ripple::tfOfferCreateMask
constexpr
Initial value:
=
constexpr std::uint32_t tfHybrid
Definition TxFlags.h:102
constexpr std::uint32_t tfFillOrKill
Definition TxFlags.h:100
constexpr std::uint32_t tfPassive
Definition TxFlags.h:98
constexpr std::uint32_t tfImmediateOrCancel
Definition TxFlags.h:99
constexpr std::uint32_t tfSell
Definition TxFlags.h:101

Definition at line 103 of file TxFlags.h.

◆ tfNoRippleDirect

constexpr std::uint32_t ripple::tfNoRippleDirect = 0x00010000
constexpr

Definition at line 107 of file TxFlags.h.

◆ tfPartialPayment

constexpr std::uint32_t ripple::tfPartialPayment = 0x00020000
constexpr

Definition at line 108 of file TxFlags.h.

◆ tfLimitQuality

constexpr std::uint32_t ripple::tfLimitQuality = 0x00040000
constexpr

Definition at line 109 of file TxFlags.h.

◆ tfPaymentMask

constexpr std::uint32_t ripple::tfPaymentMask
constexpr
Initial value:
=
constexpr std::uint32_t tfPartialPayment
Definition TxFlags.h:108
constexpr std::uint32_t tfNoRippleDirect
Definition TxFlags.h:107
constexpr std::uint32_t tfLimitQuality
Definition TxFlags.h:109

Definition at line 110 of file TxFlags.h.

◆ tfMPTPaymentMask

constexpr std::uint32_t ripple::tfMPTPaymentMask = ~(tfUniversal | tfPartialPayment)
constexpr

Definition at line 112 of file TxFlags.h.

◆ tfSetfAuth

constexpr std::uint32_t ripple::tfSetfAuth = 0x00010000
constexpr

Definition at line 115 of file TxFlags.h.

◆ tfSetNoRipple

constexpr std::uint32_t ripple::tfSetNoRipple = 0x00020000
constexpr

Definition at line 116 of file TxFlags.h.

◆ tfClearNoRipple

constexpr std::uint32_t ripple::tfClearNoRipple = 0x00040000
constexpr

Definition at line 117 of file TxFlags.h.

◆ tfSetFreeze

constexpr std::uint32_t ripple::tfSetFreeze = 0x00100000
constexpr

Definition at line 118 of file TxFlags.h.

◆ tfClearFreeze

constexpr std::uint32_t ripple::tfClearFreeze = 0x00200000
constexpr

Definition at line 119 of file TxFlags.h.

◆ tfSetDeepFreeze

constexpr std::uint32_t ripple::tfSetDeepFreeze = 0x00400000
constexpr

Definition at line 120 of file TxFlags.h.

◆ tfClearDeepFreeze

constexpr std::uint32_t ripple::tfClearDeepFreeze = 0x00800000
constexpr

Definition at line 121 of file TxFlags.h.

◆ tfTrustSetMask

constexpr std::uint32_t ripple::tfTrustSetMask
constexpr
Initial value:
=
constexpr std::uint32_t tfSetDeepFreeze
Definition TxFlags.h:120
constexpr std::uint32_t tfClearNoRipple
Definition TxFlags.h:117
constexpr std::uint32_t tfSetfAuth
Definition TxFlags.h:115
constexpr std::uint32_t tfClearFreeze
Definition TxFlags.h:119
constexpr std::uint32_t tfClearDeepFreeze
Definition TxFlags.h:121
constexpr std::uint32_t tfSetFreeze
Definition TxFlags.h:118
constexpr std::uint32_t tfSetNoRipple
Definition TxFlags.h:116

Definition at line 122 of file TxFlags.h.

◆ tfTrustSetPermissionMask

constexpr std::uint32_t ripple::tfTrustSetPermissionMask = ~(tfUniversal | tfSetfAuth | tfSetFreeze | tfClearFreeze)
constexpr

Definition at line 125 of file TxFlags.h.

◆ tfGotMajority

constexpr std::uint32_t ripple::tfGotMajority = 0x00010000
constexpr

Definition at line 128 of file TxFlags.h.

◆ tfLostMajority

constexpr std::uint32_t ripple::tfLostMajority = 0x00020000
constexpr

Definition at line 129 of file TxFlags.h.

◆ tfChangeMask

constexpr std::uint32_t ripple::tfChangeMask
constexpr
Initial value:
=
constexpr std::uint32_t tfGotMajority
Definition TxFlags.h:128
constexpr std::uint32_t tfLostMajority
Definition TxFlags.h:129

Definition at line 130 of file TxFlags.h.

◆ tfRenew

constexpr std::uint32_t ripple::tfRenew = 0x00010000
constexpr

Definition at line 134 of file TxFlags.h.

◆ tfClose

constexpr std::uint32_t ripple::tfClose = 0x00020000
constexpr

Definition at line 135 of file TxFlags.h.

◆ tfPayChanClaimMask

constexpr std::uint32_t ripple::tfPayChanClaimMask = ~(tfUniversal | tfRenew | tfClose)
constexpr

Definition at line 136 of file TxFlags.h.

◆ tfBurnable

constexpr std::uint32_t const ripple::tfBurnable = 0x00000001
constexpr

Definition at line 139 of file TxFlags.h.

◆ tfOnlyXRP

constexpr std::uint32_t const ripple::tfOnlyXRP = 0x00000002
constexpr

Definition at line 140 of file TxFlags.h.

◆ tfTrustLine

constexpr std::uint32_t const ripple::tfTrustLine = 0x00000004
constexpr

Definition at line 141 of file TxFlags.h.

◆ tfTransferable

constexpr std::uint32_t const ripple::tfTransferable = 0x00000008
constexpr

Definition at line 142 of file TxFlags.h.

◆ tfMutable

constexpr std::uint32_t const ripple::tfMutable = 0x00000010
constexpr

Definition at line 143 of file TxFlags.h.

◆ tfMPTCanLock

constexpr std::uint32_t const ripple::tfMPTCanLock = lsfMPTCanLock
constexpr

Definition at line 148 of file TxFlags.h.

◆ tfMPTRequireAuth

constexpr std::uint32_t const ripple::tfMPTRequireAuth = lsfMPTRequireAuth
constexpr

Definition at line 149 of file TxFlags.h.

◆ tfMPTCanEscrow

constexpr std::uint32_t const ripple::tfMPTCanEscrow = lsfMPTCanEscrow
constexpr

Definition at line 150 of file TxFlags.h.

◆ tfMPTCanTrade

constexpr std::uint32_t const ripple::tfMPTCanTrade = lsfMPTCanTrade
constexpr

Definition at line 151 of file TxFlags.h.

◆ tfMPTCanTransfer

constexpr std::uint32_t const ripple::tfMPTCanTransfer = lsfMPTCanTransfer
constexpr

Definition at line 152 of file TxFlags.h.

◆ tfMPTCanClawback

constexpr std::uint32_t const ripple::tfMPTCanClawback = lsfMPTCanClawback
constexpr

Definition at line 153 of file TxFlags.h.

◆ tfMPTokenIssuanceCreateMask

constexpr std::uint32_t const ripple::tfMPTokenIssuanceCreateMask
constexpr
Initial value:
=
constexpr std::uint32_t const tfMPTCanTransfer
Definition TxFlags.h:152
constexpr std::uint32_t const tfMPTCanTrade
Definition TxFlags.h:151
constexpr std::uint32_t const tfMPTCanEscrow
Definition TxFlags.h:150
constexpr std::uint32_t const tfMPTRequireAuth
Definition TxFlags.h:149
constexpr std::uint32_t const tfMPTCanLock
Definition TxFlags.h:148
constexpr std::uint32_t const tfMPTCanClawback
Definition TxFlags.h:153

Definition at line 154 of file TxFlags.h.

◆ tmfMPTCanMutateCanLock

constexpr std::uint32_t const ripple::tmfMPTCanMutateCanLock = lsmfMPTCanMutateCanLock
constexpr

Definition at line 159 of file TxFlags.h.

◆ tmfMPTCanMutateRequireAuth

constexpr std::uint32_t const ripple::tmfMPTCanMutateRequireAuth = lsmfMPTCanMutateRequireAuth
constexpr

Definition at line 160 of file TxFlags.h.

◆ tmfMPTCanMutateCanEscrow

constexpr std::uint32_t const ripple::tmfMPTCanMutateCanEscrow = lsmfMPTCanMutateCanEscrow
constexpr

Definition at line 161 of file TxFlags.h.

◆ tmfMPTCanMutateCanTrade

constexpr std::uint32_t const ripple::tmfMPTCanMutateCanTrade = lsmfMPTCanMutateCanTrade
constexpr

Definition at line 162 of file TxFlags.h.

◆ tmfMPTCanMutateCanTransfer

constexpr std::uint32_t const ripple::tmfMPTCanMutateCanTransfer = lsmfMPTCanMutateCanTransfer
constexpr

Definition at line 163 of file TxFlags.h.

◆ tmfMPTCanMutateCanClawback

constexpr std::uint32_t const ripple::tmfMPTCanMutateCanClawback = lsmfMPTCanMutateCanClawback
constexpr

Definition at line 164 of file TxFlags.h.

◆ tmfMPTCanMutateMetadata

constexpr std::uint32_t const ripple::tmfMPTCanMutateMetadata = lsmfMPTCanMutateMetadata
constexpr

Definition at line 165 of file TxFlags.h.

◆ tmfMPTCanMutateTransferFee

constexpr std::uint32_t const ripple::tmfMPTCanMutateTransferFee = lsmfMPTCanMutateTransferFee
constexpr

Definition at line 166 of file TxFlags.h.

◆ tmfMPTokenIssuanceCreateMutableMask

constexpr std::uint32_t const ripple::tmfMPTokenIssuanceCreateMutableMask
constexpr
Initial value:
=
constexpr std::uint32_t const tmfMPTCanMutateMetadata
Definition TxFlags.h:165
constexpr std::uint32_t const tmfMPTCanMutateCanEscrow
Definition TxFlags.h:161
constexpr std::uint32_t const tmfMPTCanMutateCanTrade
Definition TxFlags.h:162
constexpr std::uint32_t const tmfMPTCanMutateTransferFee
Definition TxFlags.h:166
constexpr std::uint32_t const tmfMPTCanMutateCanLock
Definition TxFlags.h:159
constexpr std::uint32_t const tmfMPTCanMutateCanClawback
Definition TxFlags.h:164
constexpr std::uint32_t const tmfMPTCanMutateRequireAuth
Definition TxFlags.h:160
constexpr std::uint32_t const tmfMPTCanMutateCanTransfer
Definition TxFlags.h:163

Definition at line 167 of file TxFlags.h.

◆ tfMPTUnauthorize

constexpr std::uint32_t const ripple::tfMPTUnauthorize = 0x00000001
constexpr

Definition at line 172 of file TxFlags.h.

◆ tfMPTokenAuthorizeMask

constexpr std::uint32_t const ripple::tfMPTokenAuthorizeMask = ~(tfUniversal | tfMPTUnauthorize)
constexpr

Definition at line 173 of file TxFlags.h.

◆ tfMPTLock

constexpr std::uint32_t const ripple::tfMPTLock = 0x00000001
constexpr

Definition at line 176 of file TxFlags.h.

◆ tfMPTUnlock

constexpr std::uint32_t const ripple::tfMPTUnlock = 0x00000002
constexpr

Definition at line 177 of file TxFlags.h.

◆ tfMPTokenIssuanceSetMask

constexpr std::uint32_t const ripple::tfMPTokenIssuanceSetMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock)
constexpr

Definition at line 178 of file TxFlags.h.

◆ tfMPTokenIssuanceSetPermissionMask

constexpr std::uint32_t const ripple::tfMPTokenIssuanceSetPermissionMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock)
constexpr

Definition at line 179 of file TxFlags.h.

◆ tmfMPTSetCanLock

constexpr std::uint32_t const ripple::tmfMPTSetCanLock = 0x00000001
constexpr

Definition at line 183 of file TxFlags.h.

◆ tmfMPTClearCanLock

constexpr std::uint32_t const ripple::tmfMPTClearCanLock = 0x00000002
constexpr

Definition at line 184 of file TxFlags.h.

◆ tmfMPTSetRequireAuth

constexpr std::uint32_t const ripple::tmfMPTSetRequireAuth = 0x00000004
constexpr

Definition at line 185 of file TxFlags.h.

◆ tmfMPTClearRequireAuth

constexpr std::uint32_t const ripple::tmfMPTClearRequireAuth = 0x00000008
constexpr

Definition at line 186 of file TxFlags.h.

◆ tmfMPTSetCanEscrow

constexpr std::uint32_t const ripple::tmfMPTSetCanEscrow = 0x00000010
constexpr

Definition at line 187 of file TxFlags.h.

◆ tmfMPTClearCanEscrow

constexpr std::uint32_t const ripple::tmfMPTClearCanEscrow = 0x00000020
constexpr

Definition at line 188 of file TxFlags.h.

◆ tmfMPTSetCanTrade

constexpr std::uint32_t const ripple::tmfMPTSetCanTrade = 0x00000040
constexpr

Definition at line 189 of file TxFlags.h.

◆ tmfMPTClearCanTrade

constexpr std::uint32_t const ripple::tmfMPTClearCanTrade = 0x00000080
constexpr

Definition at line 190 of file TxFlags.h.

◆ tmfMPTSetCanTransfer

constexpr std::uint32_t const ripple::tmfMPTSetCanTransfer = 0x00000100
constexpr

Definition at line 191 of file TxFlags.h.

◆ tmfMPTClearCanTransfer

constexpr std::uint32_t const ripple::tmfMPTClearCanTransfer = 0x00000200
constexpr

Definition at line 192 of file TxFlags.h.

◆ tmfMPTSetCanClawback

constexpr std::uint32_t const ripple::tmfMPTSetCanClawback = 0x00000400
constexpr

Definition at line 193 of file TxFlags.h.

◆ tmfMPTClearCanClawback

constexpr std::uint32_t const ripple::tmfMPTClearCanClawback = 0x00000800
constexpr

Definition at line 194 of file TxFlags.h.

◆ tmfMPTokenIssuanceSetMutableMask

constexpr std::uint32_t const ripple::tmfMPTokenIssuanceSetMutableMask
constexpr
Initial value:
constexpr std::uint32_t const tmfMPTClearCanClawback
Definition TxFlags.h:194
constexpr std::uint32_t const tmfMPTClearCanEscrow
Definition TxFlags.h:188
constexpr std::uint32_t const tmfMPTSetCanClawback
Definition TxFlags.h:193
constexpr std::uint32_t const tmfMPTSetRequireAuth
Definition TxFlags.h:185
constexpr std::uint32_t const tmfMPTClearCanTrade
Definition TxFlags.h:190
constexpr std::uint32_t const tmfMPTClearRequireAuth
Definition TxFlags.h:186
constexpr std::uint32_t const tmfMPTSetCanLock
Definition TxFlags.h:183
constexpr std::uint32_t const tmfMPTSetCanTrade
Definition TxFlags.h:189
constexpr std::uint32_t const tmfMPTSetCanEscrow
Definition TxFlags.h:187
constexpr std::uint32_t const tmfMPTClearCanLock
Definition TxFlags.h:184
constexpr std::uint32_t const tmfMPTSetCanTransfer
Definition TxFlags.h:191
constexpr std::uint32_t const tmfMPTClearCanTransfer
Definition TxFlags.h:192

Definition at line 195 of file TxFlags.h.

◆ tfMPTokenIssuanceDestroyMask

constexpr std::uint32_t const ripple::tfMPTokenIssuanceDestroyMask = ~tfUniversal
constexpr

Definition at line 201 of file TxFlags.h.

◆ tfNFTokenMintMask

constexpr std::uint32_t const ripple::tfNFTokenMintMask
constexpr
Initial value:
=
constexpr std::uint32_t const tfOnlyXRP
Definition TxFlags.h:140
constexpr std::uint32_t const tfBurnable
Definition TxFlags.h:139
constexpr std::uint32_t const tfTransferable
Definition TxFlags.h:142

Definition at line 216 of file TxFlags.h.

◆ tfNFTokenMintOldMask

constexpr std::uint32_t const ripple::tfNFTokenMintOldMask
constexpr
Initial value:
=
~( ~tfNFTokenMintMask | tfTrustLine)
constexpr std::uint32_t const tfTrustLine
Definition TxFlags.h:141

Definition at line 219 of file TxFlags.h.

◆ tfNFTokenMintOldMaskWithMutable

constexpr std::uint32_t const ripple::tfNFTokenMintOldMaskWithMutable
constexpr
Initial value:
=
~( ~tfNFTokenMintOldMask | tfMutable)
constexpr std::uint32_t const tfMutable
Definition TxFlags.h:143

Definition at line 223 of file TxFlags.h.

◆ tfNFTokenMintMaskWithMutable

constexpr std::uint32_t const ripple::tfNFTokenMintMaskWithMutable
constexpr
Initial value:
=
~( ~tfNFTokenMintMask | tfMutable)

Definition at line 226 of file TxFlags.h.

◆ tfSellNFToken

constexpr std::uint32_t const ripple::tfSellNFToken = 0x00000001
constexpr

Definition at line 230 of file TxFlags.h.

◆ tfNFTokenCreateOfferMask

constexpr std::uint32_t const ripple::tfNFTokenCreateOfferMask
constexpr
Initial value:
=
constexpr std::uint32_t const tfSellNFToken
Definition TxFlags.h:230

Definition at line 231 of file TxFlags.h.

◆ tfNFTokenCancelOfferMask

constexpr std::uint32_t const ripple::tfNFTokenCancelOfferMask = ~tfUniversal
constexpr

Definition at line 235 of file TxFlags.h.

◆ tfNFTokenAcceptOfferMask

constexpr std::uint32_t const ripple::tfNFTokenAcceptOfferMask = ~tfUniversal
constexpr

Definition at line 238 of file TxFlags.h.

◆ tfClawbackMask

constexpr std::uint32_t const ripple::tfClawbackMask = ~tfUniversal
constexpr

Definition at line 241 of file TxFlags.h.

◆ tfLPToken

constexpr std::uint32_t ripple::tfLPToken = 0x00010000
constexpr

Definition at line 244 of file TxFlags.h.

◆ tfWithdrawAll

constexpr std::uint32_t ripple::tfWithdrawAll = 0x00020000
constexpr

Definition at line 245 of file TxFlags.h.

◆ tfOneAssetWithdrawAll

constexpr std::uint32_t ripple::tfOneAssetWithdrawAll = 0x00040000
constexpr

Definition at line 246 of file TxFlags.h.

◆ tfSingleAsset

constexpr std::uint32_t ripple::tfSingleAsset = 0x00080000
constexpr

Definition at line 247 of file TxFlags.h.

◆ tfTwoAsset

constexpr std::uint32_t ripple::tfTwoAsset = 0x00100000
constexpr

Definition at line 248 of file TxFlags.h.

◆ tfOneAssetLPToken

constexpr std::uint32_t ripple::tfOneAssetLPToken = 0x00200000
constexpr

Definition at line 249 of file TxFlags.h.

◆ tfLimitLPToken

constexpr std::uint32_t ripple::tfLimitLPToken = 0x00400000
constexpr

Definition at line 250 of file TxFlags.h.

◆ tfTwoAssetIfEmpty

constexpr std::uint32_t ripple::tfTwoAssetIfEmpty = 0x00800000
constexpr

Definition at line 251 of file TxFlags.h.

◆ tfWithdrawSubTx

constexpr std::uint32_t ripple::tfWithdrawSubTx
constexpr
Initial value:
=
constexpr std::uint32_t tfSingleAsset
Definition TxFlags.h:247
constexpr std::uint32_t tfOneAssetWithdrawAll
Definition TxFlags.h:246
constexpr std::uint32_t tfLimitLPToken
Definition TxFlags.h:250
constexpr std::uint32_t tfOneAssetLPToken
Definition TxFlags.h:249
constexpr std::uint32_t tfTwoAsset
Definition TxFlags.h:248
constexpr std::uint32_t tfWithdrawAll
Definition TxFlags.h:245
constexpr std::uint32_t tfLPToken
Definition TxFlags.h:244

Definition at line 252 of file TxFlags.h.

◆ tfDepositSubTx

constexpr std::uint32_t ripple::tfDepositSubTx
constexpr
Initial value:

Definition at line 255 of file TxFlags.h.

◆ tfWithdrawMask

constexpr std::uint32_t ripple::tfWithdrawMask = ~(tfUniversal | tfWithdrawSubTx)
constexpr

Definition at line 258 of file TxFlags.h.

◆ tfDepositMask

constexpr std::uint32_t ripple::tfDepositMask = ~(tfUniversal | tfDepositSubTx)
constexpr

Definition at line 259 of file TxFlags.h.

◆ tfClawTwoAssets

constexpr std::uint32_t ripple::tfClawTwoAssets = 0x00000001
constexpr

Definition at line 262 of file TxFlags.h.

◆ tfAMMClawbackMask

constexpr std::uint32_t ripple::tfAMMClawbackMask = ~(tfUniversal | tfClawTwoAssets)
constexpr

Definition at line 263 of file TxFlags.h.

◆ tfClearAccountCreateAmount

constexpr std::uint32_t ripple::tfClearAccountCreateAmount = 0x00010000
constexpr

Definition at line 266 of file TxFlags.h.

◆ tfBridgeModifyMask

constexpr std::uint32_t ripple::tfBridgeModifyMask = ~(tfUniversal | tfClearAccountCreateAmount)
constexpr

Definition at line 267 of file TxFlags.h.

◆ tfVaultPrivate

constexpr std::uint32_t const ripple::tfVaultPrivate = 0x00010000
constexpr

Definition at line 270 of file TxFlags.h.

◆ tfVaultShareNonTransferable

constexpr std::uint32_t const ripple::tfVaultShareNonTransferable = 0x00020000
constexpr

Definition at line 272 of file TxFlags.h.

◆ tfVaultCreateMask

constexpr std::uint32_t const ripple::tfVaultCreateMask = ~(tfUniversal | tfVaultPrivate | tfVaultShareNonTransferable)
constexpr

Definition at line 273 of file TxFlags.h.

◆ tfAllOrNothing

constexpr std::uint32_t ripple::tfAllOrNothing = 0x00010000
constexpr

Definition at line 276 of file TxFlags.h.

◆ tfOnlyOne

constexpr std::uint32_t ripple::tfOnlyOne = 0x00020000
constexpr

Definition at line 277 of file TxFlags.h.

◆ tfUntilFailure

constexpr std::uint32_t ripple::tfUntilFailure = 0x00040000
constexpr

Definition at line 278 of file TxFlags.h.

◆ tfIndependent

constexpr std::uint32_t ripple::tfIndependent = 0x00080000
constexpr

Definition at line 279 of file TxFlags.h.

◆ tfBatchMask

constexpr std::uint32_t const ripple::tfBatchMask
constexpr
Initial value:
=
constexpr std::uint32_t tfAllOrNothing
Definition TxFlags.h:276
constexpr std::uint32_t tfOnlyOne
Definition TxFlags.h:277
constexpr std::uint32_t tfIndependent
Definition TxFlags.h:279
constexpr std::uint32_t tfUntilFailure
Definition TxFlags.h:278
Note
If nested Batch transactions are supported in the future, the tfInnerBatchTxn flag will need to be removed from this mask to allow Batch transaction to be inside the sfRawTransactions array.

Definition at line 285 of file TxFlags.h.

◆ DROPS_PER_XRP

constexpr XRPAmount ripple::DROPS_PER_XRP {1'000'000}
constexpr

Number of drops per 1 XRP.

Definition at line 259 of file XRPAmount.h.

◆ wireTypeTransaction

constexpr unsigned char const ripple::wireTypeTransaction = 0
staticconstexpr

Definition at line 37 of file SHAMapTreeNode.h.

◆ wireTypeAccountState

constexpr unsigned char const ripple::wireTypeAccountState = 1
staticconstexpr

Definition at line 38 of file SHAMapTreeNode.h.

◆ wireTypeInner

constexpr unsigned char const ripple::wireTypeInner = 2
staticconstexpr

Definition at line 39 of file SHAMapTreeNode.h.

◆ wireTypeCompressedInner

constexpr unsigned char const ripple::wireTypeCompressedInner = 3
staticconstexpr

Definition at line 40 of file SHAMapTreeNode.h.

◆ wireTypeTransactionWithMeta

constexpr unsigned char const ripple::wireTypeTransactionWithMeta = 4
staticconstexpr

Definition at line 41 of file SHAMapTreeNode.h.

◆ one

constexpr Number ripple::one {1000000000000000, -15, Number::unchecked{}}
constexpr

Definition at line 175 of file Number.cpp.

◆ httpClientSSLContext

std::optional<HTTPClientSSLContext> ripple::httpClientSSLContext
static

Definition at line 36 of file libxrpl/net/HTTPClient.cpp.

◆ accountIdCache

std::unique_ptr<detail::AccountIdCache> ripple::accountIdCache
static

Definition at line 104 of file AccountID.cpp.

◆ readOnlySet

bool const ripple::readOnlySet
static
Initial value:
=
featureCollections.registrationIsDone()

Definition at line 462 of file Feature.cpp.

◆ minMantissa

std::int64_t constexpr ripple::minMantissa = 1000000000000000ull
staticconstexpr

Definition at line 62 of file IOUAmount.cpp.

◆ maxMantissa

std::int64_t constexpr ripple::maxMantissa = 9999999999999999ull
staticconstexpr

Definition at line 63 of file IOUAmount.cpp.

◆ minExponent

int constexpr ripple::minExponent = -96
staticconstexpr

Definition at line 65 of file IOUAmount.cpp.

◆ maxExponent

int constexpr ripple::maxExponent = 80
staticconstexpr

Definition at line 66 of file IOUAmount.cpp.

◆ access

SField::private_access_tag_t ripple::access
static

Definition at line 40 of file SField.cpp.

◆ sfHash

SField const ripple::sfHash(access, STI_UINT256, 257, "hash") ( access  ,
STI_UINT256  ,
257  ,
"hash"   
)

◆ sfIndex

SField const ripple::sfIndex(access, STI_UINT256, 258, "index") ( access  ,
STI_UINT256  ,
258  ,
"index"   
)

◆ tenTo14

std::uint64_t const ripple::tenTo14 = 100000000000000ull
static

Definition at line 71 of file STAmount.cpp.

◆ tenTo14m1

std::uint64_t const ripple::tenTo14m1 = tenTo14 - 1
static

Definition at line 72 of file STAmount.cpp.

◆ tenTo17

std::uint64_t const ripple::tenTo17 = tenTo14 * 1000
static

Definition at line 73 of file STAmount.cpp.

◆ alphabetForward

constexpr char const* ripple::alphabetForward
staticconstexpr
Initial value:
=
"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"

Definition at line 142 of file tokens.cpp.

◆ alphabetReverse

constexpr std::array<int, 256> const ripple::alphabetReverse
staticconstexpr
Initial value:
= []() {
for (auto& m : map)
m = -1;
for (int i = 0, j = 0; alphabetForward[i] != 0; ++i)
map[static_cast<unsigned char>(alphabetForward[i])] = j++;
return map;
}()
static constexpr char const * alphabetForward
Definition tokens.cpp:142

Definition at line 145 of file tokens.cpp.

◆ no_item

boost::intrusive_ptr<SHAMapItem const> const ripple::no_item
static

Definition at line 523 of file SHAMap.cpp.

◆ ledgerAcquireTimeout

auto constexpr ripple::ledgerAcquireTimeout = 3000ms
constexpr

Definition at line 74 of file InboundLedger.cpp.

◆ MAX_LEDGER_GAP

constexpr int ripple::MAX_LEDGER_GAP {100}
staticconstexpr

Definition at line 62 of file LedgerMaster.cpp.

◆ MAX_LEDGER_AGE_ACQUIRE

constexpr std::chrono::minutes ripple::MAX_LEDGER_AGE_ACQUIRE {1}
staticconstexpr

Definition at line 65 of file LedgerMaster.cpp.

◆ MAX_WRITE_LOAD_ACQUIRE

constexpr int ripple::MAX_WRITE_LOAD_ACQUIRE {8192}
staticconstexpr

Definition at line 68 of file LedgerMaster.cpp.

◆ TX_ACQUIRE_TIMEOUT

auto constexpr ripple::TX_ACQUIRE_TIMEOUT = 250ms
constexpr

Definition at line 34 of file TransactionAcquire.cpp.

◆ create_genesis

create_genesis_t const ripple::create_genesis {}

Definition at line 51 of file Ledger.cpp.

◆ FLAG_LEDGER_INTERVAL

std::uint32_t constexpr ripple::FLAG_LEDGER_INTERVAL = 256
constexpr

Definition at line 426 of file Ledger.h.

◆ CommonDBPragmaJournal

constexpr char const* ripple::CommonDBPragmaJournal {"PRAGMA journal_mode=%s;"}
constexpr

Definition at line 32 of file DBInit.h.

◆ CommonDBPragmaSync

constexpr char const* ripple::CommonDBPragmaSync {"PRAGMA synchronous=%s;"}
constexpr

Definition at line 33 of file DBInit.h.

◆ CommonDBPragmaTemp

constexpr char const* ripple::CommonDBPragmaTemp {"PRAGMA temp_store=%s;"}
constexpr

Definition at line 34 of file DBInit.h.

◆ SQLITE_TUNING_CUTOFF

constexpr std::uint32_t ripple::SQLITE_TUNING_CUTOFF = 10'000'000
constexpr

Definition at line 40 of file DBInit.h.

◆ LgrDBName

constexpr auto ripple::LgrDBName {"ledger.db"}
constexpr

Definition at line 43 of file DBInit.h.

◆ LgrDBInit

constexpr std::array<char const*, 5> ripple::LgrDBInit
constexpr
Initial value:
{
{"BEGIN TRANSACTION;",
"CREATE TABLE IF NOT EXISTS Ledgers ( \
LedgerHash CHARACTER(64) PRIMARY KEY, \
LedgerSeq BIGINT UNSIGNED, \
PrevHash CHARACTER(64), \
TotalCoins BIGINT UNSIGNED, \
ClosingTime BIGINT UNSIGNED, \
PrevClosingTime BIGINT UNSIGNED, \
CloseTimeRes BIGINT UNSIGNED, \
CloseFlags BIGINT UNSIGNED, \
AccountSetHash CHARACTER(64), \
TransSetHash CHARACTER(64) \
);",
"CREATE INDEX IF NOT EXISTS SeqLedger ON Ledgers(LedgerSeq);",
"DROP TABLE IF EXISTS Validations;",
"END TRANSACTION;"}}

Definition at line 45 of file DBInit.h.

◆ TxDBName

constexpr auto ripple::TxDBName {"transaction.db"}
constexpr

Definition at line 70 of file DBInit.h.

◆ TxDBInit

constexpr std::array<char const*, 8> ripple::TxDBInit
constexpr
Initial value:
{
{"BEGIN TRANSACTION;",
"CREATE TABLE IF NOT EXISTS Transactions ( \
TransID CHARACTER(64) PRIMARY KEY, \
TransType CHARACTER(24), \
FromAcct CHARACTER(35), \
FromSeq BIGINT UNSIGNED, \
LedgerSeq BIGINT UNSIGNED, \
Status CHARACTER(1), \
RawTxn BLOB, \
TxnMeta BLOB \
);",
"CREATE INDEX IF NOT EXISTS TxLgrIndex ON \
Transactions(LedgerSeq);",
"CREATE TABLE IF NOT EXISTS AccountTransactions ( \
TransID CHARACTER(64), \
Account CHARACTER(64), \
LedgerSeq BIGINT UNSIGNED, \
TxnSeq INTEGER \
);",
"CREATE INDEX IF NOT EXISTS AcctTxIDIndex ON \
AccountTransactions(TransID);",
"CREATE INDEX IF NOT EXISTS AcctTxIndex ON \
AccountTransactions(Account, LedgerSeq, TxnSeq, TransID);",
"CREATE INDEX IF NOT EXISTS AcctLgrIndex ON \
AccountTransactions(LedgerSeq, Account, TransID);",
"END TRANSACTION;"}}

Definition at line 72 of file DBInit.h.

◆ WalletDBName

constexpr auto ripple::WalletDBName {"wallet.db"}
constexpr

Definition at line 105 of file DBInit.h.

◆ WalletDBInit

constexpr std::array<char const*, 6> ripple::WalletDBInit
constexpr
Initial value:
{
{"BEGIN TRANSACTION;",
"CREATE TABLE IF NOT EXISTS NodeIdentity ( \
PublicKey CHARACTER(53), \
PrivateKey CHARACTER(52) \
);",
"CREATE TABLE IF NOT EXISTS PeerReservations ( \
PublicKey CHARACTER(53) UNIQUE NOT NULL, \
Description CHARACTER(64) NOT NULL \
);",
"CREATE TABLE IF NOT EXISTS ValidatorManifests ( \
RawData BLOB NOT NULL \
);",
"CREATE TABLE IF NOT EXISTS PublisherManifests ( \
RawData BLOB NOT NULL \
);",
"END TRANSACTION;"}}

Definition at line 107 of file DBInit.h.

◆ fullBelowTargetSize

constexpr std::size_t ripple::fullBelowTargetSize = 524288
constexpr

Definition at line 27 of file src/xrpld/app/main/Tuning.h.

◆ fullBelowExpiration

constexpr std::chrono::seconds ripple::fullBelowExpiration = std::chrono::minutes{10}
constexpr

Definition at line 28 of file src/xrpld/app/main/Tuning.h.

◆ maxPoppedTransactions

constexpr std::size_t ripple::maxPoppedTransactions = 10
constexpr

Definition at line 30 of file src/xrpld/app/main/Tuning.h.

◆ default_refresh_interval

auto constexpr ripple::default_refresh_interval = std::chrono::minutes{5}
constexpr

Definition at line 34 of file ValidatorSite.cpp.

◆ error_retry_interval

auto constexpr ripple::error_retry_interval = std::chrono::seconds{30}
constexpr

Definition at line 35 of file ValidatorSite.cpp.

◆ max_redirects

unsigned short constexpr ripple::max_redirects = 3
constexpr

Definition at line 36 of file ValidatorSite.cpp.

◆ stateNames

std::array<char const*, 5> const ripple::stateNames
static
Initial value:
{
{"disconnected", "connected", "syncing", "tracking", "full"}}

Definition at line 875 of file NetworkOPs.cpp.

◆ genesisAccountId

auto const ripple::genesisAccountId
static
Initial value:
generateKeyPair(KeyType::secp256k1, generateSeed("masterpassphrase"))
.first)
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
AccountID calcAccountID(PublicKey const &pk)
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
Definition Seed.cpp:76

Definition at line 888 of file NetworkOPs.cpp.

◆ SF_SIGBAD

constexpr HashRouterFlags ripple::SF_SIGBAD
constexpr
Initial value:
=
HashRouterFlags::PRIVATE1

Definition at line 32 of file apply.cpp.

◆ SF_SIGGOOD

constexpr HashRouterFlags ripple::SF_SIGGOOD
constexpr
Initial value:
=
HashRouterFlags::PRIVATE2

Definition at line 34 of file apply.cpp.

◆ SF_LOCALBAD

constexpr HashRouterFlags ripple::SF_LOCALBAD
constexpr
Initial value:
=
HashRouterFlags::PRIVATE3

Definition at line 36 of file apply.cpp.

◆ SF_LOCALGOOD

constexpr HashRouterFlags ripple::SF_LOCALGOOD
constexpr
Initial value:
=
HashRouterFlags::PRIVATE4

Definition at line 38 of file apply.cpp.

◆ SF_CF_INVALID

constexpr HashRouterFlags ripple::SF_CF_INVALID = HashRouterFlags::PRIVATE5
constexpr

Definition at line 42 of file Escrow.cpp.

◆ SF_CF_VALID

constexpr HashRouterFlags ripple::SF_CF_VALID = HashRouterFlags::PRIVATE6
constexpr

Definition at line 43 of file Escrow.cpp.

◆ mptMutabilityFlags

constexpr std::array<MPTMutabilityFlags, 6> ripple::mptMutabilityFlags
staticconstexpr

◆ DEFAULT_SIGNER_LIST_ID

std::uint32_t const ripple::DEFAULT_SIGNER_LIST_ID = 0
static

Definition at line 40 of file SetSignerList.cpp.

◆ xbridgeMaxAccountCreateClaims

constexpr size_t ripple::xbridgeMaxAccountCreateClaims = 128
constexpr

Definition at line 29 of file XChainBridge.h.

◆ ledgerPossibleTimeResolutions

std::chrono::seconds constexpr ripple::ledgerPossibleTimeResolutions[]
constexpr
Initial value:

Possible ledger close time resolutions.

Values should not be duplicated.

See also
getNextLedgerTimeResolution

Definition at line 35 of file LedgerTiming.h.

◆ ledgerDefaultTimeResolution

auto constexpr ripple::ledgerDefaultTimeResolution = ledgerPossibleTimeResolutions[2]
constexpr

Initial resolution of ledger close time.

Definition at line 44 of file LedgerTiming.h.

◆ ledgerGenesisTimeResolution

auto constexpr ripple::ledgerGenesisTimeResolution = ledgerPossibleTimeResolutions[0]
constexpr

Close time resolution in genesis ledger.

Definition at line 47 of file LedgerTiming.h.

◆ increaseLedgerTimeResolutionEvery

auto constexpr ripple::increaseLedgerTimeResolutionEvery = 8
constexpr

How often we increase the close time resolution (in numbers of ledgers)

Definition at line 50 of file LedgerTiming.h.

◆ decreaseLedgerTimeResolutionEvery

auto constexpr ripple::decreaseLedgerTimeResolutionEvery = 1
constexpr

How often we decrease the close time resolution (in numbers of ledgers)

Definition at line 53 of file LedgerTiming.h.

◆ sizedItems

constexpr std::array<std::pair<SizedItem, std::array<int, 5> >, 13> ripple::sizedItems
constexpr
Initial value:
{{
{SizedItem::sweepInterval, {{ 10, 30, 60, 90, 120 }}},
{SizedItem::treeCacheSize, {{ 262144, 524288, 2097152, 4194304, 8388608 }}},
{SizedItem::treeCacheAge, {{ 30, 60, 90, 120, 900 }}},
{SizedItem::ledgerSize, {{ 32, 32, 64, 256, 384 }}},
{SizedItem::ledgerAge, {{ 30, 60, 180, 300, 600 }}},
{SizedItem::ledgerFetch, {{ 2, 3, 4, 5, 8 }}},
{SizedItem::hashNodeDBCache, {{ 4, 12, 24, 64, 128 }}},
{SizedItem::txnDBCache, {{ 4, 12, 24, 64, 128 }}},
{SizedItem::lgrDBCache, {{ 4, 8, 16, 32, 128 }}},
{SizedItem::openFinalLimit, {{ 8, 16, 32, 64, 128 }}},
{SizedItem::burstSize, {{ 4, 8, 16, 32, 48 }}},
{SizedItem::ramSizeGB, {{ 6, 8, 12, 24, 0 }}},
{SizedItem::accountIdCacheSize, {{ 20047, 50053, 77081, 150061, 300007 }}}
}}

Definition at line 113 of file Config.cpp.

◆ checkpointers

CheckpointersCollection ripple::checkpointers

Definition at line 77 of file DatabaseCon.cpp.

◆ checkpointPageCount

auto ripple::checkpointPageCount = 1000
static

Definition at line 40 of file SociDB.cpp.

◆ FEATURE_COMPR

constexpr char ripple::FEATURE_COMPR[] = "compr"
staticconstexpr

Definition at line 141 of file Handshake.h.

◆ FEATURE_VPRR

constexpr char ripple::FEATURE_VPRR[] = "vprr"
staticconstexpr

Definition at line 143 of file Handshake.h.

◆ FEATURE_TXRR

constexpr char ripple::FEATURE_TXRR[] = "txrr"
staticconstexpr

Definition at line 145 of file Handshake.h.

◆ FEATURE_LEDGER_REPLAY

constexpr char ripple::FEATURE_LEDGER_REPLAY[] = "ledgerreplay"
staticconstexpr

Definition at line 147 of file Handshake.h.

◆ DELIM_FEATURE

constexpr char ripple::DELIM_FEATURE[] = ";"
staticconstexpr

Definition at line 148 of file Handshake.h.

◆ DELIM_VALUE

constexpr char ripple::DELIM_VALUE[] = ","
staticconstexpr

Definition at line 149 of file Handshake.h.

◆ supportedProtocolList

constexpr ProtocolVersion const ripple::supportedProtocolList[]
constexpr
Initial value:
{
{2, 1},
{2, 2}
}

The list of protocol versions we speak and we prefer to use.

Note
The list must be sorted in strictly ascending order (and so it may not contain any duplicates!)

Definition at line 40 of file ProtocolVersion.cpp.

◆ type_lookup

std::unordered_map<protocol::MessageType, TrafficCount::category> const ripple::type_lookup
Initial value:
= {
{protocol::mtPING, TrafficCount::category::base},
{protocol::mtSTATUS_CHANGE, TrafficCount::category::base},
{protocol::mtMANIFESTS, TrafficCount::category::manifests},
{protocol::mtENDPOINTS, TrafficCount::category::overlay},
{protocol::mtTRANSACTION, TrafficCount::category::transaction},
{protocol::mtVALIDATORLIST, TrafficCount::category::validatorlist},
{protocol::mtVALIDATORLISTCOLLECTION,
TrafficCount::category::validatorlist},
{protocol::mtVALIDATION, TrafficCount::category::validation},
{protocol::mtPROPOSE_LEDGER, TrafficCount::category::proposal},
{protocol::mtPROOF_PATH_REQ,
TrafficCount::category::proof_path_request},
{protocol::mtPROOF_PATH_RESPONSE,
TrafficCount::category::proof_path_response},
{protocol::mtREPLAY_DELTA_REQ,
TrafficCount::category::replay_delta_request},
{protocol::mtREPLAY_DELTA_RESPONSE,
TrafficCount::category::replay_delta_response},
{protocol::mtHAVE_TRANSACTIONS,
TrafficCount::category::have_transactions},
{protocol::mtTRANSACTIONS,
TrafficCount::category::requested_transactions},
{protocol::mtSQUELCH, TrafficCount::category::squelch},
}

Definition at line 25 of file TrafficCount.cpp.

◆ maximiumMessageSize

constexpr std::size_t ripple::maximiumMessageSize = megabytes(64)
constexpr

Definition at line 34 of file Message.h.

◆ method_not_found

Json::Int constexpr ripple::method_not_found = -32601
constexpr

Definition at line 607 of file ServerHandler.cpp.

◆ server_overloaded

Json::Int constexpr ripple::server_overloaded = -32604
constexpr

Definition at line 608 of file ServerHandler.cpp.

◆ forbidden

Json::Int constexpr ripple::forbidden = -32605
constexpr

Definition at line 609 of file ServerHandler.cpp.

◆ wrong_version

Json::Int constexpr ripple::wrong_version = -32606
constexpr

Definition at line 610 of file ServerHandler.cpp.