xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::MPTTester Class Reference

Test helper for creating, mutating, and asserting MPT and confidential MPT ledger state. More...

#include <mpt.h>

Collaboration diagram for xrpl::test::jtx::MPTTester:

Public Types

enum class  EncryptedBalanceType { IssuerEncryptedBalance , HolderEncryptedInbox , HolderEncryptedSpending , AuditorEncryptedBalance }

Public Member Functions

 MPTTester (Env &env, Account issuer, MPTInit const &constr={}, std::source_location const &loc=std::source_location::current())
 MPTTester (MPTInitDef const &constr, std::source_location const &loc=std::source_location::current())
 MPTTester (Env &env, Account issuer, MPTID const &id, std::vector< Account > const &holders={}, bool close=true)
 operator MPT () const
void create (MPTCreate const &arg=MPTCreate{}, std::source_location const &loc=std::source_location::current())
void destroy (MPTDestroy const &arg=MPTDestroy{}, std::source_location const &loc=std::source_location::current())
void authorize (MPTAuthorize const &arg=MPTAuthorize{}, std::source_location const &loc=std::source_location::current())
void authorizeHolders (Holders const &holders, std::source_location const &loc=std::source_location::current())
void set (MPTSet const &set={}, std::source_location const &loc=std::source_location::current())
void convert (MPTConvert const &arg=MPTConvert{}, std::source_location const &loc=std::source_location::current())
json::Value convertJV (MPTConvert const &arg, std::uint32_t seq)
 Build a confidential convert JV without submitting it.
void mergeInbox (MPTMergeInbox const &arg=MPTMergeInbox{}, std::source_location const &loc=std::source_location::current())
json::Value mergeInboxJV (MPTMergeInbox const &arg=MPTMergeInbox{}) const
void send (MPTConfidentialSend const &arg=MPTConfidentialSend{}, std::source_location const &loc=std::source_location::current())
json::Value sendJV (MPTConfidentialSend const &arg, std::uint32_t seq, std::optional< ConfidentialSendChainState > chain=std::nullopt)
 Build a confidential send JV.
ConfidentialSendChainState chainAfterSend (Account const &sender, std::uint64_t sendAmt, json::Value const &jv) const
 Compute the projected sender state after a confidential send in a batch.
void convertBack (MPTConvertBack const &arg=MPTConvertBack{}, std::source_location const &loc=std::source_location::current())
json::Value convertBackJV (MPTConvertBack const &arg, std::uint32_t seq)
 Build a confidential convertBack JV without submitting it.
void confidentialClaw (MPTConfidentialClawback const &arg=MPTConfidentialClawback{}, std::source_location const &loc=std::source_location::current())
void mirrorUpdate (MPTMirrorUpdate const &arg=MPTMirrorUpdate{}, std::source_location const &loc=std::source_location::current())
void holderKeyUpdate (MPTHolderKeyUpdate const &arg=MPTHolderKeyUpdate{}, std::source_location const &loc=std::source_location::current())
bool checkDomainID (std::optional< UInt256 > expected) const
bool checkMPTokenAmount (Account const &holder, std::int64_t expectedAmount) const
bool checkMPTokenOutstandingAmount (std::int64_t expectedAmount) const
bool checkIssuanceConfidentialBalance (std::int64_t expectedAmount) const
bool checkFlags (uint32_t const expectedFlags, std::optional< Account > const &holder=std::nullopt) const
bool checkMetadata (std::string const &metadata) const
bool isMetadataPresent () const
bool checkTransferFee (std::uint16_t transferFee) const
bool isTransferFeePresent () const
bool checkImmutableFlags (std::uint32_t expectedFlags) const
bool checkKeyEpochs (std::optional< std::uint32_t > issuerKeyEpoch, std::optional< std::uint32_t > auditorKeyEpoch) const
bool checkMirrorEpochs (Account const &holder, std::optional< std::uint32_t > issuerKeyMirrorEpoch, std::optional< std::uint32_t > auditorKeyMirrorEpoch) const
bool checkEncryptionKeys (std::optional< Account > const &issuerKeyOwner, std::optional< Account > const &auditorKeyOwner) const
Account const & issuer () const
Account const & holder (std::string const &h) const
void pay (Account const &src, Account const &dest, std::int64_t amount, std::optional< TER > err=std::nullopt, std::optional< std::vector< std::string > > credentials=std::nullopt, std::source_location const &loc=std::source_location::current())
void claw (Account const &issuer, Account const &holder, std::int64_t amount, std::optional< TER > err=std::nullopt, std::source_location const &loc=std::source_location::current())
PrettyAmount mpt (std::int64_t amount) const
MPTID const & issuanceID () const
std::int64_t getBalance (Account const &account) const
std::int64_t getIssuanceConfidentialBalance () const
std::optional< Buffer > getEncryptedBalance (Account const &account, EncryptedBalanceType option=holderEncryptedInbox) const
MPT operator[] (std::string const &name) const
PrettyAmount operator() (std::int64_t amount) const
 operator Asset () const
