bitcoin-s/api/lnrpc/Invoice.html

121 lines
163 KiB
HTML
Raw Normal View History

<!DOCTYPE html ><html><head><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/><title></title><meta content="" name="description"/><meta content="" name="keywords"/><meta http-equiv="content-type" content="text/html; charset=UTF-8"/><link href="../lib/index.css" media="screen" type="text/css" rel="stylesheet"/><link href="../lib/template.css" media="screen" type="text/css" rel="stylesheet"/><link href="../lib/print.css" media="print" type="text/css" rel="stylesheet"/><link href="../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css"/><script type="text/javascript" src="../lib/jquery.min.js"></script><script type="text/javascript" src="../lib/index.js"></script><script type="text/javascript" src="../index.js"></script><script type="text/javascript" src="../lib/scheduler.js"></script><script type="text/javascript" src="../lib/template.js"></script><script type="text/javascript">/* this variable can be used by the JS to determine the path to the root document */
var toRoot = '../';</script></head><body><div id="search"><span id="doc-title"><span id="doc-version"></span></span> <span class="close-results"><span class="left">&lt;</span> Back</span><div id="textfilter"><span class="input"><input autocapitalize="none" placeholder="Search" id="index-input" type="text" accesskey="/"/><i class="clear material-icons"></i><i id="search-icon" class="material-icons"></i></span></div></div><div id="search-results"><div id="search-progress"><div id="progress-fill"></div></div><div id="results-content"><div id="entity-results"></div><div id="member-results"></div></div></div><div id="content-scroll-container" style="-webkit-overflow-scrolling: touch;"><div id="content-container" style="-webkit-overflow-scrolling: touch;"><div id="subpackage-spacer"><div id="packages"><h1>Packages</h1><ul><li class="indented0 " name="_root_.root" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="_root_" class="anchorToMember"></a><a id="root:_root_" class="anchorToMember"></a> <span class="permalink"><a href="../index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="../index.html" title=""><span class="name">root</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../index.html" name="_root_" id="_root_" class="extype">root</a></dd></dl></div></li><li class="indented1 " name="_root_.lnrpc" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="lnrpc" class="anchorToMember"></a><a id="lnrpc:lnrpc" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="index.html" title=""><span class="name">lnrpc</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../index.html" name="_root_" id="_root_" class="extype">root</a></dd></dl></div></li><li class="current-entities indented1"><a href="AMP$.html" title="" class="object"></a> <a href="AMP.html" title="Details specific to AMP HTLCs." class="class"></a><a href="AMP.html" title="Details specific to AMP HTLCs.">AMP</a></li><li class="current-entities indented1"><a href="AMPRecord$.html" title="" class="object"></a> <a href="AMPRecord.html" title="" class="class"></a><a href="AMPRecord.html" title="">AMPRecord</a></li><li class="current-entities indented1"><a href="AbandonChannelRequest$.html" title="" class="object"></a> <a href="AbandonChannelRequest.html" title="" class="class"></a><a href="AbandonChannelRequest.html" title="">AbandonChannelRequest</a></li><li class="current-entities indented1"><a href="AbandonChannelResponse$.html" title="" class="object"></a> <a href="AbandonChannelResponse.html" title="" class="class"></a><a href="AbandonChannelResponse.html" title="">AbandonChannelResponse</a></li><li class="current-entities indented1"><a href="AddInvoiceResponse$.html" title="" class="object"></a> <a href="AddInvoiceResponse.html" title="" class="class"></a><a href="AddInvoiceResponse.html" title="">AddInvoiceResponse</a></li><li class="current-entities indented1"><a href="AddressType$.html" title="" class="object"></a> <a href="AddressType.html" title="AddressType has to be one of:" class="class"></a><a href="AddressType.html" title="AddressType has to be one of:">AddressType</a></li><li class="current-entities indented1"><a href="Amount$.html" title="" class="object"></a> <a href="Amount.html" title="" class="class"></a><a href="Amount.html" title="">Amount</a></li><li class="current-entities indented1"><a href="BakeMacaroonRequest$.html" title="" class="object"></a> <a href="BakeMacaroonRequest.html" title="" class="class"></a><a href="BakeMacaroonRequest.html" title="">BakeMacaroonRequest</a></li><li class="current-entities indented1">
An optional memo to attach along with the invoice. Used for record keeping
purposes for the invoice's creator, and will also be set in the description
field of the encoded payment request if the description_hash field is not
being used.</p></dd><dt class="param">rPreimage</dt><dd class="cmt"><p>
The hex-encoded preimage (32 byte) which will allow settling an incoming
HTLC payable to this preimage. When using REST, this field must be encoded
as base64.</p></dd><dt class="param">rHash</dt><dd class="cmt"><p>
The hash of the preimage. When using REST, this field must be encoded as
base64.</p></dd><dt class="param">value</dt><dd class="cmt"><p>
The value of this invoice in satoshis
The fields value and value_msat are mutually exclusive.</p></dd><dt class="param">valueMsat</dt><dd class="cmt"><p>
The value of this invoice in millisatoshis
The fields value and value_msat are mutually exclusive.</p></dd><dt class="param">settled</dt><dd class="cmt"><p>
Whether this invoice has been fulfilled</p></dd><dt class="param">creationDate</dt><dd class="cmt"><p>
When this invoice was created</p></dd><dt class="param">settleDate</dt><dd class="cmt"><p>
When this invoice was settled</p></dd><dt class="param">paymentRequest</dt><dd class="cmt"><p>
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.</p></dd><dt class="param">descriptionHash</dt><dd class="cmt"><p>
Hash (SHA-256) of a description of the payment. Used if the description of
payment (memo) is too long to naturally fit within the description field
of an encoded payment request. When using REST, this field must be encoded
as base64.</p></dd><dt class="param">expiry</dt><dd class="cmt"><p>
Payment request expiry time in seconds. Default is 3600 (1 hour).</p></dd><dt class="param">fallbackAddr</dt><dd class="cmt"><p>
Fallback on-chain address.</p></dd><dt class="param">cltvExpiry</dt><dd class="cmt"><p>
Delta to use for the time-lock of the CLTV extended to the final hop.</p></dd><dt class="param">routeHints</dt><dd class="cmt"><p>
Route hints that can each be individually used to assist in reaching the
invoice's destination.</p></dd><dt class="param">private</dt><dd class="cmt"><p>
Whether this invoice should include routing hints for private channels.</p></dd><dt class="param">addIndex</dt><dd class="cmt"><p>
The "add" index of this invoice. Each newly created invoice will increment
this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all added
invoices with an add_index greater than this one.</p></dd><dt class="param">settleIndex</dt><dd class="cmt"><p>
The "settle" index of this invoice. Each newly settled invoice will
increment this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all
settled invoices with an settle_index greater than this one.</p></dd><dt class="param">amtPaid</dt><dd class="cmt"><p>
Deprecated, use amt_paid_sat or amt_paid_msat.</p></dd><dt class="param">amtPaidSat</dt><dd class="cmt"><p>
The amount that was accepted for this invoice, in satoshis. This will ONLY
be set if this invoice has been settled. We provide this field as if the
invoice was created with a zero value, then we need to record what amount
was ultimately accepted. Additionally, it's possible that the sender paid
MORE that was specified in the original invoice. So we'll record that here
as well.</p></dd><dt class="param">amtPaidMsat</dt><dd class="cmt"><p>
The amount that was accepted for this invoice, in millisatoshis. This will
ONLY be set if this invoice has been settled. We provide this field as if
the invoice was created with a zero value, then we need to record what
amount was ultimately accepted. Additionally, it's possible that the sender
paid MORE that was specified in the original invoice. So we'll record that
here as well.</p></dd><dt class="param">state</dt><dd class="cmt"><p>
The state the invoice is in.</p></dd><dt class="param">htlcs</dt><dd class="cmt"><p>
List of HTLCs paying to this invoice [EXPERIMENTAL].</p></dd><dt class="param">features</dt><dd class="cmt"><p>
List of features advertised on the invoice.</p></dd><dt class="param">isKeysend</dt><dd class="cmt"><p>
Indicates if this invoice was a spontaneous payment that arrived via keysend
[EXPERIMENTAL].</p></dd><dt class="param">paymentAddr</dt><dd class="cmt"><p>
The payment address of this invoice. This value will be used in MPP
payments, and also for newer invoies that always require the MPP paylaod
for added end-to-end security.</p></dd><dt class="param">isAmp</dt><dd class="cmt"><p>
Signals whether or not this is an AMP invoice.</p></dd></dl><dl class="attributes block"><dt>Annotations</dt><dd><span class="name">@SerialVersionUID</span><span class="args">()</span> </dd></dl><div class="toggleContainer"><div class="toggle block"><span>Linear Supertypes</span><div class="superTypes hiddenContent"><a href="https://javadoc.io/page/com.thesamet.scalapb/lenses_2.13/0.11.6/scalapb/lenses/Updatable.html#scalapb.lenses.Updatable" name="scalapb.lenses.Updatable" id="scalapb.lenses.Updatable" class="extype">Updatable</a>[<a href="" name="lnrpc.Invoice" id="lnrpc.Invoice" class="extype">Invoice</a>], <a href="https://javadoc.io/page/com.thesamet.scalapb/scalapb-runtime_2.13/0.11.6/scalapb/GeneratedMessage.html#scalapb.GeneratedMessage" name="scalapb.GeneratedMessage" id="scalapb.GeneratedMessage" class="extype">GeneratedMessage</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java/io/Serializable.html#java.io.Serializable" name="java.io.Serializable" id="java.io.Serializable" class="extype">Serializable</a>, <a href="https://www.scala-lang.org/api/2.13.6/scala/Product.html#scala.Product" name="scala.Product" id="scala.Product" class="extype">Product</a>, <a href="https://www.scala-lang.org/api/2.13.6/scala/Equals.html#scala.Equals" name="scala.Equals" id="scala.Equals" class="extype">Equals</a>, <a href="../scala/index.html#AnyRef=Object" name="scala.AnyRef" id="scala.AnyRef" class="extmbr">AnyRef</a>, <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></div></div></div></div><div id="mbrsel"><div class="toggle"></div><div id="memberfilter"><i class="material-icons arrow"></i><span class="input"><input placeholder="Filter all members" id="mbrsel-input" type="text" accesskey="/"/></span><i class="clear material-icons"></i></div><div id="filterby"><div id="order"><span class="filtertype">Ordering</span><ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By Inheritance</span></li></ol></div><div class="ancestors"><span class="filtertype">Inherited<br/></span><ol id="linearization"><li class="in" name="lnrpc.Invoice"><span>Invoice</span></li><li class="in" name="scalapb.lenses.Updatable"><span>Updatable</span></li><li class="in" name="scalapb.GeneratedMessage"><span>GeneratedMessage</span></li><li class="in" name="java.io.Serializable"><span>Serializable</span></li><li class="in" name="scala.Product"><span>Product</span></li><li class="in" name="scala.Equals"><span>Equals</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li></ol></div><div class="ancestors"><span class="filtertype"></span><ol><li class="hideall out"><span>Hide All</span></li><li class="showall in"><span>Show All</span></li></ol></div><div id="visbl"><span class="filtertype">Visibility</span><ol><li class="public in"><span>Public</span></li><li class="protected out"><span>Protected</span></li></ol></div></div></div><div id="template"><div id="allMembers"><div id="constructors" class="members"><h3>Instance Constructors</h3><ol><li class="indented0 " name="lnrpc.Invoice#&lt;init&gt;" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="&lt;init&gt;(memo:String,rPreimage:com.google.protobuf.ByteString,rHash:com.google.protobuf.ByteString,value:Long,valueMsat:Long,settled:Boolean,creationDate:Long,settleDate:Long,paymentRequest:String,descriptionHash:com.google.protobuf.ByteString,expiry:Long,fallbackAddr:String,cltvExpiry:Long,routeHints:Seq[lnrpc.RouteHint],private:Boolean,addIndex:Long,settleIndex:Long,amtPaid:Long,amtPaidSat:Long,amtPaidMsat:Long,state:lnrpc.Invoice.InvoiceState,htlcs:Seq[lnrpc.InvoiceHTLC],features:scala.collection.immutable.Map[Int,lnrpc.Feature],isKeysend:Boolean,paymentAddr:com.google.protobuf.ByteString,isAmp:Boolean,unknownFields:scalapb.UnknownFieldSet):lnrpc.Invoice" class="anchorToMember"></a><a id="&lt;init&gt;:Invoice" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/Invoice.html#&lt
An optional memo to attach along with the invoice. Used for record keeping
purposes for the invoice's creator, and will also be set in the description
field of the encoded payment request if the description_hash field is not
being used.</p></dd><dt class="param">rPreimage</dt><dd class="cmt"><p>
The hex-encoded preimage (32 byte) which will allow settling an incoming
HTLC payable to this preimage. When using REST, this field must be encoded
as base64.</p></dd><dt class="param">rHash</dt><dd class="cmt"><p>
The hash of the preimage. When using REST, this field must be encoded as
base64.</p></dd><dt class="param">value</dt><dd class="cmt"><p>
The value of this invoice in satoshis
The fields value and value_msat are mutually exclusive.</p></dd><dt class="param">valueMsat</dt><dd class="cmt"><p>
The value of this invoice in millisatoshis
The fields value and value_msat are mutually exclusive.</p></dd><dt class="param">settled</dt><dd class="cmt"><p>
Whether this invoice has been fulfilled</p></dd><dt class="param">creationDate</dt><dd class="cmt"><p>
When this invoice was created</p></dd><dt class="param">settleDate</dt><dd class="cmt"><p>
When this invoice was settled</p></dd><dt class="param">paymentRequest</dt><dd class="cmt"><p>
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.</p></dd><dt class="param">descriptionHash</dt><dd class="cmt"><p>
Hash (SHA-256) of a description of the payment. Used if the description of
payment (memo) is too long to naturally fit within the description field
of an encoded payment request. When using REST, this field must be encoded
as base64.</p></dd><dt class="param">expiry</dt><dd class="cmt"><p>
Payment request expiry time in seconds. Default is 3600 (1 hour).</p></dd><dt class="param">fallbackAddr</dt><dd class="cmt"><p>
Fallback on-chain address.</p></dd><dt class="param">cltvExpiry</dt><dd class="cmt"><p>
Delta to use for the time-lock of the CLTV extended to the final hop.</p></dd><dt class="param">routeHints</dt><dd class="cmt"><p>
Route hints that can each be individually used to assist in reaching the
invoice's destination.</p></dd><dt class="param">private</dt><dd class="cmt"><p>
Whether this invoice should include routing hints for private channels.</p></dd><dt class="param">addIndex</dt><dd class="cmt"><p>
The "add" index of this invoice. Each newly created invoice will increment
this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all added
invoices with an add_index greater than this one.</p></dd><dt class="param">settleIndex</dt><dd class="cmt"><p>
The "settle" index of this invoice. Each newly settled invoice will
increment this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all
settled invoices with an settle_index greater than this one.</p></dd><dt class="param">amtPaid</dt><dd class="cmt"><p>
Deprecated, use amt_paid_sat or amt_paid_msat.</p></dd><dt class="param">amtPaidSat</dt><dd class="cmt"><p>
The amount that was accepted for this invoice, in satoshis. This will ONLY
be set if this invoice has been settled. We provide this field as if the
invoice was created with a zero value, then we need to record what amount
was ultimately accepted. Additionally, it's possible that the sender paid
MORE that was specified in the original invoice. So we'll record that here
as well.</p></dd><dt class="param">amtPaidMsat</dt><dd class="cmt"><p>
The amount that was accepted for this invoice, in millisatoshis. This will
ONLY be set if this invoice has been settled. We provide this field as if
the invoice was created with a zero value, then we need to record what
amount was ultimately accepted. Additionally, it's possible that the sender
paid MORE that was specified in the original invoice. So we'll record that
here as well.</p></dd><dt class="param">state</dt><dd class="cmt"><p>
The state the invoice is in.</p></dd><dt class="param">htlcs</dt><dd class="cmt"><p>
List of HTLCs paying to this invoice [EXPERIMENTAL].</p></dd><dt class="param">features</dt><dd class="cmt"><p>
List of features advertised on the invoice.</p></dd><dt class="param">isKeysend</dt><dd class="cmt"><p>
Indicates if this invoice was a spontaneous payment that arrived via keysend
[EXPERIMENTAL].</p></dd><dt class="param">paymentAddr</dt><dd class="cmt"><p>
The payment address of this invoice. This value will be used in MPP
payments, and also for newer invoies that always require the MPP paylaod
for added end-to-end security.</p></dd><dt class="param">isAmp</dt><dd class="cmt"><p>
Signals whether or not this is an AMP invoice.</p></dd></dl></div></li></ol></div><div class="values members"><h3>Value Members</h3><ol><li class="indented0 " name="scala.AnyRef#!=" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="!=(x$1:Any):Boolean" class="anchorToMember"></a><a id="!=(Any):Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/Invoice.html#!=(x$1:Any):Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name" title="gt4s: $bang$eq">!=</span><span class="params">(<span name="arg0">arg0: <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div></li><li class="indented0 " name="scala.AnyRef###" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="##:Int" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/Invoice.html###:Int" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name" title="gt4s: $hash$hash">##</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div></li><li class="indented0 " name="scala.AnyRef#==" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="==(x$1:Any):Boolean" class="anchorToMember"></a><a id="==(Any):Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/Invoice.html#==(x$1:Any):Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name" title="gt4s: $eq$eq">==</span><span class="params">(<span name="arg0">arg0: <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div></li><li class="indented0 " name="lnrpc.Invoice#addAllFeatures" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="addAllFeatures(__vs:Iterable[(Int,lnrpc.Feature)]):lnrpc.Invoice" class="anchorToMember"></a><a id="addAllFeatures(Iterable[(Int,Feature)]):Invoice" class="anchorToMember"></a> <span class="permalink"><a href="../lnrpc/Invoice.html#addAllFeatures(__vs:Iterable[(Int,lnrpc.Feature)]):lnrpc.Invoice" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">addAllFeatures</span><span class="params">(<span name="__vs">__vs: <a href="../scala/index.html#Iterable[+A]=Iterable[A]" name="scala.Iterable" id="scala.Iterable" class="extmbr">Iterable</a>[(<a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a>, <a href="Feature.html" name="lnrpc.Feature" id="lnrpc.Feature" class="extype">Feature</a>)]</span>)</span><span class="result">: <a href="" name="lnrpc.Invoice" id="lnrpc.Invoice" class="extype">Invoice</a></span></sp