return new Result_PaymentSecretAPIErrorZ_OK(null, ptr);
} else {
return new Result_PaymentSecretAPIErrorZ_Err(null, ptr);
return new Result_PaymentSecretAPIErrorZ_OK(null, ptr);
} else {
return new Result_PaymentSecretAPIErrorZ_Err(null, ptr);
* Creates a new CResult_PaymentSecretAPIErrorZ in the success state.
*/
public static Result_PaymentSecretAPIErrorZ ok(byte[] o) {
* Creates a new CResult_PaymentSecretAPIErrorZ in the success state.
*/
public static Result_PaymentSecretAPIErrorZ ok(byte[] o) {
- long ret = bindings.CResult_PaymentSecretAPIErrorZ_ok(o);
- if (ret >= 0 && ret < 1024) { return null; }
+ long ret = bindings.CResult_PaymentSecretAPIErrorZ_ok(InternalUtils.check_arr_len(o, 32));
+ if (ret >= 0 && ret <= 4096) { return null; }
*/
public static Result_PaymentSecretAPIErrorZ err(APIError e) {
long ret = bindings.CResult_PaymentSecretAPIErrorZ_err(e.ptr);
*/
public static Result_PaymentSecretAPIErrorZ err(APIError e) {
long ret = bindings.CResult_PaymentSecretAPIErrorZ_err(e.ptr);
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_PaymentSecretAPIErrorZ_is_ok(this.ptr);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_PaymentSecretAPIErrorZ_clone_ptr(this.ptr);
+ return ret;
+ }
+
/**
* Creates a new CResult_PaymentSecretAPIErrorZ which has the same data as `orig`
* but with all dynamically-allocated buffers duplicated in new buffers.
*/
public Result_PaymentSecretAPIErrorZ clone() {
long ret = bindings.CResult_PaymentSecretAPIErrorZ_clone(this.ptr);
/**
* Creates a new CResult_PaymentSecretAPIErrorZ which has the same data as `orig`
* but with all dynamically-allocated buffers duplicated in new buffers.
*/
public Result_PaymentSecretAPIErrorZ clone() {
long ret = bindings.CResult_PaymentSecretAPIErrorZ_clone(this.ptr);