lightningdevkit
Version:
Lightning Development Kit
54 lines • 1.93 kB
JavaScript
import { CommonBase } from './CommonBase.mjs';
import * as bindings from '../bindings.mjs';
export class Result_u64ShortChannelIdErrorZ extends CommonBase {
constructor(_dummy, ptr) {
super(ptr, bindings.CResult_u64ShortChannelIdErrorZ_free);
}
/* @internal */
static constr_from_ptr(ptr) {
if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) {
return new Result_u64ShortChannelIdErrorZ_OK(null, ptr);
}
else {
return new Result_u64ShortChannelIdErrorZ_Err(null, ptr);
}
}
/**
* Creates a new CResult_u64ShortChannelIdErrorZ in the success state.
*/
static constructor_ok(o) {
const ret = bindings.CResult_u64ShortChannelIdErrorZ_ok(o);
const ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
/**
* Creates a new CResult_u64ShortChannelIdErrorZ in the error state.
*/
static constructor_err(e) {
const ret = bindings.CResult_u64ShortChannelIdErrorZ_err(e);
const ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
/**
* Checks if the given object is currently in the success state
*/
is_ok() {
const ret = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr);
return ret;
}
}
export class Result_u64ShortChannelIdErrorZ_OK extends Result_u64ShortChannelIdErrorZ {
/* @internal */
constructor(_dummy, ptr) {
super(_dummy, ptr);
this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr);
}
}
export class Result_u64ShortChannelIdErrorZ_Err extends Result_u64ShortChannelIdErrorZ {
/* @internal */
constructor(_dummy, ptr) {
super(_dummy, ptr);
this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr);
}
}
//# sourceMappingURL=Result_u64ShortChannelIdErrorZ.mjs.map