std::uint32_t generateKeyPair (Account const &account)
std::optional< Buffer > getPubKey (Account const &account, std::optional< std::uint32_t > epoch=std::nullopt) const
std::optional< Buffer > getPrivKey (Account const &account, std::optional< std::uint32_t > epoch=std::nullopt) const
Buffer encryptAmount (Account const &account, uint64_t const amt, Buffer const &blindingFactor) const
std::optional< uint64_t > decryptAmount (Account const &account, Buffer const &amt, std::optional< std::uint32_t > epoch=std::nullopt) const
std::optional< uint64_t > getDecryptedBalance (Account const &account, EncryptedBalanceType balanceType) const
std::optional< std::int64_t > getIssuanceOutstandingBalance () const
std::optional< Buffer > getClawbackProof (Account const &holder, std::uint64_t amount, Buffer const &privateKey, UInt256 const &txHash) const
std::optional< Buffer > getSchnorrProof (Account const &account, UInt256 const &ctxHash) const
std::optional< Buffer > getConfidentialSendProof (Account const &sender, std::uint64_t const amount, std::vector< ConfidentialRecipient > const &recipients, Slice const &blindingFactor, UInt256 const &contextHash, PedersenProofParams const &amountParams, PedersenProofParams const &balanceParams) const
std::optional< Buffer > getConvertBackProof (Account const &holder, std::uint64_t const amount, UInt256 const &contextHash, PedersenProofParams const &pcParams) const
std::uint32_t getMPTokenVersion (Account const account) const

Static Public Member Functions

static json::Value createJV (MPTCreate const &arg=MPTCreate{})
static json::Value destroyJV (MPTDestroy const &arg=MPTDestroy{})
static json::Value authorizeJV (MPTAuthorize const &arg=MPTAuthorize{})
static json::Value setJV (MPTSet const &set={})
static Buffer getPedersenCommitment (std::uint64_t const amount, Buffer const &pedersenBlindingFactor)

Static Public Attributes

static constexpr auto issuerEncryptedBalance = EncryptedBalanceType::IssuerEncryptedBalance
static constexpr auto holderEncryptedInbox = EncryptedBalanceType::HolderEncryptedInbox
static constexpr auto holderEncryptedSpending = EncryptedBalanceType::HolderEncryptedSpending
static constexpr auto auditorEncryptedBalance = EncryptedBalanceType::AuditorEncryptedBalance

Private Types

using SLEP = SLE::const_pointer

Private Member Functions

bool forObject (std::function< bool(SLEP const &sle)> const &cb, std::optional< Account > const &holder=std::nullopt) const
std::optional< std::uint32_t > getMirrorEpoch (Account const &holder, SF_UINT32 const &field) const
template<typename A>
TER submit (A const &arg, WithSourceLocation< json::Value > jv)
std::uint32_t getFlags (std::optional< Account > const &holder) const
void setIssuanceIdField (json::Value &jv, std::optional< MPTID > const &id) const
 Sets sfMPTokenIssuanceID on jv, falling back to id_ if arg's id is not set.
std::uint32_t ticketOrSeq (std::optional< std::uint32_t > const &ticketSeq, std::optional< Account > const &account) const
template<typename T>
void fillConversionCiphertexts (T const &arg, json::Value &jv, Account const &account, std::uint64_t const amount) const

Static Private Member Functions

static std::unordered_map< std::string, Account > makeHolders (std::vector< Account > const &holders)

Private Attributes

Env & env_
Account const issuer_
std::unordered_map< std::string, Account > const holders_
std::optional< Account > const auditor_
std::optional< MPTID > id_
bool close_
std::unordered_map< AccountID, std::vector< Buffer > > pubKeys_
std::unordered_map< AccountID, std::vector< Buffer > > privKeys_

Friends

BookSpec operator~ (MPTTester const &mpt)

Detailed Description

Test helper for creating, mutating, and asserting MPT and confidential MPT ledger state.

Definition at line 511 of file mpt.h.

Member Typedef Documentation

◆ SLEP

Definition at line 865 of file mpt.h.

Member Enumeration Documentation

◆ EncryptedBalanceType

Enumerator
IssuerEncryptedBalance 
HolderEncryptedInbox 
HolderEncryptedSpending 
AuditorEncryptedBalance 

Definition at line 525 of file mpt.h.

Constructor & Destructor Documentation

◆ MPTTester() [1/3]

xrpl::test::jtx::MPTTester::MPTTester ( Env & env,
Account issuer,
MPTInit const & constr = {},
std::source_location const & loc = std::source_location::current() )

Definition at line 229 of file mpt.cpp.

◆ MPTTester() [2/3]

xrpl::test::jtx::MPTTester::MPTTester ( MPTInitDef const & constr,
std::source_location const & loc = std::source_location::current() )

Definition at line 296 of file mpt.cpp.

◆ MPTTester() [3/3]

xrpl::test::jtx::MPTTester::MPTTester ( Env & env,
Account issuer,
MPTID const & id,
std::vector< Account > const & holders = {},
bool close = true )

Definition at line 264 of file mpt.cpp.

Member Function Documentation

◆ operator MPT()

xrpl::test::jtx::MPTTester::operator MPT ( ) const

Definition at line 310 of file mpt.cpp.

◆ create()

void xrpl::test::jtx::MPTTester::create ( MPTCreate const & arg = MPTCreate{},
std::source_location const & loc = std::source_location::current() )

Definition at line 343 of file mpt.cpp.

◆ createJV()

json::Value xrpl::test::jtx::MPTTester::createJV ( MPTCreate const & arg = MPTCreate{})
static

Definition at line 319 of file mpt.cpp.

◆ destroy()

void xrpl::test::jtx::MPTTester::destroy ( MPTDestroy const & arg = MPTDestroy{},
std::source_location const & loc = std::source_location::current() )

Definition at line 421 of file mpt.cpp.

◆ destroyJV()

json::Value xrpl::test::jtx::MPTTester::destroyJV ( MPTDestroy const & arg = MPTDestroy{})
static

Definition at line 408 of file mpt.cpp.

◆ authorize()

void xrpl::test::jtx::MPTTester::authorize ( MPTAuthorize const & arg = MPTAuthorize{},
std::source_location const & loc = std::source_location::current() )

Definition at line 455 of file mpt.cpp.

◆ authorizeJV()

json::Value xrpl::test::jtx::MPTTester::authorizeJV ( MPTAuthorize const & arg = MPTAuthorize{})
static

Definition at line 440 of file mpt.cpp.

◆ authorizeHolders()

void xrpl::test::jtx::MPTTester::authorizeHolders ( Holders const & holders,
std::source_location const & loc = std::source_location::current() )

Definition at line 525 of file mpt.cpp.

◆ set()

void xrpl::test::jtx::MPTTester::set ( MPTSet const & set = {},
std::source_location const & loc = std::source_location::current() )

Definition at line 577 of file mpt.cpp.

◆ setJV()

json::Value xrpl::test::jtx::MPTTester::setJV ( MPTSet const & set = {})
static

Definition at line 534 of file mpt.cpp.

◆ convert()

void xrpl::test::jtx::MPTTester::convert ( MPTConvert const & arg = MPTConvert{},
std::source_location const & loc = std::source_location::current() )

Definition at line 1266 of file mpt.cpp.

◆ convertJV()

json::Value xrpl::test::jtx::MPTTester::convertJV ( MPTConvert const & arg,
std::uint32_t seq )

Build a confidential convert JV without submitting it.

Parameters
argTransaction builder arguments.
seqInner transaction sequence used in the Schnorr proof context hash.
Returns
The transaction JSON object.

Definition at line 1403 of file mpt.cpp.

◆ mergeInbox()

void xrpl::test::jtx::MPTTester::mergeInbox ( MPTMergeInbox const & arg = MPTMergeInbox{},
std::source_location const & loc = std::source_location::current() )

Definition at line 2004 of file mpt.cpp.

◆ mergeInboxJV()

json::Value xrpl::test::jtx::MPTTester::mergeInboxJV ( MPTMergeInbox const & arg = MPTMergeInbox{}) const
nodiscard

Definition at line 1994 of file mpt.cpp.

◆ send()

void xrpl::test::jtx::MPTTester::send ( MPTConfidentialSend const & arg = MPTConfidentialSend{},
std::source_location const & loc = std::source_location::current() )

Definition at line 1432 of file mpt.cpp.

◆ sendJV()

json::Value xrpl::test::jtx::MPTTester::sendJV ( MPTConfidentialSend const & arg,
std::uint32_t seq,
std::optional< ConfidentialSendChainState > chain = std::nullopt )

Build a confidential send JV.

When chain is provided, the sender's proof parameters are taken from it instead of the ledger, enabling proof generation for a second or later send from the same account inside a single batch.

Parameters
argTransaction builder arguments.
seqInner transaction sequence used in the proof context hash.
chainOptional predicted sender state from a previous batched send.
Returns
The transaction JSON object.

Definition at line 1574 of file mpt.cpp.

◆ chainAfterSend()

ConfidentialSendChainState xrpl::test::jtx::MPTTester::chainAfterSend ( Account const & sender,
std::uint64_t sendAmt,
json::Value const & jv ) const
nodiscard

Compute the projected sender state after a confidential send in a batch.

Each confidential send requires a ZK proof that the sender's spending balance covers the transfer. In a batch, the second and later sends from the same sender need proofs built against the updated spending balance.

Parameters
senderThe sender whose post-send state is being predicted.
sendAmtThe plaintext amount sent by the transaction.
jvThe confidential send transaction JSON object.
Returns
The predicted sender state after applying the send.

Definition at line 1760 of file mpt.cpp.

◆ convertBack()

void xrpl::test::jtx::MPTTester::convertBack ( MPTConvertBack const & arg = MPTConvertBack{},
std::source_location const & loc = std::source_location::current() )

Definition at line 2113 of file mpt.cpp.

◆ convertBackJV()

json::Value xrpl::test::jtx::MPTTester::convertBackJV ( MPTConvertBack const & arg,
std::uint32_t seq )

Build a confidential convertBack JV without submitting it.

Reads the current encrypted spending balance and version from the ledger, so call this before the batch is submitted.

Parameters
argTransaction builder arguments.
seqInner transaction sequence used in the proof context hash.
Returns
The transaction JSON object.

Definition at line 2203 of file mpt.cpp.

◆ confidentialClaw()

void xrpl::test::jtx::MPTTester::confidentialClaw ( MPTConfidentialClawback const & arg = MPTConfidentialClawback{},
std::source_location const & loc = std::source_location::current() )

Definition at line 1800 of file mpt.cpp.

◆ mirrorUpdate()

void xrpl::test::jtx::MPTTester::mirrorUpdate ( MPTMirrorUpdate const & arg = MPTMirrorUpdate{},
std::source_location const & loc = std::source_location::current() )

Definition at line 2266 of file mpt.cpp.

◆ holderKeyUpdate()

void xrpl::test::jtx::MPTTester::holderKeyUpdate ( MPTHolderKeyUpdate const & arg = MPTHolderKeyUpdate{},
std::source_location const & loc = std::source_location::current() )

Definition at line 2295 of file mpt.cpp.

◆ checkDomainID()

bool xrpl::test::jtx::MPTTester::checkDomainID ( std::optional< UInt256 > expected) const
nodiscard

Definition at line 687 of file mpt.cpp.

◆ checkMPTokenAmount()

bool xrpl::test::jtx::MPTTester::checkMPTokenAmount ( Account const & holder,
std::int64_t expectedAmount ) const
nodiscard

Definition at line 697 of file mpt.cpp.

◆ checkMPTokenOutstandingAmount()

bool xrpl::test::jtx::MPTTester::checkMPTokenOutstandingAmount ( std::int64_t expectedAmount) const
nodiscard

Definition at line 704 of file mpt.cpp.

◆ checkIssuanceConfidentialBalance()

bool xrpl::test::jtx::MPTTester::checkIssuanceConfidentialBalance ( std::int64_t expectedAmount) const
nodiscard

Definition at line 711 of file mpt.cpp.

◆ checkFlags()

bool xrpl::test::jtx::MPTTester::checkFlags ( uint32_t const expectedFlags,
std::optional< Account > const & holder = std::nullopt ) const
nodiscard

Definition at line 719 of file mpt.cpp.

◆ checkMetadata()

bool xrpl::test::jtx::MPTTester::checkMetadata ( std::string const & metadata) const
nodiscard

Definition at line 725 of file mpt.cpp.

◆ isMetadataPresent()

bool xrpl::test::jtx::MPTTester::isMetadataPresent ( ) const
nodiscard

Definition at line 735 of file mpt.cpp.

◆ checkTransferFee()

bool xrpl::test::jtx::MPTTester::checkTransferFee ( std::uint16_t transferFee) const
nodiscard

Definition at line 742 of file mpt.cpp.

◆ isTransferFeePresent()

bool xrpl::test::jtx::MPTTester::isTransferFeePresent ( ) const
nodiscard

Definition at line 752 of file mpt.cpp.

◆ checkImmutableFlags()

bool xrpl::test::jtx::MPTTester::checkImmutableFlags ( std::uint32_t expectedFlags) const
nodiscard

Definition at line 758 of file mpt.cpp.

◆ checkKeyEpochs()

bool xrpl::test::jtx::MPTTester::checkKeyEpochs ( std::optional< std::uint32_t > issuerKeyEpoch,
std::optional< std::uint32_t > auditorKeyEpoch ) const
nodiscard

Definition at line 767 of file mpt.cpp.

◆ checkMirrorEpochs()

bool xrpl::test::jtx::MPTTester::checkMirrorEpochs ( Account const & holder,
std::optional< std::uint32_t > issuerKeyMirrorEpoch,
std::optional< std::uint32_t > auditorKeyMirrorEpoch ) const
nodiscard

Definition at line 778 of file mpt.cpp.

◆ checkEncryptionKeys()

bool xrpl::test::jtx::MPTTester::checkEncryptionKeys ( std::optional< Account > const & issuerKeyOwner,
std::optional< Account > const & auditorKeyOwner ) const
nodiscard

Definition at line 805 of file mpt.cpp.

◆ issuer()

Account const & xrpl::test::jtx::MPTTester::issuer ( ) const
nodiscard

Definition at line 741 of file mpt.h.

◆ holder()

Account const & xrpl::test::jtx::MPTTester::holder ( std::string const & h) const
nodiscard

Definition at line 431 of file mpt.cpp.

◆ pay()

void xrpl::test::jtx::MPTTester::pay ( Account const & src,
Account const & dest,
std::int64_t amount,
std::optional< TER > err = std::nullopt,
std::optional< std::vector< std::string > > credentials = std::nullopt,
std::source_location const & loc = std::source_location::current() )

Definition at line 826 of file mpt.cpp.

◆ claw()

void xrpl::test::jtx::MPTTester::claw ( Account const & issuer,
Account const & holder,
std::int64_t amount,
std::optional< TER > err = std::nullopt,
std::source_location const & loc = std::source_location::current() )

Definition at line 881 of file mpt.cpp.

◆ mpt()

PrettyAmount xrpl::test::jtx::MPTTester::mpt ( std::int64_t amount) const
nodiscard

Definition at line 905 of file mpt.cpp.

◆ issuanceID()

MPTID const & xrpl::test::jtx::MPTTester::issuanceID ( ) const
nodiscard

Definition at line 768 of file mpt.h.

◆ getBalance()

std::int64_t xrpl::test::jtx::MPTTester::getBalance ( Account const & account) const
nodiscard

Definition at line 921 of file mpt.cpp.

◆ getIssuanceConfidentialBalance()

