correctly document stuff (#1878)

This commit is contained in:
ledhed2222
2021-12-17 19:03:54 -05:00
committed by GitHub
parent 46a8adcac9
commit 7d6d119e4c
162 changed files with 1572 additions and 1125 deletions

View File

@@ -3,15 +3,15 @@
flags.</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-typescript"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">partialPayment</span><span class="hl-1">: </span><span class="hl-9">Payment</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-4">TransactionType:</span><span class="hl-1"> </span><span class="hl-7">&#39;Payment&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">Account:</span><span class="hl-1"> </span><span class="hl-7">&#39;rM9WCfJU6udpFkvKThRaFHDMsp7L8rpgN&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">Amount:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">currency:</span><span class="hl-1"> </span><span class="hl-7">&#39;FOO&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">value:</span><span class="hl-1"> </span><span class="hl-7">&#39;4000&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">issuer:</span><span class="hl-1"> </span><span class="hl-7">&#39;rPzwM2JfCSDjhbesdTCqFjWWdK7eFtTwZz&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-4">Destination:</span><span class="hl-1"> </span><span class="hl-7">&#39;rPzwM2JfCSDjhbesdTCqFjWWdK7eFtTwZz&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">Flags:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">tfPartialPayment:</span><span class="hl-1"> </span><span class="hl-0">true</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Autofill the tx to see how flags actually look compared to the interface usage.</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">autofilledTx</span><span class="hl-1"> = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-4">client</span><span class="hl-1">.</span><span class="hl-3">autofill</span><span class="hl-1">(</span><span class="hl-4">partialPayment</span><span class="hl-1">)</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-3">log</span><span class="hl-1">(</span><span class="hl-4">autofilledTx</span><span class="hl-1">)</span><br/><span class="hl-5">// {</span><br/><span class="hl-5">// TransactionType: &#39;Payment&#39;,</span><br/><span class="hl-5">// Account: &#39;rM9WCfJU6udpFkvKThRaFHDMsp7L8rpgN&#39;,</span><br/><span class="hl-5">// Amount: {</span><br/><span class="hl-5">// currency: &#39;FOO&#39;,</span><br/><span class="hl-5">// value: &#39;4000&#39;,</span><br/><span class="hl-5">// issuer: &#39;rPzwM2JfCSDjhbesdTCqFjWWdK7eFtTwZz&#39;</span><br/><span class="hl-5">// },</span><br/><span class="hl-5">// Destination: &#39;rPzwM2JfCSDjhbesdTCqFjWWdK7eFtTwZz&#39;,</span><br/><span class="hl-5">// Flags: 131072,</span><br/><span class="hl-5">// Sequence: 21970996,</span><br/><span class="hl-5">// Fee: &#39;12&#39;,</span><br/><span class="hl-5">// LastLedgerSequence: 21971016</span><br/><span class="hl-5">// }</span>
</code></pre>
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">GlobalFlags</span><ul class="tsd-hierarchy"><li><span class="target">PaymentFlagsInterface</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfLimitQuality" class="tsd-kind-icon">tf<wbr/>Limit<wbr/>Quality</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfNoDirectRipple" class="tsd-kind-icon">tf<wbr/>No<wbr/>Direct<wbr/>Ripple</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfPartialPayment" class="tsd-kind-icon">tf<wbr/>Partial<wbr/>Payment</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfLimitQuality" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>Limit<wbr/>Quality</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>Limit<wbr/>Quality<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ripple/ripple-lib/blob/fcf448da/packages/xrpl/src/models/transactions/payment.ts#L98">ripple-lib/packages/xrpl/src/models/transactions/payment.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">GlobalFlags</span><ul class="tsd-hierarchy"><li><span class="target">PaymentFlagsInterface</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfLimitQuality" class="tsd-kind-icon">tf<wbr/>Limit<wbr/>Quality</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfNoDirectRipple" class="tsd-kind-icon">tf<wbr/>No<wbr/>Direct<wbr/>Ripple</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PaymentFlagsInterface.html#tfPartialPayment" class="tsd-kind-icon">tf<wbr/>Partial<wbr/>Payment</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfLimitQuality" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>Limit<wbr/>Quality</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>Limit<wbr/>Quality<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/46a8adca/packages/xrpl/src/models/transactions/payment.ts#L98">packages/xrpl/src/models/transactions/payment.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Only take paths where all the conversions have an input:output ratio that
is equal or better than the ratio of Amount:SendMax. See Limit Quality for
details.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfNoDirectRipple" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>No<wbr/>Direct<wbr/>Ripple</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>No<wbr/>Direct<wbr/>Ripple<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ripple/ripple-lib/blob/fcf448da/packages/xrpl/src/models/transactions/payment.ts#L86">ripple-lib/packages/xrpl/src/models/transactions/payment.ts:86</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfNoDirectRipple" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>No<wbr/>Direct<wbr/>Ripple</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>No<wbr/>Direct<wbr/>Ripple<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/46a8adca/packages/xrpl/src/models/transactions/payment.ts#L86">packages/xrpl/src/models/transactions/payment.ts:86</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Do not use the default path; only use paths included in the Paths field.
This is intended to force the transaction to take arbitrage opportunities.
Most clients do not need this.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfPartialPayment" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>Partial<wbr/>Payment</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>Partial<wbr/>Payment<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ripple/ripple-lib/blob/fcf448da/packages/xrpl/src/models/transactions/payment.ts#L92">ripple-lib/packages/xrpl/src/models/transactions/payment.ts:92</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tfPartialPayment" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tf<wbr/>Partial<wbr/>Payment</h3><div class="tsd-signature tsd-kind-icon">tf<wbr/>Partial<wbr/>Payment<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/XRPLF/xrpl.js/blob/46a8adca/packages/xrpl/src/models/transactions/payment.ts#L92">packages/xrpl/src/models/transactions/payment.ts:92</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>If the specified Amount cannot be sent without spending more than SendMax,
reduce the received amount instead of failing outright. See Partial.
Payments for more details.</p>