This commit is contained in:
bthomee
2025-10-13 07:59:26 -07:00
parent 4aaf7703d2
commit 940050298d
174 changed files with 10473 additions and 10348 deletions

View File

@@ -178,75 +178,77 @@ $(document).ready(function() { init_codefold(0); });
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">catch</span> (<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> <span class="keyword">const</span>&amp; ex)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> result = <a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">RPC::make_error</a>(</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">rpcINTERNAL</a>,</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="stringliteral">&quot;Exception occurred during signing: &quot;</span> + <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>(ex.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>()));</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> }</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>}</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">// LCOV_EXCL_START</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> result = <a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">RPC::make_error</a>(</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">rpcINTERNAL</a>,</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="stringliteral">&quot;Exception occurred during signing: &quot;</span> + <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>(ex.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>()));</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// LCOV_EXCL_STOP</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> }</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>}</div>
</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment">// {</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment">// public_key: &lt;public_key&gt;</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment">// channel_id: 256-bit channel id</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment">// drops: 64-bit uint (as string)</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment">// signature: signature to verify</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment">// }</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="foldopen" id="foldopen00111" data-start="{" data-end="}">
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301"> 111</a></span><a class="code hl_function" href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301">doChannelVerify</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a>&amp; context)</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>{</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">auto</span> <span class="keyword">const</span>&amp; params(context.<a class="code hl_variable" href="structripple_1_1RPC_1_1JsonContext.html#a036b2c14552fbca49011c3d0e78017fa">params</a>);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; p :</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {jss::public_key, jss::channel_id, jss::amount, jss::signature})</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">if</span> (!params.isMember(p))</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aec2e1163b39a450d3917af9dd15b0f06">RPC::missing_field_error</a>(p);</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;PublicKey&gt;</a> pk;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> {</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span> strPk = params[jss::public_key].asString();</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> pk = parseBase58&lt;PublicKey&gt;(<a class="code hl_enumvalue" href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ab23f52a56f27cc97abe221ea3c5cd56c">TokenType::AccountPublic</a>, strPk);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (!pk)</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> {</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">auto</span> pkHex = <a class="code hl_function" href="namespaceripple.html#a2127aa882d06ad6aaae928d2e80fb395">strUnHex</a>(strPk);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (!pkHex)</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">auto</span> <span class="keyword">const</span> pkType = <a class="code hl_function" href="namespaceripple.html#a798e187ba7443d8f951b810a12d50976">publicKeyType</a>(<a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*pkHex));</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">if</span> (!pkType)</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> pk.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/optional/emplace.html">emplace</a>(<a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*pkHex));</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> }</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> channelId;</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">if</span> (!channelId.<a class="code hl_function" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(params[jss::channel_id].asString()))</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa67c34c5d359f52c3f1fdcf2ce06dbc9">rpcCHANNEL_MALFORMED</a>);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint64_t&gt;</a> <span class="keyword">const</span> optDrops = params[jss::amount].isString()</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> ? <a class="code hl_function" href="namespaceripple.html#a60873b2af17acb7b9c9a28b78388ed3f">to_uint64</a>(params[jss::amount].asString())</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> : <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::nullopt</a>;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">if</span> (!optDrops)</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a60badd0db2ef5b154d6101fe7b845e39">rpcCHANNEL_AMT_MALFORMED</a>);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> <span class="keyword">const</span> drops = *optDrops;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment">// {</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment">// public_key: &lt;public_key&gt;</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment">// channel_id: 256-bit channel id</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment">// drops: 64-bit uint (as string)</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment">// signature: signature to verify</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment">// }</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="foldopen" id="foldopen00113" data-start="{" data-end="}">
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301"> 113</a></span><a class="code hl_function" href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301">doChannelVerify</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a>&amp; context)</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span>{</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keyword">auto</span> <span class="keyword">const</span>&amp; params(context.<a class="code hl_variable" href="structripple_1_1RPC_1_1JsonContext.html#a036b2c14552fbca49011c3d0e78017fa">params</a>);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; p :</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> {jss::public_key, jss::channel_id, jss::amount, jss::signature})</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (!params.isMember(p))</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aec2e1163b39a450d3917af9dd15b0f06">RPC::missing_field_error</a>(p);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;PublicKey&gt;</a> pk;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span> strPk = params[jss::public_key].asString();</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> pk = parseBase58&lt;PublicKey&gt;(<a class="code hl_enumvalue" href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ab23f52a56f27cc97abe221ea3c5cd56c">TokenType::AccountPublic</a>, strPk);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">if</span> (!pk)</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">auto</span> pkHex = <a class="code hl_function" href="namespaceripple.html#a2127aa882d06ad6aaae928d2e80fb395">strUnHex</a>(strPk);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">if</span> (!pkHex)</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>);</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">auto</span> <span class="keyword">const</span> pkType = <a class="code hl_function" href="namespaceripple.html#a798e187ba7443d8f951b810a12d50976">publicKeyType</a>(<a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*pkHex));</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">if</span> (!pkType)</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>);</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> pk.<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/utility/optional/emplace.html">emplace</a>(<a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*pkHex));</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> channelId;</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">if</span> (!channelId.<a class="code hl_function" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(params[jss::channel_id].asString()))</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa67c34c5d359f52c3f1fdcf2ce06dbc9">rpcCHANNEL_MALFORMED</a>);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::uint64_t&gt;</a> <span class="keyword">const</span> optDrops = params[jss::amount].isString()</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> ? <a class="code hl_function" href="namespaceripple.html#a60873b2af17acb7b9c9a28b78388ed3f">to_uint64</a>(params[jss::amount].asString())</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> : <a class="code hl_variableRef" href="http://en.cppreference.com/w/cpp/types/is_same.html">std::nullopt</a>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">if</span> (!optDrops)</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a60badd0db2ef5b154d6101fe7b845e39">rpcCHANNEL_AMT_MALFORMED</a>);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keyword">auto</span> sig = <a class="code hl_function" href="namespaceripple.html#a2127aa882d06ad6aaae928d2e80fb395">strUnHex</a>(params[jss::signature].asString());</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">if</span> (!sig || !sig-&gt;size())</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a82ddebc5ec7a37ff38892487277bf9c4">rpcINVALID_PARAMS</a>);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_class" href="classripple_1_1Serializer.html">Serializer</a> msg;</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_function" href="namespaceripple.html#a70465c94c8c462001ec31e94c8e92183">serializePayChanAuthorization</a>(msg, channelId, <a class="code hl_class" href="classripple_1_1XRPAmount.html">XRPAmount</a>(drops));</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> result;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> result[jss::signature_verified] =</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_function" href="namespaceripple.html#a3549cb4c3d81efe240ad20c147e48ac7">verify</a>(*pk, msg.<a class="code hl_function" href="classripple_1_1Serializer.html#a394c3299f6cfcebdaa4bc98ec0c602d6">slice</a>(), <a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*sig), <span class="comment">/*canonical*/</span> <span class="keyword">true</span>);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span>}</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> <span class="keyword">const</span> drops = *optDrops;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">auto</span> sig = <a class="code hl_function" href="namespaceripple.html#a2127aa882d06ad6aaae928d2e80fb395">strUnHex</a>(params[jss::signature].asString());</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">if</span> (!sig || !sig-&gt;size())</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a82ddebc5ec7a37ff38892487277bf9c4">rpcINVALID_PARAMS</a>);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <a class="code hl_class" href="classripple_1_1Serializer.html">Serializer</a> msg;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <a class="code hl_function" href="namespaceripple.html#a70465c94c8c462001ec31e94c8e92183">serializePayChanAuthorization</a>(msg, channelId, <a class="code hl_class" href="classripple_1_1XRPAmount.html">XRPAmount</a>(drops));</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> result;</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> result[jss::signature_verified] =</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_function" href="namespaceripple.html#a3549cb4c3d81efe240ad20c147e48ac7">verify</a>(*pk, msg.<a class="code hl_function" href="classripple_1_1Serializer.html#a394c3299f6cfcebdaa4bc98ec0c602d6">slice</a>(), <a class="code hl_function" href="namespaceripple.html#a93f2333b362ee67694b78f55eadf7805">makeSlice</a>(*sig), <span class="comment">/*canonical*/</span> <span class="keyword">true</span>);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span>}</div>
</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></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#l00148">json_value.h:149</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html_a0c48dd5bcaef14e30e9ef5b96b0daa39"><div class="ttname"><a href="classripple_1_1Application.html#a0c48dd5bcaef14e30e9ef5b96b0daa39">ripple::Application::config</a></div><div class="ttdeci">virtual Config &amp; config()=0</div></div>
@@ -267,7 +269,7 @@ $(document).ready(function() { init_codefold(0); });
<div class="ttc" id="anamespaceripple_1_1RPC_html_aec2e1163b39a450d3917af9dd15b0f06"><div class="ttname"><a href="namespaceripple_1_1RPC.html#aec2e1163b39a450d3917af9dd15b0f06">ripple::RPC::missing_field_error</a></div><div class="ttdeci">Json::Value missing_field_error(std::string const &amp;name)</div><div class="ttdef"><b>Definition</b> <a href="ErrorCodes_8h_source.html#l00283">ErrorCodes.h:283</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_af894bdbf60a077993d884fd31cf6e694"><div class="ttname"><a href="namespaceripple_1_1RPC.html#af894bdbf60a077993d884fd31cf6e694">ripple::RPC::keypairForSignature</a></div><div class="ttdeci">std::optional&lt; std::pair&lt; PublicKey, SecretKey &gt; &gt; keypairForSignature(Json::Value const &amp;params, Json::Value &amp;error, unsigned int apiVersion)</div><div class="ttdef"><b>Definition</b> <a href="RPCHelpers_8cpp_source.html#l00798">RPCHelpers.cpp:798</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#l00025">algorithm.h:25</a></div></div>
<div class="ttc" id="anamespaceripple_html_a15e07467cf404ade292a4c47e80c1301"><div class="ttname"><a href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301">ripple::doChannelVerify</a></div><div class="ttdeci">Json::Value doChannelVerify(RPC::JsonContext &amp;)</div><div class="ttdef"><b>Definition</b> <a href="PayChanClaim_8cpp_source.html#l00111">PayChanClaim.cpp:111</a></div></div>
<div class="ttc" id="anamespaceripple_html_a15e07467cf404ade292a4c47e80c1301"><div class="ttname"><a href="namespaceripple.html#a15e07467cf404ade292a4c47e80c1301">ripple::doChannelVerify</a></div><div class="ttdeci">Json::Value doChannelVerify(RPC::JsonContext &amp;)</div><div class="ttdef"><b>Definition</b> <a href="PayChanClaim_8cpp_source.html#l00113">PayChanClaim.cpp:113</a></div></div>
<div class="ttc" id="anamespaceripple_html_a1bf8df553d36589191c8057c136cce03ab23f52a56f27cc97abe221ea3c5cd56c"><div class="ttname"><a href="namespaceripple.html#a1bf8df553d36589191c8057c136cce03ab23f52a56f27cc97abe221ea3c5cd56c">ripple::TokenType::AccountPublic</a></div><div class="ttdeci">@ AccountPublic</div></div>
<div class="ttc" id="anamespaceripple_html_a2127aa882d06ad6aaae928d2e80fb395"><div class="ttname"><a href="namespaceripple.html#a2127aa882d06ad6aaae928d2e80fb395">ripple::strUnHex</a></div><div class="ttdeci">std::optional&lt; Blob &gt; strUnHex(std::size_t strSize, Iterator begin, Iterator end)</div><div class="ttdef"><b>Definition</b> <a href="StringUtilities_8h_source.html#l00051">StringUtilities.h:51</a></div></div>
<div class="ttc" id="anamespaceripple_html_a2c769c15b1089824f248f42f237278b7"><div class="ttname"><a href="namespaceripple.html#a2c769c15b1089824f248f42f237278b7">ripple::doChannelAuthorize</a></div><div class="ttdeci">Json::Value doChannelAuthorize(RPC::JsonContext &amp;)</div><div class="ttdef"><b>Definition</b> <a href="PayChanClaim_8cpp_source.html#l00042">PayChanClaim.cpp:42</a></div></div>