std::int64_t xrpl::test::jtx::MPTTester::getIssuanceConfidentialBalance ( ) const
nodiscard

Definition at line 939 of file mpt.cpp.

◆ getEncryptedBalance()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getEncryptedBalance ( Account const & account,
EncryptedBalanceType option = holderEncryptedInbox ) const
nodiscard

Definition at line 1136 of file mpt.cpp.

◆ operator[]()

MPT xrpl::test::jtx::MPTTester::operator[] ( std::string const & name) const

Definition at line 1211 of file mpt.cpp.

◆ operator()()

PrettyAmount xrpl::test::jtx::MPTTester::operator() ( std::int64_t amount) const

Definition at line 1217 of file mpt.cpp.

◆ operator Asset()

xrpl::test::jtx::MPTTester::operator Asset ( ) const

Definition at line 912 of file mpt.cpp.

◆ generateKeyPair()

std::uint32_t xrpl::test::jtx::MPTTester::generateKeyPair ( Account const & account)

Definition at line 1877 of file mpt.cpp.

◆ getPubKey()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getPubKey ( Account const & account,
std::optional< std::uint32_t > epoch = std::nullopt ) const
nodiscard

Definition at line 1902 of file mpt.cpp.

◆ getPrivKey()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getPrivKey ( Account const & account,
std::optional< std::uint32_t > epoch = std::nullopt ) const
nodiscard

Definition at line 1908 of file mpt.cpp.

◆ encryptAmount()

Buffer xrpl::test::jtx::MPTTester::encryptAmount ( Account const & account,
uint64_t const amt,
Buffer const & blindingFactor ) const
nodiscard

Definition at line 1914 of file mpt.cpp.

◆ decryptAmount()

std::optional< uint64_t > xrpl::test::jtx::MPTTester::decryptAmount ( Account const & account,
Buffer const & amt,
std::optional< std::uint32_t > epoch = std::nullopt ) const
nodiscard

Definition at line 1929 of file mpt.cpp.

◆ getDecryptedBalance()

std::optional< uint64_t > xrpl::test::jtx::MPTTester::getDecryptedBalance ( Account const & account,
EncryptedBalanceType balanceType ) const
nodiscard

Definition at line 1962 of file mpt.cpp.

◆ getIssuanceOutstandingBalance()

std::optional< std::int64_t > xrpl::test::jtx::MPTTester::getIssuanceOutstandingBalance ( ) const
nodiscard

Definition at line 2083 of file mpt.cpp.

◆ getClawbackProof()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getClawbackProof ( Account const & holder,
std::uint64_t amount,
Buffer const & privateKey,
UInt256 const & txHash ) const
nodiscard

Definition at line 951 of file mpt.cpp.

◆ getSchnorrProof()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getSchnorrProof ( Account const & account,
UInt256 const & ctxHash ) const
nodiscard

Definition at line 991 of file mpt.cpp.

◆ getConfidentialSendProof()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getConfidentialSendProof ( Account const & sender,
std::uint64_t const amount,
std::vector< ConfidentialRecipient > const & recipients,
Slice const & blindingFactor,
UInt256 const & contextHash,
PedersenProofParams const & amountParams,
PedersenProofParams const & balanceParams ) const
nodiscard

Definition at line 1014 of file mpt.cpp.

◆ getConvertBackProof()

std::optional< Buffer > xrpl::test::jtx::MPTTester::getConvertBackProof ( Account const & holder,
std::uint64_t const amount,
UInt256 const & contextHash,
PedersenProofParams const & pcParams ) const
nodiscard

Definition at line 1101 of file mpt.cpp.

◆ getMPTokenVersion()

std::uint32_t xrpl::test::jtx::MPTTester::getMPTokenVersion ( Account const account) const
nodiscard

Definition at line 2097 of file mpt.cpp.

◆ getPedersenCommitment()

Buffer xrpl::test::jtx::MPTTester::getPedersenCommitment ( std::uint64_t const amount,
Buffer const & pedersenBlindingFactor )
static

Definition at line 1075 of file mpt.cpp.

◆ forObject()

bool xrpl::test::jtx::MPTTester::forObject ( std::function< bool(SLEP const &sle)> const & cb,
std::optional< Account > const & holder = std::nullopt ) const
private

