public class Transaction extends MychainObject
| 限定符和类型 | 字段和说明 |
|---|---|
static byte |
CONTRACT_GRAYSCALE_VERIFICATION_EXTENSION_VALUE |
static byte |
CONTRACT_VERSION_SWITCHBACK_EXTENSION_VALUE |
static byte |
DEPLOY_GRAYSCALE_CODE_EXTENSION_VALUE |
static int |
EXTENSION_TX_GRAYSCALE |
static byte |
GRAYSCALE_EXTENSION_VALUE |
static byte |
PRE_RELEASE_EXTENSION_VALUE |
static byte |
UPDATE_CONTRACT_EXTENSION_VALUE |
| 构造器和说明 |
|---|
Transaction() |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
buildData()
Build data byte [ ].
|
static Transaction |
builder(TransactionType txType,
byte[] data,
List<byte[]> signatureList,
Hash hash,
Identity from,
Identity to,
long timestamp,
long period,
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce,
BigInteger gas,
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value,
List<Extension> extensions,
BaseFixedSizeByteArray.Fixed20ByteArray groupId)
Builder transaction do.
|
static Transaction |
builder(TransactionType txType,
byte[] data,
List<byte[]> signatureList,
Hash hash,
Identity from,
Identity to,
long timestamp,
long period,
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce,
BigInteger gas,
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value,
List<Extension> extensions,
BaseFixedSizeByteArray.Fixed20ByteArray groupId,
HashTypeEnum hashTypeEnum)
Builder transaction do.
|
void |
calcHash() |
void |
calcSignature(List<SignerBase> signers) |
void |
fromJson(com.alibaba.fastjson.JSONObject jsonObject)
Decode message from json object.
|
void |
fromRlp(RlpList list)
Decode message from rlp bytes.
|
byte[] |
getData()
Get data byte [ ].
|
List<Extension> |
getExtensions()
Gets extensions.
|
Identity |
getFrom()
Gets from.
|
BigInteger |
getGas()
Gets gas.bubu
|
BaseFixedSizeByteArray.Fixed20ByteArray |
getGroupId() |
Hash |
getHash()
Gets hash.
|
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger |
getNonce()
Gets nonce.
|
long |
getPeriod()
Gets period.
|
List<byte[]> |
getSignatureList()
Gets signature list.
|
long |
getTimestamp()
Gets timestamp.
|
Identity |
getTo()
Gets to.
|
TransactionType |
getTxType()
Gets tx type.
|
BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger |
getValue()
Gets value.
|
boolean |
isContractGrayscaleVerification() |
boolean |
isContractVersionSwitchback() |
boolean |
isDeployGrayscaleCode() |
boolean |
isGrayscale() |
boolean |
isPreRelease() |
boolean |
isUpdateContractFromGrayscaleCode() |
void |
setData(byte[] data)
Sets data.
|
void |
setExtensions(List<Extension> extensions)
Sets extensions.
|
void |
setFrom(Identity from)
Sets from.
|
void |
setGas(BigInteger gas)
Sets gas.
|
void |
setGroupId(BaseFixedSizeByteArray.Fixed20ByteArray groupId) |
void |
setHash(Hash hash)
Sets hash.
|
void |
setHashTypeEnum(HashTypeEnum hashTypeEnum) |
void |
setNonce(BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce)
Sets nonce.
|
void |
setPeriod(long period)
Sets period.
|
void |
setSignatureList(List<byte[]> signatureList)
Sets signature list.
|
void |
setTimestamp(long timestamp)
Sets timestamp.
|
void |
setTo(Identity to)
Sets to.
|
void |
setTxType(TransactionType txType)
Sets tx type.
|
void |
setValue(BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value)
Sets value.
|
void |
toJson(com.alibaba.fastjson.JSONObject jsonObject)
Encode message to json object.
|
byte[] |
toRlp()
Encode message to rlp bytes.
|
toStringpublic static final int EXTENSION_TX_GRAYSCALE
public static final byte CONTRACT_GRAYSCALE_VERIFICATION_EXTENSION_VALUE
public static final byte CONTRACT_VERSION_SWITCHBACK_EXTENSION_VALUE
public static final byte DEPLOY_GRAYSCALE_CODE_EXTENSION_VALUE
public static final byte UPDATE_CONTRACT_EXTENSION_VALUE
public static final byte PRE_RELEASE_EXTENSION_VALUE
public static final byte GRAYSCALE_EXTENSION_VALUE
public static Transaction builder(TransactionType txType, byte[] data, List<byte[]> signatureList, Hash hash, Identity from, Identity to, long timestamp, long period, BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce, BigInteger gas, BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value, List<Extension> extensions, BaseFixedSizeByteArray.Fixed20ByteArray groupId)
txType - the tx typedata - the datasignatureList - the signature listhash - the hashfrom - the fromto - the totimestamp - the timestampperiod - the periodnonce - the noncegas - the gasvalue - the valueextensions - the extensionspublic static Transaction builder(TransactionType txType, byte[] data, List<byte[]> signatureList, Hash hash, Identity from, Identity to, long timestamp, long period, BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce, BigInteger gas, BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value, List<Extension> extensions, BaseFixedSizeByteArray.Fixed20ByteArray groupId, HashTypeEnum hashTypeEnum)
txType - the tx typedata - the datasignatureList - the signature listhash - the hashfrom - the fromto - the totimestamp - the timestampperiod - the periodnonce - the noncegas - the gasvalue - the valueextensions - the extensionspublic TransactionType getTxType()
public void setTxType(TransactionType txType)
txType - the tx typepublic byte[] getData()
public void setData(byte[] data)
data - the datapublic List<byte[]> getSignatureList()
public void setSignatureList(List<byte[]> signatureList)
signatureList - the signature listpublic Hash getHash()
public void setHash(Hash hash)
hash - the hashpublic long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - the timestamppublic Identity getFrom()
public void setFrom(Identity from)
from - the frompublic Identity getTo()
public void setTo(Identity to)
to - the topublic long getPeriod()
public void setPeriod(long period)
period - the periodpublic BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger getNonce()
public void setNonce(BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger nonce)
nonce - the noncepublic void setExtensions(List<Extension> extensions)
extensions - the extensionspublic BigInteger getGas()
public void setGas(BigInteger gas)
gas - the gaspublic BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger getValue()
public void setValue(BaseFixedSizeUnsignedInteger.Fixed64BitUnsignedInteger value)
value - the valuepublic boolean isDeployGrayscaleCode()
public boolean isUpdateContractFromGrayscaleCode()
public boolean isContractGrayscaleVerification()
public boolean isContractVersionSwitchback()
public boolean isPreRelease()
public boolean isGrayscale()
public void setHashTypeEnum(HashTypeEnum hashTypeEnum)
public byte[] buildData()
public void calcHash()
public BaseFixedSizeByteArray.Fixed20ByteArray getGroupId()
public void setGroupId(BaseFixedSizeByteArray.Fixed20ByteArray groupId)
public byte[] toRlp()
toRlp 在类中 MychainObjectpublic void fromRlp(RlpList list)
fromRlp 在类中 MychainObjectlist - the rlp bytespublic void toJson(com.alibaba.fastjson.JSONObject jsonObject)
toJson 在类中 MychainObjectjsonObject - the json objectpublic void fromJson(com.alibaba.fastjson.JSONObject jsonObject)
fromJson 在类中 MychainObjectjsonObject - the json objectpublic void calcSignature(List<SignerBase> signers)
Copyright © 2022. All rights reserved.