xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
DepositPreauthEntry.h
1
#pragma once
2
3
#include <xrpl/basics/Slice.h>
4
#include <xrpl/basics/base_uint.h>
5
#include <xrpl/beast/utility/Journal.h>
6
#include <xrpl/ledger/ApplyView.h>
7
#include <xrpl/ledger/ReadView.h>
8
#include <xrpl/ledger/entries/SLEBase.h>
9
#include <xrpl/protocol/AccountID.h>
10
#include <xrpl/protocol/Indexes.h>
11
#include <xrpl/protocol/LedgerFormats.h>
12
13
#include <
set
>
14
#include <
utility
>
15
16
namespace
xrpl
{
17
18
template
<
typename
ViewT>
19
class
DepositPreauthEntry
:
public
SLEBase
<ViewT, ltDEPOSIT_PREAUTH>
20
{
21
public
:
22
using
Base
=
SLEBase<ViewT, ltDEPOSIT_PREAUTH>
;
23
24
// Inherit base constructors: adopt an existing SLE, or resolve one from a
25
// Keylet against the view.
26
using
Base::Base;
27
28
explicit
DepositPreauthEntry
(
29
AccountID
const
& owner,
30
AccountID
const
& preauthorized,
31
Base::ViewRefType
view,
32
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
33
: Base(
keylet
::depositPreauth(owner, preauthorized), view, j)
34
{
35
}
36
37
explicit
DepositPreauthEntry
(
38
AccountID
const
& owner,
39
std::set
<
std::pair<AccountID, Slice>
>
const
& authCreds,
40
Base::ViewRefType
view,
41
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
42
: Base(
keylet
::depositPreauth(owner, authCreds), view, j)
43
{
44
}
45
46
explicit
DepositPreauthEntry
(
47
UInt256
const
& preauthID,
48
Base::ViewRefType
view,
49
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
50
: Base(
keylet
::depositPreauth(preauthID), view, j)
51
{
52
}
53
};
54
55
using
DepositPreauthEntryR
=
DepositPreauthEntry<ReadView>
;
56
using
DepositPreauthEntryW
=
DepositPreauthEntry<ApplyView>
;
57
58
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
beast::Journal::getNullSink
static Sink & getNullSink()
Returns a Sink which does nothing.
Definition
beast_Journal.cpp:63
xrpl::DepositPreauthEntry
Definition
DepositPreauthEntry.h:20
xrpl::DepositPreauthEntry::DepositPreauthEntry
DepositPreauthEntry(UInt256 const &preauthID, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
DepositPreauthEntry.h:46
xrpl::DepositPreauthEntry::Base
SLEBase< ViewT, ltDEPOSIT_PREAUTH > Base
Definition
DepositPreauthEntry.h:22
xrpl::DepositPreauthEntry::DepositPreauthEntry
DepositPreauthEntry(AccountID const &owner, AccountID const &preauthorized, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
DepositPreauthEntry.h:28
xrpl::DepositPreauthEntry::DepositPreauthEntry
DepositPreauthEntry(AccountID const &owner, std::set< std::pair< AccountID, Slice > > const &authCreds, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
DepositPreauthEntry.h:37
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltDEPOSIT_PREAUTH >::SLEBase
SLEBase(SLEBase const &)=default
xrpl::keylet
Keylet computation functions.
Definition
Indexes.h:40
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::DepositPreauthEntryR
DepositPreauthEntry< ReadView > DepositPreauthEntryR
Definition
DepositPreauthEntry.h:55
xrpl::AccountID
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition
AccountID.h:34
xrpl::DepositPreauthEntryW
DepositPreauthEntry< ApplyView > DepositPreauthEntryW
Definition
DepositPreauthEntry.h:56
std::pair
set
utility
Generated by
1.17.0