Merge pull request #135 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / UnsignedBolt12Invoice.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10
11 /**
12  * A semantically valid [`Bolt12Invoice`] that hasn't been signed.
13  */
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class UnsignedBolt12Invoice extends CommonBase {
16         UnsignedBolt12Invoice(Object _dummy, long ptr) { super(ptr); }
17         @Override @SuppressWarnings("deprecation")
18         protected void finalize() throws Throwable {
19                 super.finalize();
20                 if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); }
21         }
22
23         /**
24          * The public key corresponding to the key needed to sign the invoice.
25          */
26         public byte[] signing_pubkey() {
27                 byte[] ret = bindings.UnsignedBolt12Invoice_signing_pubkey(this.ptr);
28                 Reference.reachabilityFence(this);
29                 return ret;
30         }
31
32 }