+ 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; }
+ public static Access new_impl(AccessInterface arg) {
+ final LDKAccessHolder impl_holder = new LDKAccessHolder();
+ impl_holder.held = new Access(new bindings.LDKAccess() {
+ @Override public long get_utxo(byte[] genesis_hash, long short_channel_id) {
+ Result_TxOutAccessErrorZ ret = arg.get_utxo(genesis_hash, short_channel_id);
+ long result = ret == null ? 0 : ret.clone_ptr();
+ return result;
+ }
+ });
+ 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
+ */