UNPKG

lightningdevkit

Version:
64 lines 2.27 kB
import { LSPS1OrderId } from '../structs/LSPS1OrderId.mjs'; import { CommonBase } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs'; /** * A request made to an LSP to retrieve information about an previously made order. * * Please refer to the [bLIP-51 / LSPS1 * specification](https://github.com/lightning/blips/blob/master/blip-0051.md#21-lsps1get_order) * for more information. */ export class LSPS1GetOrderRequest extends CommonBase { /* @internal */ constructor(_dummy, ptr) { super(ptr, bindings.LSPS1GetOrderRequest_free); } /** * The id of the order. */ get_order_id() { const ret = bindings.LSPS1GetOrderRequest_get_order_id(this.ptr); const ret_hu_conv = new LSPS1OrderId(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * The id of the order. */ set_order_id(val) { bindings.LSPS1GetOrderRequest_set_order_id(this.ptr, CommonBase.get_ptr_of(val)); } /** * Constructs a new LSPS1GetOrderRequest given each field */ static constructor_new(order_id_arg) { const ret = bindings.LSPS1GetOrderRequest_new(CommonBase.get_ptr_of(order_id_arg)); const ret_hu_conv = new LSPS1GetOrderRequest(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } clone_ptr() { const ret = bindings.LSPS1GetOrderRequest_clone_ptr(this.ptr); return ret; } /** * Creates a copy of the LSPS1GetOrderRequest */ clone() { const ret = bindings.LSPS1GetOrderRequest_clone(this.ptr); const ret_hu_conv = new LSPS1GetOrderRequest(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * Checks if two LSPS1GetOrderRequests 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.LSPS1GetOrderRequest_eq(this.ptr, CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; } } //# sourceMappingURL=LSPS1GetOrderRequest.mjs.map