1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * A hash for use in a specific context by tweaking with a context-dependent tag as per [BIP 340]
13 * and computed over the merkle root of a TLV stream to sign as defined in [BOLT 12].
15 * [BIP 340]: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
16 * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md#signature-calculation
18 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
19 public class TaggedHash extends CommonBase {
20 TaggedHash(Object _dummy, long ptr) { super(ptr); }
21 @Override @SuppressWarnings("deprecation")
22 protected void finalize() throws Throwable {
24 if (ptr != 0) { bindings.TaggedHash_free(ptr); }