UNPKG

lightningdevkit

Version:
59 lines 1.88 kB
import { CommonBase } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs'; /** * The identifier of an order. */ export class LSPS1OrderId extends CommonBase { /* @internal */ constructor(_dummy, ptr) { super(ptr, bindings.LSPS1OrderId_free); } get_a() { const ret = bindings.LSPS1OrderId_get_a(this.ptr); const ret_conv = bindings.decodeString(ret); return ret_conv; } set_a(val) { bindings.LSPS1OrderId_set_a(this.ptr, bindings.encodeString(val)); } /** * Constructs a new LSPS1OrderId given each field */ static constructor_new(a_arg) { const ret = bindings.LSPS1OrderId_new(bindings.encodeString(a_arg)); const ret_hu_conv = new LSPS1OrderId(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } clone_ptr() { const ret = bindings.LSPS1OrderId_clone_ptr(this.ptr); return ret; } /** * Creates a copy of the LSPS1OrderId */ clone() { const ret = bindings.LSPS1OrderId_clone(this.ptr); const ret_hu_conv = new LSPS1OrderId(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * Checks if two LSPS1OrderIds contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ eq(b) { const ret = bindings.LSPS1OrderId_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } /** * Generates a non-cryptographic 64-bit hash of the LSPS1OrderId. */ hash() { const ret = bindings.LSPS1OrderId_hash(this.ptr); return ret; } } //# sourceMappingURL=LSPS1OrderId.mjs.map