}
public byte[] get_a() {
- byte[] ret = bindings.NodeAlias_get_a(this.ptr);
+ long ret = bindings.NodeAlias_get_a(this.ptr);
GC.KeepAlive(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
}
public void set_a(byte[] val) {
- bindings.NodeAlias_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+ bindings.NodeAlias_set_a(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
GC.KeepAlive(this);
GC.KeepAlive(val);
}
* Constructs a new NodeAlias given each field
*/
public static NodeAlias of(byte[] a_arg) {
- long ret = bindings.NodeAlias_new(InternalUtils.check_arr_len(a_arg, 32));
+ long ret = bindings.NodeAlias_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a_arg, 32)));
GC.KeepAlive(a_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NodeAlias ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeAlias(null, ret); }
* Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
*/
public byte[] write() {
- byte[] ret = bindings.NodeAlias_write(this.ptr);
+ long ret = bindings.NodeAlias_write(this.ptr);
GC.KeepAlive(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
}
/**
* Read a NodeAlias from a byte array, created by NodeAlias_write
*/
public static Result_NodeAliasDecodeErrorZ read(byte[] ser) {
- long ret = bindings.NodeAlias_read(ser);
+ long ret = bindings.NodeAlias_read(InternalUtils.encodeUint8Array(ser));
GC.KeepAlive(ser);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);