]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/BigEndianScalar.java
Merge pull request #119 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / BigEndianScalar.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 public class BigEndianScalar extends CommonBase {
11         /** The bytes of the scalar value, in big endian */
12         public final byte[] scalar_bytes;
13
14         BigEndianScalar(java.lang.Object _dummy, long ptr) {
15                 super(ptr);
16                 this.scalar_bytes = bindings.BigEndianScalar_get_bytes(ptr);
17         }
18         public BigEndianScalar(byte[] scalar_bytes) {
19                 super(bindings.BigEndianScalar_new(scalar_bytes));
20                 this.scalar_bytes = bindings.BigEndianScalar_get_bytes(ptr);
21         }
22
23         @Override @SuppressWarnings("deprecation")
24         protected void finalize() throws Throwable {
25                 super.finalize();
26                 if (ptr != 0) { bindings.BigEndianScalar_free(ptr); }
27         }
28 }