X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FResult_TxCreationKeysErrorZ.ts;h=49666976fe995fd2701777134051b871dc3e70cf;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=964be8842bed4fd6d12470d1317560c1e3eaafe7;hpb=276893d3b8bd3fcb2bb10e3cab73a69d34831909;p=ldk-java diff --git a/ts/structs/Result_TxCreationKeysErrorZ.ts b/ts/structs/Result_TxCreationKeysErrorZ.ts index 964be884..49666976 100644 --- a/ts/structs/Result_TxCreationKeysErrorZ.ts +++ b/ts/structs/Result_TxCreationKeysErrorZ.ts @@ -9,7 +9,7 @@ public class Result_TxCreationKeysErrorZ extends CommonBase { } static Result_TxCreationKeysErrorZ constr_from_ptr(long ptr) { - if (bindings.LDKCResult_TxCreationKeysErrorZ_result_ok(ptr)) { + if (bindings.CResult_TxCreationKeysErrorZ_is_ok(ptr)) { return new Result_TxCreationKeysErrorZ_OK(null, ptr); } else { return new Result_TxCreationKeysErrorZ_Err(null, ptr); @@ -24,20 +24,42 @@ public class Result_TxCreationKeysErrorZ extends CommonBase { res_hu_conv.ptrs_to.add(this); this.res = res_hu_conv; } - public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) { - this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1)); - this.ptrs_to.add(res); - } } public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ { - public final LDKSecp256k1Error err; + public final Secp256k1Error err; private Result_TxCreationKeysErrorZ_Err(Object _dummy, long ptr) { super(_dummy, ptr); this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr); } - public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) { - this(null, bindings.CResult_TxCreationKeysErrorZ_err(err)); - } } + + public static Result_TxCreationKeysErrorZ constructor_ok(TxCreationKeys o) { + number ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1); + Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + public static Result_TxCreationKeysErrorZ constructor_err(Secp256k1Error e) { + number ret = bindings.CResult_TxCreationKeysErrorZ_err(e); + Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + public boolean is_ok() { + boolean ret = bindings.CResult_TxCreationKeysErrorZ_is_ok(this.ptr); + return ret; + } + + public number clone_ptr() { + number ret = bindings.CResult_TxCreationKeysErrorZ_clone_ptr(this.ptr); + return ret; + } + + public Result_TxCreationKeysErrorZ clone() { + number ret = bindings.CResult_TxCreationKeysErrorZ_clone(this.ptr); + Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + }