public static class LDKEvent {
private LDKEvent() {}
public final static class FundingGenerationReady extends LDKEvent {
- public long temporary_channel_id;
+ public byte[] temporary_channel_id;
public long channel_value_satoshis;
public long output_script;
public long user_channel_id;
- FundingGenerationReady(long temporary_channel_id, long channel_value_satoshis, long output_script, long user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+ FundingGenerationReady(byte[] temporary_channel_id, long channel_value_satoshis, long output_script, long user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
}
public final static class FundingBroadcastSafe extends LDKEvent {
public long funding_txo;
FundingBroadcastSafe(long funding_txo, long user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
}
public final static class PaymentReceived extends LDKEvent {
- public long payment_hash;
- public long payment_secret;
+ public byte[] payment_hash;
+ public byte[] payment_secret;
public long amt;
- PaymentReceived(long payment_hash, long payment_secret, long amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
+ PaymentReceived(byte[] payment_hash, byte[] payment_secret, long amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
}
public final static class PaymentSent extends LDKEvent {
- public long payment_preimage;
- PaymentSent(long payment_preimage) { this.payment_preimage = payment_preimage; }
+ public byte[] payment_preimage;
+ PaymentSent(byte[] payment_preimage) { this.payment_preimage = payment_preimage; }
}
public final static class PaymentFailed extends LDKEvent {
- public long payment_hash;
+ public byte[] payment_hash;
public boolean rejected_by_dest;
- PaymentFailed(long payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
+ PaymentFailed(byte[] payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
}
public final static class PendingHTLCsForwardable extends LDKEvent {
public long time_forwardable;
public static native long LDKUnsignedChannelAnnouncement_optional_none();
public interface LDKChannelKeys {
long get_per_commitment_point(long idx);
- long release_commitment_secret(long idx);
+ byte[] release_commitment_secret(long idx);
long key_derivation_params();
long sign_counterparty_commitment(int feerate_per_kw, long commitment_tx, long keys, long htlcs);
long sign_holder_commitment(long holder_commitment_tx);
// LDKPublicKey LDKChannelKeys_call_get_per_commitment_point LDKChannelKeys* arg, uint64_t idx
public static native long LDKChannelKeys_call_get_per_commitment_point(long arg, long idx);
// LDKThirtyTwoBytes LDKChannelKeys_call_release_commitment_secret LDKChannelKeys* arg, uint64_t idx
- public static native long LDKChannelKeys_call_release_commitment_secret(long arg, long idx);
+ public static native byte[] LDKChannelKeys_call_release_commitment_secret(long arg, long idx);
// LDKC2Tuple_u64u64Z LDKChannelKeys_call_key_derivation_params LDKChannelKeys* arg
public static native long LDKChannelKeys_call_key_derivation_params(long arg);
// LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ LDKChannelKeys_call_sign_counterparty_commitment LDKChannelKeys* arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs
long get_destination_script();
long get_shutdown_pubkey();
long get_channel_keys(boolean inbound, long channel_value_satoshis);
- long get_secure_random_bytes();
+ byte[] get_secure_random_bytes();
}
public static native long LDKKeysInterface_new(LDKKeysInterface impl);
public static native LDKKeysInterface LDKKeysInterface_get_obj_from_jcalls(long val);
// LDKChannelKeys LDKKeysInterface_call_get_channel_keys LDKKeysInterface* arg, bool inbound, uint64_t channel_value_satoshis
public static native long LDKKeysInterface_call_get_channel_keys(long arg, boolean inbound, long channel_value_satoshis);
// LDKThirtyTwoBytes LDKKeysInterface_call_get_secure_random_bytes LDKKeysInterface* arg
- public static native long LDKKeysInterface_call_get_secure_random_bytes(long arg);
+ public static native byte[] LDKKeysInterface_call_get_secure_random_bytes(long arg);
public static native long LDKInMemoryChannelKeys_optional_none();
public static native long LDKKeysManager_optional_none();
public static native long LDKChannelManager_optional_none();
OnionV2(long addr, short port) { this.addr = addr; this.port = port; }
}
public final static class OnionV3 extends LDKNetAddress {
- public long ed25519_pubkey;
+ public byte[] ed25519_pubkey;
public short checksum;
public byte version;
public short port;
- OnionV3(long ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+ OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
}
static native void init();
}
// LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(LDKOutPoint a, LDKCVec_u8Z b);
public static native long C2Tuple_OutPointScriptZ_new(long a, long b);
// LDKC2Tuple_TxidCVec_TxOutZZ C2Tuple_TxidCVec_TxOutZZ_new(LDKThirtyTwoBytes a, LDKCVec_TxOutZ b);
- public static native long C2Tuple_TxidCVec_TxOutZZ_new(long a, long b);
+ public static native long C2Tuple_TxidCVec_TxOutZZ_new(byte[] a, long b);
// LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
public static native long C2Tuple_u64u64Z_new(long a, long b);
// LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(LDKSignature a, LDKCVec_SignatureZ b);
// const uint8_t (*OutPoint_get_txid(const LDKOutPoint *this_ptr))[32];
public static native byte[] OutPoint_get_txid(long this_ptr);
// void OutPoint_set_txid(LDKOutPoint *this_ptr, LDKThirtyTwoBytes val);
- public static native void OutPoint_set_txid(long this_ptr, long val);
+ public static native void OutPoint_set_txid(long this_ptr, byte[] val);
// uint16_t OutPoint_get_index(const LDKOutPoint *this_ptr);
public static native short OutPoint_get_index(long this_ptr);
// void OutPoint_set_index(LDKOutPoint *this_ptr, uint16_t val);
public static native void OutPoint_set_index(long this_ptr, short val);
// MUST_USE_RES LDKOutPoint OutPoint_new(LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
- public static native long OutPoint_new(long txid_arg, short index_arg);
+ public static native long OutPoint_new(byte[] txid_arg, short index_arg);
// MUST_USE_RES LDKThirtyTwoBytes OutPoint_to_channel_id(const LDKOutPoint *this_arg);
- public static native long OutPoint_to_channel_id(long this_arg);
+ public static native byte[] OutPoint_to_channel_id(long this_arg);
// LDKCVec_u8Z OutPoint_write(const LDKOutPoint *obj);
public static native long OutPoint_write(long obj);
// LDKOutPoint OutPoint_read(LDKu8slice ser);
// const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const LDKInMemoryChannelKeys *this_ptr))[32];
public static native byte[] InMemoryChannelKeys_get_commitment_seed(long this_ptr);
// void InMemoryChannelKeys_set_commitment_seed(LDKInMemoryChannelKeys *this_ptr, LDKThirtyTwoBytes val);
- public static native void InMemoryChannelKeys_set_commitment_seed(long this_ptr, long val);
+ public static native void InMemoryChannelKeys_set_commitment_seed(long this_ptr, byte[] val);
// MUST_USE_RES LDKInMemoryChannelKeys InMemoryChannelKeys_new(LDKSecretKey funding_key, LDKSecretKey revocation_base_key, LDKSecretKey payment_key, LDKSecretKey delayed_payment_base_key, LDKSecretKey htlc_base_key, LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, LDKC2Tuple_u64u64Z key_derivation_params);
- public static native long InMemoryChannelKeys_new(long funding_key, long revocation_base_key, long payment_key, long delayed_payment_base_key, long htlc_base_key, long commitment_seed, long channel_value_satoshis, long key_derivation_params);
+ public static native long InMemoryChannelKeys_new(long funding_key, long revocation_base_key, long payment_key, long delayed_payment_base_key, long htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, long key_derivation_params);
// MUST_USE_RES LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const LDKInMemoryChannelKeys *this_arg);
public static native long InMemoryChannelKeys_counterparty_pubkeys(long this_arg);
// MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const LDKInMemoryChannelKeys *this_arg);
// const uint8_t (*ChannelDetails_get_channel_id(const LDKChannelDetails *this_ptr))[32];
public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
// void ChannelDetails_set_channel_id(LDKChannelDetails *this_ptr, LDKThirtyTwoBytes val);
- public static native void ChannelDetails_set_channel_id(long this_ptr, long val);
+ public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
// LDKPublicKey ChannelDetails_get_remote_network_id(const LDKChannelDetails *this_ptr);
public static native long ChannelDetails_get_remote_network_id(long this_ptr);
// void ChannelDetails_set_remote_network_id(LDKChannelDetails *this_ptr, LDKPublicKey val);
// void ChannelManager_force_close_all_channels(const LDKChannelManager *this_arg);
public static native void ChannelManager_force_close_all_channels(long this_arg);
// MUST_USE_RES LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const LDKChannelManager *this_arg, const LDKRoute *route, LDKThirtyTwoBytes payment_hash, LDKThirtyTwoBytes payment_secret);
- public static native long ChannelManager_send_payment(long this_arg, long route, long payment_hash, long payment_secret);
+ public static native long ChannelManager_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
// void ChannelManager_funding_transaction_generated(const LDKChannelManager *this_arg, const uint8_t (*temporary_channel_id)[32], LDKOutPoint funding_txo);
public static native void ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, long funding_txo);
// void ChannelManager_broadcast_node_announcement(const LDKChannelManager *this_arg, LDKThreeBytes rgb, LDKThirtyTwoBytes alias, LDKCVec_NetAddressZ addresses);
- public static native void ChannelManager_broadcast_node_announcement(long this_arg, long rgb, long alias, long addresses);
+ public static native void ChannelManager_broadcast_node_announcement(long this_arg, long rgb, byte[] alias, long addresses);
// void ChannelManager_process_pending_htlc_forwards(const LDKChannelManager *this_arg);
public static native void ChannelManager_process_pending_htlc_forwards(long this_arg);
// void ChannelManager_timer_chan_freshness_every_min(const LDKChannelManager *this_arg);
public static native void ChannelManager_timer_chan_freshness_every_min(long this_arg);
// MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const LDKChannelManager *this_arg, const uint8_t (*payment_hash)[32], LDKThirtyTwoBytes payment_secret);
- public static native boolean ChannelManager_fail_htlc_backwards(long this_arg, byte[] payment_hash, long payment_secret);
+ public static native boolean ChannelManager_fail_htlc_backwards(long this_arg, byte[] payment_hash, byte[] payment_secret);
// MUST_USE_RES bool ChannelManager_claim_funds(const LDKChannelManager *this_arg, LDKThirtyTwoBytes payment_preimage, LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
- public static native boolean ChannelManager_claim_funds(long this_arg, long payment_preimage, long payment_secret, long expected_amount);
+ public static native boolean ChannelManager_claim_funds(long this_arg, byte[] payment_preimage, byte[] payment_secret, long expected_amount);
// MUST_USE_RES LDKPublicKey ChannelManager_get_our_node_id(const LDKChannelManager *this_arg);
public static native long ChannelManager_get_our_node_id(long this_arg);
// void ChannelManager_channel_monitor_updated(const LDKChannelManager *this_arg, const LDKOutPoint *funding_txo, uint64_t highest_applied_update_id);
// const uint8_t (*ErrorMessage_get_channel_id(const LDKErrorMessage *this_ptr))[32];
public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
// void ErrorMessage_set_channel_id(LDKErrorMessage *this_ptr, LDKThirtyTwoBytes val);
- public static native void ErrorMessage_set_channel_id(long this_ptr, long val);
+ public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val);
// LDKStr ErrorMessage_get_data(const LDKErrorMessage *this_ptr);
public static native long ErrorMessage_get_data(long this_ptr);
// void ErrorMessage_set_data(LDKErrorMessage *this_ptr, LDKCVec_u8Z val);
public static native void ErrorMessage_set_data(long this_ptr, long val);
// MUST_USE_RES LDKErrorMessage ErrorMessage_new(LDKThirtyTwoBytes channel_id_arg, LDKCVec_u8Z data_arg);
- public static native long ErrorMessage_new(long channel_id_arg, long data_arg);
+ public static native long ErrorMessage_new(byte[] channel_id_arg, long data_arg);
// void Ping_free(LDKPing this_ptr);
public static native void Ping_free(long this_ptr);
// uint16_t Ping_get_ponglen(const LDKPing *this_ptr);
// const uint8_t (*OpenChannel_get_chain_hash(const LDKOpenChannel *this_ptr))[32];
public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
// void OpenChannel_set_chain_hash(LDKOpenChannel *this_ptr, LDKThirtyTwoBytes val);
- public static native void OpenChannel_set_chain_hash(long this_ptr, long val);
+ public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val);
// const uint8_t (*OpenChannel_get_temporary_channel_id(const LDKOpenChannel *this_ptr))[32];
public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
// void OpenChannel_set_temporary_channel_id(LDKOpenChannel *this_ptr, LDKThirtyTwoBytes val);
- public static native void OpenChannel_set_temporary_channel_id(long this_ptr, long val);
+ public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val);
// uint64_t OpenChannel_get_funding_satoshis(const LDKOpenChannel *this_ptr);
public static native long OpenChannel_get_funding_satoshis(long this_ptr);
// void OpenChannel_set_funding_satoshis(LDKOpenChannel *this_ptr, uint64_t val);
// const uint8_t (*AcceptChannel_get_temporary_channel_id(const LDKAcceptChannel *this_ptr))[32];
public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
// void AcceptChannel_set_temporary_channel_id(LDKAcceptChannel *this_ptr, LDKThirtyTwoBytes val);
- public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, long val);
+ public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val);
// uint64_t AcceptChannel_get_dust_limit_satoshis(const LDKAcceptChannel *this_ptr);
public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr);
// void AcceptChannel_set_dust_limit_satoshis(LDKAcceptChannel *this_ptr, uint64_t val);
// const uint8_t (*FundingCreated_get_temporary_channel_id(const LDKFundingCreated *this_ptr))[32];
public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
// void FundingCreated_set_temporary_channel_id(LDKFundingCreated *this_ptr, LDKThirtyTwoBytes val);
- public static native void FundingCreated_set_temporary_channel_id(long this_ptr, long val);
+ public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val);
// const uint8_t (*FundingCreated_get_funding_txid(const LDKFundingCreated *this_ptr))[32];
public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
// void FundingCreated_set_funding_txid(LDKFundingCreated *this_ptr, LDKThirtyTwoBytes val);
- public static native void FundingCreated_set_funding_txid(long this_ptr, long val);
+ public static native void FundingCreated_set_funding_txid(long this_ptr, byte[] val);
// uint16_t FundingCreated_get_funding_output_index(const LDKFundingCreated *this_ptr);
public static native short FundingCreated_get_funding_output_index(long this_ptr);
// void FundingCreated_set_funding_output_index(LDKFundingCreated *this_ptr, uint16_t val);
// void FundingCreated_set_signature(LDKFundingCreated *this_ptr, LDKSignature val);
public static native void FundingCreated_set_signature(long this_ptr, long val);
// MUST_USE_RES LDKFundingCreated FundingCreated_new(LDKThirtyTwoBytes temporary_channel_id_arg, LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, LDKSignature signature_arg);
- public static native long FundingCreated_new(long temporary_channel_id_arg, long funding_txid_arg, short funding_output_index_arg, long signature_arg);
+ public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, long signature_arg);
// void FundingSigned_free(LDKFundingSigned this_ptr);
public static native void FundingSigned_free(long this_ptr);
// const uint8_t (*FundingSigned_get_channel_id(const LDKFundingSigned *this_ptr))[32];
public static native byte[] FundingSigned_get_channel_id(long this_ptr);
// void FundingSigned_set_channel_id(LDKFundingSigned *this_ptr, LDKThirtyTwoBytes val);
- public static native void FundingSigned_set_channel_id(long this_ptr, long val);
+ public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val);
// LDKSignature FundingSigned_get_signature(const LDKFundingSigned *this_ptr);
public static native long FundingSigned_get_signature(long this_ptr);
// void FundingSigned_set_signature(LDKFundingSigned *this_ptr, LDKSignature val);
public static native void FundingSigned_set_signature(long this_ptr, long val);
// MUST_USE_RES LDKFundingSigned FundingSigned_new(LDKThirtyTwoBytes channel_id_arg, LDKSignature signature_arg);
- public static native long FundingSigned_new(long channel_id_arg, long signature_arg);
+ public static native long FundingSigned_new(byte[] channel_id_arg, long signature_arg);
// void FundingLocked_free(LDKFundingLocked this_ptr);
public static native void FundingLocked_free(long this_ptr);
// const uint8_t (*FundingLocked_get_channel_id(const LDKFundingLocked *this_ptr))[32];
public static native byte[] FundingLocked_get_channel_id(long this_ptr);
// void FundingLocked_set_channel_id(LDKFundingLocked *this_ptr, LDKThirtyTwoBytes val);
- public static native void FundingLocked_set_channel_id(long this_ptr, long val);
+ public static native void FundingLocked_set_channel_id(long this_ptr, byte[] val);
// LDKPublicKey FundingLocked_get_next_per_commitment_point(const LDKFundingLocked *this_ptr);
public static native long FundingLocked_get_next_per_commitment_point(long this_ptr);
// void FundingLocked_set_next_per_commitment_point(LDKFundingLocked *this_ptr, LDKPublicKey val);
public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, long val);
// MUST_USE_RES LDKFundingLocked FundingLocked_new(LDKThirtyTwoBytes channel_id_arg, LDKPublicKey next_per_commitment_point_arg);
- public static native long FundingLocked_new(long channel_id_arg, long next_per_commitment_point_arg);
+ public static native long FundingLocked_new(byte[] channel_id_arg, long next_per_commitment_point_arg);
// void Shutdown_free(LDKShutdown this_ptr);
public static native void Shutdown_free(long this_ptr);
// const uint8_t (*Shutdown_get_channel_id(const LDKShutdown *this_ptr))[32];
public static native byte[] Shutdown_get_channel_id(long this_ptr);
// void Shutdown_set_channel_id(LDKShutdown *this_ptr, LDKThirtyTwoBytes val);
- public static native void Shutdown_set_channel_id(long this_ptr, long val);
+ public static native void Shutdown_set_channel_id(long this_ptr, byte[] val);
// LDKu8slice Shutdown_get_scriptpubkey(const LDKShutdown *this_ptr);
public static native long Shutdown_get_scriptpubkey(long this_ptr);
// void Shutdown_set_scriptpubkey(LDKShutdown *this_ptr, LDKCVec_u8Z val);
public static native void Shutdown_set_scriptpubkey(long this_ptr, long val);
// MUST_USE_RES LDKShutdown Shutdown_new(LDKThirtyTwoBytes channel_id_arg, LDKCVec_u8Z scriptpubkey_arg);
- public static native long Shutdown_new(long channel_id_arg, long scriptpubkey_arg);
+ public static native long Shutdown_new(byte[] channel_id_arg, long scriptpubkey_arg);
// void ClosingSigned_free(LDKClosingSigned this_ptr);
public static native void ClosingSigned_free(long this_ptr);
// const uint8_t (*ClosingSigned_get_channel_id(const LDKClosingSigned *this_ptr))[32];
public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
// void ClosingSigned_set_channel_id(LDKClosingSigned *this_ptr, LDKThirtyTwoBytes val);
- public static native void ClosingSigned_set_channel_id(long this_ptr, long val);
+ public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val);
// uint64_t ClosingSigned_get_fee_satoshis(const LDKClosingSigned *this_ptr);
public static native long ClosingSigned_get_fee_satoshis(long this_ptr);
// void ClosingSigned_set_fee_satoshis(LDKClosingSigned *this_ptr, uint64_t val);
// void ClosingSigned_set_signature(LDKClosingSigned *this_ptr, LDKSignature val);
public static native void ClosingSigned_set_signature(long this_ptr, long val);
// MUST_USE_RES LDKClosingSigned ClosingSigned_new(LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, LDKSignature signature_arg);
- public static native long ClosingSigned_new(long channel_id_arg, long fee_satoshis_arg, long signature_arg);
+ public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, long signature_arg);
// void UpdateAddHTLC_free(LDKUpdateAddHTLC this_ptr);
public static native void UpdateAddHTLC_free(long this_ptr);
// const uint8_t (*UpdateAddHTLC_get_channel_id(const LDKUpdateAddHTLC *this_ptr))[32];
public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
// void UpdateAddHTLC_set_channel_id(LDKUpdateAddHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateAddHTLC_set_channel_id(long this_ptr, long val);
+ public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val);
// uint64_t UpdateAddHTLC_get_htlc_id(const LDKUpdateAddHTLC *this_ptr);
public static native long UpdateAddHTLC_get_htlc_id(long this_ptr);
// void UpdateAddHTLC_set_htlc_id(LDKUpdateAddHTLC *this_ptr, uint64_t val);
// const uint8_t (*UpdateAddHTLC_get_payment_hash(const LDKUpdateAddHTLC *this_ptr))[32];
public static native byte[] UpdateAddHTLC_get_payment_hash(long this_ptr);
// void UpdateAddHTLC_set_payment_hash(LDKUpdateAddHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, long val);
+ public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, byte[] val);
// uint32_t UpdateAddHTLC_get_cltv_expiry(const LDKUpdateAddHTLC *this_ptr);
public static native int UpdateAddHTLC_get_cltv_expiry(long this_ptr);
// void UpdateAddHTLC_set_cltv_expiry(LDKUpdateAddHTLC *this_ptr, uint32_t val);
// const uint8_t (*UpdateFulfillHTLC_get_channel_id(const LDKUpdateFulfillHTLC *this_ptr))[32];
public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
// void UpdateFulfillHTLC_set_channel_id(LDKUpdateFulfillHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, long val);
+ public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val);
// uint64_t UpdateFulfillHTLC_get_htlc_id(const LDKUpdateFulfillHTLC *this_ptr);
public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr);
// void UpdateFulfillHTLC_set_htlc_id(LDKUpdateFulfillHTLC *this_ptr, uint64_t val);
// const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const LDKUpdateFulfillHTLC *this_ptr))[32];
public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
// void UpdateFulfillHTLC_set_payment_preimage(LDKUpdateFulfillHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, long val);
+ public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
// MUST_USE_RES LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, LDKThirtyTwoBytes payment_preimage_arg);
- public static native long UpdateFulfillHTLC_new(long channel_id_arg, long htlc_id_arg, long payment_preimage_arg);
+ public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
// void UpdateFailHTLC_free(LDKUpdateFailHTLC this_ptr);
public static native void UpdateFailHTLC_free(long this_ptr);
// const uint8_t (*UpdateFailHTLC_get_channel_id(const LDKUpdateFailHTLC *this_ptr))[32];
public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
// void UpdateFailHTLC_set_channel_id(LDKUpdateFailHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateFailHTLC_set_channel_id(long this_ptr, long val);
+ public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val);
// uint64_t UpdateFailHTLC_get_htlc_id(const LDKUpdateFailHTLC *this_ptr);
public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
// void UpdateFailHTLC_set_htlc_id(LDKUpdateFailHTLC *this_ptr, uint64_t val);
// const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const LDKUpdateFailMalformedHTLC *this_ptr))[32];
public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
// void UpdateFailMalformedHTLC_set_channel_id(LDKUpdateFailMalformedHTLC *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, long val);
+ public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val);
// uint64_t UpdateFailMalformedHTLC_get_htlc_id(const LDKUpdateFailMalformedHTLC *this_ptr);
public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr);
// void UpdateFailMalformedHTLC_set_htlc_id(LDKUpdateFailMalformedHTLC *this_ptr, uint64_t val);
// const uint8_t (*CommitmentSigned_get_channel_id(const LDKCommitmentSigned *this_ptr))[32];
public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
// void CommitmentSigned_set_channel_id(LDKCommitmentSigned *this_ptr, LDKThirtyTwoBytes val);
- public static native void CommitmentSigned_set_channel_id(long this_ptr, long val);
+ public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val);
// LDKSignature CommitmentSigned_get_signature(const LDKCommitmentSigned *this_ptr);
public static native long CommitmentSigned_get_signature(long this_ptr);
// void CommitmentSigned_set_signature(LDKCommitmentSigned *this_ptr, LDKSignature val);
// void CommitmentSigned_set_htlc_signatures(LDKCommitmentSigned *this_ptr, LDKCVec_SignatureZ val);
public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, long val);
// MUST_USE_RES LDKCommitmentSigned CommitmentSigned_new(LDKThirtyTwoBytes channel_id_arg, LDKSignature signature_arg, LDKCVec_SignatureZ htlc_signatures_arg);
- public static native long CommitmentSigned_new(long channel_id_arg, long signature_arg, long htlc_signatures_arg);
+ public static native long CommitmentSigned_new(byte[] channel_id_arg, long signature_arg, long htlc_signatures_arg);
// void RevokeAndACK_free(LDKRevokeAndACK this_ptr);
public static native void RevokeAndACK_free(long this_ptr);
// const uint8_t (*RevokeAndACK_get_channel_id(const LDKRevokeAndACK *this_ptr))[32];
public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
// void RevokeAndACK_set_channel_id(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
- public static native void RevokeAndACK_set_channel_id(long this_ptr, long val);
+ public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val);
// const uint8_t (*RevokeAndACK_get_per_commitment_secret(const LDKRevokeAndACK *this_ptr))[32];
public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
// void RevokeAndACK_set_per_commitment_secret(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
- public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, long val);
+ public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, byte[] val);
// LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const LDKRevokeAndACK *this_ptr);
public static native long RevokeAndACK_get_next_per_commitment_point(long this_ptr);
// void RevokeAndACK_set_next_per_commitment_point(LDKRevokeAndACK *this_ptr, LDKPublicKey val);
public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, long val);
// MUST_USE_RES LDKRevokeAndACK RevokeAndACK_new(LDKThirtyTwoBytes channel_id_arg, LDKThirtyTwoBytes per_commitment_secret_arg, LDKPublicKey next_per_commitment_point_arg);
- public static native long RevokeAndACK_new(long channel_id_arg, long per_commitment_secret_arg, long next_per_commitment_point_arg);
+ public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, long next_per_commitment_point_arg);
// void UpdateFee_free(LDKUpdateFee this_ptr);
public static native void UpdateFee_free(long this_ptr);
// const uint8_t (*UpdateFee_get_channel_id(const LDKUpdateFee *this_ptr))[32];
public static native byte[] UpdateFee_get_channel_id(long this_ptr);
// void UpdateFee_set_channel_id(LDKUpdateFee *this_ptr, LDKThirtyTwoBytes val);
- public static native void UpdateFee_set_channel_id(long this_ptr, long val);
+ public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val);
// uint32_t UpdateFee_get_feerate_per_kw(const LDKUpdateFee *this_ptr);
public static native int UpdateFee_get_feerate_per_kw(long this_ptr);
// void UpdateFee_set_feerate_per_kw(LDKUpdateFee *this_ptr, uint32_t val);
public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
// MUST_USE_RES LDKUpdateFee UpdateFee_new(LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
- public static native long UpdateFee_new(long channel_id_arg, int feerate_per_kw_arg);
+ public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
// void DataLossProtect_free(LDKDataLossProtect this_ptr);
public static native void DataLossProtect_free(long this_ptr);
// const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const LDKDataLossProtect *this_ptr))[32];
public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
// void DataLossProtect_set_your_last_per_commitment_secret(LDKDataLossProtect *this_ptr, LDKThirtyTwoBytes val);
- public static native void DataLossProtect_set_your_last_per_commitment_secret(long this_ptr, long val);
+ public static native void DataLossProtect_set_your_last_per_commitment_secret(long this_ptr, byte[] val);
// LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const LDKDataLossProtect *this_ptr);
public static native long DataLossProtect_get_my_current_per_commitment_point(long this_ptr);
// void DataLossProtect_set_my_current_per_commitment_point(LDKDataLossProtect *this_ptr, LDKPublicKey val);
public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, long val);
// MUST_USE_RES LDKDataLossProtect DataLossProtect_new(LDKThirtyTwoBytes your_last_per_commitment_secret_arg, LDKPublicKey my_current_per_commitment_point_arg);
- public static native long DataLossProtect_new(long your_last_per_commitment_secret_arg, long my_current_per_commitment_point_arg);
+ public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, long my_current_per_commitment_point_arg);
// void ChannelReestablish_free(LDKChannelReestablish this_ptr);
public static native void ChannelReestablish_free(long this_ptr);
// const uint8_t (*ChannelReestablish_get_channel_id(const LDKChannelReestablish *this_ptr))[32];
public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
// void ChannelReestablish_set_channel_id(LDKChannelReestablish *this_ptr, LDKThirtyTwoBytes val);
- public static native void ChannelReestablish_set_channel_id(long this_ptr, long val);
+ public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val);
// uint64_t ChannelReestablish_get_next_local_commitment_number(const LDKChannelReestablish *this_ptr);
public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr);
// void ChannelReestablish_set_next_local_commitment_number(LDKChannelReestablish *this_ptr, uint64_t val);
// const uint8_t (*AnnouncementSignatures_get_channel_id(const LDKAnnouncementSignatures *this_ptr))[32];
public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
// void AnnouncementSignatures_set_channel_id(LDKAnnouncementSignatures *this_ptr, LDKThirtyTwoBytes val);
- public static native void AnnouncementSignatures_set_channel_id(long this_ptr, long val);
+ public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val);
// uint64_t AnnouncementSignatures_get_short_channel_id(const LDKAnnouncementSignatures *this_ptr);
public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr);
// void AnnouncementSignatures_set_short_channel_id(LDKAnnouncementSignatures *this_ptr, uint64_t val);
// void AnnouncementSignatures_set_bitcoin_signature(LDKAnnouncementSignatures *this_ptr, LDKSignature val);
public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, long val);
// MUST_USE_RES LDKAnnouncementSignatures AnnouncementSignatures_new(LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, LDKSignature node_signature_arg, LDKSignature bitcoin_signature_arg);
- public static native long AnnouncementSignatures_new(long channel_id_arg, long short_channel_id_arg, long node_signature_arg, long bitcoin_signature_arg);
+ public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, long node_signature_arg, long bitcoin_signature_arg);
// void NetAddress_free(LDKNetAddress this_ptr);
public static native void NetAddress_free(long this_ptr);
// void UnsignedNodeAnnouncement_free(LDKUnsignedNodeAnnouncement this_ptr);
// const uint8_t (*UnsignedNodeAnnouncement_get_alias(const LDKUnsignedNodeAnnouncement *this_ptr))[32];
public static native byte[] UnsignedNodeAnnouncement_get_alias(long this_ptr);
// void UnsignedNodeAnnouncement_set_alias(LDKUnsignedNodeAnnouncement *this_ptr, LDKThirtyTwoBytes val);
- public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, long val);
+ public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
// void UnsignedNodeAnnouncement_set_addresses(LDKUnsignedNodeAnnouncement *this_ptr, LDKCVec_NetAddressZ val);
public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long val);
// void NodeAnnouncement_free(LDKNodeAnnouncement this_ptr);
// const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const LDKUnsignedChannelAnnouncement *this_ptr))[32];
public static native byte[] UnsignedChannelAnnouncement_get_chain_hash(long this_ptr);
// void UnsignedChannelAnnouncement_set_chain_hash(LDKUnsignedChannelAnnouncement *this_ptr, LDKThirtyTwoBytes val);
- public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, long val);
+ public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, byte[] val);
// uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const LDKUnsignedChannelAnnouncement *this_ptr);
public static native long UnsignedChannelAnnouncement_get_short_channel_id(long this_ptr);
// void UnsignedChannelAnnouncement_set_short_channel_id(LDKUnsignedChannelAnnouncement *this_ptr, uint64_t val);
// const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const LDKUnsignedChannelUpdate *this_ptr))[32];
public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
// void UnsignedChannelUpdate_set_chain_hash(LDKUnsignedChannelUpdate *this_ptr, LDKThirtyTwoBytes val);
- public static native void UnsignedChannelUpdate_set_chain_hash(long this_ptr, long val);
+ public static native void UnsignedChannelUpdate_set_chain_hash(long this_ptr, byte[] val);
// uint64_t UnsignedChannelUpdate_get_short_channel_id(const LDKUnsignedChannelUpdate *this_ptr);
public static native long UnsignedChannelUpdate_get_short_channel_id(long this_ptr);
// void UnsignedChannelUpdate_set_short_channel_id(LDKUnsignedChannelUpdate *this_ptr, uint64_t val);
// const uint8_t (*QueryChannelRange_get_chain_hash(const LDKQueryChannelRange *this_ptr))[32];
public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
// void QueryChannelRange_set_chain_hash(LDKQueryChannelRange *this_ptr, LDKThirtyTwoBytes val);
- public static native void QueryChannelRange_set_chain_hash(long this_ptr, long val);
+ public static native void QueryChannelRange_set_chain_hash(long this_ptr, byte[] val);
// uint32_t QueryChannelRange_get_first_blocknum(const LDKQueryChannelRange *this_ptr);
public static native int QueryChannelRange_get_first_blocknum(long this_ptr);
// void QueryChannelRange_set_first_blocknum(LDKQueryChannelRange *this_ptr, uint32_t val);
// void QueryChannelRange_set_number_of_blocks(LDKQueryChannelRange *this_ptr, uint32_t val);
public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val);
// MUST_USE_RES LDKQueryChannelRange QueryChannelRange_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
- public static native long QueryChannelRange_new(long chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
+ public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
// void ReplyChannelRange_free(LDKReplyChannelRange this_ptr);
public static native void ReplyChannelRange_free(long this_ptr);
// const uint8_t (*ReplyChannelRange_get_chain_hash(const LDKReplyChannelRange *this_ptr))[32];
public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
// void ReplyChannelRange_set_chain_hash(LDKReplyChannelRange *this_ptr, LDKThirtyTwoBytes val);
- public static native void ReplyChannelRange_set_chain_hash(long this_ptr, long val);
+ public static native void ReplyChannelRange_set_chain_hash(long this_ptr, byte[] val);
// uint32_t ReplyChannelRange_get_first_blocknum(const LDKReplyChannelRange *this_ptr);
public static native int ReplyChannelRange_get_first_blocknum(long this_ptr);
// void ReplyChannelRange_set_first_blocknum(LDKReplyChannelRange *this_ptr, uint32_t val);
// void ReplyChannelRange_set_short_channel_ids(LDKReplyChannelRange *this_ptr, LDKCVec_u64Z val);
public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long val);
// MUST_USE_RES LDKReplyChannelRange ReplyChannelRange_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, LDKCVec_u64Z short_channel_ids_arg);
- public static native long ReplyChannelRange_new(long chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long short_channel_ids_arg);
+ public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long short_channel_ids_arg);
// void QueryShortChannelIds_free(LDKQueryShortChannelIds this_ptr);
public static native void QueryShortChannelIds_free(long this_ptr);
// const uint8_t (*QueryShortChannelIds_get_chain_hash(const LDKQueryShortChannelIds *this_ptr))[32];
public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
// void QueryShortChannelIds_set_chain_hash(LDKQueryShortChannelIds *this_ptr, LDKThirtyTwoBytes val);
- public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, long val);
+ public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, byte[] val);
// void QueryShortChannelIds_set_short_channel_ids(LDKQueryShortChannelIds *this_ptr, LDKCVec_u64Z val);
public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long val);
// MUST_USE_RES LDKQueryShortChannelIds QueryShortChannelIds_new(LDKThirtyTwoBytes chain_hash_arg, LDKCVec_u64Z short_channel_ids_arg);
- public static native long QueryShortChannelIds_new(long chain_hash_arg, long short_channel_ids_arg);
+ public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long short_channel_ids_arg);
// void ReplyShortChannelIdsEnd_free(LDKReplyShortChannelIdsEnd this_ptr);
public static native void ReplyShortChannelIdsEnd_free(long this_ptr);
// const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const LDKReplyShortChannelIdsEnd *this_ptr))[32];
public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
// void ReplyShortChannelIdsEnd_set_chain_hash(LDKReplyShortChannelIdsEnd *this_ptr, LDKThirtyTwoBytes val);
- public static native void ReplyShortChannelIdsEnd_set_chain_hash(long this_ptr, long val);
+ public static native void ReplyShortChannelIdsEnd_set_chain_hash(long this_ptr, byte[] val);
// bool ReplyShortChannelIdsEnd_get_full_information(const LDKReplyShortChannelIdsEnd *this_ptr);
public static native boolean ReplyShortChannelIdsEnd_get_full_information(long this_ptr);
// void ReplyShortChannelIdsEnd_set_full_information(LDKReplyShortChannelIdsEnd *this_ptr, bool val);
public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val);
// MUST_USE_RES LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
- public static native long ReplyShortChannelIdsEnd_new(long chain_hash_arg, boolean full_information_arg);
+ public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
// void GossipTimestampFilter_free(LDKGossipTimestampFilter this_ptr);
public static native void GossipTimestampFilter_free(long this_ptr);
// const uint8_t (*GossipTimestampFilter_get_chain_hash(const LDKGossipTimestampFilter *this_ptr))[32];
public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
// void GossipTimestampFilter_set_chain_hash(LDKGossipTimestampFilter *this_ptr, LDKThirtyTwoBytes val);
- public static native void GossipTimestampFilter_set_chain_hash(long this_ptr, long val);
+ public static native void GossipTimestampFilter_set_chain_hash(long this_ptr, byte[] val);
// uint32_t GossipTimestampFilter_get_first_timestamp(const LDKGossipTimestampFilter *this_ptr);
public static native int GossipTimestampFilter_get_first_timestamp(long this_ptr);
// void GossipTimestampFilter_set_first_timestamp(LDKGossipTimestampFilter *this_ptr, uint32_t val);
// void GossipTimestampFilter_set_timestamp_range(LDKGossipTimestampFilter *this_ptr, uint32_t val);
public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);
// MUST_USE_RES LDKGossipTimestampFilter GossipTimestampFilter_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
- public static native long GossipTimestampFilter_new(long chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
+ public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
// void ErrorAction_free(LDKErrorAction this_ptr);
public static native void ErrorAction_free(long this_ptr);
// void LightningError_free(LDKLightningError this_ptr);
// void PeerManager_timer_tick_occured(const LDKPeerManager *this_arg);
public static native void PeerManager_timer_tick_occured(long this_arg);
// LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
- public static native long build_commitment_secret(byte[] commitment_seed, long idx);
+ public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
// LDKCResult_SecretKeySecpErrorZ derive_private_key(LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
public static native long derive_private_key(long per_commitment_point, byte[] base_secret);
// LDKCResult_PublicKeySecpErrorZ derive_public_key(LDKPublicKey per_commitment_point, LDKPublicKey base_point);
// const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const LDKHTLCOutputInCommitment *this_ptr))[32];
public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
// void HTLCOutputInCommitment_set_payment_hash(LDKHTLCOutputInCommitment *this_ptr, LDKThirtyTwoBytes val);
- public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, long val);
+ public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
// LDKCVec_u8Z HTLCOutputInCommitment_write(const LDKHTLCOutputInCommitment *obj);
public static native long HTLCOutputInCommitment_write(long obj);
// LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(LDKu8slice ser);
// MUST_USE_RES LDKTxCreationKeys HolderCommitmentTransaction_trust_key_derivation(const LDKHolderCommitmentTransaction *this_arg);
public static native long HolderCommitmentTransaction_trust_key_derivation(long this_arg);
// MUST_USE_RES LDKThirtyTwoBytes HolderCommitmentTransaction_txid(const LDKHolderCommitmentTransaction *this_arg);
- public static native long HolderCommitmentTransaction_txid(long this_arg);
+ public static native byte[] HolderCommitmentTransaction_txid(long this_arg);
// MUST_USE_RES LDKSignature HolderCommitmentTransaction_get_holder_sig(const LDKHolderCommitmentTransaction *this_arg, const uint8_t (*funding_key)[32], LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
public static native long HolderCommitmentTransaction_get_holder_sig(long this_arg, byte[] funding_key, long funding_redeemscript, long channel_value_satoshis);
// MUST_USE_RES LDKCResult_CVec_SignatureZNoneZ HolderCommitmentTransaction_get_htlc_sigs(const LDKHolderCommitmentTransaction *this_arg, const uint8_t (*htlc_base_key)[32], uint16_t counterparty_selected_contest_delay);
// const uint8_t (*NodeAnnouncementInfo_get_alias(const LDKNodeAnnouncementInfo *this_ptr))[32];
public static native byte[] NodeAnnouncementInfo_get_alias(long this_ptr);
// void NodeAnnouncementInfo_set_alias(LDKNodeAnnouncementInfo *this_ptr, LDKThirtyTwoBytes val);
- public static native void NodeAnnouncementInfo_set_alias(long this_ptr, long val);
+ public static native void NodeAnnouncementInfo_set_alias(long this_ptr, byte[] val);
// void NodeAnnouncementInfo_set_addresses(LDKNodeAnnouncementInfo *this_ptr, LDKCVec_NetAddressZ val);
public static native void NodeAnnouncementInfo_set_addresses(long this_ptr, long val);
// LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const LDKNodeAnnouncementInfo *this_ptr);
// void NodeAnnouncementInfo_set_announcement_message(LDKNodeAnnouncementInfo *this_ptr, LDKNodeAnnouncement val);
public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
// MUST_USE_RES LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(LDKNodeFeatures features_arg, uint32_t last_update_arg, LDKThreeBytes rgb_arg, LDKThirtyTwoBytes alias_arg, LDKCVec_NetAddressZ addresses_arg, LDKNodeAnnouncement announcement_message_arg);
- public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, long rgb_arg, long alias_arg, long addresses_arg, long announcement_message_arg);
+ public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, long rgb_arg, byte[] alias_arg, long addresses_arg, long announcement_message_arg);
// LDKCVec_u8Z NodeAnnouncementInfo_write(const LDKNodeAnnouncementInfo *obj);
public static native long NodeAnnouncementInfo_write(long obj);
// LDKNodeAnnouncementInfo NodeAnnouncementInfo_read(LDKu8slice ser);
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKAPIError *obj = (LDKAPIError*)ptr;
switch(obj->tag) {
- case LDKAPIError_APIMisuseError:
- return (*env)->NewObject(env, LDKAPIError_APIMisuseError_class, LDKAPIError_APIMisuseError_meth,
- (long)&obj->api_misuse_error.err
- );
- case LDKAPIError_FeeRateTooHigh:
- return (*env)->NewObject(env, LDKAPIError_FeeRateTooHigh_class, LDKAPIError_FeeRateTooHigh_meth,
- (long)&obj->fee_rate_too_high.err, obj->fee_rate_too_high.feerate
- );
- case LDKAPIError_RouteError:
- return (*env)->NewObject(env, LDKAPIError_RouteError_class, LDKAPIError_RouteError_meth,
- (long)&obj->route_error.err
- );
- case LDKAPIError_ChannelUnavailable:
- return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth,
- (long)&obj->channel_unavailable.err
- );
- case LDKAPIError_MonitorUpdateFailed:
+ case LDKAPIError_APIMisuseError: {
+ long err_ref = (long)&obj->api_misuse_error.err;
+ return (*env)->NewObject(env, LDKAPIError_APIMisuseError_class, LDKAPIError_APIMisuseError_meth, err_ref);
+ }
+ case LDKAPIError_FeeRateTooHigh: {
+ long err_ref = (long)&obj->fee_rate_too_high.err;
+ return (*env)->NewObject(env, LDKAPIError_FeeRateTooHigh_class, LDKAPIError_FeeRateTooHigh_meth, err_ref, obj->fee_rate_too_high.feerate);
+ }
+ case LDKAPIError_RouteError: {
+ long err_ref = (long)&obj->route_error.err;
+ return (*env)->NewObject(env, LDKAPIError_RouteError_class, LDKAPIError_RouteError_meth, err_ref);
+ }
+ case LDKAPIError_ChannelUnavailable: {
+ long err_ref = (long)&obj->channel_unavailable.err;
+ return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth, err_ref);
+ }
+ case LDKAPIError_MonitorUpdateFailed: {
return (*env)->NewObject(env, LDKAPIError_MonitorUpdateFailed_class, LDKAPIError_MonitorUpdateFailed_meth);
+ }
default: abort();
}
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
switch(obj->tag) {
- case LDKSpendableOutputDescriptor_StaticOutput:
- return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth,
- (long)&obj->static_output.outpoint, (long)&obj->static_output.output
- );
- case LDKSpendableOutputDescriptor_DynamicOutputP2WSH:
- return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth,
- (long)&obj->dynamic_output_p2wsh.outpoint, (long)&obj->dynamic_output_p2wsh.per_commitment_point, obj->dynamic_output_p2wsh.to_self_delay, (long)&obj->dynamic_output_p2wsh.output, (long)&obj->dynamic_output_p2wsh.key_derivation_params, (long)&obj->dynamic_output_p2wsh.revocation_pubkey
- );
- case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment:
- return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth,
- (long)&obj->static_output_counterparty_payment.outpoint, (long)&obj->static_output_counterparty_payment.output, (long)&obj->static_output_counterparty_payment.key_derivation_params
- );
+ case LDKSpendableOutputDescriptor_StaticOutput: {
+ long outpoint_ref = (long)&obj->static_output.outpoint;
+ long output_ref = (long)&obj->static_output.output;
+ return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, output_ref);
+ }
+ case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
+ long outpoint_ref = (long)&obj->dynamic_output_p2wsh.outpoint;
+ long per_commitment_point_ref = (long)&obj->dynamic_output_p2wsh.per_commitment_point;
+ long output_ref = (long)&obj->dynamic_output_p2wsh.output;
+ long key_derivation_params_ref = (long)&obj->dynamic_output_p2wsh.key_derivation_params;
+ long revocation_pubkey_ref = (long)&obj->dynamic_output_p2wsh.revocation_pubkey;
+ return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth, outpoint_ref, per_commitment_point_ref, obj->dynamic_output_p2wsh.to_self_delay, output_ref, key_derivation_params_ref, revocation_pubkey_ref);
+ }
+ case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
+ long outpoint_ref = (long)&obj->static_output_counterparty_payment.outpoint;
+ long output_ref = (long)&obj->static_output_counterparty_payment.output;
+ long key_derivation_params_ref = (long)&obj->static_output_counterparty_payment.key_derivation_params;
+ return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth, outpoint_ref, output_ref, key_derivation_params_ref);
+ }
default: abort();
}
}
LDKEvent_FundingGenerationReady_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingGenerationReady;"));
DO_ASSERT(LDKEvent_FundingGenerationReady_class != NULL);
- LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "(JJJJ)V");
+ LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([BJJJ)V");
DO_ASSERT(LDKEvent_FundingGenerationReady_meth != NULL);
LDKEvent_FundingBroadcastSafe_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingBroadcastSafe;"));
LDKEvent_PaymentReceived_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentReceived;"));
DO_ASSERT(LDKEvent_PaymentReceived_class != NULL);
- LDKEvent_PaymentReceived_meth = (*env)->GetMethodID(env, LDKEvent_PaymentReceived_class, "<init>", "(JJJ)V");
+ LDKEvent_PaymentReceived_meth = (*env)->GetMethodID(env, LDKEvent_PaymentReceived_class, "<init>", "([B[BJ)V");
DO_ASSERT(LDKEvent_PaymentReceived_meth != NULL);
LDKEvent_PaymentSent_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentSent;"));
DO_ASSERT(LDKEvent_PaymentSent_class != NULL);
- LDKEvent_PaymentSent_meth = (*env)->GetMethodID(env, LDKEvent_PaymentSent_class, "<init>", "(J)V");
+ LDKEvent_PaymentSent_meth = (*env)->GetMethodID(env, LDKEvent_PaymentSent_class, "<init>", "([B)V");
DO_ASSERT(LDKEvent_PaymentSent_meth != NULL);
LDKEvent_PaymentFailed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentFailed;"));
DO_ASSERT(LDKEvent_PaymentFailed_class != NULL);
- LDKEvent_PaymentFailed_meth = (*env)->GetMethodID(env, LDKEvent_PaymentFailed_class, "<init>", "(JZ)V");
+ LDKEvent_PaymentFailed_meth = (*env)->GetMethodID(env, LDKEvent_PaymentFailed_class, "<init>", "([BZ)V");
DO_ASSERT(LDKEvent_PaymentFailed_meth != NULL);
LDKEvent_PendingHTLCsForwardable_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PendingHTLCsForwardable;"));
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKEvent *obj = (LDKEvent*)ptr;
switch(obj->tag) {
- case LDKEvent_FundingGenerationReady:
- return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth,
- (long)&obj->funding_generation_ready.temporary_channel_id, obj->funding_generation_ready.channel_value_satoshis, (long)&obj->funding_generation_ready.output_script, obj->funding_generation_ready.user_channel_id
- );
- case LDKEvent_FundingBroadcastSafe:
- return (*env)->NewObject(env, LDKEvent_FundingBroadcastSafe_class, LDKEvent_FundingBroadcastSafe_meth,
- (long)&obj->funding_broadcast_safe.funding_txo, obj->funding_broadcast_safe.user_channel_id
- );
- case LDKEvent_PaymentReceived:
- return (*env)->NewObject(env, LDKEvent_PaymentReceived_class, LDKEvent_PaymentReceived_meth,
- (long)&obj->payment_received.payment_hash, (long)&obj->payment_received.payment_secret, obj->payment_received.amt
- );
- case LDKEvent_PaymentSent:
- return (*env)->NewObject(env, LDKEvent_PaymentSent_class, LDKEvent_PaymentSent_meth,
- (long)&obj->payment_sent.payment_preimage
- );
- case LDKEvent_PaymentFailed:
- return (*env)->NewObject(env, LDKEvent_PaymentFailed_class, LDKEvent_PaymentFailed_meth,
- (long)&obj->payment_failed.payment_hash, obj->payment_failed.rejected_by_dest
- );
- case LDKEvent_PendingHTLCsForwardable:
- return (*env)->NewObject(env, LDKEvent_PendingHTLCsForwardable_class, LDKEvent_PendingHTLCsForwardable_meth,
- obj->pending_htl_cs_forwardable.time_forwardable
- );
- case LDKEvent_SpendableOutputs:
- return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth,
- (long)&obj->spendable_outputs.outputs
- );
+ case LDKEvent_FundingGenerationReady: {
+ jbyteArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data);
+ long output_script_ref = (long)&obj->funding_generation_ready.output_script;
+ return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, obj->funding_generation_ready.channel_value_satoshis, output_script_ref, obj->funding_generation_ready.user_channel_id);
+ }
+ case LDKEvent_FundingBroadcastSafe: {
+ long funding_txo_ref = (long)&obj->funding_broadcast_safe.funding_txo;
+ return (*env)->NewObject(env, LDKEvent_FundingBroadcastSafe_class, LDKEvent_FundingBroadcastSafe_meth, funding_txo_ref, obj->funding_broadcast_safe.user_channel_id);
+ }
+ case LDKEvent_PaymentReceived: {
+ jbyteArray payment_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_received.payment_hash.data);
+ jbyteArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->payment_received.payment_secret.data);
+ return (*env)->NewObject(env, LDKEvent_PaymentReceived_class, LDKEvent_PaymentReceived_meth, payment_hash_arr, payment_secret_arr, obj->payment_received.amt);
+ }
+ case LDKEvent_PaymentSent: {
+ jbyteArray payment_preimage_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_preimage_arr, 0, 32, obj->payment_sent.payment_preimage.data);
+ return (*env)->NewObject(env, LDKEvent_PaymentSent_class, LDKEvent_PaymentSent_meth, payment_preimage_arr);
+ }
+ case LDKEvent_PaymentFailed: {
+ jbyteArray payment_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_failed.payment_hash.data);
+ return (*env)->NewObject(env, LDKEvent_PaymentFailed_class, LDKEvent_PaymentFailed_meth, payment_hash_arr, obj->payment_failed.rejected_by_dest);
+ }
+ case LDKEvent_PendingHTLCsForwardable: {
+ return (*env)->NewObject(env, LDKEvent_PendingHTLCsForwardable_class, LDKEvent_PendingHTLCsForwardable_meth, obj->pending_htl_cs_forwardable.time_forwardable);
+ }
+ case LDKEvent_SpendableOutputs: {
+ long outputs_ref = (long)&obj->spendable_outputs.outputs;
+ return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_ref);
+ }
default: abort();
}
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKErrorAction *obj = (LDKErrorAction*)ptr;
switch(obj->tag) {
- case LDKErrorAction_DisconnectPeer:
- return (*env)->NewObject(env, LDKErrorAction_DisconnectPeer_class, LDKErrorAction_DisconnectPeer_meth,
- (long)&obj->disconnect_peer.msg
- );
- case LDKErrorAction_IgnoreError:
+ case LDKErrorAction_DisconnectPeer: {
+ long msg_ref = (long)&obj->disconnect_peer.msg;
+ return (*env)->NewObject(env, LDKErrorAction_DisconnectPeer_class, LDKErrorAction_DisconnectPeer_meth, msg_ref);
+ }
+ case LDKErrorAction_IgnoreError: {
return (*env)->NewObject(env, LDKErrorAction_IgnoreError_class, LDKErrorAction_IgnoreError_meth);
- case LDKErrorAction_SendErrorMessage:
- return (*env)->NewObject(env, LDKErrorAction_SendErrorMessage_class, LDKErrorAction_SendErrorMessage_meth,
- (long)&obj->send_error_message.msg
- );
+ }
+ case LDKErrorAction_SendErrorMessage: {
+ long msg_ref = (long)&obj->send_error_message.msg;
+ return (*env)->NewObject(env, LDKErrorAction_SendErrorMessage_class, LDKErrorAction_SendErrorMessage_meth, msg_ref);
+ }
default: abort();
}
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
switch(obj->tag) {
- case LDKHTLCFailChannelUpdate_ChannelUpdateMessage:
- return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth,
- (long)&obj->channel_update_message.msg
- );
- case LDKHTLCFailChannelUpdate_ChannelClosed:
- return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, LDKHTLCFailChannelUpdate_ChannelClosed_meth,
- obj->channel_closed.short_channel_id, obj->channel_closed.is_permanent
- );
- case LDKHTLCFailChannelUpdate_NodeFailure:
- return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_NodeFailure_class, LDKHTLCFailChannelUpdate_NodeFailure_meth,
- (long)&obj->node_failure.node_id, obj->node_failure.is_permanent
- );
+ case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
+ long msg_ref = (long)&obj->channel_update_message.msg;
+ return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_class, LDKHTLCFailChannelUpdate_ChannelUpdateMessage_meth, msg_ref);
+ }
+ case LDKHTLCFailChannelUpdate_ChannelClosed: {
+ return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_ChannelClosed_class, LDKHTLCFailChannelUpdate_ChannelClosed_meth, obj->channel_closed.short_channel_id, obj->channel_closed.is_permanent);
+ }
+ case LDKHTLCFailChannelUpdate_NodeFailure: {
+ long node_id_ref = (long)&obj->node_failure.node_id;
+ return (*env)->NewObject(env, LDKHTLCFailChannelUpdate_NodeFailure_class, LDKHTLCFailChannelUpdate_NodeFailure_meth, node_id_ref, obj->node_failure.is_permanent);
+ }
default: abort();
}
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)ptr;
switch(obj->tag) {
- case LDKMessageSendEvent_SendAcceptChannel:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendAcceptChannel_class, LDKMessageSendEvent_SendAcceptChannel_meth,
- (long)&obj->send_accept_channel.node_id, (long)&obj->send_accept_channel.msg
- );
- case LDKMessageSendEvent_SendOpenChannel:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendOpenChannel_class, LDKMessageSendEvent_SendOpenChannel_meth,
- (long)&obj->send_open_channel.node_id, (long)&obj->send_open_channel.msg
- );
- case LDKMessageSendEvent_SendFundingCreated:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingCreated_class, LDKMessageSendEvent_SendFundingCreated_meth,
- (long)&obj->send_funding_created.node_id, (long)&obj->send_funding_created.msg
- );
- case LDKMessageSendEvent_SendFundingSigned:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingSigned_class, LDKMessageSendEvent_SendFundingSigned_meth,
- (long)&obj->send_funding_signed.node_id, (long)&obj->send_funding_signed.msg
- );
- case LDKMessageSendEvent_SendFundingLocked:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingLocked_class, LDKMessageSendEvent_SendFundingLocked_meth,
- (long)&obj->send_funding_locked.node_id, (long)&obj->send_funding_locked.msg
- );
- case LDKMessageSendEvent_SendAnnouncementSignatures:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendAnnouncementSignatures_class, LDKMessageSendEvent_SendAnnouncementSignatures_meth,
- (long)&obj->send_announcement_signatures.node_id, (long)&obj->send_announcement_signatures.msg
- );
- case LDKMessageSendEvent_UpdateHTLCs:
- return (*env)->NewObject(env, LDKMessageSendEvent_UpdateHTLCs_class, LDKMessageSendEvent_UpdateHTLCs_meth,
- (long)&obj->update_htl_cs.node_id, (long)&obj->update_htl_cs.updates
- );
- case LDKMessageSendEvent_SendRevokeAndACK:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendRevokeAndACK_class, LDKMessageSendEvent_SendRevokeAndACK_meth,
- (long)&obj->send_revoke_and_ack.node_id, (long)&obj->send_revoke_and_ack.msg
- );
- case LDKMessageSendEvent_SendClosingSigned:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendClosingSigned_class, LDKMessageSendEvent_SendClosingSigned_meth,
- (long)&obj->send_closing_signed.node_id, (long)&obj->send_closing_signed.msg
- );
- case LDKMessageSendEvent_SendShutdown:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendShutdown_class, LDKMessageSendEvent_SendShutdown_meth,
- (long)&obj->send_shutdown.node_id, (long)&obj->send_shutdown.msg
- );
- case LDKMessageSendEvent_SendChannelReestablish:
- return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelReestablish_class, LDKMessageSendEvent_SendChannelReestablish_meth,
- (long)&obj->send_channel_reestablish.node_id, (long)&obj->send_channel_reestablish.msg
- );
- case LDKMessageSendEvent_BroadcastChannelAnnouncement:
- return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelAnnouncement_class, LDKMessageSendEvent_BroadcastChannelAnnouncement_meth,
- (long)&obj->broadcast_channel_announcement.msg, (long)&obj->broadcast_channel_announcement.update_msg
- );
- case LDKMessageSendEvent_BroadcastNodeAnnouncement:
- return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastNodeAnnouncement_class, LDKMessageSendEvent_BroadcastNodeAnnouncement_meth,
- (long)&obj->broadcast_node_announcement.msg
- );
- case LDKMessageSendEvent_BroadcastChannelUpdate:
- return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelUpdate_class, LDKMessageSendEvent_BroadcastChannelUpdate_meth,
- (long)&obj->broadcast_channel_update.msg
- );
- case LDKMessageSendEvent_HandleError:
- return (*env)->NewObject(env, LDKMessageSendEvent_HandleError_class, LDKMessageSendEvent_HandleError_meth,
- (long)&obj->handle_error.node_id, (long)&obj->handle_error.action
- );
- case LDKMessageSendEvent_PaymentFailureNetworkUpdate:
- return (*env)->NewObject(env, LDKMessageSendEvent_PaymentFailureNetworkUpdate_class, LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth,
- (long)&obj->payment_failure_network_update.update
- );
+ case LDKMessageSendEvent_SendAcceptChannel: {
+ long node_id_ref = (long)&obj->send_accept_channel.node_id;
+ long msg_ref = (long)&obj->send_accept_channel.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendAcceptChannel_class, LDKMessageSendEvent_SendAcceptChannel_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendOpenChannel: {
+ long node_id_ref = (long)&obj->send_open_channel.node_id;
+ long msg_ref = (long)&obj->send_open_channel.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendOpenChannel_class, LDKMessageSendEvent_SendOpenChannel_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendFundingCreated: {
+ long node_id_ref = (long)&obj->send_funding_created.node_id;
+ long msg_ref = (long)&obj->send_funding_created.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingCreated_class, LDKMessageSendEvent_SendFundingCreated_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendFundingSigned: {
+ long node_id_ref = (long)&obj->send_funding_signed.node_id;
+ long msg_ref = (long)&obj->send_funding_signed.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingSigned_class, LDKMessageSendEvent_SendFundingSigned_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendFundingLocked: {
+ long node_id_ref = (long)&obj->send_funding_locked.node_id;
+ long msg_ref = (long)&obj->send_funding_locked.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendFundingLocked_class, LDKMessageSendEvent_SendFundingLocked_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendAnnouncementSignatures: {
+ long node_id_ref = (long)&obj->send_announcement_signatures.node_id;
+ long msg_ref = (long)&obj->send_announcement_signatures.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendAnnouncementSignatures_class, LDKMessageSendEvent_SendAnnouncementSignatures_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_UpdateHTLCs: {
+ long node_id_ref = (long)&obj->update_htl_cs.node_id;
+ long updates_ref = (long)&obj->update_htl_cs.updates;
+ return (*env)->NewObject(env, LDKMessageSendEvent_UpdateHTLCs_class, LDKMessageSendEvent_UpdateHTLCs_meth, node_id_ref, updates_ref);
+ }
+ case LDKMessageSendEvent_SendRevokeAndACK: {
+ long node_id_ref = (long)&obj->send_revoke_and_ack.node_id;
+ long msg_ref = (long)&obj->send_revoke_and_ack.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendRevokeAndACK_class, LDKMessageSendEvent_SendRevokeAndACK_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendClosingSigned: {
+ long node_id_ref = (long)&obj->send_closing_signed.node_id;
+ long msg_ref = (long)&obj->send_closing_signed.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendClosingSigned_class, LDKMessageSendEvent_SendClosingSigned_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendShutdown: {
+ long node_id_ref = (long)&obj->send_shutdown.node_id;
+ long msg_ref = (long)&obj->send_shutdown.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendShutdown_class, LDKMessageSendEvent_SendShutdown_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_SendChannelReestablish: {
+ long node_id_ref = (long)&obj->send_channel_reestablish.node_id;
+ long msg_ref = (long)&obj->send_channel_reestablish.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_SendChannelReestablish_class, LDKMessageSendEvent_SendChannelReestablish_meth, node_id_ref, msg_ref);
+ }
+ case LDKMessageSendEvent_BroadcastChannelAnnouncement: {
+ long msg_ref = (long)&obj->broadcast_channel_announcement.msg;
+ long update_msg_ref = (long)&obj->broadcast_channel_announcement.update_msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelAnnouncement_class, LDKMessageSendEvent_BroadcastChannelAnnouncement_meth, msg_ref, update_msg_ref);
+ }
+ case LDKMessageSendEvent_BroadcastNodeAnnouncement: {
+ long msg_ref = (long)&obj->broadcast_node_announcement.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastNodeAnnouncement_class, LDKMessageSendEvent_BroadcastNodeAnnouncement_meth, msg_ref);
+ }
+ case LDKMessageSendEvent_BroadcastChannelUpdate: {
+ long msg_ref = (long)&obj->broadcast_channel_update.msg;
+ return (*env)->NewObject(env, LDKMessageSendEvent_BroadcastChannelUpdate_class, LDKMessageSendEvent_BroadcastChannelUpdate_meth, msg_ref);
+ }
+ case LDKMessageSendEvent_HandleError: {
+ long node_id_ref = (long)&obj->handle_error.node_id;
+ long action_ref = (long)&obj->handle_error.action;
+ return (*env)->NewObject(env, LDKMessageSendEvent_HandleError_class, LDKMessageSendEvent_HandleError_meth, node_id_ref, action_ref);
+ }
+ case LDKMessageSendEvent_PaymentFailureNetworkUpdate: {
+ long update_ref = (long)&obj->payment_failure_network_update.update;
+ return (*env)->NewObject(env, LDKMessageSendEvent_PaymentFailureNetworkUpdate_class, LDKMessageSendEvent_PaymentFailureNetworkUpdate_meth, update_ref);
+ }
default: abort();
}
}
LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
JNIEnv *env;
DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_8) == JNI_OK);
- LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*env)->CallLongMethod(env, j_calls->o, j_calls->release_commitment_secret_meth, idx);
- LDKThirtyTwoBytes res = *ret;
- FREE(ret);
- return res;
+ jbyteArray jret = (*env)->CallObjectMethod(env, j_calls->o, j_calls->release_commitment_secret_meth, idx);
+ LDKThirtyTwoBytes ret;
+ (*env)->GetByteArrayRegion(env, jret, 0, 32, ret.data);
+ return ret;
}
LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
calls->o = (*env)->NewGlobalRef(env, o);
calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "(J)J");
DO_ASSERT(calls->get_per_commitment_point_meth != NULL);
- calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)J");
+ calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)[B");
DO_ASSERT(calls->release_commitment_secret_meth != NULL);
calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "()J");
DO_ASSERT(calls->key_derivation_params_meth != NULL);
return (long)ret;
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1call_1release_1commitment_1secret(JNIEnv * _env, jclass _b, jlong arg, jlong idx) {
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1call_1release_1commitment_1secret(JNIEnv * _env, jclass _b, jlong arg, jlong idx) {
LDKChannelKeys* arg_conv = (LDKChannelKeys*)arg;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = (arg_conv->release_commitment_secret)(arg_conv->this_arg, idx);
- return (long)ret;
+ jbyteArray _arr = (*_env)->NewByteArray(_env, 32);
+ (*_env)->SetByteArrayRegion(_env, _arr, 0, 32, (arg_conv->release_commitment_secret)(arg_conv->this_arg, idx).data);
+ return _arr;
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1call_1key_1derivation_1params(JNIEnv * _env, jclass _b, jlong arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
JNIEnv *env;
DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_8) == JNI_OK);
- LDKThirtyTwoBytes* ret = (LDKThirtyTwoBytes*)(*env)->CallLongMethod(env, j_calls->o, j_calls->get_secure_random_bytes_meth);
- LDKThirtyTwoBytes res = *ret;
- FREE(ret);
- return res;
+ jbyteArray jret = (*env)->CallObjectMethod(env, j_calls->o, j_calls->get_secure_random_bytes_meth);
+ LDKThirtyTwoBytes ret;
+ (*env)->GetByteArrayRegion(env, jret, 0, 32, ret.data);
+ return ret;
}
static void LDKKeysInterface_JCalls_free(void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
DO_ASSERT(calls->get_shutdown_pubkey_meth != NULL);
calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "(ZJ)J");
DO_ASSERT(calls->get_channel_keys_meth != NULL);
- calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()J");
+ calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()[B");
DO_ASSERT(calls->get_secure_random_bytes_meth != NULL);
LDKKeysInterface ret = {
return (long)ret;
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1call_1get_1secure_1random_1bytes(JNIEnv * _env, jclass _b, jlong arg) {
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1call_1get_1secure_1random_1bytes(JNIEnv * _env, jclass _b, jlong arg) {
LDKKeysInterface* arg_conv = (LDKKeysInterface*)arg;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = (arg_conv->get_secure_random_bytes)(arg_conv->this_arg);
- return (long)ret;
+ jbyteArray _arr = (*_env)->NewByteArray(_env, 32);
+ (*_env)->SetByteArrayRegion(_env, _arr, 0, 32, (arg_conv->get_secure_random_bytes)(arg_conv->this_arg).data);
+ return _arr;
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKInMemoryChannelKeys_1optional_1none (JNIEnv * env, jclass _a) {
LDKNetAddress_OnionV3_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV3;"));
DO_ASSERT(LDKNetAddress_OnionV3_class != NULL);
- LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "(JSBS)V");
+ LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "([BSBS)V");
DO_ASSERT(LDKNetAddress_OnionV3_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr (JNIEnv * env, jclass _c, jlong ptr) {
LDKNetAddress *obj = (LDKNetAddress*)ptr;
switch(obj->tag) {
- case LDKNetAddress_IPv4:
- return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth,
- (long)&obj->i_pv4.addr, obj->i_pv4.port
- );
- case LDKNetAddress_IPv6:
- return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth,
- (long)&obj->i_pv6.addr, obj->i_pv6.port
- );
- case LDKNetAddress_OnionV2:
- return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth,
- (long)&obj->onion_v2.addr, obj->onion_v2.port
- );
- case LDKNetAddress_OnionV3:
- return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth,
- (long)&obj->onion_v3.ed25519_pubkey, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port
- );
+ case LDKNetAddress_IPv4: {
+ long addr_ref = (long)&obj->i_pv4.addr;
+ return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth, addr_ref, obj->i_pv4.port);
+ }
+ case LDKNetAddress_IPv6: {
+ long addr_ref = (long)&obj->i_pv6.addr;
+ return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth, addr_ref, obj->i_pv6.port);
+ }
+ case LDKNetAddress_OnionV2: {
+ long addr_ref = (long)&obj->onion_v2.addr;
+ return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth, addr_ref, obj->onion_v2.port);
+ }
+ case LDKNetAddress_OnionV3: {
+ jbyteArray ed25519_pubkey_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ed25519_pubkey_arr, 0, 32, obj->onion_v3.ed25519_pubkey.data);
+ return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth, ed25519_pubkey_arr, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port);
+ }
default: abort();
}
}
return (long)ret;
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) {
- LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a;
- FREE((void*)a);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new(JNIEnv * _env, jclass _b, jbyteArray a, jlong b) {
+ LDKThirtyTwoBytes a_ref;
+ (*_env)->GetByteArrayRegion (_env, a, 0, 32, a_ref.data);
LDKCVec_TxOutZ b_conv = *(LDKCVec_TxOutZ*)b;
FREE((void*)b);
LDKC2Tuple_TxidCVec_TxOutZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_TxOutZZ), "LDKC2Tuple_TxidCVec_TxOutZZ");
- *ret = C2Tuple_TxidCVec_TxOutZZ_new(a_conv, b_conv);
+ *ret = C2Tuple_TxidCVec_TxOutZZ_new(a_ref, b_conv);
return (long)ret;
}
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKOutPoint* this_ptr_conv = (LDKOutPoint*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OutPoint_set_txid(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return OutPoint_set_txid(this_ptr_conv, val_ref);
}
JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
return OutPoint_set_index(this_ptr_conv, val);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jlong txid_arg, jshort index_arg) {
- LDKThirtyTwoBytes txid_arg_conv = *(LDKThirtyTwoBytes*)txid_arg;
- FREE((void*)txid_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv * _env, jclass _b, jbyteArray txid_arg, jshort index_arg) {
+ LDKThirtyTwoBytes txid_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, txid_arg, 0, 32, txid_arg_ref.data);
LDKOutPoint* ret = MALLOC(sizeof(LDKOutPoint), "LDKOutPoint");
- *ret = OutPoint_new(txid_arg_conv, index_arg);
+ *ret = OutPoint_new(txid_arg_ref, index_arg);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
LDKOutPoint* this_arg_conv = (LDKOutPoint*)this_arg;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = OutPoint_to_channel_id(this_arg_conv);
- return (long)ret;
+ jbyteArray _arr = (*_env)->NewByteArray(_env, 32);
+ (*_env)->SetByteArrayRegion(_env, _arr, 0, 32, OutPoint_to_channel_id(this_arg_conv).data);
+ return _arr;
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv * _env, jclass _b, jlong obj) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKInMemoryChannelKeys* this_ptr_conv = (LDKInMemoryChannelKeys*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return InMemoryChannelKeys_set_commitment_seed(this_ptr_conv, val_ref);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIEnv * _env, jclass _b, jlong funding_key, jlong revocation_base_key, jlong payment_key, jlong delayed_payment_base_key, jlong htlc_base_key, jlong commitment_seed, jlong channel_value_satoshis, jlong key_derivation_params) {
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIEnv * _env, jclass _b, jlong funding_key, jlong revocation_base_key, jlong payment_key, jlong delayed_payment_base_key, jlong htlc_base_key, jbyteArray commitment_seed, jlong channel_value_satoshis, jlong key_derivation_params) {
LDKSecretKey funding_key_conv = *(LDKSecretKey*)funding_key;
FREE((void*)funding_key);
LDKSecretKey revocation_base_key_conv = *(LDKSecretKey*)revocation_base_key;
FREE((void*)delayed_payment_base_key);
LDKSecretKey htlc_base_key_conv = *(LDKSecretKey*)htlc_base_key;
FREE((void*)htlc_base_key);
- LDKThirtyTwoBytes commitment_seed_conv = *(LDKThirtyTwoBytes*)commitment_seed;
- FREE((void*)commitment_seed);
+ LDKThirtyTwoBytes commitment_seed_ref;
+ (*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_ref.data);
LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)key_derivation_params;
FREE((void*)key_derivation_params);
LDKInMemoryChannelKeys* ret = MALLOC(sizeof(LDKInMemoryChannelKeys), "LDKInMemoryChannelKeys");
- *ret = InMemoryChannelKeys_new(funding_key_conv, revocation_base_key_conv, payment_key_conv, delayed_payment_base_key_conv, htlc_base_key_conv, commitment_seed_conv, channel_value_satoshis, key_derivation_params_conv);
+ *ret = InMemoryChannelKeys_new(funding_key_conv, revocation_base_key_conv, payment_key_conv, delayed_payment_base_key_conv, htlc_base_key_conv, commitment_seed_ref, channel_value_satoshis, key_derivation_params_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKChannelDetails* this_ptr_conv = (LDKChannelDetails*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ChannelDetails_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ChannelDetails_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ChannelManager_force_close_all_channels(this_arg_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1payment(JNIEnv * _env, jclass _b, jlong this_arg, jlong route, jlong payment_hash, jlong payment_secret) {
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1payment(JNIEnv * _env, jclass _b, jlong this_arg, jlong route, jbyteArray payment_hash, jbyteArray payment_secret) {
LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
LDKRoute* route_conv = (LDKRoute*)route;
- LDKThirtyTwoBytes payment_hash_conv = *(LDKThirtyTwoBytes*)payment_hash;
- FREE((void*)payment_hash);
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
+ LDKThirtyTwoBytes payment_hash_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKThirtyTwoBytes payment_secret_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_secret, 0, 32, payment_secret_ref.data);
LDKCResult_NonePaymentSendFailureZ* ret = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_conv, payment_secret_conv);
+ *ret = ChannelManager_send_payment(this_arg_conv, route_conv, payment_hash_ref, payment_secret_ref);
return (long)ret;
}
return ChannelManager_funding_transaction_generated(this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1broadcast_1node_1announcement(JNIEnv * _env, jclass _b, jlong this_arg, jlong rgb, jlong alias, jlong addresses) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1broadcast_1node_1announcement(JNIEnv * _env, jclass _b, jlong this_arg, jlong rgb, jbyteArray alias, jlong addresses) {
LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
LDKThreeBytes rgb_conv = *(LDKThreeBytes*)rgb;
FREE((void*)rgb);
- LDKThirtyTwoBytes alias_conv = *(LDKThirtyTwoBytes*)alias;
- FREE((void*)alias);
+ LDKThirtyTwoBytes alias_ref;
+ (*_env)->GetByteArrayRegion (_env, alias, 0, 32, alias_ref.data);
LDKCVec_NetAddressZ addresses_conv = *(LDKCVec_NetAddressZ*)addresses;
FREE((void*)addresses);
- return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_conv, addresses_conv);
+ return ChannelManager_broadcast_node_announcement(this_arg_conv, rgb_conv, alias_ref, addresses_conv);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1process_1pending_1htlc_1forwards(JNIEnv * _env, jclass _b, jlong this_arg) {
return ChannelManager_timer_chan_freshness_every_min(this_arg_conv);
}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1fail_1htlc_1backwards(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray payment_hash, jlong payment_secret) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1fail_1htlc_1backwards(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray payment_hash, jbyteArray payment_secret) {
LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
unsigned char payment_hash_arr[32];
(*_env)->GetByteArrayRegion (_env, payment_hash, 0, 32, payment_hash_arr);
unsigned char (*payment_hash_ref)[32] = &payment_hash_arr;
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
- return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_conv);
+ LDKThirtyTwoBytes payment_secret_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_secret, 0, 32, payment_secret_ref.data);
+ return ChannelManager_fail_htlc_backwards(this_arg_conv, payment_hash_ref, payment_secret_ref);
}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1claim_1funds(JNIEnv * _env, jclass _b, jlong this_arg, jlong payment_preimage, jlong payment_secret, jlong expected_amount) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1claim_1funds(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray payment_preimage, jbyteArray payment_secret, jlong expected_amount) {
LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg;
- LDKThirtyTwoBytes payment_preimage_conv = *(LDKThirtyTwoBytes*)payment_preimage;
- FREE((void*)payment_preimage);
- LDKThirtyTwoBytes payment_secret_conv = *(LDKThirtyTwoBytes*)payment_secret;
- FREE((void*)payment_secret);
- return ChannelManager_claim_funds(this_arg_conv, payment_preimage_conv, payment_secret_conv, expected_amount);
+ LDKThirtyTwoBytes payment_preimage_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_preimage, 0, 32, payment_preimage_ref.data);
+ LDKThirtyTwoBytes payment_secret_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_secret, 0, 32, payment_secret_ref.data);
+ return ChannelManager_claim_funds(this_arg_conv, payment_preimage_ref, payment_secret_ref, expected_amount);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our_1node_1id(JNIEnv * _env, jclass _b, jlong this_arg) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKErrorMessage* this_ptr_conv = (LDKErrorMessage*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ErrorMessage_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ErrorMessage_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ErrorMessage_set_data(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong data_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong data_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKCVec_u8Z data_arg_conv = *(LDKCVec_u8Z*)data_arg;
FREE((void*)data_arg);
LDKErrorMessage* ret = MALLOC(sizeof(LDKErrorMessage), "LDKErrorMessage");
- *ret = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
+ *ret = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OpenChannel_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return OpenChannel_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKOpenChannel* this_ptr_conv = (LDKOpenChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return OpenChannel_set_temporary_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKAcceptChannel* this_ptr_conv = (LDKAcceptChannel*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return AcceptChannel_set_temporary_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return FundingCreated_set_temporary_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKFundingCreated* this_ptr_conv = (LDKFundingCreated*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return FundingCreated_set_funding_txid(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return FundingCreated_set_funding_txid(this_ptr_conv, val_ref);
}
JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1output_1index(JNIEnv * _env, jclass _b, jlong this_ptr) {
return FundingCreated_set_signature(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv * _env, jclass _b, jlong temporary_channel_id_arg, jlong funding_txid_arg, jshort funding_output_index_arg, jlong signature_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_conv = *(LDKThirtyTwoBytes*)temporary_channel_id_arg;
- FREE((void*)temporary_channel_id_arg);
- LDKThirtyTwoBytes funding_txid_arg_conv = *(LDKThirtyTwoBytes*)funding_txid_arg;
- FREE((void*)funding_txid_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv * _env, jclass _b, jbyteArray temporary_channel_id_arg, jbyteArray funding_txid_arg, jshort funding_output_index_arg, jlong signature_arg) {
+ LDKThirtyTwoBytes temporary_channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+ LDKThirtyTwoBytes funding_txid_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data);
LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
FREE((void*)signature_arg);
LDKFundingCreated* ret = MALLOC(sizeof(LDKFundingCreated), "LDKFundingCreated");
- *ret = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_conv, funding_output_index_arg, signature_arg_conv);
+ *ret = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKFundingSigned* this_ptr_conv = (LDKFundingSigned*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return FundingSigned_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return FundingSigned_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
return FundingSigned_set_signature(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong signature_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
FREE((void*)signature_arg);
LDKFundingSigned* ret = MALLOC(sizeof(LDKFundingSigned), "LDKFundingSigned");
- *ret = FundingSigned_new(channel_id_arg_conv, signature_arg_conv);
+ *ret = FundingSigned_new(channel_id_arg_ref, signature_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKFundingLocked* this_ptr_conv = (LDKFundingLocked*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return FundingLocked_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return FundingLocked_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
return FundingLocked_set_next_per_commitment_point(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong next_per_commitment_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong next_per_commitment_point_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
FREE((void*)next_per_commitment_point_arg);
LDKFundingLocked* ret = MALLOC(sizeof(LDKFundingLocked), "LDKFundingLocked");
- *ret = FundingLocked_new(channel_id_arg_conv, next_per_commitment_point_arg_conv);
+ *ret = FundingLocked_new(channel_id_arg_ref, next_per_commitment_point_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKShutdown* this_ptr_conv = (LDKShutdown*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return Shutdown_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return Shutdown_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv * _env, jclass _b, jlong this_ptr) {
return Shutdown_set_scriptpubkey(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong scriptpubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong scriptpubkey_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKCVec_u8Z scriptpubkey_arg_conv = *(LDKCVec_u8Z*)scriptpubkey_arg;
FREE((void*)scriptpubkey_arg);
LDKShutdown* ret = MALLOC(sizeof(LDKShutdown), "LDKShutdown");
- *ret = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_conv);
+ *ret = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKClosingSigned* this_ptr_conv = (LDKClosingSigned*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ClosingSigned_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ClosingSigned_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ClosingSigned_set_signature(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong fee_satoshis_arg, jlong signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong fee_satoshis_arg, jlong signature_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
FREE((void*)signature_arg);
LDKClosingSigned* ret = MALLOC(sizeof(LDKClosingSigned), "LDKClosingSigned");
- *ret = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_conv);
+ *ret = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateAddHTLC_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateAddHTLC* this_ptr_conv = (LDKUpdateAddHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateAddHTLC_set_payment_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1cltv_1expiry(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateFulfillHTLC_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateFulfillHTLC* this_ptr_conv = (LDKUpdateFulfillHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateFulfillHTLC_set_payment_preimage(this_ptr_conv, val_ref);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong htlc_id_arg, jlong payment_preimage_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
- LDKThirtyTwoBytes payment_preimage_arg_conv = *(LDKThirtyTwoBytes*)payment_preimage_arg;
- FREE((void*)payment_preimage_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong htlc_id_arg, jbyteArray payment_preimage_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+ LDKThirtyTwoBytes payment_preimage_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data);
LDKUpdateFulfillHTLC* ret = MALLOC(sizeof(LDKUpdateFulfillHTLC), "LDKUpdateFulfillHTLC");
- *ret = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_conv);
+ *ret = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateFailHTLC* this_ptr_conv = (LDKUpdateFailHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateFailHTLC_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateFailMalformedHTLC* this_ptr_conv = (LDKUpdateFailMalformedHTLC*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateFailMalformedHTLC_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKCommitmentSigned* this_ptr_conv = (LDKCommitmentSigned*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return CommitmentSigned_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return CommitmentSigned_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) {
return CommitmentSigned_set_htlc_signatures(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong signature_arg, jlong htlc_signatures_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong signature_arg, jlong htlc_signatures_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg;
FREE((void*)signature_arg);
LDKCVec_SignatureZ htlc_signatures_arg_conv = *(LDKCVec_SignatureZ*)htlc_signatures_arg;
FREE((void*)htlc_signatures_arg);
LDKCommitmentSigned* ret = MALLOC(sizeof(LDKCommitmentSigned), "LDKCommitmentSigned");
- *ret = CommitmentSigned_new(channel_id_arg_conv, signature_arg_conv, htlc_signatures_arg_conv);
+ *ret = CommitmentSigned_new(channel_id_arg_ref, signature_arg_conv, htlc_signatures_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return RevokeAndACK_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return RevokeAndACK_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKRevokeAndACK* this_ptr_conv = (LDKRevokeAndACK*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return RevokeAndACK_set_per_commitment_secret(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
return RevokeAndACK_set_next_per_commitment_point(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong per_commitment_secret_arg, jlong next_per_commitment_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
- LDKThirtyTwoBytes per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)per_commitment_secret_arg;
- FREE((void*)per_commitment_secret_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jbyteArray per_commitment_secret_arg, jlong next_per_commitment_point_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+ LDKThirtyTwoBytes per_commitment_secret_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data);
LDKPublicKey next_per_commitment_point_arg_conv = *(LDKPublicKey*)next_per_commitment_point_arg;
FREE((void*)next_per_commitment_point_arg);
LDKRevokeAndACK* ret = MALLOC(sizeof(LDKRevokeAndACK), "LDKRevokeAndACK");
- *ret = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_conv, next_per_commitment_point_arg_conv);
+ *ret = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUpdateFee* this_ptr_conv = (LDKUpdateFee*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UpdateFee_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UpdateFee_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) {
return UpdateFee_set_feerate_per_kw(this_ptr_conv, val);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jint feerate_per_kw_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jint feerate_per_kw_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKUpdateFee* ret = MALLOC(sizeof(LDKUpdateFee), "LDKUpdateFee");
- *ret = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
+ *ret = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKDataLossProtect* this_ptr_conv = (LDKDataLossProtect*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return DataLossProtect_set_your_last_per_commitment_secret(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1my_1current_1per_1commitment_1point(JNIEnv * _env, jclass _b, jlong this_ptr) {
return DataLossProtect_set_my_current_per_commitment_point(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new(JNIEnv * _env, jclass _b, jlong your_last_per_commitment_secret_arg, jlong my_current_per_commitment_point_arg) {
- LDKThirtyTwoBytes your_last_per_commitment_secret_arg_conv = *(LDKThirtyTwoBytes*)your_last_per_commitment_secret_arg;
- FREE((void*)your_last_per_commitment_secret_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new(JNIEnv * _env, jclass _b, jbyteArray your_last_per_commitment_secret_arg, jlong my_current_per_commitment_point_arg) {
+ LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data);
LDKPublicKey my_current_per_commitment_point_arg_conv = *(LDKPublicKey*)my_current_per_commitment_point_arg;
FREE((void*)my_current_per_commitment_point_arg);
LDKDataLossProtect* ret = MALLOC(sizeof(LDKDataLossProtect), "LDKDataLossProtect");
- *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_conv, my_current_per_commitment_point_arg_conv);
+ *ret = DataLossProtect_new(your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKChannelReestablish* this_ptr_conv = (LDKChannelReestablish*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ChannelReestablish_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ChannelReestablish_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKAnnouncementSignatures* this_ptr_conv = (LDKAnnouncementSignatures*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return AnnouncementSignatures_set_channel_id(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return AnnouncementSignatures_set_bitcoin_signature(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv * _env, jclass _b, jlong channel_id_arg, jlong short_channel_id_arg, jlong node_signature_arg, jlong bitcoin_signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_conv = *(LDKThirtyTwoBytes*)channel_id_arg;
- FREE((void*)channel_id_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv * _env, jclass _b, jbyteArray channel_id_arg, jlong short_channel_id_arg, jlong node_signature_arg, jlong bitcoin_signature_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
LDKSignature node_signature_arg_conv = *(LDKSignature*)node_signature_arg;
FREE((void*)node_signature_arg);
LDKSignature bitcoin_signature_arg_conv = *(LDKSignature*)bitcoin_signature_arg;
FREE((void*)bitcoin_signature_arg);
LDKAnnouncementSignatures* ret = MALLOC(sizeof(LDKAnnouncementSignatures), "LDKAnnouncementSignatures");
- *ret = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
+ *ret = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_conv, bitcoin_signature_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UnsignedNodeAnnouncement_set_alias(this_ptr_conv, val_ref);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UnsignedChannelAnnouncement_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return UnsignedChannelUpdate_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return QueryChannelRange_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return QueryChannelRange_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr) {
return QueryChannelRange_set_number_of_blocks(this_ptr_conv, val);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg) {
- LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg;
- FREE((void*)chain_hash_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new(JNIEnv * _env, jclass _b, jbyteArray chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKQueryChannelRange* ret = MALLOC(sizeof(LDKQueryChannelRange), "LDKQueryChannelRange");
- *ret = QueryChannelRange_new(chain_hash_arg_conv, first_blocknum_arg, number_of_blocks_arg);
+ *ret = QueryChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ReplyChannelRange_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ReplyChannelRange_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ReplyChannelRange_set_short_channel_ids(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg, jboolean full_information_arg, jlong short_channel_ids_arg) {
- LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg;
- FREE((void*)chain_hash_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv * _env, jclass _b, jbyteArray chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg, jboolean full_information_arg, jlong short_channel_ids_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKCVec_u64Z short_channel_ids_arg_conv = *(LDKCVec_u64Z*)short_channel_ids_arg;
FREE((void*)short_channel_ids_arg);
LDKReplyChannelRange* ret = MALLOC(sizeof(LDKReplyChannelRange), "LDKReplyChannelRange");
- *ret = ReplyChannelRange_new(chain_hash_arg_conv, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_conv);
+ *ret = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKQueryShortChannelIds* this_ptr_conv = (LDKQueryShortChannelIds*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return QueryShortChannelIds_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return QueryShortChannelIds_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1short_1channel_1ids(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
return QueryShortChannelIds_set_short_channel_ids(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jlong short_channel_ids_arg) {
- LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg;
- FREE((void*)chain_hash_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(JNIEnv * _env, jclass _b, jbyteArray chain_hash_arg, jlong short_channel_ids_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKCVec_u64Z short_channel_ids_arg_conv = *(LDKCVec_u64Z*)short_channel_ids_arg;
FREE((void*)short_channel_ids_arg);
LDKQueryShortChannelIds* ret = MALLOC(sizeof(LDKQueryShortChannelIds), "LDKQueryShortChannelIds");
- *ret = QueryShortChannelIds_new(chain_hash_arg_conv, short_channel_ids_arg_conv);
+ *ret = QueryShortChannelIds_new(chain_hash_arg_ref, short_channel_ids_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKReplyShortChannelIdsEnd* this_ptr_conv = (LDKReplyShortChannelIdsEnd*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return ReplyShortChannelIdsEnd_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return ReplyShortChannelIdsEnd_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1full_1information(JNIEnv * _env, jclass _b, jlong this_ptr) {
return ReplyShortChannelIdsEnd_set_full_information(this_ptr_conv, val);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jboolean full_information_arg) {
- LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg;
- FREE((void*)chain_hash_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new(JNIEnv * _env, jclass _b, jbyteArray chain_hash_arg, jboolean full_information_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKReplyShortChannelIdsEnd* ret = MALLOC(sizeof(LDKReplyShortChannelIdsEnd), "LDKReplyShortChannelIdsEnd");
- *ret = ReplyShortChannelIdsEnd_new(chain_hash_arg_conv, full_information_arg);
+ *ret = ReplyShortChannelIdsEnd_new(chain_hash_arg_ref, full_information_arg);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return GossipTimestampFilter_set_chain_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return GossipTimestampFilter_set_chain_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1first_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) {
return GossipTimestampFilter_set_timestamp_range(this_ptr_conv, val);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_timestamp_arg, jint timestamp_range_arg) {
- LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg;
- FREE((void*)chain_hash_arg);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new(JNIEnv * _env, jclass _b, jbyteArray chain_hash_arg, jint first_timestamp_arg, jint timestamp_range_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKGossipTimestampFilter* ret = MALLOC(sizeof(LDKGossipTimestampFilter), "LDKGossipTimestampFilter");
- *ret = GossipTimestampFilter_new(chain_hash_arg_conv, first_timestamp_arg, timestamp_range_arg);
+ *ret = GossipTimestampFilter_new(chain_hash_arg_ref, first_timestamp_arg, timestamp_range_arg);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
return PeerManager_timer_tick_occured(this_arg_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNIEnv * _env, jclass _b, jbyteArray commitment_seed, jlong idx) {
unsigned char commitment_seed_arr[32];
(*_env)->GetByteArrayRegion (_env, commitment_seed, 0, 32, commitment_seed_arr);
unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = build_commitment_secret(commitment_seed_ref, idx);
- return (long)ret;
+ jbyteArray _arr = (*_env)->NewByteArray(_env, 32);
+ (*_env)->SetByteArrayRegion(_env, _arr, 0, 32, build_commitment_secret(commitment_seed_ref, idx).data);
+ return _arr;
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1private_1key(JNIEnv * _env, jclass _b, jlong per_commitment_point, jbyteArray base_secret) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKHTLCOutputInCommitment* this_ptr_conv = (LDKHTLCOutputInCommitment*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return HTLCOutputInCommitment_set_payment_hash(this_ptr_conv, val_ref);
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv * _env, jclass _b, jlong obj) {
return (long)ret;
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) {
LDKHolderCommitmentTransaction* this_arg_conv = (LDKHolderCommitmentTransaction*)this_arg;
- LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes");
- *ret = HolderCommitmentTransaction_txid(this_arg_conv);
- return (long)ret;
+ jbyteArray _arr = (*_env)->NewByteArray(_env, 32);
+ (*_env)->SetByteArrayRegion(_env, _arr, 0, 32, HolderCommitmentTransaction_txid(this_arg_conv).data);
+ return _arr;
}
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1holder_1sig(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray funding_key, jlong funding_redeemscript, jlong channel_value_satoshis) {
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias(JNIEnv * _env, jclass _b, jlong this_ptr, jbyteArray val) {
LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr;
- LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val;
- FREE((void*)val);
- return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ (*_env)->GetByteArrayRegion (_env, val, 0, 32, val_ref.data);
+ return NodeAnnouncementInfo_set_alias(this_ptr_conv, val_ref);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) {
return NodeAnnouncementInfo_set_announcement_message(this_ptr_conv, val_conv);
}
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(JNIEnv * _env, jclass _b, jlong features_arg, jint last_update_arg, jlong rgb_arg, jlong alias_arg, jlong addresses_arg, jlong announcement_message_arg) {
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(JNIEnv * _env, jclass _b, jlong features_arg, jint last_update_arg, jlong rgb_arg, jbyteArray alias_arg, jlong addresses_arg, jlong announcement_message_arg) {
LDKNodeFeatures features_arg_conv = *(LDKNodeFeatures*)features_arg;
FREE((void*)features_arg);
features_arg_conv.is_owned = true;
LDKThreeBytes rgb_arg_conv = *(LDKThreeBytes*)rgb_arg;
FREE((void*)rgb_arg);
- LDKThirtyTwoBytes alias_arg_conv = *(LDKThirtyTwoBytes*)alias_arg;
- FREE((void*)alias_arg);
+ LDKThirtyTwoBytes alias_arg_ref;
+ (*_env)->GetByteArrayRegion (_env, alias_arg, 0, 32, alias_arg_ref.data);
LDKCVec_NetAddressZ addresses_arg_conv = *(LDKCVec_NetAddressZ*)addresses_arg;
FREE((void*)addresses_arg);
LDKNodeAnnouncement announcement_message_arg_conv = *(LDKNodeAnnouncement*)announcement_message_arg;
FREE((void*)announcement_message_arg);
announcement_message_arg_conv.is_owned = true;
LDKNodeAnnouncementInfo* ret = MALLOC(sizeof(LDKNodeAnnouncementInfo), "LDKNodeAnnouncementInfo");
- *ret = NodeAnnouncementInfo_new(features_arg_conv, last_update_arg, rgb_arg_conv, alias_arg_conv, addresses_arg_conv, announcement_message_arg_conv);
+ *ret = NodeAnnouncementInfo_new(features_arg_conv, last_update_arg, rgb_arg_conv, alias_arg_ref, addresses_arg_conv, announcement_message_arg_conv);
DO_ASSERT(ret->is_owned);
ret->is_owned = false;
return (long)ret;
/*
* Class: org_ldk_impl_bindings
* Method: LDKChannelKeys_call_release_commitment_secret
- * Signature: (JJ)J
+ * Signature: (JJ)[B
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1call_1release_1commitment_1secret
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1call_1release_1commitment_1secret
(JNIEnv *, jclass, jlong, jlong);
/*
/*
* Class: org_ldk_impl_bindings
* Method: LDKKeysInterface_call_get_secure_random_bytes
- * Signature: (J)J
+ * Signature: (J)[B
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1call_1get_1secure_1random_1bytes
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1call_1get_1secure_1random_1bytes
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_TxidCVec_TxOutZZ_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: OutPoint_set_txid
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: OutPoint_new
- * Signature: (JS)J
+ * Signature: ([BS)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new
- (JNIEnv *, jclass, jlong, jshort);
+ (JNIEnv *, jclass, jbyteArray, jshort);
/*
* Class: org_ldk_impl_bindings
* Method: OutPoint_to_channel_id
- * Signature: (J)J
+ * Signature: (J)[B
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
* Method: InMemoryChannelKeys_set_commitment_seed
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: InMemoryChannelKeys_new
- * Signature: (JJJJJJJJ)J
+ * Signature: (JJJJJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelDetails_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_send_payment
- * Signature: (JJJJ)J
+ * Signature: (JJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1payment
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_broadcast_node_announcement
- * Signature: (JJJJ)V
+ * Signature: (JJ[BJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1broadcast_1node_1announcement
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_fail_htlc_backwards
- * Signature: (J[BJ)Z
+ * Signature: (J[B[B)Z
*/
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1fail_1htlc_1backwards
- (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_claim_funds
- * Signature: (JJJJ)Z
+ * Signature: (J[B[BJ)Z
*/
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1claim_1funds
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ErrorMessage_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ErrorMessage_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: OpenChannel_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: OpenChannel_set_temporary_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: AcceptChannel_set_temporary_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_set_temporary_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_set_funding_txid
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1funding_1txid
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_new
- * Signature: (JJSJ)J
+ * Signature: ([B[BSJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new
- (JNIEnv *, jclass, jlong, jlong, jshort, jlong);
+ (JNIEnv *, jclass, jbyteArray, jbyteArray, jshort, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingSigned_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingSigned_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingLocked_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingLocked_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Shutdown_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Shutdown_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ClosingSigned_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ClosingSigned_new
- * Signature: (JJJ)J
+ * Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new
- (JNIEnv *, jclass, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateAddHTLC_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateAddHTLC_set_payment_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1payment_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_set_payment_preimage
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1payment_1preimage
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_new
- * Signature: (JJJ)J
+ * Signature: ([BJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new
- (JNIEnv *, jclass, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailHTLC_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailMalformedHTLC_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_new
- * Signature: (JJJ)J
+ * Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new
- (JNIEnv *, jclass, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_set_per_commitment_secret
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1per_1commitment_1secret
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_new
- * Signature: (JJJ)J
+ * Signature: ([B[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new
- (JNIEnv *, jclass, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFee_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFee_new
- * Signature: (JI)J
+ * Signature: ([BI)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new
- (JNIEnv *, jclass, jlong, jint);
+ (JNIEnv *, jclass, jbyteArray, jint);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: DataLossProtect_set_your_last_per_commitment_secret
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1your_1last_1per_1commitment_1secret
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: DataLossProtect_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReestablish_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: AnnouncementSignatures_set_channel_id
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: AnnouncementSignatures_new
- * Signature: (JJJJ)J
+ * Signature: ([BJJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedNodeAnnouncement_set_alias
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1alias
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedChannelAnnouncement_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedChannelUpdate_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: QueryChannelRange_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: QueryChannelRange_new
- * Signature: (JII)J
+ * Signature: ([BII)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new
- (JNIEnv *, jclass, jlong, jint, jint);
+ (JNIEnv *, jclass, jbyteArray, jint, jint);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ReplyChannelRange_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ReplyChannelRange_new
- * Signature: (JIIZJ)J
+ * Signature: ([BIIZJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new
- (JNIEnv *, jclass, jlong, jint, jint, jboolean, jlong);
+ (JNIEnv *, jclass, jbyteArray, jint, jint, jboolean, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: QueryShortChannelIds_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: QueryShortChannelIds_new
- * Signature: (JJ)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ReplyShortChannelIdsEnd_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ReplyShortChannelIdsEnd_new
- * Signature: (JZ)J
+ * Signature: ([BZ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new
- (JNIEnv *, jclass, jlong, jboolean);
+ (JNIEnv *, jclass, jbyteArray, jboolean);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: GossipTimestampFilter_set_chain_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: GossipTimestampFilter_new
- * Signature: (JII)J
+ * Signature: ([BII)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new
- (JNIEnv *, jclass, jlong, jint, jint);
+ (JNIEnv *, jclass, jbyteArray, jint, jint);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: build_commitment_secret
- * Signature: ([BJ)J
+ * Signature: ([BJ)[B
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret
(JNIEnv *, jclass, jbyteArray, jlong);
/*
/*
* Class: org_ldk_impl_bindings
* Method: HTLCOutputInCommitment_set_payment_hash
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: HolderCommitmentTransaction_txid
- * Signature: (J)J
+ * Signature: (J)[B
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
* Method: NodeAnnouncementInfo_set_alias
- * Signature: (JJ)V
+ * Signature: (J[B)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1alias
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: NodeAnnouncementInfo_new
- * Signature: (JIJJJJ)J
+ * Signature: (JIJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new
- (JNIEnv *, jclass, jlong, jint, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jint, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings