X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FInvoiceFeatures.ts;fp=ts%2Fstructs%2FInvoiceFeatures.ts;h=ba5f0bf0dadc64b14db3a4c5d587aa705577fc3a;hb=f8c25e52ce878136043ddc4dbfac6c6640f1d4f6;hp=0000000000000000000000000000000000000000;hpb=bbc02b4a3cfdb5f32cdd650fdcd4dc4e55ca1517;p=ldk-java diff --git a/ts/structs/InvoiceFeatures.ts b/ts/structs/InvoiceFeatures.ts new file mode 100644 index 00000000..ba5f0bf0 --- /dev/null +++ b/ts/structs/InvoiceFeatures.ts @@ -0,0 +1,53 @@ + + +import CommonBase from './CommonBase'; +import * as bindings from '../bindings' // TODO: figure out location + + + + export default class InvoiceFeatures extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.InvoiceFeatures_free(this.ptr); + } + } + public InvoiceFeatures clone() { + number ret = bindings.InvoiceFeatures_clone(this.ptr); + const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public static InvoiceFeatures constructor_empty() { + number ret = bindings.InvoiceFeatures_empty(); + const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static InvoiceFeatures constructor_known() { + number ret = bindings.InvoiceFeatures_known(); + const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public Uint8Array write() { + Uint8Array ret = bindings.InvoiceFeatures_write(this.ptr); + return ret; + } + + public static Result_InvoiceFeaturesDecodeErrorZ constructor_read(Uint8Array ser) { + number ret = bindings.InvoiceFeatures_read(ser); + Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + +}