forked from Qortal/qortal
base64 to byte array
This commit is contained in:
parent
34382b6e69
commit
24ff3ab581
@ -38,6 +38,7 @@ import org.qortal.transaction.Transaction.ValidationResult;
|
||||
import org.qortal.transform.TransformationException;
|
||||
import org.qortal.transform.transaction.DeployAtTransactionTransformer;
|
||||
import org.qortal.utils.Base58;
|
||||
import java.util.Base64;
|
||||
|
||||
@Path("/at")
|
||||
@Tag(name = "Automated Transactions")
|
||||
|
@ -1,10 +1,12 @@
|
||||
package org.qortal.data.transaction;
|
||||
|
||||
public class CreationRequest {
|
||||
import java.util.Base64;
|
||||
|
||||
public class CreationRequest {
|
||||
|
||||
private short ciyamAtVersion;
|
||||
private byte[] codeBytes;
|
||||
private byte[] dataBytes;
|
||||
private String codeBytesBase64;
|
||||
private String dataBytesBase64;
|
||||
private short numCallStackPages;
|
||||
private short numUserStackPages;
|
||||
private long minActivationAmount;
|
||||
@ -22,19 +24,19 @@ public class CreationRequest {
|
||||
}
|
||||
|
||||
public byte[] getCodeBytes() {
|
||||
return codeBytes;
|
||||
return Base64.getDecoder().decode(this.codeBytesBase64);
|
||||
}
|
||||
|
||||
public void setCodeBytes(byte[] codeBytes) {
|
||||
this.codeBytes = codeBytes;
|
||||
public void setCodeBytesBase64(String codeBytesBase64) {
|
||||
this.codeBytesBase64 = codeBytesBase64;
|
||||
}
|
||||
|
||||
public byte[] getDataBytes() {
|
||||
return dataBytes;
|
||||
return Base64.getDecoder().decode(this.dataBytesBase64);
|
||||
}
|
||||
|
||||
public void setDataBytes(byte[] dataBytes) {
|
||||
this.dataBytes = dataBytes;
|
||||
public void setDataBytesBase64(String dataBytesBase64) {
|
||||
this.dataBytesBase64 = dataBytesBase64;
|
||||
}
|
||||
|
||||
public short getNumCallStackPages() {
|
||||
@ -60,4 +62,4 @@ public class CreationRequest {
|
||||
public void setMinActivationAmount(long minActivationAmount) {
|
||||
this.minActivationAmount = minActivationAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user