3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class NodeFeatures extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.NodeFeatures_free(this.ptr);
21 public boolean eq(NodeFeatures b) {
22 boolean ret = bindings.NodeFeatures_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
27 public NodeFeatures clone() {
28 number ret = bindings.NodeFeatures_clone(this.ptr);
29 const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
30 ret_hu_conv.ptrs_to.add(this);
34 public static NodeFeatures constructor_empty() {
35 number ret = bindings.NodeFeatures_empty();
36 const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
37 ret_hu_conv.ptrs_to.add(ret_hu_conv);
41 public static NodeFeatures constructor_known() {
42 number ret = bindings.NodeFeatures_known();
43 const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
44 ret_hu_conv.ptrs_to.add(ret_hu_conv);
48 public boolean requires_unknown_bits() {
49 boolean ret = bindings.NodeFeatures_requires_unknown_bits(this.ptr);
53 public boolean supports_payment_secret() {
54 boolean ret = bindings.NodeFeatures_supports_payment_secret(this.ptr);
58 public Uint8Array write() {
59 Uint8Array ret = bindings.NodeFeatures_write(this.ptr);
63 public static Result_NodeFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
64 number ret = bindings.NodeFeatures_read(ser);
65 Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);