|
xrpld
|
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm. More...
Namespaces | |
| namespace | base64 |
| namespace | detail |
| namespace | compression_algorithms |
| namespace | intr_ptr |
| namespace | cryptoconditions |
| namespace | ledger_trie_detail |
| namespace | perf |
| Dummy class for unit tests. | |
| namespace | node_store |
| namespace | resource |
| namespace | git |
| namespace | directory |
| namespace | credentials |
| namespace | accrual |
| namespace | cash_basis |
| namespace | nft |
| namespace | permissioned_dex |
| namespace | peer_finder |
| namespace | rpc |
| API version numbers used in later API versions. | |
| namespace | build_info |
| Versioning information for this build. | |
| namespace | keylet |
| Keylet computation functions. | |
| namespace | jss |
| namespace | lending |
| namespace | test |
| namespace | b58_ref |
| namespace | unit |
| namespace | attestations |
| namespace | ledger_entries |
| namespace | protocol_autogen |
| namespace | transactions |
| namespace | util |
| namespace | path |
| namespace | openssl |
| namespace | st_parsed_json_detail |
| namespace | tests |
| namespace | inner_object_formats_unit_test_detail |
| namespace | ledger_replay_parameters |
| namespace | compression |
| namespace | crawl_options |
| namespace | tuning |
| namespace | metrics |
| namespace | reduce_relay |
| namespace | rpc_call |
| Processes XRPL RPC calls. | |
| namespace | ledger_entry_helpers |
Classes | |
| class | BaseUInt |
| Integers of any length that is a multiple of 32-bits. More... | |
| class | Buffer |
| Like std::vector<char> but better. More... | |
| class | NetClock |
| class | CountedObjects |
| Manages all counted object types. More... | |
| class | CountedObject |
| Tracks the number of instances of an object. More... | |
| 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 | TempDir |
| RAII temporary directory. More... | |
| class | HardenedHash |
| Seed functor once per construction. More... | |
| struct | StaticCastTagSharedIntrusive |
| Tag to create an intrusive pointer from another intrusive pointer by using a static cast. More... | |
| struct | DynamicCastTagSharedIntrusive |
| Tag to create an intrusive pointer from another intrusive pointer by using a dynamic cast. 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 | SharedIntrusive |
| A shared intrusive pointer class that supports weak pointers. More... | |
| class | WeakIntrusive |
| A weak intrusive pointer class for the SharedIntrusive pointer class. More... | |
| class | SharedWeakUnion |
| A combination of a strong and a weak intrusive pointer stored in the space of a single pointer. More... | |
| struct | IntrusiveRefCounts |
| Implement the strong count, weak count, and bit flags for an intrusive pointer. More... | |
| class | CollectionAndDelimiter |
| class | CollectionAndDelimiter< Collection[N]> |
| class | CollectionAndDelimiter< char[N]> |
| class | LocalValue |
| class | Logs |
| Manages partitions for logging. More... | |
| struct | MallocTrimReport |
| struct | MantissaRange |
| MantissaRange defines a range for the mantissa of a normalized Number. More... | |
| class | Number |
| Number is a floating point type that can represent a wide range of values. More... | |
| class | SaveNumberRoundMode |
| class | NumberRoundModeGuard |
| class | NumberMantissaScaleGuard |
| Sets the new scale and restores the old scale when it leaves scope. More... | |
| class | PartitionedUnorderedMap |
| class | Resolver |
| class | ResolverAsio |
| class | ScopeExit |
| class | ScopeFail |
| class | ScopeSuccess |
| class | ScopeUnlock |
| Automatically unlocks and re-locks a unique_lock object. More... | |
| class | SHAMapHash |
| class | SharedWeakCachePointer |
| A combination of a std::shared_ptr and a std::weak_pointer. 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 | PackedSpinlock |
| Classes to handle arrays of spinlocks packed into a single atomic integer: More... | |
| class | Spinlock |
| A spinlock implemented on top of an atomic integer. More... | |
| struct | ParsedUrl |
| class | TaggedInteger |
| A type-safe wrap around standard integral types. More... | |
| class | TaggedCache |
| Map/cache combination. More... | |
| class | UptimeClock |
| Tracks program uptime to seconds precision. More... | |
| class | Section |
| Holds a collection of configuration values. More... | |
| class | BasicConfig |
| Holds unparsed configuration information. More... | |
| struct | Sections |
| struct | Keys |
| class | CensorshipDetector |
| class | Consensus |
| Generic implementation of consensus algorithm. More... | |
| struct | ConsensusParms |
| Consensus algorithm parameters. More... | |
| class | ConsensusProposal |
| Represents a proposed position taken during a round of consensus. More... | |
| class | ConsensusTimer |
| Measures the duration of phases of consensus. More... | |
| struct | ConsensusCloseTimes |
| Stores the set of initial close times. More... | |
| struct | ConsensusResult |
| Encapsulates the result of consensus. More... | |
| class | DisputedTx |
| A transaction discovered to be in dispute during consensus. More... | |
| class | SpanTip |
| The tip of a span of ledger ancestry. More... | |
| class | LedgerTrie |
| Ancestry trie of ledgers. More... | |
| struct | ValidationParms |
| Timing parameters to control validation staleness and expiration. More... | |
| class | SeqEnforcer |
| Enforce validation increasing sequence requirement. More... | |
| class | Validations |
| Maintains current and recent ledger validations. More... | |
| 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 | BasicSemaphore |
| class | Workers |
| Workers is effectively a thread pool. More... | |
| class | HashRouter |
| Routing table for objects identified by hash. More... | |
| class | Job |
| struct | CoroCreateT |
| 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 |
| class | LoadEvent |
| class | LoadMonitor |
| class | NetworkIDService |
| Service that provides access to the network ID. More... | |
| struct | PeerReservation |
| struct | KeyEqual |
| class | PeerReservationTable |
| class | ServiceRegistry |
| Service registry for dependency injection. More... | |
| class | CsprngEngine |
| A cryptographically secure random number engine. More... | |
| class | RFC1751 |
| class | JsonPropertyStream |
| A PropertyStream::Sink which produces a json::Value of type ValueType::Object. More... | |
| class | AcceptedLedgerTx |
| A transaction that is in a closed ledger. More... | |
| class | AmendmentTable |
| The amendment table stores the list of enabled and potential amendments. More... | |
| class | ApplyView |
| Writeable view to a ledger, for applying a transaction. More... | |
| struct | ApplyViewContext |
| Bundles the mutable ledger view and the transaction being applied. More... | |
| class | ApplyViewImpl |
| Editable, discardable view that can build metadata for one tx. More... | |
| class | BookDirs |
| class | CachedView |
| Wraps a DigestAwareReadView to provide caching. More... | |
| class | CanonicalTXSet |
| Holds transactions which were deferred to the next pass of consensus. More... | |
| class | Dir |
| A class that simplifies iterating ledger directory pages. More... | |
| struct | Adjustment |
| struct | LoanPaymentParts |
| struct | LoanState |
| This structure captures the parts of a loan state. More... | |
| struct | LoanProperties |
| struct | AccountingDeltas |
| struct | CreateGenesisT |
| class | Ledger |
| Holds a ledger. More... | |
| struct | OpenLedgerT |
| Open ledger construction tag. More... | |
| struct | BatchViewT |
| Batch view construction tag. More... | |
| class | OpenView |
| Writable ledger view that accumulates state and tx changes. More... | |
| class | OrderBookDB |
| Tracks order books in the ledger. More... | |
| struct | OwnerCounts |
| class | PaymentSandbox |
| A wrapper which makes credits unavailable to balances. More... | |
| class | PendingSaves |
| Keeps track of which ledgers haven't been fully saved. More... | |
| class | RawView |
| Interface for ledger entry changes. More... | |
| class | TxsRawView |
| Interface for changing ledger entries with transactions. More... | |
| class | ReadView |
| A view into a ledger. More... | |
| class | DigestAwareReadView |
| ReadView that associates keys with digests. More... | |
| class | Sandbox |
| Discardable, editable view to a ledger. More... | |
| class | HTTPClient |
| Provides an asynchronous HTTP client implementation with optional SSL. More... | |
| class | HTTPClientSSLContext |
| class | NodeObject |
| A simple object that the Ledger uses to store entries. More... | |
| struct | AmountType |
| struct | BadAsset |
| class | Asset |
| class | Book |
| Specifies an order book. More... | |
| struct | ConfidentialRecipient |
| Bundles an ElGamal public key with its associated encrypted amount. More... | |
| struct | EcPair |
| Holds two secp256k1 public key components representing an ElGamal ciphertext (C1, C2). More... | |
| struct | OpensslRipemd160Hasher |
| Message digest functions used in the codebase. More... | |
| struct | OpensslSha512Hasher |
| SHA-512 digest. More... | |
| struct | OpensslSha256Hasher |
| SHA-256 digest. More... | |
| struct | RipeshaHasher |
| Returns the RIPEMD-160 digest of the SHA256 hash of the message. More... | |
| class | FeatureBitset |
| struct | Fees |
| Reflects the fee settings for a particular ledger. More... | |
| struct | KeyletDesc |
| class | InnerObjectFormats |
| Manages the list of known inner object formats. More... | |
| class | IOUAmount |
| Floating point representation of amounts with high dynamic range. More... | |
| class | Issue |
| A currency issued by an account. More... | |
| struct | Keylet |
| A pair of SHAMap key and LedgerEntryType. More... | |
| class | KnownFormats |
| Manages a list of known formats. More... | |
| class | LedgerFormats |
| Holds the list of known ledger entry formats. More... | |
| struct | LedgerHeader |
| Information about the notional ledger backing the view. More... | |
| class | MPTAmount |
| class | MPTIssue |
| class | PathAsset |
| class | Permission |
| class | PublicKey |
| A public key. More... | |
| struct | STExchange< STBlob, PublicKey > |
| struct | TAmounts |
| Represents a pair of input and output currencies. More... | |
| class | Quality |
| Represents the logical ratio of output currency to input currency. More... | |
| 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 | Rules |
| Rules controlling protocol behavior. More... | |
| class | CurrentTransactionRulesGuard |
| RAII class to set and restore the current transaction rules. More... | |
| class | SecretKey |
| A secret key. More... | |
| class | Seed |
| Seeds are used to generate deterministic secret keys. More... | |
| class | SeqProxy |
| A type that represents either a sequence value or a ticket value. More... | |
| class | Serializer |
| class | SerialIter |
| class | STBitString |
| class | STInteger |
| class | SField |
| Identifies fields. More... | |
| struct | TypedField |
| A field with a type known at compile time. More... | |
| struct | OptionaledField |
| Indicate std::optional field semantics. More... | |
| class | SOElement |
| An element in a SOTemplate. More... | |
| class | SOTemplate |
| Defines the fields and their attributes within a STObject. More... | |
| class | STAccount |
| class | STAmount |
| class | STArray |
| struct | JsonOptions |
| Note, should be treated as flags that can be | and &. More... | |
| class | STBase |
| A type which can be exported to a well known binary format. More... | |
| class | STBlob |
| class | STCurrency |
| struct | STExchange |
| Convert between serialized type U and C++ type T. More... | |
| struct | STExchange< STInteger< U >, T > |
| struct | STExchange< STBlob, Slice > |
| struct | STExchange< STBlob, Buffer > |
| class | STIssue |
| class | STLedgerEntry |
| class | STNumber |
| A serializable number. More... | |
| struct | NumberParts |
| class | STObject |
| class | STParsedJSONObject |
| Holds the serialized result of parsing an input JSON object. More... | |
| class | STPathElement |
| class | STPath |
| class | STPathSet |
| class | STTakesAsset |
| Intermediate class for any STBase-derived class to store an Asset. More... | |
| class | STTx |
| class | STValidation |
| class | STVector256 |
| class | STXChainBridge |
| class | TERSubset |
| class | CanCvtToNotTEC |
| class | CanCvtToNotTEC< TELcodes > |
| class | CanCvtToNotTEC< TEMcodes > |
| class | CanCvtToNotTEC< TEFcodes > |
| class | CanCvtToNotTEC< TERcodes > |
| class | CanCvtToNotTEC< TEScodes > |
| class | CanCvtToTER |
| class | CanCvtToTER< TELcodes > |
| class | CanCvtToTER< TEMcodes > |
| class | CanCvtToTER< TEFcodes > |
| class | CanCvtToTER< TERcodes > |
| class | CanCvtToTER< TEScodes > |
| class | CanCvtToTER< TECcodes > |
| class | CanCvtToTER< NotTEC > |
| class | TxFormats |
| Manages the list of known transaction formats. More... | |
| class | TxMeta |
| struct | XChainClaimAttestation |
| struct | XChainCreateAccountAttestation |
| class | XChainAttestationsBase |
| class | XChainClaimAttestations |
| class | XChainCreateAccountAttestations |
| class | XRPAmount |
| class | LockedSociSession |
| class | DatabaseCon |
| struct | LedgerHashPair |
| struct | LedgerRange |
| struct | DelegateFilter |
| class | RelationalDatabase |
| class | DBConfig |
| DBConfig is used when a client wants to delay opening a soci::session after parsing the config parameters. More... | |
| class | Checkpointer |
| class | BaseHTTPPeer |
| Represents an active connection. More... | |
| class | BasePeer |
| class | BaseWSPeer |
| Represents an active WebSocket connection. More... | |
| class | Door |
| A listening socket. More... | |
| class | IOList |
| Manages a set of objects performing asynchronous I/O. More... | |
| class | PlainHTTPPeer |
| class | PlainWSPeer |
| class | Server |
| A multi-protocol server. More... | |
| class | ServerImpl |
| class | SSLHTTPPeer |
| class | SSLWSPeer |
| struct | Handoff |
| Used to indicate the result of a server connection handoff. More... | |
| class | InfoSubRequest |
| class | InfoSub |
| Manages a client's subscription to data feeds. More... | |
| class | LoadFeeTrack |
| Manages the current fee schedule. More... | |
| struct | Manifest |
| struct | ValidatorToken |
| class | ManifestCache |
| Remembers manifests with the highest sequence number. More... | |
| class | NetworkOPs |
| Provides server functionality for clients. More... | |
| struct | Port |
| Configuration information for a Server listening port. More... | |
| struct | ParsedPort |
| class | Session |
| Persistent state information for a connection session. More... | |
| class | SimpleWriter |
| Deprecated: Writer that serializes a HTTP/1 message. More... | |
| struct | SavedState |
| class | Writer |
| class | WSMsg |
| class | StreambufWSMsg |
| struct | WSSession |
| class | TaggedPointer |
| TaggedPointer is a combination of a pointer and a mask stored in the lowest two bits. More... | |
| class | Family |
| struct | SHAMapNodeData |
| A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree. More... | |
| class | SHAMap |
| class | SHAMapAccountStateLeafNode |
| A leaf node for a state object. More... | |
| class | SHAMapAddNode |
| class | SHAMapInnerNode |
| class | SHAMapItem |
| class | SHAMapLeafNode |
| class | SHAMapMissingNode |
| class | SHAMapNodeID |
| Identifies a node inside a SHAMap. More... | |
| 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 | ApplyContext |
| State information when applying a tx. More... | |
| struct | ApplyResult |
| class | TxConsequences |
| Class describing the consequences to the account of applying a transaction if the transaction consumes the maximum XRP allowed. More... | |
| struct | PreflightResult |
| Describes the results of the preflight check. More... | |
| struct | PreclaimResult |
| Describes the results of the preclaim check. More... | |
| class | ValidAMM |
| class | ValidBookDirectory |
| class | TransfersNotFrozen |
| Invariant: frozen trust line balance change is not allowed. More... | |
| class | InvariantChecker_PROTOTYPE |
| Prototype for invariant check implementations. More... | |
| 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 | XRPNotCreated |
| Invariant: A transaction must not create XRP and should only destroy the XRP fee. More... | |
| class | AccountRootsNotDeleted |
| Invariant: we cannot remove an account ledger entry. More... | |
| class | AccountRootsDeletedClean |
| Invariant: a deleted account must not have any objects left. More... | |
| class | XRPBalanceChecks |
| Invariant: An account XRP balance must be in XRP and take a value between 0 and kInitialXRP drops, inclusive. More... | |
| class | LedgerEntryTypesMatch |
| Invariant: corresponding modified ledger entries should match in type and added entries should be a valid type. More... | |
| class | NoXRPTrustLines |
| Invariant: Trust lines using XRP are not allowed. More... | |
| class | NoDeepFreezeTrustLinesWithoutFreeze |
| Invariant: Trust lines with deep freeze flag are not allowed if normal freeze flag is not set. More... | |
| class | NoBadOffers |
| Invariant: offers should be for non-negative amounts and must not be XRP to XRP. More... | |
| class | NoZeroEscrow |
| Invariant: an escrow entry must take a value between 0 and kInitialXRP drops exclusive. More... | |
| 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 | ValidClawback |
| Invariant: Token holder's trustline/MPT balance cannot be invalid after Clawback. More... | |
| class | ValidPseudoAccounts |
| Invariants: Pseudo-accounts have valid and consistent properties. More... | |
| class | NoModifiedUnmodifiableFields |
| Invariants: Some fields are unmodifiable. More... | |
| class | ValidAmounts |
| Verify that MPT/XRP STAmounts are canonical in any ledger entries left after the transaction applies. More... | |
| class | ObjectHasPseudoAccount |
| class | ValidLoanBroker |
| Invariants: Loan brokers are internally consistent. More... | |
| class | ValidLoan |
| Invariants: Loans are internally consistent. More... | |
| class | ValidMPTIssuance |
| class | ValidMPTBalanceChanges |
| Verify public MPT amount and outstanding amount accounting. More... | |
| class | ValidConfidentialMPToken |
| Invariants: Confidential MPToken consistency. More... | |
| class | ValidMPTTransfer |
| class | ValidNFTokenPage |
| Invariant: Validates several invariants for NFToken pages. More... | |
| class | NFTokenCountTracking |
| Invariant: Validates counts of NFTokens after all transaction types. More... | |
| class | ValidPermissionedDEX |
| class | ValidPermissionedDomain |
| Invariants: Permissioned Domains must have some rules and AcceptedCredentials must have length between 1 and 10 inclusive. More... | |
| class | SponsorshipOwnerCountsMatch |
| Invariant: Sponsored owner counts are balanced. More... | |
| class | SponsorshipAccountCountMatchesField |
| Invariant: Sponsoring account relationships tracked consistently. More... | |
| class | ValidVault |
| Invariants: Vault object and MPTokenIssuance for vault shares. More... | |
| class | AMMOffer |
| Represents synthetic AMM offer in BookStep. More... | |
| class | AMMLiquidity |
| AMMLiquidity class provides AMM offers to BookStep class. More... | |
| class | BookTip |
| Iterates and consumes raw offers in an order book. More... | |
| struct | EitherAmount |
| class | Step |
| A step in a payment path. More... | |
| 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 | TOffer |
| class | TOfferStreamBase |
| class | FlowOfferStream |
| Presents and consumes the offers in an order book. More... | |
| class | SignerEntries |
| struct | PreflightContext |
| State information when preflighting a tx. More... | |
| struct | PreclaimContext |
| State information when determining if a tx is likely to claim a fee. More... | |
| struct | FeePayer |
| class | Transactor |
| class | AccountDelete |
| class | AccountSet |
| class | SetRegularKey |
| class | SignerListSet |
| See the README.md for an overview of the SignerListSet transaction that this class implements. More... | |
| class | XChainCreateBridge |
| class | BridgeModify |
| class | XChainClaim |
| class | XChainCommit |
| class | XChainCreateClaimID |
| class | XChainAddClaimAttestation |
| class | XChainAddAccountCreateAttestation |
| class | XChainCreateAccountCommit |
| class | CheckCancel |
| class | CheckCash |
| class | CheckCreate |
| class | CredentialAccept |
| class | CredentialCreate |
| class | CredentialDelete |
| class | DelegateSet |
| 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 | AMMVote |
| AMMVote implements AMM vote Transactor. More... | |
| class | AMMWithdraw |
| class | OfferCancel |
| class | OfferCreate |
| Transactor specialized for creating offers in the ledger. More... | |
| class | DIDDelete |
| class | DIDSet |
| class | EscrowCancel |
| class | EscrowCreate |
| class | EscrowFinish |
| class | LoanBrokerCoverClawback |
| class | LoanBrokerCoverDeposit |
| class | LoanBrokerCoverWithdraw |
| class | LoanBrokerDelete |
| class | LoanBrokerSet |
| class | LoanDelete |
| class | LoanManage |
| class | LoanPay |
| class | LoanSet |
| class | NFTokenAcceptOffer |
| class | NFTokenBurn |
| class | NFTokenCancelOffer |
| class | NFTokenCreateOffer |
| class | NFTokenMint |
| class | NFTokenModify |
| class | OracleDelete |
| 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 | OracleSet |
| 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 | Payment |
| class | PaymentChannelClaim |
| class | PaymentChannelCreate |
| class | PaymentChannelFund |
| class | PermissionedDomainDelete |
| class | PermissionedDomainSet |
| class | SponsorshipSet |
| class | SponsorshipTransfer |
| class | Batch |
| class | Change |
| class | LedgerStateFix |
| class | TicketCreate |
| class | Clawback |
| class | ConfidentialMPTClawback |
| Allows an MPT issuer to clawback confidential balances from a holder. More... | |
| class | ConfidentialMPTConvert |
| Converts public (plaintext) MPT balance to confidential (encrypted) balance. More... | |
| class | ConfidentialMPTConvertBack |
| Converts confidential (encrypted) MPT balance back to public (plaintext) balance. More... | |
| class | ConfidentialMPTMergeInbox |
| Merges the confidential inbox balance into the spending balance. More... | |
| class | ConfidentialMPTSend |
| Transfers confidential MPT tokens between holders privately. More... | |
| struct | MPTAuthorizeArgs |
| class | MPTokenAuthorize |
| struct | MPTCreateArgs |
| class | MPTokenIssuanceCreate |
| class | MPTokenIssuanceDestroy |
| class | MPTokenIssuanceSet |
| class | TrustSet |
| class | VaultClawback |
| class | VaultCreate |
| class | VaultDelete |
| class | VaultDeposit |
| class | VaultSet |
| class | VaultWithdraw |
| class | DebugSink |
| class | AsyncObject |
| Mix-in to track when all pending I/O is complete. More... | |
| class | ResolverAsioImpl |
| class | HTTPClientImp |
| class | CheckpointersCollection |
| class | BookStep |
| class | BookPaymentStep |
| class | BookOfferCrossingStep |
| class | DirectStepI |
| class | DirectIPaymentStep |
| class | DirectIOfferCrossingStep |
| class | MPTEndpointStep |
| class | MPTEndpointPaymentStep |
| class | MPTEndpointOfferCrossingStep |
| class | XRPEndpointStep |
| class | XRPEndpointPaymentStep |
| class | XRPEndpointOfferCrossingStep |
| class | AccountSet_test |
| class | AccountTxPaging_test |
| class | AmendmentTable_test |
| class | Check_test |
| class | CheckMPT_test |
| class | Clawback_test |
| class | ClawbackMPT_test |
| class | ConfidentialTransfer_test |
| class | ConfidentialTransferExtended_test |
| class | Discrepancy_test |
| class | FixNFTokenPageLinks_test |
| class | Freeze_test |
| class | LedgerLoad_test |
| class | LoadFeeTrack_test |
| class | NFTokenBaseUtil_test |
| class | NFTokenDisallowIncoming_test |
| class | NFTokenWOMintOffer_test |
| class | NFTokenWOModify_test |
| class | NfTokenWoExpiredOfferRemovalTest |
| class | NFTokenAllFeatures_test |
| class | NFTokenAuth_test |
| class | NFTokenBurn_test |
| class | NFTokenDir_test |
| class | OfferStream_test |
| class | SetRegularKey_test |
| class | Ticket_test |
| class | TrustAndBalance_test |
| class | Apply_test |
| class | Vault_test |
| class | PerfLog_test |
| class | Config_test |
| class | SociDB_test |
| class | Workers_test |
| class | ConfidentialTransferTestBase |
| class | TestSuite |
| class | ProtocolVersion_test |
| class | short_read_test |
| class | BuildInfo_test |
| class | InnerObjectFormatsParsedJSON_test |
| class | Issue_test |
| class | Memo_test |
| class | PublicKey_test |
| class | Quality_test |
| class | SecretKey_test |
| class | Seed_test |
| struct | SeqProxy_test |
| struct | STAccount_test |
| class | STAmount_test |
| struct | STInteger_test |
| struct | STNumber_test |
| class | STObject_test |
| class | STParsedJSON_test |
| class | STTx_test |
| class | InnerObjectFormatsSerializer_test |
| class | STValidation_test |
| struct | TER_test |
| class | AccountCurrencies_test |
| class | AmendmentBlocked_test |
| class | Connect_test |
| class | Feature_test |
| class | GetCounts_test |
| class | LedgerClosed_test |
| class | LedgerData_test |
| class | LedgerHeader_test |
| class | NoRippleCheck_test |
| class | NoRippleCheckLimits_test |
| class | OwnerInfo_test |
| class | Peers_test |
| class | Transaction_test |
| class | TransactionEntry_test |
| class | TransactionHistory_test |
| class | Version_test |
| class | UnsignedInteger |
| class | HardenedHashTest |
| class | KeyCacheTest |
| class | StringUtilitiesTest |
| class | TestSink |
| 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 | RCLValidation |
| Wrapper over STValidation for generic Validation code. More... | |
| class | RCLValidatedLedger |
| Wraps a ledger instance for use in generic Validations LedgerTrie. More... | |
| class | RCLValidationsAdaptor |
| Generic validations adaptor class for RCL. More... | |
| 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 | AccountStateSF |
| class | ConsensusTransSetSF |
| class | InboundLedgersImp |
| class | InboundTransactionSet |
| class | InboundTransactionsImp |
| class | LedgerCleanerImp |
| class | LedgerDeltaAcquire |
| Manage the retrieval of a ledger delta (header and transactions) from the network. More... | |
| class | LedgerReplayMsgHandler |
| class | LocalTx |
| class | LocalTxsImp |
| class | SkipListAcquire |
| Manage the retrieval of a skip list in a ledger from the network. More... | |
| class | TimeoutCounter |
| This class is an "active" object. More... | |
| class | TransactionAcquire |
| class | InboundLedger |
| class | InboundLedgers |
| Manages the lifetime of inbound ledgers. More... | |
| class | InboundTransactions |
| Manages the acquisition and lifetime of transaction sets. More... | |
| class | LedgerCleaner |
| Check the ledger/transaction databases to make sure they have continuity. More... | |
| class | LedgerHistory |
| Retains historical ledgers. More... | |
| class | LedgerHolder |
| Hold a ledger in a thread-safe way. More... | |
| class | LedgerMaster |
| class | LedgerReplay |
| class | LedgerReplayer |
| Manages the lifetime of ledger replay tasks. More... | |
| class | LedgerReplayTask |
| struct | LedgerFill |
| class | LocalTxs |
| class | OpenLedger |
| Represents the open ledger. More... | |
| struct | OrderBookDBConfig |
| Configuration for OrderBookDB. More... | |
| class | OrderBookDBImpl |
| class | TransactionMaster |
| class | TransactionStateSF |
| class | ApplicationImp |
| class | Application |
| class | CollectorManagerImp |
| class | CollectorManager |
| Provides the beast::insight::Collector service. More... | |
| class | Processor |
| class | GRPCServerImpl |
| class | GRPCServer |
| class | LoadManager |
| Manages load sources. More... | |
| class | NodeStoreScheduler |
| A node_store::Scheduler which uses the JobQueue. More... | |
| class | TrustedVotes |
| TrustedVotes records the most recent votes from trusted validators. More... | |
| struct | AmendmentState |
| Current state of an amendment. More... | |
| class | AmendmentSet |
| The status of all amendments requested in a given window. More... | |
| class | AmendmentTableImpl |
| Track the list of "amendments". More... | |
| class | FeeVote |
| Manager to process fee votes. More... | |
| class | FeeVoteImpl |
| class | NegativeUNLVote |
| Manager to create NegativeUNL votes. More... | |
| class | NetworkOPsImp |
| Concrete NetworkOPs: server sequencer, network tracker, and owner of all client subscription state (accounts, books, streams). More... | |
| class | SHAMapStore |
| class to create database, launch online delete thread, and related SQLite database More... | |
| class | SHAMapStoreImp |
| class | Transaction |
| class | TxQ |
| Transaction Queue. More... | |
| class | ValidatorKeys |
| Validator keys and manifest as set in configuration file. More... | |
| struct | TrustChanges |
| Changes in trusted nodes after updating validator list. More... | |
| struct | ValidatorBlobInfo |
| Used to represent the information stored in the blobs_v2 Json array. More... | |
| class | ValidatorList |
| class | ValidatorSite |
| class | SQLiteDatabase |
| struct | FeeSetup |
| Fee schedule for startup / standalone, and to vote for. More... | |
| class | Config |
| class | NetworkIDServiceImpl |
| Implementation of NetworkIDService that reads from Config. More... | |
| class | TimeKeeper |
| Manages various times used by the server. More... | |
| class | Cluster |
| class | ClusterNode |
| class | ConnectAttempt |
| Manages an outbound connection attempt. More... | |
| class | OverlayImpl |
| class | PeerImp |
| class | PeerSetImpl |
| class | PeerSetBuilderImpl |
| class | DummyPeerSet |
| class | TrafficCount |
| TrafficCount is used to count ingress and egress wire bytes and number of messages. More... | |
| class | ZeroCopyInputStream |
| Implements ZeroCopyInputStream around a buffer sequence. More... | |
| class | ZeroCopyOutputStream |
| Implements ZeroCopyOutputStream around a Streambuf. More... | |
| class | Message |
| class | Overlay |
| Manages the set of connected peers. More... | |
| class | Peer |
| Represents a peer connection in the overlay. More... | |
| class | PeerSet |
| Supports data retrieval by managing a set of peers. More... | |
| class | PeerSetBuilder |
| struct | SendAlways |
| Sends a message to all peers. More... | |
| struct | SendIfPred |
| Sends a message to match peers. More... | |
| struct | SendIfNotPred |
| Sends a message to non-matching peers. More... | |
| struct | MatchPeer |
| Select the specific peer. More... | |
| struct | PeerInCluster |
| Select all peers (except optional excluded) that are in our cluster. More... | |
| struct | PeerInSet |
| Select all peers that are in the specified set. More... | |
| class | AssetCache |
| class | PathFindMPT |
| class | Pathfinder |
| Calculates payment paths. More... | |
| class | PathRequest |
| class | PathRequestManager |
| class | RPCParser |
| struct | RPCCallImp |
| class | RPCSubImp |
| class | TrustLineBase |
| Wraps a trust line SLE for convenience. More... | |
| class | PathFindTrustLine |
| class | RPCTrustLine |
| class | WSInfoSub |
| struct | LedgerEntry |
| struct | TxResult |
| struct | TxArgs |
| struct | JsonBody |
| Body that holds JSON. More... | |
| class | RPCSub |
| Subscription object for JSON RPC. More... | |
| class | ServerHandler |
| class | NodeFamily |
Concepts | |
| concept | CAdoptTag |
| concept | Integral64 |
| concept | SafeToCast |
| concept | StepAmount |
| concept | ValidIssueType |
| concept | AssetType |
| concept | ValidPathAsset |
| concept | ValidTaker |
| concept | IsArithmeticNumber |
| concept | IsArithmeticValueUnit |
| concept | IsArithmeticST |
| concept | IsArithmetic |
| concept | Addable |
| concept | IsArithmeticCompatible |
| concept | UnsignedMantissa |
Typedefs | |
| using | uint128 = BaseUInt<128> |
| using | uint160 = BaseUInt<160> |
| using | uint256 = BaseUInt<256> |
| using | uint192 = BaseUInt<192> |
| using | Blob = std::vector<unsigned char> |
| Storage for linear binary data. | |
| using | days |
| using | weeks = std::chrono::duration<int, std::ratio_multiply<days::period, std::ratio<7>>> |
| using | Stopwatch = beast::AbstractClock<std::chrono::steady_clock> |
| A clock for measuring elapsed time. | |
| using | TestStopwatch = beast::ManualClock<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 = HardenedHash<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 = HardenedHash<strong_hash>, class Pred = std::equal_to<Key>, class Allocator = std::allocator<std::pair<Key const, Value>>> | |
| using | hardened_partitioned_hash_map = PartitionedUnorderedMap<Key, Value, Hash, Pred, Allocator> |
| template<class Key, class Value, class Hash = HardenedHash<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 = HardenedHash<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 = HardenedHash<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 | IniFileSections = std::unordered_map<std::string, std::vector<std::string>> |
| using | semaphore = BasicSemaphore<std::mutex, std::condition_variable> |
| using | JobCounter = ClosureCounter<void> |
| using | SLE = STLedgerEntry |
| using | CachedSLEs = TaggedCache<uint256, SLE const> |
| using | RCLValidations = Validations<RCLValidationsAdaptor> |
| Alias for RCL-specific instantiation of generic Validations. | |
| using | NodeCache = TaggedCache<SHAMapHash, Blob> |
| using | MultiplePaymentDestinations = std::vector<std::pair<AccountID, Number>> |
| using | CachedLedger = CachedView<Ledger> |
| A ledger wrapped in a CachedView. | |
| using | majorityAmendments_t = std::map<uint256, NetClock::time_point> |
| using | EntryDeleter |
| Deleter function prototype. | |
| using | AccountID = BaseUInt<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 = OpensslRipemd160Hasher |
| using | sha256_hasher = OpensslSha256Hasher |
| using | sha512_hasher = OpensslSha512Hasher |
| using | sha512_half_hasher = detail::BasicSha512HalfHasher<false> |
| using | sha512_half_hasher_s = detail::BasicSha512HalfHasher<true> |
| using | LedgerFlagMap = std::map<std::string, std::uint32_t> |
| using | MultiApiJson |
| using | LedgerIndex = std::uint32_t |
| A ledger index. | |
| using | TxID = uint256 |
| A transaction identifier. | |
| using | Amounts = TAmounts<STAmount, STAmount> |
| 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 | TERUnderlyingType = int |
| using | NotTEC = TERSubset<CanCvtToNotTEC> |
| using | TER = TERSubset<CanCvtToTER> |
| template<class T> | |
| using | B58Result = std::expected<T, std::error_code> |
| using | FlagValue = std::uint32_t |
| Transaction flags. | |
| using | FlagMap = std::map<std::string, FlagValue> |
| using | FlagMapPairList = std::vector<std::pair<std::string, FlagMap>> |
| using | Directory = BaseUInt<256, detail::DirectoryTag> |
| Directory is an index into the directory of offer books. | |
| using | Currency = BaseUInt<160, detail::CurrencyTag> |
| Currency is a hash representing a specific currency. | |
| using | NodeID = BaseUInt<160, detail::NodeIDTag> |
| NodeID is a 160-bit hash representing one node. | |
| using | MPTID = BaseUInt<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 = BaseUInt<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 | SHAMapTreeNodePtr = intr_ptr::SharedPtr<SHAMapTreeNode> |
| using | TreeNodeCache |
| using | InvariantChecks |
| using | XChainModifyBridge = BridgeModify |
| using | XChainAccountCreateCommit = XChainCreateAccountCommit |
| using | EnableAmendment = Change |
| using | SetFee = Change |
| using | UNLModify = Change |
| using | const_iterator = Dir::ConstIterator |
| using | sha256_t = UnsignedInteger<256, std::size_t> |
| using | BigInt = boost::multiprecision::cpp_int |
| using | Dec = boost::multiprecision::cpp_dec_float_50 |
| using | UInt8Value = std::decay_t<typename SF_UINT8::type::value_type> |
| using | UInt16Value = std::decay_t<typename SF_UINT16::type::value_type> |
| using | UInt32Value = std::decay_t<typename SF_UINT32::type::value_type> |
| using | UInt64Value = std::decay_t<typename SF_UINT64::type::value_type> |
| using | UInt128Value = std::decay_t<typename SF_UINT128::type::value_type> |
| using | UInt160Value = std::decay_t<typename SF_UINT160::type::value_type> |
| using | UInt192Value = std::decay_t<typename SF_UINT192::type::value_type> |
| using | UInt256Value = std::decay_t<typename SF_UINT256::type::value_type> |
| using | Int32Value = std::decay_t<typename SF_INT32::type::value_type> |
| using | NumberValue = std::decay_t<typename SF_NUMBER::type::value_type> |
| using | AmountValue = std::decay_t<typename SF_AMOUNT::type::value_type> |
| using | AccountValue = std::decay_t<typename SF_ACCOUNT::type::value_type> |
| using | CurrencyValue = std::decay_t<typename SF_CURRENCY::type::value_type> |
| using | IssueValue = std::decay_t<typename SF_ISSUE::type::value_type> |
| using | Vector256Value = std::decay_t<typename SF_VECTOR256::type::value_type> |
| using | BlobValue = std::decay_t<typename SF_VL::type::value_type> |
| using | XChainBridgeValue = std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> |
| using | OrderedTxs = CanonicalTXSet |
| 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 | LedgerSpecifier = RelationalDatabase::LedgerSpecifier |
| using | FunctionType |
| using | Prices = bimap<multiset_of<std::uint32_t, std::greater<>>, multiset_of<STAmount>> |
Functions | |
| template<class InputIter1, class InputIter2, class Action, class Comp> | |
| void | generalizedSetIntersection (InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2, Action action, Comp comp) |
| template<class FwdIter1, class InputIter2, class Pred, class Comp> | |
| FwdIter1 | removeIfIntersectOrMatch (FwdIter1 first1, FwdIter1 last1, InputIter2 first2, InputIter2 last2, Pred pred, Comp comp) |
| void | extractTarLz4 (std::filesystem::path const &src, std::filesystem::path const &dst) |
| Extract a tar archive compressed with lz4. | |
| std::string | base64Encode (std::uint8_t const *data, std::size_t len) |
| std::string | base64Encode (std::string_view s) |
| std::string | base64Decode (std::string_view data) |
| template<std::size_t Bits, class Tag> | |
| constexpr std::strong_ordering | operator<=> (BaseUInt< Bits, Tag > const &lhs, BaseUInt< Bits, Tag > const &rhs) |
| template<std::size_t Bits, typename Tag> | |
| constexpr bool | operator== (BaseUInt< Bits, Tag > const &lhs, BaseUInt< Bits, Tag > const &rhs) |
| template<std::size_t Bits, class Tag> | |
| constexpr bool | operator== (BaseUInt< Bits, Tag > const &a, std::uint64_t b) |
| template<std::size_t Bits, class Tag> | |
| constexpr BaseUInt< Bits, Tag > | operator^ (BaseUInt< Bits, Tag > const &a, BaseUInt< Bits, Tag > const &b) |
| template<std::size_t Bits, class Tag> | |
| constexpr BaseUInt< Bits, Tag > | operator& (BaseUInt< Bits, Tag > const &a, BaseUInt< Bits, Tag > const &b) |
| template<std::size_t Bits, class Tag> | |
| constexpr BaseUInt< Bits, Tag > | operator| (BaseUInt< Bits, Tag > const &a, BaseUInt< Bits, Tag > const &b) |
| template<std::size_t Bits, class Tag> | |
| constexpr BaseUInt< Bits, Tag > | operator+ (BaseUInt< Bits, Tag > const &a, BaseUInt< Bits, Tag > const &b) |
| template<std::size_t Bits, class Tag> | |
| std::string | to_string (BaseUInt< Bits, Tag > const &a) |
| template<std::size_t Bits, class Tag> | |
| std::string | toShortString (BaseUInt< Bits, Tag > const &a) |
| template<std::size_t Bits, class Tag> | |
| std::ostream & | operator<< (std::ostream &out, BaseUInt< Bits, Tag > const &u) |
| template<> | |
| std::size_t | extract (uint256 const &key) |
| 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 | toStringIso (date::sys_time< Duration > tp) |
| std::string | toStringIso (NetClock::time_point tp) |
| Stopwatch & | stopwatch () |
| Returns an instance of a wall clock. | |
| void | logThrow (std::string const &title) |
| Generates and logs a call stack. | |
| XRPL_NO_SANITIZE_ADDRESS void | rethrow () |
| Rethrow the exception currently being handled. | |
| template<class E, class... Args> | |
| XRPL_NO_SANITIZE_ADDRESS void | Throw (Args &&... args) |
| void | logicError (std::string const &how) noexcept |
| Called when faulty logic causes a broken invariant. | |
| std::string | getFileContents (std::error_code &ec, std::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt) |
| void | writeFileContents (std::error_code &ec, std::filesystem::path const &destPath, std::string const &contents) |
| std::filesystem::path | uniqueRandomPath (std::filesystem::path const &base, std::string const &prefix="", std::size_t maxAttempts=100) |
Generate a unique, non-existing path under base whose filename starts with prefix and ends with a random hex suffix. | |
| template<class TT, class... Args> | |
| SharedIntrusive< TT > | makeSharedIntrusive (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_view delimiter) |
| std::unique_ptr< beast::Journal::Sink > | setDebugLogSink (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 > | makeSslContext (std::string const &cipherList) |
| Create a self-signed SSL context that allows anonymous Diffie Hellman. | |
| std::shared_ptr< boost::asio::ssl::context > | makeSslContextAuthed (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. | |
| MallocTrimReport | mallocTrim (std::string_view tag, beast::Journal journal) |
| Attempt to return freed memory to the operating system. | |
| 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_t > | mulDiv (std::uint64_t value, std::uint64_t mul, std::uint64_t div) |
| Return value*mul/div accurately. | |
| std::string | to_string (Number const &amount) |
| template<typename T> | |
| constexpr std::optional< int > | logTen (T value) |
| template<typename T> | |
| constexpr bool | isPowerOfTen (T value) |
| 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 |
| std::string | to_string (MantissaRange::MantissaScale const &scale) |
| std::string | to_string (Number::RoundingMode const &round) |
| template<typename Key> | |
| static std::size_t | extract (Key const &key) |
| template<> | |
| std::size_t | extract (std::string const &key) |
| beast::xor_shift_engine & | defaultPrng () |
| 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 | fromString (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> requires (std::is_integral_v<Dest> && std::is_integral_v<Src>) | |
| constexpr Dest | safeCast (Src s) noexcept |
| template<class Dest, class Src> requires (std::is_enum_v<Dest> && std::is_integral_v<Src>) | |
| constexpr Dest | safeCast (Src s) noexcept |
| template<class Dest, class Src> requires (std::is_integral_v<Dest> && std::is_enum_v<Src>) | |
| constexpr Dest | safeCast (Src s) noexcept |
| template<class Dest, class Src> requires (std::is_integral_v<Dest> && std::is_integral_v<Src>) | |
| constexpr Dest | unsafeCast (Src s) noexcept |
| template<class Dest, class Src> requires (std::is_enum_v<Dest> && std::is_integral_v<Src>) | |
| constexpr Dest | unsafeCast (Src s) noexcept |
| template<class Dest, class Src> requires (std::is_integral_v<Dest> && std::is_enum_v<Src>) | |
| constexpr Dest | unsafeCast (Src s) noexcept |
| template<class Dest, class Src> | |
| Dest | safeDowncast (Src *s) noexcept |
| template<class Dest, class Src> | |
| Dest | safeDowncast (Src &s) noexcept |
| template<class EF> | |
| ScopeExit (EF) -> ScopeExit< EF > | |
| template<class EF> | |
| ScopeFail (EF) -> ScopeFail< EF > | |
| template<class EF> | |
| ScopeSuccess (EF) -> ScopeSuccess< EF > | |
| template<class Mutex> | |
| ScopeUnlock (std::unique_lock< Mutex > &) -> ScopeUnlock< Mutex > | |
| 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 |
| template<class Stream> | |
| Stream & | operator<< (Stream &s, Slice const &v) |
| template<class T, std::size_t N> requires (std::is_same_v<T, char> || std::is_same_v<T, unsigned char>) | |
| Slice | makeSlice (std::array< T, N > const &a) |
| template<class T, class Alloc> requires (std::is_same_v<T, char> || std::is_same_v<T, unsigned char>) | |
| Slice | makeSlice (std::vector< T, Alloc > const &v) |
| template<class Traits, class Alloc> | |
| Slice | makeSlice (std::basic_string< char, Traits, Alloc > const &s) |
| template<class Traits> | |
| Slice | makeSlice (std::basic_string_view< char, Traits > 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< Blob > | strUnHex (std::size_t strSize, Iterator begin, Iterator end) |
| std::optional< Blob > | strUnHex (std::string_view strSrc) |
| bool | parseUrl (ParsedUrl &pUrl, std::string const &strUrl) |
| std::string | trimWhitespace (std::string str) |
| Remove leading and trailing ASCII whitespace. | |
| std::string | toLower (std::string str) |
| Fold ASCII upper case letters to lower case. | |
| std::optional< std::uint64_t > | toUInt64 (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> requires (std::is_arithmetic_v<T>) | |
| std::string | 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) |
| template<class T> | |
| bool | set (T &target, std::string const &name, Section const §ion) |
| 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 §ion) |
| 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> | |
| T | get (Section const §ion, std::string const &name, T const &defaultValue=T{}) |
| Retrieve a key/value pair from a section. | |
| std::string | get (Section const §ion, std::string const &name, char const *defaultValue) |
| template<class T> | |
| bool | getIfExists (Section const §ion, std::string const &name, T &v) |
| template<> | |
| bool | getIfExists< bool > (Section const §ion, std::string const &name, bool &v) |
| 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. | |
| 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, class LedgerId, class Position> | |
| bool | operator== (ConsensusProposal< NodeId, LedgerId, Position > const &a, ConsensusProposal< NodeId, LedgerId, Position > const &b) |
| std::string | to_string (ConsensusMode m) |
| std::string | to_string (ConsensusPhase p) |
| std::chrono::seconds | medianCloseOffset (ConsensusCloseTimes const ×) |
| Offset of the network's close time relative to ours, using a weighted median. | |
| 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) |
| constexpr HashRouterFlags | operator| (HashRouterFlags lhs, HashRouterFlags rhs) |
| constexpr HashRouterFlags & | operator|= (HashRouterFlags &lhs, HashRouterFlags rhs) |
| constexpr HashRouterFlags | operator& (HashRouterFlags lhs, HashRouterFlags rhs) |
| constexpr HashRouterFlags & | operator&= (HashRouterFlags &lhs, HashRouterFlags rhs) |
| constexpr bool | any (HashRouterFlags flags) |
| std::ostream & | operator<< (std::ostream &os, StartUpType const &type) |
| CsprngEngine & | cryptoPrng () |
| The default cryptographically secure PRNG. | |
| void | secureErase (void *dest, std::size_t bytes) |
| Attempts to clear the given blob of memory. | |
| std::unique_ptr< AmendmentTable > | makeAmendmentTable (ServiceRegistry ®istry, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal) |
| 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) |
| bool | isGlobalFrozen (ReadView const &view, AccountID const &issuer) |
| Check if the issuer has the global freeze flag set. | |
| XRPAmount | xrpLiquid (ReadView const &view, AccountID const &id, std::int32_t ownerCountAdj, beast::Journal j) |
| Calculate liquid XRP balance for an account. | |
| XRPAmount | accountReserve (ReadView const &view, SLE::const_ref sle, beast::Journal j, Adjustment adj={}) |
| Returns the account reserve, in drops. | |
| XRPAmount | accountReserve (ReadView const &view, AccountID const &id, beast::Journal j, Adjustment adj={}) |
| Convenience overload that accepts AccountID instead of SLE. | |
| TER | checkReserve (ApplyViewContext ctx, SLE::const_ref accSle, XRPAmount accBalance, SLE::const_ref sponsorSle, Adjustment adj, beast::Journal j, TER insufReserveCode=tecINSUFFICIENT_RESERVE) |
| Check if an account has sufficient reserve. | |
| TER | checkReserve (ApplyViewContext ctx, SLE::const_ref accSle, XRPAmount accBalance, Adjustment adj, beast::Journal j=beast::Journal{beast::Journal::getNullSink()}) |
| Check if an account has sufficient reserve, deriving the sponsor internally. | |
| std::uint32_t | ownerCount (SLE::const_ref sle, beast::Journal j, std::int32_t ownerCountAdj=0) |
| Return number of the objects which reserve is covered by the account(sle) (so called "owner
count"). | |
| void | increaseOwnerCount (ApplyView &view, SLE::ref accountSle, SLE::ref sponsorSle, std::uint32_t count, beast::Journal j) |
| Increase owner-count fields when the caller supplies the sponsor. | |
| void | increaseOwnerCount (ApplyViewContext ctx, SLE::ref accountSle, std::uint32_t count, beast::Journal j) |
| Increase owner-count fields, deriving the tx reserve sponsor internally. | |
| void | increaseOwnerCount (ApplyView &view, AccountID const &account, std::optional< AccountID > const &sponsor, std::uint32_t count, beast::Journal j) |
| Convenience overload that accepts AccountID instead of SLE references. | |
| void | decreaseOwnerCount (ApplyView &view, SLE::ref accountSle, SLE::ref sponsorSle, std::uint32_t count, beast::Journal j) |
| Decrease owner-count fields when the caller supplies the sponsor. | |
| void | decreaseOwnerCount (ApplyView &view, AccountID const &account, std::optional< AccountID > const &sponsor, std::uint32_t count, beast::Journal j) |
| Convenience overload that accepts AccountID instead of SLE references. | |
| void | decreaseOwnerCountForObject (ApplyView &view, SLE::ref accountSle, SLE::ref objectSle, std::uint32_t count, beast::Journal j) |
| Decrease owner-count fields for an existing ledger object. | |
| void | decreaseOwnerCountForObject (ApplyView &view, AccountID const &account, SLE::ref objectSle, std::uint32_t count, beast::Journal j) |
| Convenience overload that accepts AccountID instead of account SLE reference. | |
| void | adjustLoanBrokerOwnerCount (ApplyView &view, SLE::ref brokerSle, std::int32_t delta, beast::Journal j) |
| Adjust a LoanBroker's owner count. | |
| Rate | transferRate (ReadView const &view, AccountID const &issuer) |
| Returns IOU issuer transfer fee as Rate. | |
| AccountID | pseudoAccountAddress (ReadView const &view, uint256 const &pseudoOwnerKey) |
| Generate a pseudo-account address from a pseudo owner key. | |
| std::vector< SField const * > const & | getPseudoAccountFields () |
| Returns the list of fields that define an ACCOUNT_ROOT as a pseudo-account if set. | |
| bool | isPseudoAccount (SLE::const_pointer sleAcct, std::set< SField const * > const &pseudoFieldFilter={}) |
| Returns true if and only if sleAcct is a pseudo-account or specific pseudo-accounts in pseudoFieldFilter. | |
| bool | isPseudoAccount (ReadView const &view, AccountID const &accountId, std::set< SField const * > const &pseudoFieldFilter={}) |
| Convenience overload that reads the account from the view. | |
| std::expected< SLE::pointer, TER > | createPseudoAccount (ApplyView &view, uint256 const &pseudoOwnerKey, SField const &ownerField) |
| Create pseudo-account, storing pseudoOwnerKey into ownerField. | |
| TER | checkDestinationAndTag (SLE::const_ref toSle, bool hasDestinationTag) |
| Checks the destination and tag. | |
| STAmount | ammLPTokens (STAmount const &asset1, STAmount const &asset2, Asset 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> | |
| 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< Number > | solveQuadraticEqSmallest (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 >, STAmount > | 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. | |
| 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::RoundingMode 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()> const &noRoundCb, STAmount const &balance, std::function< Number()> const &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()> const &noRoundCb, STAmount const &lptAMMBalance, std::function< Number()> const &productCb, IsDeposit isDeposit) |
| Round AMM single deposit/withdrawal LPToken amount. | |
| std::pair< STAmount, STAmount > | adjustAssetInByTokens (Rules const &rules, STAmount const &balance, STAmount const &amount, STAmount const &lptAMMBalance, STAmount const &tokens, std::uint16_t tfee) |
| std::pair< STAmount, STAmount > | adjustAssetOutByTokens (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, STAmount > | ammPoolHolds (ReadView const &view, AccountID const &ammAccountID, Asset const &asset1, Asset const &asset2, FreezeHandling freezeHandling, AuthHandling authHandling, beast::Journal const j) |
| Get AMM pool balances. | |
| TER | checkAMMPrecisionLoss (Number const &poolProductMean, STAmount const &newLPTokenBalance) |
| Check AMM pool product invariant after an AMM operation that changes LP tokens (deposit/withdraw/clawback) from an already calculated pool product mean. | |
| TER | checkAMMPrecisionLoss (ReadView const &view, AccountID const &ammAccountID, Asset const &asset1, Asset const &asset2, STAmount const &newLPTokenBalance, beast::Journal const j) |
| Check AMM pool product invariant after an AMM operation that changes LP tokens (deposit/withdraw/clawback). | |
| std::expected< std::tuple< STAmount, STAmount, STAmount >, TER > | ammHolds (ReadView const &view, SLE const &ammSle, std::optional< Asset > const &optAsset1, std::optional< Asset > const &optAsset2, FreezeHandling freezeHandling, AuthHandling authHandling, beast::Journal const j) |
| Get AMM pool and LP token balances. | |
| STAmount | ammLPHolds (ReadView const &view, Asset const &asset1, Asset const &asset2, 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, Asset const &asset) |
| Returns total amount held by AMM for the given token. | |
| TER | deleteAMMAccount (Sandbox &view, Asset const &asset, Asset const &asset2, beast::Journal j) |
| Delete trustlines to AMM. | |
| void | initializeFeeAuctionVote (ApplyView &view, SLE::pointer &ammSle, AccountID const &account, Asset const &lptAsset, std::uint16_t tfee) |
| Initialize Auction and Voting slots and set the trading/discounted fee. | |
| std::expected< bool, TER > | isOnlyLiquidityProvider (ReadView const &view, Issue const &ammIssue, AccountID const &lpAccount) |
| Return true if the Liquidity Provider is the only AMM provider, false otherwise. | |
| std::expected< bool, TER > | verifyAndAdjustLPTokenBalance (Sandbox &sb, STAmount const &lpTokens, SLE::pointer &ammSle, AccountID const &account) |
| Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance. | |
| TER | verifyValidDomain (ApplyView &view, AccountID const &account, uint256 domainID, beast::Journal j) |
| TER | checkDepositPreauth (STTx const &tx, ReadView const &view, AccountID const &src, AccountID const &dst, std::shared_ptr< SLE const > const &sleDst, beast::Journal j) |
| Check whether src is authorized to deposit to dst. | |
| TER | cleanupExpiredCredentials (STTx const &tx, ApplyView &view, beast::Journal j) |
| Remove expired credentials referenced by the transaction. | |
| TER | verifyDepositPreauth (STTx const &tx, ApplyView &view, AccountID const &src, AccountID const &dst, SLE::const_ref sleDst, beast::Journal j) |
| NotTEC | checkTxPermission (SLE::const_ref delegate, STTx const &tx) |
| Check if the delegate account has permission to execute the transaction. | |
| std::unordered_set< GranularPermissionType > | getGranularPermission (SLE::const_ref delegate, TxType const &type) |
| Load the granular permissions granted to the delegate account for the specified transaction type. | |
| void | forEachItem (ReadView const &view, Keylet const &root, std::function< void(SLE::const_ref)> 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(SLE::const_ref)> const &f) |
| Iterate all items after an item in the given directory. | |
| void | forEachItem (ReadView const &view, AccountID const &id, std::function< void(SLE::const_ref)> 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(SLE::const_ref)> const &f) |
| Iterate all items after an item in an owner directory. | |
| bool | dirIsEmpty (ReadView const &view, Keylet const &k) |
| Returns true if the directory is empty. | |
| std::function< void(SLE::ref)> | describeOwnerDir (AccountID const &account) |
| Returns a function that sets the owner on a directory SLE. | |
| template<ValidIssueType T> | |
| TER | escrowUnlockApplyHelper (ApplyViewContext ctx, Rate lockedRate, SLE::ref sleDest, XRPAmount xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal) |
| template<> | |
| TER | escrowUnlockApplyHelper< Issue > (ApplyViewContext ctx, Rate lockedRate, SLE::ref sleDest, XRPAmount xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal) |
| template<> | |
| TER | escrowUnlockApplyHelper< MPTIssue > (ApplyViewContext ctx, Rate lockedRate, SLE::ref sleDest, XRPAmount xrpBalance, STAmount const &amount, AccountID const &issuer, AccountID const &sender, AccountID const &receiver, bool createAsset, beast::Journal journal) |
| TER | canApplyToBrokerCover (ReadView const &view, SLE::const_ref sleBroker, Asset const &vaultAsset, STAmount const &amount, beast::Journal j, std::string_view logPrefix) |
| Broker cover preclaim precision guard (fixCleanup3_2_0). | |
| bool | checkLendingProtocolDependencies (Rules const &rules, STTx const &tx) |
| Number | loanPeriodicRate (TenthBips32 interestRate, std::uint32_t paymentInterval) |
| Number | roundPeriodicPayment (Asset const &asset, Number const &periodicPayment, std::int32_t scale) |
| Ensure the periodic payment is always rounded consistently. | |
| template<class NumberProxy> | |
| void | adjustImpreciseNumber (NumberProxy value, Number const &adjustment, Asset const &asset, int vaultScale) |
| int | getAssetsTotalScale (SLE::const_ref vaultSle) |
| Number | minimumBrokerCover (Number const &debtTotal, TenthBips32 coverRateMinimum, SLE::const_ref vaultSle) |
| TER | checkLoanGuards (Asset const &vaultAsset, Number const &principalRequested, bool expectInterest, std::uint32_t paymentTotal, LoanProperties const &properties, beast::Journal j) |
| LoanState | computeTheoreticalLoanState (Rules const &rules, Number const &periodicPayment, Number const &periodicRate, std::uint32_t const paymentRemaining, TenthBips32 const managementFeeRate) |
| LoanState | constructLoanState (Number const &totalValueOutstanding, Number const &principalOutstanding, Number const &managementFeeOutstanding) |
| LoanState | constructLoanState (SLE::const_ref loan) |
| Number | computeManagementFee (Asset const &asset, Number const &interest, TenthBips32 managementFeeRate, std::int32_t scale) |
| Number | computeFullPaymentInterest (Number const &theoreticalPrincipalOutstanding, Number const &periodicRate, NetClock::time_point parentCloseTime, std::uint32_t paymentInterval, std::uint32_t prevPaymentDate, std::uint32_t startDate, TenthBips32 closeInterestRate) |
| AccountingDeltas | loanOriginationDeltas (SLE::const_ref vaultSle, Number const &principalRequested, Number const &interestDue) |
| bool | loanOriginationExceedsVaultMaximum (SLE::const_ref vaultSle, Number const &vaultTotal, Number const &interestDue) |
| Number | loanVaultExposure (SLE::const_ref vaultSle, SLE::const_ref loanSle) |
| AccountingDeltas | loanPaymentDeltas (SLE::const_ref vaultSle, LoanPaymentParts const &parts) |
| detail::LoanStateDeltas | operator- (LoanState const &lhs, LoanState const &rhs) |
| LoanState | operator- (LoanState const &lhs, detail::LoanStateDeltas const &rhs) |
| LoanState | operator+ (LoanState const &lhs, detail::LoanStateDeltas const &rhs) |
| LoanProperties | computeLoanProperties (Rules const &rules, Asset const &asset, Number const &principalOutstanding, TenthBips32 interestRate, std::uint32_t paymentInterval, std::uint32_t paymentsRemaining, TenthBips32 managementFeeRate, std::int32_t minimumScale) |
| LoanProperties | computeLoanProperties (Rules const &rules, Asset const &asset, Number const &principalOutstanding, Number const &periodicRate, std::uint32_t paymentsRemaining, TenthBips32 managementFeeRate, std::int32_t minimumScale) |
| bool | isRounded (Asset const &asset, Number const &value, std::int32_t scale) |
| std::expected< LoanPaymentParts, TER > | loanMakePayment (Asset const &asset, ApplyView &view, SLE::ref loan, SLE::const_ref brokerSle, STAmount const &amount, LoanPaymentType const paymentType, beast::Journal j) |
| bool | isGlobalFrozen (ReadView const &view, MPTIssue const &mptIssue) |
| bool | isIndividualFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue) |
Returns true if account's MPToken for mptIssue carries the individual-lock flag (lsfMPTLocked). | |
| bool | isFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue, std::uint8_t depth=0) |
| bool | isAnyFrozen (ReadView const &view, std::initializer_list< AccountID > const &accounts, MPTIssue const &mptIssue, std::uint8_t depth=0) |
| Rate | transferRate (ReadView const &view, MPTID const &issuanceID) |
| Returns MPT transfer fee as Rate. | |
| TER | canAddHolding (ReadView const &view, MPTIssue const &mptIssue) |
| TER | authorizeMPToken (ApplyViewContext ctx, XRPAmount const &priorBalance, MPTID const &mptIssuanceID, AccountID const &account, beast::Journal journal, std::uint32_t flags=0, std::optional< AccountID > holderID=std::nullopt) |
| TER | requireAuth (ReadView const &view, MPTIssue const &mptIssue, AccountID const &account, AuthType authType=AuthType::Legacy, std::uint8_t depth=0) |
| Check if the account lacks required authorization for MPT. | |
| TER | enforceMPTokenAuthorization (ApplyViewContext ctx, MPTID const &mptIssuanceID, AccountID const &account, XRPAmount const &priorBalance, beast::Journal j) |
| Enforce account has MPToken to match its authorization. | |
| Asset | assetOfHolding (SLE const &sleShareIssuance, SLE const &sleHolding) |
| Resolve the underlying asset of a vault share. | |
| TER | canTransfer (ReadView const &view, MPTIssue const &mptIssue, AccountID const &from, AccountID const &to, WaiveMPTCanTransfer waive=WaiveMPTCanTransfer::No, std::uint8_t depth=0) |
Check whether to may receive the given MPT from from. | |
| TER | canTrade (ReadView const &view, Asset const &asset, std::uint8_t depth=0) |
Check whether asset may be traded on the DEX. | |
| TER | canMPTTradeAndTransfer (ReadView const &v, Asset const &asset, AccountID const &from, AccountID const &to) |
| Convenience to combine canTrade/Transfer. | |
| TER | addEmptyHolding (ApplyViewContext ctx, AccountID const &accountID, XRPAmount priorBalance, MPTIssue const &mptIssue, beast::Journal journal) |
| TER | removeEmptyHolding (ApplyViewContext ctx, AccountID const &accountID, MPTIssue const &mptIssue, beast::Journal journal) |
| TER | lockEscrowMPT (ApplyView &view, AccountID const &uGrantorID, STAmount const &saAmount, beast::Journal j) |
| TER | unlockEscrowMPT (ApplyView &view, AccountID const &uGrantorID, AccountID const &uGranteeID, STAmount const &netAmount, STAmount const &grossAmount, beast::Journal j) |
| TER | createMPToken (ApplyView &view, MPTID const &mptIssuanceID, AccountID const &account, SLE::ref sponsorSle, std::uint32_t const flags) |
| TER | checkCreateMPT (xrpl::ApplyView &view, xrpl::MPTIssue const &mptIssue, xrpl::AccountID const &holder, SLE::ref sponsorSle, std::uint32_t flags, beast::Journal j) |
| TER | checkCreateMPT (xrpl::ApplyView &view, xrpl::MPTIssue const &mptIssue, xrpl::AccountID const &holder, beast::Journal j) |
| std::int64_t | maxMPTAmount (SLE const &sleIssuance) |
| std::int64_t | availableMPTAmount (SLE const &sleIssuance) |
| std::int64_t | availableMPTAmount (ReadView const &view, MPTID const &mptID) |
| bool | isMPTOverflow (std::int64_t sendAmount, std::uint64_t outstandingAmount, std::int64_t maximumAmount, AllowMPTOverflow allowOverflow) |
| Checks for two types of OutstandingAmount overflow during a send operation. | |
| STAmount | issuerFundsToSelfIssue (ReadView const &view, MPTIssue const &issue) |
| Determine funds available for an issuer to sell in an issuer owned offer. | |
| void | issuerSelfDebitHookMPT (ApplyView &view, MPTIssue const &issue, std::uint64_t amount) |
| Facilitate tracking of MPT sold by an issuer owning MPT sell offer. | |
| TER | offerDelete (ApplyView &view, SLE::ref sle, beast::Journal j) |
| Delete an offer. | |
| template<typename T> | |
| std::uint32_t | calculateOracleReserve (T const &priceDataSeries) |
| std::uint32_t | calculateOracleReserve (SLE::const_ref oracleSle) |
| TER | closeChannel (SLE::ref slep, ApplyView &view, uint256 const &key, beast::Journal j) |
| Close a payment channel and return its remaining funds to the channel owner. | |
| uint32_t | saturatingAdd (Rules const &rules, uint32_t const lhs, uint32_t const rhs) |
| Add two uint32_t values with saturation at UINT32_MAX. | |
| bool | isChannelExpired (ApplyView const &view, std::optional< std::uint32_t > timeField) |
| Determine whether a payment channel time field represents an expired time. | |
| bool | isIndividualFrozen (ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer) |
| bool | isIndividualFrozen (ReadView const &view, AccountID const &account, Issue const &issue) |
| bool | isFrozen (ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer) |
| bool | isFrozen (ReadView const &view, AccountID const &account, Issue const &issue) |
| bool | isFrozen (ReadView const &view, AccountID const &account, Issue const &issue, std::uint8_t) |
| bool | isDeepFrozen (ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer) |
| bool | isDeepFrozen (ReadView const &view, AccountID const &account, Issue const &issue, std::uint8_t=0) |
| TER | checkDeepFrozen (ReadView const &view, AccountID const &account, Issue const &issue) |
| 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 uQualityIn, std::uint32_t uQualityOut, SLE::ref sponsorSle, beast::Journal j) |
| Create a trust line. | |
| TER | trustDelete (ApplyView &view, SLE::ref sleRippleState, AccountID const &uLowAccountID, AccountID const &uHighAccountID, beast::Journal j) |
| TER | issueIOU (ApplyView &view, AccountID const &account, STAmount const &amount, Issue const &issue, SLE::ref sponsorSle, beast::Journal j) |
| TER | redeemIOU (ApplyView &view, AccountID const &account, STAmount const &amount, Issue const &issue, 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 | canTransfer (ReadView const &view, Issue const &issue, AccountID const &from, AccountID const &to) |
| Check if the destination account is allowed to receive IOU. | |
| TER | addEmptyHolding (ApplyViewContext ctx, 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 | removeEmptyHolding (ApplyViewContext ctx, AccountID const &accountID, Issue const &issue, beast::Journal journal) |
| TER | deleteAMMTrustLine (ApplyView &view, SLE::pointer sleState, std::optional< AccountID > const &ammAccountID, beast::Journal j) |
| Delete trustline to AMM. | |
| TER | deleteAMMMPToken (ApplyView &view, SLE::pointer sleMPT, AccountID const &ammAccountID, beast::Journal j) |
| Delete AMMs MPToken. | |
| bool | isReserveSponsorAllowed (TxType txType) |
| Whether the given transaction type may use reserve sponsorship (v1). | |
| bool | isFeeSponsored (STTx const &tx) |
| Whether the transaction's fee is sponsored (sfSponsor present + spfSponsorFee set). | |
| bool | isReserveSponsored (STTx const &tx) |
| Whether the transaction's reserve is sponsored (sfSponsor present + spfSponsorReserve set). | |
| std::optional< AccountID > | getTxReserveSponsorID (STTx const &tx) |
| Return the AccountID of the transaction's reserve sponsor, or nullopt if unsponsored. | |
| std::expected< SLE::pointer, TER > | getTxReserveSponsor (ApplyViewContext ctx) |
| Return a mutable SLE for the transaction's reserve sponsor account. | |
| std::expected< SLE::const_pointer, TER > | getTxReserveSponsor (ReadView const &view, STTx const &tx) |
| Return a read-only SLE for the transaction's reserve sponsor account. | |
| std::expected< SLE::pointer, TER > | getEffectiveTxReserveSponsor (ApplyViewContext ctx, SLE::const_ref accountSle) |
| The transaction's reserve sponsor for the given account, if applicable. | |
| std::optional< AccountID > | getLedgerEntryReserveSponsorID (SLE::const_ref sle, SF_ACCOUNT const &field=sfSponsor) |
| Return the AccountID stored in the given sponsor field of a ledger entry, or nullopt if absent. | |
| SLE::pointer | getLedgerEntryReserveSponsor (ApplyView &view, SLE::const_ref sle, SF_ACCOUNT const &field=sfSponsor) |
| Return a mutable SLE for the reserve sponsor recorded on a ledger entry. | |
| void | addSponsorToLedgerEntry (SLE::ref sle, SLE::const_ref sponsorSle, SF_ACCOUNT const &field=sfSponsor) |
| Stamp a reserve sponsor onto a ledger entry using an explicit sponsor SLE. | |
| void | addSponsorToLedgerEntry (ApplyViewContext ctx, SLE::ref sle, SF_ACCOUNT const &field=sfSponsor) |
| Stamp the transaction's reserve sponsor onto a newly-created ledger entry. | |
| void | removeSponsorFromLedgerEntry (SLE::ref sle, SF_ACCOUNT const &field=sfSponsor) |
| Remove the reserve sponsor field from a ledger entry. | |
| bool | isLedgerEntryOwner (ReadView const &view, SLE const &sle, AccountID const &account) |
Whether account is the owner of a ledger entry for sponsorship purposes. | |
| bool | isLedgerEntrySupportedBySponsorship (SLE const &sle) |
| Whether this ledger entry type can have a reserve sponsor attached to it. | |
| std::uint32_t | getLedgerEntryOwnerCount (SLE const &sle) |
| Return the number of owner-count units the ledger entry consumes. | |
| SF_ACCOUNT const & | getLedgerEntrySponsorField (SLE const &sle, AccountID const &owner) |
Return the SField used to store the reserve sponsor for owner on sle. | |
| bool | isGlobalFrozen (ReadView const &view, Asset const &asset) |
| TER | checkGlobalFrozen (ReadView const &view, Asset const &asset) |
| bool | isIndividualFrozen (ReadView const &view, AccountID const &account, Asset const &asset) |
| TER | checkIndividualFrozen (ReadView const &view, AccountID const &account, Asset const &asset) |
| bool | isFrozen (ReadView const &view, AccountID const &account, Asset const &asset, std::uint8_t 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, Issue const &issue) |
| bool | isAnyFrozen (ReadView const &view, std::initializer_list< AccountID > const &accounts, Asset const &asset, std::uint8_t depth=0) |
| bool | isDeepFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue, std::uint8_t depth=0) |
| bool | isDeepFrozen (ReadView const &view, AccountID const &account, Asset const &asset, std::uint8_t depth=0) |
| isFrozen check is recursive for MPT shares in a vault, descending to assets in the vault, up to maxAssetCheckDepth recursion depth. | |
| TER | checkDeepFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue) |
| TER | checkDeepFrozen (ReadView const &view, AccountID const &account, Asset const &asset) |
| TER | checkWithdrawFreeze (ReadView const &view, AccountID const &pseudoAcct, AccountID const &submitterAcct, AccountID const &dstAcct, Asset const &asset) |
| Checks freeze compliance for withdrawing an asset from a pseudo-account (e.g. | |
| TER | checkDepositFreeze (ReadView const &view, AccountID const &srcAcct, AccountID const &pseudoAcct, Asset const &asset) |
| Checks freeze compliance for depositing an asset into a pseudo-account (e.g. | |
| STAmount | accountHolds (ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer, FreezeHandling zeroIfFrozen, beast::Journal j, SpendableHandling includeFullBalance=SpendableHandling::SimpleBalance) |
| STAmount | accountHolds (ReadView const &view, AccountID const &account, Issue const &issue, FreezeHandling zeroIfFrozen, beast::Journal j, SpendableHandling includeFullBalance=SpendableHandling::SimpleBalance) |
| STAmount | accountHolds (ReadView const &view, AccountID const &account, MPTIssue const &mptIssue, FreezeHandling zeroIfFrozen, AuthHandling zeroIfUnauthorized, beast::Journal j, SpendableHandling includeFullBalance=SpendableHandling::SimpleBalance) |
| STAmount | accountHolds (ReadView const &view, AccountID const &account, Asset const &asset, FreezeHandling zeroIfFrozen, AuthHandling zeroIfUnauthorized, beast::Journal j, SpendableHandling includeFullBalance=SpendableHandling::SimpleBalance) |
| STAmount | accountFunds (ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, beast::Journal j) |
| STAmount | accountFunds (ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, AuthHandling authHandling, beast::Journal j) |
| Rate | transferRate (ReadView const &view, STAmount const &amount) |
| Returns the transfer fee as Rate based on the type of token. | |
| TER | canAddHolding (ReadView const &view, Asset const &asset) |
| TER | addEmptyHolding (ApplyViewContext ctx, AccountID const &accountID, XRPAmount priorBalance, Asset const &asset, beast::Journal journal) |
| TER | removeEmptyHolding (ApplyViewContext ctx, AccountID const &accountID, Asset const &asset, beast::Journal journal) |
| TER | requireAuth (ReadView const &view, Asset const &asset, AccountID const &account, AuthType authType=AuthType::Legacy) |
| TER | canTransfer (ReadView const &view, Asset const &asset, AccountID const &from, AccountID const &to, WaiveMPTCanTransfer waive=WaiveMPTCanTransfer::No, std::uint8_t depth=0) |
| TER | directSendNoFee (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, bool bCheckIssuer, beast::Journal j) |
| Calls static directSendNoFeeIOU if saAmount represents Issue. | |
| TER | accountSend (ApplyView &view, AccountID const &from, AccountID const &to, STAmount const &saAmount, beast::Journal j, SLE::ref sponsorSle={}, WaiveTransferFee waiveFee=WaiveTransferFee::No, AllowMPTOverflow allowOverflow=AllowMPTOverflow::No) |
| Calls static accountSendIOU if saAmount represents Issue. | |
| TER | accountSendMulti (ApplyView &view, AccountID const &senderID, Asset const &asset, MultiplePaymentDestinations const &receivers, beast::Journal j, WaiveTransferFee waiveFee=WaiveTransferFee::No) |
| Like accountSend, except one account is sending multiple payments (with the same asset!) simultaneously. | |
| TER | transferXRP (ApplyView &view, AccountID const &from, AccountID const &to, STAmount const &amount, beast::Journal j) |
| std::optional< STAmount > | assetsToSharesDeposit (SLE::const_ref vault, SLE::const_ref issuance, STAmount const &assets) |
| From the perspective of a vault, return the number of shares to give depositor when they offer a fixed amount of assets. | |
| std::optional< STAmount > | sharesToAssetsDeposit (SLE::const_ref vault, SLE::const_ref issuance, STAmount const &shares) |
| From the perspective of a vault, return the number of assets to take from depositor when they receive a fixed amount of shares. | |
| std::optional< STAmount > | assetsToSharesWithdraw (SLE::const_ref vault, SLE::const_ref issuance, STAmount const &assets, TruncateShares truncate=TruncateShares::No, WaiveUnrealizedLoss waive=WaiveUnrealizedLoss::No) |
| From the perspective of a vault, return the number of shares to demand from the depositor when they ask to withdraw a fixed amount of assets. | |
| std::optional< STAmount > | sharesToAssetsWithdraw (SLE::const_ref vault, SLE::const_ref issuance, STAmount const &shares, WaiveUnrealizedLoss waive=WaiveUnrealizedLoss::No) |
| From the perspective of a vault, return the number of assets to give the depositor when they redeem a fixed amount of shares. | |
| bool | isSoleShareholder (ReadView const &view, AccountID const &account, SLE::const_ref issuance) |
| Returns true iff account holds all of the vault's outstanding shares — i.e. | |
| VaultVersion | getVaultVersion (SLE::const_ref vault) |
| Resolves a Vault's LEVersion, the single point every accounting touch point should call to determine which recognition model (accrual vs. | |
| VaultKind | getVaultKind (SLE::const_ref vault) |
| Resolves the VaultKind of a vault SLE. | |
| VaultKind | getVaultKind (STTx const &tx) |
| Reads sfVaultKind from a transaction. | |
| bool | isValidVaultKind (STTx const &tx) |
Returns true iff sfVaultKind is either absent from tx or is present and equal to a recognised VaultKind enumerator. | |
| bool | isValidClosedEndedGap (std::uint32_t sub, std::uint32_t red) |
| Returns true iff the (SubscriptionDate, RedemptionDate) gap of a closed-ended vault satisfies kMinInvestmentPeriod <= (red - sub) < kMaxInvestmentPeriod. | |
| VaultPhase | getVaultPhase (ReadView const &view, SLE::const_ref vault) |
| Returns the current lifecycle phase of a vault. | |
| VaultPhase | getVaultPhase (ReadView const &view, std::optional< std::uint8_t > vaultKind, std::optional< std::uint32_t > subscriptionDate, std::optional< std::uint32_t > redemptionDate) |
| Raw-fields overload of getVaultPhase. | |
| 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. | |
| hash_set< Book > | affectedBooks (AcceptedLedgerTx const &alTx, beast::Journal const &j) |
| Extract the set of books affected by a transaction. | |
| Rules | makeRulesGivenLedger (DigestAwareReadView const &ledger, Rules const ¤t) |
| 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, ExpiryComparison comparison=ExpiryComparison::Inclusive) |
| Determines whether the given expiration time has passed. | |
| bool | isVaultPseudoAccountFrozen (ReadView const &view, AccountID const &account, MPTIssue const &mptShare, std::uint8_t depth) |
| bool | isLPTokenFrozen (ReadView const &view, AccountID const &account, Asset const &asset, Asset const &asset2) |
| std::set< uint256 > | getEnabledAmendments (ReadView const &view) |
| majorityAmendments_t | getMajorityAmendments (ReadView const &view) |
| std::optional< uint256 > | hashOfSeq (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) |
| TER | dirLink (ApplyView &view, AccountID const &owner, SLE::pointer &object, SF_UINT64 const &node=sfOwnerNode) |
| TER | canWithdraw (ReadView const &view, AccountID const &from, AccountID const &to, SLE::const_ref toSle, STAmount const &amount, bool hasDestinationTag) |
| Checks that can withdraw funds from an object to itself or a destination. | |
| TER | canWithdraw (ReadView const &view, AccountID const &from, AccountID const &to, STAmount const &amount, bool hasDestinationTag) |
| Checks that can withdraw funds from an object to itself or a destination. | |
| TER | canWithdraw (ReadView const &view, STTx const &tx) |
| Checks that can withdraw funds from an object to itself or a destination. | |
| TER | doWithdraw (ApplyViewContext ctx, AccountID const &senderAcct, AccountID const &dstAcct, AccountID const &sourceAcct, XRPAmount priorBalance, STAmount const &amount, beast::Journal j) |
| 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. | |
| 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< AccountID > | parseBase58 (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 | toIssuer (AccountID &, std::string const &) |
| Convert hex or base58 string to AccountID. | |
| bool | isXRP (AccountID const &c) |
| std::string | to_string (AccountID const &account) |
| std::ostream & | operator<< (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 (Asset const &asset1, Asset const &asset2) |
| Calculate Liquidity Provider Token (LPT) Currency. | |
| Issue | ammLPTIssue (Asset const &asset1, Asset const &asset2, AccountID const &ammAccountID) |
| Calculate LPT Issue from AMM asset pair. | |
| NotTEC | invalidAMMAmount (STAmount const &amount, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt, bool validZero=false) |
| Validate the amount. | |
| NotTEC | invalidAMMAsset (Asset const &asset, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt) |
| NotTEC | invalidAMMAssetPair (Asset const &asset1, Asset const &asset2, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt) |
| std::optional< std::uint8_t > | ammAuctionTimeSlot (std::uint64_t current, STObject const &auctionSlot) |
| Get time slot of the auction slot. | |
| bool | ammEnabled (Rules const &) |
| Return true if required AMM amendment is 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, Asset const &asset) |
| STAmount | toSTAmount (IOUAmount const &iou) |
| STAmount | toSTAmount (XRPAmount const &xrp) |
| STAmount | toSTAmount (XRPAmount const &xrp, Asset const &asset) |
| STAmount | toSTAmount (MPTAmount const &mpt) |
| STAmount | toSTAmount (MPTAmount const &mpt, Asset const &asset) |
| template<class T> | |
| 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<> | |
| MPTAmount | toAmount< MPTAmount > (STAmount const &amt) |
| template<class T> | |
| T | toAmount (IOUAmount const &amt)=delete |
| template<> | |
| IOUAmount | toAmount< IOUAmount > (IOUAmount const &amt) |
| template<class T> | |
| T | toAmount (XRPAmount const &amt)=delete |
| template<> | |
| XRPAmount | toAmount< XRPAmount > (XRPAmount const &amt) |
| template<class T> | |
| T | toAmount (MPTAmount const &amt)=delete |
| template<> | |
| MPTAmount | toAmount< MPTAmount > (MPTAmount const &amt) |
| template<typename T> | |
| T | toAmount (Asset const &asset, Number const &n, Number::RoundingMode mode=Number::getround()) |
| template<typename T> | |
| T | toMaxAmount (Asset const &asset) |
| STAmount | toSTAmount (Asset const &asset, Number const &n, Number::RoundingMode mode=Number::getround()) |
| template<typename T> | |
| Asset | getAsset (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::kApiMinimumSupportedVersion) && (rpc::kApiMaximumValidVersion >= 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::kApiMinimumSupportedVersion, rpc::kApiMaximumValidVersion>( fn, std::forward<Args>(args)...); } | |
| void | forAllApiVersions (Fn const &fn, Args &&... args) |
| BadAsset const & | badAsset () |
| json::Value | toJson (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 | operator== (BadAsset 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) |
| bool | isConsistent (Asset const &asset) |
| bool | validAsset (Asset const &asset) |
| template<class Hasher> | |
| void | hash_append (Hasher &h, Asset const &r) |
| std::ostream & | operator<< (std::ostream &os, Asset const &x) |
| void | serializeBatch (Serializer &msg, AccountID const &outerAccount, std::uint32_t outerSeqValue, std::uint32_t const &flags, std::vector< uint256 > const &txids) |
| bool | isConsistent (Book const &book) |
| std::string | to_string (Book const &book) |
| std::ostream & | operator<< (std::ostream &os, Book const &x) |
| template<class Hasher> | |
| void | hash_append (Hasher &h, Book const &b) |
| Book | reversed (Book const &book) |
| void | incrementConfidentialVersion (STObject &mptoken) |
| Increments the confidential balance version counter on an MPToken. | |
| uint256 | getSendContextHash (AccountID const &account, uint192 const &issuanceID, std::uint32_t sequence, AccountID const &destination, std::uint32_t version) |
| Generates the context hash for ConfidentialMPTSend transactions. | |
| uint256 | getClawbackContextHash (AccountID const &account, uint192 const &issuanceID, std::uint32_t sequence, AccountID const &holder) |
| Generates the context hash for ConfidentialMPTClawback transactions. | |
| uint256 | getConvertContextHash (AccountID const &account, uint192 const &issuanceID, std::uint32_t sequence) |
| Generates the context hash for ConfidentialMPTConvert transactions. | |
| uint256 | getConvertBackContextHash (AccountID const &account, uint192 const &issuanceID, std::uint32_t sequence, std::uint32_t version) |
| Generates the context hash for ConfidentialMPTConvertBack transactions. | |
| std::optional< EcPair > | makeEcPair (Slice const &buffer) |
| Parses an ElGamal ciphertext into two secp256k1 public key components. | |
| std::optional< Buffer > | serializeEcPair (EcPair const &pair) |
| Serializes an EcPair into compressed form. | |
| bool | isValidCiphertext (Slice const &buffer) |
| Verifies that a buffer contains two valid, parsable EC public keys. | |
| bool | isValidCompressedECPoint (Slice const &buffer) |
| Verifies that a buffer contains a valid, parsable compressed EC point. | |
| std::optional< Buffer > | homomorphicAdd (Slice const &a, Slice const &b) |
| Homomorphically adds two ElGamal ciphertexts. | |
| std::optional< Buffer > | homomorphicSubtract (Slice const &a, Slice const &b) |
| Homomorphically subtracts two ElGamal ciphertexts. | |
| std::optional< Buffer > | rerandomizeCiphertext (Slice const &ciphertext, Slice const &pubKeySlice, Slice const &randomness) |
| Re-randomizes an ElGamal ciphertext without changing its plaintext. | |
| std::optional< Buffer > | encryptAmount (uint64_t const amt, Slice const &pubKeySlice, Slice const &blindingFactor) |
| Encrypts an amount using ElGamal encryption. | |
| std::optional< Buffer > | encryptCanonicalZeroAmount (Slice const &pubKeySlice, AccountID const &account, MPTID const &mptId) |
| Generates the canonical zero encryption for a specific MPToken. | |
| TER | verifySchnorrProof (Slice const &pubKeySlice, Slice const &proofSlice, uint256 const &contextHash) |
| Verifies a Schnorr proof of knowledge of an ElGamal private key. | |
| NotTEC | checkEncryptedAmountFormat (STObject const &object) |
| Validates the format of encrypted amount fields in a transaction. | |
| TER | verifyRevealedAmount (uint64_t const amount, Slice const &blindingFactor, ConfidentialRecipient const &holder, ConfidentialRecipient const &issuer, std::optional< ConfidentialRecipient > const &auditor) |
| Verifies revealed amount encryptions for all recipients. | |
| constexpr uint8_t | getConfidentialRecipientCount (bool hasAuditor) |
| Returns the number of recipients in a confidential transfer. | |
| TER | verifyClawbackProof (uint64_t const amount, Slice const &proof, Slice const &pubKeySlice, Slice const &ciphertext, uint256 const &contextHash) |
| Verifies a compact sigma clawback proof. | |
| Buffer | generateBlindingFactor () |
| Generates a cryptographically secure blinding factor (size=xrpl::kEcBlindingFactorLength). | |
| TER | verifySendProof (Slice const &proof, ConfidentialRecipient const &sender, ConfidentialRecipient const &destination, ConfidentialRecipient const &issuer, std::optional< ConfidentialRecipient > const &auditor, Slice const &spendingBalance, Slice const &amountCommitment, Slice const &balanceCommitment, uint256 const &contextHash) |
| Verifies all zero-knowledge proofs for a ConfidentialMPTSend transaction. | |
| TER | verifyConvertBackProof (Slice const &proof, Slice const &pubKeySlice, Slice const &spendingBalance, Slice const &balanceCommitment, uint64_t amount, uint256 const &contextHash) |
| Verifies all zero-knowledge proofs for a ConfidentialMPTConvertBack transaction. | |
| template<class = void> | |
| secp256k1_context const * | secp256k1Context () |
| xrpl::detail::TokenCodecErrcCategory const & | tokenCodecErrcCategory () |
| std::error_code | make_error_code (xrpl::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 | sha512HalfS (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. | |
| consteval auto | validFeatureNameSize (auto fn) -> bool |
| consteval auto | validFeatureName (auto fn) -> bool |
| std::map< std::string, AmendmentSupport > const & | allAmendments () |
| All amendments libxrpl knows about. | |
| std::optional< uint256 > | getRegisteredFeature (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) |
| MPTID | makeMptID (std::uint32_t const 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 | isConsistent (Issue const &ac) |
| std::string | to_string (Issue const &ac) |
| json::Value | toJson (Issue const &is) |
| Issue | issueFromJson (json::Value const &v) |
| std::ostream & | operator<< (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< KeyType > | keyTypeFromString (std::string const &s) |
| char const * | to_string (KeyType type) |
| template<class Stream> | |
| Stream & | operator<< (Stream &s, KeyType type) |
| std::vector< std::pair< std::string, LedgerFlagMap > > const & | getAllLedgerFlags () |
| 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. | |
| uint256 | calculateLedgerHash (LedgerHeader const &info) |
| Calculate the hash of a ledger header. | |
| template<class Char, class Traits> | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, MPTAmount const &q) |
| 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. | |
| AccountID | getMPTIssuer (MPTID const &mptid) |
| AccountID const & | getMPTIssuer (MPTID const &&)=delete |
| AccountID const & | getMPTIssuer (MPTID &&)=delete |
| MPTID | noMPT () |
| MPTID | badMPT () |
| template<class Hasher> | |
| void | hash_append (Hasher &h, MPTIssue const &r) |
| json::Value | toJson (MPTIssue const &mptIssue) |
| std::string | to_string (MPTIssue const &mptIssue) |
| MPTIssue | mptIssueFromJson (json::Value const &jv) |
| std::ostream & | operator<< (std::ostream &os, MPTIssue const &x) |
| constexpr bool | operator== (PathAsset const &lhs, PathAsset const &rhs) |
| template<typename Hasher> | |
| void | hash_append (Hasher &h, PathAsset const &pathAsset) |
| bool | isXRP (PathAsset const &asset) |
| std::string | to_string (PathAsset const &asset) |
| std::ostream & | operator<< (std::ostream &os, PathAsset const &x) |
| void | serializePayChanAuthorization (Serializer &msg, uint256 const &key, XRPAmount const &amt) |
| constexpr Bips32 | kBipsPerUnity (100 *100) |
| There are 10,000 basis points (bips) in 100%. | |
| constexpr TenthBips32 | kTenthBipsPerUnity (kBipsPerUnity.value() *10) |
| constexpr Bips32 | percentageToBips (std::uint32_t percentage) |
| constexpr TenthBips32 | percentageToTenthBips (std::uint32_t percentage) |
| template<typename T, class TBips> | |
| constexpr T | bipsOfValue (T value, Bips< TBips > bips) |
| template<typename T, class TBips> | |
| constexpr T | tenthBipsOfValue (T value, TenthBips< TBips > bips) |
| bool | isVotingLedger (LedgerIndex seq) |
| Returns true if the given ledgerIndex is a voting ledgerIndex. | |
| bool | isFlagLedger (LedgerIndex seq) |
| Returns true if the given ledgerIndex is a flag ledgerIndex. | |
| std::ostream & | operator<< (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< PublicKey > | parseBase58 (TokenType type, std::string const &s) |
| std::optional< ECDSACanonicality > | ecdsaCanonicality (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) 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) |
| template<class In, class Out> | |
| bool | operator== (TAmounts< In, Out > const &lhs, TAmounts< In, Out > const &rhs) noexcept |
| Quality | composedQuality (Quality const &lhs, Quality const &rhs) |
| Calculate the quality of a two-hop path given the two hops. | |
| bool | operator== (Rate const &lhs, Rate const &rhs) noexcept |
| bool | operator< (Rate const &lhs, Rate const &rhs) noexcept |
| std::ostream & | operator<< (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 (ErrorCodeI iError) |
| bool | isFeatureEnabled (uint256 const &feature, bool resultIfNoRules) |
| Check whether a feature is enabled in the current ledger rules. | |
| bool | isFeatureEnabled (uint256 const &feature) |
| Check whether a feature is enabled in the current ledger rules. | |
| std::optional< Rules > const & | getCurrentTransactionRules () |
| void | setCurrentTransactionRules (std::optional< Rules > r) |
| bool | useRulesGuards (Rules const &rules) |
| void | createGuards (Rules const &rules, std::optional< CurrentTransactionRulesGuard > &rulesGuard, std::optional< NumberMantissaScaleGuard > &mantissaScaleGuard) |
| bool | operator== (SecretKey const &lhs, SecretKey const &rhs)=delete |
| bool | operator!= (SecretKey const &lhs, SecretKey const &rhs)=delete |
| template<> | |
| std::optional< SecretKey > | parseBase58 (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, SecretKey > | generateKeyPair (KeyType type, Seed const &seed) |
| Generate a key pair deterministically. | |
| std::pair< PublicKey, SecretKey > | randomKeyPair (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< Seed > | parseBase58 (std::string const &s) |
| Parse a Base58 encoded string into a seed. | |
| std::optional< Seed > | parseGenericSeed (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 | fieldCode (SerializedTypeID id, int index) |
| int | fieldCode (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 | isLegalMPT (STAmount const &value) |
| bool | hasInvalidAmount (STBase const &field, beast::Journal j) |
| 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) |
| STAmount | roundToScale (STAmount const &value, std::int32_t scale, Number::RoundingMode rounding=Number::getround()) |
| Round an arbitrary precision Amount to the precision of an STAmount that has a given exponent. | |
| template<AssetType A> | |
| void | roundToAsset (A const &asset, Number &value) |
| Round an arbitrary precision Number IN PLACE to the precision of a given Asset. | |
| template<AssetType A> | |
| Number | roundToAsset (A const &asset, Number const &value, std::int32_t scale, Number::RoundingMode rounding=Number::getround()) |
| Round an arbitrary precision Number to the precision of a given Asset. | |
| 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. | |
| int | scale (Number const &number, Asset const &asset) |
| Get the scale of a Number for a given asset. | |
| template<typename T> | |
| json::Value | toJson (T const &t) |
| std::ostream & | operator<< (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, 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::ostream & | operator<< (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) |
| template<class Hasher> | |
| void | hash_append (Hasher &h, STPath const &p) noexcept |
| void | associateAsset (STLedgerEntry &sle, Asset const &asset) |
| Associate an Asset with all sMD_NeedsAsset fields in a ledger entry. | |
| bool | passesLocalChecks (STTx const &tx, 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) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| template<typename L, typename R> | |
| constexpr auto | operator!= (L const &lhs, R const &rhs) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| template<typename L, typename R> | |
| constexpr auto | operator< (L const &lhs, R const &rhs) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| template<typename L, typename R> | |
| constexpr auto | operator<= (L const &lhs, R const &rhs) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| template<typename L, typename R> | |
| constexpr auto | operator> (L const &lhs, R const &rhs) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| template<typename L, typename R> | |
| constexpr auto | operator>= (L const &lhs, R const &rhs) -> bool requires(std::is_same_v< decltype(TERtoInt(lhs)), int > &&std::is_same_v< decltype(TERtoInt(rhs)), int >) |
| 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< TER > | transCode (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) |
| FlagMap const & | getUniversalFlags () |
| FlagMapPairList const & | getAllTxFlags () |
| std::map< std::string, FlagValue > const & | getAsfFlagMap () |
| 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 | isXRP (Currency const &c) |
| std::string | to_string (Currency const &c) |
| Returns "", "XRP", or three letter ISO code. | |
| bool | toCurrency (Currency &, std::string const &) |
| Tries to convert a string to a Currency, returns true on success. | |
| Currency | toCurrency (std::string const &) |
| Tries to convert a string to a Currency, returns noCurrency() on failure. | |
| std::ostream & | operator<< (std::ostream &os, Currency const &x) |
| 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_t > | mulDiv (Source1 value, std::uint64_t mul, Source2 div) |
| template<unit::muldivSource Source1, unit::muldivSources< Source1 > Source2> | |
| std::optional< std::uint64_t > | mulDiv (std::uint64_t value, Source1 mul, Source2 div) |
| template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src> | |
| constexpr Dest | safeCast (Src s) noexcept |
| template<unit::IntegralValue Dest, unit::Integral Src> | |
| constexpr Dest | safeCast (Src s) noexcept |
| template<unit::IntegralValue Dest, unit::CastableValue< Dest > Src> | |
| constexpr Dest | unsafeCast (Src s) noexcept |
| template<unit::IntegralValue Dest, unit::Integral Src> | |
| constexpr Dest | unsafeCast (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) |
| std::shared_ptr< Checkpointer > | checkpointerFromId (std::uintptr_t id) |
| std::string | commonDbPragmaJournal (std::string_view journalMode) |
| std::string | commonDbPragmaSync (std::string_view synchronous) |
| std::string | commonDbPragmaTemp (std::string_view tempStore) |
| template<typename T, typename C> requires (std::is_arithmetic_v<T> && std::is_arithmetic_v<C> && std::convertible_to<C, T>) | |
| T | rangeCheckedCast (C c) |
| 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. | |
| 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< Checkpointer > | makeCheckpointer (std::uintptr_t id, std::weak_ptr< soci::session >, JobQueue &, ServiceRegistry &) |
| Returns a new checkpointer which makes checkpoints of a soci database every checkpointPageCount pages, using a job on the job queue. | |
| void | httpReply (int nStatus, std::string const &strMsg, json::Output const &, beast::Journal j) |
| template<class T> | |
| decltype(auto) | getLowestLayer (T &t) noexcept |
| constexpr bool | exceedsSubscriptionCap (std::size_t current, std::size_t additional, std::size_t cap=kMaxSubscriptionsPerConnection) |
Whether adding additional subscriptions to a connection already holding current would exceed the cap. | |
| 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. | |
| constexpr std::size_t | untrustedManifestCount (std::optional< std::size_t > const &configured) |
| Number of untrusted manifests to store in cache and allowed in one Manifest message. | |
| constexpr std::size_t | trustedManifestCount (std::optional< std::size_t > const &configured) |
| Number of trusted manifests allowed in a Manifest message. | |
| bool | operator== (Manifest const &lhs, Manifest const &rhs) |
| std::optional< ValidatorToken > | loadValidatorToken (std::vector< std::string > const &blob, beast::Journal journal=beast::Journal(beast::Journal::getNullSink())) |
| std::string | to_string (ManifestDisposition m) |
| std::ostream & | operator<< (std::ostream &os, Port const &p) |
| void | parsePort (ParsedPort &port, Section const §ion, std::ostream &log) |
| template<class Handler> | |
| std::unique_ptr< Server > | makeServer (Handler &handler, boost::asio::io_context &ioContext, beast::Journal journal) |
| Create the HTTP server using the specified handler. | |
| 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< DatabaseCon > | makeWalletDB (DatabaseCon::Setup const &setup, beast::Journal j) |
| makeWalletDB Opens the wallet database and returns it. | |
| std::unique_ptr< DatabaseCon > | makeTestWalletDB (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 &cache, beast::Journal j) |
| getManifests Loads a manifest from the wallet database and stores it in the cache. | |
| 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, SecretKey > | getNodeIdentity (soci::session &session) |
| Returns a stable public and private key for this node. | |
| std::unordered_set< PeerReservation, beast::Uhash<>, KeyEqual > | getPeerReservationTable (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 > amendmentHash, boost::optional< std::string > amendmentName, 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. | |
| int | popcnt16 (std::uint16_t a) |
| bool | operator== (SHAMap::ConstIterator const &x, SHAMap::ConstIterator const &y) |
| void | intrusive_ptr_add_ref (SHAMapItem const *x) |
| void | intrusive_ptr_release (SHAMapItem const *x) |
| boost::intrusive_ptr< SHAMapItem > | makeShamapitem (uint256 const &tag, Slice data) |
| boost::intrusive_ptr< SHAMapItem > | makeShamapitem (SHAMapItem const &other) |
| uint256 const & | leafKey (SHAMapTreeNode const &node) |
| Return the key of the item held by a SHAMap leaf node. | |
| std::string | to_string (SHAMapType t) |
| std::string | to_string (SHAMapNodeID const &node) |
| std::ostream & | operator<< (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::pair< Validity, std::string > | checkValidity (HashRouter &router, STTx const &tx, Rules const &rules) |
| 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 (ServiceRegistry ®istry, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal) |
| Apply a transaction to an OpenView. | |
| ApplyTransactionResult | applyTransaction (ServiceRegistry ®istry, 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, ServiceRegistry ®istry, 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, ServiceRegistry ®istry, OpenView &view) |
| Apply a prechecked transaction to an OpenView. | |
| InvariantChecks | getInvariantChecks () |
| get a tuple of all invariant checks | |
| constexpr Privilege | operator| (Privilege lhs, Privilege rhs) |
| bool | hasPrivilege (STTx const &tx, Privilege priv) |
| template<StepAmount T> | |
| T const & | get (EitherAmount const &amt) |
| 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. | |
| TER | checkFreeze (ReadView const &view, AccountID const &src, AccountID const &dst, Currency const ¤cy) |
| TER | checkNoRipple (ReadView const &view, AccountID const &prev, AccountID const &cur, AccountID const &next, Currency const ¤cy, beast::Journal j) |
| bool | redeems (DebtDirection dir) |
| bool | issues (DebtDirection dir) |
| std::pair< TER, STPath > | normalizePath (AccountID const &src, AccountID const &dst, Asset const &deliver, std::optional< Asset > const &sendMaxAsset, STPath const &path) |
| Normalize a path by inserting implied accounts and offers. | |
| std::pair< TER, Strand > | toStrand (ReadView const &sb, AccountID const &src, AccountID const &dst, Asset const &deliver, std::optional< Quality > const &limitQuality, std::optional< Asset > const &sendMaxAsset, 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, Asset const &deliver, std::optional< Quality > const &limitQuality, std::optional< Asset > 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 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<StepAmount TInAmt, StepAmount 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. | |
| 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. | |
| template<StepAmount TIn, StepAmount TOut> | |
| std::ostream & | operator<< (std::ostream &os, TOffer< TIn, TOut > const &offer) |
| NotTEC | preflight0 (PreflightContext const &ctx, std::uint32_t flagMask) |
| Performs early sanity checks on the txid and flags. | |
| static DebugSink & | debugSink () |
| static unsigned | divu10 (uint128_t &u) |
| template<class T> | |
| void | doNormalize (bool &negative, T &mantissa, int &exponent, MantissaRange::rep const &minMantissa, MantissaRange::rep const &maxMantissa, MantissaRange::CuspRoundingFix cuspRoundingFix, bool dropped) |
| std::ostream & | operator<< (std::ostream &os, Section const §ion) |
| std::ostream & | operator<< (std::ostream &ss, BasicConfig const &c) |
| bool | checkConsensusReached (std::size_t agreeing, std::size_t total, bool countSelf, std::size_t minConsensusPct, bool reachedMax, bool stalled, std::unique_ptr< std::stringstream > const &clog) |
| bool | operator< (CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs) |
| static TER | deleteAMMTrustLines (Sandbox &sb, AccountID const &ammAccountID, std::uint16_t maxTrustlinesToDelete, beast::Journal j) |
| static TER | deleteAMMMPTokens (Sandbox &sb, AccountID const &ammAccountID, beast::Journal j) |
| TER | checkDepositPreauth (STTx const &tx, ReadView const &view, AccountID const &src, AccountID const &dst, SLE::const_ref sleDst, beast::Journal j) |
| bool | isChannelExpired (ApplyView const &view, std::optional< uint32_t > timeField) |
| static bool | updateTrustLine (ApplyView &view, SLE::pointer state, bool bSenderHigh, AccountID const &sender, STAmount const &before, STAmount const &after, beast::Journal j) |
| static SLE::const_pointer | getLineIfUsable (ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer, FreezeHandling zeroIfFrozen, beast::Journal j) |
| static STAmount | getTrustLineBalance (ReadView const &view, SLE::const_ref sle, AccountID const &account, Currency const ¤cy, AccountID const &issuer, bool includeOppositeLimit, beast::Journal j) |
| TER | canAddHolding (ReadView const &view, Issue const &issue) |
| static TER | directSendNoFeeIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, bool bCheckIssuer, SLE::ref sponsorSle, beast::Journal j) |
| static TER | directSendNoLimitIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, STAmount &saActual, beast::Journal j, SLE::ref sponsorSle, WaiveTransferFee waiveFee) |
| static TER | directSendNoLimitMultiIOU (ApplyView &view, AccountID const &senderID, Issue const &issue, MultiplePaymentDestinations const &receivers, STAmount &actual, beast::Journal j, WaiveTransferFee waiveFee) |
| static TER | accountSendIOU (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j, SLE::ref sponsorSle, WaiveTransferFee waiveFee) |
| static TER | accountSendMultiIOU (ApplyView &view, AccountID const &senderID, Issue const &issue, MultiplePaymentDestinations const &receivers, beast::Journal j, WaiveTransferFee waiveFee) |
| static TER | directSendNoFeeMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j) |
| static TER | directSendNoLimitMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, STAmount &saActual, beast::Journal j, WaiveTransferFee waiveFee, AllowMPTOverflow allowOverflow) |
| static TER | directSendNoLimitMultiMPT (ApplyView &view, AccountID const &senderID, MPTIssue const &mptIssue, MultiplePaymentDestinations const &receivers, STAmount &actual, beast::Journal j, WaiveTransferFee waiveFee) |
| static TER | accountSendMPT (ApplyView &view, AccountID const &uSenderID, AccountID const &uReceiverID, STAmount const &saAmount, beast::Journal j, WaiveTransferFee waiveFee, AllowMPTOverflow allowOverflow) |
| static TER | accountSendMultiMPT (ApplyView &view, AccountID const &senderID, MPTIssue const &mptIssue, MultiplePaymentDestinations const &receivers, beast::Journal j, WaiveTransferFee waiveFee) |
| static TER | withdrawToDestExceedsLimit (ReadView const &view, AccountID const &from, AccountID const &to, STAmount const &amount) |
| TER | cleanupOnAccountDelete (ApplyView &view, Keylet const &ownerDirKeylet, EntryDeleter const &deleter, beast::Journal j, std::optional< uint16_t > maxNodesToDelete) |
| template<> | |
| std::optional< AccountID > | parseBase58 (std::string const &s) |
| Parse AccountID from checked, base58 string. | |
| std::size_t | hash_value (xrpl::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. | |
| consteval auto | enforceValidFeatureName (auto fn) -> char const * |
| template<class... Args> | |
| static uint256 | indexHash (LedgerNameSpace space, Args const &... args) |
| template<> | |
| std::optional< PublicKey > | parseBase58 (TokenType type, std::string const &s) |
| Parse a secret key. | |
| static std::optional< Slice > | sigPart (Slice &buf) |
| static std::string | sliceToHex (Slice const &slice) |
| static bool | ed25519Canonical (Slice const &sig) |
| template<STAmount(*)(STAmount const &, STAmount const &, Asset const &, bool) DivRoundFunc> | |
| static Amounts | ceilInImpl (Amounts const &amount, STAmount const &limit, bool roundUp, Quality const &quality) |
| template<STAmount(*)(STAmount const &, STAmount const &, Asset const &, bool) MulRoundFunc> | |
| static Amounts | ceilOutImpl (Amounts const &amount, STAmount const &limit, bool roundUp, Quality const &quality) |
| Rate const | kParityRate (QUALITY_ONE) |
| template<> | |
| std::optional< SecretKey > | parseBase58 (TokenType type, std::string const &s) |
| Parse a secret key. | |
| template<> | |
| std::optional< Seed > | parseBase58 (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 bool | hasInvalidAmount (STBase const &field, int depth, beast::Journal j) |
| static bool | hasInvalidAmount (STObject const &object, int depth, beast::Journal j) |
| static bool | hasInvalidAmount (STArray const &array, int depth, beast::Journal j) |
| static std::uint64_t | muldiv (std::uint64_t multiplier, std::uint64_t multiplicand, std::uint64_t divisor) |
| static std::uint64_t | muldivRound (std::uint64_t multiplier, std::uint64_t multiplicand, std::uint64_t divisor, std::uint64_t rounding) |
| static void | canonicalizeRound (bool integral, std::uint64_t &value, int &offset, bool) |
| static void | canonicalizeRoundStrict (bool integral, 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) |
| void | associateAsset (SLE &sle, Asset const &asset) |
| static auto | getTxFormat (TxType type) |
| static Blob | getSigningData (STTx const &that) |
| static std::expected< void, std::string > | singleSignHelper (STObject const &sigObject, Slice const &data) |
| std::expected< void, std::string > | multiSignHelper (STObject const &sigObject, std::optional< AccountID > txnAccountID, 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 | isBatchRawTransactionOkay (STTx const &tx, 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> requires (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) |
| static sqlite_api::sqlite3 * | getConnection (soci::session &s) |
| std::string | getHTTPHeaderTimestamp () |
| 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) |
| static void | populate (Section const §ion, std::string const &field, std::ostream &log, std::vector< boost::asio::ip::network_v4 > &nets4, std::vector< boost::asio::ip::network_v6 > &nets6) |
| static void | saveManifest (soci::session &session, std::string const &dbTable, std::string const &serialized) |
| intr_ptr::SharedPtr< SHAMapLeafNode > | makeTypedLeaf (SHAMapNodeType type, boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t owner) |
| static uint256 const & | depthMask (unsigned int depth) |
| template<typename PreflightChecks> | |
| ApplyResult | apply (ServiceRegistry ®istry, OpenView &view, PreflightChecks &&preflightChecks) |
| ApplyResult | apply (ServiceRegistry ®istry, OpenView &view, uint256 const &parentBatchId, STTx const &tx, ApplyFlags flags, beast::Journal j) |
| static bool | applyBatchTransactions (ServiceRegistry ®istry, OpenView &batchView, STTx const &batchTxn, beast::Journal j) |
| template<class T> | |
| TxConsequences | consequencesHelper (PreflightContext const &ctx) |
| static std::pair< NotTEC, TxConsequences > | invokePreflight (PreflightContext const &ctx) |
| static TER | invokePreclaim (PreclaimContext const &ctx) |
| static XRPAmount | invokeCalculateBaseFee (ReadView const &view, STTx const &tx) |
| Calculates the base fee for a given transaction. | |
| static ApplyResult | invokeApply (ApplyContext &ctx) |
| std::unique_ptr< Transactor > | makeTransactor (ApplyContext &ctx) |
| static bool | validBalances (STAmount const &amount, STAmount const &amount2, STAmount const &lptAMMBalance, ValidAMM::ZeroAllowed zeroAllowed) |
| static std::string | ledgerEntryTypeName (SLE const &sle) |
| static std::optional< STAmount > | clawbackTrustLineBalanceInHolderTerms (SLE::const_pointer const &sle, AccountID const &holder, AccountID const &issuer, Currency const ¤cy) |
| 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 > > | makeBookStepHelper (StrandContext const &ctx, Asset const &in, Asset const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepIi (StrandContext const &ctx, Issue const &in, Issue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepIx (StrandContext const &ctx, Issue const &in) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepXi (StrandContext const &ctx, Issue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepMm (StrandContext const &ctx, MPTIssue const &in, MPTIssue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepMi (StrandContext const &ctx, MPTIssue const &in, Issue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepIm (StrandContext const &ctx, Issue const &in, MPTIssue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepMx (StrandContext const &ctx, MPTIssue const &in) |
| std::pair< TER, std::unique_ptr< Step > > | makeBookStepXm (StrandContext const &ctx, MPTIssue const &out) |
| std::pair< TER, std::unique_ptr< Step > > | makeDirectStepI (StrandContext const &ctx, AccountID const &src, AccountID const &dst, Currency const &c) |
| template<class FlowResult> | |
| static auto | finishFlow (PaymentSandbox &sb, Asset const &srcAsset, Asset const &dstAsset, FlowResult &&f) |
| std::pair< TER, std::unique_ptr< Step > > | makeMptEndpointStep (StrandContext const &ctx, AccountID const &src, AccountID const &dst, MPTID const &mpt) |
| template<StepAmount T> | |
| static T | accountFundsHelper (ReadView const &view, AccountID const &id, T const &amtDefault, Asset const &asset, FreezeHandling freezeHandling, AuthHandling authHandling, beast::Journal j) |
| bool | checkNear (IOUAmount const &expected, IOUAmount 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, Asset const &curAsset) |
| template<class TDerived> | |
| bool | operator== (XRPEndpointStep< TDerived > const &lhs, XRPEndpointStep< TDerived > const &rhs) |
| std::pair< TER, std::unique_ptr< Step > > | makeXrpEndpointStep (StrandContext const &ctx, AccountID const &acc) |
| static NotTEC | preflight1Sponsor (PreflightContext const &ctx) |
| 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) |
| static std::uint32_t | signerCountBasedOwnerCountDelta (std::size_t entryCount, Rules const &rules) |
| static TER | removeSignersFromLedger (ServiceRegistry ®istry, ApplyView &view, Keylet const &accountKeylet, Keylet const &ownerDirKeylet, Keylet const &signerListKeylet, beast::Journal j) |
| 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 &accountID, beast::Journal j) |
| static std::optional< STAmount > | tokensWithdraw (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) |
| static TER | addSLE (ApplyContext &ctx, SLE::ref sle, AccountID const &owner) |
| 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) |
| 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) |
| std::expected< uint256, TER > | determineBrokerID (ReadView const &view, STTx const &tx) |
| std::expected< Asset, TER > | determineAsset (ReadView const &view, AccountID const &account, AccountID const &brokerPseudoAccountID, STAmount const &amount) |
| std::expected< STAmount, TER > | determineClawAmount (SLE const &sleBroker, Asset const &vaultAsset, std::optional< STAmount > const &amount, SLE::const_ref vaultSle, Rules const &rules) |
| template<ValidIssueType T> | |
| static TER | preclaimHelper (PreclaimContext const &ctx, SLE const &sleIssuer, STAmount const &clawAmount) |
| template<> | |
| TER | preclaimHelper< Issue > (PreclaimContext const &ctx, SLE const &sleIssuer, STAmount const &clawAmount) |
| template<> | |
| TER | preclaimHelper< MPTIssue > (PreclaimContext const &ctx, SLE const &sleIssuer, STAmount const &clawAmount) |
| static std::uint32_t | getStartDate (ReadView const &view) |
| static std::uint16_t | extractNFTokenFlagsFromTxFlags (std::uint32_t txFlags) |
| static bool | hasOfferFields (PreflightContext const &ctx) |
| static std::pair< Currency, Currency > | tokenPairKey (STObject const &pair) |
| static bool | adjustOracleOwnerCount (ApplyContext &ctx, int count) |
| static void | setPriceDataInnerObjTemplate (STObject &obj) |
| STAmount | getMaxSourceAmount (AccountID const &account, STAmount const &dstAmount, std::optional< STAmount > const &sendMax) |
| static std::int64_t | totalRemainingOwnerCount (SLE::const_ref sponsorshipSle, std::optional< std::int32_t > const &remainingOwnerCountDelta) |
| static bool | hasSponsorshipBudget (SLE::const_ref sponsorshipSle, std::optional< STAmount > const &feeAmountDelta, std::optional< std::int32_t > const &remainingOwnerCountDelta) |
| static TER | deleteSponsorship (ApplyView &view, SLE::ref sle, beast::Journal j) |
| static TER | incrementSponsorCount (ApplyView &view, SLE::ref sle, SF_UINT32 const &field, std::uint32_t const delta) |
| static TER | decrementSponsorCount (ApplyView &view, SLE::ref sle, SF_UINT32 const &field, std::uint32_t const delta) |
| static TER | decrementPrefundedReserveCount (ApplyView &view, SLE::ref sponsorshipSle, std::uint32_t const delta) |
| 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) |
| static TER | verifyProofs (STTx const &tx, std::shared_ptr< SLE const > const &issuance, std::shared_ptr< SLE const > const &mptoken) |
| Verifies the cryptographic proofs for a ConvertBack transaction. | |
| STAmount | clawbackAmount (SLE::const_ref vault, std::optional< STAmount > const &maybeAmount, AccountID const &account) |
| static STAmount | roundToVaultScale (STAmount const &amount, SLE::const_ref vault) |
| static WaiveUnrealizedLoss | shouldWaiveWithdrawal (ReadView const &view, AccountID const &account, SLE::const_ref issuance) |
| BEAST_DEFINE_TESTSUITE_PRIO (AccountSet, app, xrpl, 1) | |
| BEAST_DEFINE_TESTSUITE (AccountTxPaging, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (AmendmentTable, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Check, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (CheckMPT, tx, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Clawback, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (ClawbackMPT, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (ConfidentialTransfer, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (ConfidentialTransferExtended, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Discrepancy, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (FixNFTokenPageLinks, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Freeze, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (LedgerLoad, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (LoadFeeTrack, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenBaseUtil, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenDisallowIncoming, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenWOMintOffer, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenWOModify, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenAllFeatures, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenAuth, app, xrpl, 2) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenBurn, app, xrpl, 3) | |
| BEAST_DEFINE_TESTSUITE_PRIO (NFTokenDir, app, xrpl, 1) | |
| BEAST_DEFINE_TESTSUITE (OfferStream, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (SetRegularKey, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Ticket, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (TrustAndBalance, app, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Apply, tx, xrpl) | |
| BEAST_DEFINE_TESTSUITE_PRIO (Vault, app, xrpl, 1) | |
| BEAST_DEFINE_TESTSUITE (PerfLog, basics, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Config, core, xrpl) | |
| BEAST_DEFINE_TESTSUITE (SociDB, core, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Workers, core, xrpl) | |
| BEAST_DEFINE_TESTSUITE (ProtocolVersion, overlay, xrpl) | |
| BEAST_DEFINE_TESTSUITE (short_read, overlay, xrpl) | |
| BEAST_DEFINE_TESTSUITE (BuildInfo, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (InnerObjectFormatsParsedJSON, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Issue, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Memo, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (PublicKey, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Quality, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (SecretKey, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Seed, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (SeqProxy, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STAccount, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STAmount, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STInteger, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STNumber, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STObject, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STParsedJSON, protocol, xrpl) | |
| bool | matches (char const *string, char const *regex) |
| Return true if the string loosely matches the regex. | |
| BEAST_DEFINE_TESTSUITE (STTx, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (InnerObjectFormatsSerializer, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (STValidation, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (TER, protocol, xrpl) | |
| BEAST_DEFINE_TESTSUITE (AccountCurrencies, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (AmendmentBlocked, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Connect, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Feature, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (GetCounts, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (LedgerClosed, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE_PRIO (LedgerData, rpc, xrpl, 1) | |
| BEAST_DEFINE_TESTSUITE (LedgerHeader, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (NoRippleCheck, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE_MANUAL_PRIO (NoRippleCheckLimits, rpc, xrpl, 1) | |
| BEAST_DEFINE_TESTSUITE (OwnerInfo, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Peers, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Transaction, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (TransactionEntry, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (TransactionHistory, rpc, xrpl) | |
| BEAST_DEFINE_TESTSUITE (Version, rpc, xrpl) | |
| TEST (FileUtilitiesTest, get_file_contents) | |
| TEST_F (HardenedHashTest, user_types) | |
| TEST_F (HardenedHashTest, containers) | |
| TEST (IOUAmountTest, zero) | |
| TEST (IOUAmountTest, sig_num) | |
| TEST (IOUAmountTest, beast_zero) | |
| TEST (IOUAmountTest, comparisons) | |
| TEST (IOUAmountTest, to_string) | |
| TEST (IOUAmountTest, mul_ratio) | |
| TEST_F (KeyCacheTest, key_cache) | |
| static std::string | fmt (BigInt const &value) |
| BigInt | toBigInt (Number const &n) |
| template<class T = Dec> | |
| static T | pow10 (int n) |
| static std::string | fmt (Dec const &value) |
| TEST (NumberTest, zero) | |
| TEST (NumberTest, limits) | |
| TEST (NumberTest, add) | |
| TEST (NumberTest, sub) | |
| TEST (NumberTest, mul) | |
| TEST (NumberTest, div) | |
| TEST (NumberTest, root) | |
| TEST (NumberTest, root2) | |
| TEST (NumberTest, power1) | |
| TEST (NumberTest, power2) | |
| TEST (NumberTest, conversions) | |
| TEST (NumberTest, to_integer) | |
| TEST (NumberTest, squelch) | |
| TEST (NumberTest, to_string) | |
| TEST (NumberTest, relationals) | |
| TEST (NumberTest, stream) | |
| TEST (NumberTest, inc_dec) | |
| TEST (NumberTest, to_st_amount) | |
| TEST (NumberTest, truncate) | |
| TEST (NumberTest, rounding) | |
| TEST (NumberTest, int64) | |
| TEST (NumberTest, upward_rounding_produces_value_not_below_exact_at_k_max_rep_cusp) | |
| TEST (NumberTest, upward_division_returns_value_not_below_exact_on_large_scale) | |
| TEST (NumberTest, downward_division_returns_value_not_above_exact_on_large_scale) | |
| TEST (NumberTest, to_nearest_division_uses_dropped_digits_on_large_scale) | |
| TEST (NumberTest, subtraction_rounding) | |
| TEST (NumberTest, normalization_cusp_tonearest_and_downward) | |
| TEST (NumberTest, number_add_directed_sign_wrong) | |
| TEST (NumberTest, number_add_to_nearest_picks_farther) | |
| TEST (NumberTest, number_cusp_rounding_with_fractional_parts) | |
| TEST_F (StringUtilitiesTest, un_hex) | |
| TEST_F (StringUtilitiesTest, parse_url) | |
| TEST_F (StringUtilitiesTest, to_string) | |
| TEST_F (StringUtilitiesTest, trimWhitespace) | |
| TEST_F (StringUtilitiesTest, toLower) | |
| TEST_F (StringUtilitiesTest, trimAndLowerIgnoreLocale) | |
| TEST (TaggedCacheTest, tagged_cache) | |
| TEST (XRPAmountTest, sig_num) | |
| TEST (XRPAmountTest, beast_zero) | |
| TEST (XRPAmountTest, comparisons) | |
| TEST (XRPAmountTest, add_sub) | |
| TEST (XRPAmountTest, decimal) | |
| TEST (XRPAmountTest, functions) | |
| TEST (XRPAmountTest, mul_ratio) | |
| TEST (json_value, limits) | |
| TEST (json_value, construct_and_compare_Json_StaticString) | |
| TEST (json_value, different_types) | |
| TEST (json_value, compare_strings) | |
| TEST (json_value, bool) | |
| TEST (json_value, bad_json) | |
| TEST (json_value, parse_double_valid) | |
| TEST (json_value, parse_double_out_of_range) | |
| TEST (json_value, parse_double_malformed) | |
| TEST (json_value, edge_cases) | |
| TEST (json_value, copy) | |
| TEST (json_value, move) | |
| TEST (json_value, comparisons) | |
| TEST (json_value, compact) | |
| TEST (json_value, conversions) | |
| TEST (json_value, access_members) | |
| TEST (json_value, remove_members) | |
| TEST (json_value, iterator) | |
| TEST (json_value, nest_limits) | |
| TEST (json_value, memory_leak) | |
| bool | operator== (node_store::Batch const &lhs, node_store::Batch const &rhs) |
| UInt8Value | canonical_UINT8 () |
| UInt16Value | canonical_UINT16 () |
| UInt32Value | canonical_UINT32 () |
| UInt64Value | canonical_UINT64 () |
| UInt128Value | canonical_UINT128 () |
| UInt160Value | canonical_UINT160 () |
| UInt192Value | canonical_UINT192 () |
| UInt256Value | canonical_UINT256 () |
| Int32Value | canonical_INT32 () |
| NumberValue | canonical_NUMBER () |
| AmountValue | canonical_AMOUNT () |
| AccountValue | canonical_ACCOUNT () |
| CurrencyValue | canonical_CURRENCY () |
| IssueValue | canonical_ISSUE () |
| Vector256Value | canonical_VECTOR256 () |
| BlobValue | canonical_VL () |
| XChainBridgeValue | canonical_XCHAIN_BRIDGE () |
| STArray | canonical_ARRAY () |
| STObject | canonical_OBJECT () |
| STPathSet | canonical_PATHSET () |
| template<class T> | |
| void | expectEqualField (T const &expected, T const &actual, char const *fieldName) |
| template<> | |
| void | expectEqualField< STObject > (STObject const &expected, STObject const &actual, char const *fieldName) |
| template<> | |
| void | expectEqualField< STPathSet > (STPathSet const &expected, STPathSet const &actual, char const *fieldName) |
| template<class T> | |
| void | expectEqualField (T const &expected, std::reference_wrapper< T const > actual, char const *fieldName) |
| 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< Ledger > | 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. | |
| std::shared_ptr< Ledger > | buildLedger (LedgerReplay const &replayData, ApplyFlags applyFlags, Application &app, beast::Journal j) |
| Build a new ledger by replaying transactions. | |
| template<class ApplyTxs> | |
| std::shared_ptr< Ledger > | 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) |
| 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< uint256 > | neededHashes (uint256 const &root, SHAMap &map, int max, SHAMapSyncFilter const *filter) |
| std::unique_ptr< InboundLedgers > | makeInboundLedgers (Application &app, InboundLedgers::clock_type &clock, beast::insight::Collector::ptr const &collector) |
| std::unique_ptr< InboundTransactions > | makeInboundTransactions (Application &app, beast::insight::Collector::ptr const &collector, std::function< void(std::shared_ptr< SHAMap > const &, bool)> gotSet) |
| std::unique_ptr< LedgerCleaner > | makeLedgerCleaner (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. | |
| SHAMapTreeNodePtr | getTreeNode (std::string_view data) |
| Deserializes a SHAMapTreeNode from wire format data. | |
| std::optional< SHAMapNodeID > | getSHAMapNodeID (protocol::TMLedgerNode const &ledgerNode, SHAMapTreeNode const &treeNode) |
| Extracts or reconstructs the SHAMapNodeID from a ledger node proto message. | |
| static bool | saveValidatedLedger (ServiceRegistry ®istry, std::shared_ptr< Ledger const > const &ledger, bool current) |
| bool | pendSaveValidated (ServiceRegistry ®istry, std::shared_ptr< Ledger const > const &ledger, bool isSynchronous, bool isCurrent) |
| Save, or arrange to save, a fully-validated ledger. | |
| std::shared_ptr< Ledger > | loadLedgerHelper (LedgerHeader const &info, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire) |
| Make ledger using info loaded from database. | |
| static void | finishLoadByIndexOrHash (std::shared_ptr< Ledger > const &ledger, beast::Journal j) |
| std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256 > | getLatestLedger (Rules const &rules, Fees const &fees, ServiceRegistry ®istry) |
| Fetch the ledger with the highest sequence contained in the database. | |
| std::shared_ptr< Ledger > | loadByIndex (std::uint32_t ledgerIndex, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire=true) |
| Load a ledger by its sequence number. | |
| std::shared_ptr< Ledger > | loadByHash (uint256 const &ledgerHash, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire=true) |
| Load a ledger by its hash. | |
| void | addJson (json::Value &, LedgerFill const &) |
| Given a Ledger and options, fill a json::Value with a description of the ledger. | |
| json::Value | getJson (LedgerFill const &) |
| Return a new json::Value representing the ledger with given options. | |
| void | copyFrom (json::Value &to, json::Value const &from) |
| Copy all the keys and values from one object into another. | |
| std::unique_ptr< LocalTxs > | makeLocalTxs () |
| 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) |
| static void | logOne (ReadView const &ledger, uint256 const &tx, char const *msg, beast::Journal &j) |
| static void | logMetadataDifference (ReadView const &builtLedger, ReadView const &validLedger, uint256 const &tx, beast::Journal j) |
| static std::vector< SHAMapItem const * > | leaves (SHAMap const &sm) |
| std::unique_ptr< OrderBookDB > | makeOrderBookDb (ServiceRegistry ®istry, OrderBookDBConfig const &config) |
| Create an OrderBookDB instance. | |
| static void | fixConfigPorts (Config &config, Endpoints const &endpoints) |
| std::unique_ptr< Application > | makeApplication (std::unique_ptr< Config > config, std::unique_ptr< Logs > logs, std::unique_ptr< TimeKeeper > timeKeeper) |
| std::unique_ptr< CollectorManager > | makeCollectorManager (Section const ¶ms, beast::Journal journal) |
| std::unique_ptr< LoadManager > | makeLoadManager (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, SecretKey > | getNodeIdentity (Application &app, boost::program_options::variables_map const &cmdline) |
| The cryptographic credentials identifying this server instance. | |
| std::unique_ptr< AmendmentTable > | make_AmendmentTable (ServiceRegistry ®istry, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal) |
| void | convertBlobsToTxResult (RelationalDatabase::AccountTxs &to, std::uint32_t ledgerIndex, 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 §ion) |
| HashRouter::Setup | setupHashRouter (Config const &config) |
| Create HashRouter setup from configuration. | |
| static FeeLevel64 | getFeeLevelPaid (ReadView const &view, STTx const &tx) |
| static std::optional< LedgerIndex > | getLastLedgerSequence (STTx const &tx) |
| static FeeLevel64 | increase (FeeLevel64 level, std::uint32_t increasePercent) |
| TxQ::Setup | setupTxQ (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::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< FeeVote > | makeFeeVote (FeeSetup const &setup, beast::Journal journal) |
| Create an instance of the FeeVote logic. | |
| std::unique_ptr< NetworkOPs > | makeNetworkOPs (ServiceRegistry ®istry, NetworkOPs::clock_type &clock, bool standalone, std::size_t minPeerCount, bool startValid, JobQueue &jobQueue, LedgerMaster &ledgerMaster, ValidatorKeys const &validatorKeys, boost::asio::io_context &ioSvc, beast::Journal journal, beast::insight::Collector::ptr const &collector) |
| static std::uint32_t | trunc32 (std::uint64_t v) |
| std::unique_ptr< SHAMapStore > | makeSHAMapStore (Application &app, node_store::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) |
| SQLiteDatabase | setupRelationalDatabase (ServiceRegistry ®istry, Config const &config, JobQueue &jobQueue) |
| setupRelationalDatabase Creates and returns a SQLiteDatabase instance based on configuration. | |
| 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< peer_finder::Store::Entry > const &v) |
| savePeerFinderDB Saves a new entry to the peer finder database. | |
| FeeSetup | setupFeeVote (Section const §ion) |
| DatabaseCon::Setup | setupDatabaseCon (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) |
| std::optional< std::string > | getFeatureValue (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< BaseUInt< 512 > > | hashLastMessage (SSL const *ssl, size_t(*get)(const SSL *, void *, size_t)) |
| Hashes the latest finished message from an SSL stream. | |
| std::optional< uint256 > | makeSharedValue (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 publicIp, beast::ip::Address remoteIp, 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 publicIp, 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 publicIp, beast::ip::Address remoteIp, 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< Message > | makeSquelchMessage (PublicKey const &validator, bool squelch, uint32_t squelchDuration) |
| Overlay::Setup | setupOverlay (BasicConfig const &config, beast::Journal j) |
| std::unique_ptr< Overlay > | makeOverlay (Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_context &ioContext, 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< PeerImp > | getPeerWithTree (OverlayImpl &ov, uint256 const &rootHash, PeerImp const *skip) |
| static std::shared_ptr< PeerImp > | getPeerWithLedger (OverlayImpl &ov, uint256 const &ledgerHash, LedgerIndex ledger, PeerImp const *skip) |
| std::unique_ptr< PeerSetBuilder > | makePeerSetBuilder (Application &app) |
| std::unique_ptr< PeerSet > | makeDummyPeerSet (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< ProtocolVersion > | parseProtocolVersions (boost::beast::string_view const &s) |
| Parse a set of protocol versions. | |
| std::optional< ProtocolVersion > | negotiateProtocolVersion (std::vector< ProtocolVersion > const &versions) |
| Given a list of supported protocol versions, choose the one we prefer. | |
| std::optional< ProtocolVersion > | negotiateProtocolVersion (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 | makeProtocol (std::uint16_t major, std::uint16_t minor) |
| constexpr std::size_t | maximumManifestsMessageSize (std::size_t const trustedCount, std::size_t const untrustedCount) |
| Upper bound on the wire size of a TMManifests message. | |
| template<typename Predicate> | |
| SendIfPred< Predicate > | sendIf (std::shared_ptr< Message > const &m, Predicate const &f) |
| Helper function to aid in type deduction. | |
| template<typename Predicate> | |
| SendIfNotPred< Predicate > | sendIfNot (std::shared_ptr< Message > const &m, Predicate const &f) |
| Helper function to aid in type deduction. | |
| hash_set< PathAsset > | accountSourceAssets (AccountID const &account, std::shared_ptr< AssetCache > const &lrCache, bool includeXRP) |
| hash_set< PathAsset > | accountDestAssets (AccountID const &account, std::shared_ptr< AssetCache > const &lrCache, bool includeXRP) |
| static std::ostream & | operator<< (std::ostream &os, Pathfinder::NodeType t) |
| static std::ostream & | operator<< (std::ostream &os, Pathfinder::PaymentType t) |
| static bool | isDefaultPath (STPath const &path) |
| static STPath | removeIssuer (STPath const &path) |
| void | addUniquePath (STPathSet &pathSet, STPath const &path) |
| STAmount | largestAmount (STAmount const &amt) |
| STAmount | convertAmount (STAmount const &amt, bool all) |
| bool | convertAllCheck (STAmount const &a) |
| bool | passwordUnrequiredOrSentCorrect (Port const &port, json::Value const ¶ms) |
| 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 ¶ms, beast::ip::Address const &remoteIp) |
| Role | requestRole (Role const &required, Port const &port, json::Value const ¶ms, 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 ¶ms, 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 ¶ms, 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::Value > | 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. | |
| std::shared_ptr< RPCSub > | makeRPCSub (InfoSub::Source &source, boost::asio::io_context &ioContext, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, ServiceRegistry ®istry) |
| 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::string > | buildMap (boost::beast::http::fields const &h) |
| template<class ConstBufferSequence> | |
| static std::string | buffersToString (ConstBufferSequence const &bs) |
| template<class T> | |
| void | logDuration (json::Value const &request, T const &duration, beast::Journal &journal) |
| static json::Value | makeJsonError (json::Int code, json::Value &&message) |
| static Port | toPort (ParsedPort const &parsed, std::ostream &log) |
| static std::vector< Port > | parsePorts (Config const &config, std::ostream &log) |
| static void | setupClient (ServerHandler::Setup &setup) |
| static void | setupOverlay (ServerHandler::Setup &setup) |
| ServerHandler::Setup | setupServerHandler (Config const &config, std::ostream &log) |
| std::unique_ptr< ServerHandler > | makeServerHandler (Application &app, boost::asio::io_context &ioContext, 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) |
| void | injectSLE (json::Value &jv, SLE const &sle) |
| Injects JSON describing a ledger entry. | |
| 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. | |
| bool | getAccountObjects (ReadView const &ledger, AccountID const &account, std::optional< std::vector< LedgerEntryType > > const &typeFilter, uint256 dirIndex, uint256 entryIndex, std::uint32_t const limit, std::optional< bool > const sponsoredFilter, json::Value &jvResult) |
| Gathers all objects for an account in a ledger. | |
| json::Value | doAccountObjects (rpc::JsonContext &context) |
| void | appendOfferJson (SLE::const_ref offer, json::Value &offers) |
| json::Value | doAccountOffers (rpc::JsonContext &context) |
| static std::expected< DelegateFilter, json::Value > | parseDelegateFilter (json::Value const &delegateNode) |
| std::variant< std::optional< LedgerSpecifier >, json::Value > | parseLedgerArgs (rpc::Context &context, json::Value const ¶ms) |
| std::variant< LedgerRange, rpc::Status > | getLedgerRange (rpc::Context &context, std::optional< LedgerSpecifier > const &ledgerSpecifier) |
| std::pair< AccountTxResult, rpc::Status > | doAccountTxHelp (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 | doAccountTx (rpc::JsonContext &context) |
| json::Value | doGatewayBalances (rpc::JsonContext &context) |
| static void | fillTransaction (rpc::JsonContext &context, json::Value &txArray, AccountID const &accountID, std::uint32_t &sequence, ReadView const &ledger) |
| json::Value | doNoRippleCheck (rpc::JsonContext &context) |
| json::Value | doOwnerInfo (rpc::JsonContext &context) |
| json::Value | doBlackList (rpc::JsonContext &context) |
| json::Value | doCanDelete (rpc::JsonContext &context) |
| json::Value | doLedgerCleaner (rpc::JsonContext &context) |
| json::Value | doLedgerRequest (rpc::JsonContext &context) |
| static std::optional< Seed > | validationSeed (json::Value const ¶ms) |
| json::Value | doValidationCreate (rpc::JsonContext &context) |
| double | estimateEntropy (std::string const &input) |
| json::Value | doWalletPropose (rpc::JsonContext &context) |
| json::Value | walletPropose (json::Value const ¶ms) |
| json::Value | doLogLevel (rpc::JsonContext &context) |
| json::Value | doLogRotate (rpc::JsonContext &context) |
| json::Value | doConnect (rpc::JsonContext &context) |
| json::Value | doPeerReservationsAdd (rpc::JsonContext &context) |
| json::Value | doPeerReservationsDel (rpc::JsonContext &context) |
| json::Value | doPeerReservationsList (rpc::JsonContext &context) |
| json::Value | doPeers (rpc::JsonContext &context) |
| json::Value | doLedgerAccept (rpc::JsonContext &context) |
| json::Value | doStop (rpc::JsonContext &context) |
| json::Value | doChannelAuthorize (rpc::JsonContext &context) |
| json::Value | doSign (rpc::JsonContext &context) |
| json::Value | doSignFor (rpc::JsonContext &context) |
| json::Value | doConsensusInfo (rpc::JsonContext &context) |
| json::Value | doFetchInfo (rpc::JsonContext &context) |
| 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 | doPrint (rpc::JsonContext &context) |
| json::Value | doValidatorInfo (rpc::JsonContext &context) |
| json::Value | doValidatorListSites (rpc::JsonContext &context) |
| json::Value | doValidators (rpc::JsonContext &context) |
| json::Value | doUnlList (rpc::JsonContext &context) |
| json::Value | doChannelVerify (rpc::JsonContext &context) |
| json::Value | doAMMInfo (rpc::JsonContext &) |
| json::Value | doBookOffers (rpc::JsonContext &) |
| json::Value | doBookChanges (rpc::JsonContext &) |
| json::Value | doDepositAuthorized (rpc::JsonContext &) |
| json::Value | doFeature (rpc::JsonContext &) |
| json::Value | doFee (rpc::JsonContext &) |
| 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] | |
| 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 | doManifest (rpc::JsonContext &) |
| json::Value | doNFTBuyOffers (rpc::JsonContext &) |
| json::Value | doNFTSellOffers (rpc::JsonContext &) |
| json::Value | doPathFind (rpc::JsonContext &) |
| json::Value | doPause (rpc::JsonContext &) |
| json::Value | doPing (rpc::JsonContext &) |
| json::Value | doRandom (rpc::JsonContext &) |
| json::Value | doResume (rpc::JsonContext &) |
| json::Value | doRipplePathFind (rpc::JsonContext &) |
| json::Value | doServerDefinitions (rpc::JsonContext &) |
| json::Value | doServerInfo (rpc::JsonContext &) |
| json::Value | doServerState (rpc::JsonContext &) |
| json::Value | doSimulate (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 | doUnsubscribe (rpc::JsonContext &) |
| json::Value | doVaultInfo (rpc::JsonContext &) |
| static std::expected< uint256, json::Value > | parseFixed (Keylet const &keylet, json::Value const ¶ms, json::StaticString const &fieldName, unsigned const apiVersion) |
| static FunctionType | fixed (Keylet const &keylet) |
| static std::expected< uint256, json::Value > | parseObjectID (json::Value const ¶ms, json::StaticString const fieldName, std::string const &expectedType="hex string or object") |
| static std::expected< uint256, json::Value > | parseIndex (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseAccountRoot (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseAMM (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseBridge (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseCheck (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseCredential (json::Value const &cred, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseDelegate (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< STArray, json::Value > | parseAuthorizeCredentials (json::Value const &jv) |
| static std::expected< uint256, json::Value > | parseDepositPreauth (json::Value const &dp, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseDID (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseDirectoryNode (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseEscrow (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseLedgerHashes (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseLoanBroker (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseLoan (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseMPToken (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseMPTokenIssuance (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseNFTokenOffer (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseNFTokenPage (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseOffer (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseOracle (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parsePayChannel (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parsePermissionedDomain (json::Value const &pd, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseRippleState (json::Value const &jvRippleState, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseSignerList (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseSponsorship (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseTicket (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseVault (json::Value const ¶ms, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseXChainOwnedClaimID (json::Value const &claimId, json::StaticString const fieldName, unsigned const apiVersion) |
| static std::expected< uint256, json::Value > | parseXChainOwnedCreateAccountClaimID (json::Value const &claimId, json::StaticString const fieldName, unsigned const apiVersion) |
| std::expected< Asset, ErrorCodeI > | getAsset (json::Value const &v, beast::Journal j) |
| std::string | toIso8601 (NetClock::time_point tp) |
| std::optional< json::Value > | validateTakerJSON (json::Value const &taker, json::StaticString const &name) |
| std::optional< json::Value > | parseTakerAssetJSON (Asset &asset, json::Value const &taker, json::StaticString const &name, beast::Journal j) |
| std::optional< json::Value > | parseTakerIssuerJSON (Asset &asset, json::Value const &taker, json::StaticString const &name, beast::Journal j) |
| static void | iteratePriceData (rpc::JsonContext &context, SLE::const_ref sle, std::function< bool(STObject const &)> const &f) |
| Calls callback "f" on the ledger-object sle and up to three previous metadata objects. | |
| static std::tuple< STAmount, Number, std::uint16_t > | getStats (Prices::right_const_iterator const &begin, Prices::right_const_iterator const &end) |
| void | appendNftOfferJson (Application const &app, SLE::const_ref offer, json::Value &offers) |
| json::Value | enumerateNFTOffers (rpc::JsonContext &context, uint256 const &nftId, Keylet const &directory) |
| json::Value const & | getServerDefinitionsJson () |
| static std::expected< std::uint32_t, json::Value > | getAutofillSequence (json::Value const &txJson, rpc::JsonContext &context) |
| static std::optional< json::Value > | autofillSignature (json::Value &sigObject, std::string const &fieldPrefix="tx") |
| static std::optional< json::Value > | autofillTx (json::Value &txJson, rpc::JsonContext &context) |
| static json::Value | getTxJsonFromParams (json::Value const ¶ms) |
| static json::Value | simulateTxn (rpc::JsonContext &context, std::shared_ptr< Transaction > transaction) |
| static std::expected< NetworkOPs::FailHard, json::Value > | getFailHard (rpc::JsonContext const &context) |
| static bool | isValidated (LedgerMaster &ledgerMaster, std::uint32_t seq, uint256 const &hash) |
| std::pair< TxResult, rpc::Status > | doTxHelp (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< uint256 > | parseVault (json::Value const ¶ms, json::Value &jvResult) |
| bool | operator< (Port const &lhs, Port const &rhs) |
| template<class Engine, class Integral> requires (std::is_integral_v<Integral> && detail::is_engine<Engine>::value) | |
| Integral | randInt (Engine &engine, Integral min, Integral max) |
| Return a uniformly distributed random integer. | |
| template<class Integral> requires (std::is_integral_v<Integral>) | |
| Integral | randInt (Integral min, Integral max) |
| template<class Engine, class Integral> requires (std::is_integral_v<Integral> && detail::is_engine<Engine>::value) | |
| Integral | randInt (Engine &engine, Integral max) |
| template<class Integral> requires (std::is_integral_v<Integral>) | |
| Integral | randInt (Integral max) |
| template<class Integral, class Engine> requires (std::is_integral_v<Integral> && detail::is_engine<Engine>::value) | |
| Integral | randInt (Engine &engine) |
| template<class Integral = int> requires (std::is_integral_v<Integral>) | |
| Integral | randInt () |
| template<class Byte, class Engine> requires ( (std::is_same_v<Byte, unsigned char> || std::is_same_v<Byte, std::uint8_t>) && detail::is_engine<Engine>::value) | |
| Byte | randByte (Engine &engine) |
| Return a random byte. | |
| template<class Byte = std::uint8_t> requires (std::is_same_v<Byte, unsigned char> || std::is_same_v<Byte, std::uint8_t>) | |
| Byte | randByte () |
| template<class Engine> | |
| bool | randBool (Engine &engine) |
| Return a random boolean value. | |
| bool | randBool () |
| bool | cdirFirst (ReadView const &view, uint256 const &root, SLE::const_pointer &page, unsigned int &index, uint256 &entry) |
| Returns the first entry in the directory, advancing the index. | |
| bool | dirFirst (ApplyView &view, uint256 const &root, SLE::pointer &page, unsigned int &index, uint256 &entry) |
| bool | cdirNext (ReadView const &view, uint256 const &root, SLE::const_pointer &page, unsigned int &index, uint256 &entry) |
| Returns the next entry in the directory, advancing the index. | |
| bool | dirNext (ApplyView &view, uint256 const &root, SLE::pointer &page, unsigned int &index, uint256 &entry) |
| STAmount | creditLimit (ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const ¤cy) |
| 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 ¤cy) |
| Returns the amount of IOUs issued by issuer that are held by an account. | |
| 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< uint256 > | getNFTokenIDFromPage (TxMeta const &transactionMeta) |
| std::vector< uint256 > | getNFTokenIDFromDeletedOffer (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< uint256 > | getOfferIDFromCreatedOffer (TxMeta const &transactionMeta) |
| void | insertNFTokenOfferID (json::Value &response, std::shared_ptr< STTx const > const &transaction, TxMeta const &transactionMeta) |
| std::optional< KeyType > | publicKeyType (Slice const &slice) |
| Returns the type of public key. | |
| std::optional< KeyType > | publicKeyType (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< Manifest > | deserializeManifest (Slice s, beast::Journal journal) |
| Constructs Manifest from serialized string. | |
| std::optional< Manifest > | deserializeManifest (std::string const &s, beast::Journal journal=beast::Journal(beast::Journal::getNullSink())) |
| template<class T> requires (std::is_same_v<T, char> || std::is_same_v<T, unsigned char>) | |
| std::optional< Manifest > | deserializeManifest (std::vector< T > const &v, beast::Journal journal=beast::Journal(beast::Journal::getNullSink())) |
| std::optional< SHAMapNodeID > | deserializeSHAMapNodeID (void const *data, std::size_t size) |
| Return an object representing a serialized SHAMap Node ID. | |
| std::optional< SHAMapNodeID > | deserializeSHAMapNodeID (std::string_view s) |
| PreflightResult | preflight (ServiceRegistry ®istry, Rules const &rules, STTx const &tx, ApplyFlags flags, beast::Journal j) |
| Gate a transaction based on static information. | |
| PreflightResult | preflight (ServiceRegistry ®istry, Rules const &rules, uint256 const &parentBatchId, STTx const &tx, ApplyFlags flags, beast::Journal j) |
Variables | |
| static constexpr std::chrono::seconds | kEpochOffset |
| Clock for measuring the network time. | |
| constexpr auto | kMuldivMax = std::numeric_limits<std::uint64_t>::max() |
| template<typename T = std::uint64_t, std::size_t Digits = detail::kUint64Digits> | |
| constexpr std::array< T, Digits > | kPowerOfTenImpl = detail::buildPowersOfTen<T, Digits>() |
| constexpr auto | kPowerOfTen = kPowerOfTenImpl<std::uint64_t, detail::kUint64Digits> |
| static constexpr Number | kNumZero {} |
| Number const | kAMMInvariantRelativeTolerance {1, -11} |
| static constexpr std::uint32_t | kSecondsInYear = 365 * 24 * 60 * 60 |
| constexpr std::uint32_t | kMinOracleReserveCount = 1 |
| constexpr std::uint32_t | kMaxOracleReserveCount = 2 |
| constexpr std::size_t | kOracleReserveCountThreshold = 5 |
| CreateGenesisT const | kCreateGenesis {} |
| constexpr std::chrono::seconds | kLedgerPossibleTimeResolutions [] |
| Possible ledger close time resolutions. | |
| constexpr auto | kLedgerDefaultTimeResolution = kLedgerPossibleTimeResolutions[2] |
| Initial resolution of ledger close time. | |
| constexpr auto | kLedgerGenesisTimeResolution = kLedgerPossibleTimeResolutions[0] |
| Close time resolution in genesis ledger. | |
| constexpr auto | kIncreaseLedgerTimeResolutionEvery = 8 |
| How often we increase the close time resolution (in numbers of ledgers). | |
| constexpr auto | kDecreaseLedgerTimeResolutionEvery = 1 |
| How often we decrease the close time resolution (in numbers of ledgers). | |
| constexpr struct xrpl::OpenLedgerT | kOpenLedger |
| constexpr struct xrpl::BatchViewT | kBatchView |
| constexpr std::uint16_t | kTradingFeeThreshold = 1000 |
| constexpr std::uint32_t | kTotalTimeSlotSecs = 24 * 3600 |
| constexpr std::uint16_t | kAuctionSlotTimeIntervals = 20 |
| constexpr std::uint16_t | kAuctionSlotMaxAuthAccounts = 4 |
| constexpr std::uint32_t | kAuctionSlotFeeScaleFactor = 100000 |
| constexpr std::uint32_t | kAuctionSlotDiscountedFeeFraction = 10 |
| constexpr std::uint32_t | kAuctionSlotMinFeeFraction = 25 |
| constexpr std::uint32_t | kAuctionSlotIntervalDuration |
| constexpr std::uint16_t | kVoteMaxSlots = 8 |
| constexpr std::uint32_t | kVoteWeightScaleFactor = 100000 |
| template<ValidIssueType TIss> | |
| constexpr bool | kIsIssueV = std::is_same_v<TIss, Issue> |
| template<ValidIssueType TIss> | |
| constexpr bool | kIsMptissueV = std::is_same_v<TIss, MPTIssue> |
| static constexpr std::size_t | kMaxFeatureNameSize = 63 |
| static constexpr std::size_t | kReservedFeatureNameSize = 32 |
| constexpr std::uint32_t | kFeeUnitsDeprecated = 10 |
| std::array< KeyletDesc< AccountID const & >, 6 > const | kDirectAccountKeylets |
| constexpr std::uint32_t | lsifMPTCanLock = 0x00000002 |
| constexpr std::uint32_t | lsifMPTRequireAuth = 0x00000004 |
| constexpr std::uint32_t | lsifMPTCanEscrow = 0x00000008 |
| constexpr std::uint32_t | lsifMPTCanTrade = 0x00000010 |
| constexpr std::uint32_t | lsifMPTCanTransfer = 0x00000020 |
| constexpr std::uint32_t | lsifMPTCanClawback = 0x00000040 |
| constexpr std::uint32_t | lsifMPTCanHoldConfidentialBalance = 0x00000080 |
| constexpr std::uint32_t | lsifMPTMetadata = 0x00010000 |
| constexpr std::uint32_t | lsifMPTTransferFee = 0x00020000 |
| static std::uint32_t const | kSLcfNoConsensusTime = 0x01 |
| template<ValidPathAsset PA> | |
| constexpr bool | kIsCurrencyV = std::is_same_v<PA, Currency> |
| template<ValidPathAsset PA> | |
| constexpr bool | kIsMptidV = std::is_same_v<PA, MPTID> |
| constexpr std::size_t | kTxMinSizeBytes = 32 |
| Protocol specific constants. | |
| constexpr std::size_t | kTxMaxSizeBytes = megabytes(1) |
| Largest legal byte size of a transaction. | |
| constexpr std::size_t | kUnfundedOfferRemoveLimit = 1000 |
| The maximum number of unfunded offers to delete at once. | |
| constexpr std::size_t | kExpiredOfferRemoveLimit = 256 |
| The maximum number of expired offers to delete at once. | |
| constexpr std::size_t | kOversizeMetaDataCap = 5200 |
| The maximum number of metadata entries allowed in one transaction. | |
| constexpr std::size_t | kDirNodeMaxEntries = 32 |
| The maximum number of entries per directory page. | |
| constexpr std::uint64_t | kDirNodeMaxPages = 262144 |
| The maximum number of pages allowed in a directory. | |
| constexpr std::size_t | kDirMaxTokensPerPage = 32 |
| The maximum number of items in an NFT page. | |
| constexpr std::size_t | kMaxDeletableDirEntries = 1000 |
| The maximum number of owner directory entries for account to be deletable. | |
| constexpr std::size_t | kMaxTokenOfferCancelCount = 500 |
| The maximum number of token offers that can be canceled at once. | |
| constexpr std::size_t | kMaxDeletableTokenOfferEntries = 500 |
| The maximum number of offers in an offer directory for NFT to be burnable. | |
| constexpr std::uint16_t | kMaxTransferFee = 50000 |
| The maximum token transfer fee allowed. | |
| constexpr std::size_t | kMaxTokenUriLength = 256 |
| The maximum length of a URI inside an NFT. | |
| constexpr std::size_t | kMaxDidDocumentLength = 256 |
| The maximum length of a Data element inside a DID. | |
| constexpr std::size_t | kMaxDidUriLength = 256 |
| The maximum length of a URI inside a DID. | |
| constexpr std::size_t | kMaxDidDataLength = 256 |
| The maximum length of an Attestation inside a DID. | |
| constexpr std::size_t | kMaxDomainLength = 256 |
| The maximum length of a domain. | |
| constexpr std::size_t | kMaxCredentialUriLength = 256 |
| The maximum length of a URI inside a Credential. | |
| constexpr std::size_t | kMaxCredentialTypeLength = 64 |
| The maximum length of a CredentialType inside a Credential. | |
| constexpr std::size_t | kMaxCredentialsArraySize = 8 |
| The maximum number of credentials can be passed in array. | |
| constexpr std::size_t | kMaxPermissionedDomainCredentialsArraySize = 10 |
| The maximum number of credentials can be passed in array for permissioned domain. | |
| constexpr std::size_t | kMaxMpTokenMetadataLength = 1024 |
| The maximum length of MPTokenMetadata. | |
| constexpr std::uint64_t | kMaxMpTokenAmount = 0x7FFF'FFFF'FFFF'FFFFull |
| The maximum amount of MPTokenIssuance. | |
| constexpr std::size_t | kMaxDataPayloadLength = 256 |
| The maximum length of Data payload. | |
| constexpr std::uint8_t | kVaultStrategyFirstComeFirstServe = 1 |
| Vault withdrawal policies. | |
| constexpr std::uint8_t | kVaultDefaultIouScale = 6 |
| Default IOU scale factor for a Vault. | |
| constexpr std::uint8_t | kVaultMaximumIouScale = 18 |
| Maximum scale factor for a Vault. | |
| constexpr std::uint32_t | kMinInvestmentPeriod |
| Bounds on the length of a closed-ended vault's Investment phase (RedemptionDate - SubscriptionDate). | |
| constexpr std::uint32_t | kMaxInvestmentPeriod = std::chrono::seconds{std::chrono::years{30}}.count() |
| constexpr std::uint8_t | kMaxAssetCheckDepth = 5 |
| Maximum recursion depth for vault shares being put as an asset inside another vault; counted from 0. | |
| constexpr std::uint32_t | kFlagLedgerInterval = 256 |
| constexpr std::uint16_t | kMaxDeletableAmmTrustLines = 512 |
| The maximum number of trustlines to delete as part of AMM account deletion cleanup. | |
| constexpr std::size_t | kMaxOracleUri = 256 |
| The maximum length of a URI inside an Oracle. | |
| constexpr std::size_t | kMaxOracleProvider = 256 |
| The maximum length of a Provider inside an Oracle. | |
| constexpr std::size_t | kMaxOracleDataSeries = 10 |
| The maximum size of a data series array inside an Oracle. | |
| constexpr std::size_t | kMaxOracleSymbolClass = 16 |
| The maximum length of a SymbolClass inside an Oracle. | |
| constexpr std::size_t | kMaxLastUpdateTimeDelta = 300 |
| The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger. | |
| constexpr std::size_t | kMaxPriceScale = 20 |
| The maximum price scaling factor. | |
| constexpr std::size_t | kMaxTrim = 25 |
| The maximum percentage of outliers to trim. | |
| constexpr std::size_t | kPermissionMaxSize = 10 |
| The maximum number of delegate permissions an account can grant. | |
| constexpr std::size_t | kMaxBatchTxCount = 8 |
| The maximum number of transactions that can be in a batch. | |
| constexpr std::size_t | kMaxBatchSigners = kMaxBatchTxCount * 3 |
| The maximum number of batch signers. | |
| constexpr std::size_t | kEcScalarLength = kMPT_SCALAR_SIZE |
| Length of a secp256k1 scalar in bytes. | |
| constexpr std::size_t | kCompressedEcPointLength = 33 |
| Length of EC point (compressed). | |
| constexpr std::size_t | kEcCiphertextComponentLength = kMPT_ELGAMAL_CIPHER_SIZE |
| Length of one compressed EC point component in an EC ElGamal ciphertext. | |
| constexpr std::size_t | kEcGamalEncryptedTotalLength = kMPT_ELGAMAL_TOTAL_SIZE |
| EC ElGamal ciphertext length: two compressed EC points concatenated. | |
| constexpr std::size_t | kEcPubKeyLength = kMPT_PUBKEY_SIZE |
| Length of EC public key (compressed). | |
| constexpr std::size_t | kEcPrivKeyLength = kMPT_PRIVKEY_SIZE |
| Length of EC private key in bytes. | |
| constexpr std::size_t | kEcBlindingFactorLength = kMPT_BLINDING_FACTOR_SIZE |
| Length of the EC blinding factor in bytes. | |
| constexpr std::size_t | kEcSchnorrProofLength = kMPT_SCHNORR_PROOF_SIZE |
| Length of Schnorr ZKProof for public key registration (compact form) in bytes. | |
| constexpr std::size_t | kEcPedersenCommitmentLength = kMPT_PEDERSEN_COMMIT_SIZE |
| Length of Pedersen Commitment (compressed). | |
| constexpr std::size_t | kEcSingleBulletproofLength = kMPT_SINGLE_BULLETPROOF_SIZE |
| Length of single bulletproof (range proof for 1 commitment) in bytes. | |
| constexpr std::size_t | kEcDoubleBulletproofLength = kMPT_DOUBLE_BULLETPROOF_SIZE |
| Length of double bulletproof (range proof for 2 commitments) in bytes. | |
| constexpr std::size_t | kEcSendSigmaProofLength = SECP256K1_COMPACT_STANDARD_PROOF_SIZE |
| Length of the compact sigma proof component for ConfidentialMPTSend. | |
| constexpr std::size_t | kEcSendProofLength = kEcSendSigmaProofLength + kEcDoubleBulletproofLength |
| 192 bytes compact sigma proof + 754 bytes double bulletproof. | |
| constexpr std::size_t | kEcConvertBackSigmaProofLength = SECP256K1_COMPACT_CONVERTBACK_PROOF_SIZE |
| Length of the compact sigma proof component for ConfidentialMPTConvertBack. | |
| constexpr std::size_t | kEcConvertBackProofLength |
| 128 bytes compact sigma proof + 688 bytes single bulletproof. | |
| constexpr std::size_t | kEcClawbackProofLength = SECP256K1_COMPACT_CLAWBACK_PROOF_SIZE |
| Length of the ZKProof for ConfidentialMPTClawback. | |
| constexpr std::uint32_t | kConfidentialFeeMultiplier = 9 |
| Extra base fee multiplier charged to confidential MPT transactions. | |
| constexpr std::uint8_t | kEcCompressedPrefixEvenY = 0x02 |
| Compressed EC point prefix for even y-coordinate. | |
| constexpr std::uint8_t | kEcCompressedPrefixOddY = 0x03 |
| Compressed EC point prefix for odd y-coordinate. | |
| Rate const | kParityRate |
| A transfer rate signifying a 1:1 exchange. | |
| static std::map< std::string, int > const | kSTypeMap = {XMACRO(TO_MAP)} |
| SField const | sfInvalid |
| SField const | sfGeneric |
| constexpr std::size_t | kMaxParsedJsonDepth = 64 |
| Maximum JSON object nesting depth permitted during parsing. | |
| constexpr std::size_t | kMaxParsedJsonArraySize = 512 |
| Maximum number of elements permitted in any JSON array field during parsing. | |
| constexpr std::uint32_t | kVfFullValidation = 0x00000001 |
| constexpr std::uint32_t | kVfFullyCanonicalSig = 0x80000000 |
| constexpr XRPAmount | kInitialXrp {100'000'000'000 * kDropsPerXrp} |
| Configure the native currency. | |
| static constexpr std::uint32_t | kXrpLedgerEarliestSeq {32570u} |
| The XRP ledger network's earliest allowed sequence. | |
| static constexpr std::uint32_t | kXrpLedgerEarliestFees {562177u} |
| The XRP Ledger mainnet's earliest ledger with a FeeSettings object. | |
| constexpr std::ratio< 80, 100 > | kAmendmentMajorityCalcThreshold |
| The minimum amount of support an amendment should have. | |
| constexpr std::chrono::seconds const | kDefaultAmendmentMajorityTime = weeks{2} |
| The minimum amount of time an amendment must hold a majority. | |
| constexpr FlagValue | tfFullyCanonicalSig = 0x80000000 |
| constexpr FlagValue | tfInnerBatchTxn = 0x40000000 |
| constexpr FlagValue | tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn |
| constexpr FlagValue | tfUniversalMask = ~tfUniversal |
| constexpr FlagValue | tfMPTPaymentMask = ~(tfUniversal | tfPartialPayment) |
| constexpr FlagValue | tfTrustSetPermissionMask |
| constexpr FlagValue | tifMPTCanLock = lsifMPTCanLock |
| constexpr FlagValue | tifMPTRequireAuth = lsifMPTRequireAuth |
| constexpr FlagValue | tifMPTCanEscrow = lsifMPTCanEscrow |
| constexpr FlagValue | tifMPTCanTrade = lsifMPTCanTrade |
| constexpr FlagValue | tifMPTCanTransfer = lsifMPTCanTransfer |
| constexpr FlagValue | tifMPTCanClawback = lsifMPTCanClawback |
| constexpr FlagValue | tifMPTMetadata = lsifMPTMetadata |
| constexpr FlagValue | tifMPTTransferFee = lsifMPTTransferFee |
| constexpr FlagValue | tifMPTCanHoldConfidentialBalance = lsifMPTCanHoldConfidentialBalance |
| constexpr FlagValue | tifMPTokenIssuanceImmutableMask |
| constexpr FlagValue | tfMPTokenIssuanceSetEnableFlagMask |
| constexpr FlagValue | tfTrustLine = 0x00000004 |
| constexpr FlagValue | tfNFTokenMintMaskWithoutMutable |
| constexpr FlagValue | tfNFTokenMintOldMask = ~(~tfNFTokenMintMaskWithoutMutable | tfTrustLine) |
| constexpr FlagValue | tfNFTokenMintOldMaskWithMutable = ~(~tfNFTokenMintOldMask | tfMutable) |
| constexpr FlagValue | tfWithdrawSubTx |
| constexpr FlagValue | tfDepositSubTx |
| constexpr FlagValue | spfSponsorFee = 1 |
| constexpr FlagValue | spfSponsorReserve = 2 |
| constexpr FlagValue | spfSponsorFlagMask = ~(spfSponsorFee | spfSponsorReserve) |
| constexpr XRPAmount | kDropsPerXrp {1'000'000} |
| Number of drops per 1 XRP. | |
| constexpr std::uint32_t | kSqliteTuningCutoff = 10'000'000 |
| constexpr auto | kLgrDbName {"ledger.db"} |
| constexpr std::array< char const *, 5 > | kLgrDbInit |
| constexpr auto | kTxDbName {"transaction.db"} |
| constexpr std::array< char const *, 8 > | kTxDbInit |
| constexpr auto | kWalletDbName {"wallet.db"} |
| constexpr std::array< char const *, 6 > | kWalletDbInit |
| constexpr std::size_t | kMaxSubscriptionsPerConnection = 100'000 |
| Maximum number of subscriptions a single client connection may hold at once. | |
| constexpr std::size_t | kMaxManifestBytes = 358 |
| Largest a valid manifest can be, in decoded bytes. | |
| constexpr std::size_t | kMaxManifestBase64 = base64::encodedSize(kMaxManifestBytes) |
| Largest a valid manifest can be, in base64 characters. | |
| constexpr std::size_t | kMaxUntrustedCount = 300 |
| Default number of untrusted manifests to store in cache and allowed in one Manifest message. | |
| constexpr std::size_t | kMaxTrustedCount = 300 |
| Default number of trusted manifests allowed in a Manifest message. | |
| static constexpr unsigned char const | kWireTypeTransaction = 0 |
| static constexpr unsigned char const | kWireTypeAccountState = 1 |
| static constexpr unsigned char const | kWireTypeInner = 2 |
| static constexpr unsigned char const | kWireTypeCompressedInner = 3 |
| static constexpr unsigned char const | kWireTypeTransactionWithMeta = 4 |
| constexpr std::size_t | kMinShaMapItemBytes = 12 |
| constexpr size_t | kXbridgeMaxAccountCreateClaims = 128 |
| static std::optional< HTTPClientSSLContext > | gHttpClientSslContext |
| static std::unique_ptr< detail::AccountIdCache > | gAccountIdCache |
| static bool const | kReadOnlySet = gFeatureCollections.registrationIsDone() |
| static constexpr std::int64_t | kMinMantissa = STAmount::kMinValue |
| static constexpr std::int64_t | kMaxMantissa = STAmount::kMaxValue |
| static constexpr int | kMinExponent = STAmount::kMinOffset |
| static constexpr int | kMaxExponent = STAmount::kMaxOffset |
| static SField::PrivateAccessTagT | access |
| SField const | kSfHash (access, STI_UINT256, 257, "hash") |
| SField const | kSfIndex (access, STI_UINT256, 258, "index") |
| static std::uint64_t const | kTenTO14 = 100000000000000ull |
| static std::uint64_t const | kTenTO14M1 = kTenTO14 - 1 |
| static std::uint64_t const | kTenTO17 = kTenTO14 * 1000 |
| static constexpr char const * | kAlphabetForward |
| static constexpr std::array< int, 256 > const | kAlphabetReverse |
| CheckpointersCollection | gCheckpointers |
| static auto | gCheckpointPageCount = 1000 |
| static boost::intrusive_ptr< SHAMapItem const > const | kNoItem |
| constexpr HashRouterFlags | kSfSigbad = HashRouterFlags::PRIVATE1 |
| constexpr HashRouterFlags | kSfSiggood = HashRouterFlags::PRIVATE2 |
| constexpr HashRouterFlags | kSfLocalbad = HashRouterFlags::PRIVATE3 |
| constexpr HashRouterFlags | kSfLocalgood = HashRouterFlags::PRIVATE4 |
| static std::uint32_t const | kDefaultSignerListId = 0 |
| constexpr HashRouterFlags | kSfCfInvalid = HashRouterFlags::PRIVATE5 |
| constexpr HashRouterFlags | kSfCfValid = HashRouterFlags::PRIVATE6 |
| static constexpr auto | kPeerCountStart = 5 |
| static constexpr auto | kPeerCountAdd = 3 |
| static constexpr auto | kLedgerTimeoutRetriesMax = 6 |
| static constexpr auto | kLedgerBecomeAggressiveThreshold |
| static constexpr auto | kMissingNodesFind = 256 |
| static constexpr auto | kReqNodesReply = 128 |
| static constexpr auto | kReqNodes = 12 |
| constexpr auto | kLedgerAcquireTimeout = 3000ms |
| static constexpr auto | kStartPeers = 2 |
| static constexpr auto | kSetKeepRounds = 3 |
| static constexpr int | kMaxLedgerGap {100} |
| static constexpr std::chrono::minutes | kMaxLedgerAgeAcquire {1} |
| static constexpr int | kMaxWriteLoadAcquire {8192} |
| constexpr auto | kTxAcquireTimeout = 250ms |
| static constexpr auto | kNormTimeouts = 4 |
| static constexpr auto | kMaxTimeouts = 20 |
| constexpr std::size_t | kFullBelowTargetSize = 524288 |
| constexpr std::chrono::seconds | kFullBelowExpiration = std::chrono::minutes{10} |
| constexpr std::size_t | kMaxPoppedTransactions = 10 |
| constexpr auto | kDefaultRefreshInterval = std::chrono::minutes{5} |
| constexpr auto | kErrorRetryInterval = std::chrono::seconds{30} |
| unsigned constexpr short | kMaxRedirects = 3 |
| static std::array< char const *, 5 > const | kStateNames |
| static auto const | kGenesisAccountId |
| constexpr std::array< std::pair< SizedItem, std::array< int, 5 > >, 13 > | kSizedItems |
| static constexpr char | kFeatureCompr [] = "compr" |
| static constexpr char | kFeatureVprr [] = "vprr" |
| static constexpr char | kFeatureTxrr [] = "txrr" |
| static constexpr char | kFeatureLedgerReplay [] = "ledgerreplay" |
| static constexpr char | kDelimFeature [] = ";" |
| static constexpr char | kDelimValue [] = "," |
| constexpr ProtocolVersion const | kSupportedProtocolList [] |
| The list of protocol versions we speak and we prefer to use. | |
| std::unordered_map< protocol::MessageType, TrafficCount::Category > const | kTypeLookup |
| constexpr std::size_t | kMaximumMessageSize = megabytes(64) |
| constexpr std::size_t | kMaximumPingMessageSize = kilobytes(1) |
| constexpr std::size_t | kManifestFramingBytes = 8 |
| constexpr json::Int | kMethodNotFound = -32601 |
| constexpr json::Int | kServerOverloaded = -32604 |
| constexpr json::Int | kForbidden = -32605 |
| constexpr json::Int | kWrongVersion = -32606 |
| auto const | parseAmendments = fixed(keylet::amendments()) |
| auto const | parseFeeSettings = fixed(keylet::feeSettings()) |
| auto const | parseNegativeUNL = fixed(keylet::negativeUNL()) |
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Callback for filtering SHAMap during sync.
TODO: Remove xrpl::basic_semaphore (and this file) and use std::counting_semaphore.
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.
| using xrpl::uint128 = BaseUInt<128> |
Definition at line 578 of file base_uint.h.
| using xrpl::uint160 = BaseUInt<160> |
Definition at line 579 of file base_uint.h.
| using xrpl::uint256 = BaseUInt<256> |
Definition at line 580 of file base_uint.h.
| using xrpl::uint192 = BaseUInt<192> |
Definition at line 581 of file base_uint.h.
| using xrpl::Blob = std::vector<unsigned char> |
| using xrpl::days |
| using xrpl::weeks = std::chrono::duration<int, std::ratio_multiply<days::period, std::ratio<7>>> |
| using xrpl::KeyCache = TaggedCache<uint256, int, true> |
Definition at line 8 of file KeyCache.h.
| using xrpl::ClosedInterval = 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 27 of file RangeSet.h.
| using xrpl::RangeSet = 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 54 of file RangeSet.h.
| using xrpl::hash_map = std::unordered_map<Key, Value, Hash, Pred, Allocator> |
Definition at line 36 of file UnorderedContainers.h.
| using xrpl::hash_multimap = std::unordered_multimap<Key, Value, Hash, Pred, Allocator> |
Definition at line 44 of file UnorderedContainers.h.
| using xrpl::hash_set = std::unordered_set<Value, Hash, Pred, Allocator> |
Definition at line 51 of file UnorderedContainers.h.
| using xrpl::hash_multiset = std::unordered_multiset<Value, Hash, Pred, Allocator> |
Definition at line 58 of file UnorderedContainers.h.
| using xrpl::strong_hash = beast::Xxhasher |
Definition at line 62 of file UnorderedContainers.h.
| using xrpl::hardened_hash_map = std::unordered_map<Key, Value, Hash, Pred, Allocator> |
Definition at line 70 of file UnorderedContainers.h.
| using xrpl::hardened_partitioned_hash_map = PartitionedUnorderedMap<Key, Value, Hash, Pred, Allocator> |
Definition at line 78 of file UnorderedContainers.h.
| using xrpl::hardened_hash_multimap = std::unordered_multimap<Key, Value, Hash, Pred, Allocator> |
Definition at line 86 of file UnorderedContainers.h.
| using xrpl::hardened_hash_set = std::unordered_set<Value, Hash, Pred, Allocator> |
Definition at line 93 of file UnorderedContainers.h.
| using xrpl::hardened_hash_multiset = std::unordered_multiset<Value, Hash, Pred, Allocator> |
Definition at line 100 of file UnorderedContainers.h.
Definition at line 20 of file BasicConfig.h.
Definition at line 94 of file semaphore.h.
| using xrpl::JobCounter = ClosureCounter<void> |
| using xrpl::SLE = STLedgerEntry |
Definition at line 42 of file ServiceRegistry.h.
| typedef TaggedCache< uint256, SLE const > xrpl::CachedSLEs = TaggedCache<uint256, SLE const> |
Definition at line 43 of file ServiceRegistry.h.
| typedef Validations< RCLValidationsAdaptor > xrpl::RCLValidations = Validations<RCLValidationsAdaptor> |
Alias for RCL-specific instantiation of generic Validations.
Definition at line 82 of file ServiceRegistry.h.
| typedef TaggedCache< SHAMapHash, Blob > xrpl::NodeCache = TaggedCache<SHAMapHash, Blob> |
Definition at line 84 of file ServiceRegistry.h.
Definition at line 391 of file TokenHelpers.h.
| using xrpl::CachedLedger = CachedView<Ledger> |
A ledger wrapped in a CachedView.
Definition at line 441 of file include/xrpl/ledger/Ledger.h.
| using xrpl::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.
| using xrpl::AccountID = BaseUInt<160, detail::AccountIDTag> |
A 160-bit unsigned that uniquely identifies an account.
Definition at line 34 of file AccountID.h.
| using xrpl::Result = boost::outcome_v2::result<T, std::error_code> |
Definition at line 19 of file b58_utils.h.
| using xrpl::sha512_half_hasher = detail::BasicSha512HalfHasher<false> |
| using xrpl::sha512_half_hasher_s = detail::BasicSha512HalfHasher<true> |
| using xrpl::LedgerFlagMap = std::map<std::string, std::uint32_t> |
Definition at line 242 of file LedgerFormats.h.
| using xrpl::MultiApiJson |
Definition at line 190 of file MultiApiJson.h.
| using xrpl::LedgerIndex = std::uint32_t |
A ledger index.
Definition at line 370 of file Protocol.h.
| using xrpl::TxID = uint256 |
A transaction identifier.
The value is computed as the hash of the canonicalized, serialized transaction object.
Definition at line 391 of file Protocol.h.
| using xrpl::LedgerHash = uint256 |
Definition at line 7 of file RippleLedgerHash.h.
| using xrpl::SF_UINT8 = TypedField<STInteger<std::uint8_t>> |
| using xrpl::SF_UINT16 = TypedField<STInteger<std::uint16_t>> |
| using xrpl::SF_UINT32 = TypedField<STInteger<std::uint32_t>> |
| using xrpl::SF_UINT64 = TypedField<STInteger<std::uint64_t>> |
| using xrpl::SF_UINT96 = TypedField<STBitString<96>> |
| using xrpl::SF_UINT128 = TypedField<STBitString<128>> |
| using xrpl::SF_UINT160 = TypedField<STBitString<160>> |
| using xrpl::SF_UINT192 = TypedField<STBitString<192>> |
| using xrpl::SF_UINT256 = TypedField<STBitString<256>> |
| using xrpl::SF_UINT384 = TypedField<STBitString<384>> |
| using xrpl::SF_UINT512 = TypedField<STBitString<512>> |
| using xrpl::SF_INT32 = TypedField<STInteger<std::int32_t>> |
| using xrpl::SF_INT64 = TypedField<STInteger<std::int64_t>> |
| using xrpl::SF_ACCOUNT = TypedField<STAccount> |
| using xrpl::SF_AMOUNT = TypedField<STAmount> |
| using xrpl::SF_ISSUE = TypedField<STIssue> |
| using xrpl::SF_CURRENCY = TypedField<STCurrency> |
| using xrpl::SF_NUMBER = TypedField<STNumber> |
| using xrpl::SF_VL = TypedField<STBlob> |
| using xrpl::SF_VECTOR256 = TypedField<STVector256> |
| using xrpl::STUInt128 = STBitString<128> |
Definition at line 72 of file STBitString.h.
| using xrpl::STUInt160 = STBitString<160> |
Definition at line 73 of file STBitString.h.
| using xrpl::STUInt192 = STBitString<192> |
Definition at line 74 of file STBitString.h.
| using xrpl::STUInt256 = STBitString<256> |
Definition at line 75 of file STBitString.h.
| using xrpl::STUInt8 = STInteger<unsigned char> |
Definition at line 67 of file STInteger.h.
| using xrpl::STUInt16 = STInteger<std::uint16_t> |
Definition at line 68 of file STInteger.h.
| using xrpl::STUInt32 = STInteger<std::uint32_t> |
Definition at line 69 of file STInteger.h.
| using xrpl::STUInt64 = STInteger<std::uint64_t> |
Definition at line 70 of file STInteger.h.
| using xrpl::STInt32 = STInteger<std::int32_t> |
Definition at line 72 of file STInteger.h.
| using xrpl::TERUnderlyingType = int |
| using xrpl::NotTEC = TERSubset<CanCvtToNotTEC> |
| using xrpl::TER = TERSubset<CanCvtToTER> |
| using xrpl::B58Result = std::expected<T, std::error_code> |
| using xrpl::FlagValue = std::uint32_t |
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.
| using xrpl::FlagMap = std::map<std::string, FlagValue> |
| using xrpl::FlagMapPairList = std::vector<std::pair<std::string, FlagMap>> |
| using xrpl::Directory = BaseUInt<256, detail::DirectoryTag> |
Directory is an index into the directory of offer books.
The last 64 bits of this are the quality.
Definition at line 37 of file UintTypes.h.
| using xrpl::Currency = BaseUInt<160, detail::CurrencyTag> |
Currency is a hash representing a specific currency.
Definition at line 42 of file UintTypes.h.
| using xrpl::NodeID = BaseUInt<160, detail::NodeIDTag> |
NodeID is a 160-bit hash representing one node.
Definition at line 47 of file UintTypes.h.
| using xrpl::MPTID = BaseUInt<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 54 of file UintTypes.h.
| using xrpl::Domain = BaseUInt<256> |
Domain is a 256-bit hash representing a specific domain.
Definition at line 59 of file UintTypes.h.
| using xrpl::FeeLevel = unit::ValueUnit<unit::feelevelTag, T> |
| using xrpl::FeeLevel64 = FeeLevel<std::uint64_t> |
| using xrpl::FeeLevelDouble = FeeLevel<double> |
| using xrpl::Bips = unit::ValueUnit<unit::BipsTag, T> |
| using xrpl::Bips16 = Bips<std::uint16_t> |
| using xrpl::Bips32 = Bips<std::uint32_t> |
| using xrpl::TenthBips = unit::ValueUnit<unit::TenthBipsTag, T> |
| using xrpl::TenthBips16 = TenthBips<std::uint16_t> |
| using xrpl::TenthBips32 = TenthBips<std::uint32_t> |
| using xrpl::Endpoints = std::unordered_map<std::string, boost::asio::ip::tcp::endpoint> |
Definition at line 27 of file ServerImpl.h.
| typedef boost::beast::http::request< boost::beast::http::dynamic_body > xrpl::http_request_type = boost::beast::http::request<boost::beast::http::dynamic_body> |
| typedef boost::beast::http::response< boost::beast::http::dynamic_body > xrpl::http_response_type = boost::beast::http::response<boost::beast::http::dynamic_body> |
Definition at line 142 of file FullBelowCache.h.
Definition at line 17 of file SHAMapTreeNode.h.
| using xrpl::TreeNodeCache |
Definition at line 10 of file TreeNodeCache.h.
| using xrpl::InvariantChecks |
Definition at line 434 of file InvariantCheck.h.
| using xrpl::XChainModifyBridge = BridgeModify |
Definition at line 84 of file XChainBridge.h.
Definition at line 332 of file XChainBridge.h.
| using xrpl::EnableAmendment = Change |
| using xrpl::SetFee = Change |
| using xrpl::UNLModify = Change |
| using xrpl::sha256_t = UnsignedInteger<256, std::size_t> |
Definition at line 146 of file hardened_hash.cpp.
| using xrpl::BigInt = boost::multiprecision::cpp_int |
Definition at line 32 of file tests/libxrpl/basics/Number.cpp.
| using xrpl::Dec = boost::multiprecision::cpp_dec_float_50 |
Definition at line 33 of file tests/libxrpl/basics/Number.cpp.
| using xrpl::UInt8Value = std::decay_t<typename SF_UINT8::type::value_type> |
Definition at line 32 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt16Value = std::decay_t<typename SF_UINT16::type::value_type> |
Definition at line 39 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt32Value = std::decay_t<typename SF_UINT32::type::value_type> |
Definition at line 46 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt64Value = std::decay_t<typename SF_UINT64::type::value_type> |
Definition at line 53 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt128Value = std::decay_t<typename SF_UINT128::type::value_type> |
Definition at line 60 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt160Value = std::decay_t<typename SF_UINT160::type::value_type> |
Definition at line 67 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt192Value = std::decay_t<typename SF_UINT192::type::value_type> |
Definition at line 74 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::UInt256Value = std::decay_t<typename SF_UINT256::type::value_type> |
Definition at line 81 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::Int32Value = std::decay_t<typename SF_INT32::type::value_type> |
Definition at line 88 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::NumberValue = std::decay_t<typename SF_NUMBER::type::value_type> |
Definition at line 95 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::AmountValue = std::decay_t<typename SF_AMOUNT::type::value_type> |
Definition at line 102 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::AccountValue = std::decay_t<typename SF_ACCOUNT::type::value_type> |
Definition at line 109 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::CurrencyValue = std::decay_t<typename SF_CURRENCY::type::value_type> |
Definition at line 116 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::IssueValue = std::decay_t<typename SF_ISSUE::type::value_type> |
Definition at line 123 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::Vector256Value = std::decay_t<typename SF_VECTOR256::type::value_type> |
Definition at line 130 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::BlobValue = std::decay_t<typename SF_VL::type::value_type> |
Definition at line 137 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::XChainBridgeValue = std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> |
Definition at line 145 of file /libxrpl/protocol_autogen/TestHelpers.h.
| using xrpl::OrderedTxs = CanonicalTXSet |
Definition at line 35 of file OpenLedger.h.
| using xrpl::socket_type = boost::beast::tcp_stream |
Definition at line 23 of file Handshake.h.
| using xrpl::stream_type = boost::beast::ssl_stream<socket_type> |
Definition at line 24 of file Handshake.h.
| using xrpl::request_type = boost::beast::http::request<boost::beast::http::empty_body> |
Definition at line 25 of file Handshake.h.
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 19 of file ProtocolVersion.h.
Definition at line 84 of file AccountTx.cpp.
Definition at line 85 of file AccountTx.cpp.
Definition at line 86 of file AccountTx.cpp.
Definition at line 87 of file AccountTx.cpp.
Definition at line 88 of file AccountTx.cpp.
Definition at line 89 of file AccountTx.cpp.
| using xrpl::FunctionType |
Definition at line 38 of file LedgerEntry.cpp.
| using xrpl::Prices = bimap<multiset_of<std::uint32_t, std::greater<>>, multiset_of<STAmount>> |
Definition at line 45 of file GetAggregatePrice.cpp.
|
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 23 of file IntrusiveRefCounts.h.
|
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 34 of file IntrusiveRefCounts.h.
|
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.
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.
Definition at line 43 of file ConsensusTypes.h.
|
strong |
Phases of consensus for a single ledger round.
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).
Definition at line 100 of file ConsensusTypes.h.
|
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 266 of file ConsensusTypes.h.
|
strong |
Status of validation we received.
Definition at line 167 of file Validations.h.
|
strong |
| Enumerator | |
|---|---|
| UNDEFINED | |
| BAD | |
| SAVED | |
| HELD | |
| TRUSTED | |
| PRIVATE1 | |
| PRIVATE2 | |
| PRIVATE3 | |
| PRIVATE4 | |
| PRIVATE5 | |
| PRIVATE6 | |
Definition at line 20 of file HashRouter.h.
| enum xrpl::JobType |
|
strong |
| Enumerator | |
|---|---|
| Fresh | |
| Normal | |
| Load | |
| LoadFile | |
| Replay | |
| Network | |
Definition at line 8 of file StartUpType.h.
| enum xrpl::ApplyFlags : std::uint32_t |
| Enumerator | |
|---|---|
| TapNone | |
| TapFailHard | |
| TapRetry | |
| TapUnlimited | |
| TapBatch | |
| TapDryRun | |
Definition at line 27 of file ApplyView.h.
|
strong |
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 52 of file AMMHelpers.h.
|
strong |
| Enumerator | |
|---|---|
| Regular | |
| Late | |
| Full | |
| Overpayment | |
Definition at line 620 of file LendingHelpers.h.
|
strong |
Controls the treatment of frozen account balances.
| Enumerator | |
|---|---|
| IgnoreFreeze | |
| ZeroIfFrozen | |
Definition at line 34 of file TokenHelpers.h.
|
strong |
Controls the treatment of unauthorized MPT balances.
| Enumerator | |
|---|---|
| IgnoreAuth | |
| ZeroIfUnauthorized | |
Definition at line 39 of file TokenHelpers.h.
|
strong |
Controls whether to include the account's full spendable balance.
| Enumerator | |
|---|---|
| SimpleBalance | |
| FullBalance | |
Definition at line 44 of file TokenHelpers.h.
|
strong |
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 46 of file TokenHelpers.h.
|
strong |
Controls whether accountSend is allowed to overflow OutstandingAmount *.
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 51 of file TokenHelpers.h.
|
strong |
Controls whether canTransfer enforces lsfMPTCanTransfer on MPTs.
Default is No (enforce). Use Yes at call sites that must remain available even when an MPT issuer has cleared lsfMPTCanTransfer - for example, unwinding existing positions in SAV or the Lending Protocol. Has no effect on the IOU branch of canTransfer.
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 61 of file TokenHelpers.h.
|
strong |
| Enumerator | |
|---|---|
| StrongAuth | |
| WeakAuth | |
| Legacy | |
Definition at line 72 of file TokenHelpers.h.
|
strong |
Controls whether to truncate shares instead of rounding.
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 47 of file VaultHelpers.h.
|
strong |
Controls whether the withdraw conversion helpers (assetsToSharesWithdraw and sharesToAssetsWithdraw) subtract sfLossUnrealized from sfAssetsTotal before computing the exchange rate.
The default (No) applies the standard discounted rate; Yes is used when the redeemer is the sole remaining shareholder.
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 56 of file VaultHelpers.h.
|
strong |
|
strong |
|
strong |
The types of node objects.
| Enumerator | |
|---|---|
| Unknown | |
| Ledger | |
| AccountNode | |
| TransactionNode | |
| Dummy | |
Definition at line 18 of file NodeObject.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| InputTooLarge | |
| InputTooSmall | |
| BadB58Character | |
| OutputTooSmall | |
| MismatchedTokenType | |
| MismatchedChecksum | |
| InvalidEncodingChar | |
| OverflowAdd | |
| Unknown | |
Definition at line 8 of file token_errors.h.
| enum xrpl::ErrorCodeI |
Definition at line 23 of file ErrorCodes.h.
| enum xrpl::WarningCodeI |
Codes returned in the warnings array of certain RPC commands.
These values need to remain stable.
| Enumerator | |
|---|---|
| WarnRpcUnsupportedMajority | |
| WarnRpcAmendmentBlocked | |
| WarnRpcExpiredValidatorList | |
| WarnRpcFieldsDeprecated | |
Definition at line 157 of file ErrorCodes.h.
|
strong |
|
strong |
|
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".
| 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 | |
| PaymentChannelClaim | Payment Channel Claim. |
| Batch | |
Definition at line 35 of file HashPrefix.h.
|
strong |
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.
| 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.
|
| 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.
|
| ltNICKNAME | A legacy, deprecated type. |
| ltCONTRACT | A legacy, deprecated type. |
| ltGENERATOR_MAP | A legacy, deprecated type. |
Definition at line 40 of file LedgerFormats.h.
| Enumerator | |
|---|---|
| XMACRO | |
Definition at line 228 of file LedgerFormats.h.
|
strong |
Enumeration of ledger shortcuts for specifying which ledger to use.
These shortcuts provide a convenient way to reference commonly used ledgers without needing to specify their exact hash or sequence number.
| Enumerator | |
|---|---|
| Current | The current working ledger (open, not yet closed). |
| Closed | The most recently closed ledger (may not be validated). |
| Validated | The most recently validated ledger. |
Definition at line 11 of file LedgerShortcut.h.
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 29 of file Permissions.h.
| enum xrpl::Delegation |
| Enumerator | |
|---|---|
| Delegable | |
| NotDelegable | |
Definition at line 44 of file Permissions.h.
|
strong |
Vault ledger-entry schema versions.
Assigned to newly created Vaults once featureLendingProtocolV1_1 is enabled. Vaults created before activation are left without LEVersion (implicit legacy version 0, accrual-basis accounting).
| Enumerator | |
|---|---|
| Legacy | |
| CashBasis | |
Definition at line 326 of file Protocol.h.
|
strong |
Vault kind.
Distinguishes closed-ended vaults from the default open-ended kind. Persisted as sfVaultKind (UINT8); absent means OpenEnded.
| Enumerator | |
|---|---|
| OpenEnded | |
| ClosedEnded | |
Definition at line 335 of file Protocol.h.
|
strong |
Lifecycle phase of a vault.
Open-ended vaults are always NoPhase; the other three values are the phases of a closed-ended vault.
| Enumerator | |
|---|---|
| NoPhase | |
| Subscription | |
| Investment | |
| Redemption | |
Definition at line 344 of file Protocol.h.
|
strong |
| Enumerator | |
|---|---|
| Canonical | |
| FullyCanonical | |
Definition at line 184 of file PublicKey.h.
| enum xrpl::SOEStyle |
Kind of element in each entry of an SOTemplate.
| Enumerator | |
|---|---|
| SoeInvalid | |
| SoeRequired | |
| SoeOptional | |
| SoeDefault | |
Definition at line 20 of file SOTemplate.h.
| enum xrpl::SOETxMPTIssue |
Amount fields that can support MPT.
| Enumerator | |
|---|---|
| SoeMptNone | |
| SoeMptSupported | |
| SoeMptNotSupported | |
Definition at line 34 of file SOTemplate.h.
|
strong |
| enum xrpl::TELcodes : TERUnderlyingType |
| enum xrpl::TEMcodes : TERUnderlyingType |
| enum xrpl::TEFcodes : TERUnderlyingType |
| enum xrpl::TERcodes : TERUnderlyingType |
| enum xrpl::TEScodes : TERUnderlyingType |
| enum xrpl::TECcodes : TERUnderlyingType |
|
strong |
| enum xrpl::TxType : std::uint16_t |
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.
Definition at line 44 of file TxFormats.h.
|
strong |
| Enumerator | |
|---|---|
| All | |
| Some | |
| Unknown | |
Definition at line 5 of file TxSearched.h.
|
strong |
| Enumerator | |
|---|---|
| NonDstMismatch | |
| MatchExceptDst | |
| Match | |
Definition at line 233 of file XChainAttestations.h.
|
strong |
Enumeration of possible delegate types that can occur during filtering in account_tx.
Definition at line 51 of file RelationalDatabase.h.
|
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. |
| UntrustedCapacity | Unlisted and limit reached. |
Definition at line 320 of file Manifest.h.
|
strong |
Whether a manifest counts against the 'untrusted' cache cap.
Passed to ManifestCache::applyManifest with no default, so every caller must choose. Capped is the safe, flood-resistant value; only listed or configured keys should use Uncapped.
| Enumerator | |
|---|---|
| Capped | Subject to the untrusted cap (unlisted peer gossip). |
| Uncapped | Bypasses the cap (listed/trusted or config manifests). |
Definition at line 363 of file Manifest.h.
|
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).
Definition at line 60 of file NetworkOPs.h.
|
strong |
|
strong |
Describes the current state of a given SHAMap.
|
strong |
| Enumerator | |
|---|---|
| TRANSACTION | |
| STATE | |
| FREE | |
Definition at line 13 of file SHAMapMissingNode.h.
|
strong |
| Enumerator | |
|---|---|
| TnInner | |
| TnTransactionNm | |
| TnTransactionMd | |
| TnAccountState | |
Definition at line 30 of file SHAMapTreeNode.h.
|
strong |
Describes the pre-processing validity of a transaction.
| 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. |
|
strong |
Enum class for return value from applyTransaction.
| Enumerator | |
|---|---|
| Success | Applied to this ledger. |
| Fail | Should not be retried in this ledger. |
| Retry | Should be retried in this ledger. |
| enum xrpl::Privilege |
Definition at line 31 of file InvariantCheckPrivilege.h.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Account | |
| Delegate | |
| SponsorCoSigned | |
| SponsorPreFunded | |
Definition at line 135 of file Transactor.h.
|
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.
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 63 of file tx/transactors/dex/AMMWithdraw.h.
|
strong |
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.
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.
Definition at line 71 of file Indexes.cpp.
|
strong |
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 27 of file RCLValidations.h.
|
strong |
Outcome of processing an incoming ledger-replay response.
| Enumerator | |
|---|---|
| Ok | Accepted. |
| BadData | Peer reported has_error() (legitimate "cannot fulfill" signal). |
| Malformed | Protocol-level violation; no honest peer would produce this. |
Definition at line 16 of file LedgerReplayMsgHandler.h.
|
strong |
| Enumerator | |
|---|---|
| NEW | |
| INVALID | |
| INCLUDED | |
| CONFLICTED | |
| COMMITTED | |
| HELD | |
| REMOVED | |
| OBSOLETE | |
| INCOMPLETE | |
Definition at line 39 of file Transaction.h.
|
strong |
Definition at line 48 of file ValidatorList.h.
|
strong |
| Enumerator | |
|---|---|
| Available | |
| Expired | |
| Unavailable | |
| Revoked | |
Definition at line 98 of file ValidatorList.h.
|
strong |
| Enumerator | |
|---|---|
| SweepInterval | |
| TreeCacheSize | |
| TreeCacheAge | |
| LedgerSize | |
| LedgerAge | |
| LedgerFetch | |
| HashNodeDbCache | |
| TxnDbCache | |
| LgrDbCache | |
| OpenFinalLimit | |
| BurstSize | |
| RamSizeGb | |
| AccountIdCacheSize | |
Definition at line 30 of file src/xrpld/core/Config.h.
|
strong |
| Enumerator | |
|---|---|
| LedgerReplay | |
| LedgerNodeDepth | |
Definition at line 22 of file xrpld/overlay/Peer.h.
|
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 27 of file TrustLine.h.
|
strong |
| void xrpl::generalizedSetIntersection | ( | InputIter1 | first1, |
| InputIter1 | last1, | ||
| InputIter2 | first2, | ||
| InputIter2 | last2, | ||
| Action | action, | ||
| Comp | comp ) |
Definition at line 16 of file algorithm.h.
| FwdIter1 xrpl::removeIfIntersectOrMatch | ( | FwdIter1 | first1, |
| FwdIter1 | last1, | ||
| InputIter2 | first2, | ||
| InputIter2 | last2, | ||
| Pred | pred, | ||
| Comp | comp ) |
Definition at line 56 of file algorithm.h.
| void xrpl::extractTarLz4 | ( | std::filesystem::path const & | src, |
| std::filesystem::path const & | dst ) |
Extract a tar archive compressed with lz4.
| src | the path of the archive to be extracted |
| dst | the directory to extract to |
| runtime_error |
Definition at line 16 of file Archive.cpp.
| std::string xrpl::base64Encode | ( | std::uint8_t const * | data, |
| std::size_t | len ) |
Definition at line 190 of file libxrpl/basics/base64.cpp.
| std::string xrpl::base64Encode | ( | std::string_view | s | ) |
| std::string xrpl::base64Decode | ( | std::string_view | data | ) |
Definition at line 199 of file libxrpl/basics/base64.cpp.
|
nodiscardconstexpr |
Definition at line 584 of file base_uint.h.
|
nodiscardconstexpr |
Definition at line 606 of file base_uint.h.
|
constexpr |
Definition at line 614 of file base_uint.h.
|
constexpr |
Definition at line 622 of file base_uint.h.
|
constexpr |
Definition at line 629 of file base_uint.h.
|
constexpr |
Definition at line 636 of file base_uint.h.
|
constexpr |
Definition at line 643 of file base_uint.h.
| std::string xrpl::to_string | ( | BaseUInt< Bits, Tag > const & | a | ) |
Definition at line 651 of file base_uint.h.
| std::string xrpl::toShortString | ( | BaseUInt< Bits, Tag > const & | a | ) |
Definition at line 658 of file base_uint.h.
| std::ostream & xrpl::operator<< | ( | std::ostream & | out, |
| BaseUInt< Bits, Tag > const & | u ) |
Definition at line 665 of file base_uint.h.
| std::size_t xrpl::extract | ( | uint256 const & | key | ) |
Definition at line 673 of file base_uint.h.
|
constexprnoexcept |
Definition at line 7 of file ByteUtilities.h.
|
constexprnoexcept |
Definition at line 14 of file ByteUtilities.h.
| std::string xrpl::to_string | ( | date::sys_time< Duration > | tp | ) |
| std::string xrpl::to_string | ( | NetClock::time_point | tp | ) |
| std::string xrpl::toStringIso | ( | date::sys_time< Duration > | tp | ) |
| std::string xrpl::toStringIso | ( | NetClock::time_point | tp | ) |
| Stopwatch & xrpl::stopwatch | ( | ) |
| void xrpl::logThrow | ( | std::string const & | title | ) |
Generates and logs a call stack.
Definition at line 13 of file libxrpl/basics/contract.cpp.
| XRPL_NO_SANITIZE_ADDRESS void xrpl::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.
ASAN can't handle sudden jumps in control flow very well. This function is marked as XRPL_NO_SANITIZE_ADDRESS to prevent it from triggering false positives, since it throws.
Definition at line 36 of file contract.h.
| XRPL_NO_SANITIZE_ADDRESS void xrpl::Throw | ( | Args &&... | args | ) |
Definition at line 52 of file contract.h.
|
noexcept |
Called when faulty logic causes a broken invariant.
Definition at line 19 of file libxrpl/basics/contract.cpp.
| std::string xrpl::getFileContents | ( | std::error_code & | ec, |
| std::filesystem::path const & | sourcePath, | ||
| std::optional< std::size_t > | maxSize = std::nullopt ) |
Definition at line 23 of file libxrpl/basics/FileUtilities.cpp.
| void xrpl::writeFileContents | ( | std::error_code & | ec, |
| std::filesystem::path const & | destPath, | ||
| std::string const & | contents ) |
Definition at line 62 of file libxrpl/basics/FileUtilities.cpp.
| std::filesystem::path xrpl::uniqueRandomPath | ( | std::filesystem::path const & | base, |
| std::string const & | prefix = "", | ||
| std::size_t | maxAttempts = 100 ) |
Generate a unique, non-existing path under base whose filename starts with prefix and ends with a random hex suffix.
Attempts up to maxAttempts paths. Throws std::runtime_error if a unique path cannot be found or if the filesystem returns an error while checking for existence.
Definition at line 85 of file libxrpl/basics/FileUtilities.cpp.
| SharedIntrusive< TT > xrpl::makeSharedIntrusive | ( | 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 493 of file IntrusivePointer.h.
| void xrpl::partialDestructorFinished | ( | T ** | o | ) |
Definition at line 467 of file IntrusiveRefCounts.h.
| Stream & xrpl::join | ( | Stream & | s, |
| Iter | iter, | ||
| Iter | end, | ||
| std::string_view | delimiter ) |
| std::unique_ptr< beast::Journal::Sink > xrpl::setDebugLogSink | ( | std::unique_ptr< beast::Journal::Sink > | sink | ) |
| beast::Journal xrpl::debugLog | ( | ) |
| std::shared_ptr< boost::asio::ssl::context > xrpl::makeSslContext | ( | std::string const & | cipherList | ) |
Create a self-signed SSL context that allows anonymous Diffie Hellman.
Definition at line 356 of file make_SSLContext.cpp.
| std::shared_ptr< boost::asio::ssl::context > xrpl::makeSslContextAuthed | ( | 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 367 of file make_SSLContext.cpp.
| MallocTrimReport xrpl::mallocTrim | ( | std::string_view | tag, |
| beast::Journal | journal ) |
Attempt to return freed memory to the operating system.
On Linux with glibc malloc, this issues ::malloc_trim(0), which may release free space from ptmalloc arenas back to the kernel. On other platforms, or if a different allocator is in use, this function is a no-op and the report will indicate that trimming is unsupported or had no effect.
| tag | Identifier for logging/debugging purposes. |
| journal | Journal for diagnostic logging. |
Definition at line 77 of file libxrpl/basics/MallocTrim.cpp.
|
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
| count | dividend |
| total | divisor |
Definition at line 25 of file MathUtilities.h.
| std::optional< std::uint64_t > xrpl::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.
| None |
Definition at line 11 of file libxrpl/basics/mulDiv.cpp.
| std::string xrpl::to_string | ( | Number const & | amount | ) |
Definition at line 1367 of file libxrpl/basics/Number.cpp.
|
constexpr |
|
constexpr |
Definition at line 1468 of file libxrpl/basics/Number.cpp.
Definition at line 1491 of file libxrpl/basics/Number.cpp.
Definition at line 1565 of file libxrpl/basics/Number.cpp.
Definition at line 1612 of file libxrpl/basics/Number.cpp.
| std::string xrpl::to_string | ( | MantissaRange::MantissaScale const & | scale | ) |
Definition at line 36 of file libxrpl/basics/Number.cpp.
| std::string xrpl::to_string | ( | Number::RoundingMode const & | round | ) |
Definition at line 54 of file libxrpl/basics/Number.cpp.
|
static |
Definition at line 21 of file partitioned_unordered_map.h.
| std::size_t xrpl::extract | ( | std::string const & | key | ) |
Definition at line 28 of file partitioned_unordered_map.h.
| beast::xor_shift_engine & xrpl::defaultPrng | ( | ) |
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 48 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | Engine & | engine, |
| Integral | min, | ||
| Integral | max ) |
Return a uniformly distributed random integer.
| min | The smallest value to return. If not specified the value defaults to 0. |
| max | The 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.
Definition at line 97 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | Integral | min, |
| Integral | max ) |
Definition at line 110 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | Engine & | engine, |
| Integral | max ) |
Definition at line 118 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | Integral | max | ) |
Definition at line 126 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | Engine & | engine | ) |
Definition at line 134 of file include/xrpl/basics/random.h.
| Integral xrpl::randInt | ( | ) |
Definition at line 142 of file include/xrpl/basics/random.h.
| Byte xrpl::randByte | ( | Engine & | engine | ) |
Return a random byte.
Definition at line 155 of file include/xrpl/basics/random.h.
| Byte xrpl::randByte | ( | ) |
Definition at line 166 of file include/xrpl/basics/random.h.
| bool xrpl::randBool | ( | Engine & | engine | ) |
Return a random boolean value.
Definition at line 179 of file include/xrpl/basics/random.h.
| bool xrpl::randBool | ( | ) |
Definition at line 185 of file include/xrpl/basics/random.h.
| ClosedInterval< T > xrpl::range | ( | T | low, |
| T | high ) |
Create a closed range interval.
Helper function to create a closed range interval without having to qualify the template argument.
Definition at line 37 of file RangeSet.h.
| std::string xrpl::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()
| ci | The closed interval to convert |
Definition at line 68 of file RangeSet.h.
| std::string xrpl::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.
| rs | The rangeset to convert |
Definition at line 86 of file RangeSet.h.
|
nodiscard |
Convert the given styled string to a RangeSet.
The styled string representation is the set of disjoint intervals joined by commas.
| rs | The set to be populated |
| s | The styled string to convert |
Definition at line 111 of file RangeSet.h.
| std::optional< T > xrpl::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.
| rs | The set of interest |
| t | The value that must be larger than the result |
| minVal | (Default is 0) The smallest allowed value |
Definition at line 181 of file RangeSet.h.
|
constexprnoexcept |
Definition at line 21 of file safe_cast.h.
|
constexprnoexcept |
Definition at line 35 of file safe_cast.h.
|
constexprnoexcept |
Definition at line 43 of file safe_cast.h.
|
constexprnoexcept |
Definition at line 55 of file safe_cast.h.
|
constexprnoexcept |
Definition at line 67 of file safe_cast.h.
|
constexprnoexcept |
Definition at line 75 of file safe_cast.h.
|
noexcept |
Definition at line 84 of file safe_cast.h.
|
noexcept |
Definition at line 98 of file safe_cast.h.
| xrpl::ScopeExit | ( | EF | ) | -> ScopeExit< EF > |
| xrpl::ScopeFail | ( | EF | ) | -> ScopeFail< EF > |
| xrpl::ScopeSuccess | ( | EF | ) | -> ScopeSuccess< EF > |
| xrpl::ScopeUnlock | ( | std::unique_lock< Mutex > & | ) | -> ScopeUnlock< Mutex > |
| std::size_t xrpl::extract | ( | SHAMapHash const & | key | ) |
Definition at line 90 of file SHAMapHash.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| Slice const & | v ) |
| Stream & xrpl::operator<< | ( | Stream & | s, |
| Slice const & | v ) |
| Slice xrpl::makeSlice | ( | std::array< T, N > const & | a | ) |
| Slice xrpl::makeSlice | ( | std::vector< T, Alloc > const & | v | ) |
| Slice xrpl::makeSlice | ( | std::basic_string< char, Traits, Alloc > const & | s | ) |
| Slice xrpl::makeSlice | ( | std::basic_string_view< char, Traits > | s | ) |
| std::string xrpl::strHex | ( | FwdIt | begin, |
| FwdIt | end ) |
| std::string xrpl::strHex | ( | T const & | from | ) |
| std::string xrpl::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.
| blob | An arbitrary blob of binary data |
Definition at line 23 of file libxrpl/basics/StringUtilities.cpp.
| std::optional< Blob > xrpl::strUnHex | ( | std::size_t | strSize, |
| Iterator | begin, | ||
| Iterator | end ) |
Definition at line 64 of file StringUtilities.h.
| std::optional< Blob > xrpl::strUnHex | ( | std::string_view | strSrc | ) |
Definition at line 100 of file StringUtilities.h.
| bool xrpl::parseUrl | ( | ParsedUrl & | pUrl, |
| std::string const & | strUrl ) |
Definition at line 37 of file libxrpl/basics/StringUtilities.cpp.
| std::string xrpl::trimWhitespace | ( | std::string | str | ) |
Remove leading and trailing ASCII whitespace.
Whitespace is the fixed set " \t\n\v\f\r"; the current locale is not consulted, so the result depends only on the input.
| str | The string to trim. |
str without leading or trailing whitespace. Definition at line 119 of file libxrpl/basics/StringUtilities.cpp.
| std::string xrpl::toLower | ( | std::string | str | ) |
Fold ASCII upper case letters to lower case.
Only 'A' through 'Z' are remapped; every other byte is left alone and the current locale is not consulted, so the result depends only on the input.
| str | The string to fold. |
str with each ASCII upper case letter replaced by its lower case equivalent. Definition at line 129 of file libxrpl/basics/StringUtilities.cpp.
| std::optional< std::uint64_t > xrpl::toUInt64 | ( | std::string const & | s | ) |
Definition at line 136 of file libxrpl/basics/StringUtilities.cpp.
| bool xrpl::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 145 of file libxrpl/basics/StringUtilities.cpp.
| std::string xrpl::to_string | ( | T | 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 17 of file ToString.h.
| std::string xrpl::to_string | ( | bool | b | ) |
Definition at line 24 of file ToString.h.
| std::string xrpl::to_string | ( | char | c | ) |
Definition at line 30 of file ToString.h.
| std::string xrpl::to_string | ( | std::string | s | ) |
Definition at line 36 of file ToString.h.
| std::string xrpl::to_string | ( | char const * | s | ) |
Definition at line 42 of file ToString.h.
| bool xrpl::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.
Definition at line 321 of file BasicConfig.h.
| bool xrpl::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.
Definition at line 345 of file BasicConfig.h.
| T xrpl::get | ( | Section const & | section, |
| std::string const & | name, | ||
| T const & | defaultValue = T{} ) |
Retrieve a key/value pair from a section.
Definition at line 361 of file BasicConfig.h.
| std::string xrpl::get | ( | Section const & | section, |
| std::string const & | name, | ||
| char const * | defaultValue ) |
Definition at line 374 of file BasicConfig.h.
| bool xrpl::getIfExists | ( | Section const & | section, |
| std::string const & | name, | ||
| T & | v ) |
Definition at line 390 of file BasicConfig.h.
| bool xrpl::getIfExists< bool > | ( | Section const & | section, |
| std::string const & | name, | ||
| bool & | v ) |
Definition at line 396 of file BasicConfig.h.
| bool xrpl::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.
| anyTransactions | indicates whether any transactions have been received |
| prevProposers | proposers in the last closing |
| proposersClosed | proposers who have currently closed this ledger |
| proposersValidated | proposers who have validated the last closed ledger |
| prevRoundTime | time for the previous ledger to reach consensus |
| timeSincePrevClose | time since the previous ledger's (possibly rounded) close time |
| openTime | duration this ledger has been open |
| idleInterval | the network's desired idle interval |
| parms | Consensus constant parameters |
| j | journal for logging |
| clog | log object to which to append |
Definition at line 17 of file libxrpl/consensus/Consensus.cpp.
| ConsensusState xrpl::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.
| prevProposers | proposers in the last closing (not including us) |
| currentProposers | proposers in this closing so far (not including us) |
| currentAgree | proposers who agree with us |
| currentFinished | proposers who have validated a ledger after this one |
| previousAgreeTime | how long, in milliseconds, it took to agree on the last ledger |
| currentAgreeTime | how long, in milliseconds, we've been trying to agree |
| stalled | the 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. |
| parms | Consensus constant parameters |
| proposing | whether we should count ourselves |
| j | journal for logging |
| clog | log object to which to append |
Definition at line 160 of file libxrpl/consensus/Consensus.cpp.
| int xrpl::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.
| participants | The number of participants (i.e. validators) |
| percent | The percent that we want to reach |
Definition at line 1466 of file Consensus.h.
| std::pair< std::size_t, std::optional< ConsensusParms::AvalancheState > > xrpl::getNeededWeight | ( | ConsensusParms const & | p, |
| ConsensusParms::AvalancheState | currentState, | ||
| int | percentTime, | ||
| std::size_t | currentRounds, | ||
| std::size_t | minimumRounds ) |
Definition at line 182 of file ConsensusParms.h.
| bool xrpl::operator== | ( | ConsensusProposal< NodeId, LedgerId, Position > const & | a, |
| ConsensusProposal< NodeId, LedgerId, Position > const & | b ) |
Definition at line 291 of file ConsensusProposal.h.
| std::string xrpl::to_string | ( | ConsensusMode | m | ) |
Definition at line 66 of file ConsensusTypes.h.
| std::string xrpl::to_string | ( | ConsensusPhase | p | ) |
Definition at line 120 of file ConsensusTypes.h.
| std::chrono::seconds xrpl::medianCloseOffset | ( | ConsensusCloseTimes const & | times | ) |
Offset of the network's close time relative to ours, using a weighted median.
Treats the sample set as {self x 1} merged with {t x w} for each (t, w) in times.peers, in time order, and returns (median - self) in whole seconds. Uses the lower weighted median: the median is the earliest time at which the running weight reaches half the total, so an even total whose halfway point falls between two bins resolves to the earlier bin.
| times | Our own close time and the weighted close times of peers. |
Definition at line 208 of file ConsensusTypes.h.
| bool xrpl::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.
| p | ValidationParms with timing parameters |
| now | Current time |
| signTime | When the validation was signed |
| seenTime | When the validation was first seen locally |
Definition at line 146 of file Validations.h.
| std::string xrpl::to_string | ( | ValStatus | m | ) |
Definition at line 191 of file Validations.h.
|
constexpr |
Definition at line 41 of file HashRouter.h.
|
constexpr |
Definition at line 49 of file HashRouter.h.
|
constexpr |
Definition at line 56 of file HashRouter.h.
|
constexpr |
Definition at line 64 of file HashRouter.h.
|
constexpr |
Definition at line 71 of file HashRouter.h.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| StartUpType const & | type ) |
Definition at line 10 of file StartUpType.h.
| CsprngEngine & xrpl::cryptoPrng | ( | ) |
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 81 of file libxrpl/crypto/csprng.cpp.
| void xrpl::secureErase | ( | 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 10 of file secure_erase.cpp.
| std::unique_ptr< AmendmentTable > xrpl::makeAmendmentTable | ( | ServiceRegistry & | registry, |
| std::chrono::seconds | majorityTime, | ||
| std::vector< AmendmentTable::FeatureInfo > const & | supported, | ||
| Section const & | enabled, | ||
| Section const & | vetoed, | ||
| beast::Journal | journal ) |
Definition at line 1035 of file AmendmentTable.cpp.
|
constexpr |
Definition at line 50 of file ApplyView.h.
|
constexpr |
Definition at line 61 of file ApplyView.h.
|
constexpr |
Definition at line 72 of file ApplyView.h.
| ApplyFlags xrpl::operator|= | ( | ApplyFlags & | lhs, |
| ApplyFlags const & | rhs ) |
Definition at line 80 of file ApplyView.h.
| ApplyFlags xrpl::operator&= | ( | ApplyFlags & | lhs, |
| ApplyFlags const & | rhs ) |
Definition at line 87 of file ApplyView.h.
Check if the issuer has the global freeze flag set.
| issuer | The account to check |
Definition at line 38 of file AccountRootHelpers.cpp.
|
nodiscard |
Calculate liquid XRP balance for an account.
This function may be used to calculate the amount of XRP that the holder is able to freely spend. It subtracts reserve requirements.
ownerCountAdj adjusts the owner count in case the caller calculates before ledger entries are added or removed. Positive to add, negative to subtract.
| view | The ledger view to read from |
| id | The account ID to check |
| ownerCountAdj | Positive to add to count, negative to reduce count |
| j | Journal for logging |
Definition at line 270 of file AccountRootHelpers.cpp.
|
nodiscard |
Returns the account reserve, in drops.
Actual owner count can be adjusted by delta in ownerCountAdj Actual reserve count can be adjusted by delta in accountCountAdj The reserve is calculated as: (ownerCount + "sponsoring object count" - "sponsored object count" + additionalOwnerCount) * increment + (1 if not sponsored account + sponsoringAccountCount) * "reserve base"
| view | The ledger view to read from |
| sle | The ledger entry for the account |
| j | Journal for logging |
| adj | Adjustment to the owner/account count (default: 0/0). Positive to add, negative to subtract. |
Definition at line 402 of file AccountRootHelpers.cpp.
|
nodiscard |
Convenience overload that accepts AccountID instead of SLE.
| view | The ledger view to read from |
| id | The account ID |
| j | Journal for logging |
| adj | Adjustment to the owner/account count (default: 0/0). Positive to add, negative to subtract. |
Definition at line 86 of file AccountRootHelpers.h.
|
nodiscard |
Check if an account has sufficient reserve.
| view | The ledger view to read from |
| tx | The transaction being processed |
| accSle | The account's ledger entry |
| accBalance | The account's balance |
| sponsorSle | The sponsor's ledger entry (if applicable) |
| adj | Adjustment to the owner/account count (default: 0/0). Positive to add, negative to subtract. |
| j | Journal for logging (default: null sink) |
| insufReserveCode | The transaction result code to return if the reserve is insufficient (default: tecINSUFFICIENT_RESERVE). |
Definition at line 418 of file AccountRootHelpers.cpp.
|
nodiscard |
Check if an account has sufficient reserve, deriving the sponsor internally.
Equivalent to the overload above, but resolves the sponsor via getEffectiveTxReserveSponsor(ctx, accSle) instead of taking it explicitly. Use this in the common case where the sponsor is simply the transaction's reserve sponsor for accSle. Callers that must force the account's-own-reserve branch (passing a null sponsor) or supply a different sponsor should use the explicit overload above.
| ctx | The apply-view context (view + tx) |
| accSle | The account's ledger entry |
| accBalance | The account's balance |
| adj | Reserve adjustments (owner/account count deltas) |
| j | Journal for logging (default: null sink) |
Definition at line 485 of file AccountRootHelpers.cpp.
| std::uint32_t xrpl::ownerCount | ( | SLE::const_ref | sle, |
| beast::Journal | j, | ||
| std::int32_t | ownerCountAdj = 0 ) |
Return number of the objects which reserve is covered by the account(sle) (so called "owner count").
Actual owner count can be adjusted by delta in ownerCountAdj.
| sle | The account's ledger entry |
| j | Journal for logging |
| ownerCountAdj | Adjustment to the owner count (default: 0) |
Definition at line 229 of file AccountRootHelpers.cpp.
| void xrpl::increaseOwnerCount | ( | ApplyView & | view, |
| SLE::ref | accountSle, | ||
| SLE::ref | sponsorSle, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Increase owner-count fields when the caller supplies the sponsor.
This helper does not create a ledger object. It updates reserve accounting after the caller has created/updated an object. If sponsorSle is provided, this also adjusts the account's sponsored count and the sponsor's sponsoring count.
| view | The apply view for making changes |
| accountSle | The account's ledger entry |
| sponsorSle | The sponsor's ledger entry (if applicable) |
| count | Amount to add to the owner count |
| j | Journal for logging |
Definition at line 313 of file AccountRootHelpers.cpp.
| void xrpl::increaseOwnerCount | ( | ApplyViewContext | ctx, |
| SLE::ref | accountSle, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Increase owner-count fields, deriving the tx reserve sponsor internally.
Equivalent to the overload above, but resolves the sponsor via getEffectiveTxReserveSponsor(ctx, accountSle) instead of taking it explicitly. Use this when the sponsor is the transaction's reserve sponsor for accountSle (the common create path). Deletion paths, which derive the sponsor from an object's sfSponsor field, should keep using the explicit overload.
| ctx | The apply-view context (view + tx) |
| accountSle | The account's ledger entry |
| count | Amount to add to the owner count |
| j | Journal for logging |
Definition at line 330 of file AccountRootHelpers.cpp.
| void xrpl::increaseOwnerCount | ( | ApplyView & | view, |
| AccountID const & | account, | ||
| std::optional< AccountID > const & | sponsor, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Convenience overload that accepts AccountID instead of SLE references.
| view | The apply view for making changes |
| account | The account ID |
| sponsor | The optional sponsor account ID |
| count | Amount to add to the owner count |
| j | Journal for logging |
Definition at line 206 of file AccountRootHelpers.h.
| void xrpl::decreaseOwnerCount | ( | ApplyView & | view, |
| SLE::ref | accountSle, | ||
| SLE::ref | sponsorSle, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Decrease owner-count fields when the caller supplies the sponsor.
This helper does not delete a ledger object. It updates reserve accounting after the caller has removed an owner-counted reserve, or for special owner-count changes whose sponsor cannot be derived from an object's sfSponsor field.
| view | The apply view for making changes |
| accountSle | The account's ledger entry |
| sponsorSle | The sponsor's ledger entry (if applicable) |
| count | Amount to remove from the owner count |
| j | Journal for logging |
Definition at line 343 of file AccountRootHelpers.cpp.
| void xrpl::decreaseOwnerCount | ( | ApplyView & | view, |
| AccountID const & | account, | ||
| std::optional< AccountID > const & | sponsor, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Convenience overload that accepts AccountID instead of SLE references.
| view | The apply view for making changes |
| account | The account ID |
| sponsor | The optional sponsor account ID |
| count | Amount to remove from the owner count |
| j | Journal for logging |
Definition at line 253 of file AccountRootHelpers.h.
| void xrpl::decreaseOwnerCountForObject | ( | ApplyView & | view, |
| SLE::ref | accountSle, | ||
| SLE::ref | objectSle, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Decrease owner-count fields for an existing ledger object.
This helper derives the reserve sponsor from objectSle's sfSponsor field, then updates the same owner-count fields as decreaseOwnerCount. Use this when removing an existing object whose reserve sponsor is stored on that object.
| view | The apply view for making changes |
| accountSle | The account's ledger entry |
| objectSle | The object's ledger entry |
| count | Amount to remove from the owner count |
| j | Journal for logging |
Definition at line 360 of file AccountRootHelpers.cpp.
| void xrpl::decreaseOwnerCountForObject | ( | ApplyView & | view, |
| AccountID const & | account, | ||
| SLE::ref | objectSle, | ||
| std::uint32_t | count, | ||
| beast::Journal | j ) |
Convenience overload that accepts AccountID instead of account SLE reference.
| view | The apply view for making changes |
| account | The account ID |
| objectSle | The object's ledger entry |
| count | Amount to remove from the owner count |
| j | Journal for logging |
Definition at line 300 of file AccountRootHelpers.h.
| void xrpl::adjustLoanBrokerOwnerCount | ( | ApplyView & | view, |
| SLE::ref | brokerSle, | ||
| std::int32_t | delta, | ||
| beast::Journal | j ) |
Adjust a LoanBroker's owner count.
A LoanBroker's sfOwnerCount tracks the number of outstanding loans on that broker; it is not a reserve-backed owner count and is distinct from the broker's pseudo-account's owner count. Loans can never carry a reserve sponsor (LoanSet rejects reserve sponsorship at preflight), so this never involves sponsor accounting and never invokes the ownerCountHook used for ACCOUNT_ROOT reserve tracking.
| view | The apply view for making changes |
| brokerSle | The LoanBroker's ledger entry |
| delta | Amount to add (positive) or remove (negative) from the count |
| j | Journal for logging |
Definition at line 381 of file AccountRootHelpers.cpp.
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.
| issuer | The IOU issuer |
Definition at line 302 of file AccountRootHelpers.cpp.
Generate a pseudo-account address from a pseudo owner key.
| pseudoOwnerKey | The key to generate the address from |
Definition at line 501 of file AccountRootHelpers.cpp.
|
nodiscard |
Returns the list of fields that define an ACCOUNT_ROOT as a pseudo-account if set.
The list is constructed during initialization and is const after that. Pseudo-account designator fields MUST be maintained by including the SField::sMD_PseudoAccount flag in the SField definition.
Definition at line 524 of file AccountRootHelpers.cpp.
|
nodiscard |
Returns true if and only if sleAcct is a pseudo-account or specific pseudo-accounts in pseudoFieldFilter.
Returns false if sleAcct is:
Definition at line 550 of file AccountRootHelpers.cpp.
|
nodiscard |
Convenience overload that reads the account from the view.
Definition at line 377 of file AccountRootHelpers.h.
|
nodiscard |
Create pseudo-account, storing pseudoOwnerKey into ownerField.
The list of valid ownerField is maintained in AccountRootHelpers.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 565 of file AccountRootHelpers.cpp.
|
nodiscard |
Checks the destination and tag.
Definition at line 607 of file AccountRootHelpers.cpp.
| STAmount xrpl::ammLPTokens | ( | STAmount const & | asset1, |
| STAmount const & | asset2, | ||
| Asset const & | lptIssue ) |
Calculate LP Tokens given AMM pool reserves.
| asset1 | AMM one side of the pool reserve |
| asset2 | AMM another side of the pool reserve |
Definition at line 45 of file AMMHelpers.cpp.
| STAmount xrpl::lpTokensOut | ( | STAmount const & | asset1Balance, |
| STAmount const & | asset1Deposit, | ||
| STAmount const & | lptAMMBalance, | ||
| std::uint16_t | tfee ) |
Calculate LP Tokens given asset's deposit amount.
| asset1Balance | current AMM asset1 balance |
| asset1Deposit | requested asset1 deposit amount |
| lptAMMBalance | AMM LPT balance |
| tfee | trading fee in basis points |
Definition at line 62 of file AMMHelpers.cpp.
| STAmount xrpl::ammAssetIn | ( | STAmount const & | asset1Balance, |
| STAmount const & | lptAMMBalance, | ||
| STAmount const & | lpTokens, | ||
| std::uint16_t | tfee ) |
Calculate asset deposit given LP Tokens.
| asset1Balance | current AMM asset1 balance |
| lptAMMBalance | AMM LPT balance |
| lpTokens | LP Tokens |
| tfee | trading fee in basis points |
Definition at line 95 of file AMMHelpers.cpp.
| STAmount xrpl::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.
| asset1Balance | current AMM asset1 balance |
| asset1Withdraw | requested asset1 withdraw amount |
| lptAMMBalance | AMM LPT balance |
| tfee | trading fee in basis points |
Definition at line 124 of file AMMHelpers.cpp.
| STAmount xrpl::ammAssetOut | ( | STAmount const & | assetBalance, |
| STAmount const & | lptAMMBalance, | ||
| STAmount const & | lpTokens, | ||
| std::uint16_t | tfee ) |
Calculate asset withdrawal by tokens.
| assetBalance | balance of the asset being withdrawn |
| lptAMMBalance | total AMM Tokens balance |
| lpTokens | LP Tokens balance |
| tfee | trading fee in basis points |
Definition at line 155 of file AMMHelpers.cpp.
| bool xrpl::withinRelativeDistance | ( | Quality const & | calcQuality, |
| Quality const & | reqQuality, | ||
| Number const & | dist ) |
Check if the relative distance between the qualities is within the requested distance.
| calcQuality | calculated quality |
| reqQuality | requested quality |
| dist | requested relative distance |
Definition at line 135 of file AMMHelpers.h.
| bool xrpl::withinRelativeDistance | ( | Amt const & | calc, |
| Amt const & | req, | ||
| Number const & | dist ) |
Check if the relative distance between the amounts is within the requested distance.
| calc | calculated amount |
| req | requested amount |
| dist | requested relative distance |
Definition at line 160 of file AMMHelpers.h.
| std::optional< Number > xrpl::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 276 of file AMMHelpers.cpp.
| std::optional< TAmounts< TIn, TOut > > xrpl::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 201 of file AMMHelpers.h.
| std::optional< TAmounts< TIn, TOut > > xrpl::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 269 of file AMMHelpers.h.
| std::optional< TAmounts< TIn, TOut > > xrpl::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 the economically coarser integral side, 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 economically coarser integral 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.
| pool | AMM pool balances |
| quality | requested quality |
| tfee | trading fee in basis points |
Definition at line 330 of file AMMHelpers.h.
| TOut xrpl::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:
| pool | current AMM pool balances |
| assetIn | amount to swap in |
| tfee | trading fee in basis points |
Definition at line 462 of file AMMHelpers.h.
| TIn xrpl::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.
| pool | current AMM pool balances |
| assetOut | amount to swap out |
| tfee | trading fee in basis points |
Definition at line 529 of file AMMHelpers.h.
Return square of n.
Definition at line 175 of file AMMHelpers.cpp.
| STAmount xrpl::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.
| lptAMMBalance | LPT AMM Balance |
| lpTokens | LP tokens to deposit or withdraw |
| isDeposit | Yes if deposit, No if withdraw |
Definition at line 181 of file AMMHelpers.cpp.
| std::tuple< STAmount, std::optional< STAmount >, STAmount > xrpl::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.
| amountBalance | asset1 pool balance |
| amount | asset1 to deposit or withdraw |
| amount2 | asset2 to deposit or withdraw |
| lptAMMBalance | LPT AMM Balance |
| lpTokens | LP tokens to deposit or withdraw |
| tfee | trading fee in basis points |
| isDeposit | Yes if deposit, No if withdraw |
Definition at line 192 of file AMMHelpers.cpp.
Positive solution for quadratic equation: x = (-b + sqrt(b**2 + 4*a*c))/(2*a).
Definition at line 269 of file AMMHelpers.cpp.
| STAmount xrpl::multiply | ( | STAmount const & | amount, |
| Number const & | frac, | ||
| Number::RoundingMode | rm ) |
Definition at line 292 of file AMMHelpers.cpp.
| STAmount xrpl::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 667 of file AMMHelpers.h.
| STAmount xrpl::getRoundedAsset | ( | Rules const & | rules, |
| std::function< Number()> const & | noRoundCb, | ||
| STAmount const & | balance, | ||
| std::function< Number()> const & | 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 300 of file AMMHelpers.cpp.
| STAmount xrpl::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 318 of file AMMHelpers.cpp.
| STAmount xrpl::getRoundedLPTokens | ( | Rules const & | rules, |
| std::function< Number()> const & | noRoundCb, | ||
| STAmount const & | lptAMMBalance, | ||
| std::function< Number()> const & | 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 333 of file AMMHelpers.cpp.
| std::pair< STAmount, STAmount > xrpl::adjustAssetInByTokens | ( | Rules const & | rules, |
| STAmount const & | balance, | ||
| STAmount const & | amount, | ||
| STAmount const & | lptAMMBalance, | ||
| STAmount const & | tokens, | ||
| std::uint16_t | tfee ) |
Definition at line 356 of file AMMHelpers.cpp.
| std::pair< STAmount, STAmount > xrpl::adjustAssetOutByTokens | ( | Rules const & | rules, |
| STAmount const & | balance, | ||
| STAmount const & | amount, | ||
| STAmount const & | lptAMMBalance, | ||
| STAmount const & | tokens, | ||
| std::uint16_t | tfee ) |
Definition at line 382 of file AMMHelpers.cpp.
| Number xrpl::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 408 of file AMMHelpers.cpp.
| std::pair< STAmount, STAmount > xrpl::ammPoolHolds | ( | ReadView const & | view, |
| AccountID const & | ammAccountID, | ||
| Asset const & | asset1, | ||
| Asset const & | asset2, | ||
| FreezeHandling | freezeHandling, | ||
| AuthHandling | authHandling, | ||
| beast::Journal const | j ) |
Get AMM pool balances.
Definition at line 420 of file AMMHelpers.cpp.
| TER xrpl::checkAMMPrecisionLoss | ( | Number const & | poolProductMean, |
| STAmount const & | newLPTokenBalance ) |
Check AMM pool product invariant after an AMM operation that changes LP tokens (deposit/withdraw/clawback) from an already calculated pool product mean.
Returns tecPRECISION_LOSS if poolProductMean < newLPTokenBalance beyond the invariant tolerance, tesSUCCESS otherwise. Skips check when newLPTokenBalance is zero (last withdrawal).
Definition at line 437 of file AMMHelpers.cpp.
| TER xrpl::checkAMMPrecisionLoss | ( | ReadView const & | view, |
| AccountID const & | ammAccountID, | ||
| Asset const & | asset1, | ||
| Asset const & | asset2, | ||
| STAmount const & | newLPTokenBalance, | ||
| beast::Journal const | j ) |
Check AMM pool product invariant after an AMM operation that changes LP tokens (deposit/withdraw/clawback).
Returns tecPRECISION_LOSS if sqrt(asset1 * asset2) < newLPTokenBalance beyond the invariant tolerance, tesSUCCESS otherwise. Skips check when newLPTokenBalance is zero (last withdrawal).
Definition at line 452 of file AMMHelpers.cpp.
| std::expected< std::tuple< STAmount, STAmount, STAmount >, TER > xrpl::ammHolds | ( | ReadView const & | view, |
| SLE const & | ammSle, | ||
| std::optional< Asset > const & | optAsset1, | ||
| std::optional< Asset > const & | optAsset2, | ||
| FreezeHandling | freezeHandling, | ||
| AuthHandling | authHandling, | ||
| 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 474 of file AMMHelpers.cpp.
| STAmount xrpl::ammLPHolds | ( | ReadView const & | view, |
| Asset const & | asset1, | ||
| Asset const & | asset2, | ||
| AccountID const & | ammAccount, | ||
| AccountID const & | lpAccount, | ||
| beast::Journal const | j ) |
Get the balance of LP tokens.
Definition at line 542 of file AMMHelpers.cpp.
| STAmount xrpl::ammLPHolds | ( | ReadView const & | view, |
| SLE const & | ammSle, | ||
| AccountID const & | lpAccount, | ||
| beast::Journal const | j ) |
Definition at line 592 of file AMMHelpers.cpp.
| std::uint16_t xrpl::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 602 of file AMMHelpers.cpp.
| STAmount xrpl::ammAccountHolds | ( | ReadView const & | view, |
| AccountID const & | ammAccountID, | ||
| Asset const & | asset ) |
Returns total amount held by AMM for the given token.
Definition at line 630 of file AMMHelpers.cpp.
| TER xrpl::deleteAMMAccount | ( | Sandbox & | view, |
| Asset const & | asset, | ||
| Asset const & | asset2, | ||
| beast::Journal | j ) |
Delete trustlines to AMM.
If all trustlines are deleted then AMM object and account are deleted. Otherwise tecINCOMPLETE is returned.
Definition at line 747 of file AMMHelpers.cpp.
| void xrpl::initializeFeeAuctionVote | ( | ApplyView & | view, |
| SLE::pointer & | ammSle, | ||
| AccountID const & | account, | ||
| Asset const & | lptAsset, | ||
| std::uint16_t | tfee ) |
Initialize Auction and Voting slots and set the trading/discounted fee.
Definition at line 803 of file AMMHelpers.cpp.
| std::expected< bool, TER > xrpl::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 860 of file AMMHelpers.cpp.
| std::expected< bool, TER > xrpl::verifyAndAdjustLPTokenBalance | ( | Sandbox & | sb, |
| STAmount const & | lpTokens, | ||
| SLE::pointer & | 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 960 of file AMMHelpers.cpp.
| TER xrpl::verifyValidDomain | ( | ApplyView & | view, |
| AccountID const & | account, | ||
| uint256 | domainID, | ||
| beast::Journal | j ) |
Definition at line 335 of file CredentialHelpers.cpp.
| TER xrpl::checkDepositPreauth | ( | STTx const & | tx, |
| ReadView const & | view, | ||
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| std::shared_ptr< SLE const > const & | sleDst, | ||
| beast::Journal | j ) |
Check whether src is authorized to deposit to dst.
| tx | Transaction containing optional credential IDs. |
| view | Read-only ledger view. |
| src | Source account. |
| dst | Destination account. |
| sleDst | Destination AccountRoot, if it exists. |
| j | Journal for diagnostics. |
| TER xrpl::cleanupExpiredCredentials | ( | STTx const & | tx, |
| ApplyView & | view, | ||
| beast::Journal | j ) |
Remove expired credentials referenced by the transaction.
| tx | Transaction containing optional sfCredentialIDs. |
| view | Mutable ledger view. |
| j | Journal for diagnostics. |
Definition at line 403 of file CredentialHelpers.cpp.
| TER xrpl::verifyDepositPreauth | ( | STTx const & | tx, |
| ApplyView & | view, | ||
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| SLE::const_ref | sleDst, | ||
| beast::Journal | j ) |
Definition at line 419 of file CredentialHelpers.cpp.
| NotTEC xrpl::checkTxPermission | ( | SLE::const_ref | delegate, |
| STTx const & | tx ) |
Check if the delegate account has permission to execute the transaction.
| delegate | The delegate account. |
| tx | The transaction that the delegate account intends to execute. |
Definition at line 14 of file DelegateUtils.cpp.
| std::unordered_set< GranularPermissionType > xrpl::getGranularPermission | ( | SLE::const_ref | delegate, |
| TxType const & | type ) |
Load the granular permissions granted to the delegate account for the specified transaction type.
| delegate | The delegate account. |
| type | Used to determine which granted granular permissions to load, based on the transaction type. |
Definition at line 33 of file DelegateUtils.cpp.
| bool xrpl::cdirFirst | ( | ReadView const & | view, |
| uint256 const & | root, | ||
| SLE::const_pointer & | page, | ||
| unsigned int & | index, | ||
| uint256 & | entry ) |
Returns the first entry in the directory, advancing the index.
| view | The view against which to operate |
| root | The root (i.e. first page) of the directory to iterate |
| page | The current page |
| index | The index inside the current page |
| entry | The entry at the current index |
Definition at line 41 of file DirectoryHelpers.cpp.
| bool xrpl::dirFirst | ( | ApplyView & | view, |
| uint256 const & | root, | ||
| SLE::pointer & | page, | ||
| unsigned int & | index, | ||
| uint256 & | entry ) |
Definition at line 19 of file DirectoryHelpers.cpp.
| bool xrpl::cdirNext | ( | ReadView const & | view, |
| uint256 const & | root, | ||
| SLE::const_pointer & | page, | ||
| unsigned int & | index, | ||
| uint256 & | entry ) |
Returns the next entry in the directory, advancing the index.
| view | The view against which to operate |
| root | The root (i.e. first page) of the directory to iterate |
| page | The current page |
| index | The index inside the current page |
| entry | The entry at the current index |
Definition at line 52 of file DirectoryHelpers.cpp.
| bool xrpl::dirNext | ( | ApplyView & | view, |
| uint256 const & | root, | ||
| SLE::pointer & | page, | ||
| unsigned int & | index, | ||
| uint256 & | entry ) |
Definition at line 30 of file DirectoryHelpers.cpp.
| void xrpl::forEachItem | ( | ReadView const & | view, |
| Keylet const & | root, | ||
| std::function< void(SLE::const_ref)> const & | f ) |
Iterate all items in the given directory.
Definition at line 63 of file DirectoryHelpers.cpp.
| bool xrpl::forEachItemAfter | ( | ReadView const & | view, |
| Keylet const & | root, | ||
| uint256 const & | after, | ||
| std::uint64_t const | hint, | ||
| unsigned int | limit, | ||
| std::function< bool(SLE::const_ref)> const & | f ) |
Iterate all items after an item in the given directory.
| after | The key of the item to start after |
| hint | The directory page containing after |
| limit | The maximum number of items to return |
Definition at line 87 of file DirectoryHelpers.cpp.
| void xrpl::forEachItem | ( | ReadView const & | view, |
| AccountID const & | id, | ||
| std::function< void(SLE::const_ref)> const & | f ) |
Iterate all items in an account's owner directory.
Definition at line 189 of file DirectoryHelpers.h.
| bool xrpl::forEachItemAfter | ( | ReadView const & | view, |
| AccountID const & | id, | ||
| uint256 const & | after, | ||
| std::uint64_t const | hint, | ||
| unsigned int | limit, | ||
| std::function< bool(SLE::const_ref)> const & | f ) |
Iterate all items after an item in an owner directory.
| after | The key of the item to start after |
| hint | The directory page containing after |
| limit | The maximum number of items to return |
Definition at line 202 of file DirectoryHelpers.h.
Returns true if the directory is empty.
| key | The key of the directory |
Definition at line 166 of file DirectoryHelpers.cpp.
|
nodiscard |
Returns a function that sets the owner on a directory SLE.
Definition at line 180 of file DirectoryHelpers.cpp.
| TER xrpl::escrowUnlockApplyHelper | ( | ApplyViewContext | ctx, |
| Rate | lockedRate, | ||
| SLE::ref | sleDest, | ||
| XRPAmount | xrpBalance, | ||
| STAmount const & | amount, | ||
| AccountID const & | issuer, | ||
| AccountID const & | sender, | ||
| AccountID const & | receiver, | ||
| bool | createAsset, | ||
| beast::Journal | journal ) |
| TER xrpl::escrowUnlockApplyHelper< Issue > | ( | ApplyViewContext | ctx, |
| Rate | lockedRate, | ||
| SLE::ref | sleDest, | ||
| XRPAmount | xrpBalance, | ||
| STAmount const & | amount, | ||
| AccountID const & | issuer, | ||
| AccountID const & | sender, | ||
| AccountID const & | receiver, | ||
| bool | createAsset, | ||
| beast::Journal | journal ) |
Definition at line 45 of file EscrowHelpers.h.
| TER xrpl::escrowUnlockApplyHelper< MPTIssue > | ( | ApplyViewContext | ctx, |
| Rate | lockedRate, | ||
| SLE::ref | sleDest, | ||
| XRPAmount | xrpBalance, | ||
| STAmount const & | amount, | ||
| AccountID const & | issuer, | ||
| AccountID const & | sender, | ||
| AccountID const & | receiver, | ||
| bool | createAsset, | ||
| beast::Journal | journal ) |
Definition at line 186 of file EscrowHelpers.h.
|
nodiscard |
Broker cover preclaim precision guard (fixCleanup3_2_0).
Prevents a "silent sub-ULP no-op" where a deposit, withdrawal, or clawback amount is so small that it rounds to zero at sfCoverAvailable's scale. Without this guard, both the pseudo trust-line and sfCoverAvailable would identically absorb the rounded zero, resulting in a successful transaction (tesSUCCESS) where no funds actually moved.
| view | Read view (rules used for amendment gating). |
| sleBroker | The loan broker SLE (read-only). |
| vaultAsset | The underlying vault asset (the broker's cover asset). |
| amount | The effective subtraction/addition amount. |
| j | Journal for logging. |
| logPrefix | Transactor name for log diagnostics. |
Definition at line 35 of file LendingHelpers.cpp.
Definition at line 66 of file LendingHelpers.cpp.
| Number xrpl::loanPeriodicRate | ( | TenthBips32 | interestRate, |
| std::uint32_t | paymentInterval ) |
Definition at line 117 of file LendingHelpers.cpp.
| Number xrpl::roundPeriodicPayment | ( | Asset const & | asset, |
| Number const & | periodicPayment, | ||
| std::int32_t | scale ) |
Ensure the periodic payment is always rounded consistently.
Definition at line 70 of file LendingHelpers.h.
| void xrpl::adjustImpreciseNumber | ( | NumberProxy | value, |
| Number const & | adjustment, | ||
| Asset const & | asset, | ||
| int | vaultScale ) |
Definition at line 207 of file LendingHelpers.h.
| int xrpl::getAssetsTotalScale | ( | SLE::const_ref | vaultSle | ) |
Definition at line 220 of file LendingHelpers.h.
| Number xrpl::minimumBrokerCover | ( | Number const & | debtTotal, |
| TenthBips32 | coverRateMinimum, | ||
| SLE::const_ref | vaultSle ) |
Definition at line 231 of file LendingHelpers.h.
| TER xrpl::checkLoanGuards | ( | Asset const & | vaultAsset, |
| Number const & | principalRequested, | ||
| bool | expectInterest, | ||
| std::uint32_t | paymentTotal, | ||
| LoanProperties const & | properties, | ||
| beast::Journal | j ) |
Definition at line 1833 of file LendingHelpers.cpp.
| LoanState xrpl::computeTheoreticalLoanState | ( | Rules const & | rules, |
| Number const & | periodicPayment, | ||
| Number const & | periodicRate, | ||
| std::uint32_t const | paymentRemaining, | ||
| TenthBips32 const | managementFeeRate ) |
Definition at line 1975 of file LendingHelpers.cpp.
| LoanState xrpl::constructLoanState | ( | Number const & | totalValueOutstanding, |
| Number const & | principalOutstanding, | ||
| Number const & | managementFeeOutstanding ) |
Definition at line 2036 of file LendingHelpers.cpp.
| LoanState xrpl::constructLoanState | ( | SLE::const_ref | loan | ) |
Definition at line 2051 of file LendingHelpers.cpp.
| Number xrpl::computeManagementFee | ( | Asset const & | asset, |
| Number const & | interest, | ||
| TenthBips32 | managementFeeRate, | ||
| std::int32_t | scale ) |
Definition at line 2068 of file LendingHelpers.cpp.
| Number xrpl::computeFullPaymentInterest | ( | Number const & | theoreticalPrincipalOutstanding, |
| Number const & | periodicRate, | ||
| NetClock::time_point | parentCloseTime, | ||
| std::uint32_t | paymentInterval, | ||
| std::uint32_t | prevPaymentDate, | ||
| std::uint32_t | startDate, | ||
| TenthBips32 | closeInterestRate ) |
Definition at line 1917 of file LendingHelpers.cpp.
| AccountingDeltas xrpl::loanOriginationDeltas | ( | SLE::const_ref | vaultSle, |
| Number const & | principalRequested, | ||
| Number const & | interestDue ) |
Definition at line 216 of file LendingHelpers.cpp.
| bool xrpl::loanOriginationExceedsVaultMaximum | ( | SLE::const_ref | vaultSle, |
| Number const & | vaultTotal, | ||
| Number const & | interestDue ) |
Definition at line 227 of file LendingHelpers.cpp.
| Number xrpl::loanVaultExposure | ( | SLE::const_ref | vaultSle, |
| SLE::const_ref | loanSle ) |
Definition at line 242 of file LendingHelpers.cpp.
| AccountingDeltas xrpl::loanPaymentDeltas | ( | SLE::const_ref | vaultSle, |
| LoanPaymentParts const & | parts ) |
Definition at line 249 of file LendingHelpers.cpp.
| detail::LoanStateDeltas xrpl::operator- | ( | LoanState const & | lhs, |
| LoanState const & | rhs ) |
Definition at line 1795 of file LendingHelpers.cpp.
| LoanState xrpl::operator- | ( | LoanState const & | lhs, |
| detail::LoanStateDeltas const & | rhs ) |
Definition at line 1807 of file LendingHelpers.cpp.
| LoanState xrpl::operator+ | ( | LoanState const & | lhs, |
| detail::LoanStateDeltas const & | rhs ) |
Definition at line 1820 of file LendingHelpers.cpp.
| LoanProperties xrpl::computeLoanProperties | ( | Rules const & | rules, |
| Asset const & | asset, | ||
| Number const & | principalOutstanding, | ||
| TenthBips32 | interestRate, | ||
| std::uint32_t | paymentInterval, | ||
| std::uint32_t | paymentsRemaining, | ||
| TenthBips32 | managementFeeRate, | ||
| std::int32_t | minimumScale ) |
Definition at line 2087 of file LendingHelpers.cpp.
| LoanProperties xrpl::computeLoanProperties | ( | Rules const & | rules, |
| Asset const & | asset, | ||
| Number const & | principalOutstanding, | ||
| Number const & | periodicRate, | ||
| std::uint32_t | paymentsRemaining, | ||
| TenthBips32 | managementFeeRate, | ||
| std::int32_t | minimumScale ) |
Definition at line 2118 of file LendingHelpers.cpp.
| bool xrpl::isRounded | ( | Asset const & | asset, |
| Number const & | value, | ||
| std::int32_t | scale ) |
Definition at line 128 of file LendingHelpers.cpp.
| std::expected< LoanPaymentParts, TER > xrpl::loanMakePayment | ( | Asset const & | asset, |
| ApplyView & | view, | ||
| SLE::ref | loan, | ||
| SLE::const_ref | brokerSle, | ||
| STAmount const & | amount, | ||
| LoanPaymentType const | paymentType, | ||
| beast::Journal | j ) |
Definition at line 2202 of file LendingHelpers.cpp.
Definition at line 42 of file MPTokenHelpers.cpp.
|
nodiscard |
Returns true if account's MPToken for mptIssue carries the individual-lock flag (lsfMPTLocked).
mptIssue is a vault share whose underlying asset is frozen, this function returns false. Call isFrozen instead when determining whether an account may send or receive tokens — it combines isIndividualFrozen, isGlobalFrozen, and isVaultPseudoAccountFrozen into a single complete check. Definition at line 50 of file MPTokenHelpers.cpp.
|
nodiscard |
Definition at line 58 of file MPTokenHelpers.cpp.
|
nodiscard |
Definition at line 69 of file MPTokenHelpers.cpp.
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.
| issuanceID | MPTokenIssuanceID of MPTTokenIssuance object |
Definition at line 90 of file MPTokenHelpers.cpp.
Definition at line 107 of file MPTokenHelpers.cpp.
|
nodiscard |
Definition at line 146 of file MPTokenHelpers.cpp.
|
nodiscard |
Check if the account lacks required authorization for MPT.
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. WeakAuth intentionally allows missing MPTokens under MPToken V2.
Definition at line 320 of file MPTokenHelpers.cpp.
|
nodiscard |
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.
Definition at line 428 of file MPTokenHelpers.cpp.
Resolve the underlying asset of a vault share.
Reads sfReferenceHolding from sleShareIssuance to determine which asset the vault wraps. sleHolding must be the SLE that sfReferenceHolding points to — either an ltMPTOKEN (returns its MPTIssue) or an ltRIPPLE_STATE (returns its low/high Issue).
sleHolding must be of type ltMPTOKEN or ltRIPPLE_STATE. Passing any other type is undefined behaviour. | sleShareIssuance | MPTokenIssuance SLE for the vault share token. |
| sleHolding | SLE referenced by sfReferenceHolding. |
Definition at line 528 of file MPTokenHelpers.cpp.
|
nodiscard |
Check whether to may receive the given MPT from from.
The check passes when any of the following is true:
waive is WaiveMPTCanTransfer::Yes (recovery-path exemption), orfrom or to is the issuer, orFor vault shares (MPTokenIssuances that carry sfReferenceHolding) the check recurses into the underlying asset's transferability. This recursion is defensive; vault-of-vault-shares is rejected at vault creation, so in practice depth never exceeds 1.
| view | Ledger state to read from. |
| mptIssue | The MPT issuance being transferred. |
| from | Sending account. |
| to | Receiving account. |
| waive | WaiveMPTCanTransfer::Yes skips the lsfMPTCanTransfer check. Use for recovery paths (e.g. unwinding SAV or Lending Protocol positions after an issuer revokes transferability). |
| depth | Recursion depth; bounded at kMaxAssetCheckDepth. |
Definition at line 551 of file MPTokenHelpers.cpp.
|
nodiscard |
Check whether asset may be traded on the DEX.
For IOU assets the check delegates to the existing offer/AMM freeze logic. For MPT assets it checks lsfMPTCanTrade on the MPTokenIssuance. Vault shares recurse into the underlying asset's tradability via sfReferenceHolding; depth is bounded at kMaxAssetCheckDepth.
| view | Ledger state to read from. |
| asset | The asset to check. |
| depth | Recursion depth; bounded at kMaxAssetCheckDepth. |
Definition at line 608 of file MPTokenHelpers.cpp.
|
nodiscard |
Convenience to combine canTrade/Transfer.
Returns tesSUCCESS if Asset is Issue.
Definition at line 648 of file MPTokenHelpers.cpp.
|
nodiscard |
Definition at line 124 of file MPTokenHelpers.cpp.
|
nodiscard |
Definition at line 278 of file MPTokenHelpers.cpp.
| TER xrpl::lockEscrowMPT | ( | ApplyView & | view, |
| AccountID const & | uGrantorID, | ||
| STAmount const & | saAmount, | ||
| beast::Journal | j ) |
Definition at line 664 of file MPTokenHelpers.cpp.
| TER xrpl::unlockEscrowMPT | ( | ApplyView & | view, |
| AccountID const & | uGrantorID, | ||
| AccountID const & | uGranteeID, | ||
| STAmount const & | netAmount, | ||
| STAmount const & | grossAmount, | ||
| beast::Journal | j ) |
Definition at line 757 of file MPTokenHelpers.cpp.
| TER xrpl::createMPToken | ( | ApplyView & | view, |
| MPTID const & | mptIssuanceID, | ||
| AccountID const & | account, | ||
| SLE::ref | sponsorSle, | ||
| std::uint32_t const | flags ) |
Definition at line 921 of file MPTokenHelpers.cpp.
| TER xrpl::checkCreateMPT | ( | xrpl::ApplyView & | view, |
| xrpl::MPTIssue const & | mptIssue, | ||
| xrpl::AccountID const & | holder, | ||
| SLE::ref | sponsorSle, | ||
| std::uint32_t | flags, | ||
| beast::Journal | j ) |
Definition at line 950 of file MPTokenHelpers.cpp.
| TER xrpl::checkCreateMPT | ( | xrpl::ApplyView & | view, |
| xrpl::MPTIssue const & | mptIssue, | ||
| xrpl::AccountID const & | holder, | ||
| beast::Journal | j ) |
Definition at line 982 of file MPTokenHelpers.cpp.
| std::int64_t xrpl::maxMPTAmount | ( | SLE const & | sleIssuance | ) |
Definition at line 992 of file MPTokenHelpers.cpp.
| std::int64_t xrpl::availableMPTAmount | ( | SLE const & | sleIssuance | ) |
Definition at line 998 of file MPTokenHelpers.cpp.
| std::int64_t xrpl::availableMPTAmount | ( | ReadView const & | view, |
| MPTID const & | mptID ) |
Definition at line 1006 of file MPTokenHelpers.cpp.
| bool xrpl::isMPTOverflow | ( | std::int64_t | sendAmount, |
| std::uint64_t | outstandingAmount, | ||
| std::int64_t | maximumAmount, | ||
| AllowMPTOverflow | allowOverflow ) |
Checks for two types of OutstandingAmount overflow during a send operation.
Definition at line 1015 of file MPTokenHelpers.cpp.
Determine funds available for an issuer to sell in an issuer owned offer.
Issuing step, which could be either MPTEndPointStep last step or BookStep's TakerPays may overflow OutstandingAmount. Redeeming step, in BookStep's TakerGets redeems the offer's owner funds, essentially balancing out the overflow, unless the offer's owner is the issuer.
Definition at line 1028 of file MPTokenHelpers.cpp.
| void xrpl::issuerSelfDebitHookMPT | ( | ApplyView & | view, |
| MPTIssue const & | issue, | ||
| std::uint64_t | amount ) |
Facilitate tracking of MPT sold by an issuer owning MPT sell offer.
See ApplyView::issuerSelfDebitHookMPT().
Definition at line 1040 of file MPTokenHelpers.cpp.
| TER xrpl::offerDelete | ( | ApplyView & | view, |
| SLE::ref | sle, | ||
| beast::Journal | j ) |
Delete an offer.
Requirements: The offer must exist. The caller must have already checked permissions.
| view | The ApplyView to modify. |
| sle | The offer to delete. |
| j | Journal for logging. |
Definition at line 18 of file OfferHelpers.cpp.
| std::uint32_t xrpl::calculateOracleReserve | ( | T const & | priceDataSeries | ) |
Definition at line 19 of file OracleHelpers.h.
| std::uint32_t xrpl::calculateOracleReserve | ( | SLE::const_ref | oracleSle | ) |
Definition at line 26 of file OracleHelpers.h.
| TER xrpl::closeChannel | ( | SLE::ref | slep, |
| ApplyView & | view, | ||
| uint256 const & | key, | ||
| beast::Journal | j ) |
Close a payment channel and return its remaining funds to the channel owner.
| slep | The SLE for the PayChannel object to close. |
| view | The apply view in which ledger state modifications are made. |
| key | The ledger key identifying the PayChannel entry. |
| j | Journal used for fatal-level diagnostic messages. |
Definition at line 25 of file PaymentChannelHelpers.cpp.
| uint32_t xrpl::saturatingAdd | ( | Rules const & | rules, |
| uint32_t const | lhs, | ||
| uint32_t const | rhs ) |
Add two uint32_t values with saturation at UINT32_MAX.
| rules | The current ledger rules used to check amendment status. |
| lhs | Left-hand operand. |
| rhs | Right-hand operand. |
lhs + rhs, saturated at UINT32_MAX when the amendment is active. Definition at line 70 of file PaymentChannelHelpers.cpp.
| bool xrpl::isChannelExpired | ( | ApplyView const & | view, |
| std::optional< std::uint32_t > | timeField ) |
Determine whether a payment channel time field represents an expired time.
| view | The apply view providing the parent close time and rules. |
| timeField | The optional expiry timestamp (seconds since the XRP Ledger epoch). If empty, the function returns false. |
true if timeField is set and the indicated time is in the past relative to the view's parent close time; false otherwise. | STAmount xrpl::creditLimit | ( | ReadView const & | view, |
| AccountID const & | account, | ||
| AccountID const & | issuer, | ||
| Currency const & | currency ) |
Calculate the maximum amount of IOUs that an account can hold.
| view | the ledger to check against. |
| account | the account of interest. |
| issuer | the issuer of the IOU. |
| currency | the IOU to check. |
Definition at line 43 of file RippleStateHelpers.cpp.
| IOUAmount xrpl::creditLimit2 | ( | ReadView const & | v, |
| AccountID const & | acc, | ||
| AccountID const & | iss, | ||
| Currency const & | cur ) |
Definition at line 68 of file RippleStateHelpers.cpp.
| STAmount xrpl::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.
| view | the ledger to check against. |
| account | the account of interest. |
| issuer | the issuer of the IOU. |
| currency | the IOU to check. |
Definition at line 74 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 107 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 84 of file RippleStateHelpers.h.
|
nodiscard |
Definition at line 128 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 97 of file RippleStateHelpers.h.
|
nodiscard |
Definition at line 105 of file RippleStateHelpers.h.
|
nodiscard |
Definition at line 150 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 118 of file RippleStateHelpers.h.
|
nodiscard |
Definition at line 128 of file RippleStateHelpers.h.
|
nodiscard |
Create a trust line.
This can set an initial balance.
Definition at line 182 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 299 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 397 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 493 of file RippleStateHelpers.cpp.
|
nodiscard |
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 570 of file RippleStateHelpers.cpp.
|
nodiscard |
Check if the destination account is allowed to receive IOU.
Return terNO_RIPPLE if rippling is disabled on both sides and tesSUCCESS otherwise.
Definition at line 598 of file RippleStateHelpers.cpp.
|
nodiscard |
Any transactors that call addEmptyHolding() in doApply must call canAddHolding() in preflight with the same View and Asset.
Definition at line 636 of file RippleStateHelpers.cpp.
|
nodiscard |
Definition at line 706 of file RippleStateHelpers.cpp.
|
nodiscard |
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 779 of file RippleStateHelpers.cpp.
|
nodiscard |
Delete AMMs MPToken.
The passed sle must be obtained from a prior call to view.peek().
Definition at line 830 of file RippleStateHelpers.cpp.
| bool xrpl::isReserveSponsorAllowed | ( | TxType | txType | ) |
Whether the given transaction type may use reserve sponsorship (v1).
Reserve sponsorship is restricted to an explicit allow-list of transaction types; all others reject spfSponsorReserve at preflight.
Definition at line 28 of file SponsorHelpers.cpp.
| bool xrpl::isFeeSponsored | ( | STTx const & | tx | ) |
Whether the transaction's fee is sponsored (sfSponsor present + spfSponsorFee set).
Definition at line 32 of file SponsorHelpers.h.
| bool xrpl::isReserveSponsored | ( | STTx const & | tx | ) |
Whether the transaction's reserve is sponsored (sfSponsor present + spfSponsorReserve set).
Definition at line 41 of file SponsorHelpers.h.
| std::optional< AccountID > xrpl::getTxReserveSponsorID | ( | STTx const & | tx | ) |
Return the AccountID of the transaction's reserve sponsor, or nullopt if unsponsored.
Definition at line 64 of file SponsorHelpers.cpp.
| std::expected< SLE::pointer, TER > xrpl::getTxReserveSponsor | ( | ApplyViewContext | ctx | ) |
Return a mutable SLE for the transaction's reserve sponsor account.
| ctx | The apply-view context (view + tx) |
Definition at line 78 of file SponsorHelpers.cpp.
| std::expected< SLE::const_pointer, TER > xrpl::getTxReserveSponsor | ( | ReadView const & | view, |
| STTx const & | tx ) |
Return a read-only SLE for the transaction's reserve sponsor account.
| view | The ledger read view |
| tx | The transaction to inspect |
Definition at line 97 of file SponsorHelpers.cpp.
|
nodiscard |
The transaction's reserve sponsor for the given account, if applicable.
A reserve sponsor only covers the transaction submitter's own objects, so this returns the tx reserve sponsor SLE only when accountSle is the tx's own (non-pseudo) account; otherwise it returns a null sponsor pointer. This is the single source of truth for the "sponsor applies to tx.Account only" rule that the sponsor-deriving helper overloads in AccountRootHelpers rely on.
| ctx | The apply-view context (view + tx) |
| accountSle | The account whose sponsor is being resolved |
Definition at line 116 of file SponsorHelpers.cpp.
| std::optional< AccountID > xrpl::getLedgerEntryReserveSponsorID | ( | SLE::const_ref | sle, |
| SF_ACCOUNT const & | field = sfSponsor ) |
Return the AccountID stored in the given sponsor field of a ledger entry, or nullopt if absent.
Definition at line 139 of file SponsorHelpers.cpp.
| SLE::pointer xrpl::getLedgerEntryReserveSponsor | ( | ApplyView & | view, |
| SLE::const_ref | sle, | ||
| SF_ACCOUNT const & | field = sfSponsor ) |
Return a mutable SLE for the reserve sponsor recorded on a ledger entry.
Reads the sponsor AccountID from field on sle and peeks the corresponding account root in view.
| view | The mutable apply view |
| sle | The ledger entry whose sponsor field is inspected |
| field | The field that holds the sponsor AccountID (defaults to sfSponsor) |
Definition at line 153 of file SponsorHelpers.cpp.
| void xrpl::addSponsorToLedgerEntry | ( | SLE::ref | sle, |
| SLE::const_ref | sponsorSle, | ||
| SF_ACCOUNT const & | field = sfSponsor ) |
Stamp a reserve sponsor onto a ledger entry using an explicit sponsor SLE.
Sets field on sle to the AccountID from sponsorSle. A no-op when sponsorSle is null (unsponsored). For RippleState entries the field must be sfHighSponsor or sfLowSponsor; for all other entry types it must be sfSponsor.
| sle | The ledger entry to stamp |
| sponsorSle | The sponsor's account root SLE (null → no-op) |
| field | The sponsor field to set (defaults to sfSponsor) |
Definition at line 167 of file SponsorHelpers.cpp.
| void xrpl::addSponsorToLedgerEntry | ( | ApplyViewContext | ctx, |
| SLE::ref | sle, | ||
| SF_ACCOUNT const & | field = sfSponsor ) |
Stamp the transaction's reserve sponsor onto a newly-created ledger entry.
Equivalent to the overload above, but resolves the sponsor via getTxReserveSponsor(ctx) instead of taking it explicitly. A no-op when the transaction is not reserve-sponsored. The entry is assumed to be owned by the transaction submitter, which is the only account a tx reserve sponsor can cover.
Definition at line 184 of file SponsorHelpers.cpp.
| void xrpl::removeSponsorFromLedgerEntry | ( | SLE::ref | sle, |
| SF_ACCOUNT const & | field = sfSponsor ) |
Remove the reserve sponsor field from a ledger entry.
A no-op when field is not present on sle. For RippleState entries the field must be sfHighSponsor or sfLowSponsor; for all other entry types it must be sfSponsor.
| sle | The ledger entry to modify |
| field | The sponsor field to clear (defaults to sfSponsor) |
Definition at line 200 of file SponsorHelpers.cpp.
Whether account is the owner of a ledger entry for sponsorship purposes.
Ownership rules vary by entry type. For RippleState entries the owner is whichever side of the trust line holds the reserve. For credentials, the owner is the subject once accepted and the issuer before acceptance.
| view | The ledger read view (used for SignerList lookup) |
| sle | The ledger entry whose owner is checked |
| account | The candidate account to match against |
account owns sle, false otherwise. Definition at line 217 of file SponsorHelpers.cpp.
| bool xrpl::isLedgerEntrySupportedBySponsorship | ( | SLE const & | sle | ) |
Whether this ledger entry type can have a reserve sponsor attached to it.
Definition at line 267 of file SponsorHelpers.cpp.
| std::uint32_t xrpl::getLedgerEntryOwnerCount | ( | SLE const & | sle | ) |
Return the number of owner-count units the ledger entry consumes.
Most entries cost 1. Exceptions: Oracles scale with their price-data series size, Vaults cost 2 (vault + pseudo-account), and legacy SignerList entries (pre-MultiSignReserve) cost 2 + signer count.
Definition at line 288 of file SponsorHelpers.cpp.
| SF_ACCOUNT const & xrpl::getLedgerEntrySponsorField | ( | SLE const & | sle, |
| AccountID const & | owner ) |
Return the SField used to store the reserve sponsor for owner on sle.
For most entry types this is sfSponsor. RippleState entries use sfHighSponsor or sfLowSponsor depending on which side of the trust line owner holds.
| sle | The ledger entry |
| owner | The account whose sponsor field is needed |
Definition at line 318 of file SponsorHelpers.cpp.
Definition at line 47 of file TokenHelpers.cpp.
Definition at line 55 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 63 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 70 of file TokenHelpers.cpp.
|
nodiscard |
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 78 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 85 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 91 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 97 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 104 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 115 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 127 of file TokenHelpers.cpp.
|
nodiscard |
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 139 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 147 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 153 of file TokenHelpers.cpp.
|
nodiscard |
Checks freeze compliance for withdrawing an asset from a pseudo-account (e.g.
Vault, AMM, LoanBroker) to a destination account.
Asserts that sourceAcct is a pseudo-account and that submitterAcct and dstAcct are not.
Issuer exemption: returns tesSUCCESS immediately when dstAcct is the asset issuer — the issuer can always receive their own token, even when the pool is frozen. Callers that need to block withdrawals from a frozen pool even for the issuer (e.g. because the pool math cannot handle it) must check checkFrozen(sourceAcct, asset) separately before calling this function.
Otherwise checks, in order:
For IOUs a regular individual freeze on the submitter does NOT block self-withdrawal; only deep freeze does. For MPTs "locked" is equivalent to deep-frozen, so locked MPT holders are always blocked.
| view | Ledger view to read freeze state from. |
| pseudoAcct | Pseudo-account the funds are withdrawn from (sender). |
| submitterAcct | Account that submitted the withdrawal transaction. |
| dstAcct | Account receiving the withdrawn funds. |
| asset | Asset being withdrawn. |
Definition at line 160 of file TokenHelpers.cpp.
|
nodiscard |
Checks freeze compliance for depositing an asset into a pseudo-account (e.g.
Vault, AMM, LoanBroker).
Checks, in order:
| view | Ledger view to read freeze state from. |
| srcAcct | Depositor sending the funds. |
| pseudoAcct | Pseudo-account receiving the deposit. |
| asset | Asset being deposited. |
Definition at line 219 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 356 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 387 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 400 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 469 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 489 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 506 of file TokenHelpers.cpp.
Returns the transfer fee as Rate based on the type of token.
| view | The ledger view |
| amount | The amount to transfer |
Definition at line 529 of file TokenHelpers.cpp.
Definition at line 564 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 572 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 587 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 607 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 617 of file TokenHelpers.cpp.
| TER xrpl::directSendNoFee | ( | ApplyView & | view, |
| AccountID const & | uSenderID, | ||
| AccountID const & | uReceiverID, | ||
| STAmount const & | saAmount, | ||
| bool | bCheckIssuer, | ||
| beast::Journal | j ) |
Calls static directSendNoFeeIOU if saAmount represents Issue.
Calls static directSendNoFeeMPT if saAmount represents MPTIssue.
Definition at line 1481 of file TokenHelpers.cpp.
|
nodiscard |
Calls static accountSendIOU if saAmount represents Issue.
Calls static accountSendMPT if saAmount represents MPTIssue.
Definition at line 1500 of file TokenHelpers.cpp.
|
nodiscard |
Like accountSend, except one account is sending multiple payments (with the same asset!) simultaneously.
Calls static accountSendMultiIOU if saAmount represents Issue. Calls static accountSendMultiMPT if saAmount represents MPTIssue.
Definition at line 1521 of file TokenHelpers.cpp.
|
nodiscard |
Definition at line 1541 of file TokenHelpers.cpp.
|
nodiscard |
From the perspective of a vault, return the number of shares to give depositor when they offer a fixed amount of assets.
Note, since shares are MPT, this number is integral and always truncated in this calculation.
| vault | The vault SLE. |
| issuance | The MPTokenIssuance SLE for the vault's shares. |
| assets | The amount of assets to convert. |
Definition at line 24 of file VaultHelpers.cpp.
|
nodiscard |
From the perspective of a vault, return the number of assets to take from depositor when they receive a fixed amount of shares.
Note, since shares are MPT, they are always an integral number.
| vault | The vault SLE. |
| issuance | The MPTokenIssuance SLE for the vault's shares. |
| shares | The amount of shares to convert. |
Definition at line 48 of file VaultHelpers.cpp.
|
nodiscard |
From the perspective of a vault, return the number of shares to demand from the depositor when they ask to withdraw a fixed amount of assets.
Since shares are MPT this number is integral, and it will be rounded to nearest unless explicitly requested to be truncated instead.
| vault | The vault SLE. |
| issuance | The MPTokenIssuance SLE for the vault's shares. |
| assets | The amount of assets to convert. |
| truncate | Whether to truncate instead of rounding. |
| waive | Whether to waive the unrealized-loss discount when computing the exchange rate. |
Definition at line 71 of file VaultHelpers.cpp.
|
nodiscard |
From the perspective of a vault, return the number of assets to give the depositor when they redeem a fixed amount of shares.
Note, since shares are MPT, they are always an integral number.
| vault | The vault SLE. |
| issuance | The MPTokenIssuance SLE for the vault's shares. |
| shares | The amount of shares to convert. |
| waive | Whether to waive (i.e. not subtract) the vault's unrealized loss when computing the exchange rate. |
Definition at line 100 of file VaultHelpers.cpp.
|
nodiscard |
Returns true iff account holds all of the vault's outstanding shares — i.e.
is the sole remaining shareholder. Returns false if the account holds no shares or fewer than the total outstanding.
| view | The ledger view. |
| account | The candidate sole shareholder. |
| issuance | The MPTokenIssuance SLE for the vault's shares; provides both the share MPTID and the outstanding-amount total. |
Definition at line 125 of file VaultHelpers.cpp.
|
nodiscard |
Resolves a Vault's LEVersion, the single point every accounting touch point should call to determine which recognition model (accrual vs.
cash-basis) a Vault uses. Vaults created before featureLendingProtocolV1_1 activated never have sfLEVersion set, which resolves here to VaultVersion::Legacy.
| vault | The vault SLE. |
Definition at line 145 of file VaultHelpers.cpp.
|
nodiscard |
Resolves the VaultKind of a vault SLE.
Returns VaultKind::ClosedEnded when sfVaultKind is present and equal to that value; anything else (including an absent field or an unrecognised value) is treated as VaultKind::OpenEnded.
| vault | The vault SLE. |
Definition at line 175 of file VaultHelpers.cpp.
Reads sfVaultKind from a transaction.
An absent field resolves to VaultKind::OpenEnded (matching the on-ledger default); any unrecognised value is also treated as VaultKind::OpenEnded, mirroring the SLE overload. Callers that need to reject out-of-range values (e.g. preflight) should gate on isValidVaultKind() first.
| tx | The transaction. |
Definition at line 182 of file VaultHelpers.cpp.
|
nodiscard |
Returns true iff sfVaultKind is either absent from tx or is present and equal to a recognised VaultKind enumerator.
Intended for use in preflight to reject malformed transactions before decoding with getVaultKind().
| tx | The transaction. |
Definition at line 188 of file VaultHelpers.cpp.
|
nodiscard |
Returns true iff the (SubscriptionDate, RedemptionDate) gap of a closed-ended vault satisfies kMinInvestmentPeriod <= (red - sub) < kMaxInvestmentPeriod.
The arithmetic is performed in std::int64_t so that sub near UINT32_MAX does not overflow. Shared by VaultCreate::preflight and the ValidVault invariant.
| sub | The value of sfSubscriptionDate. |
| red | The value of sfRedemptionDate. |
Definition at line 198 of file VaultHelpers.cpp.
|
nodiscard |
Returns the current lifecycle phase of a vault.
Open-ended vaults are always NoPhase. For closed-ended vaults the phase is derived from the parent ledger close time and the vault's immutable SubscriptionDate and RedemptionDate.
| view | The ledger view whose parent close time is used as the clock. |
| vault | The vault SLE. |
Definition at line 206 of file VaultHelpers.cpp.
|
nodiscard |
Raw-fields overload of getVaultPhase.
Derives the phase from an already decomposed vault snapshot: an absent or non-ClosedEnded vaultKind resolves to VaultPhase::NoPhase; otherwise the phase is computed from subscriptionDate and redemptionDate against the view's parent close time using the same boundary semantics as the SLE overload (Subscription is inclusive of now == SubscriptionDate; Investment starts strictly after).
| view | The ledger view whose parent close time is used as the clock. |
| vaultKind | The value of sfVaultKind, or nullopt if absent. |
| subscriptionDate | The value of sfSubscriptionDate, or nullopt if absent. |
| redemptionDate | The value of sfRedemptionDate, or nullopt if absent. |
Definition at line 214 of file VaultHelpers.cpp.
| std::chrono::duration< Rep, Period > xrpl::getNextLedgerTimeResolution | ( | std::chrono::duration< Rep, Period > | previousResolution, |
| bool | previousAgree, | ||
| Seq | ledgerSeq ) |
Calculates the close time resolution for the specified ledger.
The XRPL 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.
| Rep | Type representing number of ticks in std::chrono::duration |
| Period | An std::ratio representing tick period in std::chrono::duration |
| Seq | Unsigned 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. |
| previousResolution | the resolution used for the prior ledger |
| previousAgree | whether consensus agreed on the close time of the prior ledger |
| ledgerSeq | the sequence number of the new ledger |
Definition at line 71 of file LedgerTiming.h.
| std::chrono::time_point< Clock, Duration > xrpl::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.
| closeTime | The time to be rounded |
| closeResolution | The resolution |
Definition at line 121 of file LedgerTiming.h.
| std::chrono::time_point< Clock, Duration > xrpl::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.
| closeTime | The raw ledger close time |
| resolution | The current close time resolution |
| priorCloseTime | The close time of the prior ledger |
Definition at line 145 of file LedgerTiming.h.
| hash_set< Book > xrpl::affectedBooks | ( | AcceptedLedgerTx const & | alTx, |
| beast::Journal const & | j ) |
Extract the set of books affected by a transaction.
Walks the transaction's metadata nodes and collects every order book whose offers were created, modified, or deleted. Used by NetworkOPs to fan transaction notifications out to book subscribers.
| alTx | The accepted ledger transaction to inspect. |
| j | Journal used to log per-node parsing failures. Inspecting an offer node can throw if a required field is missing; in that case the bad node is skipped and a warn-level message is emitted via j. Other affected books in the same transaction are still returned. |
Definition at line 309 of file OrderBookDBImpl.cpp.
| Rules xrpl::makeRulesGivenLedger | ( | DigestAwareReadView const & | ledger, |
| Rules const & | current ) |
Definition at line 61 of file ReadView.cpp.
| Rules xrpl::makeRulesGivenLedger | ( | DigestAwareReadView const & | ledger, |
| std::unordered_set< uint256, beast::Uhash<> > const & | presets ) |
Definition at line 67 of file ReadView.cpp.
|
nodiscard |
Determines whether the given expiration time has passed.
In the XRP Ledger, expiration times are defined as the number of whole seconds after the "XRPL 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 XRPL 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.
| view | The ledger whose parent time is used as the clock. |
| exp | The optional expiration time we want to check. |
| comparison | Whether the boundary is inclusive (now >= exp, the default) or exclusive (now > exp). |
|
nodiscard |
|
nodiscard |
|
nodiscard |
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.
| LedgerIndex xrpl::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.
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
Checks that can withdraw funds from an object to itself or a destination.
The receiver may be either the submitting account (sfAccount) or a different destination account (sfDestination).
|
nodiscard |
Checks that can withdraw funds from an object to itself or a destination.
The receiver may be either the submitting account (sfAccount) or a different destination account (sfDestination).
Checks that can withdraw funds from an object to itself or a destination.
The receiver may be either the submitting account (sfAccount) or a different destination account (sfDestination).
|
nodiscard |
|
nodiscard |
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.
| bool xrpl::after | ( | NetClock::time_point | now, |
| std::uint32_t | mark ) |
| void xrpl::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 26 of file RegisterSSLCerts.cpp.
| std::string xrpl::toBase58 | ( | AccountID const & | v | ) |
Convert AccountID to base58 checked string.
Definition at line 95 of file AccountID.cpp.
| std::optional< AccountID > xrpl::parseBase58 | ( | std::string const & | s | ) |
Parse AccountID from checked, base58 string.
Definition at line 105 of file AccountID.cpp.
| AccountID const & xrpl::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 159 of file AccountID.cpp.
| AccountID const & xrpl::noAccount | ( | ) |
A placeholder for empty accounts.
Definition at line 166 of file AccountID.cpp.
| bool xrpl::toIssuer | ( | AccountID & | issuer, |
| std::string const & | s ) |
Convert hex or base58 string to AccountID.
Definition at line 173 of file AccountID.cpp.
| bool xrpl::isXRP | ( | AccountID const & | c | ) |
Definition at line 84 of file AccountID.h.
| std::string xrpl::to_string | ( | AccountID const & | account | ) |
Definition at line 91 of file AccountID.h.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| AccountID const & | x ) |
Definition at line 97 of file AccountID.h.
| void xrpl::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.
| count | The number of entries the cache should accommodate. Zero will disable the cache, releasing any memory associated with it. |
Definition at line 88 of file AccountID.cpp.
Calculate Liquidity Provider Token (LPT) Currency.
Definition at line 30 of file AMMCore.cpp.
| Issue xrpl::ammLPTIssue | ( | Asset const & | asset1, |
| Asset const & | asset2, | ||
| AccountID const & | ammAccountID ) |
Calculate LPT Issue from AMM asset pair.
Definition at line 54 of file AMMCore.cpp.
| NotTEC xrpl::invalidAMMAmount | ( | STAmount const & | amount, |
| std::optional< std::pair< Asset, Asset > > const & | pair = std::nullopt, | ||
| bool | validZero = false ) |
Validate the amount.
If validZero is false and amount is beast::kZero 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 98 of file AMMCore.cpp.
| NotTEC xrpl::invalidAMMAsset | ( | Asset const & | asset, |
| std::optional< std::pair< Asset, Asset > > const & | pair = std::nullopt ) |
Definition at line 60 of file AMMCore.cpp.
| NotTEC xrpl::invalidAMMAssetPair | ( | Asset const & | asset1, |
| Asset const & | asset2, | ||
| std::optional< std::pair< Asset, Asset > > const & | pair = std::nullopt ) |
Definition at line 83 of file AMMCore.cpp.
| std::optional< std::uint8_t > xrpl::ammAuctionTimeSlot | ( | std::uint64_t | current, |
| STObject const & | auctionSlot ) |
Get time slot of the auction slot.
Definition at line 111 of file AMMCore.cpp.
| bool xrpl::ammEnabled | ( | Rules const & | rules | ) |
Return true if required AMM amendment is enabled.
Definition at line 129 of file AMMCore.cpp.
| Number xrpl::getFee | ( | std::uint16_t | tfee | ) |
| Number xrpl::feeMult | ( | std::uint16_t | tfee | ) |
| Number xrpl::feeMultHalf | ( | std::uint16_t | tfee | ) |
Definition at line 23 of file AmountConversions.h.
Definition at line 32 of file AmountConversions.h.
Definition at line 38 of file AmountConversions.h.
Definition at line 46 of file AmountConversions.h.
Definition at line 53 of file AmountConversions.h.
Definition at line 59 of file AmountConversions.h.
|
delete |
| STAmount xrpl::toAmount< STAmount > | ( | STAmount const & | amt | ) |
Definition at line 70 of file AmountConversions.h.
| IOUAmount xrpl::toAmount< IOUAmount > | ( | STAmount const & | amt | ) |
Definition at line 77 of file AmountConversions.h.
| XRPAmount xrpl::toAmount< XRPAmount > | ( | STAmount const & | amt | ) |
Definition at line 91 of file AmountConversions.h.
| MPTAmount xrpl::toAmount< MPTAmount > | ( | STAmount const & | amt | ) |
Definition at line 105 of file AmountConversions.h.
|
delete |
| IOUAmount xrpl::toAmount< IOUAmount > | ( | IOUAmount const & | amt | ) |
Definition at line 124 of file AmountConversions.h.
|
delete |
| XRPAmount xrpl::toAmount< XRPAmount > | ( | XRPAmount const & | amt | ) |
Definition at line 135 of file AmountConversions.h.
|
delete |
| MPTAmount xrpl::toAmount< MPTAmount > | ( | MPTAmount const & | amt | ) |
Definition at line 146 of file AmountConversions.h.
| T xrpl::toAmount | ( | Asset const & | asset, |
| Number const & | n, | ||
| Number::RoundingMode | mode = Number::getround() ) |
Definition at line 154 of file AmountConversions.h.
| T xrpl::toMaxAmount | ( | Asset const & | asset | ) |
Definition at line 187 of file AmountConversions.h.
| STAmount xrpl::toSTAmount | ( | Asset const & | asset, |
| Number const & | n, | ||
| Number::RoundingMode | mode = Number::getround() ) |
Definition at line 219 of file AmountConversions.h.
| Asset xrpl::getAsset | ( | T const & | amt | ) |
Definition at line 226 of file AmountConversions.h.
|
constexpr |
Definition at line 253 of file AmountConversions.h.
| void xrpl::forApiVersions | ( | Fn const & | fn, |
| Args &&... | args ) |
Definition at line 138 of file ApiVersion.h.
| void xrpl::forAllApiVersions | ( | Fn const & | fn, |
| Args &&... | args ) |
Definition at line 159 of file ApiVersion.h.
| json::Value xrpl::toJson | ( | Asset const & | asset | ) |
|
constexpr |
| std::string xrpl::to_string | ( | Asset const & | asset | ) |
| bool xrpl::validJSONAsset | ( | json::Value const & | jv | ) |
| Asset xrpl::assetFromJson | ( | json::Value const & | jv | ) |
| void xrpl::hash_append | ( | Hasher & | h, |
| Asset const & | r ) |
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Asset const & | x ) |
| void xrpl::serializeBatch | ( | Serializer & | msg, |
| AccountID const & | outerAccount, | ||
| std::uint32_t | outerSeqValue, | ||
| std::uint32_t const & | flags, | ||
| std::vector< uint256 > const & | txids ) |
Definition at line 14 of file protocol/Batch.h.
| std::string xrpl::to_string | ( | Book const & | book | ) |
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Book const & | x ) |
| void xrpl::hash_append | ( | Hasher & | h, |
| Book const & | b ) |
|
nodiscardconstexpr |
| void xrpl::incrementConfidentialVersion | ( | STObject & | mptoken | ) |
Increments the confidential balance version counter on an MPToken.
The version counter is used to prevent replay attacks by binding proofs to a specific state of the account's confidential balance. Wraps to 0 on overflow (defined behavior for unsigned integers).
| mptoken | The MPToken ledger entry to update. |
Definition at line 70 of file include/xrpl/protocol/ConfidentialTransfer.h.
| uint256 xrpl::getSendContextHash | ( | AccountID const & | account, |
| uint192 const & | issuanceID, | ||
| std::uint32_t | sequence, | ||
| AccountID const & | destination, | ||
| std::uint32_t | version ) |
Generates the context hash for ConfidentialMPTSend transactions.
Creates a unique 256-bit hash that binds the zero-knowledge proofs to this specific send transaction, preventing proof reuse across transactions.
| account | The sender's account ID. |
| issuanceID | The MPToken Issuance ID. |
| sequence | The transaction sequence number or ticket number. |
| destination | The destination account ID. |
| version | The sender's confidential balance version. |
Definition at line 67 of file ConfidentialTransfer.cpp.
| uint256 xrpl::getClawbackContextHash | ( | AccountID const & | account, |
| uint192 const & | issuanceID, | ||
| std::uint32_t | sequence, | ||
| AccountID const & | holder ) |
Generates the context hash for ConfidentialMPTClawback transactions.
Creates a unique 256-bit hash that binds the equality proof to this specific clawback transaction.
| account | The issuer's account ID. |
| issuanceID | The MPToken Issuance ID. |
| sequence | The transaction sequence number or ticket number. |
| holder | The holder's account ID being clawed back from. |
Definition at line 86 of file ConfidentialTransfer.cpp.
| uint256 xrpl::getConvertContextHash | ( | AccountID const & | account, |
| uint192 const & | issuanceID, | ||
| std::uint32_t | sequence ) |
Generates the context hash for ConfidentialMPTConvert transactions.
Creates a unique 256-bit hash that binds the Schnorr proof (for key registration) to this specific convert transaction.
| account | The holder's account ID. |
| issuanceID | The MPToken Issuance ID. |
| sequence | The transaction sequence number or a ticket number. |
Definition at line 103 of file ConfidentialTransfer.cpp.
| uint256 xrpl::getConvertBackContextHash | ( | AccountID const & | account, |
| uint192 const & | issuanceID, | ||
| std::uint32_t | sequence, | ||
| std::uint32_t | version ) |
Generates the context hash for ConfidentialMPTConvertBack transactions.
Creates a unique 256-bit hash that binds the zero-knowledge proofs to this specific convert-back transaction.
| account | The holder's account ID. |
| issuanceID | The MPToken Issuance ID. |
| sequence | The transaction sequence number or a ticket number. |
| version | The holder's confidential balance version. |
Definition at line 112 of file ConfidentialTransfer.cpp.
| std::optional< EcPair > xrpl::makeEcPair | ( | Slice const & | buffer | ) |
Parses an ElGamal ciphertext into two secp256k1 public key components.
Breaks an encrypted amount (size=xrpl::kEcGamalEncryptedTotalLength, two compressed EC points of size=xrpl::kEcCiphertextComponentLength) into a pair containing (C1, C2) for use in cryptographic operations.
| buffer | The buffer containing the compressed ciphertext (size=xrpl::kEcGamalEncryptedTotalLength). |
Definition at line 125 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::serializeEcPair | ( | EcPair const & | pair | ) |
Serializes an EcPair into compressed form.
Converts an EcPair (C1, C2) back into a buffer (size=xrpl::kEcGamalEncryptedTotalLength) containing two compressed EC points (size=xrpl::kEcCiphertextComponentLength each).
| pair | The EcPair to serialize. |
Definition at line 150 of file ConfidentialTransfer.cpp.
| bool xrpl::isValidCiphertext | ( | Slice const & | buffer | ) |
Verifies that a buffer contains two valid, parsable EC public keys.
| buffer | The input buffer containing two concatenated components. |
Definition at line 171 of file ConfidentialTransfer.cpp.
| bool xrpl::isValidCompressedECPoint | ( | Slice const & | buffer | ) |
Verifies that a buffer contains a valid, parsable compressed EC point.
Can be used to validate both compressed public keys and Pedersen commitments. Fails early if the prefix byte is not 0x02 or 0x03.
| buffer | The input buffer containing a compressed EC point (size=xrpl::kCompressedEcPointLength). |
Definition at line 177 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::homomorphicAdd | ( | Slice const & | a, |
| Slice const & | b ) |
Homomorphically adds two ElGamal ciphertexts.
Uses the additive homomorphic property of ElGamal encryption to compute Enc(a + b) from Enc(a) and Enc(b) without decryption.
| a | The first ciphertext (size=xrpl::kEcGamalEncryptedTotalLength). |
| b | The second ciphertext (size=xrpl::kEcGamalEncryptedTotalLength). |
Definition at line 191 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::homomorphicSubtract | ( | Slice const & | a, |
| Slice const & | b ) |
Homomorphically subtracts two ElGamal ciphertexts.
Uses the additive homomorphic property of ElGamal encryption to compute Enc(a - b) from Enc(a) and Enc(b) without decryption.
| a | The minuend ciphertext (size=xrpl::kEcGamalEncryptedTotalLength). |
| b | The subtrahend ciphertext (size=xrpl::kEcGamalEncryptedTotalLength). |
Definition at line 214 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::rerandomizeCiphertext | ( | Slice const & | ciphertext, |
| Slice const & | pubKeySlice, | ||
| Slice const & | randomness ) |
Re-randomizes an ElGamal ciphertext without changing its plaintext.
Adds Enc(0; randomness) under the supplied public key to the ciphertext. This is used when a public, deterministic scalar must perturb ciphertext randomness while preserving ledger reproducibility.
| ciphertext | The ciphertext to re-randomize (size=xrpl::kEcGamalEncryptedTotalLength). |
| pubKeySlice | The ElGamal public key matching the ciphertext recipient. |
| randomness | The scalar used as zero-encryption randomness (size=xrpl::kEcScalarLength). |
Definition at line 237 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::encryptAmount | ( | uint64_t const | amt, |
| Slice const & | pubKeySlice, | ||
| Slice const & | blindingFactor ) |
Encrypts an amount using ElGamal encryption.
Produces a ciphertext C = (C1, C2) where C1 = r*G and C2 = m*G + r*Pk, using the provided blinding factor r.
| amt | The plaintext amount to encrypt. |
| pubKeySlice | The recipient's ElGamal public key (size=xrpl::kEcPubKeyLength). |
| blindingFactor | The randomness used as blinding factor r (size=xrpl::ecBlindingFactorLength). |
Definition at line 259 of file ConfidentialTransfer.cpp.
| std::optional< Buffer > xrpl::encryptCanonicalZeroAmount | ( | Slice const & | pubKeySlice, |
| AccountID const & | account, | ||
| MPTID const & | mptId ) |
Generates the canonical zero encryption for a specific MPToken.
Creates a deterministic encryption of zero that is unique to the account and MPT issuance. Used to initialize confidential balance fields.
| pubKeySlice | The holder's ElGamal public key (size=xrpl::kEcPubKeyLength). |
| account | The account ID of the token holder. |
| mptId | The MPToken Issuance ID. |
Definition at line 272 of file ConfidentialTransfer.cpp.
| TER xrpl::verifySchnorrProof | ( | Slice const & | pubKeySlice, |
| Slice const & | proofSlice, | ||
| uint256 const & | contextHash ) |
Verifies a Schnorr proof of knowledge of an ElGamal private key.
Proves that the submitter knows the secret key corresponding to the provided public key, without revealing the secret key itself.
| pubKeySlice | The ElGamal public key (size=xrpl::kEcPubKeyLength). |
| proofSlice | The Schnorr proof (size=xrpl::ecSchnorrProofLength). |
| contextHash | The 256-bit context hash binding the proof. |
Definition at line 401 of file ConfidentialTransfer.cpp.
Validates the format of encrypted amount fields in a transaction.
Checks that all ciphertext fields in the transaction object have the correct length and contain valid EC points. This function is only used by ConfidentialMPTConvert and ConfidentialMPTConvertBack transactions.
| object | The transaction object containing encrypted amount fields. |
Definition at line 362 of file ConfidentialTransfer.cpp.
| TER xrpl::verifyRevealedAmount | ( | uint64_t const | amount, |
| Slice const & | blindingFactor, | ||
| ConfidentialRecipient const & | holder, | ||
| ConfidentialRecipient const & | issuer, | ||
| std::optional< ConfidentialRecipient > const & | auditor ) |
Verifies revealed amount encryptions for all recipients.
Validates that the same amount was correctly encrypted for the holder, issuer, and optionally the auditor using their respective public keys.
| amount | The revealed plaintext amount. |
| blindingFactor | The blinding factor used in all encryptions (size=xrpl::ecBlindingFactorLength). |
| holder | The holder's public key and encrypted amount. |
| issuer | The issuer's public key and encrypted amount. |
| auditor | Optional auditor's public key and encrypted amount. |
Definition at line 313 of file ConfidentialTransfer.cpp.
|
constexpr |
Returns the number of recipients in a confidential transfer.
Returns 4 if an auditor is present (sender, destination, issuer, auditor), or 3 if no auditor (sender, destination, issuer).
| hasAuditor | Whether the issuance has an auditor configured. |
Definition at line 336 of file include/xrpl/protocol/ConfidentialTransfer.h.
| TER xrpl::verifyClawbackProof | ( | uint64_t const | amount, |
| Slice const & | proof, | ||
| Slice const & | pubKeySlice, | ||
| Slice const & | ciphertext, | ||
| uint256 const & | contextHash ) |
Verifies a compact sigma clawback proof.
Proves that the issuer knows the exact amount encrypted in the holder's balance ciphertext. Used in ConfidentialMPTClawback to verify the issuer can decrypt the balance using their private key.
| amount | The revealed plaintext amount. |
| proof | The zero-knowledge proof bytes (ecClawbackProofLength). |
| pubKeySlice | The issuer's ElGamal public key (kEcPubKeyLength bytes). |
| ciphertext | The issuer's encrypted balance on the holder's account (kEcGamalEncryptedTotalLength bytes). |
| contextHash | The 256-bit context hash binding the proof. |
Definition at line 418 of file ConfidentialTransfer.cpp.
| Buffer xrpl::generateBlindingFactor | ( | ) |
Generates a cryptographically secure blinding factor (size=xrpl::kEcBlindingFactorLength).
Produces random bytes suitable for use as an ElGamal blinding factor or Pedersen commitment randomness.
Definition at line 247 of file ConfidentialTransfer.cpp.
| TER xrpl::verifySendProof | ( | Slice const & | proof, |
| ConfidentialRecipient const & | sender, | ||
| ConfidentialRecipient const & | destination, | ||
| ConfidentialRecipient const & | issuer, | ||
| std::optional< ConfidentialRecipient > const & | auditor, | ||
| Slice const & | spendingBalance, | ||
| Slice const & | amountCommitment, | ||
| Slice const & | balanceCommitment, | ||
| uint256 const & | contextHash ) |
Verifies all zero-knowledge proofs for a ConfidentialMPTSend transaction.
This function calls mpt_verify_send_proof API in the mpt-crypto utility lib, which verifies the equality proof, amount linkage, balance linkage, and range proof. Equality proof: Proves the same value is encrypted for the sender, receiver, issuer, and auditor. Amount linkage: Proves the send amount matches the amount Pedersen commitment. Balance linkage: Proves the sender's balance matches the balance Pedersen commitment. Range proof: Proves the amount and the remaining balance are within range [0, 2^64-1].
| proof | The full proof blob. |
| sender | The sender's public key and encrypted amount. |
| destination | The destination's public key and encrypted amount. |
| issuer | The issuer's public key and encrypted amount. |
| auditor | The auditor's public key and encrypted amount if present. |
| spendingBalance | The sender's current spending balance ciphertext. |
| amountCommitment | The Pedersen commitment to the send amount. |
| balanceCommitment | The Pedersen commitment to the sender's balance. |
| contextHash | The context hash binding the proof. |
Definition at line 446 of file ConfidentialTransfer.cpp.
| TER xrpl::verifyConvertBackProof | ( | Slice const & | proof, |
| Slice const & | pubKeySlice, | ||
| Slice const & | spendingBalance, | ||
| Slice const & | balanceCommitment, | ||
| uint64_t | amount, | ||
| uint256 const & | contextHash ) |
Verifies all zero-knowledge proofs for a ConfidentialMPTConvertBack transaction.
This function calls mpt_verify_convert_back_proof API in the mpt-crypto utility lib, which verifies the balance linkage proof and range proof. Balance linkage proof: proves the balance commitment matches the spending ciphertext. Range proof: proves the remaining balance after convert back is within range [0, 2^64-1].
| proof | The full proof blob. |
| pubKeySlice | The holder's public key. |
| spendingBalance | The holder's spending balance ciphertext. |
| balanceCommitment | The Pedersen commitment to the balance. |
| amount | The amount being converted back to public. |
| contextHash | The context hash binding the proof. |
Definition at line 519 of file ConfidentialTransfer.cpp.
| secp256k1_context const * xrpl::secp256k1Context | ( | ) |
Definition at line 9 of file secp256k1.h.
| xrpl::detail::TokenCodecErrcCategory const & xrpl::tokenCodecErrcCategory | ( | ) |
Definition at line 71 of file token_errors.h.
| std::error_code xrpl::make_error_code | ( | xrpl::TokenCodecErrc | e | ) |
Definition at line 78 of file token_errors.h.
| sha512_half_hasher::result_type xrpl::sha512Half | ( | Args const &... | args | ) |
| sha512_half_hasher_s::result_type xrpl::sha512HalfS | ( | Args const &... | args | ) |
| std::string xrpl::rpcErrorString | ( | json::Value const & | jv | ) |
Returns a single string with the contents of an RPC error.
Definition at line 220 of file ErrorCodes.cpp.
|
consteval |
| std::map< std::string, AmendmentSupport > const & xrpl::allAmendments | ( | ) |
All amendments libxrpl knows about.
All amendments libxrpl knows of.
Definition at line 332 of file libxrpl/protocol/Feature.cpp.
| std::optional< uint256 > xrpl::getRegisteredFeature | ( | std::string const & | name | ) |
Definition at line 369 of file libxrpl/protocol/Feature.cpp.
| size_t xrpl::featureToBitsetIndex | ( | uint256 const & | f | ) |
Definition at line 398 of file libxrpl/protocol/Feature.cpp.
| uint256 xrpl::bitsetIndexToFeature | ( | size_t | i | ) |
Definition at line 404 of file libxrpl/protocol/Feature.cpp.
| std::string xrpl::featureToName | ( | uint256 const & | f | ) |
Definition at line 410 of file libxrpl/protocol/Feature.cpp.
| void xrpl::foreachFeature | ( | FeatureBitset | bs, |
| F && | f ) |
|
noexcept |
Definition at line 99 of file HashPrefix.h.
Definition at line 122 of file Indexes.cpp.
Definition at line 164 of file Indexes.cpp.
| std::uint64_t xrpl::getQuality | ( | uint256 const & | uBase | ) |
Definition at line 172 of file Indexes.cpp.
| MPTID xrpl::makeMptID | ( | std::uint32_t const | sequence, |
| AccountID const & | account ) |
Definition at line 184 of file Indexes.cpp.
| std::string xrpl::to_string | ( | IOUAmount const & | amount | ) |
Definition at line 87 of file libxrpl/protocol/IOUAmount.cpp.
| IOUAmount xrpl::mulRatio | ( | IOUAmount const & | amt, |
| std::uint32_t | num, | ||
| std::uint32_t | den, | ||
| bool | roundUp ) |
Definition at line 93 of file libxrpl/protocol/IOUAmount.cpp.
| std::string xrpl::to_string | ( | Issue const & | ac | ) |
| json::Value xrpl::toJson | ( | Issue const & | is | ) |
| Issue xrpl::issueFromJson | ( | json::Value const & | v | ) |
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Issue const & | x ) |
| void xrpl::hash_append | ( | Hasher & | h, |
| Issue const & | r ) |
|
nodiscardconstexpr |
| Issue const & xrpl::xrpIssue | ( | ) |
| Issue const & xrpl::noIssue | ( | ) |
| std::optional< KeyType > xrpl::keyTypeFromString | ( | std::string const & | s | ) |
| Stream & xrpl::operator<< | ( | Stream & | s, |
| KeyType | type ) |
| std::vector< std::pair< std::string, LedgerFlagMap > > const & xrpl::getAllLedgerFlags | ( | ) |
Definition at line 264 of file LedgerFormats.h.
| bool xrpl::getCloseAgree | ( | LedgerHeader const & | info | ) |
Definition at line 64 of file LedgerHeader.h.
| void xrpl::addRaw | ( | LedgerHeader const & | info, |
| Serializer & | s, | ||
| bool | includeHash = false ) |
Definition at line 14 of file libxrpl/protocol/LedgerHeader.cpp.
| LedgerHeader xrpl::deserializeHeader | ( | Slice | data, |
| bool | hasHash = false ) |
Deserialize a ledger header from a byte array.
Definition at line 31 of file libxrpl/protocol/LedgerHeader.cpp.
| LedgerHeader xrpl::deserializePrefixedHeader | ( | Slice | data, |
| bool | hasHash = false ) |
Deserialize a ledger header (prefixed with 4 bytes) from a byte array.
Definition at line 54 of file libxrpl/protocol/LedgerHeader.cpp.
| uint256 xrpl::calculateLedgerHash | ( | LedgerHeader const & | info | ) |
Calculate the hash of a ledger header.
Definition at line 60 of file libxrpl/protocol/LedgerHeader.cpp.
| std::basic_ostream< Char, Traits > & xrpl::operator<< | ( | std::basic_ostream< Char, Traits > & | os, |
| MPTAmount const & | q ) |
Definition at line 134 of file MPTAmount.h.
| std::string xrpl::to_string | ( | MPTAmount const & | amount | ) |
Definition at line 148 of file MPTAmount.h.
| MPTAmount xrpl::mulRatio | ( | MPTAmount const & | amt, |
| std::uint32_t | num, | ||
| std::uint32_t | den, | ||
| bool | roundUp ) |
Definition at line 154 of file MPTAmount.h.
Definition at line 74 of file MPTIssue.h.
|
constexpr |
Definition at line 79 of file MPTIssue.h.
| bool xrpl::isXRP | ( | MPTID const & | ) |
MPT is a non-native token.
Definition at line 89 of file MPTIssue.h.
Definition at line 95 of file MPTIssue.h.
| MPTID xrpl::noMPT | ( | ) |
Definition at line 114 of file MPTIssue.h.
| MPTID xrpl::badMPT | ( | ) |
Definition at line 121 of file MPTIssue.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| MPTIssue const & | r ) |
Definition at line 129 of file MPTIssue.h.
| json::Value xrpl::toJson | ( | MPTIssue const & | mptIssue | ) |
Definition at line 52 of file MPTIssue.cpp.
| std::string xrpl::to_string | ( | MPTIssue const & | mptIssue | ) |
Definition at line 60 of file MPTIssue.cpp.
| MPTIssue xrpl::mptIssueFromJson | ( | json::Value const & | jv | ) |
Definition at line 66 of file MPTIssue.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| MPTIssue const & | x ) |
Definition at line 96 of file MPTIssue.cpp.
| bool xrpl::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 24 of file NFTokenID.cpp.
| std::optional< uint256 > xrpl::getNFTokenIDFromPage | ( | TxMeta const & | transactionMeta | ) |
Definition at line 41 of file NFTokenID.cpp.
| std::vector< uint256 > xrpl::getNFTokenIDFromDeletedOffer | ( | TxMeta const & | transactionMeta | ) |
Definition at line 112 of file NFTokenID.cpp.
| void xrpl::insertNFTokenID | ( | json::Value & | response, |
| std::shared_ptr< STTx const > const & | transaction, | ||
| TxMeta const & | transactionMeta ) |
Definition at line 135 of file NFTokenID.cpp.
| bool xrpl::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 20 of file NFTokenOfferID.cpp.
| std::optional< uint256 > xrpl::getOfferIDFromCreatedOffer | ( | TxMeta const & | transactionMeta | ) |
Definition at line 40 of file NFTokenOfferID.cpp.
| void xrpl::insertNFTokenOfferID | ( | json::Value & | response, |
| std::shared_ptr< STTx const > const & | transaction, | ||
| TxMeta const & | transactionMeta ) |
Definition at line 54 of file NFTokenOfferID.cpp.
Definition at line 105 of file PathAsset.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| PathAsset const & | pathAsset ) |
Definition at line 124 of file PathAsset.h.
| bool xrpl::isXRP | ( | PathAsset const & | asset | ) |
Definition at line 130 of file PathAsset.h.
| std::string xrpl::to_string | ( | PathAsset const & | asset | ) |
Definition at line 10 of file PathAsset.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| PathAsset const & | x ) |
Definition at line 15 of file PathAsset.cpp.
| void xrpl::serializePayChanAuthorization | ( | Serializer & | msg, |
| uint256 const & | key, | ||
| XRPAmount const & | amt ) |
|
constexpr |
There are 10,000 basis points (bips) in 100%.
Basis points represent 0.01%.
Given a value X, to find the amount for B bps, use X * B / bipsPerUnity
Example: If a loan broker has 999 XRP of debt, and must maintain 1,000 bps of that debt as cover (10%), then the minimum cover amount is 999,000,000 drops
Given a percentage P, to find the number of bps that percentage represents, use P * bipsPerUnity.
Example: 50% is 0.50 * bipsPerUnity = 5,000 bps.
|
constexpr |
|
constexpr |
Definition at line 121 of file Protocol.h.
|
constexpr |
Definition at line 126 of file Protocol.h.
|
constexpr |
Definition at line 132 of file Protocol.h.
|
constexpr |
Definition at line 138 of file Protocol.h.
| bool xrpl::isVotingLedger | ( | LedgerIndex | seq | ) |
Returns true if the given ledgerIndex is a voting ledgerIndex.
Definition at line 5 of file Protocol.cpp.
| bool xrpl::isFlagLedger | ( | LedgerIndex | seq | ) |
Returns true if the given ledgerIndex is a flag ledgerIndex.
Definition at line 11 of file Protocol.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| PublicKey const & | pk ) |
Print the public key to a stream.
Definition at line 28 of file PublicKey.cpp.
Definition at line 133 of file PublicKey.h.
Definition at line 138 of file PublicKey.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| PublicKey const & | pk ) |
Definition at line 147 of file PublicKey.h.
| std::string xrpl::toBase58 | ( | TokenType | type, |
| PublicKey const & | pk ) |
Definition at line 175 of file PublicKey.h.
| std::optional< PublicKey > xrpl::parseBase58 | ( | TokenType | type, |
| std::string const & | s ) |
Definition at line 37 of file PublicKey.cpp.
| std::optional< ECDSACanonicality > xrpl::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).
Canonical signatures are important to protect against signature morphing attacks.
| vSig | the signature data |
| sigLen | the length of the signature |
| strict_param | whether to enforce strictly canonical semantics |
Definition at line 113 of file PublicKey.cpp.
|
nodiscard |
Returns the type of public key.
Definition at line 209 of file PublicKey.cpp.
|
nodiscard |
Definition at line 226 of file PublicKey.h.
|
nodiscardnoexcept |
Verify a secp256k1 signature on the digest of a message.
Definition at line 224 of file PublicKey.cpp.
|
nodiscardnoexcept |
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 272 of file PublicKey.cpp.
Calculate the 160-bit node ID from a node public key.
Definition at line 296 of file PublicKey.cpp.
Definition at line 149 of file AccountID.cpp.
| std::string xrpl::getFingerprint | ( | beast::ip::Endpoint const & | address, |
| std::optional< PublicKey > const & | publicKey = std::nullopt, | ||
| std::optional< std::string > const & | id = std::nullopt ) |
Definition at line 262 of file PublicKey.h.
Calculate the quality of a two-hop path given the two hops.
| lhs | The first leg of the path: input to intermediate. |
| rhs | The second leg of the path: intermediate to output. |
Definition at line 114 of file Quality.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Rate const & | rate ) |
| bool xrpl::isRpcError | ( | json::Value | jvResult | ) |
Definition at line 22 of file RPCErr.cpp.
| json::Value xrpl::rpcError | ( | ErrorCodeI | iError | ) |
Definition at line 13 of file RPCErr.cpp.
| bool xrpl::isFeatureEnabled | ( | uint256 const & | feature, |
| bool | resultIfNoRules ) |
Check whether a feature is enabled in the current ledger rules.
| feature | The feature to be tested. |
| resultIfNoRules | What to return if called from outside a Transactor context. |
| bool xrpl::isFeatureEnabled | ( | uint256 const & | feature | ) |
Check whether a feature is enabled in the current ledger rules.
| feature | The feature to be tested. |
Returns false if no global Rules object is available. i.e. Outside of a Transactor context
| std::optional< Rules > const & xrpl::getCurrentTransactionRules | ( | ) |
| void xrpl::setCurrentTransactionRules | ( | std::optional< Rules > | r | ) |
| void xrpl::createGuards | ( | Rules const & | rules, |
| std::optional< CurrentTransactionRulesGuard > & | rulesGuard, | ||
| std::optional< NumberMantissaScaleGuard > & | mantissaScaleGuard ) |
| std::optional< SecretKey > xrpl::parseBase58 | ( | TokenType | type, |
| std::string const & | s ) |
Parse a secret key.
Definition at line 37 of file PublicKey.cpp.
| std::string xrpl::toBase58 | ( | TokenType | type, |
| SecretKey const & | sk ) |
Definition at line 111 of file SecretKey.h.
| SecretKey xrpl::randomSecretKey | ( | ) |
Create a secret key using secure random numbers.
Definition at line 274 of file SecretKey.cpp.
Generate a new secret key deterministically.
Definition at line 284 of file SecretKey.cpp.
Derive the public key from a secret key.
Definition at line 306 of file SecretKey.cpp.
Generate a key pair deterministically.
This algorithm is specific to the XRPL:
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 338 of file SecretKey.cpp.
Create a key pair using secure random numbers.
Definition at line 355 of file SecretKey.cpp.
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 208 of file SecretKey.cpp.
Definition at line 163 of file SecretKey.h.
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 233 of file SecretKey.cpp.
Definition at line 179 of file SecretKey.h.
| Seed xrpl::randomSeed | ( | ) |
| Seed xrpl::generateSeed | ( | std::string const & | passPhrase | ) |
Generate a seed deterministically.
The algorithm is specific to the XRPL:
The seed is calculated as the first 128 bits of the SHA512-Half of the string text excluding any terminating null.
| std::optional< Seed > xrpl::parseBase58 | ( | std::string const & | s | ) |
Parse a Base58 encoded string into a seed.
Parse a Base58 encoded string into a seed.
Definition at line 105 of file AccountID.cpp.
| std::optional< Seed > xrpl::parseGenericSeed | ( | std::string const & | str, |
| bool | rfc1751 = true ) |
| std::string xrpl::seedAs1751 | ( | Seed const & | seed | ) |
| std::string xrpl::toBase58 | ( | Seed const & | seed | ) |
| Blob xrpl::serializeBlob | ( | Object const & | o | ) |
Serialize an object to a blob.
Definition at line 17 of file serialize.h.
| std::string xrpl::serializeHex | ( | STObject const & | o | ) |
Serialize an object to a hex string.
Definition at line 28 of file serialize.h.
| int xrpl::fieldCode | ( | SerializedTypeID | id, |
| int | index ) |
| OptionaledField< T > xrpl::operator~ | ( | TypedField< T > const & | f | ) |
| void xrpl::sign | ( | STObject & | st, |
| HashPrefix const & | prefix, | ||
| KeyType | type, | ||
| SecretKey const & | sk, | ||
| SF_VL const & | sigField = sfSignature ) |
Sign an STObject.
| st | Object to sign |
| prefix | Prefix to insert before serialized object when hashing |
| type | Signing key type used to derive public key |
| sk | Signing secret key |
| sigField | Field in which to store the signature on the object. If not specified the value defaults to sfSignature. |
Definition at line 16 of file libxrpl/protocol/Sign.cpp.
| bool xrpl::verify | ( | STObject const & | st, |
| HashPrefix const & | prefix, | ||
| PublicKey const & | pk, | ||
| SF_VL const & | sigField = sfSignature ) |
Returns true if STObject contains valid signature.
| st | Signed object |
| prefix | Prefix inserted before serialized object when hashing |
| pk | Public key for verifying signature |
| sigField | Object's field containing the signature. If not specified the value defaults to sfSignature. |
Definition at line 30 of file libxrpl/protocol/Sign.cpp.
| Serializer xrpl::buildMultiSigningData | ( | STObject const & | obj, |
| AccountID const & | signingID ) |
Return a Serializer suitable for computing a multisigning TxnSignature.
Definition at line 73 of file libxrpl/protocol/Sign.cpp.
| Serializer xrpl::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:
Definition at line 81 of file libxrpl/protocol/Sign.cpp.
| void xrpl::finishMultiSigningData | ( | AccountID const & | signingID, |
| Serializer & | s ) |
Definition at line 89 of file STAccount.h.
Definition at line 94 of file STAccount.h.
Definition at line 101 of file STAccount.h.
Definition at line 106 of file STAccount.h.
Definition at line 112 of file STAccount.h.
| STAmount xrpl::amountFromQuality | ( | std::uint64_t | rate | ) |
Definition at line 895 of file STAmount.cpp.
| STAmount xrpl::amountFromString | ( | Asset const & | asset, |
| std::string const & | amount ) |
Definition at line 907 of file STAmount.cpp.
| STAmount xrpl::amountFromJson | ( | SField const & | name, |
| json::Value const & | v ) |
Definition at line 916 of file STAmount.cpp.
| bool xrpl::amountFromJsonNoThrow | ( | STAmount & | result, |
| json::Value const & | jvSource ) |
Definition at line 1040 of file STAmount.cpp.
Definition at line 447 of file STAmount.h.
|
nodiscard |
Definition at line 616 of file STAmount.h.
|
nodiscard |
Definition at line 622 of file STAmount.h.
|
nodiscard |
Definition at line 1172 of file STAmount.cpp.
Definition at line 1061 of file STAmount.cpp.
Definition at line 1067 of file STAmount.cpp.
Definition at line 646 of file STAmount.h.
Definition at line 651 of file STAmount.h.
Definition at line 658 of file STAmount.h.
Definition at line 1102 of file STAmount.cpp.
Definition at line 372 of file STAmount.cpp.
Definition at line 397 of file STAmount.cpp.
Definition at line 1227 of file STAmount.cpp.
Definition at line 1272 of file STAmount.cpp.
| STAmount xrpl::mulRound | ( | STAmount const & | v1, |
| STAmount const & | v2, | ||
| Asset const & | asset, | ||
| bool | roundUp ) |
Definition at line 1621 of file STAmount.cpp.
| STAmount xrpl::mulRoundStrict | ( | STAmount const & | v1, |
| STAmount const & | v2, | ||
| Asset const & | asset, | ||
| bool | roundUp ) |
Definition at line 1627 of file STAmount.cpp.
| STAmount xrpl::divRound | ( | STAmount const & | v1, |
| STAmount const & | v2, | ||
| Asset const & | asset, | ||
| bool | roundUp ) |
Definition at line 1726 of file STAmount.cpp.
| STAmount xrpl::divRoundStrict | ( | STAmount const & | v1, |
| STAmount const & | v2, | ||
| Asset const & | asset, | ||
| bool | roundUp ) |
Definition at line 1732 of file STAmount.cpp.
| std::uint64_t xrpl::getRate | ( | STAmount const & | offerOut, |
| STAmount const & | offerIn ) |
Definition at line 422 of file STAmount.cpp.
|
nodiscard |
Round an arbitrary precision Amount to the precision of an STAmount that has a given exponent.
This is used to ensure that calculations involving IOU amounts do not collect dust beyond the precision of the reference value.
| value | The value to be rounded |
| scale | An exponent value to establish the precision limit of value. Should be larger than value.exponent(). |
| rounding | Optional Number rounding mode |
Definition at line 1405 of file STAmount.cpp.
| void xrpl::roundToAsset | ( | A const & | asset, |
| Number & | value ) |
Round an arbitrary precision Number IN PLACE to the precision of a given Asset.
This is used to ensure that calculations do not collect dust for IOUs, or fractional amounts for the integral types XRP and MPT.
| asset | The relevant asset |
| value | The lvalue to be rounded |
Definition at line 735 of file STAmount.h.
|
nodiscard |
Round an arbitrary precision Number to the precision of a given Asset.
This is used to ensure that calculations do not collect dust beyond specified scale for IOUs, or fractional amounts for the integral types XRP and MPT.
| asset | The relevant asset |
| value | The value to be rounded |
| scale | Only relevant to IOU assets. An exponent value to establish the precision limit of value. Should be larger than value.exponent(). |
| rounding | Optional Number rounding mode |
Definition at line 754 of file STAmount.h.
| bool xrpl::isXRP | ( | STAmount const & | amount | ) |
Definition at line 772 of file STAmount.h.
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:
Definition at line 464 of file STAmount.cpp.
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.
| a | The minuend (amount to subtract from). |
| b | The subtrahend (amount to subtract). |
Definition at line 541 of file STAmount.cpp.
Get the scale of a Number for a given asset.
"scale" is similar to "exponent", but from the perspective of STAmount, which has different rules and mantissa ranges for determining the exponent than Number.
| number | The Number to get the scale of. |
| asset | The asset to use for determining the scale. |
Definition at line 794 of file STAmount.h.
| json::Value xrpl::toJson | ( | T const & | t | ) |
| std::ostream & xrpl::operator<< | ( | std::ostream & | out, |
| STBase const & | t ) |
Definition at line 134 of file STBase.cpp.
| STCurrency xrpl::currencyFromJson | ( | SField const & | name, |
| json::Value const & | v ) |
Definition at line 88 of file STCurrency.cpp.
| bool xrpl::operator== | ( | STCurrency const & | lhs, |
| STCurrency const & | rhs ) |
Definition at line 91 of file STCurrency.h.
| bool xrpl::operator< | ( | STCurrency const & | lhs, |
| STCurrency const & | rhs ) |
Definition at line 96 of file STCurrency.h.
| bool xrpl::operator== | ( | STCurrency const & | lhs, |
| Currency const & | rhs ) |
Definition at line 103 of file STCurrency.h.
| bool xrpl::operator< | ( | STCurrency const & | lhs, |
| Currency const & | rhs ) |
Definition at line 108 of file STCurrency.h.
| std::optional< T > xrpl::get | ( | STObject const & | st, |
| TypedField< U > const & | f ) |
Return the value of a field in an STObject as a given type.
Definition at line 101 of file STExchange.h.
| std::optional< typename STExchange< U, typename U::value_type >::value_type > xrpl::get | ( | STObject const & | st, |
| TypedField< U > const & | f ) |
Definition at line 120 of file STExchange.h.
| void xrpl::set | ( | STObject & | st, |
| TypedField< U > const & | f, | ||
| T && | t ) |
Set a field value in an STObject.
Definition at line 131 of file STExchange.h.
| void xrpl::set | ( | STObject & | st, |
| TypedField< STBlob > const & | f, | ||
| std::size_t | size, | ||
| Init && | init ) |
Set a blob field using an init function.
Definition at line 141 of file STExchange.h.
| void xrpl::set | ( | STObject & | st, |
| TypedField< STBlob > const & | f, | ||
| void const * | data, | ||
| std::size_t | size ) |
Set a blob field from data.
Definition at line 151 of file STExchange.h.
| void xrpl::erase | ( | STObject & | st, |
| TypedField< U > const & | f ) |
Remove a field in an STObject.
Definition at line 161 of file STExchange.h.
| STIssue xrpl::issueFromJson | ( | SField const & | name, |
| json::Value const & | v ) |
Definition at line 145 of file STIssue.cpp.
|
constexpr |
|
constexpr |
| std::ostream & xrpl::operator<< | ( | std::ostream & | out, |
| STNumber const & | rhs ) |
Definition at line 152 of file STNumber.cpp.
| NumberParts xrpl::partsFromString | ( | std::string const & | number | ) |
Definition at line 159 of file STNumber.cpp.
| STNumber xrpl::numberFromJson | ( | SField const & | field, |
| json::Value const & | value ) |
Definition at line 219 of file STNumber.cpp.
| void xrpl::throwFieldNotFound | ( | SField const & | field | ) |
Definition at line 43 of file STObject.h.
|
noexcept |
Definition at line 177 of file STPathSet.h.
| void xrpl::associateAsset | ( | STLedgerEntry & | sle, |
| Asset const & | asset ) |
Associate an Asset with all sMD_NeedsAsset fields in a ledger entry.
This function iterates over all fields in the given ledger entry. For each field that is set and has the SField::sMD_NeedsAsset metadata flag, it calls associateAsset on that field with the given Asset. Such field must be derived from STTakesAsset - if it is not, the conversion will throw.
Typically, associateAsset should be called near the end of doApply() of any Transactor classes on the SLEs of any new or modified ledger entries containing STNumber fields, after doing all of the modifications t the SLEs.
| sle | The ledger entry whose fields will be updated. |
| asset | The Asset to associate with the relevant fields. |
| bool xrpl::passesLocalChecks | ( | STTx const & | tx, |
| std::string & | reason ) |
| std::shared_ptr< STTx const > xrpl::sterilize | ( | STTx const & | stx | ) |
| bool xrpl::isPseudoTx | ( | STObject const & | tx | ) |
| bool xrpl::operator== | ( | STXChainBridge const & | lhs, |
| STXChainBridge const & | rhs ) |
Definition at line 125 of file STXChainBridge.h.
| bool xrpl::operator< | ( | STXChainBridge const & | lhs, |
| STXChainBridge const & | rhs ) |
Definition at line 139 of file STXChainBridge.h.
|
static |
Definition at line 18 of file SystemParameters.h.
| bool xrpl::isLegalAmount | ( | XRPAmount const & | amount | ) |
Returns true if the amount does not exceed the initial XRP in existence.
Definition at line 39 of file SystemParameters.h.
| bool xrpl::isLegalAmountSigned | ( | XRPAmount const & | amount | ) |
Returns true if the absolute value of the amount does not exceed the initial XRP in existence.
Definition at line 49 of file SystemParameters.h.
|
static |
Definition at line 56 of file SystemParameters.h.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| std::unordered_map< TERUnderlyingType, std::pair< char const *const, char const *const > > const & xrpl::transResults | ( | ) |
| bool xrpl::transResultInfo | ( | TER | code, |
| std::string & | token, | ||
| std::string & | text ) |
| std::string xrpl::transToken | ( | TER | code | ) |
| std::string xrpl::transHuman | ( | TER | code | ) |
| std::optional< TER > xrpl::transCode | ( | std::string const & | token | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
Encode data in Base58Check format using XRPL alphabet.
For details on the format see https://xrpl.org/base58-encodings.html#base58-encodings
| type | The type of token to encode. |
| token | Pointer to the data to encode. |
| size | The size of the data to encode. |
Definition at line 181 of file tokens.cpp.
|
nodiscard |
Definition at line 191 of file tokens.cpp.
| FlagMapPairList const & xrpl::getAllTxFlags | ( | ) |
| std::map< std::string, FlagValue > const & xrpl::getAsfFlagMap | ( | ) |
| Currency const & xrpl::xrpCurrency | ( | ) |
XRP currency.
Definition at line 99 of file UintTypes.cpp.
| Currency const & xrpl::noCurrency | ( | ) |
A placeholder for empty currencies.
Definition at line 106 of file UintTypes.cpp.
| Currency const & xrpl::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 113 of file UintTypes.cpp.
| bool xrpl::isXRP | ( | Currency const & | c | ) |
Definition at line 81 of file UintTypes.h.
| std::string xrpl::to_string | ( | Currency const & | c | ) |
Returns "", "XRP", or three letter ISO code.
Definition at line 36 of file UintTypes.cpp.
| bool xrpl::toCurrency | ( | Currency & | currency, |
| std::string const & | code ) |
Tries to convert a string to a Currency, returns true on success.
Definition at line 65 of file UintTypes.cpp.
| Currency xrpl::toCurrency | ( | std::string const & | code | ) |
Tries to convert a string to a Currency, returns noCurrency() on failure.
Definition at line 90 of file UintTypes.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Currency const & | x ) |
Definition at line 113 of file UintTypes.h.
| std::optional< Dest > xrpl::mulDiv | ( | Source1 | value, |
| Dest | mul, | ||
| Source2 | div ) |
| std::optional< Dest > xrpl::mulDiv | ( | Dest | value, |
| Source1 | mul, | ||
| Source2 | div ) |
| std::optional< Dest > xrpl::mulDiv | ( | std::uint64_t | value, |
| Dest | mul, | ||
| std::uint64_t | div ) |
| std::optional< Dest > xrpl::mulDiv | ( | Dest | value, |
| std::uint64_t | mul, | ||
| std::uint64_t | div ) |
| std::optional< std::uint64_t > xrpl::mulDiv | ( | Source1 | value, |
| std::uint64_t | mul, | ||
| Source2 | div ) |
| std::optional< std::uint64_t > xrpl::mulDiv | ( | std::uint64_t | value, |
| Source1 | mul, | ||
| Source2 | div ) |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
nodiscard |
Definition at line 414 of file XChainAttestations.h.
| std::basic_ostream< Char, Traits > & xrpl::operator<< | ( | std::basic_ostream< Char, Traits > & | os, |
| XRPAmount const & | q ) |
Definition at line 257 of file XRPAmount.h.
| std::string xrpl::to_string | ( | XRPAmount const & | amount | ) |
Definition at line 271 of file XRPAmount.h.
| XRPAmount xrpl::mulRatio | ( | XRPAmount const & | amt, |
| std::uint32_t | num, | ||
| std::uint32_t | den, | ||
| bool | roundUp ) |
Definition at line 277 of file XRPAmount.h.
| std::shared_ptr< Checkpointer > xrpl::checkpointerFromId | ( | std::uintptr_t | id | ) |
Definition at line 64 of file DatabaseCon.cpp.
|
nodiscard |
|
nodiscard |
|
nodiscard |
| T xrpl::rangeCheckedCast | ( | C | c | ) |
Definition at line 496 of file RelationalDatabase.h.
| void xrpl::open | ( | soci::session & | s, |
| BasicConfig const & | config, | ||
| std::string const & | dbName ) |
Open a soci session.
| s | Session to open. |
| config | Parameters to pick the soci backend and how to connect to that backend. |
| dbName | Name 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 90 of file SociDB.cpp.
| void xrpl::open | ( | soci::session & | s, |
| std::string const & | beName, | ||
| std::string const & | connectionString ) |
Open a soci session.
| s | Session to open. |
| beName | Backend name. |
| connectionString | Connection string to forward to soci::open. see the soci::open documentation for how to use this. |
Definition at line 96 of file SociDB.cpp.
| std::uint32_t xrpl::getKBUsedAll | ( | soci::session & | s | ) |
Definition at line 123 of file SociDB.cpp.
| std::uint32_t xrpl::getKBUsedDB | ( | soci::session & | s | ) |
Definition at line 131 of file SociDB.cpp.
| void xrpl::convert | ( | soci::blob & | from, |
| std::vector< std::uint8_t > & | to ) |
Definition at line 145 of file SociDB.cpp.
| void xrpl::convert | ( | soci::blob & | from, |
| std::string & | to ) |
Definition at line 154 of file SociDB.cpp.
| void xrpl::convert | ( | std::vector< std::uint8_t > const & | from, |
| soci::blob & | to ) |
Definition at line 162 of file SociDB.cpp.
| void xrpl::convert | ( | std::string const & | from, |
| soci::blob & | to ) |
Definition at line 175 of file SociDB.cpp.
| std::shared_ptr< Checkpointer > xrpl::makeCheckpointer | ( | std::uintptr_t | id, |
| std::weak_ptr< soci::session > | session, | ||
| JobQueue & | queue, | ||
| ServiceRegistry & | registry ) |
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 332 of file SociDB.cpp.
| void xrpl::httpReply | ( | int | nStatus, |
| std::string const & | strMsg, | ||
| json::Output const & | output, | ||
| beast::Journal | j ) |
Definition at line 34 of file JSONRPCUtil.cpp.
|
noexcept |
Definition at line 9 of file LowestLayer.h.
|
nodiscardconstexpr |
Whether adding additional subscriptions to a connection already holding current would exceed the cap.
Pure arithmetic split out so it can be unit-tested without a live connection. The first term avoids underflow in the subtraction.
| current | Subscriptions already tracked on the connection. |
| additional | Subscriptions a request would add. |
| cap | The effective per-connection cap. Defaults to the built-in limit; callers may pass a configured override. |
| XRPAmount xrpl::scaleFeeLoad | ( | XRPAmount | fee, |
| LoadFeeTrack const & | feeTrack, | ||
| Fees const & | fees, | ||
| bool | bUnlimited ) |
Definition at line 64 of file LoadFeeTrack.cpp.
| std::string xrpl::to_string | ( | Manifest const & | m | ) |
Format the specified manifest to a string for debugging purposes.
Definition at line 43 of file libxrpl/server/Manifest.cpp.
|
constexpr |
Number of untrusted manifests to store in cache and allowed in one Manifest message.
Returns the operator's override when one is configured, otherwise kMaxUntrustedCount. Config stores an override rather than the default itself because the core module cannot depend on this module.
| configured | The value from [overlay] max_untrusted_count, or std::nullopt when the operator did not set it. |
Definition at line 246 of file Manifest.h.
|
constexpr |
Number of trusted manifests allowed in a Manifest message.
Not a cap on how many are sent or processed; see kMaxTrustedCount. but used to calculate the higher limit on received message size.
| configured | The value from [overlay] max_trusted_count, or std::nullopt when the operator did not set it. |
Definition at line 261 of file Manifest.h.
| std::optional< Manifest > xrpl::deserializeManifest | ( | Slice | s, |
| beast::Journal | journal ) |
Constructs Manifest from serialized string.
| s | Serialized manifest string |
Definition at line 58 of file libxrpl/server/Manifest.cpp.
| std::optional< Manifest > xrpl::deserializeManifest | ( | std::string const & | s, |
| beast::Journal | journal = beast::Journal(beast::Journal::getNullSink()) ) |
Definition at line 281 of file Manifest.h.
| std::optional< Manifest > xrpl::deserializeManifest | ( | std::vector< T > const & | v, |
| beast::Journal | journal = beast::Journal(beast::Journal::getNullSink()) ) |
Definition at line 290 of file Manifest.h.
Definition at line 300 of file Manifest.h.
| std::optional< ValidatorToken > xrpl::loadValidatorToken | ( | std::vector< std::string > const & | blob, |
| beast::Journal | journal = beast::Journal(beast::Journal::getNullSink()) ) |
Definition at line 264 of file libxrpl/server/Manifest.cpp.
| std::string xrpl::to_string | ( | ManifestDisposition | m | ) |
Definition at line 335 of file Manifest.h.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Port const & | p ) |
| void xrpl::parsePort | ( | ParsedPort & | port, |
| Section const & | section, | ||
| std::ostream & | log ) |
| std::unique_ptr< Server > xrpl::makeServer | ( | Handler & | handler, |
| boost::asio::io_context & | ioContext, | ||
| beast::Journal | journal ) |
| void xrpl::initStateDB | ( | soci::session & | session, |
| BasicConfig const & | config, | ||
| std::string const & | dbName ) |
| LedgerIndex xrpl::getCanDelete | ( | soci::session & | session | ) |
| LedgerIndex xrpl::setCanDelete | ( | soci::session & | session, |
| LedgerIndex | canDelete ) |
| SavedState xrpl::getSavedState | ( | soci::session & | session | ) |
getSavedState Returns the saved state.
| session | Session with the database. |
| void xrpl::setSavedState | ( | soci::session & | session, |
| SavedState const & | state ) |
setSavedState Saves the given state.
| session | Session with the database. |
| state | The SavedState structure which contains the names of the writable database, the archive database and the last rotated ledger sequence. |
| void xrpl::setLastRotated | ( | soci::session & | session, |
| LedgerIndex | seq ) |
| bool xrpl::doVacuumDB | ( | DatabaseCon::Setup const & | setup, |
| beast::Journal | j ) |
doVacuumDB Creates, initialises, and performs cleanup on a database.
| setup | Path to the database and other opening parameters. |
| j | Journal. |
Definition at line 18 of file Vacuum.cpp.
| std::unique_ptr< DatabaseCon > xrpl::makeWalletDB | ( | DatabaseCon::Setup const & | setup, |
| beast::Journal | j ) |
makeWalletDB Opens the wallet database and returns it.
| setup | Path to the database and other opening parameters. |
| j | Journal. |
Definition at line 42 of file Wallet.cpp.
| std::unique_ptr< DatabaseCon > xrpl::makeTestWalletDB | ( | DatabaseCon::Setup const & | setup, |
| std::string const & | dbname, | ||
| beast::Journal | j ) |
makeTestWalletDB Opens a test wallet database with an arbitrary name.
| setup | Path to the database and other opening parameters. |
| dbname | Name of the database. |
| j | Journal. |
Definition at line 50 of file Wallet.cpp.
| void xrpl::getManifests | ( | soci::session & | session, |
| std::string const & | dbTable, | ||
| ManifestCache & | cache, | ||
| beast::Journal | j ) |
getManifests Loads a manifest from the wallet database and stores it in the cache.
| session | Session with the database. |
| dbTable | Name of the database table from which the manifest will be extracted. |
| cache_ | Cache for storing the manifest. |
| j | Journal. |
Definition at line 58 of file Wallet.cpp.
| void xrpl::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.
| session | Session with the database. |
| dbTable | Name of the database table that will store the manifest. |
| isTrusted | Callback that returns true if the key is trusted. |
| map | Maps public keys to manifests. |
| j | Journal. |
Definition at line 104 of file Wallet.cpp.
| void xrpl::addValidatorManifest | ( | soci::session & | session, |
| std::string const & | serialized ) |
addValidatorManifest Saves the manifest of a validator to the database.
Definition at line 137 of file Wallet.cpp.
| void xrpl::clearNodeIdentity | ( | soci::session & | session | ) |
Delete any saved public/private key associated with this node.
Definition at line 145 of file Wallet.cpp.
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.
| session | Session with the database. |
Definition at line 151 of file Wallet.cpp.
| std::unordered_set< PeerReservation, beast::Uhash<>, KeyEqual > xrpl::getPeerReservationTable | ( | soci::session & | session, |
| beast::Journal | j ) |
getPeerReservationTable Returns the peer reservation table.
| session | Session with the database. |
| j | Journal. |
Definition at line 185 of file Wallet.cpp.
| void xrpl::insertPeerReservation | ( | soci::session & | session, |
| PublicKey const & | nodeId, | ||
| std::string const & | description ) |
insertPeerReservation Adds an entry to the peer reservation table.
| session | Session with the database. |
| nodeId | Public key of the node. |
| description | Description of the node. |
Definition at line 220 of file Wallet.cpp.
| void xrpl::deletePeerReservation | ( | soci::session & | session, |
| PublicKey const & | nodeId ) |
deletePeerReservation Deletes an entry from the peer reservation table.
| session | Session with the database. |
| nodeId | Public key of the node to remove. |
Definition at line 234 of file Wallet.cpp.
| bool xrpl::createFeatureVotes | ( | soci::session & | session | ) |
createFeatureVotes Creates the FeatureVote table if it does not exist.
| session | Session with the wallet database. |
Definition at line 241 of file Wallet.cpp.
| void xrpl::readAmendments | ( | soci::session & | session, |
| std::function< void(boost::optional< std::string > amendmentHash, boost::optional< std::string > amendmentName, boost::optional< AmendmentVote > vote)> const & | callback ) |
readAmendments Reads all amendments from the FeatureVotes table.
| session | Session with the wallet database. |
| callback | Callback called for each amendment with its hash, name and optionally a flag denoting whether the amendment should be vetoed. |
Definition at line 265 of file Wallet.cpp.
| void xrpl::voteAmendment | ( | soci::session & | session, |
| uint256 const & | amendment, | ||
| std::string const & | name, | ||
| AmendmentVote | vote ) |
voteAmendment Set the veto value for a particular amendment.
| session | Session with the wallet database. |
| amendment | Hash of the amendment. |
| name | Name of the amendment. |
| vote | Whether to vote in favor of this amendment. |
Definition at line 300 of file Wallet.cpp.
|
nodiscard |
Definition at line 227 of file TaggedPointer.h.
| bool xrpl::operator== | ( | SHAMap::ConstIterator const & | x, |
| SHAMap::ConstIterator const & | y ) |
| void xrpl::intrusive_ptr_add_ref | ( | SHAMapItem const * | x | ) |
Definition at line 118 of file SHAMapItem.h.
| void xrpl::intrusive_ptr_release | ( | SHAMapItem const * | x | ) |
Definition at line 127 of file SHAMapItem.h.
| boost::intrusive_ptr< SHAMapItem > xrpl::makeShamapitem | ( | uint256 const & | tag, |
| Slice | data ) |
Definition at line 148 of file SHAMapItem.h.
| boost::intrusive_ptr< SHAMapItem > xrpl::makeShamapitem | ( | SHAMapItem const & | other | ) |
Definition at line 172 of file SHAMapItem.h.
| uint256 const & xrpl::leafKey | ( | SHAMapTreeNode const & | node | ) |
Return the key of the item held by a SHAMap leaf node.
| node | a node known to be a leaf (see SHAMapTreeNode::isLeaf). |
Definition at line 72 of file SHAMapLeafNode.h.
| std::string xrpl::to_string | ( | SHAMapType | t | ) |
Definition at line 20 of file SHAMapMissingNode.h.
| std::string xrpl::to_string | ( | SHAMapNodeID const & | node | ) |
Definition at line 98 of file SHAMapNodeID.h.
| std::ostream & xrpl::operator<< | ( | std::ostream & | out, |
| SHAMapNodeID const & | node ) |
Definition at line 106 of file SHAMapNodeID.h.
|
nodiscard |
Return an object representing a serialized SHAMap Node ID.
| s | A string of bytes |
| data | a non-null pointer to a buffer of |
| size | bytes. |
| size | the size, in bytes, of the buffer pointed to by |
| data. |
Definition at line 91 of file SHAMapNodeID.cpp.
|
nodiscard |
Definition at line 126 of file SHAMapNodeID.h.
|
nodiscard |
Returns the branch that would contain the given hash.
Definition at line 111 of file SHAMapNodeID.cpp.
| std::pair< Validity, std::string > xrpl::checkValidity | ( | HashRouter & | router, |
| STTx const & | tx, | ||
| Rules const & | rules ) |
| void xrpl::forceValidity | ( | HashRouter & | router, |
| uint256 const & | txid, | ||
| Validity | validity ) |
Sets the validity of a given transaction in the cache.
| ApplyResult xrpl::apply | ( | ServiceRegistry & | registry, |
| 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:
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.
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.
| app | The current running Application. |
| view | The open ledger that the transaction will attempt to be applied to. |
| tx | The transaction to be checked. |
| flags | ApplyFlags describing processing options. |
| journal | A journal. |
| ApplyTransactionResult xrpl::applyTransaction | ( | ServiceRegistry & | registry, |
| 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
| bool xrpl::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 41 of file applySteps.h.
| PreflightResult xrpl::preflight | ( | ServiceRegistry & | registry, |
| 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.
| app | The current running Application. |
| rules | The Rules in effect at the time of the check. |
| tx | The transaction to be checked. |
| flags | ApplyFlags describing processing options. |
| j | A journal. |
Definition at line 319 of file applySteps.cpp.
| PreflightResult xrpl::preflight | ( | ServiceRegistry & | registry, |
| Rules const & | rules, | ||
| uint256 const & | parentBatchId, | ||
| STTx const & | tx, | ||
| ApplyFlags | flags, | ||
| beast::Journal | j ) |
Definition at line 339 of file applySteps.cpp.
| PreclaimResult xrpl::preclaim | ( | PreflightResult const & | preflightResult, |
| ServiceRegistry & | registry, | ||
| 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.
| preflightResult | The result of a previous call to preflight for the transaction. |
| app | The current running Application. |
| view | The open ledger that the transaction will attempt to be applied to. |
Definition at line 360 of file applySteps.cpp.
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.
| view | The current open ledger. |
| tx | The transaction to be checked. |
Definition at line 420 of file applySteps.cpp.
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.
| view | The current open ledger. |
| tx | The transaction so the correct multisigner count is used. |
Definition at line 426 of file applySteps.cpp.
| ApplyResult xrpl::doApply | ( | PreclaimResult const & | preclaimResult, |
| ServiceRegistry & | registry, | ||
| OpenView & | view ) |
Apply a prechecked transaction to an OpenView.
| preclaimResult | The result of a previous call to preclaim for the transaction. |
| registry | The service registry. |
| view | The open ledger that the transaction will attempt to be applied to. |
Definition at line 432 of file applySteps.cpp.
| InvariantChecks xrpl::getInvariantChecks | ( | ) |
get a tuple of all invariant checks
Definition at line 477 of file InvariantCheck.h.
Definition at line 54 of file InvariantCheckPrivilege.h.
Definition at line 52 of file InvariantCheck.cpp.
| T const & xrpl::get | ( | EitherAmount const & | amt | ) |
Definition at line 54 of file EitherAmount.h.
| void xrpl::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.
| dst | set to store the resulting union, and also a source of elements for the union |
| src | second source of elements for the union |
Definition at line 16 of file FlatSets.h.
| TER xrpl::checkFreeze | ( | ReadView const & | view, |
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| Currency const & | currency ) |
Definition at line 19 of file StepChecks.h.
| TER xrpl::checkNoRipple | ( | ReadView const & | view, |
| AccountID const & | prev, | ||
| AccountID const & | cur, | ||
| AccountID const & | next, | ||
| Currency const & | currency, | ||
| beast::Journal | j ) |
Definition at line 70 of file StepChecks.h.
| bool xrpl::redeems | ( | DebtDirection | dir | ) |
| bool xrpl::issues | ( | DebtDirection | dir | ) |
| std::pair< TER, STPath > xrpl::normalizePath | ( | AccountID const & | src, |
| AccountID const & | dst, | ||
| Asset const & | deliver, | ||
| std::optional< Asset > const & | sendMaxAsset, | ||
| STPath const & | path ) |
Normalize a path by inserting implied accounts and offers.
| src | Account that is sending assets |
| dst | Account that is receiving assets |
| deliver | Asset the dst account will receive (if issuer of deliver == dst, then accept any issuer) |
| sendMax | Optional asset to send. |
| path | Liquidity 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. |
| std::pair< TER, Strand > xrpl::toStrand | ( | ReadView const & | sb, |
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| Asset const & | deliver, | ||
| std::optional< Quality > const & | limitQuality, | ||
| std::optional< Asset > const & | sendMaxAsset, | ||
| STPath const & | path, | ||
| bool | ownerPaysTransferFee, | ||
| OfferCrossing | offerCrossing, | ||
| AMMContext & | ammContext, | ||
| std::optional< uint256 > const & | domainID, | ||
| beast::Journal | j ) |
Create a Strand for the specified path.
| sb | view for trust lines, balances, and attributes like auth and freeze |
| src | Account that is sending assets |
| dst | Account that is receiving assets |
| deliver | Asset the dst account will receive (if issuer of deliver == dst, then accept any issuer) |
| limitQuality | Offer 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. |
| sendMaxAsset | Optional asset to send. |
| path | Liquidity 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. |
| ownerPaysTransferFee | false -> charge sender; true -> charge offer owner |
| offerCrossing | false -> payment; true -> offer crossing |
| ammContext | counts iterations with AMM offers |
| domainID | the domain that order books will use |
| j | Journal for logging messages |
Definition at line 170 of file PaySteps.cpp.
| std::pair< TER, std::vector< Strand > > xrpl::toStrands | ( | ReadView const & | sb, |
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| Asset const & | deliver, | ||
| std::optional< Quality > const & | limitQuality, | ||
| std::optional< Asset > 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).
| sb | View for trust lines, balances, and attributes like auth and freeze |
| src | Account that is sending assets |
| dst | Account that is receiving assets |
| deliver | Asset the dst account will receive (if issuer of deliver == dst, then accept any issuer) |
| limitQuality | Offer 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. |
| sendMax | Optional asset to send. |
| paths | Paths 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. |
| addDefaultPath | Determines if the default path should be included |
| ownerPaysTransferFee | false -> charge sender; true -> charge offer owner |
| offerCrossing | false -> payment; true -> offer crossing |
| ammContext | counts iterations with AMM offers |
| domainID | the domain that order books will use |
| j | Journal for logging messages |
Definition at line 574 of file PaySteps.cpp.
| StrandResult< TInAmt, TOutAmt > xrpl::flow | ( | PaymentSandbox const & | baseView, |
| Strand const & | strand, | ||
| std::optional< TInAmt > const & | maxIn, | ||
| TOutAmt const & | out, | ||
| beast::Journal | j ) |
Request out amount from a strand.
| baseView | Trust lines and balances |
| strand | Steps of Accounts to ripple through and offer books to use |
| maxIn | Max amount of input allowed |
| out | Amount of output requested from the strand |
| j | Journal to write log messages to |
Definition at line 103 of file StrandFlow.h.
| FlowResult< TInAmt, TOutAmt > xrpl::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
| baseView | Trust lines and balances |
| strands | Each strand contains the steps of accounts to ripple through and offer books to use |
| outReq | Amount of output requested from the strand |
| partialPayment | If true allow less than the full payment |
| offerCrossing | If true offer crossing, not handling a standard payment |
| limitQuality | If present, the minimum quality for any strand taken |
| sendMaxST | If present, the maximum STAmount to send |
| j | Journal to write journal messages to |
| ammContext | counts iterations with AMM offers |
| flowDebugInfo | If pointer is non-null, write flow debug info here |
Definition at line 586 of file StrandFlow.h.
| path::RippleCalc::Output xrpl::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.
| view | Trust lines and balances |
| deliver | Amount to deliver to the dst account |
| src | Account providing input funds for the payment |
| dst | Account receiving the payment |
| paths | Set of paths to explore for liquidity |
| defaultPaths | Include defaultPaths in the path set |
| partialPayment | If the payment cannot deliver the entire requested amount, deliver as much as possible, given the constraints |
| ownerPaysTransferFee | If true then owner, not sender, pays fee |
| offerCrossing | If Yes or Sell then flow is executing offer crossing, not payments |
| limitQuality | Do not use liquidity below this quality threshold |
| sendMax | Do not spend more than this amount |
| j | Journal to write journal messages to |
| flowDebugInfo | If non-null a pointer to FlowDebugInfo for debugging |
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| TOffer< TIn, TOut > const & | offer ) |
Definition at line 265 of file tx/paths/Offer.h.
| NotTEC xrpl::preflight0 | ( | PreflightContext const & | ctx, |
| std::uint32_t | flagMask ) |
Performs early sanity checks on the txid and flags.
Performs early sanity checks on the txid.
Definition at line 63 of file Transactor.cpp.
|
static |
Definition at line 165 of file libxrpl/basics/Number.cpp.
| void xrpl::doNormalize | ( | bool & | negative, |
| T & | mantissa, | ||
| int & | exponent, | ||
| MantissaRange::rep const & | minMantissa, | ||
| MantissaRange::rep const & | maxMantissa, | ||
| MantissaRange::CuspRoundingFix | cuspRoundingFix, | ||
| bool | dropped ) |
Definition at line 711 of file libxrpl/basics/Number.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | os, |
| Section const & | section ) |
Definition at line 104 of file BasicConfig.cpp.
| std::ostream & xrpl::operator<< | ( | std::ostream & | ss, |
| BasicConfig const & | c ) |
Definition at line 175 of file BasicConfig.cpp.
| bool xrpl::checkConsensusReached | ( | std::size_t | agreeing, |
| std::size_t | total, | ||
| bool | countSelf, | ||
| std::size_t | minConsensusPct, | ||
| bool | reachedMax, | ||
| bool | stalled, | ||
| std::unique_ptr< std::stringstream > const & | clog ) |
Definition at line 92 of file libxrpl/consensus/Consensus.cpp.
| bool xrpl::operator< | ( | CanonicalTXSet::Key const & | lhs, |
| CanonicalTXSet::Key const & | rhs ) |
Definition at line 15 of file CanonicalTXSet.cpp.
|
static |
Definition at line 662 of file AMMHelpers.cpp.
|
static |
Definition at line 702 of file AMMHelpers.cpp.
| TER xrpl::checkDepositPreauth | ( | STTx const & | tx, |
| ReadView const & | view, | ||
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| SLE::const_ref | sleDst, | ||
| beast::Journal | j ) |
Definition at line 371 of file CredentialHelpers.cpp.
| bool xrpl::isChannelExpired | ( | ApplyView const & | view, |
| std::optional< uint32_t > | timeField ) |
Definition at line 84 of file PaymentChannelHelpers.cpp.
|
static |
Definition at line 340 of file RippleStateHelpers.cpp.
|
static |
Definition at line 269 of file TokenHelpers.cpp.
|
static |
Definition at line 318 of file TokenHelpers.cpp.
Definition at line 543 of file TokenHelpers.cpp.
|
static |
Definition at line 643 of file TokenHelpers.cpp.
|
static |
Definition at line 796 of file TokenHelpers.cpp.
|
static |
Definition at line 849 of file TokenHelpers.cpp.
|
static |
Definition at line 923 of file TokenHelpers.cpp.
|
static |
Definition at line 1042 of file TokenHelpers.cpp.
|
static |
Definition at line 1169 of file TokenHelpers.cpp.
|
static |
Definition at line 1254 of file TokenHelpers.cpp.
|
static |
Definition at line 1315 of file TokenHelpers.cpp.
|
static |
Definition at line 1435 of file TokenHelpers.cpp.
|
static |
Definition at line 1461 of file TokenHelpers.cpp.
| TER xrpl::cleanupOnAccountDelete | ( | ApplyView & | view, |
| Keylet const & | ownerDirKeylet, | ||
| EntryDeleter const & | deleter, | ||
| beast::Journal | j, | ||
| std::optional< uint16_t > | maxNodesToDelete ) |
| std::optional< AccountID > xrpl::parseBase58 | ( | std::string const & | s | ) |
Parse AccountID from checked, base58 string.
Parse a Base58 encoded string into a seed.
Definition at line 105 of file AccountID.cpp.
| std::size_t xrpl::hash_value | ( | xrpl::uint256 const & | feature | ) |
Definition at line 27 of file libxrpl/protocol/Feature.cpp.
| uint256 xrpl::registerFeature | ( | std::string const & | name, |
| Supported | support, | ||
| VoteBehavior | vote ) |
Definition at line 375 of file libxrpl/protocol/Feature.cpp.
| uint256 xrpl::retireFeature | ( | std::string const & | name | ) |
Definition at line 383 of file libxrpl/protocol/Feature.cpp.
| bool xrpl::registrationIsDone | ( | ) |
Tell FeatureCollections when registration is complete.
Definition at line 392 of file libxrpl/protocol/Feature.cpp.
|
consteval |
Definition at line 428 of file libxrpl/protocol/Feature.cpp.
|
static |
Definition at line 116 of file Indexes.cpp.
| std::optional< PublicKey > xrpl::parseBase58 | ( | TokenType | type, |
| std::string const & | s ) |
Parse a secret key.
Definition at line 37 of file PublicKey.cpp.
|
static |
Definition at line 51 of file PublicKey.cpp.
|
static |
Definition at line 77 of file PublicKey.cpp.
|
static |
Definition at line 154 of file PublicKey.cpp.
|
static |
Definition at line 57 of file Quality.cpp.
|
static |
Definition at line 86 of file Quality.cpp.
| Rate const xrpl::kParityRate | ( | QUALITY_ONE | ) |
| std::optional< SecretKey > xrpl::parseBase58 | ( | TokenType | type, |
| std::string const & | s ) |
Parse a secret key.
Definition at line 363 of file SecretKey.cpp.
| std::optional< Seed > xrpl::parseBase58 | ( | std::string const & | s | ) |
|
static |
Definition at line 58 of file STAmount.cpp.
|
static |
Definition at line 77 of file STAmount.cpp.
|
static |
Definition at line 83 of file STAmount.cpp.
Definition at line 89 of file STAmount.cpp.
|
static |
Definition at line 1133 of file STAmount.cpp.
|
static |
Definition at line 1119 of file STAmount.cpp.
|
static |
Definition at line 1126 of file STAmount.cpp.
|
static |
Definition at line 1186 of file STAmount.cpp.
|
static |
Definition at line 1204 of file STAmount.cpp.
|
static |
Definition at line 1329 of file STAmount.cpp.
|
static |
Definition at line 1368 of file STAmount.cpp.
|
static |
Definition at line 1509 of file STAmount.cpp.
|
static |
Definition at line 1636 of file STAmount.cpp.
Definition at line 13 of file STTakesAsset.cpp.
|
static |
| std::expected< void, std::string > xrpl::multiSignHelper | ( | STObject const & | sigObject, |
| std::optional< AccountID > | txnAccountID, | ||
| std::function< Serializer(AccountID const &)> | makeMsg, | ||
| Rules const & | rules ) |
|
static |
|
static |
|
static |
|
static |
|
staticnoexcept |
Definition at line 140 of file tokens.cpp.
|
static |
Definition at line 149 of file tokens.cpp.
|
static |
Definition at line 158 of file tokens.cpp.
|
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.
Definition at line 174 of file tokens.cpp.
| bool xrpl::operator== | ( | XChainClaimAttestation const & | lhs, |
| XChainClaimAttestation const & | rhs ) |
Definition at line 475 of file XChainAttestations.cpp.
| bool xrpl::operator== | ( | XChainCreateAccountAttestation const & | lhs, |
| XChainCreateAccountAttestation const & | rhs ) |
Definition at line 601 of file XChainAttestations.cpp.
|
static |
Definition at line 109 of file SociDB.cpp.
| std::string xrpl::getHTTPHeaderTimestamp | ( | ) |
Definition at line 15 of file JSONRPCUtil.cpp.
| Stream & xrpl::logMftAct | ( | Stream & | s, |
| std::string const & | action, | ||
| PublicKey const & | pk, | ||
| std::uint32_t | seq ) |
Definition at line 175 of file libxrpl/server/Manifest.cpp.
| Stream & xrpl::logMftAct | ( | Stream & | s, |
| std::string const & | action, | ||
| PublicKey const & | pk, | ||
| std::uint32_t | seq, | ||
| std::uint32_t | oldSeq ) |
Definition at line 184 of file libxrpl/server/Manifest.cpp.
|
static |
|
static |
Definition at line 93 of file Wallet.cpp.
|
nodiscard |
Definition at line 44 of file libxrpl/shamap/SHAMap.cpp.
|
static |
Definition at line 17 of file SHAMapNodeID.cpp.
| ApplyResult xrpl::apply | ( | ServiceRegistry & | registry, |
| OpenView & | view, | ||
| PreflightChecks && | preflightChecks ) |
| ApplyResult xrpl::apply | ( | ServiceRegistry & | registry, |
| OpenView & | view, | ||
| uint256 const & | parentBatchId, | ||
| STTx const & | tx, | ||
| ApplyFlags | flags, | ||
| beast::Journal | j ) |
|
static |
| TxConsequences xrpl::consequencesHelper | ( | PreflightContext const & | ctx | ) |
Definition at line 108 of file applySteps.cpp.
|
static |
Definition at line 132 of file applySteps.cpp.
|
static |
Definition at line 154 of file applySteps.cpp.
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.
| view | The ledger view to use for fee calculation. |
| tx | The transaction for which the base fee is to be calculated. |
| std::exception | If 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 233 of file applySteps.cpp.
|
static |
Definition at line 286 of file applySteps.cpp.
| std::unique_ptr< Transactor > xrpl::makeTransactor | ( | ApplyContext & | ctx | ) |
Definition at line 310 of file applySteps.cpp.
|
static |
Definition at line 69 of file AMMInvariant.cpp.
|
static |
Definition at line 70 of file InvariantCheck.cpp.
|
static |
Definition at line 807 of file InvariantCheck.cpp.
|
static |
Definition at line 636 of file BookStep.cpp.
|
static |
Definition at line 673 of file BookStep.cpp.
|
static |
Definition at line 1058 of file BookStep.cpp.
|
static |
Definition at line 1594 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepIi | ( | StrandContext const & | ctx, |
| Issue const & | in, | ||
| Issue const & | out ) |
Definition at line 1617 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepIx | ( | StrandContext const & | ctx, |
| Issue const & | in ) |
Definition at line 1623 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepXi | ( | StrandContext const & | ctx, |
| Issue const & | out ) |
Definition at line 1629 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepMm | ( | StrandContext const & | ctx, |
| MPTIssue const & | in, | ||
| MPTIssue const & | out ) |
Definition at line 1636 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepMi | ( | StrandContext const & | ctx, |
| MPTIssue const & | in, | ||
| Issue const & | out ) |
Definition at line 1642 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepIm | ( | StrandContext const & | ctx, |
| Issue const & | in, | ||
| MPTIssue const & | out ) |
Definition at line 1648 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepMx | ( | StrandContext const & | ctx, |
| MPTIssue const & | in ) |
Definition at line 1654 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeBookStepXm | ( | StrandContext const & | ctx, |
| MPTIssue const & | out ) |
Definition at line 1660 of file BookStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeDirectStepI | ( | StrandContext const & | ctx, |
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| Currency const & | c ) |
Definition at line 923 of file DirectStep.cpp.
|
static |
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeMptEndpointStep | ( | StrandContext const & | ctx, |
| AccountID const & | src, | ||
| AccountID const & | dst, | ||
| MPTID const & | mpt ) |
Definition at line 911 of file MPTEndpointStep.cpp.
|
static |
Definition at line 106 of file OfferStream.cpp.
Definition at line 36 of file PaySteps.cpp.
|
static |
Definition at line 58 of file PaySteps.cpp.
|
static |
Definition at line 66 of file PaySteps.cpp.
| bool xrpl::operator== | ( | XRPEndpointStep< TDerived > const & | lhs, |
| XRPEndpointStep< TDerived > const & | rhs ) |
Definition at line 246 of file XRPEndpointStep.cpp.
| std::pair< TER, std::unique_ptr< Step > > xrpl::makeXrpEndpointStep | ( | StrandContext const & | ctx, |
| AccountID const & | acc ) |
Definition at line 394 of file XRPEndpointStep.cpp.
|
static |
Definition at line 176 of file Transactor.cpp.
|
static |
Definition at line 1212 of file Transactor.cpp.
|
static |
Definition at line 1229 of file Transactor.cpp.
|
static |
Definition at line 1248 of file Transactor.cpp.
|
static |
Definition at line 1265 of file Transactor.cpp.
|
static |
Definition at line 152 of file SignerListSet.cpp.
|
static |
Definition at line 179 of file SignerListSet.cpp.
|
static |
Definition at line 179 of file AMMBid.cpp.
|
static |
Definition at line 260 of file AMMCreate.cpp.
|
static |
Definition at line 695 of file AMMDeposit.cpp.
|
static |
Definition at line 82 of file AMMVote.cpp.
|
static |
Definition at line 173 of file AMMWithdraw.cpp.
|
static |
Definition at line 812 of file AMMWithdraw.cpp.
|
static |
Definition at line 66 of file DIDSet.cpp.
|
static |
| TER xrpl::escrowCancelPreclaimHelper< Issue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | account, | ||
| STAmount const & | amount ) |
Definition at line 45 of file EscrowCancel.cpp.
| TER xrpl::escrowCancelPreclaimHelper< MPTIssue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | account, | ||
| STAmount const & | amount ) |
Definition at line 64 of file EscrowCancel.cpp.
|
static |
| NotTEC xrpl::escrowCreatePreflightHelper< Issue > | ( | PreflightContext const & | ctx | ) |
Definition at line 100 of file EscrowCreate.cpp.
| NotTEC xrpl::escrowCreatePreflightHelper< MPTIssue > | ( | PreflightContext const & | ctx | ) |
Definition at line 114 of file EscrowCreate.cpp.
|
static |
| TER xrpl::escrowCreatePreclaimHelper< Issue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | account, | ||
| AccountID const & | dest, | ||
| STAmount const & | amount ) |
Definition at line 191 of file EscrowCreate.cpp.
| TER xrpl::escrowCreatePreclaimHelper< MPTIssue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | account, | ||
| AccountID const & | dest, | ||
| STAmount const & | amount ) |
Definition at line 262 of file EscrowCreate.cpp.
|
static |
| TER xrpl::escrowLockApplyHelper< Issue > | ( | ApplyView & | view, |
| AccountID const & | issuer, | ||
| AccountID const & | sender, | ||
| STAmount const & | amount, | ||
| beast::Journal | journal ) |
Definition at line 382 of file EscrowCreate.cpp.
| TER xrpl::escrowLockApplyHelper< MPTIssue > | ( | ApplyView & | view, |
| AccountID const & | issuer, | ||
| AccountID const & | sender, | ||
| STAmount const & | amount, | ||
| beast::Journal | journal ) |
Definition at line 402 of file EscrowCreate.cpp.
Definition at line 48 of file EscrowFinish.cpp.
|
static |
| TER xrpl::escrowFinishPreclaimHelper< Issue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | dest, | ||
| STAmount const & | amount ) |
Definition at line 141 of file EscrowFinish.cpp.
| TER xrpl::escrowFinishPreclaimHelper< MPTIssue > | ( | PreclaimContext const & | ctx, |
| AccountID const & | dest, | ||
| STAmount const & | amount ) |
Definition at line 164 of file EscrowFinish.cpp.
Definition at line 87 of file LoanBrokerCoverClawback.cpp.
| std::expected< Asset, TER > xrpl::determineAsset | ( | ReadView const & | view, |
| AccountID const & | account, | ||
| AccountID const & | brokerPseudoAccountID, | ||
| STAmount const & | amount ) |
Definition at line 130 of file LoanBrokerCoverClawback.cpp.
| std::expected< STAmount, TER > xrpl::determineClawAmount | ( | SLE const & | sleBroker, |
| Asset const & | vaultAsset, | ||
| std::optional< STAmount > const & | amount, | ||
| SLE::const_ref | vaultSle, | ||
| Rules const & | rules ) |
Definition at line 160 of file LoanBrokerCoverClawback.cpp.
|
static |
| TER xrpl::preclaimHelper< Issue > | ( | PreclaimContext const & | ctx, |
| SLE const & | sleIssuer, | ||
| STAmount const & | clawAmount ) |
Definition at line 203 of file LoanBrokerCoverClawback.cpp.
| TER xrpl::preclaimHelper< MPTIssue > | ( | PreclaimContext const & | ctx, |
| SLE const & | sleIssuer, | ||
| STAmount const & | clawAmount ) |
Definition at line 215 of file LoanBrokerCoverClawback.cpp.
|
static |
Definition at line 220 of file LoanSet.cpp.
|
static |
Definition at line 36 of file NFTokenMint.cpp.
|
static |
Definition at line 42 of file NFTokenMint.cpp.
Definition at line 36 of file OracleSet.cpp.
|
static |
Definition at line 186 of file OracleSet.cpp.
|
static |
Definition at line 209 of file OracleSet.cpp.
| STAmount xrpl::getMaxSourceAmount | ( | AccountID const & | account, |
| STAmount const & | dstAmount, | ||
| std::optional< STAmount > const & | sendMax ) |
Definition at line 63 of file Payment.cpp.
|
static |
Definition at line 36 of file SponsorshipSet.cpp.
|
static |
Definition at line 46 of file SponsorshipSet.cpp.
|
static |
Definition at line 205 of file SponsorshipSet.cpp.
|
static |
Definition at line 27 of file SponsorshipTransfer.cpp.
|
static |
Definition at line 49 of file SponsorshipTransfer.cpp.
|
static |
Definition at line 72 of file SponsorshipTransfer.cpp.
|
static |
| NotTEC xrpl::preflightHelper< Issue > | ( | PreflightContext const & | ctx | ) |
Definition at line 35 of file Clawback.cpp.
| NotTEC xrpl::preflightHelper< MPTIssue > | ( | PreflightContext const & | ctx | ) |
Definition at line 54 of file Clawback.cpp.
|
static |
| TER xrpl::preclaimHelper< Issue > | ( | PreclaimContext const & | ctx, |
| SLE const & | sleIssuer, | ||
| AccountID const & | issuer, | ||
| AccountID const & | holder, | ||
| STAmount const & | clawAmount ) |
Definition at line 98 of file Clawback.cpp.
| TER xrpl::preclaimHelper< MPTIssue > | ( | PreclaimContext const & | ctx, |
| SLE const & | sleIssuer, | ||
| AccountID const & | issuer, | ||
| AccountID const & | holder, | ||
| STAmount const & | clawAmount ) |
Definition at line 148 of file Clawback.cpp.
|
static |
| TER xrpl::applyHelper< Issue > | ( | ApplyContext & | ctx | ) |
Definition at line 217 of file Clawback.cpp.
| TER xrpl::applyHelper< MPTIssue > | ( | ApplyContext & | ctx | ) |
Definition at line 243 of file Clawback.cpp.
|
static |
Verifies the cryptographic proofs for a ConvertBack transaction.
This function verifies three proofs:
All proofs are verified before returning any error to prevent timing attacks.
Definition at line 70 of file ConfidentialMPTConvertBack.cpp.
|
nodiscard |
Definition at line 62 of file VaultClawback.cpp.
|
staticnodiscard |
Definition at line 34 of file VaultDeposit.cpp.
|
static |
Definition at line 31 of file VaultWithdraw.cpp.
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | AccountSet | , |
| app | , | ||
| xrpl | , | ||
| 1 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | AccountTxPaging | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | AmendmentTable | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Check | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | CheckMPT | , |
| tx | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | ClawbackMPT | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | ConfidentialTransfer | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | ConfidentialTransferExtended | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Discrepancy | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | FixNFTokenPageLinks | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Freeze | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | LedgerLoad | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | LoadFeeTrack | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenBaseUtil | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenDisallowIncoming | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenWOMintOffer | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenWOModify | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenAllFeatures | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenAuth | , |
| app | , | ||
| xrpl | , | ||
| 2 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenBurn | , |
| app | , | ||
| xrpl | , | ||
| 3 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | NFTokenDir | , |
| app | , | ||
| xrpl | , | ||
| 1 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | OfferStream | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | SetRegularKey | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Ticket | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | TrustAndBalance | , |
| app | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Apply | , |
| tx | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE_PRIO | ( | Vault | , |
| app | , | ||
| xrpl | , | ||
| 1 | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | PerfLog | , |
| basics | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | SociDB | , |
| core | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | ProtocolVersion | , |
| overlay | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | short_read | , |
| overlay | , | ||
| xrpl | ) |
| bool xrpl::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 42 of file STTx_test.cpp.
| xrpl::BEAST_DEFINE_TESTSUITE | ( | STValidation | , |
| protocol | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | LedgerHeader | , |
| rpc | , | ||
| xrpl | ) |
| xrpl::BEAST_DEFINE_TESTSUITE | ( | Transaction | , |
| rpc | , | ||
| xrpl | ) |
| xrpl::TEST | ( | FileUtilitiesTest | , |
| get_file_contents | ) |
Definition at line 60 of file tests/libxrpl/basics/FileUtilities.cpp.
| xrpl::TEST_F | ( | HardenedHashTest | , |
| user_types | ) |
Definition at line 213 of file hardened_hash.cpp.
| xrpl::TEST_F | ( | HardenedHashTest | , |
| containers | ) |
Definition at line 219 of file hardened_hash.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| zero | ) |
Definition at line 15 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| sig_num | ) |
Definition at line 38 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| beast_zero | ) |
Definition at line 50 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| comparisons | ) |
Definition at line 81 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| to_string | ) |
Definition at line 136 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST | ( | IOUAmountTest | , |
| mul_ratio | ) |
Definition at line 161 of file tests/libxrpl/basics/IOUAmount.cpp.
| xrpl::TEST_F | ( | KeyCacheTest | , |
| key_cache | ) |
Definition at line 19 of file KeyCache.cpp.
|
static |
Definition at line 36 of file tests/libxrpl/basics/Number.cpp.
Definition at line 52 of file tests/libxrpl/basics/Number.cpp.
|
static |
Definition at line 69 of file tests/libxrpl/basics/Number.cpp.
|
static |
Definition at line 91 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| zero | ) |
Definition at line 98 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| limits | ) |
Definition at line 116 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| add | ) |
Definition at line 217 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| sub | ) |
Definition at line 409 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| mul | ) |
Definition at line 565 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| div | ) |
Definition at line 875 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| root | ) |
Definition at line 1065 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| root2 | ) |
Definition at line 1134 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| power1 | ) |
Definition at line 1176 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| power2 | ) |
Definition at line 1197 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| conversions | ) |
Definition at line 1246 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| to_integer | ) |
Definition at line 1274 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| squelch | ) |
Definition at line 1445 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| to_string | ) |
Definition at line 1461 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| relationals | ) |
Definition at line 1639 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| stream | ) |
Definition at line 1746 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| inc_dec | ) |
Definition at line 1759 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| to_st_amount | ) |
Definition at line 1775 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| truncate | ) |
Definition at line 1801 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| rounding | ) |
Definition at line 1829 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| int64 | ) |
Definition at line 1939 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| upward_rounding_produces_value_not_below_exact_at_k_max_rep_cusp | ) |
Definition at line 1995 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| upward_division_returns_value_not_below_exact_on_large_scale | ) |
Definition at line 2085 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| downward_division_returns_value_not_above_exact_on_large_scale | ) |
Definition at line 2142 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| to_nearest_division_uses_dropped_digits_on_large_scale | ) |
Definition at line 2209 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| subtraction_rounding | ) |
Definition at line 2265 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| normalization_cusp_tonearest_and_downward | ) |
Definition at line 2393 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| number_add_directed_sign_wrong | ) |
Definition at line 2480 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| number_add_to_nearest_picks_farther | ) |
Definition at line 2650 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST | ( | NumberTest | , |
| number_cusp_rounding_with_fractional_parts | ) |
Definition at line 2712 of file tests/libxrpl/basics/Number.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| un_hex | ) |
Definition at line 33 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| parse_url | ) |
Definition at line 49 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| to_string | ) |
Definition at line 287 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| trimWhitespace | ) |
Definition at line 293 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| toLower | ) |
Definition at line 306 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST_F | ( | StringUtilitiesTest | , |
| trimAndLowerIgnoreLocale | ) |
Definition at line 321 of file tests/libxrpl/basics/StringUtilities.cpp.
| xrpl::TEST | ( | TaggedCacheTest | , |
| tagged_cache | ) |
Definition at line 29 of file TaggedCache.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| sig_num | ) |
Definition at line 12 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| beast_zero | ) |
Definition at line 33 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| comparisons | ) |
Definition at line 57 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| add_sub | ) |
Definition at line 77 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| decimal | ) |
Definition at line 95 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| functions | ) |
Definition at line 113 of file XRPAmount.cpp.
| xrpl::TEST | ( | XRPAmountTest | , |
| mul_ratio | ) |
Definition at line 195 of file XRPAmount.cpp.
| xrpl::TEST | ( | json_value | , |
| construct_and_compare_Json_StaticString | ) |
|
nodiscard |
Definition at line 164 of file TestBase.h.
| UInt8Value xrpl::canonical_UINT8 | ( | ) |
Definition at line 34 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt16Value xrpl::canonical_UINT16 | ( | ) |
Definition at line 41 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt32Value xrpl::canonical_UINT32 | ( | ) |
Definition at line 48 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt64Value xrpl::canonical_UINT64 | ( | ) |
Definition at line 55 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt128Value xrpl::canonical_UINT128 | ( | ) |
Definition at line 62 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt160Value xrpl::canonical_UINT160 | ( | ) |
Definition at line 69 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt192Value xrpl::canonical_UINT192 | ( | ) |
Definition at line 76 of file /libxrpl/protocol_autogen/TestHelpers.h.
| UInt256Value xrpl::canonical_UINT256 | ( | ) |
Definition at line 83 of file /libxrpl/protocol_autogen/TestHelpers.h.
| Int32Value xrpl::canonical_INT32 | ( | ) |
Definition at line 90 of file /libxrpl/protocol_autogen/TestHelpers.h.
| NumberValue xrpl::canonical_NUMBER | ( | ) |
Definition at line 97 of file /libxrpl/protocol_autogen/TestHelpers.h.
| AmountValue xrpl::canonical_AMOUNT | ( | ) |
Definition at line 104 of file /libxrpl/protocol_autogen/TestHelpers.h.
| AccountValue xrpl::canonical_ACCOUNT | ( | ) |
Definition at line 111 of file /libxrpl/protocol_autogen/TestHelpers.h.
| CurrencyValue xrpl::canonical_CURRENCY | ( | ) |
Definition at line 118 of file /libxrpl/protocol_autogen/TestHelpers.h.
| IssueValue xrpl::canonical_ISSUE | ( | ) |
Definition at line 125 of file /libxrpl/protocol_autogen/TestHelpers.h.
| Vector256Value xrpl::canonical_VECTOR256 | ( | ) |
Definition at line 132 of file /libxrpl/protocol_autogen/TestHelpers.h.
| BlobValue xrpl::canonical_VL | ( | ) |
Definition at line 139 of file /libxrpl/protocol_autogen/TestHelpers.h.
| XChainBridgeValue xrpl::canonical_XCHAIN_BRIDGE | ( | ) |
Definition at line 147 of file /libxrpl/protocol_autogen/TestHelpers.h.
| STArray xrpl::canonical_ARRAY | ( | ) |
Definition at line 155 of file /libxrpl/protocol_autogen/TestHelpers.h.
| STObject xrpl::canonical_OBJECT | ( | ) |
Definition at line 161 of file /libxrpl/protocol_autogen/TestHelpers.h.
| STPathSet xrpl::canonical_PATHSET | ( | ) |
Definition at line 167 of file /libxrpl/protocol_autogen/TestHelpers.h.
| void xrpl::expectEqualField | ( | T const & | expected, |
| T const & | actual, | ||
| char const * | fieldName ) |
Definition at line 178 of file /libxrpl/protocol_autogen/TestHelpers.h.
| void xrpl::expectEqualField< STObject > | ( | STObject const & | expected, |
| STObject const & | actual, | ||
| char const * | fieldName ) |
Definition at line 185 of file /libxrpl/protocol_autogen/TestHelpers.h.
| void xrpl::expectEqualField< STPathSet > | ( | STPathSet const & | expected, |
| STPathSet const & | actual, | ||
| char const * | fieldName ) |
Definition at line 193 of file /libxrpl/protocol_autogen/TestHelpers.h.
| void xrpl::expectEqualField | ( | T const & | expected, |
| std::reference_wrapper< T const > | actual, | ||
| char const * | fieldName ) |
Definition at line 205 of file /libxrpl/protocol_autogen/TestHelpers.h.
| uint256 xrpl::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.
| proposeHash | The hash of the proposed position |
| previousLedger | The hash of the ledger the proposal is based upon |
| proposeSeq | Sequence number of the proposal |
| closeTime | Close time of the proposal |
| publicKey | Signer's public key |
| signature | Proposal signature |
Definition at line 53 of file RCLCxPeerPos.cpp.
| RCLValidatedLedger::Seq xrpl::mismatch | ( | RCLValidatedLedger const & | a, |
| RCLValidatedLedger const & | b ) |
Definition at line 92 of file RCLValidations.cpp.
| void xrpl::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.
| app | Application object containing validations and ledgerMaster |
| val | The validation to add |
| source | Name associated with validation used in logging |
Definition at line 152 of file RCLValidations.cpp.
| std::shared_ptr< Ledger > xrpl::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.
| parent | The ledger to apply transactions to |
| closeTime | The time the ledger closed |
| closeTimeCorrect | Whether consensus agreed on close time |
| closeResolution | Resolution used to determine consensus close time |
| app | Handle to application instance |
| txs | On entry, transactions to apply; on exit, transactions that must be retried in next round. |
| failedTxs | Populated with transactions that failed in this round |
| j | Journal to use for logging |
Definition at line 175 of file BuildLedger.cpp.
| std::shared_ptr< Ledger > xrpl::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.
| replayData | Data of the ledger to replay |
| applyFlags | Flags to use when applying transactions |
| app | Handle to application instance |
| j | Journal to use for logging |
Definition at line 219 of file BuildLedger.cpp.
| std::shared_ptr< Ledger > xrpl::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 38 of file BuildLedger.cpp.
| std::size_t xrpl::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.
| app | Handle to application |
| txns | the set of transactions to apply, |
| failed | set of transactions that failed to apply |
| view | ledger to apply to |
| j | Journal for logging |
Definition at line 96 of file BuildLedger.cpp.
|
static |
Definition at line 191 of file InboundLedger.cpp.
| std::unique_ptr< InboundLedgers > xrpl::makeInboundLedgers | ( | Application & | app, |
| InboundLedgers::clock_type & | clock, | ||
| beast::insight::Collector::ptr const & | collector ) |
Definition at line 455 of file InboundLedgers.cpp.
| std::unique_ptr< InboundTransactions > xrpl::makeInboundTransactions | ( | Application & | app, |
| beast::insight::Collector::ptr const & | collector, | ||
| std::function< void(std::shared_ptr< SHAMap > const &, bool)> | gotSet ) |
Definition at line 275 of file InboundTransactions.cpp.
| std::unique_ptr< LedgerCleaner > xrpl::makeLedgerCleaner | ( | Application & | app, |
| beast::Journal | journal ) |
Definition at line 458 of file app/ledger/detail/LedgerCleaner.cpp.
|
static |
Definition at line 96 of file LedgerMaster.cpp.
|
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.
| have | The map that the recipient already has (if any). |
| cnt | The maximum number of nodes to return. |
| into | The protocol object into which we add information. |
| seq | The sequence number of the ledger the map is a part of. |
| withLeaves | True if leaf nodes should be included. |
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 2031 of file LedgerMaster.cpp.
|
nodiscard |
Deserializes a SHAMapTreeNode from wire format data.
This function attempts to create a SHAMapTreeNode from the provided data string. If the data is malformed or deserialization fails, the function returns a nullptr instead of throwing an exception.
| data | The serialized node data in wire format. |
Definition at line 19 of file LedgerNodeHelpers.cpp.
|
nodiscard |
Extracts or reconstructs the SHAMapNodeID from a ledger node proto message.
This function retrieves the SHAMapNodeID for a tree node, with behavior that depends on which field is set and the node type (inner vs. leaf).
When the legacy nodeid field is set in the message:
When the new id or depth field is set in the message:
| ledgerNode | The validated protocol message containing the ledger node data. |
| treeNode | The deserialized tree node (inner or leaf node). |
Definition at line 33 of file LedgerNodeHelpers.cpp.
|
static |
Definition at line 25 of file LedgerPersistence.cpp.
| bool xrpl::pendSaveValidated | ( | ServiceRegistry & | registry, |
| std::shared_ptr< Ledger const > const & | ledger, | ||
| bool | isSynchronous, | ||
| bool | isCurrent ) |
Save, or arrange to save, a fully-validated ledger.
| registry | The service registry providing access to required services. |
| ledger | The fully-validated ledger to save. |
| isSynchronous | If true, wait for the save to complete. |
| isCurrent | If true, the ledger is the current validated ledger. |
Definition at line 50 of file LedgerPersistence.cpp.
| std::shared_ptr< Ledger > xrpl::loadLedgerHelper | ( | LedgerHeader const & | info, |
| Rules const & | rules, | ||
| Fees const & | fees, | ||
| ServiceRegistry & | registry, | ||
| bool | acquire ) |
Make ledger using info loaded from database.
| info | Ledger information. |
| rules | Rules to use (may be overwritten by setup()). |
| fees | Fees to use (may be overwritten by setup()). |
| registry | Service registry for dependency injection. |
| acquire | Acquire the ledger if not found locally. |
Definition at line 95 of file LedgerPersistence.cpp.
|
static |
Definition at line 119 of file LedgerPersistence.cpp.
| std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256 > xrpl::getLatestLedger | ( | Rules const & | rules, |
| Fees const & | fees, | ||
| ServiceRegistry & | registry ) |
Fetch the ledger with the highest sequence contained in the database.
| rules | Rules to use (may be overwritten by setup()). |
| fees | Fees to use (may be overwritten by setup()). |
| registry | Service registry for dependency injection. |
Definition at line 135 of file LedgerPersistence.cpp.
| std::shared_ptr< Ledger > xrpl::loadByIndex | ( | std::uint32_t | ledgerIndex, |
| Rules const & | rules, | ||
| Fees const & | fees, | ||
| ServiceRegistry & | registry, | ||
| bool | acquire = true ) |
Load a ledger by its sequence number.
| ledgerIndex | The sequence number of the ledger to load. |
| rules | Rules to use (may be overwritten by setup()). |
| fees | Fees to use (may be overwritten by setup()). |
| registry | Service registry for dependency injection. |
| acquire | Acquire the ledger if not found locally. |
Definition at line 144 of file LedgerPersistence.cpp.
| std::shared_ptr< Ledger > xrpl::loadByHash | ( | uint256 const & | ledgerHash, |
| Rules const & | rules, | ||
| Fees const & | fees, | ||
| ServiceRegistry & | registry, | ||
| bool | acquire = true ) |
Load a ledger by its hash.
| ledgerHash | The hash of the ledger to load. |
| rules | Rules to use (may be overwritten by setup()). |
| fees | Fees to use (may be overwritten by setup()). |
| registry | Service registry for dependency injection. |
| acquire | Acquire the ledger if not found locally. |
Definition at line 162 of file LedgerPersistence.cpp.
| void xrpl::addJson | ( | json::Value & | json, |
| LedgerFill const & | fill ) |
Given a Ledger and options, fill a json::Value with a description of the ledger.
Definition at line 353 of file LedgerToJson.cpp.
| json::Value xrpl::getJson | ( | LedgerFill const & | fill | ) |
Return a new json::Value representing the ledger with given options.
Definition at line 366 of file LedgerToJson.cpp.
| void xrpl::copyFrom | ( | json::Value & | to, |
| json::Value const & | from ) |
Copy all the keys and values from one object into another.
Definition at line 374 of file LedgerToJson.cpp.
| std::unique_ptr< LocalTxs > xrpl::makeLocalTxs | ( | ) |
Definition at line 185 of file LocalTxs.cpp.
| std::string xrpl::debugTxstr | ( | std::shared_ptr< STTx const > const & | tx | ) |
Definition at line 194 of file OpenLedger.cpp.
| std::string xrpl::debugTostr | ( | OrderedTxs const & | set | ) |
Definition at line 202 of file OpenLedger.cpp.
| std::string xrpl::debugTostr | ( | SHAMap const & | set | ) |
Definition at line 211 of file OpenLedger.cpp.
| std::string xrpl::debugTostr | ( | std::shared_ptr< ReadView const > const & | view | ) |
Definition at line 231 of file OpenLedger.cpp.
|
static |
Definition at line 158 of file LedgerHistory.cpp.
|
static |
Definition at line 176 of file LedgerHistory.cpp.
|
static |
Definition at line 302 of file LedgerHistory.cpp.
| std::unique_ptr< OrderBookDB > xrpl::makeOrderBookDb | ( | ServiceRegistry & | registry, |
| OrderBookDBConfig const & | config ) |
Create an OrderBookDB instance.
| registry | Service registry for accessing other services |
| config | Configuration parameters |
Definition at line 43 of file OrderBookDBImpl.cpp.
Definition at line 2186 of file Application.cpp.
| std::unique_ptr< Application > xrpl::makeApplication | ( | std::unique_ptr< Config > | config, |
| std::unique_ptr< Logs > | logs, | ||
| std::unique_ptr< TimeKeeper > | timeKeeper ) |
Definition at line 2176 of file Application.cpp.
| std::unique_ptr< CollectorManager > xrpl::makeCollectorManager | ( | Section const & | params, |
| beast::Journal | journal ) |
Definition at line 65 of file CollectorManager.cpp.
| std::unique_ptr< LoadManager > xrpl::makeLoadManager | ( | Application & | app, |
| beast::Journal | journal ) |
Definition at line 177 of file LoadManager.cpp.
| bool xrpl::adjustDescriptorLimit | ( | int | needed, |
| beast::Journal | j ) |
| void xrpl::printHelp | ( | po::options_description const & | desc | ) |
| std::pair< PublicKey, SecretKey > xrpl::getNodeIdentity | ( | Application & | app, |
| boost::program_options::variables_map const & | cmdline ) |
The cryptographic credentials identifying this server instance.
| app | The application object |
| cmdline | The command line parameters passed into the application. |
Definition at line 23 of file NodeIdentity.cpp.
| std::unique_ptr< AmendmentTable > xrpl::make_AmendmentTable | ( | ServiceRegistry & | registry, |
| std::chrono::seconds | majorityTime, | ||
| std::vector< AmendmentTable::FeatureInfo > const & | supported, | ||
| Section const & | enabled, | ||
| Section const & | vetoed, | ||
| beast::Journal | journal ) |
| void xrpl::convertBlobsToTxResult | ( | RelationalDatabase::AccountTxs & | to, |
| std::uint32_t | ledgerIndex, | ||
| std::string const & | status, | ||
| Blob const & | rawTxn, | ||
| Blob const & | rawMeta, | ||
| Application & | app ) |
Definition at line 24 of file AccountTxPaging.cpp.
| void xrpl::saveLedgerAsync | ( | Application & | app, |
| std::uint32_t | seq ) |
Definition at line 58 of file AccountTxPaging.cpp.
|
static |
Definition at line 50 of file AmendmentTable.cpp.
| HashRouter::Setup xrpl::setupHashRouter | ( | Config const & | config | ) |
Create HashRouter setup from configuration.
Definition at line 17 of file setup_HashRouter.cpp.
|
static |
|
static |
|
static |
| TxQ::Setup xrpl::setupTxQ | ( | Config const & | config | ) |
Build a TxQ::Setup object from application configuration.
| std::string xrpl::to_string | ( | ListDisposition | disposition | ) |
Definition at line 61 of file ValidatorList.cpp.
| std::size_t xrpl::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 507 of file ValidatorList.cpp.
| std::size_t xrpl::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 486 of file ValidatorList.cpp.
| std::size_t xrpl::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 560 of file ValidatorList.cpp.
| std::unique_ptr< FeeVote > xrpl::makeFeeVote | ( | FeeSetup const & | setup, |
| beast::Journal | journal ) |
Create an instance of the FeeVote logic.
| setup | The fee schedule to vote for. |
| journal | Where to log. |
Definition at line 314 of file FeeVoteImpl.cpp.
| std::unique_ptr< NetworkOPs > xrpl::makeNetworkOPs | ( | ServiceRegistry & | registry, |
| NetworkOPs::clock_type & | clock, | ||
| bool | standalone, | ||
| std::size_t | minPeerCount, | ||
| bool | startValid, | ||
| JobQueue & | jobQueue, | ||
| LedgerMaster & | ledgerMaster, | ||
| ValidatorKeys const & | validatorKeys, | ||
| boost::asio::io_context & | ioSvc, | ||
| beast::Journal | journal, | ||
| beast::insight::Collector::ptr const & | collector ) |
Definition at line 5173 of file NetworkOPs.cpp.
|
static |
Definition at line 2443 of file NetworkOPs.cpp.
| std::unique_ptr< SHAMapStore > xrpl::makeSHAMapStore | ( | Application & | app, |
| node_store::Scheduler & | scheduler, | ||
| beast::Journal | journal ) |
Definition at line 701 of file SHAMapStoreImp.cpp.
| FeeLevel64 xrpl::toFeeLevel | ( | XRPAmount const & | drops, |
| XRPAmount const & | baseFee ) |
| void xrpl::hash_append | ( | Hasher & | h, |
| ValidatorBlobInfo const & | blobInfo ) |
Definition at line 952 of file ValidatorList.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| std::vector< ValidatorBlobInfo > const & | blobs ) |
Definition at line 964 of file ValidatorList.h.
| void xrpl::hash_append | ( | Hasher & | h, |
| std::map< std::size_t, ValidatorBlobInfo > const & | blobs ) |
Definition at line 972 of file ValidatorList.h.
| SQLiteDatabase xrpl::setupRelationalDatabase | ( | ServiceRegistry & | registry, |
| Config const & | config, | ||
| JobQueue & | jobQueue ) |
setupRelationalDatabase Creates and returns a SQLiteDatabase instance based on configuration.
It's recommended to use it as a singleton, but it's not enforced (e.g. if you have more than one database).
Definition at line 656 of file SQLiteDatabase.cpp.
| void xrpl::initPeerFinderDB | ( | soci::session & | session, |
| BasicConfig const & | config, | ||
| beast::Journal | j ) |
initPeerFinderDB Opens a session with the peer finder database.
| session | Session with the peer finder database. |
| config | Path to the database and other opening parameters. |
| j | Journal. |
Definition at line 28 of file xrpld/app/rdb/detail/PeerFinder.cpp.
| void xrpl::updatePeerFinderDB | ( | soci::session & | session, |
| int | currentSchemaVersion, | ||
| beast::Journal | j ) |
updatePeerFinderDB Updates the peer finder database to a new version.
| session | Session with the database. |
| currentSchemaVersion | New version of the database. |
| j | Journal. |
Definition at line 60 of file xrpld/app/rdb/detail/PeerFinder.cpp.
| void xrpl::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.
| session | Session with the database. |
| func | Callback to invoke for each entry. |
Definition at line 209 of file xrpld/app/rdb/detail/PeerFinder.cpp.
| void xrpl::savePeerFinderDB | ( | soci::session & | session, |
| std::vector< peer_finder::Store::Entry > const & | v ) |
savePeerFinderDB Saves a new entry to the peer finder database.
| session | Session with the database. |
| v | Entry to save which contains information about a new peer. |
Definition at line 229 of file xrpld/app/rdb/detail/PeerFinder.cpp.
Definition at line 1241 of file xrpld/core/detail/Config.cpp.
| DatabaseCon::Setup xrpl::setupDatabaseCon | ( | Config const & | c, |
| std::optional< beast::Journal > | j = std::nullopt ) |
Definition at line 1261 of file xrpld/core/detail/Config.cpp.
| IniFileSections xrpl::parseIniFile | ( | std::string const & | strInput, |
| bool const | bTrim ) |
Definition at line 163 of file xrpld/core/detail/Config.cpp.
| IniFileSections::mapped_type * xrpl::getIniFileSection | ( | IniFileSections & | secSource, |
| std::string const & | strSection ) |
Definition at line 211 of file xrpld/core/detail/Config.cpp.
| bool xrpl::getSingleSection | ( | IniFileSections & | secSource, |
| std::string const & | strSection, | ||
| std::string & | strValue, | ||
| beast::Journal | j ) |
Definition at line 220 of file xrpld/core/detail/Config.cpp.
|
staticnodiscard |
Definition at line 255 of file xrpld/core/detail/Config.cpp.
|
static |
Definition at line 423 of file xrpld/core/detail/Config.cpp.
| std::optional< std::string > xrpl::getFeatureValue | ( | boost::beast::http::fields const & | headers, |
| std::string const & | feature ) |
Get feature's header value.
| headers | request/response header |
| feature | name |
Definition at line 51 of file Handshake.cpp.
| bool xrpl::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.
| headers | request/response header |
| feature | to check |
| value | of the feature to check, must be a single value; i.e. not value1,value2... |
Definition at line 65 of file Handshake.cpp.
| bool xrpl::featureEnabled | ( | boost::beast::http::fields const & | headers, |
| std::string const & | feature ) |
Check if a feature is enabled.
| headers | request/response header |
| feature | to check |
Definition at line 77 of file Handshake.cpp.
| std::string xrpl::makeFeaturesRequestHeader | ( | bool | comprEnabled, |
| bool | ledgerReplayEnabled, | ||
| bool | txReduceRelayEnabled, | ||
| bool | vpReduceRelayEnabled ) |
Make request header X-Protocol-Ctl value with supported features.
| comprEnabled | if true then compression feature is enabled |
| ledgerReplayEnabled | if true then ledger-replay feature is enabled |
| txReduceRelayEnabled | if true then transaction reduce-relay feature is enabled |
| vpReduceRelayEnabled | if true then validation/proposal reduce-relay base squelch feature is enabled |
Definition at line 83 of file Handshake.cpp.
| std::string xrpl::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.
| header | request's header |
| comprEnabled | if true then compression feature is enabled |
| ledgerReplayEnabled | if true then ledger-replay feature is enabled |
| txReduceRelayEnabled | if true then transaction reduce-relay feature is enabled |
| vpReduceRelayEnabled | if true then validation/proposal reduce-relay base squelch feature is enabled |
Definition at line 102 of file Handshake.cpp.
|
static |
Hashes the latest finished message from an SSL stream.
| ssl | the session to get the message from. |
| get | a pointer to the function to call to retrieve the finished message. This can be either:
|
Definition at line 137 of file Handshake.cpp.
| std::optional< uint256 > xrpl::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.
| ssl | the SSL/TLS connection state. |
Definition at line 155 of file Handshake.cpp.
| void xrpl::buildHandshake | ( | boost::beast::http::fields & | h, |
| xrpl::uint256 const & | sharedValue, | ||
| std::optional< std::uint32_t > | networkID, | ||
| beast::ip::Address | publicIp, | ||
| beast::ip::Address | remoteIp, | ||
| Application & | app ) |
Insert fields headers necessary for upgrading the link to the peer protocol.
Definition at line 185 of file Handshake.cpp.
| PublicKey xrpl::verifyHandshake | ( | boost::beast::http::fields const & | headers, |
| uint256 const & | sharedValue, | ||
| std::optional< std::uint32_t > | networkID, | ||
| beast::ip::Address | publicIp, | ||
| 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.
| A | class derived from std::exception. |
Definition at line 230 of file Handshake.cpp.
| request_type xrpl::makeRequest | ( | bool | crawlPublic, |
| bool | comprEnabled, | ||
| bool | ledgerReplayEnabled, | ||
| bool | txReduceRelayEnabled, | ||
| bool | vpReduceRelayEnabled ) |
Make outbound http request.
| crawlPublic | if true then server's IP/Port are included in crawl |
| comprEnabled | if true then compression feature is enabled |
| ledgerReplayEnabled | if true then ledger-replay feature is enabled |
| txReduceRelayEnabled | if true then transaction reduce-relay feature is enabled |
| vpReduceRelayEnabled | if true then validation/proposal reduce-relay feature is enabled |
Definition at line 366 of file Handshake.cpp.
| http_response_type xrpl::makeResponse | ( | bool | crawlPublic, |
| http_request_type const & | req, | ||
| beast::ip::Address | publicIp, | ||
| beast::ip::Address | remoteIp, | ||
| uint256 const & | sharedValue, | ||
| std::optional< std::uint32_t > | networkID, | ||
| ProtocolVersion | version, | ||
| Application & | app ) |
Make http response.
| crawlPublic | if true then server's IP/Port are included in crawl |
| req | incoming http request |
| publicIp | server's public IP |
| remoteIp | peer's IP |
| sharedValue | shared value based on the SSL connection state |
| networkID | specifies what network we intend to connect to |
| version | supported protocol version |
| app | Application's reference to access some common properties |
Definition at line 390 of file Handshake.cpp.
| bool xrpl::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.
| Headers | request (inbound) or response (outbound) header |
| request | http headers |
| feature | to check |
| value | feature's value to check in the headers |
| config | feature's configuration value |
Definition at line 182 of file Handshake.h.
| bool xrpl::peerFeatureEnabled | ( | Headers const & | request, |
| std::string const & | feature, | ||
| bool | config ) |
Wrapper for enable(1)/disable type(0) of feature.
Definition at line 196 of file Handshake.h.
| std::shared_ptr< Message > xrpl::makeSquelchMessage | ( | PublicKey const & | validator, |
| bool | squelch, | ||
| uint32_t | squelchDuration ) |
Definition at line 1495 of file OverlayImpl.cpp.
| Overlay::Setup xrpl::setupOverlay | ( | BasicConfig const & | config, |
| beast::Journal | j ) |
Definition at line 1610 of file OverlayImpl.cpp.
| std::unique_ptr< Overlay > xrpl::makeOverlay | ( | Application & | app, |
| Overlay::Setup const & | setup, | ||
| ServerHandler & | serverHandler, | ||
| resource::Manager & | resourceManager, | ||
| Resolver & | resolver, | ||
| boost::asio::io_context & | ioContext, | ||
| BasicConfig const & | config, | ||
| beast::insight::Collector::ptr const & | collector ) |
Creates the implementation of Overlay.
Definition at line 1721 of file OverlayImpl.cpp.
|
static |
Definition at line 199 of file PeerImp.cpp.
|
static |
Definition at line 3229 of file PeerImp.cpp.
|
static |
Definition at line 3253 of file PeerImp.cpp.
| std::unique_ptr< PeerSetBuilder > xrpl::makePeerSetBuilder | ( | Application & | app | ) |
Definition at line 141 of file PeerSet.cpp.
| std::unique_ptr< PeerSet > xrpl::makeDummyPeerSet | ( | Application & | app | ) |
Make a dummy PeerSet that does not do anything.
Definition at line 184 of file PeerSet.cpp.
| protocol::MessageType xrpl::protocolMessageType | ( | protocol::TMGetLedger const & | ) |
Definition at line 28 of file ProtocolMessage.h.
| protocol::MessageType xrpl::protocolMessageType | ( | protocol::TMReplayDeltaRequest const & | ) |
Definition at line 34 of file ProtocolMessage.h.
| protocol::MessageType xrpl::protocolMessageType | ( | protocol::TMProofPathRequest const & | ) |
Definition at line 40 of file ProtocolMessage.h.
| std::string xrpl::protocolMessageName | ( | int | type | ) |
Returns the name of a protocol message given its type.
Definition at line 50 of file ProtocolMessage.h.
| std::pair< std::size_t, boost::system::error_code > xrpl::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.
| buffers | The buffer that contains the data we've received |
| handler | The handler that will be used to process the message |
| hint | If possible, a hint as to the amount of data to read next. The returned value MAY be zero, which means "no hint" |
Definition at line 323 of file ProtocolMessage.h.
| std::string xrpl::to_string | ( | ProtocolVersion const & | p | ) |
Print a protocol version a human-readable string.
Definition at line 49 of file ProtocolVersion.cpp.
| std::vector< ProtocolVersion > xrpl::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 parsable as valid protocol strings are excluded from the result set.
Definition at line 55 of file ProtocolVersion.cpp.
| std::optional< ProtocolVersion > xrpl::negotiateProtocolVersion | ( | std::vector< ProtocolVersion > const & | versions | ) |
Given a list of supported protocol versions, choose the one we prefer.
Definition at line 103 of file ProtocolVersion.cpp.
| std::optional< ProtocolVersion > xrpl::negotiateProtocolVersion | ( | boost::beast::string_view const & | versions | ) |
Given a list of supported protocol versions, choose the one we prefer.
Definition at line 122 of file ProtocolVersion.cpp.
| std::string const & xrpl::supportedProtocolVersions | ( | ) |
The list of all the protocol versions we support.
Definition at line 130 of file ProtocolVersion.cpp.
| bool xrpl::isProtocolSupported | ( | ProtocolVersion const & | v | ) |
Determine whether we support a specific protocol version.
Definition at line 148 of file ProtocolVersion.cpp.
|
constexpr |
Definition at line 22 of file ProtocolVersion.h.
|
constexpr |
Upper bound on the wire size of a TMManifests message.
Allows both counts' worth of entries at kMaxManifestBytes each, plus framing per entry. Messages larger than this are dropped before parsing, which bounds the work an oversized message can cause.
| trustedCount | Trusted manifests per message. |
| untrustedCount | Untrusted manifests per message. |
| SendIfPred< Predicate > xrpl::sendIf | ( | std::shared_ptr< Message > const & | m, |
| Predicate const & | f ) |
Helper function to aid in type deduction.
Definition at line 61 of file predicates.h.
| SendIfNotPred< Predicate > xrpl::sendIfNot | ( | std::shared_ptr< Message > const & | m, |
| Predicate const & | f ) |
Helper function to aid in type deduction.
Definition at line 96 of file predicates.h.
| hash_set< PathAsset > xrpl::accountSourceAssets | ( | AccountID const & | account, |
| std::shared_ptr< AssetCache > const & | lrCache, | ||
| bool | includeXRP ) |
Definition at line 17 of file AccountAssets.cpp.
| hash_set< PathAsset > xrpl::accountDestAssets | ( | AccountID const & | account, |
| std::shared_ptr< AssetCache > const & | lrCache, | ||
| bool | includeXRP ) |
Definition at line 61 of file AccountAssets.cpp.
|
static |
Definition at line 46 of file Pathfinder.cpp.
|
static |
Definition at line 51 of file Pathfinder.cpp.
|
static |
Definition at line 492 of file Pathfinder.cpp.
Definition at line 511 of file Pathfinder.cpp.
Definition at line 963 of file Pathfinder.cpp.
Definition at line 12 of file PathfinderUtils.h.
Definition at line 24 of file PathfinderUtils.h.
| bool xrpl::convertAllCheck | ( | STAmount const & | a | ) |
Definition at line 33 of file PathfinderUtils.h.
| bool xrpl::passwordUnrequiredOrSentCorrect | ( | Port const & | port, |
| json::Value const & | params ) |
| bool xrpl::ipAllowed | ( | beast::ip::Address const & | remoteIp, |
| std::vector< boost::asio::ip::network_v4 > const & | nets4, | ||
| std::vector< boost::asio::ip::network_v6 > const & | nets6 ) |
| bool xrpl::isAdmin | ( | Port const & | port, |
| json::Value const & | params, | ||
| beast::ip::Address const & | remoteIp ) |
| Role xrpl::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 secureGateway proxy.
| bool xrpl::isUnlimited | ( | Role const & | role | ) |
| bool xrpl::isUnlimited | ( | Role const & | required, |
| Port const & | port, | ||
| json::Value const & | params, | ||
| beast::ip::Endpoint const & | remoteIp, | ||
| std::string const & | user ) |
| resource::Consumer xrpl::requestInboundEndpoint | ( | resource::Manager & | manager, |
| beast::ip::Endpoint const & | remoteAddress, | ||
| Role const & | role, | ||
| std::string_view | user, | ||
| std::string_view | forwardedFor ) |
|
static |
| std::string_view xrpl::forwardedFor | ( | http_request_type const & | request | ) |
| std::string xrpl::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 67 of file RPCCall.cpp.
| std::string xrpl::jsonrpcRequest | ( | std::string const & | strMethod, |
| json::Value const & | params, | ||
| json::Value const & | id ) |
Definition at line 1522 of file RPCCall.cpp.
| json::Value xrpl::rpcCmdToJson | ( | std::vector< std::string > const & | args, |
| json::Value & | retParams, | ||
| unsigned int | apiVersion, | ||
| beast::Journal | j ) |
Definition at line 1619 of file RPCCall.cpp.
| std::pair< int, json::Value > xrpl::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 xrpld command line as well as xrpld unit tests
Definition at line 1664 of file RPCCall.cpp.
| std::shared_ptr< RPCSub > xrpl::makeRPCSub | ( | InfoSub::Source & | source, |
| boost::asio::io_context & | ioContext, | ||
| JobQueue & | jobQueue, | ||
| std::string const & | strUrl, | ||
| std::string const & | strUsername, | ||
| std::string const & | strPassword, | ||
| ServiceRegistry & | registry ) |
Definition at line 211 of file RPCSub.cpp.
|
static |
Definition at line 82 of file ServerHandler.cpp.
|
static |
Definition at line 89 of file ServerHandler.cpp.
|
static |
Definition at line 107 of file ServerHandler.cpp.
|
static |
Definition at line 265 of file ServerHandler.cpp.
|
static |
Definition at line 271 of file ServerHandler.cpp.
|
static |
Definition at line 288 of file ServerHandler.cpp.
| void xrpl::logDuration | ( | json::Value const & | request, |
| T const & | duration, | ||
| beast::Journal & | journal ) |
Definition at line 396 of file ServerHandler.cpp.
|
static |
Definition at line 585 of file ServerHandler.cpp.
|
static |
Definition at line 1081 of file ServerHandler.cpp.
|
static |
Definition at line 1127 of file ServerHandler.cpp.
|
static |
Definition at line 1200 of file ServerHandler.cpp.
|
static |
Definition at line 1229 of file ServerHandler.cpp.
| ServerHandler::Setup xrpl::setupServerHandler | ( | Config const & | config, |
| std::ostream & | log ) |
Definition at line 1242 of file ServerHandler.cpp.
| std::unique_ptr< ServerHandler > xrpl::makeServerHandler | ( | Application & | app, |
| boost::asio::io_context & | ioContext, | ||
| JobQueue & | jobQueue, | ||
| NetworkOPs & | networkOPs, | ||
| resource::Manager & | resourceManager, | ||
| CollectorManager & | cm ) |
Definition at line 1254 of file ServerHandler.cpp.
| std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > xrpl::doLedgerGrpc | ( | rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > & | context | ) |
Definition at line 168 of file xrpld/rpc/handlers/ledger/Ledger.cpp.
| std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > xrpl::doLedgerEntryGrpc | ( | rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > & | context | ) |
Definition at line 1012 of file LedgerEntry.cpp.
| std::pair< org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status > xrpl::doLedgerDataGrpc | ( | rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerDataRequest > & | context | ) |
Definition at line 134 of file LedgerData.cpp.
| std::pair< org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status > xrpl::doLedgerDiffGrpc | ( | rpc::GRPCContext< org::xrpl::rpc::v1::GetLedgerDiffRequest > & | context | ) |
Definition at line 18 of file LedgerDiff.cpp.
| void xrpl::addChannel | ( | json::Value & | jsonLines, |
| SLE const & | line ) |
Definition at line 37 of file AccountChannels.cpp.
| json::Value xrpl::doAccountChannels | ( | rpc::JsonContext & | context | ) |
Definition at line 70 of file AccountChannels.cpp.
| json::Value xrpl::doAccountCurrencies | ( | rpc::JsonContext & | context | ) |
Definition at line 22 of file AccountCurrencies.cpp.
| void xrpl::injectSLE | ( | json::Value & | jv, |
| SLE const & | sle ) |
Injects JSON describing a ledger entry.
| jv | The JSON value to populate. |
| sle | The ledger entry to describe. |
Populates the provided JSON value with the description of the specified ledger entry. If the entry is an account root and contains an email hash, adds a 'urlgravatar' field with the corresponding Gravatar URL. If the entry is not an account root, sets the 'Invalid' field to true.
Definition at line 50 of file AccountInfo.cpp.
| json::Value xrpl::doAccountInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 81 of file AccountInfo.cpp.
| void xrpl::addLine | ( | json::Value & | jsonLines, |
| RPCTrustLine const & | line ) |
Definition at line 36 of file AccountLines.cpp.
| json::Value xrpl::doAccountLines | ( | rpc::JsonContext & | context | ) |
Definition at line 83 of file AccountLines.cpp.
| json::Value xrpl::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 38 of file AccountNFTs.cpp.
| bool xrpl::getAccountObjects | ( | ReadView const & | ledger, |
| AccountID const & | account, | ||
| std::optional< std::vector< LedgerEntryType > > const & | typeFilter, | ||
| uint256 | dirIndex, | ||
| uint256 | entryIndex, | ||
| std::uint32_t const | limit, | ||
| std::optional< bool > const | sponsoredFilter, | ||
| json::Value & | jvResult ) |
Gathers all objects for an account in a ledger.
| ledger | Ledger to search account objects. |
| account | AccountID to find objects for. |
| typeFilter | Gathers objects of these types. empty gathers all types. |
| dirIndex | Begin gathering account objects from this directory. |
| entryIndex | Begin gathering objects from this directory node. |
| limit | Maximum number of objects to find. |
| sponsoredFilter | If set, only return objects whose sponsored state matches the value. |
| jvResult | A JSON result that holds the request objects. |
Definition at line 43 of file AccountObjects.cpp.
| json::Value xrpl::doAccountObjects | ( | rpc::JsonContext & | context | ) |
Definition at line 268 of file AccountObjects.cpp.
| void xrpl::appendOfferJson | ( | SLE::const_ref | offer, |
| json::Value & | offers ) |
Definition at line 34 of file AccountOffers.cpp.
| json::Value xrpl::doAccountOffers | ( | rpc::JsonContext & | context | ) |
Definition at line 55 of file AccountOffers.cpp.
|
static |
Definition at line 43 of file AccountTx.cpp.
| std::variant< std::optional< LedgerSpecifier >, json::Value > xrpl::parseLedgerArgs | ( | rpc::Context & | context, |
| json::Value const & | params ) |
Definition at line 93 of file AccountTx.cpp.
| std::variant< LedgerRange, rpc::Status > xrpl::getLedgerRange | ( | rpc::Context & | context, |
| std::optional< LedgerSpecifier > const & | ledgerSpecifier ) |
Definition at line 176 of file AccountTx.cpp.
| std::pair< AccountTxResult, rpc::Status > xrpl::doAccountTxHelp | ( | rpc::Context & | context, |
| AccountTxArgs const & | args ) |
Definition at line 255 of file AccountTx.cpp.
| json::Value xrpl::populateJsonResponse | ( | std::pair< AccountTxResult, rpc::Status > const & | res, |
| AccountTxArgs const & | args, | ||
| rpc::JsonContext const & | context ) |
Definition at line 320 of file AccountTx.cpp.
| json::Value xrpl::doAccountTx | ( | rpc::JsonContext & | context | ) |
Definition at line 448 of file AccountTx.cpp.
| json::Value xrpl::doGatewayBalances | ( | rpc::JsonContext & | context | ) |
Definition at line 52 of file GatewayBalances.cpp.
|
static |
Definition at line 28 of file NoRippleCheck.cpp.
| json::Value xrpl::doNoRippleCheck | ( | rpc::JsonContext & | context | ) |
Definition at line 52 of file NoRippleCheck.cpp.
| json::Value xrpl::doOwnerInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 20 of file OwnerInfo.cpp.
| json::Value xrpl::doBlackList | ( | rpc::JsonContext & | context | ) |
Definition at line 11 of file BlackList.cpp.
| json::Value xrpl::doCanDelete | ( | rpc::JsonContext & | context | ) |
Definition at line 21 of file CanDelete.cpp.
| json::Value xrpl::doLedgerCleaner | ( | rpc::JsonContext & | context | ) |
Definition at line 12 of file rpc/handlers/admin/data/LedgerCleaner.cpp.
| json::Value xrpl::doLedgerRequest | ( | rpc::JsonContext & | context | ) |
Definition at line 16 of file LedgerRequest.cpp.
|
static |
Definition at line 18 of file ValidationCreate.cpp.
| json::Value xrpl::doValidationCreate | ( | rpc::JsonContext & | context | ) |
Definition at line 33 of file ValidationCreate.cpp.
| double xrpl::estimateEntropy | ( | std::string const & | input | ) |
Definition at line 26 of file WalletPropose.cpp.
| json::Value xrpl::doWalletPropose | ( | rpc::JsonContext & | context | ) |
Definition at line 55 of file WalletPropose.cpp.
| json::Value xrpl::walletPropose | ( | json::Value const & | params | ) |
Definition at line 61 of file WalletPropose.cpp.
| json::Value xrpl::doLogLevel | ( | rpc::JsonContext & | context | ) |
Definition at line 19 of file LogLevel.cpp.
| json::Value xrpl::doLogRotate | ( | rpc::JsonContext & | context | ) |
Definition at line 12 of file LogRotate.cpp.
| json::Value xrpl::doConnect | ( | rpc::JsonContext & | context | ) |
Definition at line 24 of file Connect.cpp.
| json::Value xrpl::doPeerReservationsAdd | ( | rpc::JsonContext & | context | ) |
Definition at line 18 of file PeerReservationsAdd.cpp.
| json::Value xrpl::doPeerReservationsDel | ( | rpc::JsonContext & | context | ) |
Definition at line 17 of file PeerReservationsDel.cpp.
| json::Value xrpl::doPeerReservationsList | ( | rpc::JsonContext & | context | ) |
Definition at line 11 of file PeerReservationsList.cpp.
| json::Value xrpl::doPeers | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::doLedgerAccept | ( | rpc::JsonContext & | context | ) |
Definition at line 15 of file LedgerAccept.cpp.
| json::Value xrpl::doStop | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::doChannelAuthorize | ( | rpc::JsonContext & | context | ) |
Definition at line 34 of file ChannelAuthorize.cpp.
| json::Value xrpl::doSign | ( | rpc::JsonContext & | context | ) |
Definition at line 18 of file xrpld/rpc/handlers/admin/signing/Sign.cpp.
| json::Value xrpl::doSignFor | ( | rpc::JsonContext & | context | ) |
Definition at line 19 of file SignFor.cpp.
| json::Value xrpl::doConsensusInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 10 of file ConsensusInfo.cpp.
| json::Value xrpl::doFetchInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 10 of file FetchInfo.cpp.
|
static |
Definition at line 21 of file GetCounts.cpp.
| json::Value xrpl::getCountsJson | ( | Application & | app, |
| int | minObjectCount ) |
Definition at line 46 of file GetCounts.cpp.
| json::Value xrpl::doGetCounts | ( | rpc::JsonContext & | context | ) |
Definition at line 114 of file GetCounts.cpp.
| json::Value xrpl::doPrint | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::doValidatorInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 15 of file ValidatorInfo.cpp.
| json::Value xrpl::doValidatorListSites | ( | rpc::JsonContext & | context | ) |
Definition at line 10 of file ValidatorListSites.cpp.
| json::Value xrpl::doValidators | ( | rpc::JsonContext & | context | ) |
Definition at line 10 of file Validators.cpp.
| json::Value xrpl::doUnlList | ( | rpc::JsonContext & | context | ) |
Definition at line 15 of file UnlList.cpp.
| json::Value xrpl::doChannelVerify | ( | rpc::JsonContext & | context | ) |
Definition at line 31 of file ChannelVerify.cpp.
| json::Value xrpl::doAMMInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 64 of file AMMInfo.cpp.
| json::Value xrpl::doBookOffers | ( | rpc::JsonContext & | context | ) |
Definition at line 158 of file BookOffers.cpp.
| json::Value xrpl::doBookChanges | ( | rpc::JsonContext & | context | ) |
Definition at line 14 of file BookChanges.cpp.
| json::Value xrpl::doDepositAuthorized | ( | rpc::JsonContext & | context | ) |
Definition at line 35 of file DepositAuthorized.cpp.
| json::Value xrpl::doFeature | ( | rpc::JsonContext & | context | ) |
Definition at line 21 of file xrpld/rpc/handlers/server_info/Feature.cpp.
| json::Value xrpl::doFee | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::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 154 of file GetAggregatePrice.cpp.
| json::Value xrpl::doLedgerClosed | ( | rpc::JsonContext & | context | ) |
Definition at line 13 of file LedgerClosed.cpp.
| json::Value xrpl::doLedgerCurrent | ( | rpc::JsonContext & | context | ) |
Definition at line 11 of file LedgerCurrent.cpp.
| json::Value xrpl::doLedgerData | ( | rpc::JsonContext & | context | ) |
Definition at line 39 of file LedgerData.cpp.
| json::Value xrpl::doLedgerEntry | ( | rpc::JsonContext & | context | ) |
Definition at line 869 of file LedgerEntry.cpp.
| json::Value xrpl::doLedgerHeader | ( | rpc::JsonContext & | context | ) |
Definition at line 21 of file xrpld/rpc/handlers/ledger/LedgerHeader.cpp.
| json::Value xrpl::doManifest | ( | rpc::JsonContext & | context | ) |
Definition at line 15 of file xrpld/rpc/handlers/server_info/Manifest.cpp.
| json::Value xrpl::doNFTBuyOffers | ( | rpc::JsonContext & | context | ) |
Definition at line 13 of file NFTBuyOffers.cpp.
| json::Value xrpl::doNFTSellOffers | ( | rpc::JsonContext & | context | ) |
Definition at line 13 of file NFTSellOffers.cpp.
| json::Value xrpl::doPathFind | ( | rpc::JsonContext & | context | ) |
Definition at line 16 of file PathFind.cpp.
| json::Value xrpl::doPause | ( | rpc::JsonContext & | ) |
| json::Value xrpl::doPing | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::doRandom | ( | rpc::JsonContext & | context | ) |
Definition at line 22 of file Random.cpp.
| json::Value xrpl::doResume | ( | rpc::JsonContext & | ) |
| json::Value xrpl::doRipplePathFind | ( | rpc::JsonContext & | context | ) |
Definition at line 24 of file RipplePathFind.cpp.
| json::Value xrpl::doServerDefinitions | ( | rpc::JsonContext & | context | ) |
Definition at line 384 of file ServerDefinitions.cpp.
| json::Value xrpl::doServerInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 12 of file ServerInfo.cpp.
| json::Value xrpl::doServerState | ( | rpc::JsonContext & | context | ) |
Definition at line 11 of file ServerState.cpp.
| json::Value xrpl::doSimulate | ( | rpc::JsonContext & | context | ) |
Definition at line 320 of file Simulate.cpp.
| json::Value xrpl::doSubmit | ( | rpc::JsonContext & | context | ) |
Definition at line 45 of file Submit.cpp.
| json::Value xrpl::doSubmitMultiSigned | ( | rpc::JsonContext & | context | ) |
Definition at line 16 of file SubmitMultiSigned.cpp.
| json::Value xrpl::doSubscribe | ( | rpc::JsonContext & | context | ) |
Definition at line 50 of file Subscribe.cpp.
| json::Value xrpl::doTransactionEntry | ( | rpc::JsonContext & | context | ) |
Definition at line 24 of file TransactionEntry.cpp.
| json::Value xrpl::doTxJson | ( | rpc::JsonContext & | context | ) |
| json::Value xrpl::doTxHistory | ( | rpc::JsonContext & | context | ) |
Definition at line 19 of file TxHistory.cpp.
| json::Value xrpl::doTxReduceRelay | ( | rpc::JsonContext & | context | ) |
Definition at line 10 of file TxReduceRelay.cpp.
| json::Value xrpl::doUnsubscribe | ( | rpc::JsonContext & | context | ) |
Definition at line 21 of file Unsubscribe.cpp.
| json::Value xrpl::doVaultInfo | ( | rpc::JsonContext & | context | ) |
Definition at line 66 of file VaultInfo.cpp.
|
static |
Definition at line 444 of file LedgerEntry.cpp.
|
static |
Definition at line 54 of file LedgerEntry.cpp.
|
static |
Definition at line 65 of file LedgerEntry.cpp.
|
static |
Definition at line 78 of file LedgerEntry.cpp.
|
static |
Definition at line 100 of file LedgerEntry.cpp.
|
static |
Definition at line 116 of file LedgerEntry.cpp.
|
static |
Definition at line 145 of file LedgerEntry.cpp.
|
static |
Definition at line 178 of file LedgerEntry.cpp.
|
static |
Definition at line 187 of file LedgerEntry.cpp.
|
static |
Definition at line 216 of file LedgerEntry.cpp.
|
static |
Definition at line 240 of file LedgerEntry.cpp.
|
static |
Definition at line 302 of file LedgerEntry.cpp.
|
static |
Definition at line 353 of file LedgerEntry.cpp.
|
static |
Definition at line 368 of file LedgerEntry.cpp.
|
static |
Definition at line 420 of file LedgerEntry.cpp.
|
static |
Definition at line 463 of file LedgerEntry.cpp.
|
static |
Definition at line 483 of file LedgerEntry.cpp.
|
static |
Definition at line 505 of file LedgerEntry.cpp.
|
static |
Definition at line 528 of file LedgerEntry.cpp.
|
static |
Definition at line 552 of file LedgerEntry.cpp.
|
static |
Definition at line 568 of file LedgerEntry.cpp.
|
static |
Definition at line 577 of file LedgerEntry.cpp.
|
static |
Definition at line 588 of file LedgerEntry.cpp.
|
static |
Definition at line 612 of file LedgerEntry.cpp.
|
static |
Definition at line 636 of file LedgerEntry.cpp.
|
static |
Definition at line 645 of file LedgerEntry.cpp.
|
static |
Definition at line 675 of file LedgerEntry.cpp.
|
static |
Definition at line 724 of file LedgerEntry.cpp.
|
static |
Definition at line 733 of file LedgerEntry.cpp.
|
static |
Definition at line 755 of file LedgerEntry.cpp.
|
static |
Definition at line 780 of file LedgerEntry.cpp.
|
static |
Definition at line 803 of file LedgerEntry.cpp.
|
static |
Definition at line 829 of file LedgerEntry.cpp.
| std::expected< Asset, ErrorCodeI > xrpl::getAsset | ( | json::Value const & | v, |
| beast::Journal | j ) |
Definition at line 39 of file AMMInfo.cpp.
| std::string xrpl::toIso8601 | ( | NetClock::time_point | tp | ) |
Definition at line 53 of file AMMInfo.cpp.
| std::optional< json::Value > xrpl::validateTakerJSON | ( | json::Value const & | taker, |
| json::StaticString const & | name ) |
Definition at line 32 of file BookOffers.cpp.
| std::optional< json::Value > xrpl::parseTakerAssetJSON | ( | Asset & | asset, |
| json::Value const & | taker, | ||
| json::StaticString const & | name, | ||
| beast::Journal | j ) |
Definition at line 55 of file BookOffers.cpp.
| std::optional< json::Value > xrpl::parseTakerIssuerJSON | ( | Asset & | asset, |
| json::Value const & | taker, | ||
| json::StaticString const & | name, | ||
| beast::Journal | j ) |
Definition at line 94 of file BookOffers.cpp.
|
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 52 of file GetAggregatePrice.cpp.
|
static |
Definition at line 127 of file GetAggregatePrice.cpp.
| void xrpl::appendNftOfferJson | ( | Application const & | app, |
| SLE::const_ref | offer, | ||
| json::Value & | offers ) |
Definition at line 30 of file NFTOffersHelpers.h.
| json::Value xrpl::enumerateNFTOffers | ( | rpc::JsonContext & | context, |
| uint256 const & | nftId, | ||
| Keylet const & | directory ) |
Definition at line 55 of file NFTOffersHelpers.h.
| json::Value const & xrpl::getServerDefinitionsJson | ( | ) |
Definition at line 378 of file ServerDefinitions.cpp.
|
static |
Definition at line 47 of file Simulate.cpp.
|
static |
Definition at line 80 of file Simulate.cpp.
|
static |
Definition at line 136 of file Simulate.cpp.
|
static |
Definition at line 186 of file Simulate.cpp.
|
static |
Definition at line 245 of file Simulate.cpp.
|
static |
Definition at line 30 of file Submit.cpp.
|
static |
| std::pair< TxResult, rpc::Status > xrpl::doTxHelp | ( | rpc::Context & | context, |
| TxArgs | args ) |
| json::Value xrpl::populateJsonResponse | ( | std::pair< TxResult, rpc::Status > const & | res, |
| TxArgs const & | args, | ||
| rpc::JsonContext const & | context ) |
|
static |
Definition at line 20 of file VaultInfo.cpp.
Definition at line 39 of file ServerHandler.h.
|
staticconstexpr |
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)
|
constexpr |
|
constexpr |
|
constexpr |
| Number const xrpl::kAMMInvariantRelativeTolerance {1, -11} |
Definition at line 54 of file AMMHelpers.h.
|
staticconstexpr |
Definition at line 61 of file LendingHelpers.h.
|
constexpr |
Definition at line 12 of file OracleHelpers.h.
|
constexpr |
Definition at line 13 of file OracleHelpers.h.
|
constexpr |
Definition at line 14 of file OracleHelpers.h.
| CreateGenesisT const xrpl::kCreateGenesis {} |
Definition at line 49 of file libxrpl/ledger/Ledger.cpp.
|
constexpr |
Possible ledger close time resolutions.
Values should not be duplicated.
Definition at line 17 of file LedgerTiming.h.
|
constexpr |
Initial resolution of ledger close time.
Definition at line 28 of file LedgerTiming.h.
|
constexpr |
Close time resolution in genesis ledger.
Definition at line 33 of file LedgerTiming.h.
|
constexpr |
How often we increase the close time resolution (in numbers of ledgers).
Definition at line 38 of file LedgerTiming.h.
|
constexpr |
How often we decrease the close time resolution (in numbers of ledgers).
Definition at line 43 of file LedgerTiming.h.
| struct xrpl::OpenLedgerT xrpl::kOpenLedger |
| struct xrpl::BatchViewT xrpl::kBatchView |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
Definition at line 11 of file protocol/Fees.h.
| std::array< KeyletDesc< AccountID const & >, 6 > const xrpl::kDirectAccountKeylets |
Definition at line 39 of file Indexes.cpp.
|
constexpr |
Definition at line 287 of file LedgerFormats.h.
|
constexpr |
Definition at line 288 of file LedgerFormats.h.
|
constexpr |
Definition at line 289 of file LedgerFormats.h.
|
constexpr |
Definition at line 290 of file LedgerFormats.h.
|
constexpr |
Definition at line 291 of file LedgerFormats.h.
|
constexpr |
Definition at line 292 of file LedgerFormats.h.
|
constexpr |
Definition at line 293 of file LedgerFormats.h.
|
constexpr |
Definition at line 294 of file LedgerFormats.h.
|
constexpr |
Definition at line 295 of file LedgerFormats.h.
|
static |
Definition at line 61 of file LedgerHeader.h.
|
constexpr |
Definition at line 62 of file PathAsset.h.
|
constexpr |
Definition at line 65 of file PathAsset.h.
|
constexpr |
Protocol specific constants.
This information is, implicitly, part of the protocol.
Definition at line 32 of file Protocol.h.
|
constexpr |
Largest legal byte size of a transaction.
Definition at line 37 of file Protocol.h.
|
constexpr |
The maximum number of unfunded offers to delete at once.
Definition at line 42 of file Protocol.h.
|
constexpr |
The maximum number of expired offers to delete at once.
Definition at line 47 of file Protocol.h.
|
constexpr |
The maximum number of metadata entries allowed in one transaction.
Definition at line 52 of file Protocol.h.
|
constexpr |
The maximum number of entries per directory page.
Definition at line 57 of file Protocol.h.
|
constexpr |
The maximum number of pages allowed in a directory.
Made obsolete by fixDirectoryLimit amendment.
Definition at line 64 of file Protocol.h.
|
constexpr |
The maximum number of items in an NFT page.
Definition at line 69 of file Protocol.h.
|
constexpr |
The maximum number of owner directory entries for account to be deletable.
Definition at line 74 of file Protocol.h.
|
constexpr |
The maximum number of token offers that can be canceled at once.
Definition at line 79 of file Protocol.h.
|
constexpr |
The maximum number of offers in an offer directory for NFT to be burnable.
Definition at line 84 of file Protocol.h.
|
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 96 of file Protocol.h.
|
constexpr |
The maximum length of a URI inside an NFT.
Definition at line 245 of file Protocol.h.
|
constexpr |
The maximum length of a Data element inside a DID.
Definition at line 250 of file Protocol.h.
|
constexpr |
The maximum length of a URI inside a DID.
Definition at line 255 of file Protocol.h.
|
constexpr |
The maximum length of an Attestation inside a DID.
Definition at line 260 of file Protocol.h.
|
constexpr |
The maximum length of a domain.
Definition at line 265 of file Protocol.h.
|
constexpr |
The maximum length of a URI inside a Credential.
Definition at line 270 of file Protocol.h.
|
constexpr |
The maximum length of a CredentialType inside a Credential.
Definition at line 275 of file Protocol.h.
|
constexpr |
The maximum number of credentials can be passed in array.
Definition at line 280 of file Protocol.h.
|
constexpr |
The maximum number of credentials can be passed in array for permissioned domain.
Definition at line 286 of file Protocol.h.
|
constexpr |
The maximum length of MPTokenMetadata.
Definition at line 291 of file Protocol.h.
|
constexpr |
The maximum amount of MPTokenIssuance.
Definition at line 296 of file Protocol.h.
|
constexpr |
The maximum length of Data payload.
Definition at line 302 of file Protocol.h.
|
constexpr |
Vault withdrawal policies.
Definition at line 307 of file Protocol.h.
|
constexpr |
Default IOU scale factor for a Vault.
Definition at line 312 of file Protocol.h.
|
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 318 of file Protocol.h.
|
constexpr |
Bounds on the length of a closed-ended vault's Investment phase (RedemptionDate - SubscriptionDate).
At vault creation the gap must satisfy kMinInvestmentPeriod <= gap < kMaxInvestmentPeriod.
Definition at line 356 of file Protocol.h.
|
constexpr |
Definition at line 359 of file Protocol.h.
|
constexpr |
Maximum recursion depth for vault shares being put as an asset inside another vault; counted from 0.
Definition at line 365 of file Protocol.h.
|
constexpr |
Definition at line 372 of file Protocol.h.
|
constexpr |
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
Definition at line 397 of file Protocol.h.
|
constexpr |
The maximum length of a URI inside an Oracle.
Definition at line 402 of file Protocol.h.
|
constexpr |
The maximum length of a Provider inside an Oracle.
Definition at line 407 of file Protocol.h.
|
constexpr |
The maximum size of a data series array inside an Oracle.
Definition at line 412 of file Protocol.h.
|
constexpr |
The maximum length of a SymbolClass inside an Oracle.
Definition at line 417 of file Protocol.h.
|
constexpr |
The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
Definition at line 423 of file Protocol.h.
|
constexpr |
The maximum price scaling factor.
Definition at line 428 of file Protocol.h.
|
constexpr |
The maximum percentage of outliers to trim.
Definition at line 433 of file Protocol.h.
|
constexpr |
The maximum number of delegate permissions an account can grant.
Definition at line 438 of file Protocol.h.
|
constexpr |
The maximum number of transactions that can be in a batch.
Definition at line 443 of file Protocol.h.
|
constexpr |
The maximum number of batch signers.
Definition at line 448 of file Protocol.h.
|
constexpr |
Length of a secp256k1 scalar in bytes.
Definition at line 453 of file Protocol.h.
|
constexpr |
Length of EC point (compressed).
Definition at line 458 of file Protocol.h.
|
constexpr |
Length of one compressed EC point component in an EC ElGamal ciphertext.
Definition at line 463 of file Protocol.h.
|
constexpr |
EC ElGamal ciphertext length: two compressed EC points concatenated.
Definition at line 468 of file Protocol.h.
|
constexpr |
Length of EC public key (compressed).
Definition at line 473 of file Protocol.h.
|
constexpr |
Length of EC private key in bytes.
Definition at line 478 of file Protocol.h.
|
constexpr |
Length of the EC blinding factor in bytes.
Definition at line 483 of file Protocol.h.
|
constexpr |
Length of Schnorr ZKProof for public key registration (compact form) in bytes.
Definition at line 488 of file Protocol.h.
|
constexpr |
Length of Pedersen Commitment (compressed).
Definition at line 493 of file Protocol.h.
|
constexpr |
Length of single bulletproof (range proof for 1 commitment) in bytes.
Definition at line 498 of file Protocol.h.
|
constexpr |
Length of double bulletproof (range proof for 2 commitments) in bytes.
Definition at line 503 of file Protocol.h.
|
constexpr |
Length of the compact sigma proof component for ConfidentialMPTSend.
Definition at line 508 of file Protocol.h.
|
constexpr |
192 bytes compact sigma proof + 754 bytes double bulletproof.
Definition at line 513 of file Protocol.h.
|
constexpr |
Length of the compact sigma proof component for ConfidentialMPTConvertBack.
Definition at line 518 of file Protocol.h.
|
constexpr |
128 bytes compact sigma proof + 688 bytes single bulletproof.
Definition at line 523 of file Protocol.h.
|
constexpr |
Length of the ZKProof for ConfidentialMPTClawback.
Definition at line 529 of file Protocol.h.
|
constexpr |
Extra base fee multiplier charged to confidential MPT transactions.
Definition at line 534 of file Protocol.h.
|
constexpr |
Compressed EC point prefix for even y-coordinate.
Definition at line 539 of file Protocol.h.
|
constexpr |
Compressed EC point prefix for odd y-coordinate.
Definition at line 544 of file Protocol.h.
| Rate const xrpl::kParityRate(QUALITY_ONE) |
A transfer rate signifying a 1:1 exchange.
|
static |
|
constexpr |
Maximum JSON object nesting depth permitted during parsing.
Definition at line 15 of file STParsedJSON.h.
|
constexpr |
Maximum number of elements permitted in any JSON array field during parsing.
Requests exceeding this limit are rejected with an invalidParams error.
Definition at line 21 of file STParsedJSON.h.
|
constexpr |
Definition at line 34 of file STValidation.h.
|
constexpr |
Definition at line 37 of file STValidation.h.
|
constexpr |
Configure the native currency.
Number of drops in the genesis account.
Definition at line 31 of file SystemParameters.h.
|
staticconstexpr |
The XRP ledger network's earliest allowed sequence.
Definition at line 65 of file SystemParameters.h.
|
staticconstexpr |
The XRP Ledger mainnet's earliest ledger with a FeeSettings object.
Only used in asserts and tests.
Definition at line 71 of file SystemParameters.h.
|
constexpr |
The minimum amount of support an amendment should have.
Definition at line 76 of file SystemParameters.h.
|
constexpr |
The minimum amount of time an amendment must hold a majority.
Definition at line 81 of file SystemParameters.h.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Number of drops per 1 XRP.
Definition at line 254 of file XRPAmount.h.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Maximum number of subscriptions a single client connection may hold at once.
Applies to the account, real-time account, and account-history subscriptions tracked on one InfoSub (the sets counted by totalSubscriptionCount), bounding the disconnect-time cleanup of those sets. Book subscriptions are tracked separately (OrderBookDB) and are not counted here. Generous enough for legitimate power users such as block explorers.
|
constexpr |
Largest a valid manifest can be, in decoded bytes.
A manifest has a fixed set of fields. Each is serialized as a field header (1-2 bytes), an optional length prefix (1 byte for these sizes), and the field body. Taking every field at its largest gives the maximum below, so anything larger cannot be a valid manifest.
Field header + length + body = bytes
sfVersion (U16) 2 0 2 4
sfSequence (U32) 1 0 4 5
sfPublicKey (33) 1 1 33 35
sfSigningPubKey (33) 1 1 33 35
sfSignature (72) 1 1 72 74
sfMasterSignature (72) 2 1 72 75
sfDomain (128) 1 1 128 130
-----
358
Definition at line 191 of file Manifest.h.
|
constexpr |
Largest a valid manifest can be, in base64 characters.
base64 encodes 3 bytes as 4 characters, so this is the encoded form of kMaxManifestBytes. Callers that receive a base64 manifest should reject anything longer than this before decoding, to avoid allocating memory for an oversized input.
Definition at line 201 of file Manifest.h.
|
constexpr |
Default number of untrusted manifests to store in cache and allowed in one Manifest message.
Bounds unlisted validators two ways. In the cache, a manifest for a brand-new unlisted key is rejected once this many are held, so peer gossip cannot grow the cache without end. In a TMManifests message, this many are sent and processed, so a peer sending its whole cache cannot force unbounded work.
Operators can override this with [overlay] max_untrusted_count. Both users read the configured value and fall back to this default.
Definition at line 216 of file Manifest.h.
|
constexpr |
Default number of trusted manifests allowed in a Manifest message.
Not used atm while creating the message, but used to calculate the higher limit on received message size. Introduced to maintain consistency. Future implementation will use this limit.
Trusted manifests are never dropped: every one this node holds is sent, and every one received is processed, since dropping one would delay a validator key rotation. This count only sizes the largest message accepted, so it must stay above any realistic validator list. Cap can be increased in the config file if messages get rejected with actual trusted manifest count crossing configured(or else default) value. Operators can override this with [overlay] max_trusted_count.
Definition at line 232 of file Manifest.h.
|
staticconstexpr |
Definition at line 21 of file SHAMapTreeNode.h.
|
staticconstexpr |
Definition at line 22 of file SHAMapTreeNode.h.
|
staticconstexpr |
Definition at line 23 of file SHAMapTreeNode.h.
|
staticconstexpr |
Definition at line 24 of file SHAMapTreeNode.h.
|
staticconstexpr |
Definition at line 25 of file SHAMapTreeNode.h.
|
constexpr |
Definition at line 28 of file SHAMapTreeNode.h.
|
constexpr |
Definition at line 17 of file XChainBridge.h.
|
static |
Definition at line 36 of file libxrpl/net/HTTPClient.cpp.
|
static |
Definition at line 85 of file AccountID.cpp.
|
static |
Definition at line 471 of file libxrpl/protocol/Feature.cpp.
|
staticconstexpr |
Definition at line 22 of file libxrpl/protocol/IOUAmount.cpp.
|
staticconstexpr |
Definition at line 23 of file libxrpl/protocol/IOUAmount.cpp.
|
staticconstexpr |
Definition at line 25 of file libxrpl/protocol/IOUAmount.cpp.
|
staticconstexpr |
Definition at line 26 of file libxrpl/protocol/IOUAmount.cpp.
|
static |
Definition at line 22 of file SField.cpp.
| SField const xrpl::kSfHash(access, STI_UINT256, 257, "hash") | ( | access | , |
| STI_UINT256 | , | ||
| 257 | , | ||
| "hash" | ) |
| SField const xrpl::kSfIndex(access, STI_UINT256, 258, "index") | ( | access | , |
| STI_UINT256 | , | ||
| 258 | , | ||
| "index" | ) |
|
static |
Definition at line 52 of file STAmount.cpp.
|
static |
Definition at line 53 of file STAmount.cpp.
|
static |
Definition at line 54 of file STAmount.cpp.
|
staticconstexpr |
Definition at line 126 of file tokens.cpp.
|
staticconstexpr |
Definition at line 129 of file tokens.cpp.
| CheckpointersCollection xrpl::gCheckpointers |
Definition at line 61 of file DatabaseCon.cpp.
|
static |
Definition at line 34 of file SociDB.cpp.
|
static |
Definition at line 496 of file libxrpl/shamap/SHAMap.cpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
static |
Definition at line 41 of file SignerListSet.cpp.
|
constexpr |
Definition at line 42 of file EscrowFinish.cpp.
|
constexpr |
Definition at line 43 of file EscrowFinish.cpp.
|
staticconstexpr |
Definition at line 59 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 60 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 61 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 62 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 64 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 65 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 66 of file InboundLedger.cpp.
|
constexpr |
Definition at line 69 of file InboundLedger.cpp.
|
staticconstexpr |
Definition at line 32 of file InboundTransactions.cpp.
|
staticconstexpr |
Definition at line 33 of file InboundTransactions.cpp.
|
staticconstexpr |
Definition at line 85 of file LedgerMaster.cpp.
|
staticconstexpr |
Definition at line 88 of file LedgerMaster.cpp.
|
staticconstexpr |
Definition at line 91 of file LedgerMaster.cpp.
|
constexpr |
Definition at line 32 of file TransactionAcquire.cpp.
|
staticconstexpr |
Definition at line 34 of file TransactionAcquire.cpp.
|
staticconstexpr |
Definition at line 35 of file TransactionAcquire.cpp.
|
constexpr |
Definition at line 8 of file src/xrpld/app/main/Tuning.h.
|
constexpr |
Definition at line 9 of file src/xrpld/app/main/Tuning.h.
|
constexpr |
Definition at line 11 of file src/xrpld/app/main/Tuning.h.
|
constexpr |
Definition at line 46 of file ValidatorSite.cpp.
|
constexpr |
Definition at line 47 of file ValidatorSite.cpp.
|
constexpr |
Definition at line 48 of file ValidatorSite.cpp.
|
static |
Definition at line 1070 of file NetworkOPs.cpp.
|
static |
Definition at line 1082 of file NetworkOPs.cpp.
|
constexpr |
Definition at line 115 of file xrpld/core/detail/Config.cpp.
|
staticconstexpr |
Definition at line 125 of file Handshake.h.
|
staticconstexpr |
Definition at line 127 of file Handshake.h.
|
staticconstexpr |
Definition at line 129 of file Handshake.h.
|
staticconstexpr |
Definition at line 131 of file Handshake.h.
|
staticconstexpr |
Definition at line 132 of file Handshake.h.
|
staticconstexpr |
Definition at line 133 of file Handshake.h.
|
constexpr |
The list of protocol versions we speak and we prefer to use.
Definition at line 30 of file ProtocolVersion.cpp.
| std::unordered_map<protocol::MessageType, TrafficCount::Category> const xrpl::kTypeLookup |
Definition at line 11 of file TrafficCount.cpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Definition at line 595 of file ServerHandler.cpp.
|
constexpr |
Definition at line 596 of file ServerHandler.cpp.
|
constexpr |
Definition at line 597 of file ServerHandler.cpp.
|
constexpr |
Definition at line 598 of file ServerHandler.cpp.
| auto const xrpl::parseAmendments = fixed(keylet::amendments()) |
Definition at line 113 of file LedgerEntry.cpp.
| auto const xrpl::parseFeeSettings = fixed(keylet::feeSettings()) |
Definition at line 441 of file LedgerEntry.cpp.
| auto const xrpl::parseNegativeUNL = fixed(keylet::negativeUNL()) |
Definition at line 585 of file LedgerEntry.cpp.