X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAccess.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAccess.java;h=afb25ad3337b003a668a7d3174b4068f096ab897;hb=1b870a3ffab1c0024411e30102bc6d198300f095;hp=6b4c9a9fcbb4a3028654330c2cc49cf3d290a092;hpb=246459dcbc3be28c38b4951140a5933f4b3aa024;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Access.java b/src/main/java/org/ldk/structs/Access.java index 6b4c9a9f..afb25ad3 100644 --- a/src/main/java/org/ldk/structs/Access.java +++ b/src/main/java/org/ldk/structs/Access.java @@ -5,6 +5,10 @@ import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +/** + * The `Access` trait defines behavior for accessing chain data and state, such as blocks and + * UTXOs. + */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Access extends CommonBase { final bindings.LDKAccess bindings_instance; @@ -20,6 +24,13 @@ public class Access extends CommonBase { } public static interface AccessInterface { + /** + * Returns the transaction output of a funding transaction encoded by [`short_channel_id`]. + * Returns an error if `genesis_hash` is for a different chain or if such a transaction output + * is unknown. + * + * [`short_channel_id`]: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#definition-of-short_channel_id + */ Result_TxOutAccessErrorZ get_utxo(byte[] genesis_hash, long short_channel_id); } private static class LDKAccessHolder { Access held; } @@ -34,6 +45,13 @@ public class Access extends CommonBase { }); return impl_holder.held; } + /** + * Returns the transaction output of a funding transaction encoded by [`short_channel_id`]. + * Returns an error if `genesis_hash` is for a different chain or if such a transaction output + * is unknown. + * + * [`short_channel_id`]: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#definition-of-short_channel_id + */ public Result_TxOutAccessErrorZ get_utxo(byte[] genesis_hash, long short_channel_id) { long ret = bindings.Access_get_utxo(this.ptr, genesis_hash, short_channel_id); Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);