xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
protocol_autogen
transactions
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h
1
// This file is auto-generated. Do not edit.
2
#pragma once
3
4
#include <xrpl/protocol/STTx.h>
5
#include <xrpl/protocol/STParsedJSON.h>
6
#include <xrpl/protocol/jss.h>
7
#include <xrpl/protocol_autogen/TransactionBase.h>
8
#include <xrpl/protocol_autogen/TransactionBuilderBase.h>
9
#include <xrpl/json/json_value.h>
10
11
#include <
stdexcept
>
12
#include <
optional
>
13
14
namespace
xrpl::transactions
{
15
16
class
ConfidentialMPTMergeInboxBuilder
;
17
29
class
ConfidentialMPTMergeInbox
:
public
TransactionBase
30
{
31
public
:
32
static
constexpr
xrpl::TxType
txType
= ttCONFIDENTIAL_MPT_MERGE_INBOX;
33
38
explicit
ConfidentialMPTMergeInbox
(
std::shared_ptr<STTx const>
tx)
39
:
TransactionBase
(
std
::move(tx))
40
{
41
// Verify transaction type
42
if
(
tx_
->getTxnType() !=
txType
)
43
{
44
throw std::runtime_error(
"Invalid transaction type for ConfidentialMPTMergeInbox"
);
45
}
46
}
47
48
// Transaction-specific field getters
49
54
[[nodiscard]]
55
SF_UINT192::type::value_type
56
getMPTokenIssuanceID
()
const
57
{
58
return
this->
tx_
->at(sfMPTokenIssuanceID);
59
}
60
};
61
69
class
ConfidentialMPTMergeInboxBuilder
:
public
TransactionBuilderBase
<ConfidentialMPTMergeInboxBuilder>
70
{
71
public
:
79
ConfidentialMPTMergeInboxBuilder
(SF_ACCOUNT::type::value_type account,
80
std::decay_t<typename SF_UINT192::type::value_type>
const
& mPTokenIssuanceID,
std::optional<SF_UINT32::type::value_type>
sequence = std::nullopt,
81
std::optional<SF_AMOUNT::type::value_type>
fee = std::nullopt
82
)
83
:
TransactionBuilderBase
<
ConfidentialMPTMergeInboxBuilder
>(ttCONFIDENTIAL_MPT_MERGE_INBOX, account, sequence, fee)
84
{
85
setMPTokenIssuanceID
(mPTokenIssuanceID);
86
}
87
93
ConfidentialMPTMergeInboxBuilder
(
std::shared_ptr<STTx const>
tx)
94
{
95
if
(tx->getTxnType() != ttCONFIDENTIAL_MPT_MERGE_INBOX)
96
{
97
throw
std::runtime_error
(
"Invalid transaction type for ConfidentialMPTMergeInboxBuilder"
);
98
}
99
object_
= *tx;
100
}
101
105
110
ConfidentialMPTMergeInboxBuilder
&
111
setMPTokenIssuanceID
(
std::decay_t<typename SF_UINT192::type::value_type>
const
& value)
112
{
113
object_
[sfMPTokenIssuanceID] = value;
114
return
*
this
;
115
}
116
123
ConfidentialMPTMergeInbox
124
build
(
PublicKey
const
& publicKey,
SecretKey
const
& secretKey)
125
{
126
sign
(publicKey, secretKey);
127
return
ConfidentialMPTMergeInbox
{
std::make_shared<STTx>
(std::move(
object_
))};
128
}
129
};
130
131
}
// namespace xrpl::transactions
xrpl::PublicKey
A public key.
Definition
PublicKey.h:53
xrpl::SecretKey
A secret key.
Definition
SecretKey.h:24
xrpl::transactions::ConfidentialMPTMergeInboxBuilder
Builder for ConfidentialMPTMergeInbox transactions.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:70
xrpl::transactions::ConfidentialMPTMergeInboxBuilder::setMPTokenIssuanceID
ConfidentialMPTMergeInboxBuilder & setMPTokenIssuanceID(std::decay_t< typename SF_UINT192::type::value_type > const &value)
Transaction-specific field setters.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:111
xrpl::transactions::ConfidentialMPTMergeInboxBuilder::ConfidentialMPTMergeInboxBuilder
ConfidentialMPTMergeInboxBuilder(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTMergeInboxBuilder from an existing STTx object.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:93
xrpl::transactions::ConfidentialMPTMergeInboxBuilder::ConfidentialMPTMergeInboxBuilder
ConfidentialMPTMergeInboxBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT192::type::value_type > const &mPTokenIssuanceID, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new ConfidentialMPTMergeInboxBuilder with required fields.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:79
xrpl::transactions::ConfidentialMPTMergeInboxBuilder::build
ConfidentialMPTMergeInbox build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the ConfidentialMPTMergeInbox wrapper.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:124
xrpl::transactions::ConfidentialMPTMergeInbox
Transaction: ConfidentialMPTMergeInbox.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:30
xrpl::transactions::ConfidentialMPTMergeInbox::getMPTokenIssuanceID
SF_UINT192::type::value_type getMPTokenIssuanceID() const
Get sfMPTokenIssuanceID (SoeRequired).
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:56
xrpl::transactions::ConfidentialMPTMergeInbox::txType
static constexpr xrpl::TxType txType
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:32
xrpl::transactions::ConfidentialMPTMergeInbox::ConfidentialMPTMergeInbox
ConfidentialMPTMergeInbox(std::shared_ptr< STTx const > tx)
Construct a ConfidentialMPTMergeInbox transaction wrapper from an existing STTx object.
Definition
protocol_autogen/transactions/ConfidentialMPTMergeInbox.h:38
xrpl::transactions::TransactionBase::tx_
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
Definition
TransactionBase.h:456
xrpl::transactions::TransactionBase::TransactionBase
TransactionBase(std::shared_ptr< STTx const > tx)
Construct a transaction wrapper from an existing STTx object.
Definition
TransactionBase.h:31
xrpl::transactions::TransactionBuilderBase< ConfidentialMPTMergeInboxBuilder >::object_
STObject object_
Definition
TransactionBuilderBase.h:266
xrpl::transactions::TransactionBuilderBase< ConfidentialMPTMergeInboxBuilder >::TransactionBuilderBase
TransactionBuilderBase()=default
xrpl::transactions::TransactionBuilderBase< ConfidentialMPTMergeInboxBuilder >::sign
ConfidentialMPTMergeInboxBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Definition
TransactionBuilderBase.h:248
std::decay_t
std::make_shared
T make_shared(T... args)
std
STL namespace.
xrpl::transactions
Definition
TransactionBase.h:15
xrpl::TxType
TxType
Transaction type identifiers.
Definition
TxFormats.h:45
optional
std::runtime_error
std::shared_ptr
stdexcept
Generated by
1.17.0