xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
helpers
PaymentChannelHelpers.h
1
#pragma once
2
3
#include <xrpl/basics/base_uint.h>
4
#include <xrpl/beast/utility/Journal.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/protocol/Rules.h>
7
#include <xrpl/protocol/STLedgerEntry.h>
8
#include <xrpl/protocol/TER.h>
9
10
#include <
cstdint
>
11
#include <
optional
>
12
13
namespace
xrpl
{
14
25
TER
26
closeChannel
(
SLE::Ref
slep,
ApplyView
& view,
UInt256
const
& key, beast::Journal j);
27
37
uint32_t
38
saturatingAdd
(
Rules
const
& rules, uint32_t
const
lhs, uint32_t
const
rhs);
39
50
bool
51
isChannelExpired
(
ApplyView
const
& view,
std::optional<std::uint32_t>
timeField);
52
53
}
// namespace xrpl
xrpl::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition
ApplyView.h:141
xrpl::Rules
Rules controlling protocol behavior.
Definition
Rules.h:40
xrpl::STLedgerEntry::Ref
std::shared_ptr< STLedgerEntry > const & Ref
Definition
STLedgerEntry.h:35
cstdint
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::isChannelExpired
bool isChannelExpired(ApplyView const &view, std::optional< std::uint32_t > timeField)
Determine whether a payment channel time field represents an expired time.
xrpl::closeChannel
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.
Definition
PaymentChannelHelpers.cpp:25
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::saturatingAdd
uint32_t saturatingAdd(Rules const &rules, uint32_t const lhs, uint32_t const rhs)
Add two uint32_t values with saturation at UINT32_MAX.
Definition
PaymentChannelHelpers.cpp:70
xrpl::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
optional
Generated by
1.17.0