default: abort();
}
}
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_js(int32_t ord) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_js(int32_t ord) {
switch (ord) {
- case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
- case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+ case 0: return LDKChannelMonitorUpdateStatus_Completed;
+ case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+ case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
}
abort();
}
-static inline int32_t LDKChannelMonitorUpdateErr_to_js(LDKChannelMonitorUpdateErr val) {
+static inline int32_t LDKChannelMonitorUpdateStatus_to_js(LDKChannelMonitorUpdateStatus val) {
switch (val) {
- case LDKChannelMonitorUpdateErr_TemporaryFailure: return 0;
- case LDKChannelMonitorUpdateErr_PermanentFailure: return 1;
+ case LDKChannelMonitorUpdateStatus_Completed: return 0;
+ case LDKChannelMonitorUpdateStatus_InProgress: return 1;
+ case LDKChannelMonitorUpdateStatus_PermanentFailure: return 2;
default: abort();
}
}
CResult_BlindedRouteNoneZ_get_err(owner_conv);
}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDecodeError_ty_from_ptr(uint64_t ptr) {
+ LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDecodeError_UnknownVersion: return 0;
+ case LDKDecodeError_UnknownRequiredFeature: return 1;
+ case LDKDecodeError_InvalidValue: return 2;
+ case LDKDecodeError_ShortRead: return 3;
+ case LDKDecodeError_BadLengthDescriptor: return 4;
+ case LDKDecodeError_Io: return 5;
+ case LDKDecodeError_UnsupportedCompression: return 6;
+ default: abort();
+ }
+}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_Io_get_io"))) TS_LDKDecodeError_Io_get_io(uint64_t ptr) {
+ LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+ assert(obj->tag == LDKDecodeError_Io);
+ uint32_t io_conv = LDKIOError_to_js(obj->io);
+ return io_conv;
+}
static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
LDKBlindedRoute ret = *owner->contents.result;
ret.is_owned = false;
}
static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_err"))) TS_CResult_BlindedRouteDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_err"))) TS_CResult_BlindedHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_err"))) TS_CResult_RouteHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_err"))) TS_CResult_RouteDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get_err"))) TS_CResult_RouteParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_get_err"))) TS_CResult_PaymentParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_err"))) TS_CResult_RouteHintDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_err"))) TS_CResult_RouteHintHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_err"))) TS_CResult_COption_EventZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-void __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(uint64_t owner) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
- CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-uint32_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(uint64_t owner) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
- return ret_conv;
-}
-
uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKMonitorEvent_HTLCEvent: return 0;
case LDKMonitorEvent_CommitmentTxConfirmed: return 1;
- case LDKMonitorEvent_UpdateCompleted: return 2;
+ case LDKMonitorEvent_Completed: return 2;
case LDKMonitorEvent_UpdateFailed: return 3;
default: abort();
}
commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
return commitment_tx_confirmed_ref;
}
-uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo"))) TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(uint64_t ptr) {
+uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_txo"))) TS_LDKMonitorEvent_Completed_get_funding_txo(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
- assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
- LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+ assert(obj->tag == LDKMonitorEvent_Completed);
+ LDKOutPoint funding_txo_var = obj->completed.funding_txo;
uint64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
return funding_txo_ref;
}
-int64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id"))) TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(uint64_t ptr) {
+int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
- assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
- int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
+ assert(obj->tag == LDKMonitorEvent_Completed);
+ int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
return monitor_update_id_conv;
}
uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateFailed_get_update_failed"))) TS_LDKMonitorEvent_UpdateFailed_get_update_failed(uint64_t ptr) {
}
static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_err"))) TS_CResult_InitFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) TS_CResult_NodeIdDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_err"))) TS_CResult_RoutingFeesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_err"))) TS_CResult_NodeAliasDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_err"))) TS_CResult_NodeInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_err"))) TS_CResult_NetworkGraphDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CResult_SecretKeyNoneZ_get_err(owner_conv);
}
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+int8_tArray __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_ok"))) TS_CResult_PublicKeyNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_err"))) TS_CResult_PublicKeyNoneZ_get_err(uint64_t owner) {
+ LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+ CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
uint32_t __attribute__((export_name("TS_LDKCOption_ScalarZ_ty_from_ptr"))) TS_LDKCOption_ScalarZ_ty_from_ptr(uint64_t ptr) {
LDKCOption_ScalarZ *obj = (LDKCOption_ScalarZ*)untag_ptr(ptr);
switch(obj->tag) {
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+ LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+ LDKTransaction anchor_tx_var = anchor_tx;
+ int8_tArray anchor_tx_arr = init_int8_tArray(anchor_tx_var.datalen, __LINE__);
+ memcpy(anchor_tx_arr->elems, anchor_tx_var.data, anchor_tx_var.datalen);
+ Transaction_free(anchor_tx_var);
+ uint32_t input_conv = input;
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)anchor_tx_arr, input_conv, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
LDKUnsignedChannelAnnouncement msg_var = *msg;
msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 13, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 14, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
channel_parameters_ref = tag_ptr(channel_parameters_var.inner, channel_parameters_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 14, channel_parameters_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 15, channel_parameters_ref, 0, 0, 0, 0, 0);
}
static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
.sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
.sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
.sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+ .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
.sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
.ready_channel = ready_channel_LDKBaseSign_jcall,
.free = LDKBaseSign_JCalls_free,
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_BaseSign_sign_holder_anchor_input"))) TS_BaseSign_sign_holder_anchor_input(uint64_t this_arg, int8_tArray anchor_tx, uint32_t input) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+ LDKTransaction anchor_tx_ref;
+ anchor_tx_ref.datalen = anchor_tx->arr_len;
+ anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+ memcpy(anchor_tx_ref.data, anchor_tx->elems, anchor_tx_ref.datalen); FREE(anchor_tx);
+ anchor_tx_ref.data_is_owned = true;
+ LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_BaseSign_sign_channel_announcement"))) TS_BaseSign_sign_channel_announcement(uint64_t this_arg, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
}
LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_err"))) TS_CResult_SignDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_err"))) TS_CResult_InMemorySignerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
case LDKAPIError_FeeRateTooHigh: return 1;
case LDKAPIError_RouteError: return 2;
case LDKAPIError_ChannelUnavailable: return 3;
- case LDKAPIError_MonitorUpdateFailed: return 4;
+ case LDKAPIError_MonitorUpdateInProgress: return 4;
case LDKAPIError_IncompatibleShutdownScript: return 5;
default: abort();
}
}
static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
FREE(j_calls);
}
}
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
LDKOutPoint funding_txo_var = funding_txo;
uint64_t funding_txo_ref = 0;
uint64_t monitor_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 16, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
LDKOutPoint funding_txo_var = funding_txo;
uint64_t funding_txo_ref = 0;
uint64_t update_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_ref = tag_ptr(update_var.inner, update_var.is_owned);
- uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, update_ref, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 18, funding_txo_ref, update_ref, 0, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, 0, 0, 0, 0, 0, 0);
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
*res_ptr = LDKWatch_init(o);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
+uint32_t __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
monitor_conv.is_owned = ptr_is_owned(monitor);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
monitor_conv = ChannelMonitor_clone(&monitor_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
+uint32_t __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
update_conv.is_owned = ptr_is_owned(update);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
update_conv = ChannelMonitorUpdate_clone(&update_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+ return ret_conv;
}
uint64_tArray __attribute__((export_name("TS_Watch_release_pending_monitor_events"))) TS_Watch_release_pending_monitor_events(uint64_t this_arg) {
int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
Transaction_free(tx_var);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, recipient_conv, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, recipient_conv, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+ LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+ uint32_t recipient_conv = LDKRecipient_to_js(recipient);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, recipient_conv, 0, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
LDKCOption_ScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_ScalarZ), "LDKCOption_ScalarZ");
*tweak_copy = tweak;
uint64_t tweak_ref = tag_ptr(tweak_copy, true);
- uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 21, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 23, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SharedSecretNoneZ ret_conv = *(LDKCResult_SharedSecretNoneZ*)(ret_ptr);
}
LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 23, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
LDKShutdownScript ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
jboolean inbound_conv = inbound;
int64_t channel_value_satoshis_conv = channel_value_satoshis;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 24, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 26, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKSign ret_conv = *(LDKSign*)(ret_ptr);
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKu8slice reader_var = reader;
int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
FREE(invoice_data_var.data);
uint32_t receipient_conv = LDKRecipient_to_js(receipient);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKKeysInterface ret = {
.this_arg = (void*) calls,
.get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+ .get_node_id = get_node_id_LDKKeysInterface_jcall,
.ecdh = ecdh_LDKKeysInterface_jcall,
.get_destination_script = get_destination_script_LDKKeysInterface_jcall,
.get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_KeysInterface_get_node_id"))) TS_KeysInterface_get_node_id(uint64_t this_arg, uint32_t recipient) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+ LDKRecipient recipient_conv = LDKRecipient_from_js(recipient);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_KeysInterface_ecdh"))) TS_KeysInterface_ecdh(uint64_t this_arg, uint32_t recipient, int8_tArray other_key, uint64_t tweak) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, confirmation_target_conv, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, confirmation_target_conv, 0, 0, 0, 0, 0);
}
static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
}
static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_err"))) TS_CResult_ChannelConfigDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_err"))) TS_CResult_OutPointDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
uint16_t type_id_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
}
LDKStr debug_str_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, 0, 0, 0, 0, 0, 0);
LDKStr ret_conv = str_ref_to_owned_c(ret);
return ret_conv;
}
LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_err"))) TS_CResult_COption_TypeZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
+typedef struct LDKCustomOnionMessageContents_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, 0, 0, 0, 0, 0, 0);
+ LDKCVec_u8Z ret_ref;
+ ret_ref.datalen = ret->arr_len;
+ ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(ret_ref.data, ret->elems, ret_ref.datalen); FREE(ret);
+ return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JSValue o) {
+ LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKCustomOnionMessageContents ret = {
+ .this_arg = (void*) calls,
+ .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+ .write = write_LDKCustomOnionMessageContents_jcall,
+ .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+ .free = LDKCustomOnionMessageContents_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKCustomOnionMessageContents_new"))) TS_LDKCustomOnionMessageContents_new(JSValue o) {
+ LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *res_ptr = LDKCustomOnionMessageContents_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t __attribute__((export_name("TS_CustomOnionMessageContents_tlv_type"))) TS_CustomOnionMessageContents_tlv_type(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+ return ret_conv;
+}
+
+int8_tArray __attribute__((export_name("TS_CustomOnionMessageContents_write"))) TS_CustomOnionMessageContents_write(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint32_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
+ LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_CustomOnionMessageContentsZ_Some: return 0;
+ case LDKCOption_CustomOnionMessageContentsZ_None: return 1;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(uint64_t ptr) {
+ LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+ assert(obj->tag == LDKCOption_CustomOnionMessageContentsZ_Some);
+ LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *some_ret = CustomOnionMessageContents_clone(&obj->some);
+ return tag_ptr(some_ret, true);
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint32_t __attribute__((export_name("TS_LDKCOption_NetAddressZ_ty_from_ptr"))) TS_LDKCOption_NetAddressZ_ty_from_ptr(uint64_t ptr) {
LDKCOption_NetAddressZ *obj = (LDKCOption_NetAddressZ*)untag_ptr(ptr);
switch(obj->tag) {
case LDKSendError_TooBigPacket: return 1;
case LDKSendError_TooFewBlindedHops: return 2;
case LDKSendError_InvalidFirstHop: return 3;
- case LDKSendError_BufferFull: return 4;
+ case LDKSendError_InvalidMessage: return 4;
+ case LDKSendError_BufferFull: return 5;
default: abort();
}
}
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_DecodeError_get_decode_error"))) TS_LDKGraphSyncError_DecodeError_get_decode_error(uint64_t ptr) {
LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
assert(obj->tag == LDKGraphSyncError_DecodeError);
- LDKDecodeError decode_error_var = obj->decode_error;
- uint64_t decode_error_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
- decode_error_ref = tag_ptr(decode_error_var.inner, false);
+ uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
return decode_error_ref;
}
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_LightningError_get_lightning_error"))) TS_LDKGraphSyncError_LightningError_get_lightning_error(uint64_t ptr) {
}
static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_err"))) TS_CResult_NetAddressDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_err"))) TS_CResult_AcceptChannelDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_get_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_get_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_err"))) TS_CResult_FundingCreatedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_err"))) TS_CResult_FundingSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_err"))) TS_CResult_ChannelReadyDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_err"))) TS_CResult_InitDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_err"))) TS_CResult_OpenChannelDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_err"))) TS_CResult_ShutdownDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_err"))) TS_CResult_UpdateFeeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_err"))) TS_CResult_OnionMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_err"))) TS_CResult_PingDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_err"))) TS_CResult_PongDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_err"))) TS_CResult_ErrorMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_err"))) TS_CResult_WarningMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_get_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
LDKu8slice script_pubkey_var = script_pubkey;
int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 37, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
}
void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
uint64_t output_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(output_var);
output_ref = tag_ptr(output_var.inner, output_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 34, output_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 38, output_ref, 0, 0, 0, 0, 0);
}
static void LDKFilter_JCalls_cloned(LDKFilter* new_obj) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) new_obj->this_arg;
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, 0, 0, 0, 0, 0, 0);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 40, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
LDKOnionMessage ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
*ret_event = Event_clone(event);
uint64_t ref_event = tag_ptr(ret_event, true);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 37, ref_event, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 41, ref_event, 0, 0, 0, 0, 0);
}
static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_buuuuu(j_calls->instance_ptr, 38, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 42, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
uint64_t usage_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(usage_var);
usage_ref = tag_ptr(usage_var.inner, usage_var.is_owned);
- return js_invoke_function_bbbbuu(j_calls->instance_ptr, 39, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
+ return js_invoke_function_bbbbuu(j_calls->instance_ptr, 43, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
}
void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 44, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 42, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 46, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScore ret_conv = *(LDKScore*)(ret_ptr);
}
LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
// WARNING: we may need a move here but no clone is available for LDKChannelManager
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 47, channel_manager_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 51, channel_manager_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
// WARNING: we may need a move here but no clone is available for LDKNetworkGraph
CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 48, network_graph_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 52, network_graph_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
// WARNING: This object doesn't live past this scope, needs clone!
uint64_t ret_scorer = tag_ptr(scorer, false);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 49, ret_scorer, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 53, ret_scorer, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
}
void call_LDKFutureCallback_jcall(const void* this_arg) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, 0, 0, 0, 0, 0, 0);
}
static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, 0, 0, 0, 0, 0, 0);
+ ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0);
LDKCVec_TxidZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
FREE(j_calls);
}
}
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
LDKOutPoint channel_id_var = channel_id;
uint64_t channel_id_ref = 0;
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 62, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
LDKOutPoint channel_id_var = channel_id;
uint64_t channel_id_ref = 0;
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 59, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 63, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
*res_ptr = LDKPersist_init(o);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
+uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
+uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+ return ret_conv;
}
typedef struct LDKChannelMessageHandler_JCalls {
msg_var = OpenChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingCreated_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReady_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Shutdown_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ClosingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = CommitmentSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = RevokeAndACK_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFee_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
}
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
msg_var = Init_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReestablish_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ErrorMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
(this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
}
-void __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
msg_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+ return tag_ptr(ret_conv, true);
}
void __attribute__((export_name("TS_ChannelMessageHandler_handle_channel_reestablish"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
msg_var = NodeAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 82, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 86, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 83, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 87, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 84, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 88, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 85, starting_point_conv, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 89, starting_point_conv, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
LDKNodeAnnouncement ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
return ret_conv;
}
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
init_var = Init_clone(&init_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
return ret_ref;
}
-void __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
init_conv.is_owned = ptr_is_owned(init);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
init_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_RoutingMessageHandler_handle_reply_channel_range"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
msg_var = OnionMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
}
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
init_var = Init_clone(&init_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
(this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
}
-void __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
init_conv.is_owned = ptr_is_owned(init);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
init_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ return tag_ptr(ret_conv, true);
}
void __attribute__((export_name("TS_OnionMessageHandler_peer_disconnected"))) TS_OnionMessageHandler_peer_disconnected(uint64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 100, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
return ret_arr;
}
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *msg_ret = msg;
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 106, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ int64_t message_type_conv = message_type;
+ LDKu8slice buffer_var = buffer;
+ int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
+ memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 107, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JSValue o) {
+ LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKCustomOnionMessageHandler ret = {
+ .this_arg = (void*) calls,
+ .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+ .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+ .free = LDKCustomOnionMessageHandler_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKCustomOnionMessageHandler_new"))) TS_LDKCustomOnionMessageHandler_new(JSValue o) {
+ LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+ *res_ptr = LDKCustomOnionMessageHandler_init(o);
+ return tag_ptr(res_ptr, true);
+}
+void __attribute__((export_name("TS_CustomOnionMessageHandler_handle_custom_message"))) TS_CustomOnionMessageHandler_handle_custom_message(uint64_t this_arg, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+ void* msg_ptr = untag_ptr(msg);
+ CHECK_ACCESS(msg_ptr);
+ LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+ if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+ }
+ (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+uint64_t __attribute__((export_name("TS_CustomOnionMessageHandler_read_custom_message"))) TS_CustomOnionMessageHandler_read_custom_message(uint64_t this_arg, int64_t message_type, int8_tArray buffer) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+ LDKu8slice buffer_ref;
+ buffer_ref.datalen = buffer->arr_len;
+ buffer_ref.data = buffer->elems;
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+ FREE(buffer);
+ return tag_ptr(ret_conv, true);
+}
+
typedef struct LDKSocketDescriptor_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 108, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 109, 0, 0, 0, 0, 0, 0);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
+ return js_invoke_function_buuuuu(j_calls->instance_ptr, 110, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, 0, 0, 0, 0, 0, 0);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
}
LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 106, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 112, 0, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
}
LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 107, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 113, 0, 0, 0, 0, 0, 0);
LDKCVec_ChannelDetailsZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
memcpy(payment_hash_arr->elems, payment_hash.data, 32);
int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_secret_arr->elems, payment_secret.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 108, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 114, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
route_ref = tag_ptr(route_var.inner, route_var.is_owned);
int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 109, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 115, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
route_ref = tag_ptr(route_var.inner, route_var.is_owned);
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 110, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 116, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
}
static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
uint64_t inflight_htlcs_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
- uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 112, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
+ uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 118, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 113, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 119, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 114, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 120, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 115, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 121, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 116, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 122, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
}
uint64_t __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_err"))) TS_CResult_BlindedRouteDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
*ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_err"))) TS_CResult_BlindedHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
*ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
*ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
*ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
*ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
*ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
*ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
*ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
*ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_err"))) TS_CResult_RouteHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
*ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_err"))) TS_CResult_RouteDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
*ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_err"))) TS_CResult_RouteParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
*ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_err"))) TS_CResult_PaymentParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
*ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_err"))) TS_CResult_RouteHintDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
*ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_err"))) TS_CResult_RouteHintHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
*ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
*ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
*ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
*ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_err"))) TS_CResult_COption_EventZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
*ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
CVec_TxidZ_free(_res_constr);
}
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_ok() {
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_err(uint32_t e) {
- LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_js(e);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(uint64_t o) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_free"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(uint64_t arg) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint64_t orig) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(orig);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
void __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_MonitorEventZ_free(uint64_tArray _res) {
LDKCVec_MonitorEventZ _res_constr;
_res_constr.datalen = _res->arr_len;
}
uint64_t __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
*ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
*ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_err"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
*ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
*ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
*ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
*ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
*ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_err"))) TS_CResult_NodeIdDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
*ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
*ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
*ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_err"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
*ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_err"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
*ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
*ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_err"))) TS_CResult_NodeAliasDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
*ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_err"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
*ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_err"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_ok"))) TS_CResult_PublicKeyNoneZ_ok(int8_tArray o) {
+ LDKPublicKey o_ref;
+ CHECK(o->arr_len == 33);
+ memcpy(o_ref.compressed_form, o->elems, 33); FREE(o);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_err"))) TS_CResult_PublicKeyNoneZ_err() {
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_PublicKeyNoneZ_is_ok"))) TS_CResult_PublicKeyNoneZ_is_ok(uint64_t o) {
+ LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_PublicKeyNoneZ_free"))) TS_CResult_PublicKeyNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone_ptr"))) TS_CResult_PublicKeyNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone"))) TS_CResult_PublicKeyNoneZ_clone(uint64_t orig) {
+ LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_COption_ScalarZ_some"))) TS_COption_ScalarZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
}
uint64_t __attribute__((export_name("TS_CResult_SignDecodeErrorZ_err"))) TS_CResult_SignDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
*ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_err"))) TS_CResult_InMemorySignerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
*ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
*ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
*ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
*ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
*ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_err"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
*ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_err"))) TS_CResult_OutPointDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
*ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_err"))) TS_CResult_COption_TypeZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
*ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
*ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
*ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
*ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
*ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
}
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_some"))) TS_COption_CustomOnionMessageContentsZ_some(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+ if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+ }
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_none"))) TS_COption_CustomOnionMessageContentsZ_none() {
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_none();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_free"))) TS_COption_CustomOnionMessageContentsZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone_ptr"))) TS_COption_CustomOnionMessageContentsZ_clone_ptr(uint64_t arg) {
+ LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone"))) TS_COption_CustomOnionMessageContentsZ_clone(uint64_t orig) {
+ LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+ o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_COption_NetAddressZ_some"))) TS_COption_NetAddressZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
}
uint64_t __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_err"))) TS_CResult_NetAddressDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
*ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_err"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
*ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
*ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
*ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_err"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
*ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
*ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
*ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_err"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
*ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_err"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
*ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_err"))) TS_CResult_ChannelReadyDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
*ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InitDecodeErrorZ_err"))) TS_CResult_InitDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
*ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_err"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
*ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
*ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_err"))) TS_CResult_ShutdownDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
*ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_err"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
*ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_err"))) TS_CResult_OnionMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
*ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PingDecodeErrorZ_err"))) TS_CResult_PingDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
*ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PongDecodeErrorZ_err"))) TS_CResult_PongDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
*ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
*ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
*ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
*ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
*ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_err"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
*ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_err"))) TS_CResult_WarningMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
*ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
*ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
*ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
*ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
*ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
*ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
*ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
*ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) {
+ LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+ LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+ jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ClosureReason_write"))) TS_ClosureReason_write(uint64_t obj) {
LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCDestination_eq"))) TS_HTLCDestination_eq(uint64_t a, uint64_t b) {
+ LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+ LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+ jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCDestination_write"))) TS_HTLCDestination_write(uint64_t obj) {
LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_APIError_monitor_update_failed"))) TS_APIError_monitor_update_failed() {
+uint64_t __attribute__((export_name("TS_APIError_monitor_update_in_progress"))) TS_APIError_monitor_update_in_progress() {
LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = APIError_monitor_update_failed();
+ *ret_copy = APIError_monitor_update_in_progress();
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_APIError_eq"))) TS_APIError_eq(uint64_t a, uint64_t b) {
+ LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+ LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+ jboolean ret_conv = APIError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_BigSize_free"))) TS_BigSize_free(uint64_t this_obj) {
LDKBigSize this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Hostname_eq"))) TS_Hostname_eq(uint64_t a, uint64_t b) {
+ LDKHostname a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHostname b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_t __attribute__((export_name("TS_Hostname_len"))) TS_Hostname_len(uint64_t this_arg) {
LDKHostname this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelConfig_eq"))) TS_ChannelConfig_eq(uint64_t a, uint64_t b) {
+ LDKChannelConfig a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelConfig b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ChannelConfig_default"))) TS_ChannelConfig_default() {
LDKChannelConfig ret_var = ChannelConfig_default();
uint64_t ret_ref = 0;
return ret_ref;
}
+jboolean __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) {
+ LDKBestBlock a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBestBlock b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_BestBlock_from_genesis"))) TS_BestBlock_from_genesis(uint32_t network) {
LDKNetwork network_conv = LDKNetwork_from_js(network);
LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
Confirm_free(this_ptr_conv);
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_clone"))) TS_ChannelMonitorUpdateErr_clone(uint64_t orig) {
- LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_clone(orig_conv));
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_clone"))) TS_ChannelMonitorUpdateStatus_clone(uint64_t orig) {
+ LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_clone(orig_conv));
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_completed"))) TS_ChannelMonitorUpdateStatus_completed() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_completed());
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_failure());
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_in_progress"))) TS_ChannelMonitorUpdateStatus_in_progress() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_in_progress());
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_permanent_failure"))) TS_ChannelMonitorUpdateStatus_permanent_failure() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_permanent_failure());
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_ChannelMonitorUpdateStatus_eq"))) TS_ChannelMonitorUpdateStatus_eq(uint64_t a, uint64_t b) {
+ LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+ LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+ jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
return ret_conv;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_WatchedOutput_eq"))) TS_WatchedOutput_eq(uint64_t a, uint64_t b) {
+ LDKWatchedOutput a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKWatchedOutput b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int64_t __attribute__((export_name("TS_WatchedOutput_hash"))) TS_WatchedOutput_hash(uint64_t o) {
LDKWatchedOutput o_conv;
o_conv.inner = untag_ptr(o);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MonitorEvent_update_completed"))) TS_MonitorEvent_update_completed(uint64_t funding_txo, int64_t monitor_update_id) {
+uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) {
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = untag_ptr(funding_txo);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
- *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+ *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_MonitorEvent_eq"))) TS_MonitorEvent_eq(uint64_t a, uint64_t b) {
+ LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+ LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+ jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_MonitorEvent_write"))) TS_MonitorEvent_write(uint64_t obj) {
LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCUpdate_eq"))) TS_HTLCUpdate_eq(uint64_t a, uint64_t b) {
+ LDKHTLCUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHTLCUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCUpdate_write"))) TS_HTLCUpdate_write(uint64_t obj) {
LDKHTLCUpdate obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKDelayedPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDelayedPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
LDKDelayedPaymentOutputDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKStaticPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKStaticPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
LDKStaticPaymentOutputDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+ LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+ jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_provided_node_features"))) TS_provided_node_features() {
+ LDKNodeFeatures ret_var = provided_node_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_provided_channel_features"))) TS_provided_channel_features() {
+ LDKChannelFeatures ret_var = provided_channel_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features() {
+ LDKInitFeatures ret_var = provided_init_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int8_tArray __attribute__((export_name("TS_CounterpartyForwardingInfo_write"))) TS_CounterpartyForwardingInfo_write(uint64_t obj) {
LDKCounterpartyForwardingInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_obj) {
- LDKDecodeError this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- DecodeError_free(this_obj_conv);
+void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DecodeError_free(this_ptr_conv);
}
static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
- LDKDecodeError ret_var = DecodeError_clone(arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
int64_t __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
- LDKDecodeError arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+ LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+ int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
return ret_conv;
}
uint64_t __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
- LDKDecodeError orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_version();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_required_feature();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_invalid_value();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_short_read();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_bad_length_descriptor();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
+ LDKIOError a_conv = LDKIOError_from_js(a);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_io(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unsupported_compression();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
+ LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+ LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+ jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
LDKInit this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
+ LDKInit a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInit b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
LDKErrorMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
+ LDKErrorMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKErrorMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
LDKWarningMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
+ LDKWarningMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKWarningMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
LDKPing this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
+ LDKPing a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPing b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
LDKPong this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
+ LDKPong a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPong b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
LDKOpenChannel this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
+ LDKOpenChannel a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOpenChannel b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
LDKAcceptChannel this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
+ LDKAcceptChannel a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKAcceptChannel b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_free(uint64_t this_obj) {
LDKFundingCreated this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_FundingCreated_eq"))) TS_FundingCreated_eq(uint64_t a, uint64_t b) {
+ LDKFundingCreated a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKFundingCreated b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_free(uint64_t this_obj) {
LDKFundingSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_FundingSigned_eq"))) TS_FundingSigned_eq(uint64_t a, uint64_t b) {
+ LDKFundingSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKFundingSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free(uint64_t this_obj) {
LDKChannelReady this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelReady_eq"))) TS_ChannelReady_eq(uint64_t a, uint64_t b) {
+ LDKChannelReady a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelReady b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t this_obj) {
LDKShutdown this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Shutdown_eq"))) TS_Shutdown_eq(uint64_t a, uint64_t b) {
+ LDKShutdown a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKShutdown b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ClosingSignedFeeRange_free"))) TS_ClosingSignedFeeRange_free(uint64_t this_obj) {
LDKClosingSignedFeeRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosingSignedFeeRange_eq"))) TS_ClosingSignedFeeRange_eq(uint64_t a, uint64_t b) {
+ LDKClosingSignedFeeRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingSignedFeeRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_free(uint64_t this_obj) {
LDKClosingSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosingSigned_eq"))) TS_ClosingSigned_eq(uint64_t a, uint64_t b) {
+ LDKClosingSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_free(uint64_t this_obj) {
LDKUpdateAddHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateAddHTLC_eq"))) TS_UpdateAddHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateAddHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateAddHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_OnionMessage_free"))) TS_OnionMessage_free(uint64_t this_obj) {
LDKOnionMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_OnionMessage_eq"))) TS_OnionMessage_eq(uint64_t a, uint64_t b) {
+ LDKOnionMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOnionMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfillHTLC_free(uint64_t this_obj) {
LDKUpdateFulfillHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFulfillHTLC_eq"))) TS_UpdateFulfillHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFulfillHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFulfillHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_free(uint64_t this_obj) {
LDKUpdateFailHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFailHTLC_eq"))) TS_UpdateFailHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFailHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFailHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateFailMalformedHTLC_free(uint64_t this_obj) {
LDKUpdateFailMalformedHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFailMalformedHTLC_eq"))) TS_UpdateFailMalformedHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFailMalformedHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFailMalformedHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSigned_free(uint64_t this_obj) {
LDKCommitmentSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_CommitmentSigned_eq"))) TS_CommitmentSigned_eq(uint64_t a, uint64_t b) {
+ LDKCommitmentSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommitmentSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free(uint64_t this_obj) {
LDKRevokeAndACK this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_RevokeAndACK_eq"))) TS_RevokeAndACK_eq(uint64_t a, uint64_t b) {
+ LDKRevokeAndACK a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKRevokeAndACK b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64_t this_obj) {
LDKUpdateFee this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFee_eq"))) TS_UpdateFee_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFee a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFee b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_DataLossProtect_free"))) TS_DataLossProtect_free(uint64_t this_obj) {
LDKDataLossProtect this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DataLossProtect_eq"))) TS_DataLossProtect_eq(uint64_t a, uint64_t b) {
+ LDKDataLossProtect a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDataLossProtect b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReestablish_free(uint64_t this_obj) {
LDKChannelReestablish this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelReestablish_eq"))) TS_ChannelReestablish_eq(uint64_t a, uint64_t b) {
+ LDKChannelReestablish a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelReestablish b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_AnnouncementSignatures_free(uint64_t this_obj) {
LDKAnnouncementSignatures this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_AnnouncementSignatures_eq"))) TS_AnnouncementSignatures_eq(uint64_t a, uint64_t b) {
+ LDKAnnouncementSignatures a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKAnnouncementSignatures b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_NetAddress_free"))) TS_NetAddress_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NetAddress_eq"))) TS_NetAddress_eq(uint64_t a, uint64_t b) {
+ LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+ LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+ jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NetAddress_write"))) TS_NetAddress_write(uint64_t obj) {
LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedNodeAnnouncement_eq"))) TS_UnsignedNodeAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedNodeAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedNodeAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_NodeAnnouncement_free"))) TS_NodeAnnouncement_free(uint64_t this_obj) {
LDKNodeAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAnnouncement_eq"))) TS_NodeAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKNodeAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UnsignedChannelAnnouncement_free"))) TS_UnsignedChannelAnnouncement_free(uint64_t this_obj) {
LDKUnsignedChannelAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedChannelAnnouncement_eq"))) TS_UnsignedChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedChannelAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedChannelAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelAnnouncement_free"))) TS_ChannelAnnouncement_free(uint64_t this_obj) {
LDKChannelAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelAnnouncement_eq"))) TS_ChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKChannelAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UnsignedChannelUpdate_free"))) TS_UnsignedChannelUpdate_free(uint64_t this_obj) {
LDKUnsignedChannelUpdate this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedChannelUpdate_eq"))) TS_UnsignedChannelUpdate_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedChannelUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedChannelUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelUpdate_free"))) TS_ChannelUpdate_free(uint64_t this_obj) {
LDKChannelUpdate this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelUpdate_eq"))) TS_ChannelUpdate_eq(uint64_t a, uint64_t b) {
+ LDKChannelUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_QueryChannelRange_free"))) TS_QueryChannelRange_free(uint64_t this_obj) {
LDKQueryChannelRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_QueryChannelRange_eq"))) TS_QueryChannelRange_eq(uint64_t a, uint64_t b) {
+ LDKQueryChannelRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKQueryChannelRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ReplyChannelRange_free"))) TS_ReplyChannelRange_free(uint64_t this_obj) {
LDKReplyChannelRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ReplyChannelRange_eq"))) TS_ReplyChannelRange_eq(uint64_t a, uint64_t b) {
+ LDKReplyChannelRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKReplyChannelRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_QueryShortChannelIds_free"))) TS_QueryShortChannelIds_free(uint64_t this_obj) {
LDKQueryShortChannelIds this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_QueryShortChannelIds_eq"))) TS_QueryShortChannelIds_eq(uint64_t a, uint64_t b) {
+ LDKQueryShortChannelIds a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKQueryShortChannelIds b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ReplyShortChannelIdsEnd_free"))) TS_ReplyShortChannelIdsEnd_free(uint64_t this_obj) {
LDKReplyShortChannelIdsEnd this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ReplyShortChannelIdsEnd_eq"))) TS_ReplyShortChannelIdsEnd_eq(uint64_t a, uint64_t b) {
+ LDKReplyShortChannelIdsEnd a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKReplyShortChannelIdsEnd b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_GossipTimestampFilter_free"))) TS_GossipTimestampFilter_free(uint64_t this_obj) {
LDKGossipTimestampFilter this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_GossipTimestampFilter_eq"))) TS_GossipTimestampFilter_eq(uint64_t a, uint64_t b) {
+ LDKGossipTimestampFilter a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKGossipTimestampFilter b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ErrorAction_free"))) TS_ErrorAction_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_CommitmentUpdate_eq"))) TS_CommitmentUpdate_eq(uint64_t a, uint64_t b) {
+ LDKCommitmentUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommitmentUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelMessageHandler_free"))) TS_ChannelMessageHandler_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomOnionMessageHandler"))) TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(uint64_t this_arg) {
+ LDKIgnoringMessageHandler this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+ *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomMessageReader"))) TS_IgnoringMessageHandler_as_CustomMessageReader(uint64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
PeerManager_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
+uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
LDKMessageHandler message_handler_conv;
message_handler_conv.inner = untag_ptr(message_handler);
message_handler_conv.is_owned = ptr_is_owned(message_handler);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_TxCreationKeys_eq"))) TS_TxCreationKeys_eq(uint64_t a, uint64_t b) {
+ LDKTxCreationKeys a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTxCreationKeys b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
uint64_t ret_ref = 0;
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelPublicKeys_eq"))) TS_ChannelPublicKeys_eq(uint64_t a, uint64_t b) {
+ LDKChannelPublicKeys a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelPublicKeys b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_write"))) TS_ChannelPublicKeys_write(uint64_t obj) {
LDKChannelPublicKeys obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCOutputInCommitment_eq"))) TS_HTLCOutputInCommitment_eq(uint64_t a, uint64_t b) {
+ LDKHTLCOutputInCommitment a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHTLCOutputInCommitment b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCOutputInCommitment_write"))) TS_HTLCOutputInCommitment_write(uint64_t obj) {
LDKHTLCOutputInCommitment obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_conv;
}
+jboolean __attribute__((export_name("TS_ClosingTransaction_eq"))) TS_ClosingTransaction_eq(uint64_t a, uint64_t b) {
+ LDKClosingTransaction a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingTransaction b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ClosingTransaction_new"))) TS_ClosingTransaction_new(int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, uint64_t funding_outpoint) {
LDKCVec_u8Z to_holder_script_ref;
to_holder_script_ref.datalen = to_holder_script->arr_len;
ChannelTypeFeatures_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_InitFeatures_known_channel_features"))) TS_InitFeatures_known_channel_features() {
- LDKInitFeatures ret_var = InitFeatures_known_channel_features();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_NodeFeatures_known_channel_features"))) TS_NodeFeatures_known_channel_features() {
- LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
uint64_t __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_empty() {
LDKInitFeatures ret_var = InitFeatures_empty();
uint64_t ret_ref = 0;
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_InitFeatures_known"))) TS_InitFeatures_known() {
- LDKInitFeatures ret_var = InitFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_InitFeatures_requires_unknown_bits"))) TS_InitFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_NodeFeatures_known"))) TS_NodeFeatures_known() {
- LDKNodeFeatures ret_var = NodeFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_NodeFeatures_requires_unknown_bits"))) TS_NodeFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKNodeFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelFeatures_known"))) TS_ChannelFeatures_known() {
- LDKChannelFeatures ret_var = ChannelFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_ChannelFeatures_requires_unknown_bits"))) TS_ChannelFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKChannelFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_InvoiceFeatures_known"))) TS_InvoiceFeatures_known() {
- LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_InvoiceFeatures_requires_unknown_bits"))) TS_InvoiceFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKInvoiceFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelTypeFeatures_known"))) TS_ChannelTypeFeatures_known() {
- LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_ChannelTypeFeatures_requires_unknown_bits"))) TS_ChannelTypeFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKChannelTypeFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ShutdownScript_eq"))) TS_ShutdownScript_eq(uint64_t a, uint64_t b) {
+ LDKShutdownScript a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKShutdownScript b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_InvalidShutdownScript_free"))) TS_InvalidShutdownScript_free(uint64_t this_obj) {
LDKInvalidShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NetworkUpdate_eq"))) TS_NetworkUpdate_eq(uint64_t a, uint64_t b) {
+ LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+ LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+ jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NetworkUpdate_write"))) TS_NetworkUpdate_write(uint64_t obj) {
LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelUpdateInfo_eq"))) TS_ChannelUpdateInfo_eq(uint64_t a, uint64_t b) {
+ LDKChannelUpdateInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelUpdateInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ChannelUpdateInfo_write"))) TS_ChannelUpdateInfo_write(uint64_t obj) {
LDKChannelUpdateInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelInfo_eq"))) TS_ChannelInfo_eq(uint64_t a, uint64_t b) {
+ LDKChannelInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ChannelInfo_get_directional_info"))) TS_ChannelInfo_get_directional_info(uint64_t this_arg, int8_t channel_flags) {
LDKChannelInfo this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAnnouncementInfo_eq"))) TS_NodeAnnouncementInfo_eq(uint64_t a, uint64_t b) {
+ LDKNodeAnnouncementInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAnnouncementInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeAnnouncementInfo_write"))) TS_NodeAnnouncementInfo_write(uint64_t obj) {
LDKNodeAnnouncementInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAlias_eq"))) TS_NodeAlias_eq(uint64_t a, uint64_t b) {
+ LDKNodeAlias a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAlias b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeAlias_write"))) TS_NodeAlias_write(uint64_t obj) {
LDKNodeAlias obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t a, uint64_t b) {
+ LDKNodeInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) {
LDKNodeInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
}
-void __attribute__((export_name("TS_NetworkGraph_node_failed"))) TS_NetworkGraph_node_failed(uint64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+void __attribute__((export_name("TS_NetworkGraph_node_failed_permanent"))) TS_NetworkGraph_node_failed_permanent(uint64_t this_arg, int8_tArray node_id) {
LDKNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKPublicKey _node_id_ref;
- CHECK(_node_id->arr_len == 33);
- memcpy(_node_id_ref.compressed_form, _node_id->elems, 33); FREE(_node_id);
- NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
}
-void __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_with_time"))) TS_NetworkGraph_remove_stale_channels_with_time(uint64_t this_arg, int64_t current_time_unix) {
+void __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_and_tracking_with_time"))) TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(uint64_t this_arg, int64_t current_time_unix) {
LDKNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+ NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
}
uint64_t __attribute__((export_name("TS_NetworkGraph_update_channel"))) TS_NetworkGraph_update_channel(uint64_t this_arg, uint64_t msg) {
ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
}
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
LDKProbabilisticScoringParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
return ret_ref;
}
+uint64_t __attribute__((export_name("TS_SendError_invalid_message"))) TS_SendError_invalid_message() {
+ LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+ *ret_copy = SendError_invalid_message();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint64_t __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_buffer_full() {
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
*ret_copy = SendError_buffer_full();
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger) {
+jboolean __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) {
+ LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+ LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+ jboolean ret_conv = SendError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CustomOnionMessageHandler_free"))) TS_CustomOnionMessageHandler_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger, uint64_t custom_handler) {
void* keys_manager_ptr = untag_ptr(keys_manager);
CHECK_ACCESS(keys_manager_ptr);
LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKLogger_JCalls_cloned(&logger_conv);
}
- LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+ void* custom_handler_ptr = untag_ptr(custom_handler);
+ CHECK_ACCESS(custom_handler_ptr);
+ LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+ if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+ }
+ LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t reply_path) {
+uint64_t __attribute__((export_name("TS_OnionMessenger_send_custom_onion_message"))) TS_OnionMessenger_send_custom_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t msg, uint64_t reply_path) {
LDKOnionMessenger this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_ACCESS(destination_ptr);
LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
// WARNING: we may need a move here but no clone is available for LDKDestination
+ void* msg_ptr = untag_ptr(msg);
+ CHECK_ACCESS(msg_ptr);
+ LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+ if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+ }
LDKBlindedRoute reply_path_conv;
reply_path_conv.inner = untag_ptr(reply_path);
reply_path_conv.is_owned = ptr_is_owned(reply_path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv.is_owned = false;
LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
- *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+ *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_ret, true);
}
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+ LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *ret_ret = CustomOnionMessageContents_clone(arg);
+ return tag_ptr(ret_ret, true);
+}
+int64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone_ptr"))) TS_CustomOnionMessageContents_clone_ptr(uint64_t arg) {
+ void* arg_ptr = untag_ptr(arg);
+ if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+ LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+ int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone"))) TS_CustomOnionMessageContents_clone(uint64_t orig) {
+ void* orig_ptr = untag_ptr(orig);
+ if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+ LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+ LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+void __attribute__((export_name("TS_CustomOnionMessageContents_free"))) TS_CustomOnionMessageContents_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ CustomOnionMessageContents_free(this_ptr_conv);
+}
+
void __attribute__((export_name("TS_RapidGossipSync_free"))) TS_RapidGossipSync_free(uint64_t this_obj) {
LDKRapidGossipSync this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
}
uint64_t __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
- LDKDecodeError a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = DecodeError_clone(&a_conv);
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+ a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
*ret_copy = GraphSyncError_decode_error(a_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ParseError_eq"))) TS_ParseError_eq(uint64_t a, uint64_t b) {
+ LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+ LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+ jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ParseOrSemanticError_free"))) TS_ParseOrSemanticError_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ParseOrSemanticError_eq"))) TS_ParseOrSemanticError_eq(uint64_t a, uint64_t b) {
+ LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+ LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+ jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Invoice_free"))) TS_Invoice_free(uint64_t this_obj) {
LDKInvoice this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
}
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
LDKCurrency network_conv = LDKCurrency_from_js(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
description_hash_conv = Sha256_clone(&description_hash_conv);
LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
}
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
LDKCurrency network_conv = LDKCurrency_from_js(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
LDKStr description_conv = str_ref_to_owned_c(description);
LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+ *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
return tag_ptr(ret_conv, true);
}
default: abort();
}
}
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_js(int32_t ord) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_js(int32_t ord) {
switch (ord) {
- case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
- case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+ case 0: return LDKChannelMonitorUpdateStatus_Completed;
+ case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+ case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
}
abort();
}
-static inline int32_t LDKChannelMonitorUpdateErr_to_js(LDKChannelMonitorUpdateErr val) {
+static inline int32_t LDKChannelMonitorUpdateStatus_to_js(LDKChannelMonitorUpdateStatus val) {
switch (val) {
- case LDKChannelMonitorUpdateErr_TemporaryFailure: return 0;
- case LDKChannelMonitorUpdateErr_PermanentFailure: return 1;
+ case LDKChannelMonitorUpdateStatus_Completed: return 0;
+ case LDKChannelMonitorUpdateStatus_InProgress: return 1;
+ case LDKChannelMonitorUpdateStatus_PermanentFailure: return 2;
default: abort();
}
}
CResult_BlindedRouteNoneZ_get_err(owner_conv);
}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDecodeError_ty_from_ptr(uint64_t ptr) {
+ LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDecodeError_UnknownVersion: return 0;
+ case LDKDecodeError_UnknownRequiredFeature: return 1;
+ case LDKDecodeError_InvalidValue: return 2;
+ case LDKDecodeError_ShortRead: return 3;
+ case LDKDecodeError_BadLengthDescriptor: return 4;
+ case LDKDecodeError_Io: return 5;
+ case LDKDecodeError_UnsupportedCompression: return 6;
+ default: abort();
+ }
+}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_Io_get_io"))) TS_LDKDecodeError_Io_get_io(uint64_t ptr) {
+ LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+ assert(obj->tag == LDKDecodeError_Io);
+ uint32_t io_conv = LDKIOError_to_js(obj->io);
+ return io_conv;
+}
static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
LDKBlindedRoute ret = *owner->contents.result;
ret.is_owned = false;
}
static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_err"))) TS_CResult_BlindedRouteDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_err"))) TS_CResult_BlindedHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_err"))) TS_CResult_RouteHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_err"))) TS_CResult_RouteDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get_err"))) TS_CResult_RouteParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_get_err"))) TS_CResult_PaymentParametersDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_err"))) TS_CResult_RouteHintDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_err"))) TS_CResult_RouteHintHopDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_err"))) TS_CResult_COption_EventZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-void __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(uint64_t owner) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
- CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-uint32_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(uint64_t owner) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
- return ret_conv;
-}
-
uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKMonitorEvent_HTLCEvent: return 0;
case LDKMonitorEvent_CommitmentTxConfirmed: return 1;
- case LDKMonitorEvent_UpdateCompleted: return 2;
+ case LDKMonitorEvent_Completed: return 2;
case LDKMonitorEvent_UpdateFailed: return 3;
default: abort();
}
commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
return commitment_tx_confirmed_ref;
}
-uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo"))) TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(uint64_t ptr) {
+uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_txo"))) TS_LDKMonitorEvent_Completed_get_funding_txo(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
- assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
- LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+ assert(obj->tag == LDKMonitorEvent_Completed);
+ LDKOutPoint funding_txo_var = obj->completed.funding_txo;
uint64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
return funding_txo_ref;
}
-int64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id"))) TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(uint64_t ptr) {
+int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
- assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
- int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
+ assert(obj->tag == LDKMonitorEvent_Completed);
+ int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
return monitor_update_id_conv;
}
uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateFailed_get_update_failed"))) TS_LDKMonitorEvent_UpdateFailed_get_update_failed(uint64_t ptr) {
}
static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_err"))) TS_CResult_InitFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) TS_CResult_NodeIdDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_err"))) TS_CResult_RoutingFeesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_err"))) TS_CResult_NodeAliasDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_err"))) TS_CResult_NodeInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_err"))) TS_CResult_NetworkGraphDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CResult_SecretKeyNoneZ_get_err(owner_conv);
}
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+int8_tArray __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_ok"))) TS_CResult_PublicKeyNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_err"))) TS_CResult_PublicKeyNoneZ_get_err(uint64_t owner) {
+ LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+ CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
uint32_t __attribute__((export_name("TS_LDKCOption_ScalarZ_ty_from_ptr"))) TS_LDKCOption_ScalarZ_ty_from_ptr(uint64_t ptr) {
LDKCOption_ScalarZ *obj = (LDKCOption_ScalarZ*)untag_ptr(ptr);
switch(obj->tag) {
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+ LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+ LDKTransaction anchor_tx_var = anchor_tx;
+ int8_tArray anchor_tx_arr = init_int8_tArray(anchor_tx_var.datalen, __LINE__);
+ memcpy(anchor_tx_arr->elems, anchor_tx_var.data, anchor_tx_var.datalen);
+ Transaction_free(anchor_tx_var);
+ uint32_t input_conv = input;
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)anchor_tx_arr, input_conv, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
LDKUnsignedChannelAnnouncement msg_var = *msg;
msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 13, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 14, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
channel_parameters_ref = tag_ptr(channel_parameters_var.inner, channel_parameters_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 14, channel_parameters_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 15, channel_parameters_ref, 0, 0, 0, 0, 0);
}
static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
.sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
.sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
.sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+ .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
.sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
.ready_channel = ready_channel_LDKBaseSign_jcall,
.free = LDKBaseSign_JCalls_free,
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_BaseSign_sign_holder_anchor_input"))) TS_BaseSign_sign_holder_anchor_input(uint64_t this_arg, int8_tArray anchor_tx, uint32_t input) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+ LDKTransaction anchor_tx_ref;
+ anchor_tx_ref.datalen = anchor_tx->arr_len;
+ anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+ memcpy(anchor_tx_ref.data, anchor_tx->elems, anchor_tx_ref.datalen); FREE(anchor_tx);
+ anchor_tx_ref.data_is_owned = true;
+ LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_BaseSign_sign_channel_announcement"))) TS_BaseSign_sign_channel_announcement(uint64_t this_arg, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
}
LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_err"))) TS_CResult_SignDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_err"))) TS_CResult_InMemorySignerDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
case LDKAPIError_FeeRateTooHigh: return 1;
case LDKAPIError_RouteError: return 2;
case LDKAPIError_ChannelUnavailable: return 3;
- case LDKAPIError_MonitorUpdateFailed: return 4;
+ case LDKAPIError_MonitorUpdateInProgress: return 4;
case LDKAPIError_IncompatibleShutdownScript: return 5;
default: abort();
}
}
static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
FREE(j_calls);
}
}
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
LDKOutPoint funding_txo_var = funding_txo;
uint64_t funding_txo_ref = 0;
uint64_t monitor_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 16, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
LDKOutPoint funding_txo_var = funding_txo;
uint64_t funding_txo_ref = 0;
uint64_t update_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_ref = tag_ptr(update_var.inner, update_var.is_owned);
- uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, update_ref, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 18, funding_txo_ref, update_ref, 0, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, 0, 0, 0, 0, 0, 0);
LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
*res_ptr = LDKWatch_init(o);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
+uint32_t __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
monitor_conv.is_owned = ptr_is_owned(monitor);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
monitor_conv = ChannelMonitor_clone(&monitor_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
+uint32_t __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
update_conv.is_owned = ptr_is_owned(update);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
update_conv = ChannelMonitorUpdate_clone(&update_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+ return ret_conv;
}
uint64_tArray __attribute__((export_name("TS_Watch_release_pending_monitor_events"))) TS_Watch_release_pending_monitor_events(uint64_t this_arg) {
int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
Transaction_free(tx_var);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, recipient_conv, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, recipient_conv, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+ LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+ uint32_t recipient_conv = LDKRecipient_to_js(recipient);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, recipient_conv, 0, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
uint32_t recipient_conv = LDKRecipient_to_js(recipient);
LDKCOption_ScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_ScalarZ), "LDKCOption_ScalarZ");
*tweak_copy = tweak;
uint64_t tweak_ref = tag_ptr(tweak_copy, true);
- uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 21, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 23, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SharedSecretNoneZ ret_conv = *(LDKCResult_SharedSecretNoneZ*)(ret_ptr);
}
LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 23, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
LDKShutdownScript ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
jboolean inbound_conv = inbound;
int64_t channel_value_satoshis_conv = channel_value_satoshis;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 24, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 26, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKSign ret_conv = *(LDKSign*)(ret_ptr);
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKu8slice reader_var = reader;
int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
FREE(invoice_data_var.data);
uint32_t receipient_conv = LDKRecipient_to_js(receipient);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
LDKKeysInterface ret = {
.this_arg = (void*) calls,
.get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+ .get_node_id = get_node_id_LDKKeysInterface_jcall,
.ecdh = ecdh_LDKKeysInterface_jcall,
.get_destination_script = get_destination_script_LDKKeysInterface_jcall,
.get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_KeysInterface_get_node_id"))) TS_KeysInterface_get_node_id(uint64_t this_arg, uint32_t recipient) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+ LDKRecipient recipient_conv = LDKRecipient_from_js(recipient);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_KeysInterface_ecdh"))) TS_KeysInterface_ecdh(uint64_t this_arg, uint32_t recipient, int8_tArray other_key, uint64_t tweak) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, confirmation_target_conv, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, confirmation_target_conv, 0, 0, 0, 0, 0);
}
static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
}
static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_err"))) TS_CResult_ChannelConfigDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_err"))) TS_CResult_OutPointDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
uint16_t type_id_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
}
LDKStr debug_str_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, 0, 0, 0, 0, 0, 0);
LDKStr ret_conv = str_ref_to_owned_c(ret);
return ret_conv;
}
LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_err"))) TS_CResult_COption_TypeZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
+typedef struct LDKCustomOnionMessageContents_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, 0, 0, 0, 0, 0, 0);
+ LDKCVec_u8Z ret_ref;
+ ret_ref.datalen = ret->arr_len;
+ ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(ret_ref.data, ret->elems, ret_ref.datalen); FREE(ret);
+ return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+ LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JSValue o) {
+ LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKCustomOnionMessageContents ret = {
+ .this_arg = (void*) calls,
+ .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+ .write = write_LDKCustomOnionMessageContents_jcall,
+ .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+ .free = LDKCustomOnionMessageContents_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKCustomOnionMessageContents_new"))) TS_LDKCustomOnionMessageContents_new(JSValue o) {
+ LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *res_ptr = LDKCustomOnionMessageContents_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t __attribute__((export_name("TS_CustomOnionMessageContents_tlv_type"))) TS_CustomOnionMessageContents_tlv_type(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+ return ret_conv;
+}
+
+int8_tArray __attribute__((export_name("TS_CustomOnionMessageContents_write"))) TS_CustomOnionMessageContents_write(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint32_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
+ LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_CustomOnionMessageContentsZ_Some: return 0;
+ case LDKCOption_CustomOnionMessageContentsZ_None: return 1;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(uint64_t ptr) {
+ LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+ assert(obj->tag == LDKCOption_CustomOnionMessageContentsZ_Some);
+ LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *some_ret = CustomOnionMessageContents_clone(&obj->some);
+ return tag_ptr(some_ret, true);
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint32_t __attribute__((export_name("TS_LDKCOption_NetAddressZ_ty_from_ptr"))) TS_LDKCOption_NetAddressZ_ty_from_ptr(uint64_t ptr) {
LDKCOption_NetAddressZ *obj = (LDKCOption_NetAddressZ*)untag_ptr(ptr);
switch(obj->tag) {
case LDKSendError_TooBigPacket: return 1;
case LDKSendError_TooFewBlindedHops: return 2;
case LDKSendError_InvalidFirstHop: return 3;
- case LDKSendError_BufferFull: return 4;
+ case LDKSendError_InvalidMessage: return 4;
+ case LDKSendError_BufferFull: return 5;
default: abort();
}
}
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_DecodeError_get_decode_error"))) TS_LDKGraphSyncError_DecodeError_get_decode_error(uint64_t ptr) {
LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
assert(obj->tag == LDKGraphSyncError_DecodeError);
- LDKDecodeError decode_error_var = obj->decode_error;
- uint64_t decode_error_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
- decode_error_ref = tag_ptr(decode_error_var.inner, false);
+ uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
return decode_error_ref;
}
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_LightningError_get_lightning_error"))) TS_LDKGraphSyncError_LightningError_get_lightning_error(uint64_t ptr) {
}
static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_err"))) TS_CResult_NetAddressDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_err"))) TS_CResult_AcceptChannelDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_get_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_get_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_err"))) TS_CResult_FundingCreatedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_err"))) TS_CResult_FundingSignedDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_err"))) TS_CResult_ChannelReadyDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_err"))) TS_CResult_InitDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_err"))) TS_CResult_OpenChannelDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_err"))) TS_CResult_ShutdownDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_err"))) TS_CResult_UpdateFeeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_err"))) TS_CResult_OnionMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_err"))) TS_CResult_PingDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_err"))) TS_CResult_PongDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_err"))) TS_CResult_ErrorMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_err"))) TS_CResult_WarningMessageDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_get_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
- LDKDecodeError ret = *owner->contents.err;
- ret.is_owned = false;
- return ret;
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
uint64_t __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(uint64_t owner) {
LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
LDKu8slice script_pubkey_var = script_pubkey;
int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 37, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
}
void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
uint64_t output_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(output_var);
output_ref = tag_ptr(output_var.inner, output_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 34, output_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 38, output_ref, 0, 0, 0, 0, 0);
}
static void LDKFilter_JCalls_cloned(LDKFilter* new_obj) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) new_obj->this_arg;
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, 0, 0, 0, 0, 0, 0);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 40, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
LDKOnionMessage ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
*ret_event = Event_clone(event);
uint64_t ref_event = tag_ptr(ret_event, true);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 37, ref_event, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 41, ref_event, 0, 0, 0, 0, 0);
}
static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_buuuuu(j_calls->instance_ptr, 38, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 42, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
uint64_t usage_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(usage_var);
usage_ref = tag_ptr(usage_var.inner, usage_var.is_owned);
- return js_invoke_function_bbbbuu(j_calls->instance_ptr, 39, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
+ return js_invoke_function_bbbbuu(j_calls->instance_ptr, 43, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
}
void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 44, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 42, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 46, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScore ret_conv = *(LDKScore*)(ret_ptr);
}
LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
// WARNING: we may need a move here but no clone is available for LDKChannelManager
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 47, channel_manager_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 51, channel_manager_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
// WARNING: we may need a move here but no clone is available for LDKNetworkGraph
CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 48, network_graph_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 52, network_graph_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
// WARNING: This object doesn't live past this scope, needs clone!
uint64_t ret_scorer = tag_ptr(scorer, false);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 49, ret_scorer, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 53, ret_scorer, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
}
void call_LDKFutureCallback_jcall(const void* this_arg) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, 0, 0, 0, 0, 0, 0);
}
static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, 0, 0, 0, 0, 0, 0);
+ ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0);
LDKCVec_TxidZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
FREE(j_calls);
}
}
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
LDKOutPoint channel_id_var = channel_id;
uint64_t channel_id_ref = 0;
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 62, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
LDKOutPoint channel_id_var = channel_id;
uint64_t channel_id_ref = 0;
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 59, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
- FREE(untag_ptr(ret));
+ uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 63, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
+ LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
*res_ptr = LDKPersist_init(o);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
+uint32_t __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
+uint32_t __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
- return tag_ptr(ret_conv, true);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+ return ret_conv;
}
typedef struct LDKChannelMessageHandler_JCalls {
msg_var = OpenChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingCreated_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReady_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Shutdown_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+ js_invoke_function_ubbuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ClosingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = CommitmentSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = RevokeAndACK_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFee_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
}
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
msg_var = Init_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReestablish_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ErrorMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
(this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
}
-void __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
msg_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+ return tag_ptr(ret_conv, true);
}
void __attribute__((export_name("TS_ChannelMessageHandler_handle_channel_reestablish"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
msg_var = NodeAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 82, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 86, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 83, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 87, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 84, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 88, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 85, starting_point_conv, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 89, starting_point_conv, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
LDKNodeAnnouncement ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
return ret_conv;
}
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
init_var = Init_clone(&init_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
return ret_ref;
}
-void __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
init_conv.is_owned = ptr_is_owned(init);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
init_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_RoutingMessageHandler_handle_reply_channel_range"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
msg_var = OnionMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
}
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
init_var = Init_clone(&init_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
}
void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
jboolean no_connection_possible_conv = no_connection_possible;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
(this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
}
-void __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
init_conv.is_owned = ptr_is_owned(init);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
init_conv.is_owned = false;
- (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+ return tag_ptr(ret_conv, true);
}
void __attribute__((export_name("TS_OnionMessageHandler_peer_disconnected"))) TS_OnionMessageHandler_peer_disconnected(uint64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 100, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
return ret_arr;
}
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *msg_ret = msg;
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 106, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ int64_t message_type_conv = message_type;
+ LDKu8slice buffer_var = buffer;
+ int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
+ memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 107, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JSValue o) {
+ LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKCustomOnionMessageHandler ret = {
+ .this_arg = (void*) calls,
+ .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+ .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+ .free = LDKCustomOnionMessageHandler_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKCustomOnionMessageHandler_new"))) TS_LDKCustomOnionMessageHandler_new(JSValue o) {
+ LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+ *res_ptr = LDKCustomOnionMessageHandler_init(o);
+ return tag_ptr(res_ptr, true);
+}
+void __attribute__((export_name("TS_CustomOnionMessageHandler_handle_custom_message"))) TS_CustomOnionMessageHandler_handle_custom_message(uint64_t this_arg, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+ void* msg_ptr = untag_ptr(msg);
+ CHECK_ACCESS(msg_ptr);
+ LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+ if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+ }
+ (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+uint64_t __attribute__((export_name("TS_CustomOnionMessageHandler_read_custom_message"))) TS_CustomOnionMessageHandler_read_custom_message(uint64_t this_arg, int64_t message_type, int8_tArray buffer) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+ LDKu8slice buffer_ref;
+ buffer_ref.datalen = buffer->arr_len;
+ buffer_ref.data = buffer->elems;
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+ FREE(buffer);
+ return tag_ptr(ret_conv, true);
+}
+
typedef struct LDKSocketDescriptor_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 108, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 109, 0, 0, 0, 0, 0, 0);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
+ return js_invoke_function_buuuuu(j_calls->instance_ptr, 110, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, 0, 0, 0, 0, 0, 0);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
}
LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 106, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 112, 0, 0, 0, 0, 0, 0);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
}
LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 107, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 113, 0, 0, 0, 0, 0, 0);
LDKCVec_ChannelDetailsZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
memcpy(payment_hash_arr->elems, payment_hash.data, 32);
int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_secret_arr->elems, payment_secret.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 108, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 114, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
route_ref = tag_ptr(route_var.inner, route_var.is_owned);
int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 109, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 115, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
route_ref = tag_ptr(route_var.inner, route_var.is_owned);
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 110, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 116, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(payment_id_arr->elems, payment_id.data, 32);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
}
static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
uint64_t inflight_htlcs_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
- uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 112, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
+ uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 118, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 113, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 119, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 114, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 120, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
}
FREE(path_var.data);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 115, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 121, (uint32_t)path_arr, 0, 0, 0, 0, 0);
}
void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
FREE(path_var.data);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 116, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 122, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
}
static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
}
uint64_t __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_err"))) TS_CResult_BlindedRouteDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
*ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_err"))) TS_CResult_BlindedHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
*ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
*ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
*ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
*ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
*ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
*ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
*ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
*ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
*ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_err"))) TS_CResult_RouteHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
*ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_err"))) TS_CResult_RouteDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
*ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_err"))) TS_CResult_RouteParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
*ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_err"))) TS_CResult_PaymentParametersDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
*ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_err"))) TS_CResult_RouteHintDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
*ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_err"))) TS_CResult_RouteHintHopDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
*ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
*ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
*ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
*ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_err"))) TS_CResult_COption_EventZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
*ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
CVec_TxidZ_free(_res_constr);
}
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_ok() {
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_err(uint32_t e) {
- LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_js(e);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(uint64_t o) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_free"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(uint64_t arg) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint64_t orig) {
- LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(orig);
- LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
- *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
void __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_MonitorEventZ_free(uint64_tArray _res) {
LDKCVec_MonitorEventZ _res_constr;
_res_constr.datalen = _res->arr_len;
}
uint64_t __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
*ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
*ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_err"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
*ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
*ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
*ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
*ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
*ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_err"))) TS_CResult_NodeIdDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
*ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
*ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
*ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_err"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
*ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_err"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
*ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
*ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_err"))) TS_CResult_NodeAliasDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
*ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_err"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
*ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_err"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
*ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
*ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_ok"))) TS_CResult_PublicKeyNoneZ_ok(int8_tArray o) {
+ LDKPublicKey o_ref;
+ CHECK(o->arr_len == 33);
+ memcpy(o_ref.compressed_form, o->elems, 33); FREE(o);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_err"))) TS_CResult_PublicKeyNoneZ_err() {
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_PublicKeyNoneZ_is_ok"))) TS_CResult_PublicKeyNoneZ_is_ok(uint64_t o) {
+ LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_PublicKeyNoneZ_free"))) TS_CResult_PublicKeyNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone_ptr"))) TS_CResult_PublicKeyNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone"))) TS_CResult_PublicKeyNoneZ_clone(uint64_t orig) {
+ LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+ LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+ *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_COption_ScalarZ_some"))) TS_COption_ScalarZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
}
uint64_t __attribute__((export_name("TS_CResult_SignDecodeErrorZ_err"))) TS_CResult_SignDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
*ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_err"))) TS_CResult_InMemorySignerDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
*ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
*ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
*ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
*ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
*ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_err"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
*ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_err"))) TS_CResult_OutPointDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
*ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_err"))) TS_CResult_COption_TypeZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
*ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
*ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
*ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
*ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
*ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
*ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
}
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_some"))) TS_COption_CustomOnionMessageContentsZ_some(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+ if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+ }
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_none"))) TS_COption_CustomOnionMessageContentsZ_none() {
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_none();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_free"))) TS_COption_CustomOnionMessageContentsZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone_ptr"))) TS_COption_CustomOnionMessageContentsZ_clone_ptr(uint64_t arg) {
+ LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone"))) TS_COption_CustomOnionMessageContentsZ_clone(uint64_t orig) {
+ LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+ LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+ o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_COption_NetAddressZ_some"))) TS_COption_NetAddressZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
}
uint64_t __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_err"))) TS_CResult_NetAddressDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
*ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_err"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
*ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
*ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
*ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_err"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
*ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
*ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
*ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_err"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
*ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_err"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
*ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_err"))) TS_CResult_ChannelReadyDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
*ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_InitDecodeErrorZ_err"))) TS_CResult_InitDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
*ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_err"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
*ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
*ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_err"))) TS_CResult_ShutdownDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
*ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_err"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
*ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
*ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_err"))) TS_CResult_OnionMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
*ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PingDecodeErrorZ_err"))) TS_CResult_PingDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
*ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_PongDecodeErrorZ_err"))) TS_CResult_PongDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
*ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
*ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
*ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
*ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
*ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_err"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
*ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_err"))) TS_CResult_WarningMessageDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
*ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
*ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
*ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
*ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
*ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
*ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
*ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint64_t e) {
- LDKDecodeError e_conv;
- e_conv.inner = untag_ptr(e);
- e_conv.is_owned = ptr_is_owned(e);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- e_conv = DecodeError_clone(&e_conv);
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
*ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) {
+ LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+ LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+ jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ClosureReason_write"))) TS_ClosureReason_write(uint64_t obj) {
LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCDestination_eq"))) TS_HTLCDestination_eq(uint64_t a, uint64_t b) {
+ LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+ LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+ jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCDestination_write"))) TS_HTLCDestination_write(uint64_t obj) {
LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_APIError_monitor_update_failed"))) TS_APIError_monitor_update_failed() {
+uint64_t __attribute__((export_name("TS_APIError_monitor_update_in_progress"))) TS_APIError_monitor_update_in_progress() {
LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = APIError_monitor_update_failed();
+ *ret_copy = APIError_monitor_update_in_progress();
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_APIError_eq"))) TS_APIError_eq(uint64_t a, uint64_t b) {
+ LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+ LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+ jboolean ret_conv = APIError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_BigSize_free"))) TS_BigSize_free(uint64_t this_obj) {
LDKBigSize this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Hostname_eq"))) TS_Hostname_eq(uint64_t a, uint64_t b) {
+ LDKHostname a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHostname b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_t __attribute__((export_name("TS_Hostname_len"))) TS_Hostname_len(uint64_t this_arg) {
LDKHostname this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelConfig_eq"))) TS_ChannelConfig_eq(uint64_t a, uint64_t b) {
+ LDKChannelConfig a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelConfig b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ChannelConfig_default"))) TS_ChannelConfig_default() {
LDKChannelConfig ret_var = ChannelConfig_default();
uint64_t ret_ref = 0;
return ret_ref;
}
+jboolean __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) {
+ LDKBestBlock a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBestBlock b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_BestBlock_from_genesis"))) TS_BestBlock_from_genesis(uint32_t network) {
LDKNetwork network_conv = LDKNetwork_from_js(network);
LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
Confirm_free(this_ptr_conv);
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_clone"))) TS_ChannelMonitorUpdateErr_clone(uint64_t orig) {
- LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_clone(orig_conv));
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_clone"))) TS_ChannelMonitorUpdateStatus_clone(uint64_t orig) {
+ LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_clone(orig_conv));
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_completed"))) TS_ChannelMonitorUpdateStatus_completed() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_completed());
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateErr_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
- uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_failure());
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_in_progress"))) TS_ChannelMonitorUpdateStatus_in_progress() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_in_progress());
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_ChannelMonitorUpdateStatus_permanent_failure"))) TS_ChannelMonitorUpdateStatus_permanent_failure() {
+ uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_permanent_failure());
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_ChannelMonitorUpdateStatus_eq"))) TS_ChannelMonitorUpdateStatus_eq(uint64_t a, uint64_t b) {
+ LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+ LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+ jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
return ret_conv;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_WatchedOutput_eq"))) TS_WatchedOutput_eq(uint64_t a, uint64_t b) {
+ LDKWatchedOutput a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKWatchedOutput b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int64_t __attribute__((export_name("TS_WatchedOutput_hash"))) TS_WatchedOutput_hash(uint64_t o) {
LDKWatchedOutput o_conv;
o_conv.inner = untag_ptr(o);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MonitorEvent_update_completed"))) TS_MonitorEvent_update_completed(uint64_t funding_txo, int64_t monitor_update_id) {
+uint64_t __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) {
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = untag_ptr(funding_txo);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
- *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+ *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+jboolean __attribute__((export_name("TS_MonitorEvent_eq"))) TS_MonitorEvent_eq(uint64_t a, uint64_t b) {
+ LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+ LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+ jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_MonitorEvent_write"))) TS_MonitorEvent_write(uint64_t obj) {
LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCUpdate_eq"))) TS_HTLCUpdate_eq(uint64_t a, uint64_t b) {
+ LDKHTLCUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHTLCUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCUpdate_write"))) TS_HTLCUpdate_write(uint64_t obj) {
LDKHTLCUpdate obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKDelayedPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDelayedPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
LDKDelayedPaymentOutputDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKStaticPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKStaticPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
LDKStaticPaymentOutputDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+ LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+ jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_provided_node_features"))) TS_provided_node_features() {
+ LDKNodeFeatures ret_var = provided_node_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_provided_channel_features"))) TS_provided_channel_features() {
+ LDKChannelFeatures ret_var = provided_channel_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features() {
+ LDKInitFeatures ret_var = provided_init_features();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int8_tArray __attribute__((export_name("TS_CounterpartyForwardingInfo_write"))) TS_CounterpartyForwardingInfo_write(uint64_t obj) {
LDKCounterpartyForwardingInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_obj) {
- LDKDecodeError this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- DecodeError_free(this_obj_conv);
+void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DecodeError_free(this_ptr_conv);
}
static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
- LDKDecodeError ret_var = DecodeError_clone(arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
int64_t __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
- LDKDecodeError arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+ LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+ int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
return ret_conv;
}
uint64_t __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
- LDKDecodeError orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_version();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_required_feature();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_invalid_value();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_short_read();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_bad_length_descriptor();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
+ LDKIOError a_conv = LDKIOError_from_js(a);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_io(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unsupported_compression();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
+ LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+ LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+ jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
LDKInit this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
+ LDKInit a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInit b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
LDKErrorMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
+ LDKErrorMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKErrorMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
LDKWarningMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
+ LDKWarningMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKWarningMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
LDKPing this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
+ LDKPing a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPing b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
LDKPong this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
+ LDKPong a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPong b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
LDKOpenChannel this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
+ LDKOpenChannel a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOpenChannel b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
LDKAcceptChannel this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
+ LDKAcceptChannel a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKAcceptChannel b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_free(uint64_t this_obj) {
LDKFundingCreated this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_FundingCreated_eq"))) TS_FundingCreated_eq(uint64_t a, uint64_t b) {
+ LDKFundingCreated a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKFundingCreated b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_free(uint64_t this_obj) {
LDKFundingSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_FundingSigned_eq"))) TS_FundingSigned_eq(uint64_t a, uint64_t b) {
+ LDKFundingSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKFundingSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free(uint64_t this_obj) {
LDKChannelReady this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelReady_eq"))) TS_ChannelReady_eq(uint64_t a, uint64_t b) {
+ LDKChannelReady a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelReady b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t this_obj) {
LDKShutdown this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Shutdown_eq"))) TS_Shutdown_eq(uint64_t a, uint64_t b) {
+ LDKShutdown a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKShutdown b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ClosingSignedFeeRange_free"))) TS_ClosingSignedFeeRange_free(uint64_t this_obj) {
LDKClosingSignedFeeRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosingSignedFeeRange_eq"))) TS_ClosingSignedFeeRange_eq(uint64_t a, uint64_t b) {
+ LDKClosingSignedFeeRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingSignedFeeRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_free(uint64_t this_obj) {
LDKClosingSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ClosingSigned_eq"))) TS_ClosingSigned_eq(uint64_t a, uint64_t b) {
+ LDKClosingSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_free(uint64_t this_obj) {
LDKUpdateAddHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateAddHTLC_eq"))) TS_UpdateAddHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateAddHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateAddHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_OnionMessage_free"))) TS_OnionMessage_free(uint64_t this_obj) {
LDKOnionMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_OnionMessage_eq"))) TS_OnionMessage_eq(uint64_t a, uint64_t b) {
+ LDKOnionMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOnionMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfillHTLC_free(uint64_t this_obj) {
LDKUpdateFulfillHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFulfillHTLC_eq"))) TS_UpdateFulfillHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFulfillHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFulfillHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_free(uint64_t this_obj) {
LDKUpdateFailHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFailHTLC_eq"))) TS_UpdateFailHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFailHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFailHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateFailMalformedHTLC_free(uint64_t this_obj) {
LDKUpdateFailMalformedHTLC this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFailMalformedHTLC_eq"))) TS_UpdateFailMalformedHTLC_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFailMalformedHTLC a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFailMalformedHTLC b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSigned_free(uint64_t this_obj) {
LDKCommitmentSigned this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_CommitmentSigned_eq"))) TS_CommitmentSigned_eq(uint64_t a, uint64_t b) {
+ LDKCommitmentSigned a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommitmentSigned b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free(uint64_t this_obj) {
LDKRevokeAndACK this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_RevokeAndACK_eq"))) TS_RevokeAndACK_eq(uint64_t a, uint64_t b) {
+ LDKRevokeAndACK a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKRevokeAndACK b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64_t this_obj) {
LDKUpdateFee this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UpdateFee_eq"))) TS_UpdateFee_eq(uint64_t a, uint64_t b) {
+ LDKUpdateFee a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUpdateFee b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_DataLossProtect_free"))) TS_DataLossProtect_free(uint64_t this_obj) {
LDKDataLossProtect this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_DataLossProtect_eq"))) TS_DataLossProtect_eq(uint64_t a, uint64_t b) {
+ LDKDataLossProtect a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDataLossProtect b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReestablish_free(uint64_t this_obj) {
LDKChannelReestablish this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelReestablish_eq"))) TS_ChannelReestablish_eq(uint64_t a, uint64_t b) {
+ LDKChannelReestablish a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelReestablish b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_AnnouncementSignatures_free(uint64_t this_obj) {
LDKAnnouncementSignatures this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_AnnouncementSignatures_eq"))) TS_AnnouncementSignatures_eq(uint64_t a, uint64_t b) {
+ LDKAnnouncementSignatures a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKAnnouncementSignatures b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_NetAddress_free"))) TS_NetAddress_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NetAddress_eq"))) TS_NetAddress_eq(uint64_t a, uint64_t b) {
+ LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+ LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+ jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NetAddress_write"))) TS_NetAddress_write(uint64_t obj) {
LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedNodeAnnouncement_eq"))) TS_UnsignedNodeAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedNodeAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedNodeAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_NodeAnnouncement_free"))) TS_NodeAnnouncement_free(uint64_t this_obj) {
LDKNodeAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAnnouncement_eq"))) TS_NodeAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKNodeAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UnsignedChannelAnnouncement_free"))) TS_UnsignedChannelAnnouncement_free(uint64_t this_obj) {
LDKUnsignedChannelAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedChannelAnnouncement_eq"))) TS_UnsignedChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedChannelAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedChannelAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelAnnouncement_free"))) TS_ChannelAnnouncement_free(uint64_t this_obj) {
LDKChannelAnnouncement this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelAnnouncement_eq"))) TS_ChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+ LDKChannelAnnouncement a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelAnnouncement b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UnsignedChannelUpdate_free"))) TS_UnsignedChannelUpdate_free(uint64_t this_obj) {
LDKUnsignedChannelUpdate this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_UnsignedChannelUpdate_eq"))) TS_UnsignedChannelUpdate_eq(uint64_t a, uint64_t b) {
+ LDKUnsignedChannelUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnsignedChannelUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelUpdate_free"))) TS_ChannelUpdate_free(uint64_t this_obj) {
LDKChannelUpdate this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelUpdate_eq"))) TS_ChannelUpdate_eq(uint64_t a, uint64_t b) {
+ LDKChannelUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_QueryChannelRange_free"))) TS_QueryChannelRange_free(uint64_t this_obj) {
LDKQueryChannelRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_QueryChannelRange_eq"))) TS_QueryChannelRange_eq(uint64_t a, uint64_t b) {
+ LDKQueryChannelRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKQueryChannelRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ReplyChannelRange_free"))) TS_ReplyChannelRange_free(uint64_t this_obj) {
LDKReplyChannelRange this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ReplyChannelRange_eq"))) TS_ReplyChannelRange_eq(uint64_t a, uint64_t b) {
+ LDKReplyChannelRange a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKReplyChannelRange b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_QueryShortChannelIds_free"))) TS_QueryShortChannelIds_free(uint64_t this_obj) {
LDKQueryShortChannelIds this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_QueryShortChannelIds_eq"))) TS_QueryShortChannelIds_eq(uint64_t a, uint64_t b) {
+ LDKQueryShortChannelIds a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKQueryShortChannelIds b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ReplyShortChannelIdsEnd_free"))) TS_ReplyShortChannelIdsEnd_free(uint64_t this_obj) {
LDKReplyShortChannelIdsEnd this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ReplyShortChannelIdsEnd_eq"))) TS_ReplyShortChannelIdsEnd_eq(uint64_t a, uint64_t b) {
+ LDKReplyShortChannelIdsEnd a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKReplyShortChannelIdsEnd b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_GossipTimestampFilter_free"))) TS_GossipTimestampFilter_free(uint64_t this_obj) {
LDKGossipTimestampFilter this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_GossipTimestampFilter_eq"))) TS_GossipTimestampFilter_eq(uint64_t a, uint64_t b) {
+ LDKGossipTimestampFilter a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKGossipTimestampFilter b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ErrorAction_free"))) TS_ErrorAction_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_CommitmentUpdate_eq"))) TS_CommitmentUpdate_eq(uint64_t a, uint64_t b) {
+ LDKCommitmentUpdate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommitmentUpdate b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ChannelMessageHandler_free"))) TS_ChannelMessageHandler_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomOnionMessageHandler"))) TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(uint64_t this_arg) {
+ LDKIgnoringMessageHandler this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+ *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomMessageReader"))) TS_IgnoringMessageHandler_as_CustomMessageReader(uint64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
PeerManager_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
+uint64_t __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
LDKMessageHandler message_handler_conv;
message_handler_conv.inner = untag_ptr(message_handler);
message_handler_conv.is_owned = ptr_is_owned(message_handler);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_TxCreationKeys_eq"))) TS_TxCreationKeys_eq(uint64_t a, uint64_t b) {
+ LDKTxCreationKeys a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTxCreationKeys b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
uint64_t ret_ref = 0;
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelPublicKeys_eq"))) TS_ChannelPublicKeys_eq(uint64_t a, uint64_t b) {
+ LDKChannelPublicKeys a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelPublicKeys b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_write"))) TS_ChannelPublicKeys_write(uint64_t obj) {
LDKChannelPublicKeys obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_HTLCOutputInCommitment_eq"))) TS_HTLCOutputInCommitment_eq(uint64_t a, uint64_t b) {
+ LDKHTLCOutputInCommitment a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHTLCOutputInCommitment b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_HTLCOutputInCommitment_write"))) TS_HTLCOutputInCommitment_write(uint64_t obj) {
LDKHTLCOutputInCommitment obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_conv;
}
+jboolean __attribute__((export_name("TS_ClosingTransaction_eq"))) TS_ClosingTransaction_eq(uint64_t a, uint64_t b) {
+ LDKClosingTransaction a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKClosingTransaction b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ClosingTransaction_new"))) TS_ClosingTransaction_new(int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, uint64_t funding_outpoint) {
LDKCVec_u8Z to_holder_script_ref;
to_holder_script_ref.datalen = to_holder_script->arr_len;
ChannelTypeFeatures_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_InitFeatures_known_channel_features"))) TS_InitFeatures_known_channel_features() {
- LDKInitFeatures ret_var = InitFeatures_known_channel_features();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_NodeFeatures_known_channel_features"))) TS_NodeFeatures_known_channel_features() {
- LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
uint64_t __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_empty() {
LDKInitFeatures ret_var = InitFeatures_empty();
uint64_t ret_ref = 0;
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_InitFeatures_known"))) TS_InitFeatures_known() {
- LDKInitFeatures ret_var = InitFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_InitFeatures_requires_unknown_bits"))) TS_InitFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_NodeFeatures_known"))) TS_NodeFeatures_known() {
- LDKNodeFeatures ret_var = NodeFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_NodeFeatures_requires_unknown_bits"))) TS_NodeFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKNodeFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelFeatures_known"))) TS_ChannelFeatures_known() {
- LDKChannelFeatures ret_var = ChannelFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_ChannelFeatures_requires_unknown_bits"))) TS_ChannelFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKChannelFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_InvoiceFeatures_known"))) TS_InvoiceFeatures_known() {
- LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_InvoiceFeatures_requires_unknown_bits"))) TS_InvoiceFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKInvoiceFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelTypeFeatures_known"))) TS_ChannelTypeFeatures_known() {
- LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
jboolean __attribute__((export_name("TS_ChannelTypeFeatures_requires_unknown_bits"))) TS_ChannelTypeFeatures_requires_unknown_bits(uint64_t this_arg) {
LDKChannelTypeFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ShutdownScript_eq"))) TS_ShutdownScript_eq(uint64_t a, uint64_t b) {
+ LDKShutdownScript a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKShutdownScript b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_InvalidShutdownScript_free"))) TS_InvalidShutdownScript_free(uint64_t this_obj) {
LDKInvalidShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NetworkUpdate_eq"))) TS_NetworkUpdate_eq(uint64_t a, uint64_t b) {
+ LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+ LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+ jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NetworkUpdate_write"))) TS_NetworkUpdate_write(uint64_t obj) {
LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelUpdateInfo_eq"))) TS_ChannelUpdateInfo_eq(uint64_t a, uint64_t b) {
+ LDKChannelUpdateInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelUpdateInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_ChannelUpdateInfo_write"))) TS_ChannelUpdateInfo_write(uint64_t obj) {
LDKChannelUpdateInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ChannelInfo_eq"))) TS_ChannelInfo_eq(uint64_t a, uint64_t b) {
+ LDKChannelInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_ChannelInfo_get_directional_info"))) TS_ChannelInfo_get_directional_info(uint64_t this_arg, int8_t channel_flags) {
LDKChannelInfo this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAnnouncementInfo_eq"))) TS_NodeAnnouncementInfo_eq(uint64_t a, uint64_t b) {
+ LDKNodeAnnouncementInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAnnouncementInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeAnnouncementInfo_write"))) TS_NodeAnnouncementInfo_write(uint64_t obj) {
LDKNodeAnnouncementInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeAlias_eq"))) TS_NodeAlias_eq(uint64_t a, uint64_t b) {
+ LDKNodeAlias a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeAlias b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeAlias_write"))) TS_NodeAlias_write(uint64_t obj) {
LDKNodeAlias obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t a, uint64_t b) {
+ LDKNodeInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKNodeInfo b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) {
LDKNodeInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
}
-void __attribute__((export_name("TS_NetworkGraph_node_failed"))) TS_NetworkGraph_node_failed(uint64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+void __attribute__((export_name("TS_NetworkGraph_node_failed_permanent"))) TS_NetworkGraph_node_failed_permanent(uint64_t this_arg, int8_tArray node_id) {
LDKNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKPublicKey _node_id_ref;
- CHECK(_node_id->arr_len == 33);
- memcpy(_node_id_ref.compressed_form, _node_id->elems, 33); FREE(_node_id);
- NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
}
-void __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_with_time"))) TS_NetworkGraph_remove_stale_channels_with_time(uint64_t this_arg, int64_t current_time_unix) {
+void __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_and_tracking_with_time"))) TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(uint64_t this_arg, int64_t current_time_unix) {
LDKNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+ NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
}
uint64_t __attribute__((export_name("TS_NetworkGraph_update_channel"))) TS_NetworkGraph_update_channel(uint64_t this_arg, uint64_t msg) {
ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
}
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
int64_t __attribute__((export_name("TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
LDKProbabilisticScoringParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
return ret_ref;
}
+uint64_t __attribute__((export_name("TS_SendError_invalid_message"))) TS_SendError_invalid_message() {
+ LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+ *ret_copy = SendError_invalid_message();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint64_t __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_buffer_full() {
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
*ret_copy = SendError_buffer_full();
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger) {
+jboolean __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) {
+ LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+ LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+ jboolean ret_conv = SendError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CustomOnionMessageHandler_free"))) TS_CustomOnionMessageHandler_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+uint64_t __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger, uint64_t custom_handler) {
void* keys_manager_ptr = untag_ptr(keys_manager);
CHECK_ACCESS(keys_manager_ptr);
LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKLogger_JCalls_cloned(&logger_conv);
}
- LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+ void* custom_handler_ptr = untag_ptr(custom_handler);
+ CHECK_ACCESS(custom_handler_ptr);
+ LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+ if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+ }
+ LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t reply_path) {
+uint64_t __attribute__((export_name("TS_OnionMessenger_send_custom_onion_message"))) TS_OnionMessenger_send_custom_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t msg, uint64_t reply_path) {
LDKOnionMessenger this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_ACCESS(destination_ptr);
LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
// WARNING: we may need a move here but no clone is available for LDKDestination
+ void* msg_ptr = untag_ptr(msg);
+ CHECK_ACCESS(msg_ptr);
+ LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+ if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+ }
LDKBlindedRoute reply_path_conv;
reply_path_conv.inner = untag_ptr(reply_path);
reply_path_conv.is_owned = ptr_is_owned(reply_path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv.is_owned = false;
LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
- *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+ *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_ret, true);
}
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+ LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *ret_ret = CustomOnionMessageContents_clone(arg);
+ return tag_ptr(ret_ret, true);
+}
+int64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone_ptr"))) TS_CustomOnionMessageContents_clone_ptr(uint64_t arg) {
+ void* arg_ptr = untag_ptr(arg);
+ if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+ LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+ int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone"))) TS_CustomOnionMessageContents_clone(uint64_t orig) {
+ void* orig_ptr = untag_ptr(orig);
+ if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+ LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+ LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+void __attribute__((export_name("TS_CustomOnionMessageContents_free"))) TS_CustomOnionMessageContents_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ CustomOnionMessageContents_free(this_ptr_conv);
+}
+
void __attribute__((export_name("TS_RapidGossipSync_free"))) TS_RapidGossipSync_free(uint64_t this_obj) {
LDKRapidGossipSync this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
}
uint64_t __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
- LDKDecodeError a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = DecodeError_clone(&a_conv);
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+ a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
*ret_copy = GraphSyncError_decode_error(a_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ParseError_eq"))) TS_ParseError_eq(uint64_t a, uint64_t b) {
+ LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+ LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+ jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_ParseOrSemanticError_free"))) TS_ParseOrSemanticError_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+jboolean __attribute__((export_name("TS_ParseOrSemanticError_eq"))) TS_ParseOrSemanticError_eq(uint64_t a, uint64_t b) {
+ LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+ LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+ jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_Invoice_free"))) TS_Invoice_free(uint64_t this_obj) {
LDKInvoice this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
}
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
LDKCurrency network_conv = LDKCurrency_from_js(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
description_hash_conv = Sha256_clone(&description_hash_conv);
LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
}
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
LDKCurrency network_conv = LDKCurrency_from_js(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
LDKStr description_conv = str_ref_to_owned_c(description);
LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+ *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
return tag_ptr(ret_conv, true);
}
for (var i = 0; i < iovec_array_len; i++) {
const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
console.log("[fd " + fd + "]: " + String.fromCharCode(...bytes_view));
- bytes_written += ptr_len_view[i*2+1];
+ bytes_written += ptr_len_view[i*2+1]!;
}
const written_view = new Uint32Array(wasm.memory.buffer, bytes_written_ptr, 1);
written_view[0] = bytes_written;
out_len_view[0] = 0;
return 0;
},
- "environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
+ "environ_get": (_environ_ptr: number, _environ_buf_ptr: number) => {
// This is called before fd_write to format + print panic messages,
// but only if we have variables in environ_sizes_get, so shouldn't ever actually happen!
console.log("wasi_snapshot_preview1:environ_get");
export function uint5ArrToBytes(inputArray: Array<UInt5>): Uint8Array {
const arr = new Uint8Array(inputArray.length);
for (var i = 0; i < inputArray.length; i++) {
- arr[i] = inputArray[i].getVal();
+ arr[i] = inputArray[i]!.getVal();
}
return arr;
}
export function WitnessVersionArrToBytes(inputArray: Array<WitnessVersion>): Uint8Array {
const arr = new Uint8Array(inputArray.length);
for (var i = 0; i < inputArray.length; i++) {
- arr[i] = inputArray[i].getVal();
+ arr[i] = inputArray[i]!.getVal();
}
return arr;
}
/* @internal */
-export function encodeUint8Array (inputArray: Uint8Array): number {
+export function encodeUint8Array (inputArray: Uint8Array|null): number {
+ if (inputArray == null) return 0;
const cArrayPointer = wasm.TS_malloc(inputArray.length + 8);
const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
arrayLengthView[0] = BigInt(inputArray.length);
return cArrayPointer;
}
/* @internal */
-export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
+export function encodeUint32Array (inputArray: Uint32Array|Array<number>|null): number {
+ if (inputArray == null) return 0;
const cArrayPointer = wasm.TS_malloc((inputArray.length + 2) * 4);
const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
arrayLengthView[0] = BigInt(inputArray.length);
return cArrayPointer;
}
/* @internal */
-export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
+export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>|null): number {
+ if (inputArray == null) return 0;
const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 8);
const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, inputArray.length + 1);
arrayMemoryView[0] = BigInt(inputArray.length);
}
/* @internal */
-export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
- if (arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
+export function check_arr_len(arr: Uint8Array|null, len: number): Uint8Array|null {
+ if (arr !== null && arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
return arr;
}
/* @internal */
export function getArrayLength(arrayPointer: number): number {
const arraySizeViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer, 1);
- const len = arraySizeViewer[0];
+ const len = arraySizeViewer[0]!;
if (len >= (2n ** 32n)) throw new Error("Bogus Array Size");
return Number(len % (2n ** 32n));
}
/* @internal */
export function getU64ArrayElem(arrayPointer: number, idx: number): bigint {
const actualArrayViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
- return actualArrayViewer[idx];
+ return actualArrayViewer[idx]!;
}
/* @internal */
export function getU32ArrayElem(arrayPointer: number, idx: number): number {
const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
- return actualArrayViewer[idx];
+ return actualArrayViewer[idx]!;
}
/* @internal */
export function getU8ArrayElem(arrayPointer: number, idx: number): number {
const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
- return actualArrayViewer[idx];
+ return actualArrayViewer[idx]!;
}
}
/**
- * An error enum representing a failure to persist a channel monitor update.
+ * An enum representing the status of a channel monitor update persistence.
*/
-export enum ChannelMonitorUpdateErr {
+export enum ChannelMonitorUpdateStatus {
+ /**
+ * The update has been durably persisted and all copies of the relevant [`ChannelMonitor`]
+ have been updated.
+
+ This includes performing any `fsync()` calls required to ensure the update is guaranteed to
+ be available on restart even if the application crashes.
+ */
+ LDKChannelMonitorUpdateStatus_Completed,
/**
* Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
our state failed, but is expected to succeed at some point in the future).
Such a failure will \"freeze\" a channel, preventing us from revoking old states or
- submitting new commitment transactions to the counterparty. Once the update(s) that failed
- have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
- via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
- operational state.
+ submitting new commitment transactions to the counterparty. Once the update(s) which failed
+ have been successfully applied, a [`MonitorEvent::Completed`] can be used to restore the
+ channel to an operational state.
- Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
- you return a TemporaryFailure you must ensure that it is written to disk safely before
- writing out the latest ChannelManager state.
+ Note that a given [`ChannelManager`] will *never* re-generate a [`ChannelMonitorUpdate`].
+ If you return this error you must ensure that it is written to disk safely before writing
+ the latest [`ChannelManager`] state, or you should return [`PermanentFailure`] instead.
- Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
- (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
- to claim it on this channel) and those updates must be applied wherever they can be. At
- least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
- be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
- the channel which would invalidate previous ChannelMonitors are not made when a channel has
- been \"frozen\".
+ Even when a channel has been \"frozen\", updates to the [`ChannelMonitor`] can continue to
+ occur (e.g. if an inbound HTLC which we forwarded was claimed upstream, resulting in us
+ attempting to claim it on this channel) and those updates must still be persisted.
- Note that even if updates made after TemporaryFailure succeed you must still provide a
- [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
- normal channel operation. Note that this is normally generated through a call to
- [`ChainMonitor::channel_monitor_updated`].
-
- Note that the update being processed here will not be replayed for you when you return a
- [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
- you must store the update itself on your own local disk prior to returning a
- TemporaryFailure. You may, of course, employ a journaling approach, storing only the
- ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
- reload-time.
+ No updates to the channel will be made which could invalidate other [`ChannelMonitor`]s
+ until a [`MonitorEvent::Completed`] is provided, even if you return no error on a later
+ monitor update for the same channel.
For deployments where a copy of ChannelMonitors and other local state are backed up in a
remote location (with local copies persisted immediately), it is anticipated that all
- updates will return TemporaryFailure until the remote copies could be updated.
+ updates will return [`InProgress`] until the remote copies could be updated.
- [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
+ [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+ [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
+ [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
- LDKChannelMonitorUpdateErr_TemporaryFailure,
+ LDKChannelMonitorUpdateStatus_InProgress,
/**
- * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
- different watchtower and cannot update with all watchtowers that were previously informed
- of this channel).
+ * Used to indicate no further channel monitor updates will be allowed (likely a disk failure
+ or a remote copy of this [`ChannelMonitor`] is no longer reachable and thus not updatable).
+
+ When this is returned, [`ChannelManager`] will force-close the channel but *not* broadcast
+ our current commitment transaction. This avoids a dangerous case where a local disk failure
+ (e.g. the Linux-default remounting of the disk as read-only) causes [`PermanentFailure`]s
+ for all monitor updates. If we were to broadcast our latest commitment transaction and then
+ restart, we could end up reading a previous [`ChannelMonitor`] and [`ChannelManager`],
+ revoking our now-broadcasted state before seeing it confirm and losing all our funds.
+
+ Note that this is somewhat of a tradeoff - if the disk is really gone and we may have lost
+ the data permanently, we really should broadcast immediately. If the data can be recovered
+ with manual intervention, we'd rather close the channel, rejecting future updates to it,
+ and broadcast the latest state only if we have HTLCs to claim which are timing out (which
+ we do as long as blocks are connected).
- At reception of this error, ChannelManager will force-close the channel and return at
- least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
- least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
- update must be rejected.
+ In order to broadcast the latest local commitment transaction, you'll need to call
+ [`ChannelMonitor::get_latest_holder_commitment_txn`] and broadcast the resulting
+ transactions once you've safely ensured no further channel updates can be generated by your
+ [`ChannelManager`].
- This failure may also signal a failure to update the local persisted copy of one of
- the channel monitor instance.
+ Note that at least one final [`ChannelMonitorUpdate`] may still be provided, which must
+ still be processed by a running [`ChannelMonitor`]. This final update will mark the
+ [`ChannelMonitor`] as finalized, ensuring no further updates (e.g. revocation of the latest
+ commitment transaction) are allowed.
- Note that even when you fail a holder commitment transaction update, you must store the
- update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
- broadcasts it (e.g distributed channel-monitor deployment)
+ Note that even if you return a [`PermanentFailure`] due to unavailability of secondary
+ [`ChannelMonitor`] copies, you should still make an attempt to store the update where
+ possible to ensure you can claim HTLC outputs on the latest commitment transaction
+ broadcasted later.
In case of distributed watchtowers deployment, the new version must be written to disk, as
state may have been stored but rejected due to a block forcing a commitment broadcast. This
storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
lagging behind on block processing.
+
+ [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+ [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
- LDKChannelMonitorUpdateErr_PermanentFailure,
+ LDKChannelMonitorUpdateStatus_PermanentFailure,
}
}
const nativeResponseValue = wasm.TS_CResult_BlindedRouteNoneZ_get_err(owner);
// debug statements here
+}
+/* @internal */
+export class LDKDecodeError {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKDecodeError_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKDecodeError_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKDecodeError_Io_get_io(ptr: bigint): IOError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKDecodeError_Io_get_io(ptr);
+ return nativeResponseValue;
}
// struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner);
/* @internal */
}
const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
return nativeResponseValue;
-}
- // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: bigint): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
- // debug statements here
-}
- // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: bigint): ChannelMonitorUpdateErr {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
- return nativeResponseValue;
}
/* @internal */
export class LDKMonitorEvent {
return nativeResponseValue;
}
/* @internal */
-export function LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr: bigint): bigint {
+export function LDKMonitorEvent_Completed_get_funding_txo(ptr: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
+ const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_funding_txo(ptr);
return nativeResponseValue;
}
/* @internal */
-export function LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr: bigint): bigint {
+export function LDKMonitorEvent_Completed_get_monitor_update_id(ptr: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
+ const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_monitor_update_id(ptr);
return nativeResponseValue;
}
/* @internal */
}
const nativeResponseValue = wasm.TS_CResult_SecretKeyNoneZ_get_err(owner);
// debug statements here
+}
+ // struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_PublicKeyNoneZ_get_ok(owner: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_get_ok(owner);
+ return nativeResponseValue;
+}
+ // void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_PublicKeyNoneZ_get_err(owner: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_get_err(owner);
+ // debug statements here
}
/* @internal */
export class LDKCOption_ScalarZ {
sign_justice_revoked_htlc (justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: bigint): bigint;
sign_counterparty_htlc_transaction (htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: bigint): bigint;
sign_closing_transaction (closing_tx: bigint): bigint;
+ sign_holder_anchor_input (anchor_tx: number, input: number): bigint;
sign_channel_announcement (msg: bigint): bigint;
ready_channel (channel_parameters: bigint): void;
}
}
const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
return nativeResponseValue;
+}
+ // LDKCResult_SignatureNoneZ BaseSign_sign_holder_anchor_input LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction anchor_tx, uintptr_t input
+/* @internal */
+export function BaseSign_sign_holder_anchor_input(this_arg: bigint, anchor_tx: number, input: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BaseSign_sign_holder_anchor_input(this_arg, anchor_tx, input);
+ return nativeResponseValue;
}
// LDKCResult_C2Tuple_SignatureSignatureZNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
/* @internal */
}
/* @internal */
export interface LDKWatch {
- watch_channel (funding_txo: bigint, monitor: bigint): bigint;
- update_channel (funding_txo: bigint, update: bigint): bigint;
+ watch_channel (funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus;
+ update_channel (funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus;
release_pending_monitor_events (): number;
}
js_objs[i] = new WeakRef(impl);
return [wasm.TS_LDKWatch_new(i), i];
}
- // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
+ // LDKChannelMonitorUpdateStatus Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
/* @internal */
-export function Watch_watch_channel(this_arg: bigint, funding_txo: bigint, monitor: bigint): bigint {
+export function Watch_watch_channel(this_arg: bigint, funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
return nativeResponseValue;
}
- // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
+ // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
/* @internal */
-export function Watch_update_channel(this_arg: bigint, funding_txo: bigint, update: bigint): bigint {
+export function Watch_update_channel(this_arg: bigint, funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
/* @internal */
export interface LDKKeysInterface {
get_node_secret (recipient: Recipient): bigint;
+ get_node_id (recipient: Recipient): bigint;
ecdh (recipient: Recipient, other_key: number, tweak: bigint): bigint;
get_destination_script (): number;
get_shutdown_scriptpubkey (): bigint;
}
const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg, recipient);
return nativeResponseValue;
+}
+ // LDKCResult_PublicKeyNoneZ KeysInterface_get_node_id LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient
+/* @internal */
+export function KeysInterface_get_node_id(this_arg: bigint, recipient: Recipient): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysInterface_get_node_id(this_arg, recipient);
+ return nativeResponseValue;
}
// LDKCResult_SharedSecretNoneZ KeysInterface_ecdh LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak
/* @internal */
return nativeResponseValue;
}
/* @internal */
+export interface LDKCustomOnionMessageContents {
+ tlv_type (): bigint;
+ write (): number;
+}
+
+/* @internal */
+export function LDKCustomOnionMessageContents_new(impl: LDKCustomOnionMessageContents): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCustomOnionMessageContents_new(i), i];
+}
+ // uint64_t CustomOnionMessageContents_tlv_type LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+/* @internal */
+export function CustomOnionMessageContents_tlv_type(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_tlv_type(this_arg);
+ return nativeResponseValue;
+}
+ // LDKCVec_u8Z CustomOnionMessageContents_write LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+/* @internal */
+export function CustomOnionMessageContents_write(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_write(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKCOption_CustomOnionMessageContentsZ {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner);
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner);
+ return nativeResponseValue;
+}
+/* @internal */
export class LDKCOption_NetAddressZ {
protected constructor() {}
}
}
/* @internal */
export interface LDKPersist {
- persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): bigint;
- update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint;
+ persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
+ update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
}
/* @internal */
js_objs[i] = new WeakRef(impl);
return [wasm.TS_LDKPersist_new(i), i];
}
- // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
/* @internal */
-export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): bigint {
+export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
return nativeResponseValue;
}
- // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
/* @internal */
-export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint {
+export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
handle_update_fee (their_node_id: number, msg: bigint): void;
handle_announcement_signatures (their_node_id: number, msg: bigint): void;
peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
- peer_connected (their_node_id: number, msg: bigint): void;
+ peer_connected (their_node_id: number, msg: bigint): bigint;
handle_channel_reestablish (their_node_id: number, msg: bigint): void;
handle_channel_update (their_node_id: number, msg: bigint): void;
handle_error (their_node_id: number, msg: bigint): void;
const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, their_node_id, no_connection_possible);
// debug statements here
}
- // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
+ // LDKCResult_NoneNoneZ ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
/* @internal */
-export function ChannelMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, msg: bigint): void {
+export function ChannelMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, their_node_id, msg);
- // debug statements here
+ return nativeResponseValue;
}
// void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
/* @internal */
handle_channel_update (msg: bigint): bigint;
get_next_channel_announcement (starting_point: bigint): bigint;
get_next_node_announcement (starting_point: number): bigint;
- peer_connected (their_node_id: number, init: bigint): void;
+ peer_connected (their_node_id: number, init: bigint): bigint;
handle_reply_channel_range (their_node_id: number, msg: bigint): bigint;
handle_reply_short_channel_ids_end (their_node_id: number, msg: bigint): bigint;
handle_query_channel_range (their_node_id: number, msg: bigint): bigint;
const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcement(this_arg, starting_point);
return nativeResponseValue;
}
- // void RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+ // LDKCResult_NoneNoneZ RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
/* @internal */
-export function RoutingMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): void {
+export function RoutingMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_RoutingMessageHandler_peer_connected(this_arg, their_node_id, init);
- // debug statements here
+ return nativeResponseValue;
}
// LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
/* @internal */
/* @internal */
export interface LDKOnionMessageHandler {
handle_onion_message (peer_node_id: number, msg: bigint): void;
- peer_connected (their_node_id: number, init: bigint): void;
+ peer_connected (their_node_id: number, init: bigint): bigint;
peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
provided_node_features (): bigint;
provided_init_features (their_node_id: number): bigint;
const nativeResponseValue = wasm.TS_OnionMessageHandler_handle_onion_message(this_arg, peer_node_id, msg);
// debug statements here
}
- // void OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+ // LDKCResult_NoneNoneZ OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
/* @internal */
-export function OnionMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): void {
+export function OnionMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_OnionMessageHandler_peer_connected(this_arg, their_node_id, init);
- // debug statements here
+ return nativeResponseValue;
}
// void OnionMessageHandler_peer_disconnected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
/* @internal */
return nativeResponseValue;
}
/* @internal */
+export interface LDKCustomOnionMessageHandler {
+ handle_custom_message (msg: bigint): void;
+ read_custom_message (message_type: bigint, buffer: number): bigint;
+}
+
+/* @internal */
+export function LDKCustomOnionMessageHandler_new(impl: LDKCustomOnionMessageHandler): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCustomOnionMessageHandler_new(i), i];
+}
+ // void CustomOnionMessageHandler_handle_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, struct LDKCustomOnionMessageContents msg
+/* @internal */
+export function CustomOnionMessageHandler_handle_custom_message(this_arg: bigint, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_handle_custom_message(this_arg, msg);
+ // debug statements here
+}
+ // LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CustomOnionMessageHandler_read_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, uint64_t message_type, struct LDKu8slice buffer
+/* @internal */
+export function CustomOnionMessageHandler_read_custom_message(this_arg: bigint, message_type: bigint, buffer: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_read_custom_message(this_arg, message_type, buffer);
+ return nativeResponseValue;
+}
+/* @internal */
export interface LDKSocketDescriptor {
send_data (data: number, resume_read: boolean): number;
disconnect_socket (): void;
}
const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
// debug statements here
-}
- // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_ok(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
- return nativeResponseValue;
-}
- // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
- return nativeResponseValue;
-}
- // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: bigint): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
- return nativeResponseValue;
-}
- // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: bigint): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
- // debug statements here
-}
- // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: bigint): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
- return nativeResponseValue;
-}
- // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: bigint): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
- return nativeResponseValue;
}
// void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
/* @internal */
}
const nativeResponseValue = wasm.TS_CResult_SecretKeyNoneZ_clone(orig);
return nativeResponseValue;
+}
+ // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_ok(struct LDKPublicKey o);
+/* @internal */
+export function CResult_PublicKeyNoneZ_ok(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_err(void);
+/* @internal */
+export function CResult_PublicKeyNoneZ_err(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_err();
+ return nativeResponseValue;
+}
+ // bool CResult_PublicKeyNoneZ_is_ok(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_PublicKeyNoneZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_PublicKeyNoneZ_free(struct LDKCResult_PublicKeyNoneZ _res);
+/* @internal */
+export function CResult_PublicKeyNoneZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_PublicKeyNoneZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_clone(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_PublicKeyNoneZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_clone(orig);
+ return nativeResponseValue;
}
// struct LDKCOption_ScalarZ COption_ScalarZ_some(struct LDKBigEndianScalar o);
/* @internal */
}
const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
// debug statements here
+}
+ // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_some(struct LDKCustomOnionMessageContents o);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_some(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_none(void);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_none();
+ return nativeResponseValue;
+}
+ // void COption_CustomOnionMessageContentsZ_free(struct LDKCOption_CustomOnionMessageContentsZ _res);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_free(_res);
+ // debug statements here
+}
+ // uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_clone(const struct LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(struct LDKCOption_CustomOnionMessageContentsZ o);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
}
// struct LDKCOption_NetAddressZ COption_NetAddressZ_some(struct LDKNetAddress o);
/* @internal */
}
const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
return nativeResponseValue;
+}
+ // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
+/* @internal */
+export function ClosureReason_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_HTLCDestination_failed_payment(payment_hash);
return nativeResponseValue;
+}
+ // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
+/* @internal */
+export function HTLCDestination_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
/* @internal */
const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
return nativeResponseValue;
}
- // struct LDKAPIError APIError_monitor_update_failed(void);
+ // struct LDKAPIError APIError_monitor_update_in_progress(void);
/* @internal */
-export function APIError_monitor_update_failed(): bigint {
+export function APIError_monitor_update_in_progress(): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
+ const nativeResponseValue = wasm.TS_APIError_monitor_update_in_progress();
return nativeResponseValue;
}
// struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
}
const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
return nativeResponseValue;
+}
+ // bool APIError_eq(const struct LDKAPIError *NONNULL_PTR a, const struct LDKAPIError *NONNULL_PTR b);
+/* @internal */
+export function APIError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_APIError_eq(a, b);
+ return nativeResponseValue;
}
// void BigSize_free(struct LDKBigSize this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_Hostname_clone(orig);
return nativeResponseValue;
+}
+ // bool Hostname_eq(const struct LDKHostname *NONNULL_PTR a, const struct LDKHostname *NONNULL_PTR b);
+/* @internal */
+export function Hostname_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Hostname_eq(a, b);
+ return nativeResponseValue;
}
// MUST_USE_RES uint8_t Hostname_len(const struct LDKHostname *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelConfig_eq(const struct LDKChannelConfig *NONNULL_PTR a, const struct LDKChannelConfig *NONNULL_PTR b);
+/* @internal */
+export function ChannelConfig_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelConfig_eq(a, b);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
/* @internal */
}
const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
return nativeResponseValue;
+}
+ // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b);
+/* @internal */
+export function BestBlock_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BestBlock_eq(a, b);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
/* @internal */
const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
// debug statements here
}
- // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
+ // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_clone(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR orig);
+/* @internal */
+export function ChannelMonitorUpdateStatus_clone(orig: bigint): ChannelMonitorUpdateStatus {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_completed(void);
+/* @internal */
+export function ChannelMonitorUpdateStatus_completed(): ChannelMonitorUpdateStatus {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_completed();
+ return nativeResponseValue;
+}
+ // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_in_progress(void);
/* @internal */
-export function ChannelMonitorUpdateErr_clone(orig: bigint): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_in_progress(): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
+ const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_in_progress();
return nativeResponseValue;
}
- // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
+ // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_permanent_failure(void);
/* @internal */
-export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_permanent_failure(): ChannelMonitorUpdateStatus {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
+ const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_permanent_failure();
return nativeResponseValue;
}
- // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
+ // bool ChannelMonitorUpdateStatus_eq(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR a, const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR b);
/* @internal */
-export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_eq(a: bigint, b: bigint): boolean {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
+ const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_eq(a, b);
return nativeResponseValue;
}
// void Watch_free(struct LDKWatch this_ptr);
}
const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
return nativeResponseValue;
+}
+ // bool WatchedOutput_eq(const struct LDKWatchedOutput *NONNULL_PTR a, const struct LDKWatchedOutput *NONNULL_PTR b);
+/* @internal */
+export function WatchedOutput_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WatchedOutput_eq(a, b);
+ return nativeResponseValue;
}
// uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
/* @internal */
const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
return nativeResponseValue;
}
- // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
+ // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
/* @internal */
-export function MonitorEvent_update_completed(funding_txo: bigint, monitor_update_id: bigint): bigint {
+export function MonitorEvent_completed(funding_txo: bigint, monitor_update_id: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
+ const nativeResponseValue = wasm.TS_MonitorEvent_completed(funding_txo, monitor_update_id);
return nativeResponseValue;
}
// struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
}
const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
return nativeResponseValue;
+}
+ // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b);
+/* @internal */
+export function MonitorEvent_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MonitorEvent_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
return nativeResponseValue;
+}
+ // bool HTLCUpdate_eq(const struct LDKHTLCUpdate *NONNULL_PTR a, const struct LDKHTLCUpdate *NONNULL_PTR b);
+/* @internal */
+export function HTLCUpdate_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCUpdate_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
return nativeResponseValue;
+}
+ // bool DelayedPaymentOutputDescriptor_eq(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function DelayedPaymentOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
return nativeResponseValue;
+}
+ // bool StaticPaymentOutputDescriptor_eq(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function StaticPaymentOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
return nativeResponseValue;
+}
+ // bool SpendableOutputDescriptor_eq(const struct LDKSpendableOutputDescriptor *NONNULL_PTR a, const struct LDKSpendableOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function SpendableOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
return nativeResponseValue;
+}
+ // struct LDKNodeFeatures provided_node_features(void);
+/* @internal */
+export function provided_node_features(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_provided_node_features();
+ return nativeResponseValue;
+}
+ // struct LDKChannelFeatures provided_channel_features(void);
+/* @internal */
+export function provided_channel_features(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_provided_channel_features();
+ return nativeResponseValue;
+}
+ // struct LDKInitFeatures provided_init_features(void);
+/* @internal */
+export function provided_init_features(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_provided_init_features();
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj);
/* @internal */
const nativeResponseValue = wasm.TS_create_from_hash(keys, min_value_msat, payment_hash, invoice_expiry_delta_secs, current_time);
return nativeResponseValue;
}
- // void DecodeError_free(struct LDKDecodeError this_obj);
+ // void DecodeError_free(struct LDKDecodeError this_ptr);
/* @internal */
-export function DecodeError_free(this_obj: bigint): void {
+export function DecodeError_free(this_ptr: bigint): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
+ const nativeResponseValue = wasm.TS_DecodeError_free(this_ptr);
// debug statements here
}
// uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
}
const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_unknown_version(void);
+/* @internal */
+export function DecodeError_unknown_version(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_unknown_version();
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_unknown_required_feature(void);
+/* @internal */
+export function DecodeError_unknown_required_feature(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_unknown_required_feature();
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_invalid_value(void);
+/* @internal */
+export function DecodeError_invalid_value(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_invalid_value();
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_short_read(void);
+/* @internal */
+export function DecodeError_short_read(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_short_read();
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_bad_length_descriptor(void);
+/* @internal */
+export function DecodeError_bad_length_descriptor(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_bad_length_descriptor();
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_io(enum LDKIOError a);
+/* @internal */
+export function DecodeError_io(a: IOError): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_io(a);
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError DecodeError_unsupported_compression(void);
+/* @internal */
+export function DecodeError_unsupported_compression(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_unsupported_compression();
+ return nativeResponseValue;
+}
+ // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b);
+/* @internal */
+export function DecodeError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DecodeError_eq(a, b);
+ return nativeResponseValue;
}
// void Init_free(struct LDKInit this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_Init_clone(orig);
return nativeResponseValue;
+}
+ // bool Init_eq(const struct LDKInit *NONNULL_PTR a, const struct LDKInit *NONNULL_PTR b);
+/* @internal */
+export function Init_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Init_eq(a, b);
+ return nativeResponseValue;
}
// void ErrorMessage_free(struct LDKErrorMessage this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
return nativeResponseValue;
+}
+ // bool ErrorMessage_eq(const struct LDKErrorMessage *NONNULL_PTR a, const struct LDKErrorMessage *NONNULL_PTR b);
+/* @internal */
+export function ErrorMessage_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ErrorMessage_eq(a, b);
+ return nativeResponseValue;
}
// void WarningMessage_free(struct LDKWarningMessage this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_WarningMessage_clone(orig);
return nativeResponseValue;
+}
+ // bool WarningMessage_eq(const struct LDKWarningMessage *NONNULL_PTR a, const struct LDKWarningMessage *NONNULL_PTR b);
+/* @internal */
+export function WarningMessage_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WarningMessage_eq(a, b);
+ return nativeResponseValue;
}
// void Ping_free(struct LDKPing this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_Ping_clone(orig);
return nativeResponseValue;
+}
+ // bool Ping_eq(const struct LDKPing *NONNULL_PTR a, const struct LDKPing *NONNULL_PTR b);
+/* @internal */
+export function Ping_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Ping_eq(a, b);
+ return nativeResponseValue;
}
// void Pong_free(struct LDKPong this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_Pong_clone(orig);
return nativeResponseValue;
+}
+ // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
+/* @internal */
+export function Pong_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Pong_eq(a, b);
+ return nativeResponseValue;
}
// void OpenChannel_free(struct LDKOpenChannel this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
return nativeResponseValue;
+}
+ // bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b);
+/* @internal */
+export function OpenChannel_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OpenChannel_eq(a, b);
+ return nativeResponseValue;
}
// void AcceptChannel_free(struct LDKAcceptChannel this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
return nativeResponseValue;
+}
+ // bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct LDKAcceptChannel *NONNULL_PTR b);
+/* @internal */
+export function AcceptChannel_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AcceptChannel_eq(a, b);
+ return nativeResponseValue;
}
// void FundingCreated_free(struct LDKFundingCreated this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
return nativeResponseValue;
+}
+ // bool FundingCreated_eq(const struct LDKFundingCreated *NONNULL_PTR a, const struct LDKFundingCreated *NONNULL_PTR b);
+/* @internal */
+export function FundingCreated_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FundingCreated_eq(a, b);
+ return nativeResponseValue;
}
// void FundingSigned_free(struct LDKFundingSigned this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
return nativeResponseValue;
+}
+ // bool FundingSigned_eq(const struct LDKFundingSigned *NONNULL_PTR a, const struct LDKFundingSigned *NONNULL_PTR b);
+/* @internal */
+export function FundingSigned_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FundingSigned_eq(a, b);
+ return nativeResponseValue;
}
// void ChannelReady_free(struct LDKChannelReady this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelReady_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelReady_eq(const struct LDKChannelReady *NONNULL_PTR a, const struct LDKChannelReady *NONNULL_PTR b);
+/* @internal */
+export function ChannelReady_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelReady_eq(a, b);
+ return nativeResponseValue;
}
// void Shutdown_free(struct LDKShutdown this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
return nativeResponseValue;
+}
+ // bool Shutdown_eq(const struct LDKShutdown *NONNULL_PTR a, const struct LDKShutdown *NONNULL_PTR b);
+/* @internal */
+export function Shutdown_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Shutdown_eq(a, b);
+ return nativeResponseValue;
}
// void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
return nativeResponseValue;
+}
+ // bool ClosingSignedFeeRange_eq(const struct LDKClosingSignedFeeRange *NONNULL_PTR a, const struct LDKClosingSignedFeeRange *NONNULL_PTR b);
+/* @internal */
+export function ClosingSignedFeeRange_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_eq(a, b);
+ return nativeResponseValue;
}
// void ClosingSigned_free(struct LDKClosingSigned this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
return nativeResponseValue;
+}
+ // bool ClosingSigned_eq(const struct LDKClosingSigned *NONNULL_PTR a, const struct LDKClosingSigned *NONNULL_PTR b);
+/* @internal */
+export function ClosingSigned_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosingSigned_eq(a, b);
+ return nativeResponseValue;
}
// void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
return nativeResponseValue;
+}
+ // bool UpdateAddHTLC_eq(const struct LDKUpdateAddHTLC *NONNULL_PTR a, const struct LDKUpdateAddHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateAddHTLC_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UpdateAddHTLC_eq(a, b);
+ return nativeResponseValue;
}
// void OnionMessage_free(struct LDKOnionMessage this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_OnionMessage_clone(orig);
return nativeResponseValue;
+}
+ // bool OnionMessage_eq(const struct LDKOnionMessage *NONNULL_PTR a, const struct LDKOnionMessage *NONNULL_PTR b);
+/* @internal */
+export function OnionMessage_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessage_eq(a, b);
+ return nativeResponseValue;
}
// void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
return nativeResponseValue;
+}
+ // bool UpdateFulfillHTLC_eq(const struct LDKUpdateFulfillHTLC *NONNULL_PTR a, const struct LDKUpdateFulfillHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFulfillHTLC_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_eq(a, b);
+ return nativeResponseValue;
}
// void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
return nativeResponseValue;
+}
+ // bool UpdateFailHTLC_eq(const struct LDKUpdateFailHTLC *NONNULL_PTR a, const struct LDKUpdateFailHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFailHTLC_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UpdateFailHTLC_eq(a, b);
+ return nativeResponseValue;
}
// void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
return nativeResponseValue;
+}
+ // bool UpdateFailMalformedHTLC_eq(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR a, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFailMalformedHTLC_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_eq(a, b);
+ return nativeResponseValue;
}
// void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
return nativeResponseValue;
+}
+ // bool CommitmentSigned_eq(const struct LDKCommitmentSigned *NONNULL_PTR a, const struct LDKCommitmentSigned *NONNULL_PTR b);
+/* @internal */
+export function CommitmentSigned_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CommitmentSigned_eq(a, b);
+ return nativeResponseValue;
}
// void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
return nativeResponseValue;
+}
+ // bool RevokeAndACK_eq(const struct LDKRevokeAndACK *NONNULL_PTR a, const struct LDKRevokeAndACK *NONNULL_PTR b);
+/* @internal */
+export function RevokeAndACK_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RevokeAndACK_eq(a, b);
+ return nativeResponseValue;
}
// void UpdateFee_free(struct LDKUpdateFee this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
return nativeResponseValue;
+}
+ // bool UpdateFee_eq(const struct LDKUpdateFee *NONNULL_PTR a, const struct LDKUpdateFee *NONNULL_PTR b);
+/* @internal */
+export function UpdateFee_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UpdateFee_eq(a, b);
+ return nativeResponseValue;
}
// void DataLossProtect_free(struct LDKDataLossProtect this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
return nativeResponseValue;
+}
+ // bool DataLossProtect_eq(const struct LDKDataLossProtect *NONNULL_PTR a, const struct LDKDataLossProtect *NONNULL_PTR b);
+/* @internal */
+export function DataLossProtect_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DataLossProtect_eq(a, b);
+ return nativeResponseValue;
}
// void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelReestablish_eq(const struct LDKChannelReestablish *NONNULL_PTR a, const struct LDKChannelReestablish *NONNULL_PTR b);
+/* @internal */
+export function ChannelReestablish_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelReestablish_eq(a, b);
+ return nativeResponseValue;
}
// void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
return nativeResponseValue;
+}
+ // bool AnnouncementSignatures_eq(const struct LDKAnnouncementSignatures *NONNULL_PTR a, const struct LDKAnnouncementSignatures *NONNULL_PTR b);
+/* @internal */
+export function AnnouncementSignatures_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnnouncementSignatures_eq(a, b);
+ return nativeResponseValue;
}
// void NetAddress_free(struct LDKNetAddress this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_NetAddress_hostname(hostname, port);
return nativeResponseValue;
+}
+ // bool NetAddress_eq(const struct LDKNetAddress *NONNULL_PTR a, const struct LDKNetAddress *NONNULL_PTR b);
+/* @internal */
+export function NetAddress_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NetAddress_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
return nativeResponseValue;
+}
+ // bool UnsignedNodeAnnouncement_eq(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR a, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function UnsignedNodeAnnouncement_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_eq(a, b);
+ return nativeResponseValue;
}
// void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
return nativeResponseValue;
+}
+ // bool NodeAnnouncement_eq(const struct LDKNodeAnnouncement *NONNULL_PTR a, const struct LDKNodeAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function NodeAnnouncement_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAnnouncement_eq(a, b);
+ return nativeResponseValue;
}
// void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
return nativeResponseValue;
+}
+ // bool UnsignedChannelAnnouncement_eq(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR a, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function UnsignedChannelAnnouncement_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_eq(a, b);
+ return nativeResponseValue;
}
// void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelAnnouncement_eq(const struct LDKChannelAnnouncement *NONNULL_PTR a, const struct LDKChannelAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function ChannelAnnouncement_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelAnnouncement_eq(a, b);
+ return nativeResponseValue;
}
// void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
return nativeResponseValue;
+}
+ // bool UnsignedChannelUpdate_eq(const struct LDKUnsignedChannelUpdate *NONNULL_PTR a, const struct LDKUnsignedChannelUpdate *NONNULL_PTR b);
+/* @internal */
+export function UnsignedChannelUpdate_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_eq(a, b);
+ return nativeResponseValue;
}
// void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelUpdate_eq(const struct LDKChannelUpdate *NONNULL_PTR a, const struct LDKChannelUpdate *NONNULL_PTR b);
+/* @internal */
+export function ChannelUpdate_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUpdate_eq(a, b);
+ return nativeResponseValue;
}
// void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
return nativeResponseValue;
+}
+ // bool QueryChannelRange_eq(const struct LDKQueryChannelRange *NONNULL_PTR a, const struct LDKQueryChannelRange *NONNULL_PTR b);
+/* @internal */
+export function QueryChannelRange_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_QueryChannelRange_eq(a, b);
+ return nativeResponseValue;
}
// void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
return nativeResponseValue;
+}
+ // bool ReplyChannelRange_eq(const struct LDKReplyChannelRange *NONNULL_PTR a, const struct LDKReplyChannelRange *NONNULL_PTR b);
+/* @internal */
+export function ReplyChannelRange_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReplyChannelRange_eq(a, b);
+ return nativeResponseValue;
}
// void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
return nativeResponseValue;
+}
+ // bool QueryShortChannelIds_eq(const struct LDKQueryShortChannelIds *NONNULL_PTR a, const struct LDKQueryShortChannelIds *NONNULL_PTR b);
+/* @internal */
+export function QueryShortChannelIds_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_QueryShortChannelIds_eq(a, b);
+ return nativeResponseValue;
}
// void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
return nativeResponseValue;
+}
+ // bool ReplyShortChannelIdsEnd_eq(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR a, const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR b);
+/* @internal */
+export function ReplyShortChannelIdsEnd_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_eq(a, b);
+ return nativeResponseValue;
}
// void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
return nativeResponseValue;
+}
+ // bool GossipTimestampFilter_eq(const struct LDKGossipTimestampFilter *NONNULL_PTR a, const struct LDKGossipTimestampFilter *NONNULL_PTR b);
+/* @internal */
+export function GossipTimestampFilter_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GossipTimestampFilter_eq(a, b);
+ return nativeResponseValue;
}
// void ErrorAction_free(struct LDKErrorAction this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
return nativeResponseValue;
+}
+ // bool CommitmentUpdate_eq(const struct LDKCommitmentUpdate *NONNULL_PTR a, const struct LDKCommitmentUpdate *NONNULL_PTR b);
+/* @internal */
+export function CommitmentUpdate_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CommitmentUpdate_eq(a, b);
+ return nativeResponseValue;
}
// void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_OnionMessageHandler(this_arg);
return nativeResponseValue;
+}
+ // struct LDKCustomOnionMessageHandler IgnoringMessageHandler_as_CustomOnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+/* @internal */
+export function IgnoringMessageHandler_as_CustomOnionMessageHandler(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(this_arg);
+ return nativeResponseValue;
}
// struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
/* @internal */
const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
// debug statements here
}
- // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint64_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
+ // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
/* @internal */
-export function PeerManager_new(message_handler: bigint, our_node_secret: number, current_time: bigint, ephemeral_random_data: number, logger: bigint, custom_message_handler: bigint): bigint {
+export function PeerManager_new(message_handler: bigint, our_node_secret: number, current_time: number, ephemeral_random_data: number, logger: bigint, custom_message_handler: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
}
const nativeResponseValue = wasm.TS_TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg);
return nativeResponseValue;
+}
+ // bool TxCreationKeys_eq(const struct LDKTxCreationKeys *NONNULL_PTR a, const struct LDKTxCreationKeys *NONNULL_PTR b);
+/* @internal */
+export function TxCreationKeys_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxCreationKeys_eq(a, b);
+ return nativeResponseValue;
}
// uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelPublicKeys_eq(const struct LDKChannelPublicKeys *NONNULL_PTR a, const struct LDKChannelPublicKeys *NONNULL_PTR b);
+/* @internal */
+export function ChannelPublicKeys_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelPublicKeys_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
return nativeResponseValue;
+}
+ // bool HTLCOutputInCommitment_eq(const struct LDKHTLCOutputInCommitment *NONNULL_PTR a, const struct LDKHTLCOutputInCommitment *NONNULL_PTR b);
+/* @internal */
+export function HTLCOutputInCommitment_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
return nativeResponseValue;
+}
+ // bool ClosingTransaction_eq(const struct LDKClosingTransaction *NONNULL_PTR a, const struct LDKClosingTransaction *NONNULL_PTR b);
+/* @internal */
+export function ClosingTransaction_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosingTransaction_eq(a, b);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
// debug statements here
-}
- // MUST_USE_RES struct LDKInitFeatures InitFeatures_known_channel_features(void);
-/* @internal */
-export function InitFeatures_known_channel_features(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_InitFeatures_known_channel_features();
- return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known_channel_features(void);
-/* @internal */
-export function NodeFeatures_known_channel_features(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeFeatures_known_channel_features();
- return nativeResponseValue;
}
// MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
/* @internal */
}
const nativeResponseValue = wasm.TS_InitFeatures_empty();
return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
-/* @internal */
-export function InitFeatures_known(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_InitFeatures_known();
- return nativeResponseValue;
}
// MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeFeatures_empty();
return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
-/* @internal */
-export function NodeFeatures_known(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeFeatures_known();
- return nativeResponseValue;
}
// MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
-/* @internal */
-export function ChannelFeatures_known(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelFeatures_known();
- return nativeResponseValue;
}
// MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
-/* @internal */
-export function InvoiceFeatures_known(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
- return nativeResponseValue;
}
// MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
return nativeResponseValue;
-}
- // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
-/* @internal */
-export function ChannelTypeFeatures_known(): bigint {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
- return nativeResponseValue;
}
// MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
return nativeResponseValue;
+}
+ // bool ShutdownScript_eq(const struct LDKShutdownScript *NONNULL_PTR a, const struct LDKShutdownScript *NONNULL_PTR b);
+/* @internal */
+export function ShutdownScript_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ShutdownScript_eq(a, b);
+ return nativeResponseValue;
}
// void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(node_id, is_permanent);
return nativeResponseValue;
+}
+ // bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+/* @internal */
+export function NetworkUpdate_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NetworkUpdate_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelUpdateInfo_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+/* @internal */
+export function ChannelUpdateInfo_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUpdateInfo_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
return nativeResponseValue;
+}
+ // bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+/* @internal */
+export function ChannelInfo_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelInfo_eq(a, b);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
return nativeResponseValue;
+}
+ // bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+/* @internal */
+export function NodeAnnouncementInfo_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeAlias_clone(orig);
return nativeResponseValue;
+}
+ // bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+/* @internal */
+export function NodeAlias_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
return nativeResponseValue;
+}
+ // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+/* @internal */
+export function NodeInfo_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeInfo_eq(a, b);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
/* @internal */
const nativeResponseValue = wasm.TS_NetworkGraph_channel_failed(this_arg, short_channel_id, is_permanent);
// debug statements here
}
- // void NetworkGraph_node_failed(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
+ // void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
/* @internal */
-export function NetworkGraph_node_failed(this_arg: bigint, _node_id: number, is_permanent: boolean): void {
+export function NetworkGraph_node_failed_permanent(this_arg: bigint, node_id: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_NetworkGraph_node_failed(this_arg, _node_id, is_permanent);
+ const nativeResponseValue = wasm.TS_NetworkGraph_node_failed_permanent(this_arg, node_id);
// debug statements here
}
- // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+ // void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
/* @internal */
-export function NetworkGraph_remove_stale_channels_with_time(this_arg: bigint, current_time_unix: bigint): void {
+export function NetworkGraph_remove_stale_channels_and_tracking_with_time(this_arg: bigint, current_time_unix: bigint): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
+ const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(this_arg, current_time_unix);
// debug statements here
}
// MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
}
const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
// debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr, val);
+ // debug statements here
}
// uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_SendError_invalid_first_hop();
return nativeResponseValue;
+}
+ // struct LDKSendError SendError_invalid_message(void);
+/* @internal */
+export function SendError_invalid_message(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_invalid_message();
+ return nativeResponseValue;
}
// struct LDKSendError SendError_buffer_full(void);
/* @internal */
const nativeResponseValue = wasm.TS_SendError_buffer_full();
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger);
+ // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
+/* @internal */
+export function SendError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_eq(a, b);
+ return nativeResponseValue;
+}
+ // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
+/* @internal */
+export function CustomOnionMessageHandler_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_free(this_ptr);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
/* @internal */
-export function OnionMessenger_new(keys_manager: bigint, logger: bigint): bigint {
+export function OnionMessenger_new(keys_manager: bigint, logger: bigint, custom_handler: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_OnionMessenger_new(keys_manager, logger);
+ const nativeResponseValue = wasm.TS_OnionMessenger_new(keys_manager, logger, custom_handler);
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKBlindedRoute reply_path);
+ // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_custom_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKCustomOnionMessageContents msg, struct LDKBlindedRoute reply_path);
/* @internal */
-export function OnionMessenger_send_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, reply_path: bigint): bigint {
+export function OnionMessenger_send_custom_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, msg: bigint, reply_path: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_OnionMessenger_send_onion_message(this_arg, intermediate_nodes, destination, reply_path);
+ const nativeResponseValue = wasm.TS_OnionMessenger_send_custom_onion_message(this_arg, intermediate_nodes, destination, msg, reply_path);
return nativeResponseValue;
}
// struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
}
const nativeResponseValue = wasm.TS_OnionMessenger_as_OnionMessageProvider(this_arg);
return nativeResponseValue;
+}
+ // uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg);
+/* @internal */
+export function CustomOnionMessageContents_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCustomOnionMessageContents CustomOnionMessageContents_clone(const struct LDKCustomOnionMessageContents *NONNULL_PTR orig);
+/* @internal */
+export function CustomOnionMessageContents_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone(orig);
+ return nativeResponseValue;
+}
+ // void CustomOnionMessageContents_free(struct LDKCustomOnionMessageContents this_ptr);
+/* @internal */
+export function CustomOnionMessageContents_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_free(this_ptr);
+ // debug statements here
}
// void RapidGossipSync_free(struct LDKRapidGossipSync this_obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_ParseError_skip();
return nativeResponseValue;
+}
+ // bool ParseError_eq(const struct LDKParseError *NONNULL_PTR a, const struct LDKParseError *NONNULL_PTR b);
+/* @internal */
+export function ParseError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_eq(a, b);
+ return nativeResponseValue;
}
// void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_ParseOrSemanticError_semantic_error(a);
return nativeResponseValue;
+}
+ // bool ParseOrSemanticError_eq(const struct LDKParseOrSemanticError *NONNULL_PTR a, const struct LDKParseOrSemanticError *NONNULL_PTR b);
+/* @internal */
+export function ParseOrSemanticError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_eq(a, b);
+ return nativeResponseValue;
}
// void Invoice_free(struct LDKInvoice this_obj);
/* @internal */
const nativeResponseValue = wasm.TS_InFlightHtlcs_read(ser);
return nativeResponseValue;
}
- // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+ // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
/* @internal */
-export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, network: Currency, amt_msat: bigint, description_hash: bigint, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
+export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, logger: bigint, network: Currency, amt_msat: bigint, description_hash: bigint, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager, keys_manager, network, amt_msat, description_hash, duration_since_epoch, invoice_expiry_delta_secs);
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager, keys_manager, logger, network, amt_msat, description_hash, duration_since_epoch, invoice_expiry_delta_secs);
return nativeResponseValue;
}
- // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+ // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
/* @internal */
-export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
+export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, logger: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, keys_manager, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs);
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, keys_manager, logger, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs);
return nativeResponseValue;
}
// void DefaultRouter_free(struct LDKDefaultRouter this_obj);
js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: bigint|number, arg3: bigint|number, arg4: bigint|number, arg5: bigint|number, arg6: bigint|number, arg7: bigint|number, arg8: bigint|number, arg9: bigint|number, arg10: bigint|number) {
- const weak: WeakRef<object> = js_objs[obj_ptr];
+ const weak: WeakRef<object>|undefined = js_objs[obj_ptr];
if (weak == null || weak == undefined) {
console.error("Got function call on unknown/free'd JS object!");
throw new Error("Got function call on unknown/free'd JS object!");
}
- const obj: object = weak.deref();
+ const obj = weak.deref();
if (obj == null || obj == undefined) {
console.error("Got function call on GC'd JS object!");
throw new Error("Got function call on GC'd JS object!");
case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
- case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
- case 14: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
- case 15: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
- case 16: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
- case 17: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
- case 18: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
- case 19: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
- case 20: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
- case 21: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
- case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
- case 23: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
- case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
- case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
- case 26: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
- case 27: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
- case 28: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
- case 29: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
- case 30: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
- case 31: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
- case 32: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
- case 33: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
- case 34: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
- case 35: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
- case 36: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
- case 37: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
- case 38: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
- case 39: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
- case 40: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
- case 41: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
- case 42: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
- case 43: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
- case 44: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
- case 45: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
- case 46: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
- case 47: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
- case 48: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
- case 49: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
- case 50: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
- case 51: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
- case 52: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
- case 53: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
- case 54: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
- case 55: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
- case 56: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
- case 57: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
- case 58: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
- case 59: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
- case 60: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
- case 61: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
- case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
- case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
- case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
- case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
- case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
- case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
- case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
- case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
- case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
- case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
- case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
- case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
- case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
- case 75: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
- case 76: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
- case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
- case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
- case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
- case 80: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
- case 81: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
- case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
- case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
- case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
- case 85: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
- case 86: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
- case 87: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
- case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
- case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
- case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
- case 91: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
- case 92: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
- case 93: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
- case 94: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
- case 95: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
- case 96: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
- case 97: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
- case 98: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
- case 99: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
- case 100: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
- case 101: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
- case 102: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
- case 103: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
- case 104: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
- case 105: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
- case 106: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
- case 107: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
- case 108: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
- case 109: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
- case 110: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
- case 111: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
- case 112: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
- case 113: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_failed"); break;
- case 114: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_successful"); break;
- case 115: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_successful"); break;
- case 116: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_failed"); break;
+ case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_anchor_input"); break;
+ case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
+ case 15: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
+ case 16: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 17: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
+ case 18: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
+ case 19: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
+ case 20: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
+ case 21: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
+ case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_node_id"); break;
+ case 23: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
+ case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
+ case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
+ case 26: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
+ case 27: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
+ case 28: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
+ case 29: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
+ case 30: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
+ case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
+ case 32: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
+ case 33: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+ case 34: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 35: fn = Object.getOwnPropertyDescriptor(obj, "tlv_type"); break;
+ case 36: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 37: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
+ case 38: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
+ case 39: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
+ case 40: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
+ case 41: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
+ case 42: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
+ case 43: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
+ case 44: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
+ case 45: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
+ case 46: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
+ case 47: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
+ case 48: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 49: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
+ case 50: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 51: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
+ case 52: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
+ case 53: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
+ case 54: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
+ case 55: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
+ case 56: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+ case 57: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+ case 58: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+ case 59: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+ case 60: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+ case 61: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
+ case 62: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
+ case 63: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
+ case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
+ case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+ case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+ case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+ case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
+ case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+ case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+ case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+ case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+ case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+ case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+ case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+ case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+ case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+ case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+ case 79: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 80: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+ case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+ case 84: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 85: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+ case 87: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+ case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 89: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
+ case 90: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
+ case 91: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 92: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+ case 93: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+ case 94: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+ case 95: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+ case 96: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 97: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 98: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
+ case 99: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 100: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 101: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 102: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 103: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 104: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 105: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+ case 106: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 107: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break;
+ case 108: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+ case 109: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+ case 110: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+ case 111: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
+ case 112: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
+ case 113: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
+ case 114: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
+ case 115: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
+ case 116: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
+ case 117: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
+ case 118: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+ case 119: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_failed"); break;
+ case 120: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_successful"); break;
+ case 121: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_successful"); break;
+ case 122: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_failed"); break;
default:
console.error("Got unknown function call from C!");
throw new Error("Got unknown function call from C!");
+++ /dev/null
-export { ChannelMonitorUpdateErr } from "../bindings.mjs";
\ No newline at end of file
--- /dev/null
+export { ChannelMonitorUpdateStatus } from "../bindings.mjs";
\ No newline at end of file
--- /dev/null
+export { IOError } from "../bindings.mjs";
\ No newline at end of file
export * from './structs/BigEndianScalar.mjs';
export * from './enums/AccessError.mjs';
export * from './enums/COption_NoneZ.mjs';
-export * from './enums/ChannelMonitorUpdateErr.mjs';
+export * from './enums/ChannelMonitorUpdateStatus.mjs';
export * from './enums/ConfirmationTarget.mjs';
export * from './enums/CreationError.mjs';
export * from './enums/Currency.mjs';
export * from './structs/MessageSendEvent.mjs';
export * from './structs/Result_TxOutAccessErrorZ.mjs';
export * from './structs/TwoTuple_usizeTransactionZ.mjs';
-export * from './structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
export * from './structs/HTLCUpdate.mjs';
export * from './structs/MonitorEvent.mjs';
export * from './structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
export * from './structs/TwoTuple_SignatureSignatureZ.mjs';
export * from './structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
export * from './structs/Result_SecretKeyNoneZ.mjs';
+export * from './structs/Result_PublicKeyNoneZ.mjs';
export * from './structs/Option_ScalarZ.mjs';
export * from './structs/Result_SharedSecretNoneZ.mjs';
export * from './structs/ClosingTransaction.mjs';
export * from './structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
export * from './structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
export * from './structs/TwoTuple_PublicKeyTypeZ.mjs';
+export * from './structs/CustomOnionMessageContents.mjs';
+export * from './structs/Option_CustomOnionMessageContentsZ.mjs';
+export * from './structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
export * from './structs/Option_NetAddressZ.mjs';
export * from './structs/PeerHandleError.mjs';
export * from './structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
export * from './structs/CustomMessageReader.mjs';
export * from './structs/CustomMessageHandler.mjs';
export * from './structs/IgnoringMessageHandler.mjs';
+export * from './structs/CustomOnionMessageHandler.mjs';
export * from './structs/ErroringMessageHandler.mjs';
export * from './structs/MessageHandler.mjs';
export * from './structs/SocketDescriptor.mjs';
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* too-high values)
*/
export class APIError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.APIError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.APIError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): APIError {
const raw_ty: number = bindings.LDKAPIError_ty_from_ptr(ptr);
case 1: return new APIError_FeeRateTooHigh(ptr);
case 2: return new APIError_RouteError(ptr);
case 3: return new APIError_ChannelUnavailable(ptr);
- case 4: return new APIError_MonitorUpdateFailed(ptr);
+ case 4: return new APIError_MonitorUpdateInProgress(ptr);
case 5: return new APIError_IncompatibleShutdownScript(ptr);
default:
throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
}
/**
- * Utility method to constructs a new MonitorUpdateFailed-variant APIError
+ * Utility method to constructs a new MonitorUpdateInProgress-variant APIError
*/
- public static constructor_monitor_update_failed(): APIError {
- const ret: bigint = bindings.APIError_monitor_update_failed();
+ public static constructor_monitor_update_in_progress(): APIError {
+ const ret: bigint = bindings.APIError_monitor_update_in_progress();
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
return ret_hu_conv;
return ret_hu_conv;
}
+ /**
+ * Checks if two APIErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: APIError): boolean {
+ const ret: boolean = bindings.APIError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
}
/** A APIError of type APIMisuseError */
export class APIError_APIMisuseError extends APIError {
this.err = err_conv;
}
}
-/** A APIError of type MonitorUpdateFailed */
-export class APIError_MonitorUpdateFailed extends APIError {
+/** A APIError of type MonitorUpdateInProgress */
+export class APIError_MonitorUpdateInProgress extends APIError {
/* @internal */
public constructor(ptr: bigint) {
super(null, ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class AcceptChannel extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.AcceptChannel_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_channel_type(val: ChannelTypeFeatures): void {
+ public set_channel_type(val: ChannelTypeFeatures|null): void {
bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two AcceptChannels 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.
+ */
+ public eq(b: AcceptChannel): boolean {
+ const ret: boolean = bindings.AcceptChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKAccessHolder {
- held: Access;
+ held: Access|null = null;
}
/**
*/
export class Access extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKAccess;
+ public bindings_instance: bindings.LDKAccess|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Access_free);
this.bindings_instance = null;
}
impl_holder.held = new Access(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class AnnouncementSignatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.AnnouncementSignatures_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two AnnouncementSignaturess 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.
+ */
+ public eq(b: AnnouncementSignatures): boolean {
+ const ret: boolean = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the AnnouncementSignatures object into a byte array which can be read by AnnouncementSignatures_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* be provided.
*/
export class Balance extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Balance_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Balance_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Balance {
const raw_ty: number = bindings.LDKBalance_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* chosen to forgo their output as dust.
*/
sign_closing_transaction(closing_tx: ClosingTransaction): Result_SignatureNoneZ;
+ /**Computes the signature for a commitment transaction's anchor output used as an
+ * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ */
+ sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_SignatureNoneZ;
/**Signs a channel announcement message with our funding key and our node secret key (aka
* node_id or network_key), proving it comes from one of the channel participants.
*
}
class LDKBaseSignHolder {
- held: BaseSign;
+ held: BaseSign|null = null;
}
/**
*/
export class BaseSign extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKBaseSign;
+ public bindings_instance: bindings.LDKBaseSign|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BaseSign_free);
this.bindings_instance = null;
}
const result: bigint = ret == null ? 0n : ret.clone_ptr();
return result;
},
+ sign_holder_anchor_input (anchor_tx: number, input: number): bigint {
+ const anchor_tx_conv: Uint8Array = bindings.decodeUint8Array(anchor_tx);
+ const ret: Result_SignatureNoneZ = arg.sign_holder_anchor_input(anchor_tx_conv, input);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
+ },
sign_channel_announcement (msg: bigint): bigint {
const msg_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, msg);
const ret: Result_C2Tuple_SignatureSignatureZNoneZ = arg.sign_channel_announcement(msg_hu_conv);
impl_holder.held = new BaseSign(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
return ret_hu_conv;
}
+ /**
+ * Computes the signature for a commitment transaction's anchor output used as an
+ * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ */
+ public sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_SignatureNoneZ {
+ const ret: bigint = bindings.BaseSign_sign_holder_anchor_input(this.ptr, bindings.encodeUint8Array(anchor_tx), input);
+ const ret_hu_conv: Result_SignatureNoneZ = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
/**
* Signs a channel announcement message with our funding key and our node secret key (aka
* node_id or network_key), proving it comes from one of the channel participants.
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* Represents an error returned from the bech32 library during validation of some bech32 data
*/
export class Bech32Error extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Bech32Error_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Bech32Error_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Bech32Error {
const raw_ty: number = bindings.LDKBech32Error_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class BestBlock extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BestBlock_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two BestBlocks 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.
+ */
+ public eq(b: BestBlock): boolean {
+ const ret: boolean = bindings.BestBlock_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Constructs a `BestBlock` that represents the genesis block at height 0 of the given
* network.
import { TxOut } from '../structs/TxOut.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
public scalar_bytes: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BigEndianScalar_free);
this.scalar_bytes = bindings.decodeUint8Array(bindings.BigEndianScalar_get_bytes(ptr));
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class BigSize extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BigSize_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class BlindedHop extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BlindedHop_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class BlindedRoute extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BlindedRoute_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKBroadcasterInterfaceHolder {
- held: BroadcasterInterface;
+ held: BroadcasterInterface|null = null;
}
/**
*/
export class BroadcasterInterface extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKBroadcasterInterface;
+ public bindings_instance: bindings.LDKBroadcasterInterface|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BroadcasterInterface_free);
this.bindings_instance = null;
}
impl_holder.held = new BroadcasterInterface(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class BuiltCommitmentTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.BuiltCommitmentTransaction_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChainMonitor extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChainMonitor_free);
}
/**
* Indicates the persistence of a [`ChannelMonitor`] has completed after
- * [`ChannelMonitorUpdateErr::TemporaryFailure`] was returned from an update operation.
+ * [`ChannelMonitorUpdateStatus::InProgress`] was returned from an update operation.
*
* Thus, the anticipated use is, at a high level:
* 1) This [`ChainMonitor`] calls [`Persist::update_persisted_channel`] which stores the
* update to disk and begins updating any remote (e.g. watchtower/backup) copies,
- * returning [`ChannelMonitorUpdateErr::TemporaryFailure`],
+ * returning [`ChannelMonitorUpdateStatus::InProgress`],
* 2) once all remote copies are updated, you call this function with the
* `completed_update_id` that completed, and once all pending updates have completed the
* channel will be re-enabled.
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChainParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChainParameters_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelAnnouncement extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelAnnouncement_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelAnnouncements 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.
+ */
+ public eq(b: ChannelAnnouncement): boolean {
+ const ret: boolean = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelConfig extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelConfig_free);
}
* to such payments may be sustantial if there are many dust HTLCs present when the
* channel is force-closed.
*
+ * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+ * channel negotiated throughout the channel open process, along with the fees required to have
+ * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+ * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+ * account the HTLC transaction fee as it is zero.
+ *
* This limit is applied for sent, forwarded, and received HTLCs and limits the total
* exposure across all three types per-channel. Setting this too low may prevent the
* sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
* to such payments may be sustantial if there are many dust HTLCs present when the
* channel is force-closed.
*
+ * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+ * channel negotiated throughout the channel open process, along with the fees required to have
+ * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+ * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+ * account the HTLC transaction fee as it is zero.
+ *
* This limit is applied for sent, forwarded, and received HTLCs and limits the total
* exposure across all three types per-channel. Setting this too low may prevent the
* sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelConfigs 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.
+ */
+ public eq(b: ChannelConfig): boolean {
+ const ret: boolean = bindings.ChannelConfig_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Creates a "default" ChannelConfig. See struct and individual field documentaiton for details on which values are used.
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelCounterparty extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelCounterparty_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_forwarding_info(val: CounterpartyForwardingInfo): void {
+ public set_forwarding_info(val: CounterpartyForwardingInfo|null): void {
bindings.ChannelCounterparty_set_forwarding_info(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelDetails extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelDetails_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_funding_txo(val: OutPoint): void {
+ public set_funding_txo(val: OutPoint|null): void {
bindings.ChannelDetails_set_funding_txo(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_channel_type(val: ChannelTypeFeatures): void {
+ public set_channel_type(val: ChannelTypeFeatures|null): void {
bindings.ChannelDetails_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_config(val: ChannelConfig): void {
+ public set_config(val: ChannelConfig|null): void {
bindings.ChannelDetails_set_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelFeatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelFeatures_free);
}
return ret_hu_conv;
}
- /**
- * Creates a Features with the bits set which are known by the implementation
- */
- public static constructor_known(): ChannelFeatures {
- const ret: bigint = bindings.ChannelFeatures_known();
- const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Returns true if this `Features` object contains unknown feature flags which are set as
* \"required\".
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelHandshakeConfig extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelHandshakeConfig_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelHandshakeLimits extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelHandshakeLimits_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelInfo_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_one_to_two(val: ChannelUpdateInfo): void {
+ public set_one_to_two(val: ChannelUpdateInfo|null): void {
bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_two_to_one(val: ChannelUpdateInfo): void {
+ public set_two_to_one(val: ChannelUpdateInfo|null): void {
bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_announcement_message(val: ChannelAnnouncement): void {
+ public set_announcement_message(val: ChannelAnnouncement|null): void {
bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelInfos 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.
+ */
+ public eq(b: ChannelInfo): boolean {
+ const ret: boolean = bindings.ChannelInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
*
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelManager extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelManager_free);
}
*
* Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, override_config: UserConfig): Result__u832APIErrorZ {
+ public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, override_config: UserConfig|null): Result__u832APIErrorZ {
const ret: bigint = bindings.ChannelManager_create_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, user_channel_id, override_config == null ? 0n : CommonBase.get_ptr_of(override_config));
const ret_hu_conv: Result__u832APIErrorZ = Result__u832APIErrorZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, override_config);
* PaymentSendFailure for more info.
*
* In general, a path may raise:
- * APIError::RouteError when an invalid route or forwarding parameter (cltv_delta, fee,
+ * [`APIError::RouteError`] when an invalid route or forwarding parameter (cltv_delta, fee,
* node public key) is specified.
- * APIError::ChannelUnavailable if the next-hop channel is not available for updates
+ * [`APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
* (including due to previous monitor update failure or new permanent monitor update
* failure).
- * APIError::MonitorUpdateFailed if a new monitor update failure prevented sending the
+ * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
* relevant updates.
*
* Note that depending on the type of the PaymentSendFailure the HTLC may have been
*
* Note that payment_secret (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array): Result_PaymentIdPaymentSendFailureZ {
+ public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array|null): Result_PaymentIdPaymentSendFailureZ {
const ret: bigint = bindings.ChannelManager_send_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)));
const ret_hu_conv: Result_PaymentIdPaymentSendFailureZ = Result_PaymentIdPaymentSendFailureZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, route);
*
* Note that payment_preimage (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public send_spontaneous_payment(route: Route, payment_preimage: Uint8Array): Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
+ public send_spontaneous_payment(route: Route, payment_preimage: Uint8Array|null): Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
const ret: bigint = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage, 32)));
const ret_hu_conv: Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ = Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, route);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelManagerReadArgs extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelManagerReadArgs_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* is believed to be possible in the future (eg they're sending us messages we don't
* understand or indicate they require unknown feature bits), no_connection_possible is set
* and any outstanding channels should be failed.
+ *
+ * Note that in some rare cases this may be called without a corresponding
+ * [`Self::peer_connected`].
*/
peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void;
/**Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- peer_connected(their_node_id: Uint8Array, msg: Init): void;
+ peer_connected(their_node_id: Uint8Array, msg: Init): Result_NoneNoneZ;
/**Handle an incoming channel_reestablish message from the given peer.
*/
handle_channel_reestablish(their_node_id: Uint8Array, msg: ChannelReestablish): void;
}
class LDKChannelMessageHandlerHolder {
- held: ChannelMessageHandler;
+ held: ChannelMessageHandler|null = null;
}
/**
*/
export class ChannelMessageHandler extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKChannelMessageHandler;
+ public bindings_instance: bindings.LDKChannelMessageHandler|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelMessageHandler_free);
this.bindings_instance = null;
}
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
arg.peer_disconnected(their_node_id_conv, no_connection_possible);
},
- peer_connected (their_node_id: number, msg: bigint): void {
+ peer_connected (their_node_id: number, msg: bigint): bigint {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
const msg_hu_conv: Init = new Init(null, msg);
- arg.peer_connected(their_node_id_conv, msg_hu_conv);
+ const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, msg_hu_conv);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
},
handle_channel_reestablish (their_node_id: number, msg: bigint): void {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
},
} as bindings.LDKChannelMessageHandler;
const messageSendEventsProvider = MessageSendEventsProvider.new_impl(messageSendEventsProvider_impl, );
- const ptr_idx: [bigint, number] = bindings.LDKChannelMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx);
+ const ptr_idx: [bigint, number] = bindings.LDKChannelMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx!);
impl_holder.held = new ChannelMessageHandler(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(messageSendEventsProvider);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
* is believed to be possible in the future (eg they're sending us messages we don't
* understand or indicate they require unknown feature bits), no_connection_possible is set
* and any outstanding channels should be failed.
+ *
+ * Note that in some rare cases this may be called without a corresponding
+ * [`Self::peer_connected`].
*/
public peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void {
bindings.ChannelMessageHandler_peer_disconnected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), no_connection_possible);
/**
* Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- public peer_connected(their_node_id: Uint8Array, msg: Init): void {
- bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
+ public peer_connected(their_node_id: Uint8Array, msg: Init): Result_NoneNoneZ {
+ const ret: bigint = bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
+ const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, msg);
+ return ret_hu_conv;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelMonitor extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelMonitor_free);
}
/**
* Used by ChannelManager deserialization to broadcast the latest holder state if its copy of
- * the Channel was out-of-date. You may use it to get a broadcastable holder toxic tx in case of
- * fallen-behind, i.e when receiving a channel_reestablish with a proof that our counterparty side knows
- * a higher revocation secret than the holder commitment number we are aware of. Broadcasting these
- * transactions are UNSAFE, as they allow counterparty side to punish you. Nevertheless you may want to
- * broadcast them if counterparty don't close channel with his higher commitment transaction after a
- * substantial amount of time (a month or even a year) to get back funds. Best may be to contact
- * out-of-band the other node operator to coordinate with him if option is available to you.
- * In any-case, choice is up to the user.
+ * the Channel was out-of-date.
+ *
+ * You may also use this to broadcast the latest local commitment transaction, either because
+ * a monitor update failed with [`ChannelMonitorUpdateStatus::PermanentFailure`] or because we've
+ * fallen behind (i.e. we've received proof that our counterparty side knows a revocation
+ * secret we gave them that they shouldn't know).
+ *
+ * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+ * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
+ * close channel with their commitment transaction after a substantial amount of time. Best
+ * may be to contact the other node operator out-of-band to coordinate other options available
+ * to you. In any-case, the choice is up to you.
+ *
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
*/
public get_latest_holder_commitment_txn(logger: Logger): Uint8Array[] {
const ret: number = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger == null ? 0n : CommonBase.get_ptr_of(logger));
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelMonitorUpdate extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelMonitorUpdate_free);
}
* increasing and increase by one for each new update, with one exception specified below.
*
* This sequence number is also used to track up to which points updates which returned
- * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+ * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
* ChannelMonitor when ChannelManager::channel_monitor_updated is called.
*
* The only instance where update_id values are not strictly increasing is the case where we
* allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
* its docs for more details.
+ *
+ * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
*/
public get_update_id(): bigint {
const ret: bigint = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
* increasing and increase by one for each new update, with one exception specified below.
*
* This sequence number is also used to track up to which points updates which returned
- * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+ * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
* ChannelMonitor when ChannelManager::channel_monitor_updated is called.
*
* The only instance where update_id values are not strictly increasing is the case where we
* allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
* its docs for more details.
+ *
+ * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
*/
public set_update_id(val: bigint): void {
bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelPublicKeys extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelPublicKeys_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelPublicKeyss 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.
+ */
+ public eq(b: ChannelPublicKeys): boolean {
+ const ret: boolean = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelReady extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelReady_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelReadys 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.
+ */
+ public eq(b: ChannelReady): boolean {
+ const ret: boolean = bindings.ChannelReady_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelReady object into a byte array which can be read by ChannelReady_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelReestablish extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelReestablish_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelReestablishs 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.
+ */
+ public eq(b: ChannelReestablish): boolean {
+ const ret: boolean = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelReestablish object into a byte array which can be read by ChannelReestablish_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelTransactionParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelTransactionParameters_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_counterparty_parameters(val: CounterpartyChannelTransactionParameters): void {
+ public set_counterparty_parameters(val: CounterpartyChannelTransactionParameters|null): void {
bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_funding_outpoint(val: OutPoint): void {
+ public set_funding_outpoint(val: OutPoint|null): void {
bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
/**
- * Are anchors used for this channel. Boolean is serialization backwards-compatible
+ * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+ * serialization backwards-compatible.
*/
public get_opt_anchors(): COption_NoneZ {
const ret: COption_NoneZ = bindings.ChannelTransactionParameters_get_opt_anchors(this.ptr);
}
/**
- * Are anchors used for this channel. Boolean is serialization backwards-compatible
+ * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+ * serialization backwards-compatible.
*/
public set_opt_anchors(val: COption_NoneZ): void {
bindings.ChannelTransactionParameters_set_opt_anchors(this.ptr, val);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelTypeFeatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelTypeFeatures_free);
}
return ret_hu_conv;
}
- /**
- * Creates a Features with the bits set which are known by the implementation
- */
- public static constructor_known(): ChannelTypeFeatures {
- const ret: bigint = bindings.ChannelTypeFeatures_known();
- const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Returns true if this `Features` object contains unknown feature flags which are set as
* \"required\".
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelUpdate extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelUpdate_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelUpdates 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.
+ */
+ public eq(b: ChannelUpdate): boolean {
+ const ret: boolean = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelUpdate object into a byte array which can be read by ChannelUpdate_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelUpdateInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelUpdateInfo_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_last_update_message(val: ChannelUpdate): void {
+ public set_last_update_message(val: ChannelUpdate|null): void {
bindings.ChannelUpdateInfo_set_last_update_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ChannelUpdateInfos 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.
+ */
+ public eq(b: ChannelUpdateInfo): boolean {
+ const ret: boolean = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ChannelUsage extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ChannelUsage_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ClosingSigned extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ClosingSigned_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_fee_range(val: ClosingSignedFeeRange): void {
+ public set_fee_range(val: ClosingSignedFeeRange|null): void {
bindings.ClosingSigned_set_fee_range(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ClosingSigneds 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.
+ */
+ public eq(b: ClosingSigned): boolean {
+ const ret: boolean = bindings.ClosingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ClosingSigned object into a byte array which can be read by ClosingSigned_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ClosingSignedFeeRange extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ClosingSignedFeeRange_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ClosingSignedFeeRanges 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.
+ */
+ public eq(b: ClosingSignedFeeRange): boolean {
+ const ret: boolean = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ClosingTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ClosingTransaction_free);
}
return ret;
}
+ /**
+ * Checks if two ClosingTransactions 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.
+ */
+ public eq(b: ClosingTransaction): boolean {
+ const ret: boolean = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Construct an object of the class
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* The reason the channel was closed. See individual variants more details.
*/
export class ClosureReason extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ClosureReason_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ClosureReason_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): ClosureReason {
const raw_ty: number = bindings.LDKClosureReason_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two ClosureReasons contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: ClosureReason): boolean {
+ const ret: boolean = bindings.ClosureReason_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CommitmentSigned extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CommitmentSigned_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two CommitmentSigneds 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.
+ */
+ public eq(b: CommitmentSigned): boolean {
+ const ret: boolean = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the CommitmentSigned object into a byte array which can be read by CommitmentSigned_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CommitmentTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CommitmentTransaction_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CommitmentUpdate extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CommitmentUpdate_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_update_fee(val: UpdateFee): void {
+ public set_update_fee(val: UpdateFee|null): void {
bindings.CommitmentUpdate_set_update_fee(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two CommitmentUpdates 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.
+ */
+ public eq(b: CommitmentUpdate): boolean {
+ const ret: boolean = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
// In Java, protected means "any subclass can access fields on any other subclass'"
// In TypeScript, protected means "any subclass can access parent fields on instances of itself"
// To work around this, we add accessors for other instances' protected fields here.
- protected static add_ref_from(holder: CommonBase, referent: object) {
- if (holder !== null) { holder.ptrs_to.push(referent); }
+ protected static add_ref_from(holder: CommonBase|null, referent: object|null) {
+ if (holder !== null && referent !== null) { holder.ptrs_to.push(referent); }
}
protected static get_ptr_of(o: CommonBase) {
return o.ptr;
}
export class UnqualifiedError {
- public constructor(val: number) {}
+ public constructor(_val: number) {}
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKConfirmHolder {
- held: Confirm;
+ held: Confirm|null = null;
}
/**
*/
export class Confirm extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKConfirm;
+ public bindings_instance: bindings.LDKConfirm|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Confirm_free);
this.bindings_instance = null;
}
impl_holder.held = new Confirm(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CounterpartyChannelTransactionParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CounterpartyChannelTransactionParameters_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CounterpartyCommitmentSecrets extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CounterpartyCommitmentSecrets_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class CounterpartyForwardingInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CounterpartyForwardingInfo_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKCustomMessageHandlerHolder {
- held: CustomMessageHandler;
+ held: CustomMessageHandler|null = null;
}
/**
*/
export class CustomMessageHandler extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKCustomMessageHandler;
+ public bindings_instance: bindings.LDKCustomMessageHandler|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CustomMessageHandler_free);
this.bindings_instance = null;
}
},
} as bindings.LDKCustomMessageHandler;
const customMessageReader = CustomMessageReader.new_impl(customMessageReader_impl, );
- const ptr_idx: [bigint, number] = bindings.LDKCustomMessageHandler_new(structImplementation, customMessageReader.instance_idx);
+ const ptr_idx: [bigint, number] = bindings.LDKCustomMessageHandler_new(structImplementation, customMessageReader.instance_idx!);
impl_holder.held = new CustomMessageHandler(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(customMessageReader);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKCustomMessageReaderHolder {
- held: CustomMessageReader;
+ held: CustomMessageReader|null = null;
}
/**
*/
export class CustomMessageReader extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKCustomMessageReader;
+ public bindings_instance: bindings.LDKCustomMessageReader|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CustomMessageReader_free);
this.bindings_instance = null;
}
impl_holder.held = new CustomMessageReader(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
--- /dev/null
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+/** An implementation of CustomOnionMessageContents */
+export interface CustomOnionMessageContentsInterface {
+ /**Returns the TLV type identifying the message contents. MUST be >= 64.
+ */
+ tlv_type(): bigint;
+ /**Serialize the object into a byte array
+ */
+ write(): Uint8Array;
+}
+
+class LDKCustomOnionMessageContentsHolder {
+ held: CustomOnionMessageContents|null = null;
+}
+
+/**
+ * The contents of a custom onion message.
+ */
+export class CustomOnionMessageContents extends CommonBase {
+ /* @internal */
+ public bindings_instance: bindings.LDKCustomOnionMessageContents|null;
+
+ /* @internal */
+ public instance_idx?: number;
+
+ /* @internal */
+ constructor(_dummy: null, ptr: bigint) {
+ super(ptr, bindings.CustomOnionMessageContents_free);
+ this.bindings_instance = null;
+ }
+
+ /** Creates a new instance of CustomOnionMessageContents from a given implementation */
+ public static new_impl(arg: CustomOnionMessageContentsInterface): CustomOnionMessageContents {
+ const impl_holder: LDKCustomOnionMessageContentsHolder = new LDKCustomOnionMessageContentsHolder();
+ let structImplementation = {
+ tlv_type (): bigint {
+ const ret: bigint = arg.tlv_type();
+ return ret;
+ },
+ write (): number {
+ const ret: Uint8Array = arg.write();
+ const result: number = bindings.encodeUint8Array(ret);
+ return result;
+ },
+ } as bindings.LDKCustomOnionMessageContents;
+ const ptr_idx: [bigint, number] = bindings.LDKCustomOnionMessageContents_new(structImplementation);
+
+ impl_holder.held = new CustomOnionMessageContents(null, ptr_idx[0]);
+ impl_holder.held.instance_idx = ptr_idx[1];
+ impl_holder.held.bindings_instance = structImplementation;
+ return impl_holder.held!;
+ }
+
+ /**
+ * Returns the TLV type identifying the message contents. MUST be >= 64.
+ */
+ public tlv_type(): bigint {
+ const ret: bigint = bindings.CustomOnionMessageContents_tlv_type(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Serialize the object into a byte array
+ */
+ public write(): Uint8Array {
+ const ret: number = bindings.CustomOnionMessageContents_write(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.CustomOnionMessageContents_clone_ptr(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of a CustomOnionMessageContents
+ */
+ public clone(): CustomOnionMessageContents {
+ const ret: bigint = bindings.CustomOnionMessageContents_clone(this.ptr);
+ const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+/** An implementation of CustomOnionMessageHandler */
+export interface CustomOnionMessageHandlerInterface {
+ /**Called with the custom message that was received.
+ */
+ handle_custom_message(msg: CustomOnionMessageContents): void;
+ /**Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+ * message type is unknown.
+ */
+ read_custom_message(message_type: bigint, buffer: Uint8Array): Result_COption_CustomOnionMessageContentsZDecodeErrorZ;
+}
+
+class LDKCustomOnionMessageHandlerHolder {
+ held: CustomOnionMessageHandler|null = null;
+}
+
+/**
+ * Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`],
+ * [`SimpleRefOnionMessenger`], or prefer to ignore inbound custom onion messages,
+ * [`IgnoringMessageHandler`] must be provided to [`OnionMessenger::new`]. Otherwise, a custom
+ * implementation of this trait must be provided, with [`CustomMessage`] specifying the supported
+ * message types.
+ *
+ * See [`OnionMessenger`] for example usage.
+ *
+ * [`IgnoringMessageHandler`]: crate::ln::peer_handler::IgnoringMessageHandler
+ * [`CustomMessage`]: Self::CustomMessage
+ */
+export class CustomOnionMessageHandler extends CommonBase {
+ /* @internal */
+ public bindings_instance: bindings.LDKCustomOnionMessageHandler|null;
+
+ /* @internal */
+ public instance_idx?: number;
+
+ /* @internal */
+ constructor(_dummy: null, ptr: bigint) {
+ super(ptr, bindings.CustomOnionMessageHandler_free);
+ this.bindings_instance = null;
+ }
+
+ /** Creates a new instance of CustomOnionMessageHandler from a given implementation */
+ public static new_impl(arg: CustomOnionMessageHandlerInterface): CustomOnionMessageHandler {
+ const impl_holder: LDKCustomOnionMessageHandlerHolder = new LDKCustomOnionMessageHandlerHolder();
+ let structImplementation = {
+ handle_custom_message (msg: bigint): void {
+ const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, msg);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ arg.handle_custom_message(ret_hu_conv);
+ },
+ read_custom_message (message_type: bigint, buffer: number): bigint {
+ const buffer_conv: Uint8Array = bindings.decodeUint8Array(buffer);
+ const ret: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = arg.read_custom_message(message_type, buffer_conv);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
+ },
+ } as bindings.LDKCustomOnionMessageHandler;
+ const ptr_idx: [bigint, number] = bindings.LDKCustomOnionMessageHandler_new(structImplementation);
+
+ impl_holder.held = new CustomOnionMessageHandler(null, ptr_idx[0]);
+ impl_holder.held.instance_idx = ptr_idx[1];
+ impl_holder.held.bindings_instance = structImplementation;
+ return impl_holder.held!;
+ }
+
+ /**
+ * Called with the custom message that was received.
+ */
+ public handle_custom_message(msg: CustomOnionMessageContents): void {
+ bindings.CustomOnionMessageHandler_handle_custom_message(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg));
+ CommonBase.add_ref_from(this, msg);
+ }
+
+ /**
+ * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+ * message type is unknown.
+ */
+ public read_custom_message(message_type: bigint, buffer: Uint8Array): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ const ret: bigint = bindings.CustomOnionMessageHandler_read_custom_message(this.ptr, message_type, bindings.encodeUint8Array(buffer));
+ const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class DataLossProtect extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.DataLossProtect_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two DataLossProtects 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.
+ */
+ public eq(b: DataLossProtect): boolean {
+ const ret: boolean = bindings.DataLossProtect_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
import * as bindings from '../bindings.mjs'
-
/**
* An error in decoding a message or struct.
*/
export class DecodeError extends CommonBase {
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.DecodeError_free); }
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
- super(ptr, bindings.DecodeError_free);
+ public static constr_from_ptr(ptr: bigint): DecodeError {
+ const raw_ty: number = bindings.LDKDecodeError_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new DecodeError_UnknownVersion(ptr);
+ case 1: return new DecodeError_UnknownRequiredFeature(ptr);
+ case 2: return new DecodeError_InvalidValue(ptr);
+ case 3: return new DecodeError_ShortRead(ptr);
+ case 4: return new DecodeError_BadLengthDescriptor(ptr);
+ case 5: return new DecodeError_Io(ptr);
+ case 6: return new DecodeError_UnsupportedCompression(ptr);
+ default:
+ throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+ }
}
public clone_ptr(): bigint {
*/
public clone(): DecodeError {
const ret: bigint = bindings.DecodeError_clone(this.ptr);
- const ret_hu_conv: DecodeError = new DecodeError(null, ret);
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new UnknownVersion-variant DecodeError
+ */
+ public static constructor_unknown_version(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unknown_version();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new UnknownRequiredFeature-variant DecodeError
+ */
+ public static constructor_unknown_required_feature(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unknown_required_feature();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new InvalidValue-variant DecodeError
+ */
+ public static constructor_invalid_value(): DecodeError {
+ const ret: bigint = bindings.DecodeError_invalid_value();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new ShortRead-variant DecodeError
+ */
+ public static constructor_short_read(): DecodeError {
+ const ret: bigint = bindings.DecodeError_short_read();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new BadLengthDescriptor-variant DecodeError
+ */
+ public static constructor_bad_length_descriptor(): DecodeError {
+ const ret: bigint = bindings.DecodeError_bad_length_descriptor();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Io-variant DecodeError
+ */
+ public static constructor_io(a: IOError): DecodeError {
+ const ret: bigint = bindings.DecodeError_io(a);
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new UnsupportedCompression-variant DecodeError
+ */
+ public static constructor_unsupported_compression(): DecodeError {
+ const ret: bigint = bindings.DecodeError_unsupported_compression();
+ const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two DecodeErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: DecodeError): boolean {
+ const ret: boolean = bindings.DecodeError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
+}
+/** A DecodeError of type UnknownVersion */
+export class DecodeError_UnknownVersion extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type UnknownRequiredFeature */
+export class DecodeError_UnknownRequiredFeature extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type InvalidValue */
+export class DecodeError_InvalidValue extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type ShortRead */
+export class DecodeError_ShortRead extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type BadLengthDescriptor */
+export class DecodeError_BadLengthDescriptor extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
+/** A DecodeError of type Io */
+export class DecodeError_Io extends DecodeError {
+ public io: IOError;
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ this.io = bindings.LDKDecodeError_Io_get_io(ptr);
+ }
+}
+/** A DecodeError of type UnsupportedCompression */
+export class DecodeError_UnsupportedCompression extends DecodeError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class DefaultRouter extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.DefaultRouter_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class DelayedPaymentOutputDescriptor extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.DelayedPaymentOutputDescriptor_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two DelayedPaymentOutputDescriptors 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.
+ */
+ public eq(b: DelayedPaymentOutputDescriptor): boolean {
+ const ret: boolean = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Description extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Description_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* The destination of an onion message.
*/
export class Destination extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Destination_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Destination_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Destination {
const raw_ty: number = bindings.LDKDestination_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class DirectedChannelInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.DirectedChannelInfo_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class DirectedChannelTransactionParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.DirectedChannelTransactionParameters_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* [`Self::as_msat`] should not be routed through the channel.
*/
export class EffectiveCapacity extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.EffectiveCapacity_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.EffectiveCapacity_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): EffectiveCapacity {
const raw_ty: number = bindings.LDKEffectiveCapacity_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* Used to put an error message in a LightningError
*/
export class ErrorAction extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ErrorAction_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ErrorAction_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): ErrorAction {
const raw_ty: number = bindings.LDKErrorAction_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ErrorMessage extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ErrorMessage_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ErrorMessages 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.
+ */
+ public eq(b: ErrorMessage): boolean {
+ const ret: boolean = bindings.ErrorMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ErrorMessage object into a byte array which can be read by ErrorMessage_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
import { PeerManager } from '../structs/PeerManager.mjs';
*/
export class ErroringMessageHandler extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ErroringMessageHandler_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* written as it makes no sense to respond to it after reconnecting to peers).
*/
export class Event extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Event_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Event_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Event {
const raw_ty: number = bindings.LDKEvent_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKEventHandlerHolder {
- held: EventHandler;
+ held: EventHandler|null = null;
}
/**
*/
export class EventHandler extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKEventHandler;
+ public bindings_instance: bindings.LDKEventHandler|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.EventHandler_free);
this.bindings_instance = null;
}
impl_holder.held = new EventHandler(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKEventsProviderHolder {
- held: EventsProvider;
+ held: EventsProvider|null = null;
}
/**
*/
export class EventsProvider extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKEventsProvider;
+ public bindings_instance: bindings.LDKEventsProvider|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.EventsProvider_free);
this.bindings_instance = null;
}
impl_holder.held = new EventsProvider(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ExpandedKey extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ExpandedKey_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ExpiryTime extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ExpiryTime_free);
}
}
/**
- * Construct an `ExpiryTime` from a `Duration`.
+ * Construct an `ExpiryTime` from a `Duration`, dropping the sub-second part.
*/
public static constructor_from_duration(duration: bigint): ExpiryTime {
const ret: bigint = bindings.ExpiryTime_from_duration(duration);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* Fallback address in case no LN payment is possible
*/
export class Fallback extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Fallback_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Fallback_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Fallback {
const raw_ty: number = bindings.LDKFallback_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKFeeEstimatorHolder {
- held: FeeEstimator;
+ held: FeeEstimator|null = null;
}
/**
*/
export class FeeEstimator extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKFeeEstimator;
+ public bindings_instance: bindings.LDKFeeEstimator|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.FeeEstimator_free);
this.bindings_instance = null;
}
impl_holder.held = new FeeEstimator(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKFilterHolder {
- held: Filter;
+ held: Filter|null = null;
}
/**
* Note that use as part of a [`Watch`] implementation involves reentrancy. Therefore, the `Filter`
* should not block on I/O. Implementations should instead queue the newly monitored data to be
* processed later. Then, in order to block until the data has been processed, any [`Watch`]
- * invocation that has called the `Filter` must return [`TemporaryFailure`].
+ * invocation that has called the `Filter` must return [`InProgress`].
*
- * [`TemporaryFailure`]: ChannelMonitorUpdateErr::TemporaryFailure
+ * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
* [BIP 157]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
* [BIP 158]: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki
*/
export class Filter extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKFilter;
+ public bindings_instance: bindings.LDKFilter|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Filter_free);
this.bindings_instance = null;
}
impl_holder.held = new Filter(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class FixedPenaltyScorer extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.FixedPenaltyScorer_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class FundingCreated extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.FundingCreated_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two FundingCreateds 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.
+ */
+ public eq(b: FundingCreated): boolean {
+ const ret: boolean = bindings.FundingCreated_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the FundingCreated object into a byte array which can be read by FundingCreated_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class FundingSigned extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.FundingSigned_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two FundingSigneds 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.
+ */
+ public eq(b: FundingSigned): boolean {
+ const ret: boolean = bindings.FundingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the FundingSigned object into a byte array which can be read by FundingSigned_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Future extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Future_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKFutureCallbackHolder {
- held: FutureCallback;
+ held: FutureCallback|null = null;
}
/**
*/
export class FutureCallback extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKFutureCallback;
+ public bindings_instance: bindings.LDKFutureCallback|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.FutureCallback_free);
this.bindings_instance = null;
}
impl_holder.held = new FutureCallback(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class GossipTimestampFilter extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.GossipTimestampFilter_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two GossipTimestampFilters 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.
+ */
+ public eq(b: GossipTimestampFilter): boolean {
+ const ret: boolean = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the GossipTimestampFilter object into a byte array which can be read by GossipTimestampFilter_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* All-encompassing standard error type that processing can return
*/
export class GraphSyncError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.GraphSyncError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.GraphSyncError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): GraphSyncError {
const raw_ty: number = bindings.LDKGraphSyncError_ty_from_ptr(ptr);
* Utility method to constructs a new DecodeError-variant GraphSyncError
*/
public static constructor_decode_error(a: DecodeError): GraphSyncError {
- const ret: bigint = bindings.GraphSyncError_decode_error(a == null ? 0n : CommonBase.get_ptr_of(a));
+ const ret: bigint = bindings.GraphSyncError_decode_error(CommonBase.get_ptr_of(a));
const ret_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- CommonBase.add_ref_from(ret_hu_conv, a);
return ret_hu_conv;
}
public constructor(ptr: bigint) {
super(null, ptr);
const decode_error: bigint = bindings.LDKGraphSyncError_DecodeError_get_decode_error(ptr);
- const decode_error_hu_conv: DecodeError = new DecodeError(null, decode_error);
+ const decode_error_hu_conv: DecodeError = DecodeError.constr_from_ptr(decode_error);
CommonBase.add_ref_from(decode_error_hu_conv, this);
this.decode_error = decode_error_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`].
*/
export class HTLCDestination extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.HTLCDestination_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.HTLCDestination_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): HTLCDestination {
const raw_ty: number = bindings.LDKHTLCDestination_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two HTLCDestinations contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: HTLCDestination): boolean {
+ const ret: boolean = bindings.HTLCDestination_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class HTLCOutputInCommitment extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.HTLCOutputInCommitment_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two HTLCOutputInCommitments 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.
+ */
+ public eq(b: HTLCOutputInCommitment): boolean {
+ const ret: boolean = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the HTLCOutputInCommitment object into a byte array which can be read by HTLCOutputInCommitment_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class HTLCUpdate extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.HTLCUpdate_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two HTLCUpdates 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.
+ */
+ public eq(b: HTLCUpdate): boolean {
+ const ret: boolean = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the HTLCUpdate object into a byte array which can be read by HTLCUpdate_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class HolderCommitmentTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.HolderCommitmentTransaction_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Hostname extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Hostname_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two Hostnames 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.
+ */
+ public eq(b: Hostname): boolean {
+ const ret: boolean = bindings.Hostname_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Returns the length of the hostname.
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class IgnoringMessageHandler extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.IgnoringMessageHandler_free);
}
return ret_hu_conv;
}
+ /**
+ * Constructs a new CustomOnionMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned CustomOnionMessageHandler must be freed before this_arg is
+ */
+ public as_CustomOnionMessageHandler(): CustomOnionMessageHandler {
+ const ret: bigint = bindings.IgnoringMessageHandler_as_CustomOnionMessageHandler(this.ptr);
+ const ret_hu_conv: CustomOnionMessageHandler = new CustomOnionMessageHandler(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
/**
* Constructs a new CustomMessageReader which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned CustomMessageReader must be freed before this_arg is
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InFlightHtlcs extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InFlightHtlcs_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InMemorySigner extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InMemorySigner_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Init extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Init_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two Inits 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.
+ */
+ public eq(b: Init): boolean {
+ const ret: boolean = bindings.Init_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the Init object into a byte array which can be read by Init_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InitFeatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InitFeatures_free);
}
return ret_hu_conv;
}
- /**
- * Returns the set of known init features that are related to channels. At least some of
- * these features are likely required for peers to talk to us.
- */
- public static constructor_known_channel_features(): InitFeatures {
- const ret: bigint = bindings.InitFeatures_known_channel_features();
- const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Create a blank Features with no features set
*/
return ret_hu_conv;
}
- /**
- * Creates a Features with the bits set which are known by the implementation
- */
- public static constructor_known(): InitFeatures {
- const ret: bigint = bindings.InitFeatures_known();
- const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Returns true if this `Features` object contains unknown feature flags which are set as
* \"required\".
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InvalidShutdownScript extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InvalidShutdownScript_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Invoice extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Invoice_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InvoiceFeatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InvoiceFeatures_free);
}
return ret_hu_conv;
}
- /**
- * Creates a Features with the bits set which are known by the implementation
- */
- public static constructor_known(): InvoiceFeatures {
- const ret: bigint = bindings.InvoiceFeatures_known();
- const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Returns true if this `Features` object contains unknown feature flags which are set as
* \"required\".
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InvoicePayer extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InvoicePayer_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class InvoiceSignature extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.InvoiceSignature_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*
* This method must return the same value each time it is called with a given `Recipient`
* parameter.
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
*/
get_node_secret(recipient: Recipient): Result_SecretKeyNoneZ;
+ /**Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+ * [`get_node_secret`].
+ *
+ * This method must return the same value each time it is called with a given `Recipient`
+ * parameter.
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
+ *
+ * [`get_node_secret`]: KeysInterface::get_node_secret
+ */
+ get_node_id(recipient: Recipient): Result_PublicKeyNoneZ;
/**Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
* one is provided. Note that this tweak can be applied to `other_key` instead of our node
* secret, though this is less efficient.
*
+ * Errors if the `Recipient` variant is not supported by the implementation.
+ *
* [`node secret`]: Self::get_node_secret
*/
ecdh(recipient: Recipient, other_key: Uint8Array, tweak: Option_ScalarZ): Result_SharedSecretNoneZ;
* The hrp is ascii bytes, while the invoice data is base32.
*
* The secret key used to sign the invoice is dependent on the [`Recipient`].
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
*/
sign_invoice(hrp_bytes: Uint8Array, invoice_data: UInt5[], receipient: Recipient): Result_RecoverableSignatureNoneZ;
/**Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
}
class LDKKeysInterfaceHolder {
- held: KeysInterface;
+ held: KeysInterface|null = null;
}
/**
*/
export class KeysInterface extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKKeysInterface;
+ public bindings_instance: bindings.LDKKeysInterface|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.KeysInterface_free);
this.bindings_instance = null;
}
const result: bigint = ret == null ? 0n : ret.clone_ptr();
return result;
},
+ get_node_id (recipient: Recipient): bigint {
+ const ret: Result_PublicKeyNoneZ = arg.get_node_id(recipient);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
+ },
ecdh (recipient: Recipient, other_key: number, tweak: bigint): bigint {
const other_key_conv: Uint8Array = bindings.decodeUint8Array(other_key);
const tweak_hu_conv: Option_ScalarZ = Option_ScalarZ.constr_from_ptr(tweak);
impl_holder.held = new KeysInterface(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
*
* This method must return the same value each time it is called with a given `Recipient`
* parameter.
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
*/
public get_node_secret(recipient: Recipient): Result_SecretKeyNoneZ {
const ret: bigint = bindings.KeysInterface_get_node_secret(this.ptr, recipient);
return ret_hu_conv;
}
+ /**
+ * Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+ * [`get_node_secret`].
+ *
+ * This method must return the same value each time it is called with a given `Recipient`
+ * parameter.
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
+ *
+ * [`get_node_secret`]: KeysInterface::get_node_secret
+ */
+ public get_node_id(recipient: Recipient): Result_PublicKeyNoneZ {
+ const ret: bigint = bindings.KeysInterface_get_node_id(this.ptr, recipient);
+ const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
/**
* Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
* one is provided. Note that this tweak can be applied to `other_key` instead of our node
* secret, though this is less efficient.
*
+ * Errors if the `Recipient` variant is not supported by the implementation.
+ *
* [`node secret`]: Self::get_node_secret
*/
public ecdh(recipient: Recipient, other_key: Uint8Array, tweak: Option_ScalarZ): Result_SharedSecretNoneZ {
* The hrp is ascii bytes, while the invoice data is base32.
*
* The secret key used to sign the invoice is dependent on the [`Recipient`].
+ *
+ * Errors if the `Recipient` variant is not supported by the implementation.
*/
public sign_invoice(hrp_bytes: Uint8Array, invoice_data: UInt5[], receipient: Recipient): Result_RecoverableSignatureNoneZ {
const ret: bigint = bindings.KeysInterface_sign_invoice(this.ptr, bindings.encodeUint8Array(hrp_bytes), bindings.encodeUint8Array(invoice_data != null ? bindings.uint5ArrToBytes(invoice_data) : null), receipient);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class KeysManager extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.KeysManager_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class LightningError extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.LightningError_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKListenHolder {
- held: Listen;
+ held: Listen|null = null;
}
/**
*/
export class Listen extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKListen;
+ public bindings_instance: bindings.LDKListen|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Listen_free);
this.bindings_instance = null;
}
impl_holder.held = new Listen(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKLockableScoreHolder {
- held: LockableScore;
+ held: LockableScore|null = null;
}
/**
*/
export class LockableScore extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKLockableScore;
+ public bindings_instance: bindings.LDKLockableScore|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.LockableScore_free);
this.bindings_instance = null;
}
impl_holder.held = new LockableScore(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class LockedChannelMonitor extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
}
/** Releases this lock */
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKLoggerHolder {
- held: Logger;
+ held: Logger|null = null;
}
/**
*/
export class Logger extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKLogger;
+ public bindings_instance: bindings.LDKLogger|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Logger_free);
this.bindings_instance = null;
}
impl_holder.held = new Logger(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
import { PeerManager } from '../structs/PeerManager.mjs';
*/
export class MessageHandler extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MessageHandler_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* These events are handled by PeerManager::process_events if you are using a PeerManager.
*/
export class MessageSendEvent extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.MessageSendEvent_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.MessageSendEvent_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): MessageSendEvent {
const raw_ty: number = bindings.LDKMessageSendEvent_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKMessageSendEventsProviderHolder {
- held: MessageSendEventsProvider;
+ held: MessageSendEventsProvider|null = null;
}
/**
*/
export class MessageSendEventsProvider extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKMessageSendEventsProvider;
+ public bindings_instance: bindings.LDKMessageSendEventsProvider|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MessageSendEventsProvider_free);
this.bindings_instance = null;
}
impl_holder.held = new MessageSendEventsProvider(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class MinFinalCltvExpiry extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MinFinalCltvExpiry_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An event to be processed by the ChannelManager.
*/
export class MonitorEvent extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.MonitorEvent_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.MonitorEvent_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): MonitorEvent {
const raw_ty: number = bindings.LDKMonitorEvent_ty_from_ptr(ptr);
switch (raw_ty) {
case 0: return new MonitorEvent_HTLCEvent(ptr);
case 1: return new MonitorEvent_CommitmentTxConfirmed(ptr);
- case 2: return new MonitorEvent_UpdateCompleted(ptr);
+ case 2: return new MonitorEvent_Completed(ptr);
case 3: return new MonitorEvent_UpdateFailed(ptr);
default:
throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
}
/**
- * Utility method to constructs a new UpdateCompleted-variant MonitorEvent
+ * Utility method to constructs a new Completed-variant MonitorEvent
*/
- public static constructor_update_completed(funding_txo: OutPoint, monitor_update_id: bigint): MonitorEvent {
- const ret: bigint = bindings.MonitorEvent_update_completed(funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor_update_id);
+ public static constructor_completed(funding_txo: OutPoint, monitor_update_id: bigint): MonitorEvent {
+ const ret: bigint = bindings.MonitorEvent_completed(funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor_update_id);
const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
CommonBase.add_ref_from(ret_hu_conv, funding_txo);
return ret_hu_conv;
}
+ /**
+ * Checks if two MonitorEvents contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: MonitorEvent): boolean {
+ const ret: boolean = bindings.MonitorEvent_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the MonitorEvent object into a byte array which can be read by MonitorEvent_read
*/
this.commitment_tx_confirmed = commitment_tx_confirmed_hu_conv;
}
}
-/** A MonitorEvent of type UpdateCompleted */
-export class MonitorEvent_UpdateCompleted extends MonitorEvent {
+/** A MonitorEvent of type Completed */
+export class MonitorEvent_Completed extends MonitorEvent {
/**
* The funding outpoint of the [`ChannelMonitor`] that was updated
*/
/* @internal */
public constructor(ptr: bigint) {
super(null, ptr);
- const funding_txo: bigint = bindings.LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
+ const funding_txo: bigint = bindings.LDKMonitorEvent_Completed_get_funding_txo(ptr);
const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
CommonBase.add_ref_from(funding_txo_hu_conv, this);
this.funding_txo = funding_txo_hu_conv;
- this.monitor_update_id = bindings.LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
+ this.monitor_update_id = bindings.LDKMonitorEvent_Completed_get_monitor_update_id(ptr);
}
}
/** A MonitorEvent of type UpdateFailed */
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class MonitorUpdateId extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MonitorUpdateId_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class MultiThreadedLockableScore extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MultiThreadedLockableScore_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class MultiThreadedScoreLock extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.MultiThreadedScoreLock_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An address which can be used to connect to a remote peer
*/
export class NetAddress extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.NetAddress_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.NetAddress_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): NetAddress {
const raw_ty: number = bindings.LDKNetAddress_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two NetAddresss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: NetAddress): boolean {
+ const ret: boolean = bindings.NetAddress_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the NetAddress object into a byte array which can be read by NetAddress_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NetworkGraph extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NetworkGraph_free);
}
}
/**
- * Marks a node in the graph as failed.
+ * Marks a node in the graph as permanently failed, effectively removing it and its channels
+ * from local storage.
*/
- public node_failed(_node_id: Uint8Array, is_permanent: boolean): void {
- bindings.NetworkGraph_node_failed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(_node_id, 33)), is_permanent);
+ public node_failed_permanent(node_id: Uint8Array): void {
+ bindings.NetworkGraph_node_failed_permanent(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)));
}
/**
* updates every two weeks, the non-normative section of BOLT 7 currently suggests that
* pruning occur for updates which are at least two weeks old, which we implement here.
*
+ * This method will also cause us to stop tracking removed nodes and channels if they have been
+ * in the map for a while so that these can be resynced from gossip in the future.
+ *
* This function takes the current unix time as an argument. For users with the `std` feature
- * enabled, [`NetworkGraph::remove_stale_channels`] may be preferable.
+ * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
*/
- public remove_stale_channels_with_time(current_time_unix: bigint): void {
- bindings.NetworkGraph_remove_stale_channels_with_time(this.ptr, current_time_unix);
+ public remove_stale_channels_and_tracking_with_time(current_time_unix: bigint): void {
+ bindings.NetworkGraph_remove_stale_channels_and_tracking_with_time(this.ptr, current_time_unix);
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* [BOLT #4]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md
*/
export class NetworkUpdate extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.NetworkUpdate_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.NetworkUpdate_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): NetworkUpdate {
const raw_ty: number = bindings.LDKNetworkUpdate_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two NetworkUpdates contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: NetworkUpdate): boolean {
+ const ret: boolean = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeAlias extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeAlias_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two NodeAliass 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.
+ */
+ public eq(b: NodeAlias): boolean {
+ const ret: boolean = bindings.NodeAlias_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeAnnouncement extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeAnnouncement_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two NodeAnnouncements 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.
+ */
+ public eq(b: NodeAnnouncement): boolean {
+ const ret: boolean = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeAnnouncementInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeAnnouncementInfo_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_announcement_message(val: NodeAnnouncement): void {
+ public set_announcement_message(val: NodeAnnouncement|null): void {
bindings.NodeAnnouncementInfo_set_announcement_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two NodeAnnouncementInfos 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.
+ */
+ public eq(b: NodeAnnouncementInfo): boolean {
+ const ret: boolean = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeFeatures extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeFeatures_free);
}
return ret_hu_conv;
}
- /**
- * Returns the set of known node features that are related to channels.
- */
- public static constructor_known_channel_features(): NodeFeatures {
- const ret: bigint = bindings.NodeFeatures_known_channel_features();
- const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Create a blank Features with no features set
*/
return ret_hu_conv;
}
- /**
- * Creates a Features with the bits set which are known by the implementation
- */
- public static constructor_known(): NodeFeatures {
- const ret: bigint = bindings.NodeFeatures_known();
- const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
- CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
- return ret_hu_conv;
- }
-
/**
* Returns true if this `Features` object contains unknown feature flags which are set as
* \"required\".
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeId extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeId_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class NodeInfo extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.NodeInfo_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_lowest_inbound_channel_fees(val: RoutingFees): void {
+ public set_lowest_inbound_channel_fees(val: RoutingFees|null): void {
bindings.NodeInfo_set_lowest_inbound_channel_fees(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_announcement_info(val: NodeAnnouncementInfo): void {
+ public set_announcement_info(val: NodeAnnouncementInfo|null): void {
bindings.NodeInfo_set_announcement_info(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two NodeInfos 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.
+ */
+ public eq(b: NodeInfo): boolean {
+ const ret: boolean = bindings.NodeInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class OnionMessage extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OnionMessage_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two OnionMessages 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.
+ */
+ public eq(b: OnionMessage): boolean {
+ const ret: boolean = bindings.OnionMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Read a OnionMessage from a byte array, created by OnionMessage_write
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
handle_onion_message(peer_node_id: Uint8Array, msg: OnionMessage): void;
/**Called when a connection is established with a peer. Can be used to track which peers
* advertise onion message support and are online.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- peer_connected(their_node_id: Uint8Array, init: Init): void;
+ peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ;
/**Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
* drop and refuse to forward onion messages to this peer.
+ *
+ * Note that in some rare cases this may be called without a corresponding
+ * [`Self::peer_connected`].
*/
peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void;
/**Gets the node feature flags which this handler itself supports. All available handlers are
}
class LDKOnionMessageHandlerHolder {
- held: OnionMessageHandler;
+ held: OnionMessageHandler|null = null;
}
/**
*/
export class OnionMessageHandler extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKOnionMessageHandler;
+ public bindings_instance: bindings.LDKOnionMessageHandler|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OnionMessageHandler_free);
this.bindings_instance = null;
}
const msg_hu_conv: OnionMessage = new OnionMessage(null, msg);
arg.handle_onion_message(peer_node_id_conv, msg_hu_conv);
},
- peer_connected (their_node_id: number, init: bigint): void {
+ peer_connected (their_node_id: number, init: bigint): bigint {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
const init_hu_conv: Init = new Init(null, init);
- arg.peer_connected(their_node_id_conv, init_hu_conv);
+ const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
},
peer_disconnected (their_node_id: number, no_connection_possible: boolean): void {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
},
} as bindings.LDKOnionMessageHandler;
const onionMessageProvider = OnionMessageProvider.new_impl(onionMessageProvider_impl, );
- const ptr_idx: [bigint, number] = bindings.LDKOnionMessageHandler_new(structImplementation, onionMessageProvider.instance_idx);
+ const ptr_idx: [bigint, number] = bindings.LDKOnionMessageHandler_new(structImplementation, onionMessageProvider.instance_idx!);
impl_holder.held = new OnionMessageHandler(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(onionMessageProvider);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
/**
* Called when a connection is established with a peer. Can be used to track which peers
* advertise onion message support and are online.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- public peer_connected(their_node_id: Uint8Array, init: Init): void {
- bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+ public peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ {
+ const ret: bigint = bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+ const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, init);
+ return ret_hu_conv;
}
/**
* Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
* drop and refuse to forward onion messages to this peer.
+ *
+ * Note that in some rare cases this may be called without a corresponding
+ * [`Self::peer_connected`].
*/
public peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void {
bindings.OnionMessageHandler_peer_disconnected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), no_connection_possible);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKOnionMessageProviderHolder {
- held: OnionMessageProvider;
+ held: OnionMessageProvider|null = null;
}
/**
*/
export class OnionMessageProvider extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKOnionMessageProvider;
+ public bindings_instance: bindings.LDKOnionMessageProvider|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OnionMessageProvider_free);
this.bindings_instance = null;
}
impl_holder.held = new OnionMessageProvider(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
/**
* A sender, receiver and forwarder of onion messages. In upcoming releases, this object will be
* used to retrieve invoices and fulfill invoice requests from [offers]. Currently, only sending
- * and receiving empty onion messages is supported.
+ * and receiving custom onion messages is supported.
*
* # Example
*
* # use bitcoin::hashes::_export::_core::time::Duration;
* # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
* # use lightning::chain::keysinterface::{InMemorySigner, KeysManager, KeysInterface};
+ * # use lightning::ln::msgs::DecodeError;
+ * # use lightning::ln::peer_handler::IgnoringMessageHandler;
* # use lightning::onion_message::messenger::{Destination, OnionMessenger};
+ * # use lightning::onion_message::packet::CustomOnionMessageContents;
* # use lightning::onion_message::blinded_route::BlindedRoute;
* # use lightning::util::logger::{Logger, Record};
+ * # use lightning::util::ser::{Writeable, Writer};
+ * # use lightning::io;
* # use std::sync::Arc;
* # struct FakeLogger {};
* # impl Logger for FakeLogger {
* # let node_secret = SecretKey::from_slice(&hex::decode(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
* # let secp_ctx = Secp256k1::new();
* # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
- * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1,
- * hop_node_id1);
+ * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1, hop_node_id1);
* # let destination_node_id = hop_node_id1;
- * #
+ * # let your_custom_message_handler = IgnoringMessageHandler {};
* Create the onion messenger. This must use the same `keys_manager` as is passed to your
* ChannelManager.
- * let onion_messenger = OnionMessenger::new(&keys_manager, logger);
+ * let onion_messenger = OnionMessenger::new(&keys_manager, logger, your_custom_message_handler);
*
- * Send an empty onion message to a node id.
+ * # #[derive(Clone)]
+ * # struct YourCustomMessage {}
+ * impl Writeable for YourCustomMessage {
+ * \tfn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
+ * \t\t# Ok(())
+ * \t\t// Write your custom onion message to `w`
+ * \t}
+ * }
+ * impl CustomOnionMessageContents for YourCustomMessage {
+ * \tfn tlv_type(&self) -> u64 {
+ * \t\t# let your_custom_message_type = 42;
+ * \t\tyour_custom_message_type
+ * \t}
+ * }
+ * Send a custom onion message to a node id.
* let intermediate_hops = [hop_node_id1, hop_node_id2];
* let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::Node(destination_node_id), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::Node(destination_node_id), your_custom_message, reply_path);
*
* Create a blinded route to yourself, for someone to send an onion message to.
* # let your_node_id = hop_node_id1;
* let hops = [hop_node_id3, hop_node_id4, your_node_id];
* let blinded_route = BlindedRoute::new(&hops, &keys_manager, &secp_ctx).unwrap();
*
- * Send an empty onion message to a blinded route.
+ * Send a custom onion message to a blinded route.
* # let intermediate_hops = [hop_node_id1, hop_node_id2];
* let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), your_custom_message, reply_path);
* ```
*
* [offers]: <https://github.com/lightning/bolts/pull/798>
*/
export class OnionMessenger extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OnionMessenger_free);
}
* Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
* their respective handlers.
*/
- public static constructor_new(keys_manager: KeysInterface, logger: Logger): OnionMessenger {
- const ret: bigint = bindings.OnionMessenger_new(keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger));
+ public static constructor_new(keys_manager: KeysInterface, logger: Logger, custom_handler: CustomOnionMessageHandler): OnionMessenger {
+ const ret: bigint = bindings.OnionMessenger_new(keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), custom_handler == null ? 0n : CommonBase.get_ptr_of(custom_handler));
const ret_hu_conv: OnionMessenger = new OnionMessenger(null, ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
CommonBase.add_ref_from(ret_hu_conv, keys_manager);
CommonBase.add_ref_from(ret_hu_conv, logger);
+ CommonBase.add_ref_from(ret_hu_conv, custom_handler);
return ret_hu_conv;
}
/**
- * Send an empty onion message to `destination`, routing it through `intermediate_nodes`.
+ * Send an onion message with contents `message` to `destination`, routing it through `intermediate_nodes`.
* See [`OnionMessenger`] for example usage.
*
* Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public send_onion_message(intermediate_nodes: Uint8Array[], destination: Destination, reply_path: BlindedRoute): Result_NoneSendErrorZ {
- const ret: bigint = bindings.OnionMessenger_send_onion_message(this.ptr, bindings.encodeUint32Array(intermediate_nodes != null ? intermediate_nodes.map(intermediate_nodes_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(intermediate_nodes_conv_12, 33))) : null), CommonBase.get_ptr_of(destination), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
+ public send_custom_onion_message(intermediate_nodes: Uint8Array[], destination: Destination, msg: CustomOnionMessageContents, reply_path: BlindedRoute|null): Result_NoneSendErrorZ {
+ const ret: bigint = bindings.OnionMessenger_send_custom_onion_message(this.ptr, bindings.encodeUint32Array(intermediate_nodes != null ? intermediate_nodes.map(intermediate_nodes_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(intermediate_nodes_conv_12, 33))) : null), CommonBase.get_ptr_of(destination), msg == null ? 0n : CommonBase.get_ptr_of(msg), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
const ret_hu_conv: Result_NoneSendErrorZ = Result_NoneSendErrorZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(this, msg);
CommonBase.add_ref_from(this, reply_path);
return ret_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class OpenChannel extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OpenChannel_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_channel_type(val: ChannelTypeFeatures): void {
+ public set_channel_type(val: ChannelTypeFeatures|null): void {
bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two OpenChannels 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.
+ */
+ public eq(b: OpenChannel): boolean {
+ const ret: boolean = bindings.OpenChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the OpenChannel object into a byte array which can be read by OpenChannel_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::chain::Access or not
*/
export class Option_AccessZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_AccessZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_AccessZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_AccessZ {
const raw_ty: number = bindings.LDKCOption_AccessZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::c_types::derived::C2Tuple_u64u64Z or not
*/
export class Option_C2Tuple_u64u64ZZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_C2Tuple_u64u64ZZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_C2Tuple_u64u64ZZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_C2Tuple_u64u64ZZ {
const raw_ty: number = bindings.LDKCOption_C2Tuple_u64u64ZZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ or not
*/
export class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
const raw_ty: number = bindings.LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::c_types::derived::CVec_NetAddressZ or not
*/
export class Option_CVec_NetAddressZZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_CVec_NetAddressZZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_CVec_NetAddressZZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_CVec_NetAddressZZ {
const raw_ty: number = bindings.LDKCOption_CVec_NetAddressZZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::util::events::ClosureReason or not
*/
export class Option_ClosureReasonZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_ClosureReasonZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_ClosureReasonZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_ClosureReasonZ {
const raw_ty: number = bindings.LDKCOption_ClosureReasonZ_ty_from_ptr(ptr);
--- /dev/null
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+/**
+ * An enum which can either contain a crate::lightning::onion_message::packet::CustomOnionMessageContents or not
+ */
+export class Option_CustomOnionMessageContentsZ extends CommonBase {
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_CustomOnionMessageContentsZ_free); }
+ /* @internal */
+ public static constr_from_ptr(ptr: bigint): Option_CustomOnionMessageContentsZ {
+ const raw_ty: number = bindings.LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Option_CustomOnionMessageContentsZ_Some(ptr);
+ case 1: return new Option_CustomOnionMessageContentsZ_None(ptr);
+ default:
+ throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+ }
+ }
+
+ /**
+ * Constructs a new COption_CustomOnionMessageContentsZ containing a crate::lightning::onion_message::packet::CustomOnionMessageContents
+ */
+ public static constructor_some(o: CustomOnionMessageContents): Option_CustomOnionMessageContentsZ {
+ const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_some(o == null ? 0n : CommonBase.get_ptr_of(o));
+ const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ CommonBase.add_ref_from(ret_hu_conv, o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_CustomOnionMessageContentsZ containing nothing
+ */
+ public static constructor_none(): Option_CustomOnionMessageContentsZ {
+ const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_none();
+ const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_clone_ptr(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_CustomOnionMessageContentsZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public clone(): Option_CustomOnionMessageContentsZ {
+ const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_clone(this.ptr);
+ const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+}
+/** A Option_CustomOnionMessageContentsZ of type Some */
+export class Option_CustomOnionMessageContentsZ_Some extends Option_CustomOnionMessageContentsZ {
+ public some: CustomOnionMessageContents;
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ const some: bigint = bindings.LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr);
+ const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, some);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ this.some = ret_hu_conv;
+ }
+}
+/** A Option_CustomOnionMessageContentsZ of type None */
+export class Option_CustomOnionMessageContentsZ_None extends Option_CustomOnionMessageContentsZ {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::util::events::Event or not
*/
export class Option_EventZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_EventZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_EventZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_EventZ {
const raw_ty: number = bindings.LDKCOption_EventZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::chain::Filter or not
*/
export class Option_FilterZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_FilterZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_FilterZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_FilterZ {
const raw_ty: number = bindings.LDKCOption_FilterZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::util::events::HTLCDestination or not
*/
export class Option_HTLCDestinationZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_HTLCDestinationZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_HTLCDestinationZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_HTLCDestinationZ {
const raw_ty: number = bindings.LDKCOption_HTLCDestinationZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::chain::channelmonitor::MonitorEvent or not
*/
export class Option_MonitorEventZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_MonitorEventZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_MonitorEventZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_MonitorEventZ {
const raw_ty: number = bindings.LDKCOption_MonitorEventZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::ln::msgs::NetAddress or not
*/
export class Option_NetAddressZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_NetAddressZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_NetAddressZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_NetAddressZ {
const raw_ty: number = bindings.LDKCOption_NetAddressZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::routing::gossip::NetworkUpdate or not
*/
export class Option_NetworkUpdateZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_NetworkUpdateZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_NetworkUpdateZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_NetworkUpdateZ {
const raw_ty: number = bindings.LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::c_types::BigEndianScalar or not
*/
export class Option_ScalarZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_ScalarZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_ScalarZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_ScalarZ {
const raw_ty: number = bindings.LDKCOption_ScalarZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a crate::lightning::ln::wire::Type or not
*/
export class Option_TypeZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_TypeZ_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_TypeZ_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_TypeZ {
const raw_ty: number = bindings.LDKCOption_TypeZ_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a u16 or not
*/
export class Option_u16Z extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u16Z_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u16Z_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_u16Z {
const raw_ty: number = bindings.LDKCOption_u16Z_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a u32 or not
*/
export class Option_u32Z extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u32Z_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u32Z_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_u32Z {
const raw_ty: number = bindings.LDKCOption_u32Z_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An enum which can either contain a u64 or not
*/
export class Option_u64Z extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u64Z_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u64Z_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Option_u64Z {
const raw_ty: number = bindings.LDKCOption_u64Z_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class OutPoint extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.OutPoint_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class P2PGossipSync extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.P2PGossipSync_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* reasons, but should generally result in an \"invalid BOLT11 invoice\" message for the user.
*/
export class ParseError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ParseError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ParseError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): ParseError {
const raw_ty: number = bindings.LDKParseError_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two ParseErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: ParseError): boolean {
+ const ret: boolean = bindings.ParseError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Get the string representation of a ParseError object
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* like wrong signatures, missing fields etc. could mean that someone tampered with the invoice.
*/
export class ParseOrSemanticError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ParseOrSemanticError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ParseOrSemanticError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): ParseOrSemanticError {
const raw_ty: number = bindings.LDKParseOrSemanticError_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two ParseOrSemanticErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: ParseOrSemanticError): boolean {
+ const ret: boolean = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Get the string representation of a ParseOrSemanticError object
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PayeePubKey extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PayeePubKey_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKPayerHolder {
- held: Payer;
+ held: Payer|null = null;
}
/**
*/
export class Payer extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKPayer;
+ public bindings_instance: bindings.LDKPayer|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Payer_free);
this.bindings_instance = null;
}
impl_holder.held = new Payer(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
*
* Note that payment_secret (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array): Result_PaymentIdPaymentSendFailureZ {
+ public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array|null): Result_PaymentIdPaymentSendFailureZ {
const ret: bigint = bindings.Payer_send_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)));
const ret_hu_conv: Result_PaymentIdPaymentSendFailureZ = Result_PaymentIdPaymentSendFailureZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, route);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* An error that may occur when making a payment.
*/
export class PaymentError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): PaymentError {
const raw_ty: number = bindings.LDKPaymentError_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PaymentParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PaymentParameters_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_features(val: InvoiceFeatures): void {
+ public set_features(val: InvoiceFeatures|null): void {
bindings.PaymentParameters_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* spontaneous payment or a \"conventional\" lightning payment that's paying an invoice.
*/
export class PaymentPurpose extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentPurpose_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentPurpose_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): PaymentPurpose {
const raw_ty: number = bindings.LDKPaymentPurpose_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* states for more.
*/
export class PaymentSendFailure extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentSendFailure_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentSendFailure_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): PaymentSendFailure {
const raw_ty: number = bindings.LDKPaymentSendFailure_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PeerHandleError extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PeerHandleError_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PeerManager extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PeerManager_free);
}
* timestamp, however if it is not available a persistent counter that increases once per
* minute should suffice.
*/
- public static constructor_new(message_handler_chan_handler_arg: ChannelMessageHandler, message_handler_route_handler_arg: RoutingMessageHandler, message_handler_onion_message_handler_arg: OnionMessageHandler, our_node_secret: Uint8Array, current_time: bigint, ephemeral_random_data: Uint8Array, logger: Logger, custom_message_handler: CustomMessageHandler): PeerManager {
+ public static constructor_new(message_handler_chan_handler_arg: ChannelMessageHandler, message_handler_route_handler_arg: RoutingMessageHandler, message_handler_onion_message_handler_arg: OnionMessageHandler, our_node_secret: Uint8Array, current_time: number, ephemeral_random_data: Uint8Array, logger: Logger, custom_message_handler: CustomMessageHandler): PeerManager {
const ret: bigint = bindings.PeerManager_new(bindings.MessageHandler_new(message_handler_chan_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_chan_handler_arg), message_handler_route_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_route_handler_arg), message_handler_onion_message_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_onion_message_handler_arg)), bindings.encodeUint8Array(bindings.check_arr_len(our_node_secret, 32)), current_time, bindings.encodeUint8Array(bindings.check_arr_len(ephemeral_random_data, 32)), logger == null ? 0n : CommonBase.get_ptr_of(logger), custom_message_handler == null ? 0n : CommonBase.get_ptr_of(custom_message_handler));
const ret_hu_conv: PeerManager = new PeerManager(null, ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* and the stored channel data). Note that you **must** persist every new monitor to disk.
*
* The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
- * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * if you return [`ChannelMonitorUpdateStatus::InProgress`].
*
* See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
- * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+ * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
*
* [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
* [`Writeable::write`]: crate::util::ser::Writeable::write
*/
- persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ;
+ persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus;
/**Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
* update.
*
* whereas updates are small and `O(1)`.
*
* The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
- * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * if you return [`ChannelMonitorUpdateStatus::InProgress`].
*
* See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
* [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
- * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+ * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
*
* [`Writeable::write`]: crate::util::ser::Writeable::write
*
* Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ;
+ update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus;
}
class LDKPersistHolder {
- held: Persist;
+ held: Persist|null = null;
}
/**
*
* Each method can return three possible values:
* If persistence (including any relevant `fsync()` calls) happens immediately, the
- * implementation should return `Ok(())`, indicating normal channel operation should continue.
+ * implementation should return [`ChannelMonitorUpdateStatus::Completed`], indicating normal
+ * channel operation should continue.
* If persistence happens asynchronously, implementations should first ensure the
* [`ChannelMonitor`] or [`ChannelMonitorUpdate`] are written durably to disk, and then return
- * `Err(ChannelMonitorUpdateErr::TemporaryFailure)` while the update continues in the
- * background. Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be
- * called with the corresponding [`MonitorUpdateId`].
+ * [`ChannelMonitorUpdateStatus::InProgress`] while the update continues in the background.
+ * Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be called with
+ * the corresponding [`MonitorUpdateId`].
*
* Note that unlike the direct [`chain::Watch`] interface,
* [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
*
* If persistence fails for some reason, implementations should return
- * `Err(ChannelMonitorUpdateErr::PermanentFailure)`, in which case the channel will likely be
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`], in which case the channel will likely be
* closed without broadcasting the latest state. See
- * [`ChannelMonitorUpdateErr::PermanentFailure`] for more details.
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`] for more details.
*/
export class Persist extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKPersist;
+ public bindings_instance: bindings.LDKPersist|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Persist_free);
this.bindings_instance = null;
}
public static new_impl(arg: PersistInterface): Persist {
const impl_holder: LDKPersistHolder = new LDKPersistHolder();
let structImplementation = {
- persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): bigint {
+ persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
CommonBase.add_ref_from(channel_id_hu_conv, this);
const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data);
const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
CommonBase.add_ref_from(update_id_hu_conv, this);
- const ret: Result_NoneChannelMonitorUpdateErrZ = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
- const result: bigint = ret == null ? 0n : ret.clone_ptr();
- return result;
+ const ret: ChannelMonitorUpdateStatus = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
+ return ret;
},
- update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint {
+ update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
CommonBase.add_ref_from(channel_id_hu_conv, this);
const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data);
const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
CommonBase.add_ref_from(update_id_hu_conv, this);
- const ret: Result_NoneChannelMonitorUpdateErrZ = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
- const result: bigint = ret == null ? 0n : ret.clone_ptr();
- return result;
+ const ret: ChannelMonitorUpdateStatus = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
+ return ret;
},
} as bindings.LDKPersist;
const ptr_idx: [bigint, number] = bindings.LDKPersist_new(structImplementation);
impl_holder.held = new Persist(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
* and the stored channel data). Note that you **must** persist every new monitor to disk.
*
* The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
- * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * if you return [`ChannelMonitorUpdateStatus::InProgress`].
*
* See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
- * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+ * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
*
* [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
* [`Writeable::write`]: crate::util::ser::Writeable::write
*/
- public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
+ const ret: ChannelMonitorUpdateStatus = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
CommonBase.add_ref_from(this, channel_id);
CommonBase.add_ref_from(this, data);
CommonBase.add_ref_from(this, update_id);
- return ret_hu_conv;
+ return ret;
}
/**
* whereas updates are small and `O(1)`.
*
* The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
- * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * if you return [`ChannelMonitorUpdateStatus::InProgress`].
*
* See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
* [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
- * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+ * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
*
* [`Writeable::write`]: crate::util::ser::Writeable::write
*
* Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate|null, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
+ const ret: ChannelMonitorUpdateStatus = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
CommonBase.add_ref_from(this, channel_id);
CommonBase.add_ref_from(this, update);
CommonBase.add_ref_from(this, data);
CommonBase.add_ref_from(this, update_id);
- return ret_hu_conv;
+ return ret;
}
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKPersisterHolder {
- held: Persister;
+ held: Persister|null = null;
}
/**
*/
export class Persister extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKPersister;
+ public bindings_instance: bindings.LDKPersister|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Persister_free);
this.bindings_instance = null;
}
impl_holder.held = new Persister(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PhantomKeysManager extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PhantomKeysManager_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PhantomRouteHints extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PhantomRouteHints_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Ping extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Ping_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two Pings 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.
+ */
+ public eq(b: Ping): boolean {
+ const ret: boolean = bindings.Ping_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the Ping object into a byte array which can be read by Ping_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Pong extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Pong_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two Pongs 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.
+ */
+ public eq(b: Pong): boolean {
+ const ret: boolean = bindings.Pong_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the Pong object into a byte array which can be read by Pong_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PositiveTimestamp extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PositiveTimestamp_free);
}
* Creates a `PositiveTimestamp` from a [`Duration`] since the Unix epoch in the range
* `0..=MAX_TIMESTAMP`.
*
+ * Note that the subsecond part is dropped as it is not representable in BOLT 11 invoices.
+ *
* Otherwise, returns a [`CreationError::TimestampOutOfBounds`].
*/
public static constructor_from_duration_since_epoch(duration: bigint): Result_PositiveTimestampCreationErrorZ {
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class PrivateRoute extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.PrivateRoute_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
/**
* [`Score`] implementation using channel success probability distributions.
*
- * Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
- * and Stefan Richter [[1]]. Given the uncertainty of channel liquidity balances, probability
- * distributions are defined based on knowledge learned from successful and unsuccessful attempts.
- * Then the negative `log10` of the success probability is used to determine the cost of routing a
- * specific HTLC amount through a channel.
+ * Channels are tracked with upper and lower liquidity bounds - when an HTLC fails at a channel,
+ * we learn that the upper-bound on the available liquidity is lower than the amount of the HTLC.
+ * When a payment is forwarded through a channel (but fails later in the route), we learn the
+ * lower-bound on the channel's available liquidity must be at least the value of the HTLC.
*
- * Knowledge about channel liquidity balances takes the form of upper and lower bounds on the
- * possible liquidity. Certainty of the bounds is decreased over time using a decay function. See
- * [`ProbabilisticScoringParameters`] for details.
+ * These bounds are then used to determine a success probability using the formula from
+ * Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
+ * and Stefan Richter [[1]] (i.e. `(upper_bound - payment_amount) / (upper_bound - lower_bound)`).
*
- * Since the scorer aims to learn the current channel liquidity balances, it works best for nodes
- * with high payment volume or that actively probe the [`NetworkGraph`]. Nodes with low payment
- * volume are more likely to experience failed payment paths, which would need to be retried.
+ * This probability is combined with the [`liquidity_penalty_multiplier_msat`] and
+ * [`liquidity_penalty_amount_multiplier_msat`] parameters to calculate a concrete penalty in
+ * milli-satoshis. The penalties, when added across all hops, have the property of being linear in
+ * terms of the entire path's success probability. This allows the router to directly compare
+ * penalties for different paths. See the documentation of those parameters for the exact formulas.
+ *
+ * The liquidity bounds are decayed by halving them every [`liquidity_offset_half_life`].
+ *
+ * Further, we track the history of our upper and lower liquidity bounds for each channel,
+ * allowing us to assign a second penalty (using [`historical_liquidity_penalty_multiplier_msat`]
+ * and [`historical_liquidity_penalty_amount_multiplier_msat`]) based on the same probability
+ * formula, but using the history of a channel rather than our latest estimates for the liquidity
+ * bounds.
*
* # Note
*
* behavior.
*
* [1]: https://arxiv.org/abs/2107.05322
+ * [`liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_amount_multiplier_msat
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringParameters::liquidity_offset_half_life
+ * [`historical_liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_multiplier_msat
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_amount_multiplier_msat
*/
export class ProbabilisticScorer extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ProbabilisticScorer_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ProbabilisticScoringParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ProbabilisticScoringParameters_free);
}
/**
* A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for a payment to determine the liquidity penalty.
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
*
* The penalty is based in part on the knowledge learned from prior successful and unsuccessful
* payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
* uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
* result in a `u64::max_value` penalty, however.
*
- * Default value: 40,000 msat
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
*
* [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
*/
/**
* A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for a payment to determine the liquidity penalty.
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
*
* The penalty is based in part on the knowledge learned from prior successful and unsuccessful
* payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
* uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
* result in a `u64::max_value` penalty, however.
*
- * Default value: 40,000 msat
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
*
* [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
*/
}
/**
- * The time required to elapse before any knowledge learned about channel liquidity balances is
- * cut in half.
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
*
- * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
- * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
- * the certainty of the channel liquidity balance.
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
*
- * Default value: 1 hour
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+ *
+ * Default value: 6 hours
*
* # Note
*
}
/**
- * The time required to elapse before any knowledge learned about channel liquidity balances is
- * cut in half.
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
+ *
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
*
- * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
- * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
- * the certainty of the channel liquidity balance.
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
*
- * Default value: 1 hour
+ * Default value: 6 hours
*
* # Note
*
/**
* A multiplier used in conjunction with a payment amount and the negative `log10` of the
- * channel's success probability for the payment to determine the amount penalty.
+ * channel's success probability for the payment, as determined by our latest estimates of the
+ * channel's liquidity, to determine the amount penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
* probabilities, the multiplier will have a decreasing effect as the negative `log10` will
* fall below `1`.
*
- * Default value: 256 msat
+ * Default value: 192 msat
*/
public get_liquidity_penalty_amount_multiplier_msat(): bigint {
const ret: bigint = bindings.ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this.ptr);
/**
* A multiplier used in conjunction with a payment amount and the negative `log10` of the
- * channel's success probability for the payment to determine the amount penalty.
+ * channel's success probability for the payment, as determined by our latest estimates of the
+ * channel's liquidity, to determine the amount penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
* probabilities, the multiplier will have a decreasing effect as the negative `log10` will
* fall below `1`.
*
- * Default value: 256 msat
+ * Default value: 192 msat
*/
public set_liquidity_penalty_amount_multiplier_msat(val: bigint): void {
bindings.ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
}
+ /**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+ public get_historical_liquidity_penalty_multiplier_msat(): bigint {
+ const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this.ptr);
+ return ret;
+ }
+
+ /**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+ public set_historical_liquidity_penalty_multiplier_msat(val: bigint): void {
+ bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this.ptr, val);
+ }
+
+ /**
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the payment, as determined based on the history of our
+ * estimates of the channel's available liquidity, to determine a penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+ * of the payment amount, weighted by the negative `log10` of the success probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+ public get_historical_liquidity_penalty_amount_multiplier_msat(): bigint {
+ const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this.ptr);
+ return ret;
+ }
+
+ /**
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the payment, as determined based on the history of our
+ * estimates of the channel's available liquidity, to determine a penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+ * of the payment amount, weighted by the negative `log10` of the success probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+ public set_historical_liquidity_penalty_amount_multiplier_msat(val: bigint): void {
+ bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
+ }
+
+ /**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ */
+ public get_historical_no_updates_half_life(): bigint {
+ const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_no_updates_half_life(this.ptr);
+ return ret;
+ }
+
+ /**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ */
+ public set_historical_no_updates_half_life(val: bigint): void {
+ bindings.ProbabilisticScoringParameters_set_historical_no_updates_half_life(this.ptr, val);
+ }
+
/**
* This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
* channel's capacity, which makes us prefer nodes with a smaller `htlc_maximum_msat`. We
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class QueryChannelRange extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.QueryChannelRange_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two QueryChannelRanges 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.
+ */
+ public eq(b: QueryChannelRange): boolean {
+ const ret: boolean = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* \n\t * Calculates the overflow safe ending block height for the query.\n\t * Overflow returns `0xffffffff`, otherwise returns `first_blocknum + number_of_blocks`\n\t
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class QueryShortChannelIds extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.QueryShortChannelIds_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two QueryShortChannelIdss 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.
+ */
+ public eq(b: QueryShortChannelIds): boolean {
+ const ret: boolean = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Read a QueryShortChannelIds from a byte array, created by QueryShortChannelIds_write
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RapidGossipSync extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RapidGossipSync_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RawDataPart extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RawDataPart_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RawInvoice extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RawInvoice_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ReadOnlyNetworkGraph extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
}
/** Releases this lock */
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Record extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Record_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ReplyChannelRange extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ReplyChannelRange_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ReplyChannelRanges 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.
+ */
+ public eq(b: ReplyChannelRange): boolean {
+ const ret: boolean = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Read a ReplyChannelRange from a byte array, created by ReplyChannelRange_write
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ReplyShortChannelIdsEnd extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ReplyShortChannelIdsEnd_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ReplyShortChannelIdsEnds 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.
+ */
+ public eq(b: ReplyShortChannelIdsEnd): boolean {
+ const ret: boolean = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_AcceptChannelDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_AcceptChannelDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_AcceptChannelDecodeErrorZ {
- const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_AcceptChannelDecodeErrorZ = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: AcceptChannel;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_get_ok(ptr);
const res_hu_conv: AcceptChannel = new AcceptChannel(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_AnnouncementSignaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_AnnouncementSignaturesDecodeErrorZ = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: AnnouncementSignatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_BlindedHopDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_BlindedHopDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_BlindedHopDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_BlindedHopDecodeErrorZ {
- const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_BlindedHopDecodeErrorZ = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: BlindedHop;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_BlindedHopDecodeErrorZ_get_ok(ptr);
const res_hu_conv: BlindedHop = new BlindedHop(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_BlindedHopDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_BlindedRouteDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_BlindedRouteDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_BlindedRouteDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_BlindedRouteDecodeErrorZ {
- const ret: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_BlindedRouteDecodeErrorZ = Result_BlindedRouteDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: BlindedRoute;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_get_ok(ptr);
const res_hu_conv: BlindedRoute = new BlindedRoute(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_BlindedRouteNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_BlindedRouteNoneZ_free);
}
/* @internal */
public res: BlindedRoute;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_BlindedRouteNoneZ_get_ok(ptr);
const res_hu_conv: BlindedRoute = new BlindedRoute(null, res);
export class Result_BlindedRouteNoneZ_Err extends Result_BlindedRouteNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_BuiltCommitmentTransactionDecodeErrorZ {
- const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_BuiltCommitmentTransactionDecodeErrorZ = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: BuiltCommitmentTransaction;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(ptr);
const res_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
- const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: TwoTuple_BlockHashChannelManagerZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: TwoTuple_BlockHashChannelManagerZ = new TwoTuple_BlockHashChannelManagerZ(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { Balance } from '../structs/Balance.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
- const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: TwoTuple_BlockHashChannelMonitorZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: TwoTuple_BlockHashChannelMonitorZ = new TwoTuple_BlockHashChannelMonitorZ(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free);
}
/* @internal */
public res: TwoTuple_PaymentHashPaymentIdZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(ptr);
const res_hu_conv: TwoTuple_PaymentHashPaymentIdZ = new TwoTuple_PaymentHashPaymentIdZ(null, res);
public err: PaymentSendFailure;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(ptr);
const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free);
}
/* @internal */
public res: TwoTuple_PaymentHashPaymentSecretZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(ptr);
const res_hu_conv: TwoTuple_PaymentHashPaymentSecretZ = new TwoTuple_PaymentHashPaymentSecretZ(null, res);
public err: APIError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(ptr);
const err_hu_conv: APIError = APIError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free);
}
/* @internal */
public res: TwoTuple_PaymentHashPaymentSecretZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(ptr);
const res_hu_conv: TwoTuple_PaymentHashPaymentSecretZ = new TwoTuple_PaymentHashPaymentSecretZ(null, res);
export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ_Err extends Result_C2Tuple_PaymentHashPaymentSecretZNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free);
}
/* @internal */
public res: TwoTuple_SignatureCVec_SignatureZZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
const res_hu_conv: TwoTuple_SignatureCVec_SignatureZZ = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_C2Tuple_SignatureSignatureZNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_C2Tuple_SignatureSignatureZNoneZ_free);
}
/* @internal */
public res: TwoTuple_SignatureSignatureZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_C2Tuple_SignatureSignatureZNoneZ_get_ok(ptr);
const res_hu_conv: TwoTuple_SignatureSignatureZ = new TwoTuple_SignatureSignatureZ(null, res);
export class Result_C2Tuple_SignatureSignatureZNoneZ_Err extends Result_C2Tuple_SignatureSignatureZNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_ClosureReasonZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_ClosureReasonZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_ClosureReasonZDecodeErrorZ = Result_COption_ClosureReasonZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_ClosureReasonZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_ClosureReasonZ = Option_ClosureReasonZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
--- /dev/null
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ extends CommonBase {
+ protected constructor(_dummy: null, ptr: bigint) {
+ super(ptr, bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free);
+ }
+ /* @internal */
+ public static constr_from_ptr(ptr: bigint): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ if (bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(ptr)) {
+ return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ /**
+ * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the success state.
+ */
+ public static constructor_ok(o: Option_CustomOnionMessageContentsZ): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(CommonBase.get_ptr_of(o));
+ const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the error state.
+ */
+ public static constructor_err(e: DecodeError): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
+ const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public is_ok(): boolean {
+ const ret: boolean = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(this.ptr);
+ return ret;
+ }
+
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public clone(): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(this.ptr);
+ const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ public res: Option_CustomOnionMessageContentsZ;
+
+ /* @internal */
+ public constructor(_dummy: null, ptr: bigint) {
+ super(_dummy, ptr);
+ const res: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(ptr);
+ const res_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(res);
+ CommonBase.add_ref_from(res_hu_conv, this);
+ this.res = res_hu_conv;
+ }
+}
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+ public err: DecodeError;
+
+ /* @internal */
+ public constructor(_dummy: null, ptr: bigint) {
+ super(_dummy, ptr);
+ const err: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(ptr);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
+ CommonBase.add_ref_from(err_hu_conv, this);
+ this.err = err_hu_conv;
+ }
+}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_EventZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_EventZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_EventZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_EventZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_EventZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_EventZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_EventZDecodeErrorZ = Result_COption_EventZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_EventZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_EventZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_EventZ = Option_EventZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_EventZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_HTLCDestinationZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_HTLCDestinationZDecodeErrorZ = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_HTLCDestinationZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_HTLCDestinationZ = Option_HTLCDestinationZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_MonitorEventZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_MonitorEventZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_MonitorEventZDecodeErrorZ = Result_COption_MonitorEventZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_MonitorEventZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_MonitorEventZ = Option_MonitorEventZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_NetworkUpdateZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_NetworkUpdateZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_NetworkUpdateZDecodeErrorZ = Result_COption_NetworkUpdateZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_NetworkUpdateZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_NetworkUpdateZ = Option_NetworkUpdateZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_COption_TypeZDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_COption_TypeZDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_COption_TypeZDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_COption_TypeZDecodeErrorZ {
- const ret: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_COption_TypeZDecodeErrorZ = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Option_TypeZ;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Option_TypeZ = Option_TypeZ.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CVec_CVec_u8ZZNoneZ_free);
}
/* @internal */
public res: Uint8Array[];
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
const res_conv_12_len: number = bindings.getArrayLength(res);
export class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CVec_SignatureZNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CVec_SignatureZNoneZ_free);
}
/* @internal */
public res: Uint8Array[];
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_CVec_SignatureZNoneZ_get_ok(ptr);
const res_conv_12_len: number = bindings.getArrayLength(res);
export class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CVec_u8ZPeerHandleErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: PeerHandleError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_err(ptr);
const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelAnnouncementDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelAnnouncementDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelAnnouncementDecodeErrorZ = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelAnnouncement;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelConfigDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelConfigDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelConfigDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelConfigDecodeErrorZ = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelConfig;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelConfig = new ChannelConfig(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelCounterpartyDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelCounterpartyDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelCounterpartyDecodeErrorZ = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelCounterparty;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelCounterparty = new ChannelCounterparty(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelDetailsDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelDetailsDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelDetailsDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelDetailsDecodeErrorZ = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelDetails;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelDetails = new ChannelDetails(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelFeaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelFeaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelFeaturesDecodeErrorZ = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelFeatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelFeatures = new ChannelFeatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelInfoDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelInfoDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelInfoDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelInfoDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelInfoDecodeErrorZ = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelInfo;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelInfo = new ChannelInfo(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelMonitorUpdateDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelMonitorUpdateDecodeErrorZ = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelMonitorUpdate;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelPublicKeysDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelPublicKeysDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelPublicKeysDecodeErrorZ = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelPublicKeys;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelReadyDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelReadyDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelReadyDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelReadyDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelReadyDecodeErrorZ = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelReady;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelReady = new ChannelReady(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelReestablishDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelReestablishDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelReestablishDecodeErrorZ = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelReestablish;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelReestablish = new ChannelReestablish(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelTransactionParametersDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelTransactionParametersDecodeErrorZ = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelTransactionParameters;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelTypeFeaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelTypeFeaturesDecodeErrorZ = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelTypeFeatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelUpdateDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelUpdateDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelUpdateDecodeErrorZ = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelUpdate;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelUpdate = new ChannelUpdate(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ChannelUpdateInfoDecodeErrorZ {
- const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ChannelUpdateInfoDecodeErrorZ = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ChannelUpdateInfo;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ClosingSignedDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ClosingSignedDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ClosingSignedDecodeErrorZ {
- const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ClosingSignedDecodeErrorZ = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ClosingSigned;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ClosingSigned = new ClosingSigned(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ClosingSignedFeeRangeDecodeErrorZ {
- const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ClosingSignedFeeRangeDecodeErrorZ = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ClosingSignedFeeRange;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ClosingSignedFeeRange = new ClosingSignedFeeRange(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CommitmentSignedDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_CommitmentSignedDecodeErrorZ {
- const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_CommitmentSignedDecodeErrorZ = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: CommitmentSigned;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_get_ok(ptr);
const res_hu_conv: CommitmentSigned = new CommitmentSigned(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CommitmentTransactionDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_CommitmentTransactionDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_CommitmentTransactionDecodeErrorZ {
- const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_CommitmentTransactionDecodeErrorZ = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: CommitmentTransaction;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_get_ok(ptr);
const res_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
- const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_CounterpartyChannelTransactionParametersDecodeErrorZ = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: CounterpartyChannelTransactionParameters;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
const res_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_CounterpartyCommitmentSecretsDecodeErrorZ {
- const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_CounterpartyCommitmentSecretsDecodeErrorZ = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: CounterpartyCommitmentSecrets;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_ok(ptr);
const res_hu_conv: CounterpartyCommitmentSecrets = new CounterpartyCommitmentSecrets(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_CounterpartyForwardingInfoDecodeErrorZ {
- const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_CounterpartyForwardingInfoDecodeErrorZ = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: CounterpartyForwardingInfo;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_get_ok(ptr);
const res_hu_conv: CounterpartyForwardingInfo = new CounterpartyForwardingInfo(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_DelayedPaymentOutputDescriptorDecodeErrorZ {
- const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_DelayedPaymentOutputDescriptorDecodeErrorZ = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: DelayedPaymentOutputDescriptor;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(ptr);
const res_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_DescriptionCreationErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_DescriptionCreationErrorZ_free);
}
/* @internal */
public res: Description;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_DescriptionCreationErrorZ_get_ok(ptr);
const res_hu_conv: Description = new Description(null, res);
public err: CreationError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_DescriptionCreationErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ErrorMessageDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ErrorMessageDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ErrorMessageDecodeErrorZ {
- const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ErrorMessageDecodeErrorZ = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ErrorMessage;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ErrorMessage = new ErrorMessage(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_FixedPenaltyScorerDecodeErrorZ {
- const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_FixedPenaltyScorerDecodeErrorZ = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: FixedPenaltyScorer;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_get_ok(ptr);
const res_hu_conv: FixedPenaltyScorer = new FixedPenaltyScorer(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_FundingCreatedDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_FundingCreatedDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_FundingCreatedDecodeErrorZ {
- const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_FundingCreatedDecodeErrorZ = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: FundingCreated;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_get_ok(ptr);
const res_hu_conv: FundingCreated = new FundingCreated(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_FundingSignedDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_FundingSignedDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_FundingSignedDecodeErrorZ {
- const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_FundingSignedDecodeErrorZ = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: FundingSigned;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_FundingSignedDecodeErrorZ_get_ok(ptr);
const res_hu_conv: FundingSigned = new FundingSigned(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_FundingSignedDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_GossipTimestampFilterDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_GossipTimestampFilterDecodeErrorZ {
- const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_GossipTimestampFilterDecodeErrorZ = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: GossipTimestampFilter;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_get_ok(ptr);
const res_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_HTLCOutputInCommitmentDecodeErrorZ {
- const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_HTLCOutputInCommitmentDecodeErrorZ = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: HTLCOutputInCommitment;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(ptr);
const res_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_HTLCUpdateDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_HTLCUpdateDecodeErrorZ {
- const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_HTLCUpdateDecodeErrorZ = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: HTLCUpdate;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_get_ok(ptr);
const res_hu_conv: HTLCUpdate = new HTLCUpdate(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_HolderCommitmentTransactionDecodeErrorZ {
- const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_HolderCommitmentTransactionDecodeErrorZ = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: HolderCommitmentTransaction;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(ptr);
const res_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InFlightHtlcsDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_InFlightHtlcsDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_InFlightHtlcsDecodeErrorZ {
- const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_InFlightHtlcsDecodeErrorZ = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: InFlightHtlcs;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_get_ok(ptr);
const res_hu_conv: InFlightHtlcs = new InFlightHtlcs(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InMemorySignerDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InMemorySignerDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_InMemorySignerDecodeErrorZ {
- const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_InMemorySignerDecodeErrorZ = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: InMemorySigner;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_get_ok(ptr);
const res_hu_conv: InMemorySigner = new InMemorySigner(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InitDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InitDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_InitDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_InitDecodeErrorZ {
- const ret: bigint = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_InitDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_InitDecodeErrorZ = Result_InitDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Init;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InitDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Init = new Init(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InitDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InitFeaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InitFeaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_InitFeaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_InitFeaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_InitFeaturesDecodeErrorZ = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: InitFeatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: InitFeatures = new InitFeatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InvoiceFeaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_InvoiceFeaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_InvoiceFeaturesDecodeErrorZ = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: InvoiceFeatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InvoiceParseOrSemanticErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InvoiceParseOrSemanticErrorZ_free);
}
/* @internal */
public res: Invoice;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InvoiceParseOrSemanticErrorZ_get_ok(ptr);
const res_hu_conv: Invoice = new Invoice(null, res);
public err: ParseOrSemanticError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InvoiceParseOrSemanticErrorZ_get_err(ptr);
const err_hu_conv: ParseOrSemanticError = ParseOrSemanticError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InvoiceSemanticErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InvoiceSemanticErrorZ_free);
}
/* @internal */
public res: Invoice;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InvoiceSemanticErrorZ_get_ok(ptr);
const res_hu_conv: Invoice = new Invoice(null, res);
public err: SemanticError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_InvoiceSemanticErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_InvoiceSignOrCreationErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_InvoiceSignOrCreationErrorZ_free);
}
/* @internal */
public res: Invoice;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_InvoiceSignOrCreationErrorZ_get_ok(ptr);
const res_hu_conv: Invoice = new Invoice(null, res);
public err: SignOrCreationError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_InvoiceSignOrCreationErrorZ_get_err(ptr);
const err_hu_conv: SignOrCreationError = SignOrCreationError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_LockedChannelMonitorNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_LockedChannelMonitorNoneZ_free);
}
/* @internal */
public res: LockedChannelMonitor;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_LockedChannelMonitorNoneZ_get_ok(ptr);
const res_hu_conv: LockedChannelMonitor = new LockedChannelMonitor(null, res);
export class Result_LockedChannelMonitorNoneZ_Err extends Result_LockedChannelMonitorNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NetAddressDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NetAddressDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NetAddressDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NetAddressDecodeErrorZ {
- const ret: bigint = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NetAddressDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NetAddressDecodeErrorZ = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NetAddress;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NetAddressDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NetAddress = NetAddress.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NetAddressDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NetworkGraphDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NetworkGraphDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NetworkGraphDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NetworkGraphDecodeErrorZ {
- const ret: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NetworkGraphDecodeErrorZ = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NetworkGraph;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NetworkGraph = new NetworkGraph(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeAliasDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeAliasDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeAliasDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeAliasDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeAliasDecodeErrorZ = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeAlias;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeAliasDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeAlias = new NodeAlias(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeAliasDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeAnnouncementDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeAnnouncementDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeAnnouncementDecodeErrorZ = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeAnnouncement;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeAnnouncementInfoDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeAnnouncementInfoDecodeErrorZ = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeAnnouncementInfo;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeFeaturesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeFeaturesDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeFeaturesDecodeErrorZ = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeFeatures;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeFeatures = new NodeFeatures(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeIdDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeIdDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeIdDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeIdDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeIdDecodeErrorZ = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeId;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeIdDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeId = new NodeId(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeIdDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NodeInfoDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NodeInfoDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_NodeInfoDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_NodeInfoDecodeErrorZ {
- const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_NodeInfoDecodeErrorZ = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: NodeInfo;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_NodeInfoDecodeErrorZ_get_ok(ptr);
const res_hu_conv: NodeInfo = new NodeInfo(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NodeInfoDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneAPIErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneAPIErrorZ_free);
}
/* @internal */
export class Result_NoneAPIErrorZ_OK extends Result_NoneAPIErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: APIError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NoneAPIErrorZ_get_err(ptr);
const err_hu_conv: APIError = APIError.constr_from_ptr(err);
+++ /dev/null
-import { TxOut } from '../structs/TxOut.mjs';
-import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
-import { AccessError } from '../enums/AccessError.mjs';
-import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
-import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
-import { CreationError } from '../enums/CreationError.mjs';
-import { Currency } from '../enums/Currency.mjs';
-import { IOError } from '../enums/IOError.mjs';
-import { Level } from '../enums/Level.mjs';
-import { Network } from '../enums/Network.mjs';
-import { Recipient } from '../enums/Recipient.mjs';
-import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
-import { SemanticError } from '../enums/SemanticError.mjs';
-import { SiPrefix } from '../enums/SiPrefix.mjs';
-import { Bech32Error } from '../structs/Bech32Error.mjs';
-import { BlindedRoute } from '../structs/BlindedRoute.mjs';
-import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
-import { DecodeError } from '../structs/DecodeError.mjs';
-import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
-import { BlindedHop } from '../structs/BlindedHop.mjs';
-import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
-import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
-import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
-import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
-import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
-import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
-import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
-import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
-import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
-import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
-import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
-import { Option_u32Z } from '../structs/Option_u32Z.mjs';
-import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
-import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
-import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
-import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
-import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
-import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
-import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
-import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
-import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
-import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
-import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
-import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
-import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
-import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
-import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
-import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
-import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
-import { ShutdownScript } from '../structs/ShutdownScript.mjs';
-import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
-import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
-import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
-import { RouteHop } from '../structs/RouteHop.mjs';
-import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
-import { Route } from '../structs/Route.mjs';
-import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
-import { RouteParameters } from '../structs/RouteParameters.mjs';
-import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
-import { RouteHint } from '../structs/RouteHint.mjs';
-import { Option_u64Z } from '../structs/Option_u64Z.mjs';
-import { PaymentParameters } from '../structs/PaymentParameters.mjs';
-import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
-import { RouteHintHop } from '../structs/RouteHintHop.mjs';
-import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
-import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
-import { ChannelDetails } from '../structs/ChannelDetails.mjs';
-import { LightningError } from '../structs/LightningError.mjs';
-import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
-import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
-import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
-import { ClosureReason } from '../structs/ClosureReason.mjs';
-import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
-import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
-import { HTLCDestination } from '../structs/HTLCDestination.mjs';
-import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
-import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
-import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
-import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
-import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
-import { OutPoint } from '../structs/OutPoint.mjs';
-import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
-import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
-import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
-import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
-import { Event } from '../structs/Event.mjs';
-import { Option_EventZ } from '../structs/Option_EventZ.mjs';
-import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
-import { AcceptChannel } from '../structs/AcceptChannel.mjs';
-import { OpenChannel } from '../structs/OpenChannel.mjs';
-import { FundingCreated } from '../structs/FundingCreated.mjs';
-import { FundingSigned } from '../structs/FundingSigned.mjs';
-import { ChannelReady } from '../structs/ChannelReady.mjs';
-import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
-import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
-import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
-import { ClosingSigned } from '../structs/ClosingSigned.mjs';
-import { Shutdown } from '../structs/Shutdown.mjs';
-import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
-import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
-import { ErrorMessage } from '../structs/ErrorMessage.mjs';
-import { WarningMessage } from '../structs/WarningMessage.mjs';
-import { ErrorAction } from '../structs/ErrorAction.mjs';
-import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
-import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
-import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
-import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
-import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
-import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
-import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
-import { MonitorEvent } from '../structs/MonitorEvent.mjs';
-import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
-import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
-import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
-import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
-import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
-import { NodeId } from '../structs/NodeId.mjs';
-import { Record } from '../structs/Record.mjs';
-import { Logger, LoggerInterface } from '../structs/Logger.mjs';
-import { NetworkGraph } from '../structs/NetworkGraph.mjs';
-import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
-import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
-import { InitFeatures } from '../structs/InitFeatures.mjs';
-import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
-import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
-import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
-import { NodeFeatures } from '../structs/NodeFeatures.mjs';
-import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
-import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
-import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
-import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
-import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
-import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
-import { Access, AccessInterface } from '../structs/Access.mjs';
-import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
-import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
-import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
-import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
-import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
-import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
-import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
-import { ChannelInfo } from '../structs/ChannelInfo.mjs';
-import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
-import { RoutingFees } from '../structs/RoutingFees.mjs';
-import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
-import { Hostname } from '../structs/Hostname.mjs';
-import { NetAddress } from '../structs/NetAddress.mjs';
-import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
-import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
-import { NodeAlias } from '../structs/NodeAlias.mjs';
-import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
-import { NodeInfo } from '../structs/NodeInfo.mjs';
-import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
-import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
-import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
-import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
-import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
-import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
-import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
-import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
-import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
-import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
-import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
-import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
-import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
-import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
-import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
-import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
-import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
-import { Sign, SignInterface } from '../structs/Sign.mjs';
-import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
-import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
-import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
-import { InMemorySigner } from '../structs/InMemorySigner.mjs';
-import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
-import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
-import { Option_u16Z } from '../structs/Option_u16Z.mjs';
-import { APIError } from '../structs/APIError.mjs';
-import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
-import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
-import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
-import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
-import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
-import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
-import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
-import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
-import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
-import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
-import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
-import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
-import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
-import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
-import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
-import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
-import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
-import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
-import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
-import { Watch, WatchInterface } from '../structs/Watch.mjs';
-import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
-import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
-import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
-import { ChannelManager } from '../structs/ChannelManager.mjs';
-import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
-import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
-import { ChannelConfig } from '../structs/ChannelConfig.mjs';
-import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
-import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
-import { Type, TypeInterface } from '../structs/Type.mjs';
-import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
-import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
-import { PaymentError } from '../structs/PaymentError.mjs';
-import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
-import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
-import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
-import { ParseError } from '../structs/ParseError.mjs';
-import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
-import { Invoice } from '../structs/Invoice.mjs';
-import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
-import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
-import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
-import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
-import { RawInvoice } from '../structs/RawInvoice.mjs';
-import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
-import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
-import { PayeePubKey } from '../structs/PayeePubKey.mjs';
-import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
-import { PrivateRoute } from '../structs/PrivateRoute.mjs';
-import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
-import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
-import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
-import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
-import { Description } from '../structs/Description.mjs';
-import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
-import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
-import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
-import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
-import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
-import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
-import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
-import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
-import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
-import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
-import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
-import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
-import { Balance } from '../structs/Balance.mjs';
-import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
-import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
-import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
-import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
-import { PeerHandleError } from '../structs/PeerHandleError.mjs';
-import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
-import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
-import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
-import { SendError } from '../structs/SendError.mjs';
-import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
-import { GraphSyncError } from '../structs/GraphSyncError.mjs';
-import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
-import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
-import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
-import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
-import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
-import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
-import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
-import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
-import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
-import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
-import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
-import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
-import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
-import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
-import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
-import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
-import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
-import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
-import { Init } from '../structs/Init.mjs';
-import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
-import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
-import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
-import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
-import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
-import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
-import { UpdateFee } from '../structs/UpdateFee.mjs';
-import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
-import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
-import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
-import { OnionMessage } from '../structs/OnionMessage.mjs';
-import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
-import { Ping } from '../structs/Ping.mjs';
-import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
-import { Pong } from '../structs/Pong.mjs';
-import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
-import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
-import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
-import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
-import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
-import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
-import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
-import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
-import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
-import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
-import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
-import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
-import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
-import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
-import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
-import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
-import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
-import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
-import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
-import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
-import { WatchedOutput } from '../structs/WatchedOutput.mjs';
-import { Filter, FilterInterface } from '../structs/Filter.mjs';
-import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
-import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
-import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
-import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
-import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
-import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
-import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
-import { BigSize } from '../structs/BigSize.mjs';
-import { ChannelUsage } from '../structs/ChannelUsage.mjs';
-import { Score, ScoreInterface } from '../structs/Score.mjs';
-import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
-import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
-import { Persister, PersisterInterface } from '../structs/Persister.mjs';
-import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
-import { Future } from '../structs/Future.mjs';
-import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
-import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
-import { UserConfig } from '../structs/UserConfig.mjs';
-import { BestBlock } from '../structs/BestBlock.mjs';
-import { Listen, ListenInterface } from '../structs/Listen.mjs';
-import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
-import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
-import { Persist, PersistInterface } from '../structs/Persist.mjs';
-import { ChainMonitor } from '../structs/ChainMonitor.mjs';
-import { KeysManager } from '../structs/KeysManager.mjs';
-import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
-import { ChainParameters } from '../structs/ChainParameters.mjs';
-import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
-import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
-import { ExpandedKey } from '../structs/ExpandedKey.mjs';
-import { DataLossProtect } from '../structs/DataLossProtect.mjs';
-import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
-import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
-import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
-import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
-import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
-import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
-import { MessageHandler } from '../structs/MessageHandler.mjs';
-import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
-import { PeerManager } from '../structs/PeerManager.mjs';
-import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
-import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
-import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
-import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
-import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
-import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
-import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
-import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
-import { OnionMessenger } from '../structs/OnionMessenger.mjs';
-import { Destination } from '../structs/Destination.mjs';
-import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
-import { RawDataPart } from '../structs/RawDataPart.mjs';
-import { Sha256 } from '../structs/Sha256.mjs';
-import { ExpiryTime } from '../structs/ExpiryTime.mjs';
-import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
-import { Fallback } from '../structs/Fallback.mjs';
-import { Payer, PayerInterface } from '../structs/Payer.mjs';
-import { Router, RouterInterface } from '../structs/Router.mjs';
-import { InvoicePayer } from '../structs/InvoicePayer.mjs';
-import { Retry } from '../structs/Retry.mjs';
-import { DefaultRouter } from '../structs/DefaultRouter.mjs';
-
-import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
-import * as bindings from '../bindings.mjs'
-
-
-
-export class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
- super(ptr, bindings.CResult_NoneChannelMonitorUpdateErrZ_free);
- }
- /* @internal */
- public static constr_from_ptr(ptr: bigint): Result_NoneChannelMonitorUpdateErrZ {
- if (bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(ptr)) {
- return new Result_NoneChannelMonitorUpdateErrZ_OK(null, ptr);
- } else {
- return new Result_NoneChannelMonitorUpdateErrZ_Err(null, ptr);
- }
- }
- /**
- * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state.
- */
- public static constructor_ok(): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state.
- */
- public static constructor_err(e: ChannelMonitorUpdateErr): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Checks if the given object is currently in the success state
- */
- public is_ok(): boolean {
- const ret: boolean = bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(this.ptr);
- return ret;
- }
-
- public clone_ptr(): bigint {
- const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(this.ptr);
- return ret;
- }
-
- /**
- * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public clone(): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-export class Result_NoneChannelMonitorUpdateErrZ_OK extends Result_NoneChannelMonitorUpdateErrZ {
-
- /* @internal */
- public constructor(_dummy: object, ptr: bigint) {
- super(_dummy, ptr);
- }
-}
-export class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
- public err: ChannelMonitorUpdateErr;
-
- /* @internal */
- public constructor(_dummy: object, ptr: bigint) {
- super(_dummy, ptr);
- this.err = bindings.CResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
- }
-}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneErrorZ_free);
}
/* @internal */
export class Result_NoneErrorZ_OK extends Result_NoneErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: IOError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_NoneErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneLightningErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneLightningErrorZ_free);
}
/* @internal */
export class Result_NoneLightningErrorZ_OK extends Result_NoneLightningErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: LightningError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NoneLightningErrorZ_get_err(ptr);
const err_hu_conv: LightningError = new LightningError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneNoneZ_free);
}
/* @internal */
export class Result_NoneNoneZ_OK extends Result_NoneNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
export class Result_NoneNoneZ_Err extends Result_NoneNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NonePaymentSendFailureZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NonePaymentSendFailureZ_free);
}
/* @internal */
export class Result_NonePaymentSendFailureZ_OK extends Result_NonePaymentSendFailureZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: PaymentSendFailure;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NonePaymentSendFailureZ_get_err(ptr);
const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NonePeerHandleErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NonePeerHandleErrorZ_free);
}
/* @internal */
export class Result_NonePeerHandleErrorZ_OK extends Result_NonePeerHandleErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: PeerHandleError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NonePeerHandleErrorZ_get_err(ptr);
const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneSemanticErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneSemanticErrorZ_free);
}
/* @internal */
export class Result_NoneSemanticErrorZ_OK extends Result_NoneSemanticErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: SemanticError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_NoneSemanticErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_NoneSendErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_NoneSendErrorZ_free);
}
/* @internal */
export class Result_NoneSendErrorZ_OK extends Result_NoneSendErrorZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
public err: SendError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_NoneSendErrorZ_get_err(ptr);
const err_hu_conv: SendError = SendError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_OnionMessageDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_OnionMessageDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_OnionMessageDecodeErrorZ {
- const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_OnionMessageDecodeErrorZ = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: OnionMessage;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_OnionMessageDecodeErrorZ_get_ok(ptr);
const res_hu_conv: OnionMessage = new OnionMessage(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_OnionMessageDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_OpenChannelDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_OpenChannelDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_OpenChannelDecodeErrorZ {
- const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_OpenChannelDecodeErrorZ = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: OpenChannel;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_OpenChannelDecodeErrorZ_get_ok(ptr);
const res_hu_conv: OpenChannel = new OpenChannel(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_OpenChannelDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_OutPointDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_OutPointDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_OutPointDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_OutPointDecodeErrorZ {
- const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_OutPointDecodeErrorZ = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: OutPoint;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_OutPointDecodeErrorZ_get_ok(ptr);
const res_hu_conv: OutPoint = new OutPoint(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_OutPointDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PayeePubKeyErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PayeePubKeyErrorZ_free);
}
/* @internal */
public res: PayeePubKey;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PayeePubKeyErrorZ_get_ok(ptr);
const res_hu_conv: PayeePubKey = new PayeePubKey(null, res);
public err: Secp256k1Error;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_PayeePubKeyErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentIdPaymentErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentIdPaymentErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PaymentIdPaymentErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: PaymentError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentIdPaymentErrorZ_get_err(ptr);
const err_hu_conv: PaymentError = PaymentError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentIdPaymentSendFailureZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentIdPaymentSendFailureZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PaymentIdPaymentSendFailureZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: PaymentSendFailure;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentIdPaymentSendFailureZ_get_err(ptr);
const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentParametersDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentParametersDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_PaymentParametersDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_PaymentParametersDecodeErrorZ {
- const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_PaymentParametersDecodeErrorZ = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: PaymentParameters;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_get_ok(ptr);
const res_hu_conv: PaymentParameters = new PaymentParameters(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentPreimageAPIErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentPreimageAPIErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PaymentPreimageAPIErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: APIError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentPreimageAPIErrorZ_get_err(ptr);
const err_hu_conv: APIError = APIError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentPurposeDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_PaymentPurposeDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_PaymentPurposeDecodeErrorZ {
- const ret: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_PaymentPurposeDecodeErrorZ = Result_PaymentPurposeDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: PaymentPurpose;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_get_ok(ptr);
const res_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentSecretAPIErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentSecretAPIErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PaymentSecretAPIErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: APIError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PaymentSecretAPIErrorZ_get_err(ptr);
const err_hu_conv: APIError = APIError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PaymentSecretNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PaymentSecretNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PaymentSecretNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_PaymentSecretNoneZ_Err extends Result_PaymentSecretNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PhantomRouteHintsDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_PhantomRouteHintsDecodeErrorZ {
- const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_PhantomRouteHintsDecodeErrorZ = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: PhantomRouteHints;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_get_ok(ptr);
const res_hu_conv: PhantomRouteHints = new PhantomRouteHints(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PingDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PingDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_PingDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_PingDecodeErrorZ {
- const ret: bigint = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_PingDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_PingDecodeErrorZ = Result_PingDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Ping;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PingDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Ping = new Ping(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PingDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PongDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PongDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_PongDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_PongDecodeErrorZ {
- const ret: bigint = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_PongDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_PongDecodeErrorZ = Result_PongDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Pong;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PongDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Pong = new Pong(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_PongDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PositiveTimestampCreationErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PositiveTimestampCreationErrorZ_free);
}
/* @internal */
public res: PositiveTimestamp;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PositiveTimestampCreationErrorZ_get_ok(ptr);
const res_hu_conv: PositiveTimestamp = new PositiveTimestamp(null, res);
public err: CreationError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_PositiveTimestampCreationErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PrivateRouteCreationErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PrivateRouteCreationErrorZ_free);
}
/* @internal */
public res: PrivateRoute;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_PrivateRouteCreationErrorZ_get_ok(ptr);
const res_hu_conv: PrivateRoute = new PrivateRoute(null, res);
public err: CreationError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_PrivateRouteCreationErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ProbabilisticScorerDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ProbabilisticScorerDecodeErrorZ {
- const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ProbabilisticScorerDecodeErrorZ = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ProbabilisticScorer;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ProbabilisticScorer = new ProbabilisticScorer(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_PublicKeyErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_PublicKeyErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_PublicKeyErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: Secp256k1Error;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_PublicKeyErrorZ_get_err(ptr);
}
--- /dev/null
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+export class Result_PublicKeyNoneZ extends CommonBase {
+ protected constructor(_dummy: null, ptr: bigint) {
+ super(ptr, bindings.CResult_PublicKeyNoneZ_free);
+ }
+ /* @internal */
+ public static constr_from_ptr(ptr: bigint): Result_PublicKeyNoneZ {
+ if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) {
+ return new Result_PublicKeyNoneZ_OK(null, ptr);
+ } else {
+ return new Result_PublicKeyNoneZ_Err(null, ptr);
+ }
+ }
+ /**
+ * Creates a new CResult_PublicKeyNoneZ in the success state.
+ */
+ public static constructor_ok(o: Uint8Array): Result_PublicKeyNoneZ {
+ const ret: bigint = bindings.CResult_PublicKeyNoneZ_ok(bindings.encodeUint8Array(bindings.check_arr_len(o, 33)));
+ const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PublicKeyNoneZ in the error state.
+ */
+ public static constructor_err(): Result_PublicKeyNoneZ {
+ const ret: bigint = bindings.CResult_PublicKeyNoneZ_err();
+ const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public is_ok(): boolean {
+ const ret: boolean = bindings.CResult_PublicKeyNoneZ_is_ok(this.ptr);
+ return ret;
+ }
+
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.CResult_PublicKeyNoneZ_clone_ptr(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_PublicKeyNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public clone(): Result_PublicKeyNoneZ {
+ const ret: bigint = bindings.CResult_PublicKeyNoneZ_clone(this.ptr);
+ const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+export class Result_PublicKeyNoneZ_OK extends Result_PublicKeyNoneZ {
+ public res: Uint8Array;
+
+ /* @internal */
+ public constructor(_dummy: null, ptr: bigint) {
+ super(_dummy, ptr);
+ const res: number = bindings.CResult_PublicKeyNoneZ_get_ok(ptr);
+ const res_conv: Uint8Array = bindings.decodeUint8Array(res);
+ this.res = res_conv;
+ }
+}
+export class Result_PublicKeyNoneZ_Err extends Result_PublicKeyNoneZ {
+
+ /* @internal */
+ public constructor(_dummy: null, ptr: bigint) {
+ super(_dummy, ptr);
+ }
+}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_QueryChannelRangeDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_QueryChannelRangeDecodeErrorZ {
- const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_QueryChannelRangeDecodeErrorZ = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: QueryChannelRange;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_get_ok(ptr);
const res_hu_conv: QueryChannelRange = new QueryChannelRange(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_QueryShortChannelIdsDecodeErrorZ {
- const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_QueryShortChannelIdsDecodeErrorZ = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: QueryShortChannelIds;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(ptr);
const res_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RecoverableSignatureNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RecoverableSignatureNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_RecoverableSignatureNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_RecoverableSignatureNoneZ_Err extends Result_RecoverableSignatureNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ReplyChannelRangeDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ReplyChannelRangeDecodeErrorZ {
- const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ReplyChannelRangeDecodeErrorZ = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ReplyChannelRange;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ReplyShortChannelIdsEndDecodeErrorZ {
- const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ReplyShortChannelIdsEndDecodeErrorZ = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ReplyShortChannelIdsEnd;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RevokeAndACKDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RevokeAndACKDecodeErrorZ {
- const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RevokeAndACKDecodeErrorZ = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RevokeAndACK;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RevokeAndACK = new RevokeAndACK(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RouteDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RouteDecodeErrorZ {
- const ret: bigint = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RouteDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RouteDecodeErrorZ = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Route;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Route = new Route(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteHintDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteHintDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RouteHintDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RouteHintDecodeErrorZ {
- const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RouteHintDecodeErrorZ = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RouteHint;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteHintDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RouteHint = new RouteHint(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteHintDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteHintHopDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteHintHopDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RouteHintHopDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RouteHintHopDecodeErrorZ {
- const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RouteHintHopDecodeErrorZ = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RouteHintHop;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RouteHintHop = new RouteHintHop(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteHopDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteHopDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RouteHopDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RouteHopDecodeErrorZ {
- const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RouteHopDecodeErrorZ = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RouteHop;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteHopDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RouteHop = new RouteHop(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteHopDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteLightningErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteLightningErrorZ_free);
}
/* @internal */
public res: Route;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteLightningErrorZ_get_ok(ptr);
const res_hu_conv: Route = new Route(null, res);
public err: LightningError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteLightningErrorZ_get_err(ptr);
const err_hu_conv: LightningError = new LightningError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RouteParametersDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RouteParametersDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RouteParametersDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RouteParametersDecodeErrorZ {
- const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RouteParametersDecodeErrorZ = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RouteParameters;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RouteParametersDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RouteParameters = new RouteParameters(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RouteParametersDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_RoutingFeesDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_RoutingFeesDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_RoutingFeesDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_RoutingFeesDecodeErrorZ {
- const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_RoutingFeesDecodeErrorZ = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: RoutingFees;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_get_ok(ptr);
const res_hu_conv: RoutingFees = new RoutingFees(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SecretKeyErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SecretKeyErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_SecretKeyErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: Secp256k1Error;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_SecretKeyErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SecretKeyNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SecretKeyNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_SecretKeyNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_SecretKeyNoneZ_Err extends Result_SecretKeyNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SharedSecretNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SharedSecretNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_SharedSecretNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_SharedSecretNoneZ_Err extends Result_SharedSecretNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ShutdownDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ShutdownDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ShutdownDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ShutdownDecodeErrorZ {
- const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ShutdownDecodeErrorZ = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Shutdown;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ShutdownDecodeErrorZ_get_ok(ptr);
const res_hu_conv: Shutdown = new Shutdown(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ShutdownDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ShutdownScriptDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_ShutdownScriptDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_ShutdownScriptDecodeErrorZ {
- const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_ShutdownScriptDecodeErrorZ = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: ShutdownScript;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_get_ok(ptr);
const res_hu_conv: ShutdownScript = new ShutdownScript(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free);
}
/* @internal */
public res: ShutdownScript;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(ptr);
const res_hu_conv: ShutdownScript = new ShutdownScript(null, res);
public err: InvalidShutdownScript;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(ptr);
const err_hu_conv: InvalidShutdownScript = new InvalidShutdownScript(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SiPrefixParseErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SiPrefixParseErrorZ_free);
}
/* @internal */
public res: SiPrefix;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.res = bindings.CResult_SiPrefixParseErrorZ_get_ok(ptr);
}
public err: ParseError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_SiPrefixParseErrorZ_get_err(ptr);
const err_hu_conv: ParseError = ParseError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SignDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SignDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_SignDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_SignDecodeErrorZ {
- const ret: bigint = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_SignDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_SignDecodeErrorZ = Result_SignDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: Sign;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_SignDecodeErrorZ_get_ok(ptr);
const ret_hu_conv: Sign = new Sign(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_SignDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SignatureNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SignatureNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_SignatureNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SignedRawInvoiceParseErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SignedRawInvoiceParseErrorZ_free);
}
/* @internal */
public res: SignedRawInvoice;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_SignedRawInvoiceParseErrorZ_get_ok(ptr);
const res_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, res);
public err: ParseError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_SignedRawInvoiceParseErrorZ_get_err(ptr);
const err_hu_conv: ParseError = ParseError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_SpendableOutputDescriptorDecodeErrorZ {
- const ret: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_SpendableOutputDescriptorDecodeErrorZ = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: SpendableOutputDescriptor;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(ptr);
const res_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_StaticPaymentOutputDescriptorDecodeErrorZ {
- const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_StaticPaymentOutputDescriptorDecodeErrorZ = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: StaticPaymentOutputDescriptor;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(ptr);
const res_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_StringErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_StringErrorZ_free);
}
/* @internal */
public res: string;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_StringErrorZ_get_ok(ptr);
const res_conv: string = bindings.decodeString(res);
public err: Secp256k1Error;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_StringErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TransactionNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TransactionNoneZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult_TransactionNoneZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
export class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TrustedClosingTransactionNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TrustedClosingTransactionNoneZ_free);
}
/* @internal */
public res: TrustedClosingTransaction;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_TrustedClosingTransactionNoneZ_get_ok(ptr);
const res_hu_conv: TrustedClosingTransaction = new TrustedClosingTransaction(null, res);
export class Result_TrustedClosingTransactionNoneZ_Err extends Result_TrustedClosingTransactionNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TrustedCommitmentTransactionNoneZ_free);
}
/* @internal */
public res: TrustedCommitmentTransaction;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_TrustedCommitmentTransactionNoneZ_get_ok(ptr);
const res_hu_conv: TrustedCommitmentTransaction = new TrustedCommitmentTransaction(null, res);
export class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
}
}
\ No newline at end of file
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TxCreationKeysDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_TxCreationKeysDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_TxCreationKeysDecodeErrorZ {
- const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_TxCreationKeysDecodeErrorZ = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: TxCreationKeys;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_get_ok(ptr);
const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TxCreationKeysErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TxCreationKeysErrorZ_free);
}
/* @internal */
public res: TxCreationKeys;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_TxCreationKeysErrorZ_get_ok(ptr);
const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
public err: Secp256k1Error;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_TxCreationKeysErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_TxOutAccessErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_TxOutAccessErrorZ_free);
}
/* @internal */
public res: TxOut;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_TxOutAccessErrorZ_get_ok(ptr);
const res_conv: TxOut = new TxOut(null, res);
public err: AccessError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.err = bindings.CResult_TxOutAccessErrorZ_get_err(ptr);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UnsignedChannelAnnouncementDecodeErrorZ {
- const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UnsignedChannelAnnouncementDecodeErrorZ = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UnsignedChannelAnnouncement;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UnsignedChannelUpdateDecodeErrorZ {
- const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UnsignedChannelUpdateDecodeErrorZ = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UnsignedChannelUpdate;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UnsignedNodeAnnouncementDecodeErrorZ {
- const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UnsignedNodeAnnouncementDecodeErrorZ = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UnsignedNodeAnnouncement;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UpdateAddHTLCDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UpdateAddHTLCDecodeErrorZ {
- const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UpdateAddHTLCDecodeErrorZ = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UpdateAddHTLC;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UpdateFailHTLCDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UpdateFailHTLCDecodeErrorZ {
- const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UpdateFailHTLCDecodeErrorZ = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UpdateFailHTLC;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UpdateFailMalformedHTLCDecodeErrorZ {
- const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UpdateFailMalformedHTLCDecodeErrorZ = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UpdateFailMalformedHTLC;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UpdateFeeDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UpdateFeeDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UpdateFeeDecodeErrorZ {
- const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UpdateFeeDecodeErrorZ = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UpdateFee;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UpdateFee = new UpdateFee(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_UpdateFulfillHTLCDecodeErrorZ {
- const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_UpdateFulfillHTLCDecodeErrorZ = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: UpdateFulfillHTLC;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(ptr);
const res_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_WarningMessageDecodeErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_WarningMessageDecodeErrorZ_free);
}
/* @internal */
* Creates a new CResult_WarningMessageDecodeErrorZ in the error state.
*/
public static constructor_err(e: DecodeError): Result_WarningMessageDecodeErrorZ {
- const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+ const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
const ret_hu_conv: Result_WarningMessageDecodeErrorZ = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret);
- CommonBase.add_ref_from(ret_hu_conv, e);
return ret_hu_conv;
}
public res: WarningMessage;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: bigint = bindings.CResult_WarningMessageDecodeErrorZ_get_ok(ptr);
const res_hu_conv: WarningMessage = new WarningMessage(null, res);
public err: DecodeError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_WarningMessageDecodeErrorZ_get_err(ptr);
- const err_hu_conv: DecodeError = new DecodeError(null, err);
+ const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
CommonBase.add_ref_from(err_hu_conv, this);
this.err = err_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result__u832APIErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult__u832APIErrorZ_free);
}
/* @internal */
public res: Uint8Array;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const res: number = bindings.CResult__u832APIErrorZ_get_ok(ptr);
const res_conv: Uint8Array = bindings.decodeUint8Array(res);
public err: APIError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult__u832APIErrorZ_get_err(ptr);
const err_hu_conv: APIError = APIError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_boolLightningErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_boolLightningErrorZ_free);
}
/* @internal */
public res: boolean;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.res = bindings.CResult_boolLightningErrorZ_get_ok(ptr);
}
public err: LightningError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_boolLightningErrorZ_get_err(ptr);
const err_hu_conv: LightningError = new LightningError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_boolPeerHandleErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_boolPeerHandleErrorZ_free);
}
/* @internal */
public res: boolean;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.res = bindings.CResult_boolPeerHandleErrorZ_get_ok(ptr);
}
public err: PeerHandleError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_boolPeerHandleErrorZ_get_err(ptr);
const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
export class Result_u32GraphSyncErrorZ extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) {
+ protected constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.CResult_u32GraphSyncErrorZ_free);
}
/* @internal */
public res: number;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
this.res = bindings.CResult_u32GraphSyncErrorZ_get_ok(ptr);
}
public err: GraphSyncError;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(_dummy, ptr);
const err: bigint = bindings.CResult_u32GraphSyncErrorZ_get_err(ptr);
const err_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(err);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* Strategies available to retry payment path failures for an [`Invoice`].
*/
export class Retry extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Retry_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Retry_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): Retry {
const raw_ty: number = bindings.LDKRetry_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RevokeAndACK extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RevokeAndACK_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two RevokeAndACKs 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.
+ */
+ public eq(b: RevokeAndACK): boolean {
+ const ret: boolean = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the RevokeAndACK object into a byte array which can be read by RevokeAndACK_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Route extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Route_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_payment_params(val: PaymentParameters): void {
+ public set_payment_params(val: PaymentParameters|null): void {
bindings.Route_set_payment_params(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
CommonBase.add_ref_from(this, val);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RouteHint extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RouteHint_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RouteHintHop extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RouteHintHop_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RouteHop extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RouteHop_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RouteParameters extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RouteParameters_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKRouterHolder {
- held: Router;
+ held: Router|null = null;
}
/**
*/
export class Router extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKRouter;
+ public bindings_instance: bindings.LDKRouter|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Router_free);
this.bindings_instance = null;
}
const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
const first_hops_conv_16_len: number = bindings.getArrayLength(first_hops);
const first_hops_conv_16_arr: ChannelDetails[] = new Array(first_hops_conv_16_len).fill(null);
- for (var q = 0; q < first_hops_conv_16_len; q++) {
- const first_hops_conv_16: bigint = bindings.getU64ArrayElem(first_hops, q);
- const first_hops_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, first_hops_conv_16);
- CommonBase.add_ref_from(first_hops_conv_16_hu_conv, this);
- first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+ if (first_hops != null) {
+ for (var q = 0; q < first_hops_conv_16_len; q++) {
+ const first_hops_conv_16: bigint = bindings.getU64ArrayElem(first_hops, q);
+ const first_hops_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, first_hops_conv_16);
+ CommonBase.add_ref_from(first_hops_conv_16_hu_conv, this);
+ first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+ }
}
bindings.freeWasmMemory(first_hops)
const inflight_htlcs_hu_conv: InFlightHtlcs = new InFlightHtlcs(null, inflight_htlcs);
impl_holder.held = new Router(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
*
* Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public find_route(payer: Uint8Array, route_params: RouteParameters, payment_hash: Uint8Array, first_hops: ChannelDetails[], inflight_htlcs: InFlightHtlcs): Result_RouteLightningErrorZ {
+ public find_route(payer: Uint8Array, route_params: RouteParameters, payment_hash: Uint8Array, first_hops: ChannelDetails[]|null, inflight_htlcs: InFlightHtlcs): Result_RouteLightningErrorZ {
const ret: bigint = bindings.Router_find_route(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), inflight_htlcs == null ? 0n : CommonBase.get_ptr_of(inflight_htlcs));
const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, route_params);
- first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); });
+ if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); }) };
CommonBase.add_ref_from(this, inflight_htlcs);
// Due to rust's strict-ownership memory model, in some cases we need to "move"
// an object to pass exclusive ownership to the function being called.
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class RoutingFees extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RoutingFees_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
/**Called when a connection is established with a peer. This can be used to
* perform routing table synchronization using a strategy defined by the
* implementor.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- peer_connected(their_node_id: Uint8Array, init: Init): void;
+ peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ;
/**Handles the reply of a query we initiated to learn about channels
* for a given range of blocks. We can expect to receive one or more
* replies to a single query.
}
class LDKRoutingMessageHandlerHolder {
- held: RoutingMessageHandler;
+ held: RoutingMessageHandler|null = null;
}
/**
*/
export class RoutingMessageHandler extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKRoutingMessageHandler;
+ public bindings_instance: bindings.LDKRoutingMessageHandler|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.RoutingMessageHandler_free);
this.bindings_instance = null;
}
const result: bigint = ret == null ? 0n : ret.clone_ptr();
return result;
},
- peer_connected (their_node_id: number, init: bigint): void {
+ peer_connected (their_node_id: number, init: bigint): bigint {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
const init_hu_conv: Init = new Init(null, init);
- arg.peer_connected(their_node_id_conv, init_hu_conv);
+ const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv);
+ const result: bigint = ret == null ? 0n : ret.clone_ptr();
+ return result;
},
handle_reply_channel_range (their_node_id: number, msg: bigint): bigint {
const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
},
} as bindings.LDKRoutingMessageHandler;
const messageSendEventsProvider = MessageSendEventsProvider.new_impl(messageSendEventsProvider_impl, );
- const ptr_idx: [bigint, number] = bindings.LDKRoutingMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx);
+ const ptr_idx: [bigint, number] = bindings.LDKRoutingMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx!);
impl_holder.held = new RoutingMessageHandler(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(messageSendEventsProvider);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
* Note that starting_point (or a relevant inner pointer) may be NULL or all-0s to represent None
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public get_next_node_announcement(starting_point: Uint8Array): NodeAnnouncement {
+ public get_next_node_announcement(starting_point: Uint8Array|null): NodeAnnouncement {
const ret: bigint = bindings.RoutingMessageHandler_get_next_node_announcement(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(starting_point, 33)));
const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
* Called when a connection is established with a peer. This can be used to
* perform routing table synchronization using a strategy defined by the
* implementor.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
*/
- public peer_connected(their_node_id: Uint8Array, init: Init): void {
- bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+ public peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ {
+ const ret: bigint = bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+ const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
CommonBase.add_ref_from(this, init);
+ return ret_hu_conv;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKScoreHolder {
- held: Score;
+ held: Score|null = null;
}
/**
*/
export class Score extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKScore;
+ public bindings_instance: bindings.LDKScore|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Score_free);
this.bindings_instance = null;
}
impl_holder.held = new Score(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
/**
* Errors that may occur when [sending an onion message].
*
- * [sending an onion message]: OnionMessenger::send_onion_message
+ * [sending an onion message]: OnionMessenger::send_custom_onion_message
*/
export class SendError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SendError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SendError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): SendError {
const raw_ty: number = bindings.LDKSendError_ty_from_ptr(ptr);
case 1: return new SendError_TooBigPacket(ptr);
case 2: return new SendError_TooFewBlindedHops(ptr);
case 3: return new SendError_InvalidFirstHop(ptr);
- case 4: return new SendError_BufferFull(ptr);
+ case 4: return new SendError_InvalidMessage(ptr);
+ case 5: return new SendError_BufferFull(ptr);
default:
throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
}
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new InvalidMessage-variant SendError
+ */
+ public static constructor_invalid_message(): SendError {
+ const ret: bigint = bindings.SendError_invalid_message();
+ const ret_hu_conv: SendError = SendError.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new BufferFull-variant SendError
*/
return ret_hu_conv;
}
+ /**
+ * Checks if two SendErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: SendError): boolean {
+ const ret: boolean = bindings.SendError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
}
/** A SendError of type Secp256k1 */
export class SendError_Secp256k1 extends SendError {
super(null, ptr);
}
}
+/** A SendError of type InvalidMessage */
+export class SendError_InvalidMessage extends SendError {
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ }
+}
/** A SendError of type BufferFull */
export class SendError_BufferFull extends SendError {
/* @internal */
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Sha256 extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Sha256_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class Shutdown extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Shutdown_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two Shutdowns 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.
+ */
+ public eq(b: Shutdown): boolean {
+ const ret: boolean = bindings.Shutdown_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the Shutdown object into a byte array which can be read by Shutdown_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ShutdownScript extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.ShutdownScript_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two ShutdownScripts 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.
+ */
+ public eq(b: ShutdownScript): boolean {
+ const ret: boolean = bindings.ShutdownScript_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the ShutdownScript object into a byte array which can be read by ShutdownScript_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKSignHolder {
- held: Sign;
+ held: Sign|null = null;
}
/**
*/
export class Sign extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKSign;
+ public bindings_instance: bindings.LDKSign|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Sign_free);
this.bindings_instance = null;
}
},
} as bindings.LDKSign;
const baseSign = BaseSign.new_impl(baseSign_impl, pubkeys, );
- const ptr_idx: [bigint, number] = bindings.LDKSign_new(structImplementation, baseSign.instance_idx, pubkeys == null ? 0n : pubkeys.clone_ptr());
+ const ptr_idx: [bigint, number] = bindings.LDKSign_new(structImplementation, baseSign.instance_idx!, pubkeys == null ? 0n : pubkeys.clone_ptr());
impl_holder.held = new Sign(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(baseSign);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* may occur.
*/
export class SignOrCreationError extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SignOrCreationError_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SignOrCreationError_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): SignOrCreationError {
const raw_ty: number = bindings.LDKSignOrCreationError_ty_from_ptr(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class SignedRawInvoice extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.SignedRawInvoice_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { PeerManager } from '../structs/PeerManager.mjs';
}
class LDKSocketDescriptorHolder {
- held: SocketDescriptor;
+ held: SocketDescriptor|null = null;
}
/**
*/
export class SocketDescriptor extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKSocketDescriptor;
+ public bindings_instance: bindings.LDKSocketDescriptor|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.SocketDescriptor_free);
this.bindings_instance = null;
}
impl_holder.held = new SocketDescriptor(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* that txid/index, and any keys or other information required to sign.
*/
export class SpendableOutputDescriptor extends CommonBase {
- protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SpendableOutputDescriptor_free); }
+ protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SpendableOutputDescriptor_free); }
/* @internal */
public static constr_from_ptr(ptr: bigint): SpendableOutputDescriptor {
const raw_ty: number = bindings.LDKSpendableOutputDescriptor_ty_from_ptr(ptr);
return ret_hu_conv;
}
+ /**
+ * Checks if two SpendableOutputDescriptors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public eq(b: SpendableOutputDescriptor): boolean {
+ const ret: boolean = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ return ret;
+ }
+
/**
* Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class StaticPaymentOutputDescriptor extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.StaticPaymentOutputDescriptor_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two StaticPaymentOutputDescriptors 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.
+ */
+ public eq(b: StaticPaymentOutputDescriptor): boolean {
+ const ret: boolean = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TrustedClosingTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.TrustedClosingTransaction_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TrustedCommitmentTransaction extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.TrustedCommitmentTransaction_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_BlockHashChannelManagerZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_BlockHashChannelManagerZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { Balance } from '../structs/Balance.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_BlockHashChannelMonitorZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_BlockHashChannelMonitorZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_OutPointScriptZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_OutPointScriptZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_PaymentHashPaymentIdZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_PaymentHashPaymentIdZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_PaymentHashPaymentSecretZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { Balance } from '../structs/Balance.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_PublicKeyTypeZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_PublicKeyTypeZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_SignatureCVec_SignatureZZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_SignatureSignatureZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_SignatureSignatureZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_u32ScriptZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_u32ScriptZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_u32TxOutZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_u32TxOutZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_u64u64Z extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_u64u64Z_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TwoTuple_usizeTransactionZ extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.C2Tuple_usizeTransactionZ_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class TxCreationKeys extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.TxCreationKeys_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two TxCreationKeyss 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.
+ */
+ public eq(b: TxCreationKeys): boolean {
+ const ret: boolean = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
public clone_ptr(): bigint {
const ret: bigint = bindings.TxCreationKeys_clone_ptr(this.ptr);
return ret;
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
public value: bigint;
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.TxOut_free);
this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
this.value = bindings.TxOut_get_value(ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKTypeHolder {
- held: Type;
+ held: Type|null = null;
}
/**
*/
export class Type extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKType;
+ public bindings_instance: bindings.LDKType|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Type_free);
this.bindings_instance = null;
}
impl_holder.held = new Type(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UnsignedChannelAnnouncement extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UnsignedChannelAnnouncement_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UnsignedChannelAnnouncements 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.
+ */
+ public eq(b: UnsignedChannelAnnouncement): boolean {
+ const ret: boolean = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UnsignedChannelAnnouncement object into a byte array which can be read by UnsignedChannelAnnouncement_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UnsignedChannelUpdate extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UnsignedChannelUpdate_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UnsignedChannelUpdates 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.
+ */
+ public eq(b: UnsignedChannelUpdate): boolean {
+ const ret: boolean = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UnsignedChannelUpdate object into a byte array which can be read by UnsignedChannelUpdate_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UnsignedNodeAnnouncement extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UnsignedNodeAnnouncement_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UnsignedNodeAnnouncements 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.
+ */
+ public eq(b: UnsignedNodeAnnouncement): boolean {
+ const ret: boolean = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UnsignedNodeAnnouncement object into a byte array which can be read by UnsignedNodeAnnouncement_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UpdateAddHTLC extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UpdateAddHTLC_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UpdateAddHTLCs 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.
+ */
+ public eq(b: UpdateAddHTLC): boolean {
+ const ret: boolean = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UpdateAddHTLC object into a byte array which can be read by UpdateAddHTLC_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UpdateFailHTLC extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UpdateFailHTLC_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UpdateFailHTLCs 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.
+ */
+ public eq(b: UpdateFailHTLC): boolean {
+ const ret: boolean = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UpdateFailMalformedHTLC extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UpdateFailMalformedHTLC_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UpdateFailMalformedHTLCs 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.
+ */
+ public eq(b: UpdateFailMalformedHTLC): boolean {
+ const ret: boolean = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UpdateFailMalformedHTLC object into a byte array which can be read by UpdateFailMalformedHTLC_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UpdateFee extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UpdateFee_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UpdateFees 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.
+ */
+ public eq(b: UpdateFee): boolean {
+ const ret: boolean = bindings.UpdateFee_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UpdateFee object into a byte array which can be read by UpdateFee_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UpdateFulfillHTLC extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UpdateFulfillHTLC_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two UpdateFulfillHTLCs 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.
+ */
+ public eq(b: UpdateFulfillHTLC): boolean {
+ const ret: boolean = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the UpdateFulfillHTLC object into a byte array which can be read by UpdateFulfillHTLC_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class UserConfig extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.UserConfig_free);
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
return ret_hu_conv;
}
+ /**
+ * Fetches the set of [`NodeFeatures`] flags which are provided by or required by
+ * [`ChannelManager`].
+ */
+ public static constructor_provided_node_features(): NodeFeatures {
+ const ret: bigint = bindings.provided_node_features();
+ const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
+ * [`ChannelManager`].
+ */
+ public static constructor_provided_channel_features(): ChannelFeatures {
+ const ret: bigint = bindings.provided_channel_features();
+ const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Fetches the set of [`InitFeatures`] flags which are provided by or required by
+ * [`ChannelManager`].
+ */
+ public static constructor_provided_init_features(): InitFeatures {
+ const ret: bigint = bindings.provided_init_features();
+ const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ return ret_hu_conv;
+ }
+
/**
* Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
*/
*
* Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[], logger: Logger, scorer: Score, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
+ public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[]|null, logger: Logger, scorer: Score, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
const ret: bigint = bindings.find_route(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), logger == null ? 0n : CommonBase.get_ptr_of(logger), scorer == null ? 0n : CommonBase.get_ptr_of(scorer), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32)));
const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, route_params);
CommonBase.add_ref_from(ret_hu_conv, network_graph);
- first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); });
+ if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); }) };
CommonBase.add_ref_from(ret_hu_conv, logger);
CommonBase.add_ref_from(ret_hu_conv, scorer);
return ret_hu_conv;
* This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
* available and the current time is supplied by the caller.
*/
- public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
- const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs);
+ public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, logger: Logger, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
+ const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs);
const ret_hu_conv: Result_InvoiceSignOrCreationErrorZ = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, channelmanager);
CommonBase.add_ref_from(ret_hu_conv, keys_manager);
+ CommonBase.add_ref_from(ret_hu_conv, logger);
CommonBase.add_ref_from(ret_hu_conv, description_hash);
return ret_hu_conv;
}
* This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
* available and the current time is supplied by the caller.
*/
- public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
- const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs);
+ public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
+ const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs);
const ret_hu_conv: Result_InvoiceSignOrCreationErrorZ = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, channelmanager);
CommonBase.add_ref_from(ret_hu_conv, keys_manager);
+ CommonBase.add_ref_from(ret_hu_conv, logger);
return ret_hu_conv;
}
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class WarningMessage extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.WarningMessage_free);
}
return ret_hu_conv;
}
+ /**
+ * Checks if two WarningMessages 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.
+ */
+ public eq(b: WarningMessage): boolean {
+ const ret: boolean = bindings.WarningMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Serialize the WarningMessage object into a byte array which can be read by WarningMessage_read
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
* with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
* calling [`block_connected`] and [`block_disconnected`] on the monitor.
*
- * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+ * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
* the given `funding_txo` has previously been registered via `watch_channel`.
*
* [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
* [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
* [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
*/
- watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): Result_NoneChannelMonitorUpdateErrZ;
+ watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): ChannelMonitorUpdateStatus;
/**Updates a channel identified by `funding_txo` by applying `update` to its monitor.
*
* Implementations must call [`update_monitor`] with the given update. See
- * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+ * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
*
* [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
*/
- update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): Result_NoneChannelMonitorUpdateErrZ;
+ update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): ChannelMonitorUpdateStatus;
/**Returns any monitor events since the last call. Subsequent calls must only return new
* events.
*
* to disk.
*
* For details on asynchronous [`ChannelMonitor`] updating and returning
- * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
*/
release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[];
}
class LDKWatchHolder {
- held: Watch;
+ held: Watch|null = null;
}
/**
* If an implementation maintains multiple instances of a channel's monitor (e.g., by storing
* backup copies), then it must ensure that updates are applied across all instances. Otherwise, it
* could result in a revoked transaction being broadcast, allowing the counterparty to claim all
- * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle
+ * funds in the channel. See [`ChannelMonitorUpdateStatus`] for more details about how to handle
* multiple instances.
*
- * [`PermanentFailure`]: ChannelMonitorUpdateErr::PermanentFailure
+ * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
*/
export class Watch extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKWatch;
+ public bindings_instance: bindings.LDKWatch|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.Watch_free);
this.bindings_instance = null;
}
public static new_impl(arg: WatchInterface): Watch {
const impl_holder: LDKWatchHolder = new LDKWatchHolder();
let structImplementation = {
- watch_channel (funding_txo: bigint, monitor: bigint): bigint {
+ watch_channel (funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus {
const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
CommonBase.add_ref_from(funding_txo_hu_conv, this);
const monitor_hu_conv: ChannelMonitor = new ChannelMonitor(null, monitor);
CommonBase.add_ref_from(monitor_hu_conv, this);
- const ret: Result_NoneChannelMonitorUpdateErrZ = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
- const result: bigint = ret == null ? 0n : ret.clone_ptr();
- return result;
+ const ret: ChannelMonitorUpdateStatus = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
+ return ret;
},
- update_channel (funding_txo: bigint, update: bigint): bigint {
+ update_channel (funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus {
const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
CommonBase.add_ref_from(funding_txo_hu_conv, this);
const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
CommonBase.add_ref_from(update_hu_conv, this);
- const ret: Result_NoneChannelMonitorUpdateErrZ = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
- const result: bigint = ret == null ? 0n : ret.clone_ptr();
- return result;
+ const ret: ChannelMonitorUpdateStatus = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
+ return ret;
},
release_pending_monitor_events (): number {
const ret: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] = arg.release_pending_monitor_events();
impl_holder.held = new Watch(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
- return impl_holder.held;
+ return impl_holder.held!;
}
/**
* with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
* calling [`block_connected`] and [`block_disconnected`] on the monitor.
*
- * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+ * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
* the given `funding_txo` has previously been registered via `watch_channel`.
*
* [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
* [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
* [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
*/
- public watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor == null ? 0n : CommonBase.get_ptr_of(monitor));
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ public watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): ChannelMonitorUpdateStatus {
+ const ret: ChannelMonitorUpdateStatus = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor == null ? 0n : CommonBase.get_ptr_of(monitor));
CommonBase.add_ref_from(this, funding_txo);
CommonBase.add_ref_from(this, monitor);
- return ret_hu_conv;
+ return ret;
}
/**
* Updates a channel identified by `funding_txo` by applying `update` to its monitor.
*
* Implementations must call [`update_monitor`] with the given update. See
- * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+ * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
*
* [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
*/
- public update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): Result_NoneChannelMonitorUpdateErrZ {
- const ret: bigint = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), update == null ? 0n : CommonBase.get_ptr_of(update));
- const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ public update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): ChannelMonitorUpdateStatus {
+ const ret: ChannelMonitorUpdateStatus = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), update == null ? 0n : CommonBase.get_ptr_of(update));
CommonBase.add_ref_from(this, funding_txo);
CommonBase.add_ref_from(this, update);
- return ret_hu_conv;
+ return ret;
}
/**
* to disk.
*
* For details on asynchronous [`ChannelMonitor`] updating and returning
- * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+ * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
*/
public release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] {
const ret: number = bindings.Watch_release_pending_monitor_events(this.ptr);
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
*/
export class WatchedOutput extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: bigint) {
+ public constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.WatchedOutput_free);
}
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public set_block_hash(val: Uint8Array): void {
+ public set_block_hash(val: Uint8Array|null): void {
bindings.WatchedOutput_set_block_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32)));
}
return ret_hu_conv;
}
+ /**
+ * Checks if two WatchedOutputs 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.
+ */
+ public eq(b: WatchedOutput): boolean {
+ const ret: boolean = bindings.WatchedOutput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+ CommonBase.add_ref_from(this, b);
+ return ret;
+ }
+
/**
* Checks if two WatchedOutputs contain equal inner contents.
*/
import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
import { AccessError } from '../enums/AccessError.mjs';
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
import { CreationError } from '../enums/CreationError.mjs';
import { Currency } from '../enums/Currency.mjs';
import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
import { PeerHandleError } from '../structs/PeerHandleError.mjs';
import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
import { MessageHandler } from '../structs/MessageHandler.mjs';
import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
}
class LDKWriteableScoreHolder {
- held: WriteableScore;
+ held: WriteableScore|null = null;
}
/**
*/
export class WriteableScore extends CommonBase {
/* @internal */
- public bindings_instance?: bindings.LDKWriteableScore;
+ public bindings_instance: bindings.LDKWriteableScore|null;
/* @internal */
public instance_idx?: number;
/* @internal */
- constructor(_dummy: object, ptr: bigint) {
+ constructor(_dummy: null, ptr: bigint) {
super(ptr, bindings.WriteableScore_free);
this.bindings_instance = null;
}
},
} as bindings.LDKWriteableScore;
const lockableScore = LockableScore.new_impl(lockableScore_impl, );
- const ptr_idx: [bigint, number] = bindings.LDKWriteableScore_new(structImplementation, lockableScore.instance_idx);
+ const ptr_idx: [bigint, number] = bindings.LDKWriteableScore_new(structImplementation, lockableScore.instance_idx!);
impl_holder.held = new WriteableScore(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = structImplementation;
impl_holder.held.ptrs_to.push(lockableScore);
- return impl_holder.held;
+ return impl_holder.held!;
}
/**