Update auto-generated bindings
[ldk-java] / ts / structs / Confirm.ts
index 409068bf29455be66dc3ee6b76aec8bad2d6b8ce..c991e83cc6a81defc799fb5a1eff264b770eb8ca 100644 (file)
@@ -33,17 +33,14 @@ import * as bindings from '../bindings' // TODO: figure out location
                     let structImplementation = <bindings.LDKConfirm>{
                         // todo: in-line interface filling
                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void {
-                                                       TwoTuple<Number, Uint8Array>[] txdata_conv_30_arr = new TwoTuple[txdata.length];
-                               for (int e = 0; e < txdata.length; e++) {
-                                       number txdata_conv_30 = txdata[e];
-                                       number txdata_conv_30_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(txdata_conv_30);
-                                       Uint8Array txdata_conv_30_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(txdata_conv_30);
-                                       TwoTuple<Number, Uint8Array> txdata_conv_30_conv = new TwoTuple<Number, Uint8Array>(txdata_conv_30_a, txdata_conv_30_b, () -> {
-                                               bindings.C2Tuple_usizeTransactionZ_free(txdata_conv_30);
-                                       });
-                                       txdata_conv_30_arr[e] = txdata_conv_30_conv;
+                                                       TwoTuple_usizeTransactionZ[] txdata_conv_28_arr = new TwoTuple_usizeTransactionZ[txdata.length];
+                               for (int c = 0; c < txdata.length; c++) {
+                                       number txdata_conv_28 = txdata[c];
+                                       TwoTuple_usizeTransactionZ txdata_conv_28_hu_conv = new TwoTuple_usizeTransactionZ(null, txdata_conv_28);
+                                       txdata_conv_28_hu_conv.ptrs_to.add(this);
+                                       txdata_conv_28_arr[c] = txdata_conv_28_hu_conv;
                                }
-                                                       arg.transactions_confirmed(header, txdata_conv_30_arr, height);
+                                                       arg.transactions_confirmed(header, txdata_conv_28_arr, height);
                                                },
 
                                                transaction_unconfirmed (txid: Uint8Array): void {
@@ -56,7 +53,8 @@ import * as bindings from '../bindings' // TODO: figure out location
 
                                                get_relevant_txids (): Uint8Array[] {
                                                        Uint8Array[] ret = arg.get_relevant_txids();
-                               return ret;
+                               result: Uint8Array[] = ret != null ? Arrays.stream(ret).map(ret_conv_12 -> InternalUtils.check_arr_len(ret_conv_12, 32)).toArray(Uint8Array[]::new) : null;
+                               return result;
                                                },
 
                                                
@@ -66,7 +64,7 @@ import * as bindings from '../bindings' // TODO: figure out location
             }
 
             export interface ConfirmInterface {
-                transactions_confirmed(header: Uint8Array, txdata: TwoTuple<Number, Uint8Array>[], height: number): void;
+                transactions_confirmed(header: Uint8Array, txdata: TwoTuple_usizeTransactionZ[], height: number): void;
                                transaction_unconfirmed(txid: Uint8Array): void;
                                best_block_updated(header: Uint8Array, height: number): void;
                                get_relevant_txids(): Uint8Array[];
@@ -76,16 +74,16 @@ import * as bindings from '../bindings' // TODO: figure out location
             class LDKConfirmHolder {
                 held: Confirm;
             }
-       public void transactions_confirmed(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.Confirm_transactions_confirmed(this.ptr, header, txdata != null ? Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new) : null, height);
+       public void transactions_confirmed(Uint8Array header, TwoTuple_usizeTransactionZ[] txdata, number height) {
+               bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).map(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray(number[]::new) : null, height);
        }
 
        public void transaction_unconfirmed(Uint8Array txid) {
-               bindings.Confirm_transaction_unconfirmed(this.ptr, txid);
+               bindings.Confirm_transaction_unconfirmed(this.ptr, InternalUtils.check_arr_len(txid, 32));
        }
 
        public void best_block_updated(Uint8Array header, number height) {
-               bindings.Confirm_best_block_updated(this.ptr, header, height);
+               bindings.Confirm_best_block_updated(this.ptr, InternalUtils.check_arr_len(header, 80), height);
        }
 
        public Uint8Array[] get_relevant_txids() {