#define DECL_ARR_TYPE(ty, name) \
struct name##array { \
- uint32_t arr_len; \
+ uint64_t arr_len; /* uint32_t would suffice but we want to align uint64_ts as well */ \
ty elems[]; \
}; \
typedef struct name##array * name##Array; \
static inline name##Array init_##name##Array(size_t arr_len, int lineno) { \
- name##Array arr = (name##Array)do_MALLOC(arr_len * sizeof(ty) + sizeof(uint32_t), #name" array init", lineno); \
+ name##Array arr = (name##Array)do_MALLOC(arr_len * sizeof(ty) + sizeof(uint64_t), #name" array init", lineno); \
arr->arr_len = arr_len; \
return arr; \
}
LDKCVec_SignatureZ ret_var = CResult_CVec_SignatureZNoneZ_get_ok(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
LDKCVec_RouteHopZ path_var = obj->payment_path_successful.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->payment_path_failed.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->probe_successful.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->probe_failed.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
uint32_tArray outputs_arr = NULL;
outputs_arr = init_uint32_tArray(outputs_var.datalen, __LINE__);
- uint32_t *outputs_arr_ptr = (uint32_t*)(((uint8_t*)outputs_arr) + 4);
+ uint32_t *outputs_arr_ptr = (uint32_t*)(((uint8_t*)outputs_arr) + 8);
for (size_t b = 0; b < outputs_var.datalen; b++) {
uint32_t outputs_conv_27_ref = ((uintptr_t)&outputs_var.data[b]) | 1;
outputs_arr_ptr[b] = outputs_conv_27_ref;
LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
*ret_conv_14_copy = ret_var.data[o];
if (record_var.is_owned) {
record_ref |= 1;
}
- js_invoke_function_u_u(j_calls->instance_ptr, 0, (uint32_t)record_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 0, (uint32_t)record_ref, 0, 0, 0, 0, 0);
}
static void LDKLogger_JCalls_cloned(LDKLogger* new_obj) {
LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) new_obj->this_arg;
int8_tArray genesis_hash_arr = init_int8_tArray(32, __LINE__);
memcpy(genesis_hash_arr->elems, *genesis_hash, 32);
int64_t short_channel_id_conv = short_channel_id;
- uint32_t ret = js_invoke_function_u_bb(j_calls->instance_ptr, 1, (uint32_t)genesis_hash_arr, (uint32_t)short_channel_id_conv);
+ uint32_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 1, (uint32_t)genesis_hash_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(ret_ptr);
LDKCVec_NetAddressZ some_var = obj->some;
uint32_tArray some_arr = NULL;
some_arr = init_uint32_tArray(some_var.datalen, __LINE__);
- uint32_t *some_arr_ptr = (uint32_t*)(((uint8_t*)some_arr) + 4);
+ uint32_t *some_arr_ptr = (uint32_t*)(((uint8_t*)some_arr) + 8);
for (size_t m = 0; m < some_var.datalen; m++) {
uint32_t some_conv_12_ref = ((uintptr_t)&some_var.data[m]) | 1;
some_arr_ptr[m] = some_conv_12_ref;
LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
LDKPublicKey get_per_commitment_point_LDKBaseSign_jcall(const void* this_arg, uint64_t idx) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
int64_t idx_conv = idx;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_b(j_calls->instance_ptr, 2, (uint32_t)idx_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 2, (uint32_t)idx_conv, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
LDKThirtyTwoBytes release_commitment_secret_LDKBaseSign_jcall(const void* this_arg, uint64_t idx) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
int64_t idx_conv = idx;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_b(j_calls->instance_ptr, 3, (uint32_t)idx_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 3, (uint32_t)idx_conv, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKCVec_PaymentPreimageZ preimages_var = preimages;
ptrArray preimages_arr = NULL;
preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 4);
+ int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
for (size_t m = 0; m < preimages_var.datalen; m++) {
int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
}
FREE(preimages_var.data);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 4, (uint32_t)holder_tx_ref, (uint32_t)preimages_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 4, (uint32_t)holder_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes channel_keys_id_LDKBaseSign_jcall(const void* this_arg) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 5);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 5, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKCVec_PaymentPreimageZ preimages_var = preimages;
ptrArray preimages_arr = NULL;
preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 4);
+ int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
for (size_t m = 0; m < preimages_var.datalen; m++) {
int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
}
FREE(preimages_var.data);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 6, (uint32_t)commitment_tx_ref, (uint32_t)preimages_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 6, (uint32_t)commitment_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(ret_ptr);
int64_t idx_conv = idx;
int8_tArray secret_arr = init_int8_tArray(32, __LINE__);
memcpy(secret_arr->elems, *secret, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 7, (uint32_t)idx_conv, (uint32_t)secret_arr);
+ uint32_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 7, (uint32_t)idx_conv, (uint32_t)secret_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
if (commitment_tx_var.is_owned) {
commitment_tx_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 8, (uint32_t)commitment_tx_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 8, (uint32_t)commitment_tx_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(ret_ptr);
int64_t amount_conv = amount;
int8_tArray per_commitment_key_arr = init_int8_tArray(32, __LINE__);
memcpy(per_commitment_key_arr->elems, *per_commitment_key, 32);
- uint32_t ret = js_invoke_function_u_uuuu(j_calls->instance_ptr, 9, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 9, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (htlc_var.is_owned) {
htlc_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 10, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, (uint32_t)htlc_ref);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 10, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, (uint32_t)htlc_ref, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (htlc_var.is_owned) {
htlc_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 11, (uint32_t)htlc_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_point_arr, (uint32_t)htlc_ref);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 11, (uint32_t)htlc_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_point_arr, (uint32_t)htlc_ref, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (closing_tx_var.is_owned) {
closing_tx_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 12, (uint32_t)closing_tx_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 12, (uint32_t)closing_tx_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 13, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
if (channel_parameters_var.is_owned) {
channel_parameters_ref |= 1;
}
- js_invoke_function_u_u(j_calls->instance_ptr, 14, (uint32_t)channel_parameters_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 14, (uint32_t)channel_parameters_ref, 0, 0, 0, 0, 0);
}
static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
}
LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 15);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
LDKCVec_CVec_u8ZZ ret_var = CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKCVec_u8Z ret_conv_12_var = ret_var.data[m];
int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__);
LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
uint32_tArray path_parameter_error_arr = NULL;
path_parameter_error_arr = init_uint32_tArray(path_parameter_error_var.datalen, __LINE__);
- uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(((uint8_t*)path_parameter_error_arr) + 4);
+ uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(((uint8_t*)path_parameter_error_arr) + 8);
for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
uint32_tArray all_failed_retry_safe_arr = NULL;
all_failed_retry_safe_arr = init_uint32_tArray(all_failed_retry_safe_var.datalen, __LINE__);
- uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(((uint8_t*)all_failed_retry_safe_arr) + 4);
+ uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(((uint8_t*)all_failed_retry_safe_arr) + 8);
for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
uint32_t all_failed_retry_safe_conv_10_ref = ((uintptr_t)&all_failed_retry_safe_var.data[k]) | 1;
all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
uint32_tArray results_arr = NULL;
results_arr = init_uint32_tArray(results_var.datalen, __LINE__);
- uint32_t *results_arr_ptr = (uint32_t*)(((uint8_t*)results_arr) + 4);
+ uint32_t *results_arr_ptr = (uint32_t*)(((uint8_t*)results_arr) + 8);
for (size_t w = 0; w < results_var.datalen; w++) {
LDKCResult_NoneAPIErrorZ* results_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*results_conv_22_conv = results_var.data[w];
if (monitor_var.is_owned) {
monitor_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 16, (uint32_t)funding_txo_ref, (uint32_t)monitor_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, (uint32_t)funding_txo_ref, (uint32_t)monitor_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (update_var.is_owned) {
update_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 17, (uint32_t)funding_txo_ref, (uint32_t)update_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 17, (uint32_t)funding_txo_ref, (uint32_t)update_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
}
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 18);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t x = 0; x < ret_var.datalen; x++) {
LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
*ret_conv_49_conv = ret_var.data[x];
int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
Transaction_free(tx_var);
- js_invoke_function_u_u(j_calls->instance_ptr, 19, (uint32_t)tx_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 20, (uint32_t)recipient_conv);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)recipient_conv, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
}
LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 21);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- uint32_t ret = js_invoke_function_u_(j_calls->instance_ptr, 22);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
LDKShutdownScript ret_conv;
ret_conv.inner = (void*)(ret & (~1));
ret_conv.is_owned = (ret & 1) || (ret == 0);
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
jboolean inbound_conv = inbound;
int64_t channel_value_satoshis_conv = channel_value_satoshis;
- uint32_t ret = js_invoke_function_u_bb(j_calls->instance_ptr, 23, (uint32_t)inbound_conv, (uint32_t)channel_value_satoshis_conv);
+ uint32_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 23, (uint32_t)inbound_conv, (uint32_t)channel_value_satoshis_conv, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKSign ret_conv = *(LDKSign*)(ret_ptr);
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 24);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKu8slice reader_var = reader;
int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 25, (uint32_t)reader_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
LDKCVec_u5Z invoice_data_var = invoice_data;
ptrArray invoice_data_arr = NULL;
invoice_data_arr = init_ptrArray(invoice_data_var.datalen, __LINE__);
- int8_t *invoice_data_arr_ptr = (int8_t*)(((uint8_t*)invoice_data_arr) + 4);
+ int8_t *invoice_data_arr_ptr = (int8_t*)(((uint8_t*)invoice_data_arr) + 8);
for (size_t h = 0; h < invoice_data_var.datalen; h++) {
uint8_t invoice_data_conv_7_val = invoice_data_var.data[h]._0;
invoice_data_arr_ptr[h] = invoice_data_conv_7_val;
FREE(invoice_data_var.data);
uint32_t receipient_conv = LDKRecipient_to_js(receipient);
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 26, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, (uint32_t)receipient_conv);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, (uint32_t)receipient_conv, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 27);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
- return js_invoke_function_u_u(j_calls->instance_ptr, 28, (uint32_t)confirmation_target_conv);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)confirmation_target_conv, 0, 0, 0, 0, 0);
}
static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
}
uint16_t type_id_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- return js_invoke_function_u_(j_calls->instance_ptr, 29);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, 0, 0, 0, 0, 0, 0);
}
LDKStr debug_str_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- jstring ret = (jstring)js_invoke_function_u_(j_calls->instance_ptr, 30);
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
LDKStr ret_conv = str_ref_to_owned_c(ret);
return ret_conv;
}
LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 31);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t v = 0; v < ret_var.datalen; v++) {
LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
*ret_conv_21_conv = ret_var.data[v];
LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t u = 0; u < ret_var.datalen; u++) {
LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
*ret_conv_20_conv = ret_var.data[u];
LDKu8slice script_pubkey_var = script_pubkey;
int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_u_uu(j_calls->instance_ptr, 32, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
}
LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
if (output_var.is_owned) {
output_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 33, (uint32_t)output_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)output_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(ret_ptr);
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 34);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t s = 0; s < ret_var.datalen; s++) {
LDKMessageSendEvent *ret_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
*ret_conv_18_copy = ret_var.data[s];
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
*ret_event = Event_clone(event);
- js_invoke_function_u_u(j_calls->instance_ptr, 35, (uint32_t)(uint32_t)ret_event);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, (uint32_t)(uint32_t)ret_event, 0, 0, 0, 0, 0);
}
static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_u_u(j_calls->instance_ptr, 36, (uint32_t)(uint32_t)handler_ret);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)(uint32_t)handler_ret, 0, 0, 0, 0, 0);
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
if (usage_var.is_owned) {
usage_ref |= 1;
}
- return js_invoke_function_b_uuuu(j_calls->instance_ptr, 37, (uint32_t)short_channel_id_conv, (uint32_t)source_ref, (uint32_t)target_ref, (uint32_t)usage_ref);
+ return js_invoke_function_buuuuu(j_calls->instance_ptr, 37, (uint32_t)short_channel_id_conv, (uint32_t)source_ref, (uint32_t)target_ref, (uint32_t)usage_ref, 0, 0);
}
void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_u_bb(j_calls->instance_ptr, 38, (uint32_t)path_arr, (uint32_t)short_channel_id_conv);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 38, (uint32_t)path_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
}
void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
}
FREE(path_var.data);
- js_invoke_function_u_u(j_calls->instance_ptr, 39, (uint32_t)path_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_u_bb(j_calls->instance_ptr, 40, (uint32_t)path_arr, (uint32_t)short_channel_id_conv);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
}
void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
}
FREE(path_var.data);
- js_invoke_function_u_u(j_calls->instance_ptr, 41, (uint32_t)path_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 42);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 42, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
if (channel_manager_var.is_owned) {
channel_manager_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 43, (uint32_t)channel_manager_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)channel_manager_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
if (network_graph_var.is_owned) {
network_graph_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 44, (uint32_t)network_graph_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, (uint32_t)network_graph_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
if (scorer_var.is_owned) {
scorer_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 45, (uint32_t)scorer_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)scorer_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = NULL;
txdata_arr = init_uint32_tArray(txdata_var.datalen, __LINE__);
- uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 4);
+ uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 8);
for (size_t c = 0; c < txdata_var.datalen; c++) {
LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*txdata_conv_28_conv = txdata_var.data[c];
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_u_uuu(j_calls->instance_ptr, 46, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv, 0, 0, 0);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 47, (uint32_t)block_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)block_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 48, (uint32_t)header_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, (uint32_t)header_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = NULL;
txdata_arr = init_uint32_tArray(txdata_var.datalen, __LINE__);
- uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 4);
+ uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 8);
for (size_t c = 0; c < txdata_var.datalen; c++) {
LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*txdata_conv_28_conv = txdata_var.data[c];
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_u_uuu(j_calls->instance_ptr, 49, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv, 0, 0, 0);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_u_u(j_calls->instance_ptr, 50, (uint32_t)txid_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- ptrArray ret = (ptrArray)js_invoke_function_u_(j_calls->instance_ptr, 52);
+ ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, 0, 0, 0, 0, 0, 0);
LDKCVec_TxidZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_TxidZ ret_var = (this_arg_conv->get_relevant_txids)(this_arg_conv->this_arg);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].data, 32);
if (update_id_var.is_owned) {
update_id_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 53, (uint32_t)channel_id_ref, (uint32_t)data_ref, (uint32_t)update_id_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)channel_id_ref, (uint32_t)data_ref, (uint32_t)update_id_ref, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (update_id_var.is_owned) {
update_id_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuu(j_calls->instance_ptr, 54, (uint32_t)channel_id_ref, (uint32_t)update_ref, (uint32_t)data_ref, (uint32_t)update_id_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)channel_id_ref, (uint32_t)update_ref, (uint32_t)data_ref, (uint32_t)update_id_ref, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 55, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 56, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 57, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 58, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 59, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_u_uu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, (uint32_t)no_connection_possible_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, (uint32_t)no_connection_possible_conv, 0, 0, 0, 0);
}
void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
static void LDKChannelMessageHandler_JCalls_cloned(LDKChannelMessageHandler* new_obj) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) new_obj->this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 75, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 76, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 76, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 77, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
int8_t batch_amount_conv = batch_amount;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_uu(j_calls->instance_ptr, 78, (uint32_t)starting_point_conv, (uint32_t)batch_amount_conv);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 78, (uint32_t)starting_point_conv, (uint32_t)batch_amount_conv, 0, 0, 0, 0);
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
int8_t batch_amount_conv = batch_amount;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_uu(j_calls->instance_ptr, 79, (uint32_t)starting_point_arr, (uint32_t)batch_amount_conv);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)starting_point_arr, (uint32_t)batch_amount_conv, 0, 0, 0, 0);
LDKCVec_NodeAnnouncementZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
if (init_var.is_owned) {
init_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, (uint32_t)init_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, (uint32_t)init_ref, 0, 0, 0, 0);
}
LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t h = 0; h < ret_var.datalen; h++) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
*ret_conv_59_conv = ret_var.data[h];
LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t s = 0; s < ret_var.datalen; s++) {
LDKNodeAnnouncement ret_conv_18_var = ret_var.data[s];
uint32_t ret_conv_18_ref = 0;
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 85, (uint32_t)message_type_conv, (uint32_t)buffer_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 86, (uint32_t)(uint32_t)msg_ret, (uint32_t)sender_node_id_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)(uint32_t)msg_ret, (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 87);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 87, 0, 0, 0, 0, 0, 0);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t z = 0; z < ret_var.datalen; z++) {
LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
*ret_conv_25_conv = ret_var.data[z];
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_u_uu(j_calls->instance_ptr, 88, (uint32_t)data_arr, (uint32_t)resume_read_conv);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 88, (uint32_t)data_arr, (uint32_t)resume_read_conv, 0, 0, 0, 0);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_u_(j_calls->instance_ptr, 89);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 89, 0, 0, 0, 0, 0, 0);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_u_u(j_calls->instance_ptr, 90, (uint32_t)(uint32_t)other_arg_clone);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)(uint32_t)other_arg_clone, 0, 0, 0, 0, 0);
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_b_(j_calls->instance_ptr, 91);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 91, 0, 0, 0, 0, 0, 0);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
}
LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint32_t ret = js_invoke_function_u_(j_calls->instance_ptr, 92);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKScore ret_conv = *(LDKScore*)(ret_ptr);
}
LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 93);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, 0, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
}
LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 94);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 94, 0, 0, 0, 0, 0, 0);
LDKCVec_ChannelDetailsZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
memcpy(payment_hash_arr->elems, payment_hash.data, 32);
int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_secret_arr->elems, payment_secret.data, 32);
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 95, (uint32_t)route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 95, (uint32_t)route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
}
int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 96, (uint32_t)route_ref, (uint32_t)payment_preimage_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
}
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 97, (uint32_t)route_ref, (uint32_t)payment_id_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- js_invoke_function_u_u(j_calls->instance_ptr, 98, (uint32_t)payment_id_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
}
static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
LDKCVec_ChannelDetailsZ ret_var = (this_arg_conv->first_hops)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
if (first_hops != NULL) {
LDKCVec_ChannelDetailsZ first_hops_var = *first_hops_var_ptr;
first_hops_arr = init_uint32_tArray(first_hops_var.datalen, __LINE__);
- uint32_t *first_hops_arr_ptr = (uint32_t*)(((uint8_t*)first_hops_arr) + 4);
+ uint32_t *first_hops_arr_ptr = (uint32_t*)(((uint8_t*)first_hops_arr) + 8);
for (size_t q = 0; q < first_hops_var.datalen; q++) {
LDKChannelDetails first_hops_conv_16_var = first_hops_var.data[q];
uint32_t first_hops_conv_16_ref = 0;
}
// WARNING: This object doesn't live past this scope, needs clone!
uint32_t ret_scorer = ((uintptr_t)scorer) | 1;
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 99, (uint32_t)payer_arr, (uint32_t)route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, (uint32_t)ret_scorer);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, (uint32_t)payer_arr, (uint32_t)route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, (uint32_t)ret_scorer, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
LDKCVec_BalanceZ ret_var = ChainMonitor_get_claimable_balances(&this_arg_conv, ignored_channels_constr);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t j = 0; j < ret_var.datalen; j++) {
LDKBalance *ret_conv_9_copy = MALLOC(sizeof(LDKBalance), "LDKBalance");
*ret_conv_9_copy = ret_var.data[j];
LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t k = 0; k < ret_var.datalen; k++) {
LDKOutPoint ret_conv_10_var = ret_var.data[k];
uint32_t ret_conv_10_ref = 0;
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
*ret_conv_40_conv = ret_var.data[o];
LDKCVec_MonitorEventZ ret_var = ChannelMonitor_get_and_clear_pending_monitor_events(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
*ret_conv_14_copy = ret_var.data[o];
LDKCVec_EventZ ret_var = ChannelMonitor_get_and_clear_pending_events(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t h = 0; h < ret_var.datalen; h++) {
LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*ret_conv_7_copy = ret_var.data[h];
LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKTransaction ret_conv_12_var = ret_var.data[m];
int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_TxidZ ret_var = ChannelMonitor_get_relevant_txids(&this_arg_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].data, 32);
LDKCVec_BalanceZ ret_var = ChannelMonitor_get_claimable_balances(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t j = 0; j < ret_var.datalen; j++) {
LDKBalance *ret_conv_9_copy = MALLOC(sizeof(LDKBalance), "LDKBalance");
*ret_conv_9_copy = ret_var.data[j];
DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
}
+uint32_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_output"))) TS_DelayedPaymentOutputDescriptor_get_output(uint32_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (uint32_t)ret_ref;
+}
+
void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_output"))) TS_DelayedPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
+uint32_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_output"))) TS_StaticPaymentOutputDescriptor_get_output(uint32_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (uint32_t)ret_ref;
+}
+
void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_output"))) TS_StaticPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_ChannelDetailsZ ret_var = PhantomRouteHints_get_channels(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_ChannelDetailsZ ret_var = ChannelManager_list_channels(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_ChannelDetailsZ ret_var = ChannelManager_list_usable_channels(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
CommitmentSigned_set_signature(&this_ptr_conv, val_ref);
}
+ptrArray __attribute__((export_name("TS_CommitmentSigned_get_htlc_signatures"))) TS_CommitmentSigned_get_htlc_signatures(uint32_t this_ptr) {
+ LDKCommitmentSigned this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = CommitmentSigned_get_htlc_signatures(&this_ptr_conv);
+ ptrArray ret_arr = NULL;
+ ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_CommitmentSigned_set_htlc_signatures"))) TS_CommitmentSigned_set_htlc_signatures(uint32_t this_ptr, ptrArray val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedNodeAnnouncement_set_alias(&this_ptr_conv, val_ref);
}
+uint32_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_addresses"))) TS_UnsignedNodeAnnouncement_get_addresses(uint32_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = UnsignedNodeAnnouncement_get_addresses(&this_ptr_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ uint32_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_addresses"))) TS_UnsignedNodeAnnouncement_set_addresses(uint32_t this_ptr, uint32_tArray val) {
LDKUnsignedNodeAnnouncement this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
}
+int8_tArray __attribute__((export_name("TS_UnsignedChannelUpdate_get_excess_data"))) TS_UnsignedChannelUpdate_get_excess_data(uint32_t this_ptr) {
+ LDKUnsignedChannelUpdate this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u8Z ret_var = UnsignedChannelUpdate_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_UnsignedChannelUpdate_set_excess_data"))) TS_UnsignedChannelUpdate_set_excess_data(uint32_t this_ptr, int8_tArray val) {
LDKUnsignedChannelUpdate this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
}
+int64_tArray __attribute__((export_name("TS_ReplyChannelRange_get_short_channel_ids"))) TS_ReplyChannelRange_get_short_channel_ids(uint32_t this_ptr) {
+ LDKReplyChannelRange this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = ReplyChannelRange_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_ReplyChannelRange_set_short_channel_ids"))) TS_ReplyChannelRange_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
LDKReplyChannelRange this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
QueryShortChannelIds_set_chain_hash(&this_ptr_conv, val_ref);
}
+int64_tArray __attribute__((export_name("TS_QueryShortChannelIds_get_short_channel_ids"))) TS_QueryShortChannelIds_get_short_channel_ids(uint32_t this_ptr) {
+ LDKQueryShortChannelIds this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = QueryShortChannelIds_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_QueryShortChannelIds_set_short_channel_ids"))) TS_QueryShortChannelIds_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
LDKQueryShortChannelIds this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_UpdateAddHTLCZ ret_var = CommitmentUpdate_get_update_add_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t p = 0; p < ret_var.datalen; p++) {
LDKUpdateAddHTLC ret_conv_15_var = ret_var.data[p];
uint32_t ret_conv_15_ref = 0;
LDKCVec_UpdateFulfillHTLCZ ret_var = CommitmentUpdate_get_update_fulfill_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t t = 0; t < ret_var.datalen; t++) {
LDKUpdateFulfillHTLC ret_conv_19_var = ret_var.data[t];
uint32_t ret_conv_19_ref = 0;
LDKCVec_UpdateFailHTLCZ ret_var = CommitmentUpdate_get_update_fail_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKUpdateFailHTLC ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_UpdateFailMalformedHTLCZ ret_var = CommitmentUpdate_get_update_fail_malformed_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t z = 0; z < ret_var.datalen; z++) {
LDKUpdateFailMalformedHTLC ret_conv_25_var = ret_var.data[z];
uint32_t ret_conv_25_ref = 0;
LDKCVec_PublicKeyZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(33, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compressed_form, 33);
HolderCommitmentTransaction_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+ptrArray __attribute__((export_name("TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs"))) TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs(uint32_t this_ptr) {
+ LDKHolderCommitmentTransaction this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = HolderCommitmentTransaction_get_counterparty_htlc_sigs(&this_ptr_conv);
+ ptrArray ret_arr = NULL;
+ ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs"))) TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(uint32_t this_ptr, ptrArray val) {
LDKHolderCommitmentTransaction this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeAnnouncementInfo_set_alias(&this_ptr_conv, val_conv);
}
+uint32_tArray __attribute__((export_name("TS_NodeAnnouncementInfo_get_addresses"))) TS_NodeAnnouncementInfo_get_addresses(uint32_t this_ptr) {
+ LDKNodeAnnouncementInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = NodeAnnouncementInfo_get_addresses(&this_ptr_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ uint32_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_NodeAnnouncementInfo_set_addresses"))) TS_NodeAnnouncementInfo_set_addresses(uint32_t this_ptr, uint32_tArray val) {
LDKNodeAnnouncementInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeInfo_free(this_obj_conv);
}
+int64_tArray __attribute__((export_name("TS_NodeInfo_get_channels"))) TS_NodeInfo_get_channels(uint32_t this_ptr) {
+ LDKNodeInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = NodeInfo_get_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_NodeInfo_set_channels"))) TS_NodeInfo_set_channels(uint32_t this_ptr, int64_tArray val) {
LDKNodeInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
return ret_ref;
}
+int64_tArray __attribute__((export_name("TS_ReadOnlyNetworkGraph_list_channels"))) TS_ReadOnlyNetworkGraph_list_channels(uint32_t this_arg) {
+ LDKReadOnlyNetworkGraph this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKCVec_u64Z ret_var = ReadOnlyNetworkGraph_list_channels(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
uint32_t __attribute__((export_name("TS_ReadOnlyNetworkGraph_node"))) TS_ReadOnlyNetworkGraph_node(uint32_t this_arg, uint32_t node_id) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
return ret_ref;
}
+uint32_tArray __attribute__((export_name("TS_ReadOnlyNetworkGraph_list_nodes"))) TS_ReadOnlyNetworkGraph_list_nodes(uint32_t this_arg) {
+ LDKReadOnlyNetworkGraph this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKCVec_NodeIdZ ret_var = ReadOnlyNetworkGraph_list_nodes(&this_arg_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ LDKNodeId ret_conv_8_var = ret_var.data[i];
+ uint32_t ret_conv_8_ref = 0;
+ CHECK((((uintptr_t)ret_conv_8_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_conv_8_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_8_var);
+ ret_conv_8_ref = (uintptr_t)ret_conv_8_var.inner;
+ if (ret_conv_8_var.is_owned) {
+ ret_conv_8_ref |= 1;
+ }
+ ret_arr_ptr[i] = ret_conv_8_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
uint32_t __attribute__((export_name("TS_ReadOnlyNetworkGraph_get_addresses"))) TS_ReadOnlyNetworkGraph_get_addresses(uint32_t this_arg, int8_tArray pubkey) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
LDKCVec_CVec_RouteHopZZ ret_var = Route_get_paths(&this_ptr_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- uint32_tArray *ret_arr_ptr = (uint32_tArray*)(((uint8_t*)ret_arr) + 4);
+ uint32_tArray *ret_arr_ptr = (uint32_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKCVec_RouteHopZ ret_conv_12_var = ret_var.data[m];
uint32_tArray ret_conv_12_arr = NULL;
ret_conv_12_arr = init_uint32_tArray(ret_conv_12_var.datalen, __LINE__);
- uint32_t *ret_conv_12_arr_ptr = (uint32_t*)(((uint8_t*)ret_conv_12_arr) + 4);
+ uint32_t *ret_conv_12_arr_ptr = (uint32_t*)(((uint8_t*)ret_conv_12_arr) + 8);
for (size_t k = 0; k < ret_conv_12_var.datalen; k++) {
LDKRouteHop ret_conv_12_conv_10_var = ret_conv_12_var.data[k];
uint32_t ret_conv_12_conv_10_ref = 0;
LDKCVec_RouteHintZ ret_var = PaymentParameters_get_route_hints(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t l = 0; l < ret_var.datalen; l++) {
LDKRouteHint ret_conv_11_var = ret_var.data[l];
uint32_t ret_conv_11_ref = 0;
PaymentParameters_set_max_channel_saturation_power_of_half(&this_ptr_conv, val);
}
+int64_tArray __attribute__((export_name("TS_PaymentParameters_get_previously_failed_channels"))) TS_PaymentParameters_get_previously_failed_channels(uint32_t this_ptr) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = PaymentParameters_get_previously_failed_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_PaymentParameters_set_previously_failed_channels"))) TS_PaymentParameters_set_previously_failed_channels(uint32_t this_ptr, int64_tArray val) {
LDKPaymentParameters this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_RouteHintHopZ ret_var = RouteHint_get_a(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKRouteHintHop ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_PrivateRouteZ ret_var = RawInvoice_private_routes(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKPrivateRoute ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_PrivateRouteZ ret_var = Invoice_private_routes(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKPrivateRoute ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_RouteHintZ ret_var = Invoice_route_hints(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t l = 0; l < ret_var.datalen; l++) {
LDKRouteHint ret_conv_11_var = ret_var.data[l];
uint32_t ret_conv_11_ref = 0;
#define DECL_ARR_TYPE(ty, name) \
struct name##array { \
- uint32_t arr_len; \
+ uint64_t arr_len; /* uint32_t would suffice but we want to align uint64_ts as well */ \
ty elems[]; \
}; \
typedef struct name##array * name##Array; \
static inline name##Array init_##name##Array(size_t arr_len, int lineno) { \
- name##Array arr = (name##Array)do_MALLOC(arr_len * sizeof(ty) + sizeof(uint32_t), #name" array init", lineno); \
+ name##Array arr = (name##Array)do_MALLOC(arr_len * sizeof(ty) + sizeof(uint64_t), #name" array init", lineno); \
arr->arr_len = arr_len; \
return arr; \
}
LDKCVec_SignatureZ ret_var = CResult_CVec_SignatureZNoneZ_get_ok(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
LDKCVec_RouteHopZ path_var = obj->payment_path_successful.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->payment_path_failed.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->probe_successful.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_RouteHopZ path_var = obj->probe_failed.path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
uint32_tArray outputs_arr = NULL;
outputs_arr = init_uint32_tArray(outputs_var.datalen, __LINE__);
- uint32_t *outputs_arr_ptr = (uint32_t*)(((uint8_t*)outputs_arr) + 4);
+ uint32_t *outputs_arr_ptr = (uint32_t*)(((uint8_t*)outputs_arr) + 8);
for (size_t b = 0; b < outputs_var.datalen; b++) {
uint32_t outputs_conv_27_ref = ((uintptr_t)&outputs_var.data[b]) | 1;
outputs_arr_ptr[b] = outputs_conv_27_ref;
LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
*ret_conv_14_copy = ret_var.data[o];
if (record_var.is_owned) {
record_ref |= 1;
}
- js_invoke_function_u_u(j_calls->instance_ptr, 0, (uint32_t)record_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 0, (uint32_t)record_ref, 0, 0, 0, 0, 0);
}
static void LDKLogger_JCalls_cloned(LDKLogger* new_obj) {
LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) new_obj->this_arg;
int8_tArray genesis_hash_arr = init_int8_tArray(32, __LINE__);
memcpy(genesis_hash_arr->elems, *genesis_hash, 32);
int64_t short_channel_id_conv = short_channel_id;
- uint32_t ret = js_invoke_function_u_bb(j_calls->instance_ptr, 1, (uint32_t)genesis_hash_arr, (uint32_t)short_channel_id_conv);
+ uint32_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 1, (uint32_t)genesis_hash_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(ret_ptr);
LDKCVec_NetAddressZ some_var = obj->some;
uint32_tArray some_arr = NULL;
some_arr = init_uint32_tArray(some_var.datalen, __LINE__);
- uint32_t *some_arr_ptr = (uint32_t*)(((uint8_t*)some_arr) + 4);
+ uint32_t *some_arr_ptr = (uint32_t*)(((uint8_t*)some_arr) + 8);
for (size_t m = 0; m < some_var.datalen; m++) {
uint32_t some_conv_12_ref = ((uintptr_t)&some_var.data[m]) | 1;
some_arr_ptr[m] = some_conv_12_ref;
LDKCVec_SignatureZ ret_var = C2Tuple_SignatureCVec_SignatureZZ_get_b(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
LDKPublicKey get_per_commitment_point_LDKBaseSign_jcall(const void* this_arg, uint64_t idx) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
int64_t idx_conv = idx;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_b(j_calls->instance_ptr, 2, (uint32_t)idx_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 2, (uint32_t)idx_conv, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
LDKThirtyTwoBytes release_commitment_secret_LDKBaseSign_jcall(const void* this_arg, uint64_t idx) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
int64_t idx_conv = idx;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_b(j_calls->instance_ptr, 3, (uint32_t)idx_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 3, (uint32_t)idx_conv, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKCVec_PaymentPreimageZ preimages_var = preimages;
ptrArray preimages_arr = NULL;
preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 4);
+ int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
for (size_t m = 0; m < preimages_var.datalen; m++) {
int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
}
FREE(preimages_var.data);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 4, (uint32_t)holder_tx_ref, (uint32_t)preimages_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 4, (uint32_t)holder_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes channel_keys_id_LDKBaseSign_jcall(const void* this_arg) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 5);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 5, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKCVec_PaymentPreimageZ preimages_var = preimages;
ptrArray preimages_arr = NULL;
preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 4);
+ int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
for (size_t m = 0; m < preimages_var.datalen; m++) {
int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
}
FREE(preimages_var.data);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 6, (uint32_t)commitment_tx_ref, (uint32_t)preimages_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 6, (uint32_t)commitment_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(ret_ptr);
int64_t idx_conv = idx;
int8_tArray secret_arr = init_int8_tArray(32, __LINE__);
memcpy(secret_arr->elems, *secret, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 7, (uint32_t)idx_conv, (uint32_t)secret_arr);
+ uint32_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 7, (uint32_t)idx_conv, (uint32_t)secret_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
if (commitment_tx_var.is_owned) {
commitment_tx_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 8, (uint32_t)commitment_tx_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 8, (uint32_t)commitment_tx_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(ret_ptr);
int64_t amount_conv = amount;
int8_tArray per_commitment_key_arr = init_int8_tArray(32, __LINE__);
memcpy(per_commitment_key_arr->elems, *per_commitment_key, 32);
- uint32_t ret = js_invoke_function_u_uuuu(j_calls->instance_ptr, 9, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 9, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (htlc_var.is_owned) {
htlc_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 10, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, (uint32_t)htlc_ref);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 10, (uint32_t)justice_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_key_arr, (uint32_t)htlc_ref, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (htlc_var.is_owned) {
htlc_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 11, (uint32_t)htlc_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_point_arr, (uint32_t)htlc_ref);
+ uint32_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 11, (uint32_t)htlc_tx_arr, (uint32_t)input_conv, (uint32_t)amount_conv, (uint32_t)per_commitment_point_arr, (uint32_t)htlc_ref, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (closing_tx_var.is_owned) {
closing_tx_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 12, (uint32_t)closing_tx_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 12, (uint32_t)closing_tx_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 13, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
if (channel_parameters_var.is_owned) {
channel_parameters_ref |= 1;
}
- js_invoke_function_u_u(j_calls->instance_ptr, 14, (uint32_t)channel_parameters_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 14, (uint32_t)channel_parameters_ref, 0, 0, 0, 0, 0);
}
static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
}
LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 15);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
LDKCVec_CVec_u8ZZ ret_var = CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKCVec_u8Z ret_conv_12_var = ret_var.data[m];
int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__);
LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
uint32_tArray path_parameter_error_arr = NULL;
path_parameter_error_arr = init_uint32_tArray(path_parameter_error_var.datalen, __LINE__);
- uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(((uint8_t*)path_parameter_error_arr) + 4);
+ uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(((uint8_t*)path_parameter_error_arr) + 8);
for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
uint32_tArray all_failed_retry_safe_arr = NULL;
all_failed_retry_safe_arr = init_uint32_tArray(all_failed_retry_safe_var.datalen, __LINE__);
- uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(((uint8_t*)all_failed_retry_safe_arr) + 4);
+ uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(((uint8_t*)all_failed_retry_safe_arr) + 8);
for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
uint32_t all_failed_retry_safe_conv_10_ref = ((uintptr_t)&all_failed_retry_safe_var.data[k]) | 1;
all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
uint32_tArray results_arr = NULL;
results_arr = init_uint32_tArray(results_var.datalen, __LINE__);
- uint32_t *results_arr_ptr = (uint32_t*)(((uint8_t*)results_arr) + 4);
+ uint32_t *results_arr_ptr = (uint32_t*)(((uint8_t*)results_arr) + 8);
for (size_t w = 0; w < results_var.datalen; w++) {
LDKCResult_NoneAPIErrorZ* results_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*results_conv_22_conv = results_var.data[w];
if (monitor_var.is_owned) {
monitor_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 16, (uint32_t)funding_txo_ref, (uint32_t)monitor_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, (uint32_t)funding_txo_ref, (uint32_t)monitor_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (update_var.is_owned) {
update_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 17, (uint32_t)funding_txo_ref, (uint32_t)update_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 17, (uint32_t)funding_txo_ref, (uint32_t)update_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
}
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 18);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t x = 0; x < ret_var.datalen; x++) {
LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
*ret_conv_49_conv = ret_var.data[x];
int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
Transaction_free(tx_var);
- js_invoke_function_u_u(j_calls->instance_ptr, 19, (uint32_t)tx_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 20, (uint32_t)recipient_conv);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)recipient_conv, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
}
LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 21);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- uint32_t ret = js_invoke_function_u_(j_calls->instance_ptr, 22);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
LDKShutdownScript ret_conv;
ret_conv.inner = (void*)(ret & (~1));
ret_conv.is_owned = (ret & 1) || (ret == 0);
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
jboolean inbound_conv = inbound;
int64_t channel_value_satoshis_conv = channel_value_satoshis;
- uint32_t ret = js_invoke_function_u_bb(j_calls->instance_ptr, 23, (uint32_t)inbound_conv, (uint32_t)channel_value_satoshis_conv);
+ uint32_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 23, (uint32_t)inbound_conv, (uint32_t)channel_value_satoshis_conv, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKSign ret_conv = *(LDKSign*)(ret_ptr);
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 24);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKu8slice reader_var = reader;
int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 25, (uint32_t)reader_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
LDKCVec_u5Z invoice_data_var = invoice_data;
ptrArray invoice_data_arr = NULL;
invoice_data_arr = init_ptrArray(invoice_data_var.datalen, __LINE__);
- int8_t *invoice_data_arr_ptr = (int8_t*)(((uint8_t*)invoice_data_arr) + 4);
+ int8_t *invoice_data_arr_ptr = (int8_t*)(((uint8_t*)invoice_data_arr) + 8);
for (size_t h = 0; h < invoice_data_var.datalen; h++) {
uint8_t invoice_data_conv_7_val = invoice_data_var.data[h]._0;
invoice_data_arr_ptr[h] = invoice_data_conv_7_val;
FREE(invoice_data_var.data);
uint32_t receipient_conv = LDKRecipient_to_js(receipient);
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 26, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, (uint32_t)receipient_conv);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, (uint32_t)receipient_conv, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 27);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
- return js_invoke_function_u_u(j_calls->instance_ptr, 28, (uint32_t)confirmation_target_conv);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)confirmation_target_conv, 0, 0, 0, 0, 0);
}
static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
}
uint16_t type_id_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- return js_invoke_function_u_(j_calls->instance_ptr, 29);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, 0, 0, 0, 0, 0, 0);
}
LDKStr debug_str_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- jstring ret = (jstring)js_invoke_function_u_(j_calls->instance_ptr, 30);
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
LDKStr ret_conv = str_ref_to_owned_c(ret);
return ret_conv;
}
LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 31);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
LDKCVec_C2Tuple_u32ScriptZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t v = 0; v < ret_var.datalen; v++) {
LDKC2Tuple_u32ScriptZ* ret_conv_21_conv = MALLOC(sizeof(LDKC2Tuple_u32ScriptZ), "LDKC2Tuple_u32ScriptZ");
*ret_conv_21_conv = ret_var.data[v];
LDKCVec_C2Tuple_u32TxOutZZ ret_var = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t u = 0; u < ret_var.datalen; u++) {
LDKC2Tuple_u32TxOutZ* ret_conv_20_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
*ret_conv_20_conv = ret_var.data[u];
LDKu8slice script_pubkey_var = script_pubkey;
int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_u_uu(j_calls->instance_ptr, 32, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
}
LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
if (output_var.is_owned) {
output_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 33, (uint32_t)output_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)output_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(ret_ptr);
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 34);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t s = 0; s < ret_var.datalen; s++) {
LDKMessageSendEvent *ret_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
*ret_conv_18_copy = ret_var.data[s];
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
*ret_event = Event_clone(event);
- js_invoke_function_u_u(j_calls->instance_ptr, 35, (uint32_t)(uint32_t)ret_event);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, (uint32_t)(uint32_t)ret_event, 0, 0, 0, 0, 0);
}
static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_u_u(j_calls->instance_ptr, 36, (uint32_t)(uint32_t)handler_ret);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)(uint32_t)handler_ret, 0, 0, 0, 0, 0);
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
if (usage_var.is_owned) {
usage_ref |= 1;
}
- return js_invoke_function_b_uuuu(j_calls->instance_ptr, 37, (uint32_t)short_channel_id_conv, (uint32_t)source_ref, (uint32_t)target_ref, (uint32_t)usage_ref);
+ return js_invoke_function_buuuuu(j_calls->instance_ptr, 37, (uint32_t)short_channel_id_conv, (uint32_t)source_ref, (uint32_t)target_ref, (uint32_t)usage_ref, 0, 0);
}
void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_u_bb(j_calls->instance_ptr, 38, (uint32_t)path_arr, (uint32_t)short_channel_id_conv);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 38, (uint32_t)path_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
}
void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
}
FREE(path_var.data);
- js_invoke_function_u_u(j_calls->instance_ptr, 39, (uint32_t)path_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_u_bb(j_calls->instance_ptr, 40, (uint32_t)path_arr, (uint32_t)short_channel_id_conv);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, (uint32_t)short_channel_id_conv, 0, 0, 0, 0);
}
void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
LDKCVec_RouteHopZ path_var = path;
uint32_tArray path_arr = NULL;
path_arr = init_uint32_tArray(path_var.datalen, __LINE__);
- uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 4);
+ uint32_t *path_arr_ptr = (uint32_t*)(((uint8_t*)path_arr) + 8);
for (size_t k = 0; k < path_var.datalen; k++) {
LDKRouteHop path_conv_10_var = path_var.data[k];
uint32_t path_conv_10_ref = 0;
}
FREE(path_var.data);
- js_invoke_function_u_u(j_calls->instance_ptr, 41, (uint32_t)path_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 42);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 42, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
if (channel_manager_var.is_owned) {
channel_manager_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 43, (uint32_t)channel_manager_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)channel_manager_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
if (network_graph_var.is_owned) {
network_graph_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 44, (uint32_t)network_graph_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, (uint32_t)network_graph_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
if (scorer_var.is_owned) {
scorer_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 45, (uint32_t)scorer_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)scorer_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = NULL;
txdata_arr = init_uint32_tArray(txdata_var.datalen, __LINE__);
- uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 4);
+ uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 8);
for (size_t c = 0; c < txdata_var.datalen; c++) {
LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*txdata_conv_28_conv = txdata_var.data[c];
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_u_uuu(j_calls->instance_ptr, 46, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv, 0, 0, 0);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 47, (uint32_t)block_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)block_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 48, (uint32_t)header_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, (uint32_t)header_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
LDKCVec_C2Tuple_usizeTransactionZZ txdata_var = txdata;
uint32_tArray txdata_arr = NULL;
txdata_arr = init_uint32_tArray(txdata_var.datalen, __LINE__);
- uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 4);
+ uint32_t *txdata_arr_ptr = (uint32_t*)(((uint8_t*)txdata_arr) + 8);
for (size_t c = 0; c < txdata_var.datalen; c++) {
LDKC2Tuple_usizeTransactionZ* txdata_conv_28_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*txdata_conv_28_conv = txdata_var.data[c];
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_u_uuu(j_calls->instance_ptr, 49, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, (uint32_t)header_arr, (uint32_t)txdata_arr, (uint32_t)height_conv, 0, 0, 0);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_u_u(j_calls->instance_ptr, 50, (uint32_t)txid_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_u_uu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)height_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)height_conv, 0, 0, 0, 0);
}
LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- ptrArray ret = (ptrArray)js_invoke_function_u_(j_calls->instance_ptr, 52);
+ ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, 0, 0, 0, 0, 0, 0);
LDKCVec_TxidZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_TxidZ ret_var = (this_arg_conv->get_relevant_txids)(this_arg_conv->this_arg);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].data, 32);
if (update_id_var.is_owned) {
update_id_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 53, (uint32_t)channel_id_ref, (uint32_t)data_ref, (uint32_t)update_id_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)channel_id_ref, (uint32_t)data_ref, (uint32_t)update_id_ref, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (update_id_var.is_owned) {
update_id_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uuuu(j_calls->instance_ptr, 54, (uint32_t)channel_id_ref, (uint32_t)update_ref, (uint32_t)data_ref, (uint32_t)update_id_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)channel_id_ref, (uint32_t)update_ref, (uint32_t)data_ref, (uint32_t)update_id_ref, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 55, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 56, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 57, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 58, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 59, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, (uint32_t)their_features_ref, (uint32_t)msg_ref, 0, 0, 0);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_u_uu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, (uint32_t)no_connection_possible_conv);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, (uint32_t)no_connection_possible_conv, 0, 0, 0, 0);
}
void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
}
static void LDKChannelMessageHandler_JCalls_cloned(LDKChannelMessageHandler* new_obj) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) new_obj->this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 75, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 76, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 76, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_u(j_calls->instance_ptr, 77, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, (uint32_t)msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
int8_t batch_amount_conv = batch_amount;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_uu(j_calls->instance_ptr, 78, (uint32_t)starting_point_conv, (uint32_t)batch_amount_conv);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_buuuuu(j_calls->instance_ptr, 78, (uint32_t)starting_point_conv, (uint32_t)batch_amount_conv, 0, 0, 0, 0);
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
int8_t batch_amount_conv = batch_amount;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_uu(j_calls->instance_ptr, 79, (uint32_t)starting_point_arr, (uint32_t)batch_amount_conv);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)starting_point_arr, (uint32_t)batch_amount_conv, 0, 0, 0, 0);
LDKCVec_NodeAnnouncementZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
if (init_var.is_owned) {
init_ref |= 1;
}
- js_invoke_function_u_uu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, (uint32_t)init_ref);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, (uint32_t)init_ref, 0, 0, 0, 0);
}
LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
if (msg_var.is_owned) {
msg_ref |= 1;
}
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, (uint32_t)msg_ref);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, (uint32_t)msg_ref, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t h = 0; h < ret_var.datalen; h++) {
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_59_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
*ret_conv_59_conv = ret_var.data[h];
LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t s = 0; s < ret_var.datalen; s++) {
LDKNodeAnnouncement ret_conv_18_var = ret_var.data[s];
uint32_t ret_conv_18_ref = 0;
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 85, (uint32_t)message_type_conv, (uint32_t)buffer_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 86, (uint32_t)(uint32_t)msg_ret, (uint32_t)sender_node_id_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)(uint32_t)msg_ret, (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 87);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 87, 0, 0, 0, 0, 0, 0);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_var = (this_arg_conv->get_and_clear_pending_msg)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t z = 0; z < ret_var.datalen; z++) {
LDKC2Tuple_PublicKeyTypeZ* ret_conv_25_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyTypeZ), "LDKC2Tuple_PublicKeyTypeZ");
*ret_conv_25_conv = ret_var.data[z];
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_u_uu(j_calls->instance_ptr, 88, (uint32_t)data_arr, (uint32_t)resume_read_conv);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 88, (uint32_t)data_arr, (uint32_t)resume_read_conv, 0, 0, 0, 0);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_u_(j_calls->instance_ptr, 89);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 89, 0, 0, 0, 0, 0, 0);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_u_u(j_calls->instance_ptr, 90, (uint32_t)(uint32_t)other_arg_clone);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)(uint32_t)other_arg_clone, 0, 0, 0, 0, 0);
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_b_(j_calls->instance_ptr, 91);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 91, 0, 0, 0, 0, 0, 0);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
}
LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint32_t ret = js_invoke_function_u_(j_calls->instance_ptr, 92);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKScore ret_conv = *(LDKScore*)(ret_ptr);
}
LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_u_(j_calls->instance_ptr, 93);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, 0, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
}
LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- uint32_tArray ret = (uint32_tArray)js_invoke_function_u_(j_calls->instance_ptr, 94);
+ uint32_tArray ret = (uint32_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 94, 0, 0, 0, 0, 0, 0);
LDKCVec_ChannelDetailsZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
memcpy(payment_hash_arr->elems, payment_hash.data, 32);
int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_secret_arr->elems, payment_secret.data, 32);
- uint32_t ret = js_invoke_function_u_uuu(j_calls->instance_ptr, 95, (uint32_t)route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 95, (uint32_t)route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
}
int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 96, (uint32_t)route_ref, (uint32_t)payment_preimage_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
}
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- uint32_t ret = js_invoke_function_u_uu(j_calls->instance_ptr, 97, (uint32_t)route_ref, (uint32_t)payment_id_arr);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- js_invoke_function_u_u(j_calls->instance_ptr, 98, (uint32_t)payment_id_arr);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
}
static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
LDKCVec_ChannelDetailsZ ret_var = (this_arg_conv->first_hops)(this_arg_conv->this_arg);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
if (first_hops != NULL) {
LDKCVec_ChannelDetailsZ first_hops_var = *first_hops_var_ptr;
first_hops_arr = init_uint32_tArray(first_hops_var.datalen, __LINE__);
- uint32_t *first_hops_arr_ptr = (uint32_t*)(((uint8_t*)first_hops_arr) + 4);
+ uint32_t *first_hops_arr_ptr = (uint32_t*)(((uint8_t*)first_hops_arr) + 8);
for (size_t q = 0; q < first_hops_var.datalen; q++) {
LDKChannelDetails first_hops_conv_16_var = first_hops_var.data[q];
uint32_t first_hops_conv_16_ref = 0;
}
// WARNING: This object doesn't live past this scope, needs clone!
uint32_t ret_scorer = ((uintptr_t)scorer) | 1;
- uint32_t ret = js_invoke_function_u_uuuuu(j_calls->instance_ptr, 99, (uint32_t)payer_arr, (uint32_t)route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, (uint32_t)ret_scorer);
+ uint32_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, (uint32_t)payer_arr, (uint32_t)route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, (uint32_t)ret_scorer, 0);
void* ret_ptr = (void*)(((uintptr_t)ret) & ~1);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
LDKCVec_BalanceZ ret_var = ChainMonitor_get_claimable_balances(&this_arg_conv, ignored_channels_constr);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t j = 0; j < ret_var.datalen; j++) {
LDKBalance *ret_conv_9_copy = MALLOC(sizeof(LDKBalance), "LDKBalance");
*ret_conv_9_copy = ret_var.data[j];
LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t k = 0; k < ret_var.datalen; k++) {
LDKOutPoint ret_conv_10_var = ret_var.data[k];
uint32_t ret_conv_10_ref = 0;
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ret_var = ChannelMonitor_get_outputs_to_watch(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ");
*ret_conv_40_conv = ret_var.data[o];
LDKCVec_MonitorEventZ ret_var = ChannelMonitor_get_and_clear_pending_monitor_events(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
*ret_conv_14_copy = ret_var.data[o];
LDKCVec_EventZ ret_var = ChannelMonitor_get_and_clear_pending_events(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t h = 0; h < ret_var.datalen; h++) {
LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*ret_conv_7_copy = ret_var.data[h];
LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKTransaction ret_conv_12_var = ret_var.data[m];
int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__);
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t n = 0; n < ret_var.datalen; n++) {
LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_39_conv = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
*ret_conv_39_conv = ret_var.data[n];
LDKCVec_TxidZ ret_var = ChannelMonitor_get_relevant_txids(&this_arg_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(32, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].data, 32);
LDKCVec_BalanceZ ret_var = ChannelMonitor_get_claimable_balances(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t j = 0; j < ret_var.datalen; j++) {
LDKBalance *ret_conv_9_copy = MALLOC(sizeof(LDKBalance), "LDKBalance");
*ret_conv_9_copy = ret_var.data[j];
DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
}
+uint32_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_output"))) TS_DelayedPaymentOutputDescriptor_get_output(uint32_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (uint32_t)ret_ref;
+}
+
void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_output"))) TS_DelayedPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
+uint32_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_output"))) TS_StaticPaymentOutputDescriptor_get_output(uint32_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return (uint32_t)ret_ref;
+}
+
void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_output"))) TS_StaticPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_ChannelDetailsZ ret_var = PhantomRouteHints_get_channels(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_ChannelDetailsZ ret_var = ChannelManager_list_channels(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_ChannelDetailsZ ret_var = ChannelManager_list_usable_channels(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKChannelDetails ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
CommitmentSigned_set_signature(&this_ptr_conv, val_ref);
}
+ptrArray __attribute__((export_name("TS_CommitmentSigned_get_htlc_signatures"))) TS_CommitmentSigned_get_htlc_signatures(uint32_t this_ptr) {
+ LDKCommitmentSigned this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = CommitmentSigned_get_htlc_signatures(&this_ptr_conv);
+ ptrArray ret_arr = NULL;
+ ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_CommitmentSigned_set_htlc_signatures"))) TS_CommitmentSigned_set_htlc_signatures(uint32_t this_ptr, ptrArray val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedNodeAnnouncement_set_alias(&this_ptr_conv, val_ref);
}
+uint32_tArray __attribute__((export_name("TS_UnsignedNodeAnnouncement_get_addresses"))) TS_UnsignedNodeAnnouncement_get_addresses(uint32_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = UnsignedNodeAnnouncement_get_addresses(&this_ptr_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ uint32_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_UnsignedNodeAnnouncement_set_addresses"))) TS_UnsignedNodeAnnouncement_set_addresses(uint32_t this_ptr, uint32_tArray val) {
LDKUnsignedNodeAnnouncement this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
}
+int8_tArray __attribute__((export_name("TS_UnsignedChannelUpdate_get_excess_data"))) TS_UnsignedChannelUpdate_get_excess_data(uint32_t this_ptr) {
+ LDKUnsignedChannelUpdate this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u8Z ret_var = UnsignedChannelUpdate_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_UnsignedChannelUpdate_set_excess_data"))) TS_UnsignedChannelUpdate_set_excess_data(uint32_t this_ptr, int8_tArray val) {
LDKUnsignedChannelUpdate this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
}
+int64_tArray __attribute__((export_name("TS_ReplyChannelRange_get_short_channel_ids"))) TS_ReplyChannelRange_get_short_channel_ids(uint32_t this_ptr) {
+ LDKReplyChannelRange this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = ReplyChannelRange_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_ReplyChannelRange_set_short_channel_ids"))) TS_ReplyChannelRange_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
LDKReplyChannelRange this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
QueryShortChannelIds_set_chain_hash(&this_ptr_conv, val_ref);
}
+int64_tArray __attribute__((export_name("TS_QueryShortChannelIds_get_short_channel_ids"))) TS_QueryShortChannelIds_get_short_channel_ids(uint32_t this_ptr) {
+ LDKQueryShortChannelIds this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = QueryShortChannelIds_get_short_channel_ids(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_QueryShortChannelIds_set_short_channel_ids"))) TS_QueryShortChannelIds_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
LDKQueryShortChannelIds this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_UpdateAddHTLCZ ret_var = CommitmentUpdate_get_update_add_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t p = 0; p < ret_var.datalen; p++) {
LDKUpdateAddHTLC ret_conv_15_var = ret_var.data[p];
uint32_t ret_conv_15_ref = 0;
LDKCVec_UpdateFulfillHTLCZ ret_var = CommitmentUpdate_get_update_fulfill_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t t = 0; t < ret_var.datalen; t++) {
LDKUpdateFulfillHTLC ret_conv_19_var = ret_var.data[t];
uint32_t ret_conv_19_ref = 0;
LDKCVec_UpdateFailHTLCZ ret_var = CommitmentUpdate_get_update_fail_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t q = 0; q < ret_var.datalen; q++) {
LDKUpdateFailHTLC ret_conv_16_var = ret_var.data[q];
uint32_t ret_conv_16_ref = 0;
LDKCVec_UpdateFailMalformedHTLCZ ret_var = CommitmentUpdate_get_update_fail_malformed_htlcs(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t z = 0; z < ret_var.datalen; z++) {
LDKUpdateFailMalformedHTLC ret_conv_25_var = ret_var.data[z];
uint32_t ret_conv_25_ref = 0;
LDKCVec_PublicKeyZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 4);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
int8_tArray ret_conv_12_arr = init_int8_tArray(33, __LINE__);
memcpy(ret_conv_12_arr->elems, ret_var.data[m].compressed_form, 33);
HolderCommitmentTransaction_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+ptrArray __attribute__((export_name("TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs"))) TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs(uint32_t this_ptr) {
+ LDKHolderCommitmentTransaction this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_SignatureZ ret_var = HolderCommitmentTransaction_get_counterparty_htlc_sigs(&this_ptr_conv);
+ ptrArray ret_arr = NULL;
+ ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs"))) TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(uint32_t this_ptr, ptrArray val) {
LDKHolderCommitmentTransaction this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeAnnouncementInfo_set_alias(&this_ptr_conv, val_conv);
}
+uint32_tArray __attribute__((export_name("TS_NodeAnnouncementInfo_get_addresses"))) TS_NodeAnnouncementInfo_get_addresses(uint32_t this_ptr) {
+ LDKNodeAnnouncementInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_NetAddressZ ret_var = NodeAnnouncementInfo_get_addresses(&this_ptr_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ LDKNetAddress *ret_conv_12_copy = MALLOC(sizeof(LDKNetAddress), "LDKNetAddress");
+ *ret_conv_12_copy = ret_var.data[m];
+ uint32_t ret_conv_12_ref = (uintptr_t)ret_conv_12_copy;
+ ret_arr_ptr[m] = ret_conv_12_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_NodeAnnouncementInfo_set_addresses"))) TS_NodeAnnouncementInfo_set_addresses(uint32_t this_ptr, uint32_tArray val) {
LDKNodeAnnouncementInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
NodeInfo_free(this_obj_conv);
}
+int64_tArray __attribute__((export_name("TS_NodeInfo_get_channels"))) TS_NodeInfo_get_channels(uint32_t this_ptr) {
+ LDKNodeInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = NodeInfo_get_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_NodeInfo_set_channels"))) TS_NodeInfo_set_channels(uint32_t this_ptr, int64_tArray val) {
LDKNodeInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
return ret_ref;
}
+int64_tArray __attribute__((export_name("TS_ReadOnlyNetworkGraph_list_channels"))) TS_ReadOnlyNetworkGraph_list_channels(uint32_t this_arg) {
+ LDKReadOnlyNetworkGraph this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKCVec_u64Z ret_var = ReadOnlyNetworkGraph_list_channels(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
uint32_t __attribute__((export_name("TS_ReadOnlyNetworkGraph_node"))) TS_ReadOnlyNetworkGraph_node(uint32_t this_arg, uint32_t node_id) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
return ret_ref;
}
+uint32_tArray __attribute__((export_name("TS_ReadOnlyNetworkGraph_list_nodes"))) TS_ReadOnlyNetworkGraph_list_nodes(uint32_t this_arg) {
+ LDKReadOnlyNetworkGraph this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ LDKCVec_NodeIdZ ret_var = ReadOnlyNetworkGraph_list_nodes(&this_arg_conv);
+ uint32_tArray ret_arr = NULL;
+ ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ LDKNodeId ret_conv_8_var = ret_var.data[i];
+ uint32_t ret_conv_8_ref = 0;
+ CHECK((((uintptr_t)ret_conv_8_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((uintptr_t)&ret_conv_8_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_8_var);
+ ret_conv_8_ref = (uintptr_t)ret_conv_8_var.inner;
+ if (ret_conv_8_var.is_owned) {
+ ret_conv_8_ref |= 1;
+ }
+ ret_arr_ptr[i] = ret_conv_8_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
uint32_t __attribute__((export_name("TS_ReadOnlyNetworkGraph_get_addresses"))) TS_ReadOnlyNetworkGraph_get_addresses(uint32_t this_arg, int8_tArray pubkey) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
LDKCVec_CVec_RouteHopZZ ret_var = Route_get_paths(&this_ptr_conv);
ptrArray ret_arr = NULL;
ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- uint32_tArray *ret_arr_ptr = (uint32_tArray*)(((uint8_t*)ret_arr) + 4);
+ uint32_tArray *ret_arr_ptr = (uint32_tArray*)(((uint8_t*)ret_arr) + 8);
for (size_t m = 0; m < ret_var.datalen; m++) {
LDKCVec_RouteHopZ ret_conv_12_var = ret_var.data[m];
uint32_tArray ret_conv_12_arr = NULL;
ret_conv_12_arr = init_uint32_tArray(ret_conv_12_var.datalen, __LINE__);
- uint32_t *ret_conv_12_arr_ptr = (uint32_t*)(((uint8_t*)ret_conv_12_arr) + 4);
+ uint32_t *ret_conv_12_arr_ptr = (uint32_t*)(((uint8_t*)ret_conv_12_arr) + 8);
for (size_t k = 0; k < ret_conv_12_var.datalen; k++) {
LDKRouteHop ret_conv_12_conv_10_var = ret_conv_12_var.data[k];
uint32_t ret_conv_12_conv_10_ref = 0;
LDKCVec_RouteHintZ ret_var = PaymentParameters_get_route_hints(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t l = 0; l < ret_var.datalen; l++) {
LDKRouteHint ret_conv_11_var = ret_var.data[l];
uint32_t ret_conv_11_ref = 0;
PaymentParameters_set_max_channel_saturation_power_of_half(&this_ptr_conv, val);
}
+int64_tArray __attribute__((export_name("TS_PaymentParameters_get_previously_failed_channels"))) TS_PaymentParameters_get_previously_failed_channels(uint32_t this_ptr) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ LDKCVec_u64Z ret_var = PaymentParameters_get_previously_failed_channels(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_PaymentParameters_set_previously_failed_channels"))) TS_PaymentParameters_set_previously_failed_channels(uint32_t this_ptr, int64_tArray val) {
LDKPaymentParameters this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
LDKCVec_RouteHintHopZ ret_var = RouteHint_get_a(&this_ptr_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKRouteHintHop ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_PrivateRouteZ ret_var = RawInvoice_private_routes(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKPrivateRoute ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_PrivateRouteZ ret_var = Invoice_private_routes(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t o = 0; o < ret_var.datalen; o++) {
LDKPrivateRoute ret_conv_14_var = ret_var.data[o];
uint32_t ret_conv_14_ref = 0;
LDKCVec_RouteHintZ ret_var = Invoice_route_hints(&this_arg_conv);
uint32_tArray ret_arr = NULL;
ret_arr = init_uint32_tArray(ret_var.datalen, __LINE__);
- uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 4);
+ uint32_t *ret_arr_ptr = (uint32_t*)(((uint8_t*)ret_arr) + 8);
for (size_t l = 0; l < ret_var.datalen; l++) {
LDKRouteHint ret_conv_11_var = ret_var.data[l];
uint32_t ret_conv_11_ref = 0;
var getRandomValues: Function;
imports.wasi_snapshot_preview1 = {
- "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number) => {
+ "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number, bytes_written_ptr: number) => {
// This should generally only be used to print panic messages
- console.log("FD_WRITE to " + fd + " in " + iovec_array_len + " chunks.");
const ptr_len_view = new Uint32Array(wasm.memory.buffer, iovec_array_ptr, iovec_array_len * 2);
+ var bytes_written = 0;
for (var i = 0; i < iovec_array_len; i++) {
const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
- console.log(String.fromCharCode(...bytes_view));
+ console.log("[fd " + fd + "]: " + String.fromCharCode(...bytes_view));
+ bytes_written += ptr_len_view[i*2+1];
}
+ const written_view = new Uint32Array(wasm.memory.buffer, bytes_written_ptr, 1);
+ written_view[0] = bytes_written;
return 0;
},
"fd_close": (_fd: number) => {
},
"environ_sizes_get": (environ_var_count_ptr: number, environ_len_ptr: number) => {
// This is called before fd_write to format + print panic messages
- console.log("wasi_snapshot_preview1:environ_sizes_get");
const out_count_view = new Uint32Array(wasm.memory.buffer, environ_var_count_ptr, 1);
out_count_view[0] = 0;
const out_len_view = new Uint32Array(wasm.memory.buffer, environ_len_ptr, 1);
return 0;
},
"environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
- // This is called before fd_write to format + print panic messages
+ // This is called before fd_write to format + print panic messages,
+ // but only if we have variables in environ_sizes_get, so shouldn't ever actually happen!
console.log("wasi_snapshot_preview1:environ_get");
return 58; // Note supported - we said there were 0 environment entries!
},
isWasmInitialized = true;
}
+const fn_list = ["uuuuuu", "buuuuu", "bbbbbb", "ubuuuu", "uubuuu"];
+
/* @internal */
export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) {
- imports.env["js_invoke_function_u"] = js_invoke;
- imports.env["js_invoke_function_b"] = js_invoke;
+ for (const fn of fn_list) { imports.env["js_invoke_function_" + fn] = js_invoke; }
const { instance: wasmInstance } = await WebAssembly.instantiate(wasmBinary, imports);
await finishInitializeWasm(wasmInstance);
}
/* @internal */
export async function initializeWasmFetch(uri: string) {
+ for (const fn of fn_list) { imports.env["js_invoke_function_" + fn] = js_invoke; }
const stream = fetch(uri);
- imports.env["js_invoke_function_u"] = js_invoke;
- imports.env["js_invoke_function_b"] = js_invoke;
const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
await finishInitializeWasm(wasmInstance);
}
/* @internal */
export function encodeUint8Array (inputArray: Uint8Array): number {
- const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
- const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
- arrayLengthView[0] = inputArray.length;
- const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
+ const cArrayPointer = wasm.TS_malloc(inputArray.length + 8);
+ const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayLengthView[0] = BigInt(inputArray.length);
+ const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 8, inputArray.length);
arrayMemoryView.set(inputArray);
return cArrayPointer;
}
/* @internal */
export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
- const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
- const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer, inputArray.length);
- arrayMemoryView.set(inputArray, 1);
- arrayMemoryView[0] = inputArray.length;
+ const cArrayPointer = wasm.TS_malloc((inputArray.length + 2) * 4);
+ const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayLengthView[0] = BigInt(inputArray.length);
+ const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer + 8, inputArray.length);
+ arrayMemoryView.set(inputArray);
return cArrayPointer;
}
/* @internal */
export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
- const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
- const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
- arrayLengthView[0] = inputArray.length;
- const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
- arrayMemoryView.set(inputArray);
+ const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 8);
+ const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayMemoryView.set(inputArray, 1);
+ arrayMemoryView[0] = BigInt(inputArray.length);
return cArrayPointer;
}
/* @internal */
export function getArrayLength(arrayPointer: number): number {
- const arraySizeViewer = new Uint32Array(wasm.memory.buffer, arrayPointer, 1);
- return arraySizeViewer[0];
+ const arraySizeViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer, 1);
+ const len = arraySizeViewer[0];
+ if (len >= (2n ** 32n)) throw new Error("Bogus Array Size");
+ return Number(len % (2n ** 32n));
}
/* @internal */
export function decodeUint8Array (arrayPointer: number, free = true): Uint8Array {
const arraySize = getArrayLength(arrayPointer);
- const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, arraySize);
+ const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, arraySize);
// Clone the contents, TODO: In the future we should wrap the Viewer in a class that
// will free the underlying memory when it becomes unreachable instead of copying here.
// Note that doing so may have edge-case interactions with memory resizing (invalidating the buffer).
const arraySize = getArrayLength(arrayPointer);
const actualArrayViewer = new Uint32Array(
wasm.memory.buffer, // value
- arrayPointer + 4, // offset (ignoring length bytes)
+ arrayPointer + 8, // offset (ignoring length bytes)
arraySize // uint32 count
);
// Clone the contents, TODO: In the future we should wrap the Viewer in a class that
}
return actualArray;
}
-
+/* @internal */
+export function decodeUint64Array (arrayPointer: number, free = true): bigint[] {
+ const arraySize = getArrayLength(arrayPointer);
+ const actualArrayViewer = new BigUint64Array(
+ wasm.memory.buffer, // value
+ arrayPointer + 8, // offset (ignoring length bytes)
+ arraySize // uint32 count
+ );
+ // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
+ // will free the underlying memory when it becomes unreachable instead of copying here.
+ const actualArray = new Array(arraySize);
+ for (var i = 0; i < arraySize; i++) actualArray[i] = actualArrayViewer[i];
+ if (free) {
+ wasm.TS_free(arrayPointer);
+ }
+ return actualArray;
+}
export function freeWasmMemory(pointer: number) { wasm.TS_free(pointer); }
/* @internal */
export function getU32ArrayElem(arrayPointer: number, idx: number): number {
- const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
+ const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
return actualArrayViewer[idx];
}
/* @internal */
export function getU8ArrayElem(arrayPointer: number, idx: number): number {
- const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
+ const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
return actualArrayViewer[idx];
}
/* @internal */
export function decodeString(stringPointer: number, free = true): string {
const arraySize = getArrayLength(stringPointer);
- const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 4, arraySize);
+ const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 8, arraySize);
const result = new TextDecoder("utf-8").decode(memoryView);
if (free) {
}
const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
// debug statements here
+}
+ // struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function DelayedPaymentOutputDescriptor_get_output(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_output(this_ptr);
+ return nativeResponseValue;
}
// void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
/* @internal */
}
const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
// debug statements here
+}
+ // struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function StaticPaymentOutputDescriptor_get_output(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_output(this_ptr);
+ return nativeResponseValue;
}
// void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
/* @internal */
}
const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_SignatureZ CommitmentSigned_get_htlc_signatures(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+/* @internal */
+export function CommitmentSigned_get_htlc_signatures(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CommitmentSigned_get_htlc_signatures(this_ptr);
+ return nativeResponseValue;
}
// void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_NetAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+/* @internal */
+export function UnsignedNodeAnnouncement_get_addresses(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_addresses(this_ptr);
+ return nativeResponseValue;
}
// void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u8Z UnsignedChannelUpdate_get_excess_data(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
+/* @internal */
+export function UnsignedChannelUpdate_get_excess_data(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_excess_data(this_ptr);
+ return nativeResponseValue;
}
// void UnsignedChannelUpdate_set_excess_data(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u64Z ReplyChannelRange_get_short_channel_ids(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+/* @internal */
+export function ReplyChannelRange_get_short_channel_ids(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReplyChannelRange_get_short_channel_ids(this_ptr);
+ return nativeResponseValue;
}
// void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u64Z QueryShortChannelIds_get_short_channel_ids(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr);
+/* @internal */
+export function QueryShortChannelIds_get_short_channel_ids(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_short_channel_ids(this_ptr);
+ return nativeResponseValue;
}
// void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_SignatureZ HolderCommitmentTransaction_get_counterparty_htlc_sigs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
+/* @internal */
+export function HolderCommitmentTransaction_get_counterparty_htlc_sigs(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs(this_ptr);
+ return nativeResponseValue;
}
// void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_NetAddressZ NodeAnnouncementInfo_get_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+/* @internal */
+export function NodeAnnouncementInfo_get_addresses(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_addresses(this_ptr);
+ return nativeResponseValue;
}
// void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
// debug statements here
+}
+ // struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+/* @internal */
+export function NodeInfo_get_channels(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeInfo_get_channels(this_ptr);
+ return nativeResponseValue;
}
// void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_channel(this_arg, short_channel_id);
return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+/* @internal */
+export function ReadOnlyNetworkGraph_list_channels(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_list_channels(this_arg);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_node(this_arg, node_id);
return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+/* @internal */
+export function ReadOnlyNetworkGraph_list_nodes(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_list_nodes(this_arg);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
/* @internal */
}
const nativeResponseValue = wasm.TS_PaymentParameters_set_max_channel_saturation_power_of_half(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentParameters_get_previously_failed_channels(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentParameters_get_previously_failed_channels(this_ptr);
+ return nativeResponseValue;
}
// void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
bindings.CommitmentSigned_set_signature(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 64)));
}
+ /**
+ * Signatures on the HTLC transactions
+ *
+ * Returns a copy of the field.
+ */
+ public get_htlc_signatures(): Uint8Array[] {
+ const ret: number = bindings.CommitmentSigned_get_htlc_signatures(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: Uint8Array[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+ const ret_conv_12_conv: Uint8Array = bindings.decodeUint8Array(ret_conv_12);
+ ret_conv_12_arr[m] = ret_conv_12_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
/**
* Signatures on the HTLC transactions
*/
protected constructor(ptr: number, free_fn: (ptr: number) => void) {
this.ptr = ptr;
if (Number.isFinite(ptr) && ptr != 0){
- finalizer.register(this, get_freeer(ptr, free_fn));
+ finalizer.register(this, get_freeer(ptr, free_fn), this);
}
}
// In Java, protected means "any subclass can access fields on any other subclass'"
}
protected static set_null_skip_free(o: CommonBase) {
o.ptr = 0;
- finalizer.unregister(o);
+ // @ts-ignore TypeScript is wrong about the returnvalue of unregister here!
+ const did_unregister: boolean = finalizer.unregister(o);
+ if (!did_unregister)
+ throw new Error("FinalizationRegistry unregister should always unregister unless you double-free'd");
}
}
bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
}
+ /**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+ public get_output(): TxOut {
+ const ret: number = bindings.DelayedPaymentOutputDescriptor_get_output(this.ptr);
+ const ret_conv: TxOut = new TxOut(null, ret);
+ return ret_conv;
+ }
+
/**
* The output which is referenced by the given outpoint
*/
bindings.HolderCommitmentTransaction_set_counterparty_sig(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 64)));
}
+ /**
+ * All non-dust counterparty HTLC signatures, in the order they appear in the transaction
+ *
+ * Returns a copy of the field.
+ */
+ public get_counterparty_htlc_sigs(): Uint8Array[] {
+ const ret: number = bindings.HolderCommitmentTransaction_get_counterparty_htlc_sigs(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: Uint8Array[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+ const ret_conv_12_conv: Uint8Array = bindings.decodeUint8Array(ret_conv_12);
+ ret_conv_12_arr[m] = ret_conv_12_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
/**
* All non-dust counterparty HTLC signatures, in the order they appear in the transaction
*/
import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
import * as bindings from '../bindings.mjs'
-/** XXX: DO NOT USE THIS - it remains locked until the GC runs (if that ever happens */
+
/**
+ * This type represents a lock and MUST BE MANUALLY FREE'd!
* A read-only reference to a current ChannelMonitor.
*
* Note that this holds a mutex in [`ChainMonitor`] and may block other events until it is
export class LockedChannelMonitor extends CommonBase {
/* @internal */
public constructor(_dummy: object, ptr: number) {
- super(ptr, bindings.LockedChannelMonitor_free);
+ super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
+ }
+ /** Releases this lock */
+ public free() {
+ bindings.LockedChannelMonitor_free(this.ptr);
+ CommonBase.set_null_skip_free(this);
}
}
bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
}
+ /**
+ * Internet-level addresses via which one can connect to the node
+ *
+ * Returns a copy of the field.
+ */
+ public get_addresses(): NetAddress[] {
+ const ret: number = bindings.NodeAnnouncementInfo_get_addresses(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: NetAddress[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+ const ret_conv_12_hu_conv: NetAddress = NetAddress.constr_from_ptr(ret_conv_12);
+ CommonBase.add_ref_from(ret_conv_12_hu_conv, this);
+ ret_conv_12_arr[m] = ret_conv_12_hu_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
/**
* Internet-level addresses via which one can connect to the node
*/
super(ptr, bindings.NodeInfo_free);
}
+ /**
+ * All valid channels a node has announced
+ *
+ * Returns a copy of the field.
+ */
+ public get_channels(): bigint[] {
+ const ret: number = bindings.NodeInfo_get_channels(this.ptr);
+ const ret_conv: bigint[] = bindings.decodeUint64Array(ret);
+ return ret_conv;
+ }
+
/**
* All valid channels a node has announced
*/
bindings.PaymentParameters_set_max_channel_saturation_power_of_half(this.ptr, val);
}
+ /**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ *
+ * Returns a copy of the field.
+ */
+ public get_previously_failed_channels(): bigint[] {
+ const ret: number = bindings.PaymentParameters_get_previously_failed_channels(this.ptr);
+ const ret_conv: bigint[] = bindings.decodeUint64Array(ret);
+ return ret_conv;
+ }
+
/**
* A list of SCIDs which this payment was previously attempted over and which caused the
* payment to fail. Future attempts for the same payment shouldn't be relayed through any of
bindings.QueryShortChannelIds_set_chain_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32)));
}
+ /**
+ * The short_channel_ids that are being queried
+ *
+ * Returns a copy of the field.
+ */
+ public get_short_channel_ids(): bigint[] {
+ const ret: number = bindings.QueryShortChannelIds_get_short_channel_ids(this.ptr);
+ const ret_conv: bigint[] = bindings.decodeUint64Array(ret);
+ return ret_conv;
+ }
+
/**
* The short_channel_ids that are being queried
*/
import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
import * as bindings from '../bindings.mjs'
-/** XXX: DO NOT USE THIS - it remains locked until the GC runs (if that ever happens */
+
/**
+ * This type represents a lock and MUST BE MANUALLY FREE'd!
* A read-only view of [`NetworkGraph`].
*/
export class ReadOnlyNetworkGraph extends CommonBase {
/* @internal */
public constructor(_dummy: object, ptr: number) {
- super(ptr, bindings.ReadOnlyNetworkGraph_free);
+ super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
+ }
+ /** Releases this lock */
+ public free() {
+ bindings.ReadOnlyNetworkGraph_free(this.ptr);
+ CommonBase.set_null_skip_free(this);
}
/**
return ret_hu_conv;
}
+ /**
+ * Returns the list of channels in the graph
+ */
+ public list_channels(): bigint[] {
+ const ret: number = bindings.ReadOnlyNetworkGraph_list_channels(this.ptr);
+ const ret_conv: bigint[] = bindings.decodeUint64Array(ret);
+ return ret_conv;
+ }
+
/**
* Returns information on a node with the given id.
*
return ret_hu_conv;
}
+ /**
+ * Returns the list of nodes in the graph
+ */
+ public list_nodes(): NodeId[] {
+ const ret: number = bindings.ReadOnlyNetworkGraph_list_nodes(this.ptr);
+ const ret_conv_8_len: number = bindings.getArrayLength(ret);
+ const ret_conv_8_arr: NodeId[] = new Array(ret_conv_8_len).fill(null);
+ for (var i = 0; i < ret_conv_8_len; i++) {
+ const ret_conv_8: number = bindings.getU32ArrayElem(ret, i);
+ const ret_conv_8_hu_conv: NodeId = new NodeId(null, ret_conv_8);
+ CommonBase.add_ref_from(ret_conv_8_hu_conv, this);
+ ret_conv_8_arr[i] = ret_conv_8_hu_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_8_arr;
+ }
+
/**
* Get network addresses by node id.
* Returns None if the requested node is completely unknown,
bindings.ReplyChannelRange_set_sync_complete(this.ptr, val);
}
+ /**
+ * The short_channel_ids in the channel range
+ *
+ * Returns a copy of the field.
+ */
+ public get_short_channel_ids(): bigint[] {
+ const ret: number = bindings.ReplyChannelRange_get_short_channel_ids(this.ptr);
+ const ret_conv: bigint[] = bindings.decodeUint64Array(ret);
+ return ret_conv;
+ }
+
/**
* The short_channel_ids in the channel range
*/
bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
}
+ /**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+ public get_output(): TxOut {
+ const ret: number = bindings.StaticPaymentOutputDescriptor_get_output(this.ptr);
+ const ret_conv: TxOut = new TxOut(null, ret);
+ return ret_conv;
+ }
+
/**
* The output which is referenced by the given outpoint
*/
this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
this.value = bindings.TxOut_get_value(ptr);
}
- public constructor_new(value: bigint, script_pubkey: Uint8Array): TxOut {
+ public static constructor_new(value: bigint, script_pubkey: Uint8Array): TxOut {
return new TxOut(null, bindings.TxOut_new(bindings.encodeUint8Array(script_pubkey), value));
}
}
\ No newline at end of file
bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
}
+ /**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode. This is stored to ensure forward-compatibility as new fields are added to the
+ * lightning gossip
+ *
+ * Returns a copy of the field.
+ */
+ public get_excess_data(): Uint8Array {
+ const ret: number = bindings.UnsignedChannelUpdate_get_excess_data(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
/**
* Excess data which was signed as a part of the message which we do not (yet) understand how
* to decode. This is stored to ensure forward-compatibility as new fields are added to the
bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32)));
}
+ /**
+ * List of addresses on which this node is reachable
+ *
+ * Returns a copy of the field.
+ */
+ public get_addresses(): NetAddress[] {
+ const ret: number = bindings.UnsignedNodeAnnouncement_get_addresses(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: NetAddress[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+ const ret_conv_12_hu_conv: NetAddress = NetAddress.constr_from_ptr(ret_conv_12);
+ CommonBase.add_ref_from(ret_conv_12_hu_conv, this);
+ ret_conv_12_arr[m] = ret_conv_12_hu_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
/**
* List of addresses on which this node is reachable
*/