projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[C#] Update auto-generated C# bindings
[ldk-java]
/
c_sharp
/
src
/
org
/
ldk
/
structs
/
NodeAnnouncement.cs
diff --git
a/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs
b/c_sharp/src/org/ldk/structs/NodeAnnouncement.cs
index 9540cbb424279715172a2d23941c65452845e0bc..4b870b48d8d099dceb6e9da3ba0289b9760ad277 100644
(file)
--- a/
c_sharp/src/org/ldk/structs/NodeAnnouncement.cs
+++ b/
c_sharp/src/org/ldk/structs/NodeAnnouncement.cs
@@
-21,16
+21,18
@@
public class NodeAnnouncement : CommonBase {
* The signature by the node key
*/
public byte[] get_signature() {
* The signature by the node key
*/
public byte[] get_signature() {
-
byte[]
ret = bindings.NodeAnnouncement_get_signature(this.ptr);
+
long
ret = bindings.NodeAnnouncement_get_signature(this.ptr);
GC.KeepAlive(this);
GC.KeepAlive(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
}
/**
* The signature by the node key
*/
public void set_signature(byte[] val) {
}
/**
* The signature by the node key
*/
public void set_signature(byte[] val) {
- bindings.NodeAnnouncement_set_signature(this.ptr, InternalUtils.
check_arr_len(val, 64
));
+ bindings.NodeAnnouncement_set_signature(this.ptr, InternalUtils.
encodeUint8Array(InternalUtils.check_arr_len(val, 64)
));
GC.KeepAlive(this);
GC.KeepAlive(val);
}
GC.KeepAlive(this);
GC.KeepAlive(val);
}
@@
-61,7
+63,7
@@
public class NodeAnnouncement : CommonBase {
* Constructs a new NodeAnnouncement given each field
*/
public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) {
* Constructs a new NodeAnnouncement given each field
*/
public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) {
- long ret = bindings.NodeAnnouncement_new(InternalUtils.
check_arr_len(signature_arg, 64
), contents_arg == null ? 0 : contents_arg.ptr);
+ long ret = bindings.NodeAnnouncement_new(InternalUtils.
encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)
), contents_arg == null ? 0 : contents_arg.ptr);
GC.KeepAlive(signature_arg);
GC.KeepAlive(contents_arg);
if (ret >= 0 && ret <= 4096) { return null; }
GC.KeepAlive(signature_arg);
GC.KeepAlive(contents_arg);
if (ret >= 0 && ret <= 4096) { return null; }
@@
-110,16
+112,18
@@
public class NodeAnnouncement : CommonBase {
* Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
*/
public byte[] write() {
* Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
*/
public byte[] write() {
-
byte[]
ret = bindings.NodeAnnouncement_write(this.ptr);
+
long
ret = bindings.NodeAnnouncement_write(this.ptr);
GC.KeepAlive(this);
GC.KeepAlive(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
}
/**
* Read a NodeAnnouncement from a byte array, created by NodeAnnouncement_write
*/
public static Result_NodeAnnouncementDecodeErrorZ read(byte[] ser) {
}
/**
* Read a NodeAnnouncement from a byte array, created by NodeAnnouncement_write
*/
public static Result_NodeAnnouncementDecodeErrorZ read(byte[] ser) {
- long ret = bindings.NodeAnnouncement_read(
ser
);
+ long ret = bindings.NodeAnnouncement_read(
InternalUtils.encodeUint8Array(ser)
);
GC.KeepAlive(ser);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
GC.KeepAlive(ser);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);