mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
138 lines
14 KiB
HTML
138 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: pay.cpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">rippled
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.8 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_codefold(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_120ed4da3e3217b1e7fc0b4f48568e79.html">test</a></li><li class="navelem"><a class="el" href="dir_ffd09a46879067226d7ad9ce2abbf5ef.html">jtx</a></li><li class="navelem"><a class="el" href="dir_b6e1af3af959840d44bdaef0b719b3f9.html">impl</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">pay.cpp</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include <test/jtx/pay.h></span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include <xrpl/protocol/TxFlags.h></span></div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include <xrpl/protocol/jss.h></span></div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span>test {</div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">namespace </span>jtx {</div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
|
<div class="foldopen" id="foldopen00011" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="namespaceripple_1_1test_1_1jtx.html#a66b99468a4160bccaa9959a444b40d40"> 11</a></span><a class="code hl_function" href="namespaceripple_1_1test_1_1jtx.html#a66b99468a4160bccaa9959a444b40d40">pay</a>(<a class="code hl_class" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span>& account, <a class="code hl_class" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span>& to, <a class="code hl_struct" href="structripple_1_1test_1_1jtx_1_1AnyAmount.html">AnyAmount</a> amount)</div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span>{</div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> amount.<a class="code hl_function" href="structripple_1_1test_1_1jtx_1_1AnyAmount.html#a22b7e7e77b43c3d96285a60f5e30c0e7">to</a>(to);</div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> jv;</div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> jv[jss::Account] = <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(account);</div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> jv[jss::Amount] = amount.<a class="code hl_variable" href="structripple_1_1test_1_1jtx_1_1AnyAmount.html#a5682e924152aca376f29ca1cdb9a43d1">value</a>.<a class="code hl_function" href="classripple_1_1STAmount.html#a181a52a4cdeca099d04a31ec43123388">getJson</a>(<a class="code hl_enumvalue" href="structripple_1_1JsonOptions.html#ab85e43ec84df987200d3355c3ba89f0aa1917451e3686dfe8d5016670eb87ab33">JsonOptions::none</a>);</div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> jv[jss::Destination] = <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(to);</div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> jv[jss::TransactionType] = jss::Payment;</div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> jv[jss::Flags] = <a class="code hl_variable" href="namespaceripple.html#ac6935ad0ddb8c447dd408f2404a97b40">tfFullyCanonicalSig</a>;</div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">return</span> jv;</div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>}</div>
|
|
</div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
|
<div class="foldopen" id="foldopen00023" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="namespaceripple_1_1test_1_1jtx.html#ade0681a9d96704f60ac3edbbe2a54332"> 23</a></span><a class="code hl_function" href="namespaceripple_1_1test_1_1jtx.html#a66b99468a4160bccaa9959a444b40d40">pay</a>(<a class="code hl_class" href="classripple_1_1test_1_1jtx_1_1Account.html">Account</a> <span class="keyword">const</span>& account, <a class="code hl_class" href="classripple_1_1test_1_1jtx_1_1Account.html">Account</a> <span class="keyword">const</span>& to, <a class="code hl_struct" href="structripple_1_1test_1_1jtx_1_1AnyAmount.html">AnyAmount</a> amount)</div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>{</div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1test_1_1jtx.html#a66b99468a4160bccaa9959a444b40d40">pay</a>(account.id(), to.<a class="code hl_function" href="classripple_1_1test_1_1jtx_1_1Account.html#a1ea8869f5af6ce774c37b560c6c785c3">id</a>(), amount);</div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
|
|
</div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>} <span class="comment">// namespace jtx</span></div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>} <span class="comment">// namespace test</span></div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>} <span class="comment">// namespace ripple</span></div>
|
|
<div class="ttc" id="aclassJson_1_1Value_html"><div class="ttname"><a href="classJson_1_1Value.html">Json::Value</a></div><div class="ttdoc">Represents a JSON value.</div><div class="ttdef"><b>Definition</b> <a href="json__value_8h_source.html#l00130">json_value.h:131</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_a181a52a4cdeca099d04a31ec43123388"><div class="ttname"><a href="classripple_1_1STAmount.html#a181a52a4cdeca099d04a31ec43123388">ripple::STAmount::getJson</a></div><div class="ttdeci">Json::Value getJson(JsonOptions=JsonOptions::none) const override</div><div class="ttdef"><b>Definition</b> <a href="STAmount_8cpp_source.html#l00753">STAmount.cpp:753</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint< 160, detail::AccountIDTag ></a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1test_1_1jtx_1_1Account_html"><div class="ttname"><a href="classripple_1_1test_1_1jtx_1_1Account.html">ripple::test::jtx::Account</a></div><div class="ttdoc">Immutable cryptographic account descriptor.</div><div class="ttdef"><b>Definition</b> <a href="Account_8h_source.html#l00019">Account.h:20</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1test_1_1jtx_1_1Account_html_a1ea8869f5af6ce774c37b560c6c785c3"><div class="ttname"><a href="classripple_1_1test_1_1jtx_1_1Account.html#a1ea8869f5af6ce774c37b560c6c785c3">ripple::test::jtx::Account::id</a></div><div class="ttdeci">AccountID id() const</div><div class="ttdoc">Returns the Account ID.</div><div class="ttdef"><b>Definition</b> <a href="Account_8h_source.html#l00092">Account.h:92</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1test_1_1jtx_html_a66b99468a4160bccaa9959a444b40d40"><div class="ttname"><a href="namespaceripple_1_1test_1_1jtx.html#a66b99468a4160bccaa9959a444b40d40">ripple::test::jtx::pay</a></div><div class="ttdeci">Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)</div><div class="ttdoc">Create a payment.</div><div class="ttdef"><b>Definition</b> <a href="pay_8cpp_source.html#l00011">pay.cpp:11</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00006">algorithm.h:6</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ac124fe6744b7fe887dec949b56b16d50"><div class="ttname"><a href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">ripple::to_string</a></div><div class="ttdeci">std::string to_string(base_uint< Bits, Tag > const &a)</div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00611">base_uint.h:611</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ac6935ad0ddb8c447dd408f2404a97b40"><div class="ttname"><a href="namespaceripple.html#ac6935ad0ddb8c447dd408f2404a97b40">ripple::tfFullyCanonicalSig</a></div><div class="ttdeci">constexpr std::uint32_t tfFullyCanonicalSig</div><div class="ttdoc">Transaction flags.</div><div class="ttdef"><b>Definition</b> <a href="TxFlags_8h_source.html#l00041">TxFlags.h:41</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1JsonOptions_html_ab85e43ec84df987200d3355c3ba89f0aa1917451e3686dfe8d5016670eb87ab33"><div class="ttname"><a href="structripple_1_1JsonOptions.html#ab85e43ec84df987200d3355c3ba89f0aa1917451e3686dfe8d5016670eb87ab33">ripple::JsonOptions::none</a></div><div class="ttdeci">@ none</div><div class="ttdef"><b>Definition</b> <a href="STBase_8h_source.html#l00024">STBase.h:24</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1test_1_1jtx_1_1AnyAmount_html"><div class="ttname"><a href="structripple_1_1test_1_1jtx_1_1AnyAmount.html">ripple::test::jtx::AnyAmount</a></div><div class="ttdoc">Amount specifier with an option for any issuer.</div><div class="ttdef"><b>Definition</b> <a href="src_2test_2jtx_2amount_8h_source.html#l00516">src/test/jtx/amount.h:517</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1test_1_1jtx_1_1AnyAmount_html_a22b7e7e77b43c3d96285a60f5e30c0e7"><div class="ttname"><a href="structripple_1_1test_1_1jtx_1_1AnyAmount.html#a22b7e7e77b43c3d96285a60f5e30c0e7">ripple::test::jtx::AnyAmount::to</a></div><div class="ttdeci">void to(AccountID const &id)</div><div class="ttdef"><b>Definition</b> <a href="src_2test_2jtx_2amount_8h_source.html#l00537">src/test/jtx/amount.h:537</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1test_1_1jtx_1_1AnyAmount_html_a5682e924152aca376f29ca1cdb9a43d1"><div class="ttname"><a href="structripple_1_1test_1_1jtx_1_1AnyAmount.html#a5682e924152aca376f29ca1cdb9a43d1">ripple::test::jtx::AnyAmount::value</a></div><div class="ttdeci">STAmount value</div><div class="ttdef"><b>Definition</b> <a href="src_2test_2jtx_2amount_8h_source.html#l00519">src/test/jtx/amount.h:519</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
|
|
</small></address>
|
|
</body>
|
|
</html>
|