Definition at line 674 of file mpt.cpp.

◆ getMirrorEpoch()

std::optional< std::uint32_t > xrpl::test::jtx::MPTTester::getMirrorEpoch ( Account const & holder,
SF_UINT32 const & field ) const
nodiscardprivate

Definition at line 792 of file mpt.cpp.

◆ submit()

template<typename A>
TER xrpl::test::jtx::MPTTester::submit ( A const & arg,
WithSourceLocation< json::Value > jv )
private

Definition at line 877 of file mpt.h.

◆ makeHolders()

std::unordered_map< std::string, Account > xrpl::test::jtx::MPTTester::makeHolders ( std::vector< Account > const & holders)
staticprivate

Definition at line 217 of file mpt.cpp.

◆ getFlags()

std::uint32_t xrpl::test::jtx::MPTTester::getFlags ( std::optional< Account > const & holder) const
nodiscardprivate

Definition at line 1170 of file mpt.cpp.

◆ setIssuanceIdField()

void xrpl::test::jtx::MPTTester::setIssuanceIdField ( json::Value & jv,
std::optional< MPTID > const & id ) const
private

Sets sfMPTokenIssuanceID on jv, falling back to id_ if arg's id is not set.

Parameters
jvThe JSON object to set the field on.
idThe explicit issuance ID override from the caller, if any.

Definition at line 1184 of file mpt.cpp.

◆ ticketOrSeq()

std::uint32_t xrpl::test::jtx::MPTTester::ticketOrSeq ( std::optional< std::uint32_t > const & ticketSeq,
std::optional< Account > const & account ) const
nodiscardprivate

Definition at line 1201 of file mpt.cpp.

◆ fillConversionCiphertexts()

template<typename T>
void xrpl::test::jtx::MPTTester::fillConversionCiphertexts ( T const & arg,
json::Value & jv,
Account const & account,
std::uint64_t const amount ) const
private

Definition at line 1224 of file mpt.cpp.

◆ operator~

BookSpec operator~ ( MPTTester const & mpt)
friend

Definition at line 859 of file mpt.h.

Member Data Documentation

◆ env_

Env& xrpl::test::jtx::MPTTester::env_
private

Definition at line 513 of file mpt.h.

◆ issuer_

Account const xrpl::test::jtx::MPTTester::issuer_
private

Definition at line 514 of file mpt.h.

◆ holders_

std::unordered_map<std::string, Account> const xrpl::test::jtx::MPTTester::holders_
private

Definition at line 515 of file mpt.h.

◆ auditor_

std::optional<Account> const xrpl::test::jtx::MPTTester::auditor_
private

Definition at line 516 of file mpt.h.

◆ id_

std::optional<MPTID> xrpl::test::jtx::MPTTester::id_
private

Definition at line 517 of file mpt.h.

◆ close_

bool xrpl::test::jtx::MPTTester::close_
private

Definition at line 518 of file mpt.h.

◆ pubKeys_

std::unordered_map<AccountID, std::vector<Buffer> > xrpl::test::jtx::MPTTester::pubKeys_
private

Definition at line 521 of file mpt.h.

◆ privKeys_

std::unordered_map<AccountID, std::vector<Buffer> > xrpl::test::jtx::MPTTester::privKeys_
private

Definition at line 522 of file mpt.h.

◆ issuerEncryptedBalance

auto xrpl::test::jtx::MPTTester::issuerEncryptedBalance = EncryptedBalanceType::IssuerEncryptedBalance
staticconstexpr

Definition at line 532 of file mpt.h.

◆ holderEncryptedInbox

auto xrpl::test::jtx::MPTTester::holderEncryptedInbox = EncryptedBalanceType::HolderEncryptedInbox
staticconstexpr

Definition at line 533 of file mpt.h.

◆ holderEncryptedSpending

auto xrpl::test::jtx::MPTTester::holderEncryptedSpending = EncryptedBalanceType::HolderEncryptedSpending
staticconstexpr

Definition at line 534 of file mpt.h.

◆ auditorEncryptedBalance

auto xrpl::test::jtx::MPTTester::auditorEncryptedBalance = EncryptedBalanceType::AuditorEncryptedBalance
staticconstexpr

Definition at line 535 of file mpt.h.