Skip to content

Commit

Permalink
f auto
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Dec 2, 2021
1 parent 2a089ba commit 1fb69fb
Show file tree
Hide file tree
Showing 529 changed files with 22,232 additions and 2,989 deletions.
529 changes: 498 additions & 31 deletions src/main/java/org/ldk/impl/bindings.java

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/APIError.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleSh
this.script = script_hu_conv;
}
}
long clone_ptr() {
long ret = bindings.APIError_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the APIError
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/AcceptChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ public void set_first_per_commitment_point(byte[] val) {
bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
}

long clone_ptr() {
long ret = bindings.AcceptChannel_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the AcceptChannel
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/structs/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static Access new_impl(AccessInterface arg) {
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 ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
});
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/AnnouncementSignatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channe
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.AnnouncementSignatures_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the AnnouncementSignatures
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/Balance.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ private MaybeClaimableHTLCAwaitingTimeout(long ptr, bindings.LDKBalance.MaybeCla
this.claimable_height = obj.claimable_height;
}
}
long clone_ptr() {
long ret = bindings.Balance_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the Balance
*/
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/ldk/structs/BaseSign.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class BaseSign extends CommonBase {
final bindings.LDKBaseSign bindings_instance;
BaseSign(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
private BaseSign(bindings.LDKBaseSign arg, ChannelPublicKeys pubkeys) {
super(bindings.LDKBaseSign_new(arg, pubkeys == null ? 0 : pubkeys.ptr & ~1));
super(bindings.LDKBaseSign_new(arg, pubkeys == null ? 0 : pubkeys.clone_ptr()));
this.ptrs_to.add(arg);
this.bindings_instance = arg;
}
Expand Down Expand Up @@ -206,7 +206,7 @@ public static BaseSign new_impl(BaseSignInterface arg, ChannelPublicKeys pubkeys
@Override public long validate_holder_commitment(long holder_tx) {
HolderCommitmentTransaction holder_tx_hu_conv = null; if (holder_tx < 0 || holder_tx > 4096) { holder_tx_hu_conv = new HolderCommitmentTransaction(null, holder_tx); }
Result_NoneNoneZ ret = arg.validate_holder_commitment(holder_tx_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public byte[] channel_keys_id() {
Expand All @@ -217,47 +217,47 @@ public static BaseSign new_impl(BaseSignInterface arg, ChannelPublicKeys pubkeys
@Override public long sign_counterparty_commitment(long commitment_tx) {
CommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new CommitmentTransaction(null, commitment_tx); }
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long validate_counterparty_revocation(long idx, byte[] secret) {
Result_NoneNoneZ ret = arg.validate_counterparty_revocation(idx, secret);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_holder_commitment_and_htlcs(long commitment_tx) {
HolderCommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new HolderCommitmentTransaction(null, commitment_tx); }
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_holder_commitment_and_htlcs(commitment_tx_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) {
Result_SignatureNoneZ ret = arg.sign_justice_revoked_output(justice_tx, input, amount, per_commitment_key);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) {
HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new HTLCOutputInCommitment(null, htlc); }
Result_SignatureNoneZ ret = arg.sign_justice_revoked_htlc(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new HTLCOutputInCommitment(null, htlc); }
Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_closing_transaction(long closing_tx) {
ClosingTransaction closing_tx_hu_conv = null; if (closing_tx < 0 || closing_tx > 4096) { closing_tx_hu_conv = new ClosingTransaction(null, closing_tx); }
Result_SignatureNoneZ ret = arg.sign_closing_transaction(closing_tx_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public long sign_channel_announcement(long msg) {
UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new UnsignedChannelAnnouncement(null, msg); }
Result_SignatureNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
@Override public void ready_channel(long channel_parameters) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/BestBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ protected void finalize() throws Throwable {
if (ptr != 0) { bindings.BestBlock_free(ptr); }
}

long clone_ptr() {
long ret = bindings.BestBlock_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the BestBlock
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public static BuiltCommitmentTransaction of(byte[] transaction_arg, byte[] txid_
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.BuiltCommitmentTransaction_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the BuiltCommitmentTransaction
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChainParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public static ChainParameters of(org.ldk.enums.Network network_arg, BestBlock be
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChainParameters_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChainParameters
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelAnnouncement.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_si
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelAnnouncement_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelAnnouncement
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ public static ChannelConfig of(int forwarding_fee_proportional_millionths_arg, i
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelConfig_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelConfig
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelCounterparty.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ public static ChannelCounterparty of(byte[] node_id_arg, InitFeatures features_a
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelCounterparty_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelCounterparty
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ public static ChannelDetails of(byte[] channel_id_arg, ChannelCounterparty count
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelDetails_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelDetails
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public boolean eq(ChannelFeatures b) {
return ret;
}

long clone_ptr() {
long ret = bindings.ChannelFeatures_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelFeatures
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelHandshakeConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelHandshakeConfig_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelHandshakeConfig
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelHandshakeLimits.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ public static ChannelHandshakeLimits of(long min_funding_satoshis_arg, long max_
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelHandshakeLimits_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelHandshakeLimits
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public static ChannelInfo of(ChannelFeatures features_arg, NodeId node_one_arg,
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelInfo_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelInfo
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/structs/ChannelManagerPersister.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static ChannelManagerPersister new_impl(ChannelManagerPersisterInterface
@Override public long persist_manager(long channel_manager) {
ChannelManager channel_manager_hu_conv = null; if (channel_manager < 0 || channel_manager > 4096) { channel_manager_hu_conv = new ChannelManager(null, channel_manager); }
Result_NoneErrorZ ret = arg.persist_manager(channel_manager_hu_conv);
long result = ret != null ? ret.ptr : 0;
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
});
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ protected void finalize() throws Throwable {
if (ptr != 0) { bindings.ChannelMonitor_free(ptr); }
}

long clone_ptr() {
long ret = bindings.ChannelMonitor_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelMonitor
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public void set_update_id(long val) {
bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
}

long clone_ptr() {
long ret = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelMonitorUpdate
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelPublicKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ public static ChannelPublicKeys of(byte[] funding_pubkey_arg, byte[] revocation_
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelPublicKeys_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelPublicKeys
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelReestablish.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public void set_next_remote_commitment_number(long val) {
bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
}

long clone_ptr() {
long ret = bindings.ChannelReestablish_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelReestablish
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public static ChannelTransactionParameters of(ChannelPublicKeys holder_pubkeys_a
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelTransactionParameters_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelTransactionParameters
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ChannelUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public static ChannelUpdate of(byte[] signature_arg, UnsignedChannelUpdate conte
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ChannelUpdate_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ChannelUpdate
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ClosingSigned.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byt
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ClosingSigned_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ClosingSigned
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ClosingSignedFeeRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_s
return ret_hu_conv;
}

long clone_ptr() {
long ret = bindings.ClosingSignedFeeRange_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ClosingSignedFeeRange
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ClosingTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ protected void finalize() throws Throwable {
if (ptr != 0) { bindings.ClosingTransaction_free(ptr); }
}

long clone_ptr() {
long ret = bindings.ClosingTransaction_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ClosingTransaction
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/ldk/structs/ClosureReason.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ private OutdatedChannelManager(long ptr, bindings.LDKClosureReason.OutdatedChann
super(null, ptr);
}
}
long clone_ptr() {
long ret = bindings.ClosureReason_clone_ptr(this.ptr);
return ret;
}

/**
* Creates a copy of the ClosureReason
*/
Expand Down
Loading

0 comments on commit 1fb69fb

Please sign in to comment.