Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions include/xrpl/ledger/helpers/AMMEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/Asset.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class AMMEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit AMMEntry(
Asset const& issue1,
Asset const& issue2,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::amm(issue1, issue2), view, j)
{
}
};

} // namespace xrpl
27 changes: 27 additions & 0 deletions include/xrpl/ledger/helpers/AccountRootEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class AccountRootEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit AccountRootEntry(
AccountID const& id,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::account(id), view, j)
{
}
};

} // namespace xrpl
25 changes: 25 additions & 0 deletions include/xrpl/ledger/helpers/AmendmentsEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class AmendmentsEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit AmendmentsEntry(
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::amendments(), view, j)
{
}
};

} // namespace xrpl
28 changes: 28 additions & 0 deletions include/xrpl/ledger/helpers/BridgeEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/STXChainBridge.h>

namespace xrpl {

template <typename ViewT>
class BridgeEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit BridgeEntry(
STXChainBridge const& bridge,
STXChainBridge::ChainType chainType,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::bridge(bridge, chainType), view, j)
{
}
};

} // namespace xrpl
30 changes: 30 additions & 0 deletions include/xrpl/ledger/helpers/CheckEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

#include <cstdint>

namespace xrpl {

template <typename ViewT>
class CheckEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit CheckEntry(
AccountID const& id,
std::uint32_t seq,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::check(id, seq), view, j)
{
}
};

} // namespace xrpl
30 changes: 30 additions & 0 deletions include/xrpl/ledger/helpers/CredentialEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once

#include <xrpl/basics/Slice.h>
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class CredentialEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit CredentialEntry(
AccountID const& subject,
AccountID const& issuer,
Slice const& credType,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::credential(subject, issuer, credType), view, j)
{
}
};

} // namespace xrpl
27 changes: 27 additions & 0 deletions include/xrpl/ledger/helpers/DIDEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class DIDEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit DIDEntry(
AccountID const& account,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::did(account), view, j)
{
}
};

} // namespace xrpl
28 changes: 28 additions & 0 deletions include/xrpl/ledger/helpers/DelegateEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class DelegateEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit DelegateEntry(
AccountID const& account,
AccountID const& authorizedAccount,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::delegate(account, authorizedAccount), view, j)
{
}
};

} // namespace xrpl
28 changes: 28 additions & 0 deletions include/xrpl/ledger/helpers/DepositPreauthEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class DepositPreauthEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit DepositPreauthEntry(
AccountID const& owner,
AccountID const& preauthorized,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::depositPreauth(owner, preauthorized), view, j)
{
}
};

} // namespace xrpl
27 changes: 27 additions & 0 deletions include/xrpl/ledger/helpers/DirectoryNodeEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class DirectoryNodeEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit DirectoryNodeEntry(
AccountID const& id,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::ownerDir(id), view, j)
{
}
};

} // namespace xrpl
30 changes: 30 additions & 0 deletions include/xrpl/ledger/helpers/EscrowEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>

#include <cstdint>

namespace xrpl {

template <typename ViewT>
class EscrowEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit EscrowEntry(
AccountID const& src,
std::uint32_t seq,
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::escrow(src, seq), view, j)
{
}
};

} // namespace xrpl
25 changes: 25 additions & 0 deletions include/xrpl/ledger/helpers/FeeSettingsEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class FeeSettingsEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit FeeSettingsEntry(
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::feeSettings(), view, j)
{
}
};

} // namespace xrpl
25 changes: 25 additions & 0 deletions include/xrpl/ledger/helpers/LedgerHashesEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once

#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/helpers/SLEBase.h>
#include <xrpl/protocol/Indexes.h>

namespace xrpl {

template <typename ViewT>
class LedgerHashesEntry : public SLEBase<ViewT>
{
public:
// Inherit base constructors: adopt an existing SLE, or resolve one from a
// Keylet against the view.
using SLEBase<ViewT>::SLEBase;

explicit LedgerHashesEntry(
SLEBase<ViewT>::view_ref_type view,
Comment thread
mvadari marked this conversation as resolved.
beast::Journal j = beast::Journal{beast::Journal::getNullSink()})
: SLEBase<ViewT>(keylet::skip(), view, j)
{
}
};

} // namespace xrpl
Loading
Loading