rippled
Loading...
Searching...
No Matches
Credit.h
1#pragma once
2
3#include <xrpl/ledger/View.h>
4#include <xrpl/protocol/IOUAmount.h>
5#include <xrpl/protocol/STAmount.h>
6
7namespace xrpl {
8
17STAmount
18creditLimit(ReadView const& view, AccountID const& account, AccountID const& issuer, Currency const& currency);
19
20IOUAmount
21creditLimit2(ReadView const& v, AccountID const& acc, AccountID const& iss, Currency const& cur);
31STAmount
32creditBalance(ReadView const& view, AccountID const& account, AccountID const& issuer, Currency const& currency);
35} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
base_uint< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
Definition UintTypes.h:36
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:28
STAmount creditLimit(ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const &currency)
Calculate the maximum amount of IOUs that an account can hold.
Definition Credit.cpp:9
IOUAmount creditLimit2(ReadView const &v, AccountID const &acc, AccountID const &iss, Currency const &cur)
Definition Credit.cpp:27
STAmount creditBalance(ReadView const &view, AccountID const &account, AccountID const &issuer, Currency const &currency)
Returns the amount of IOUs issued by issuer that are held by an account.
Definition Credit.cpp:33