X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FInitFeatures.ts;h=387c4a3023f3458ac02fd24ff8315a11ee2ee0af;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=2987b614d890783f4bde3ff3eaa90c8cebeaff0e;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/InitFeatures.ts b/ts/structs/InitFeatures.ts index 2987b614..387c4a30 100644 --- a/ts/structs/InitFeatures.ts +++ b/ts/structs/InitFeatures.ts @@ -1,13 +1,74 @@ + import CommonBase from './CommonBase'; import * as bindings from '../bindings' // TODO: figure out location -public class InitFeatures extends CommonBase { - InitFeatures(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.InitFeatures_free(ptr); } + + + export default class InitFeatures extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.InitFeatures_free(this.ptr); + } + } + public boolean eq(InitFeatures b) { + boolean ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + this.ptrs_to.add(b); + return ret; + } + + public number clone_ptr() { + number ret = bindings.InitFeatures_clone_ptr(this.ptr); + return ret; + } + + public InitFeatures clone() { + number ret = bindings.InitFeatures_clone(this.ptr); + const ret_hu_conv: InitFeatures = new InitFeatures(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public static InitFeatures constructor_empty() { + number ret = bindings.InitFeatures_empty(); + const ret_hu_conv: InitFeatures = new InitFeatures(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static InitFeatures constructor_known() { + number ret = bindings.InitFeatures_known(); + const ret_hu_conv: InitFeatures = new InitFeatures(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public boolean requires_unknown_bits() { + boolean ret = bindings.InitFeatures_requires_unknown_bits(this.ptr); + return ret; + } + + public boolean supports_payment_secret() { + boolean ret = bindings.InitFeatures_supports_payment_secret(this.ptr); + return ret; + } + + public Uint8Array write() { + Uint8Array ret = bindings.InitFeatures_write(this.ptr); + return ret; + } + + public static Result_InitFeaturesDecodeErrorZ constructor_read(Uint8Array ser) { + number ret = bindings.InitFeatures_read(ser); + Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } }