public class SignedTransaction extends Transaction implements ByteTransformable, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
signatures |
createdTime, expirationDate, extensions, operations, refBlockNum, refBlockPrefix| Constructor and Description |
|---|
SignedTransaction(BlockId blockId,
List<Operation> operations,
List<FutureExtensions> extensions)
Like
SignedTransaction(BlockId, List, List),
but allows you to provide a
BlockId object as the
reference block and will also set the expirationDate to the
latest possible time. |
SignedTransaction(org.joou.UShort refBlockNum,
org.joou.UInteger refBlockPrefix,
TimePointSec expirationDate,
List<Operation> operations,
List<FutureExtensions> extensions,
Long createdTime)
Create a new signed transaction object.
|
| Modifier and Type | Method and Description |
|---|---|
TransactionId |
generateTransactionId() |
protected List<eu.bittrade.crypto.core.ECKey> |
getRequiredSignatureKeys() |
List<String> |
getSignatures()
Get the signatures for this transaction.
|
void |
sign()
Like
sign(String), but uses the
default chain id. |
void |
sign(String chainId)
Use this method if you want to specify a different chainId than the
default one. |
byte[] |
toByteArray()
This method creates a byte array based on a transaction object under the
use of a guide written by
Xeroc.
|
protected byte[] |
toByteArray(String chainId)
Like
toByteArray(), but allows to define a Beowulf
chain id. |
String |
toString() |
getCreatedTime, getExpirationDate, getExtensions, getOperations, getRefBlockNum, getRefBlockPrefix, getRequiredAuthorities, setCreatedTime, setExpirationDate, setExtensions, setOperations, setRefBlockNum, setRefBlockPrefix, setRefBlockPrefix, validatepublic SignedTransaction(org.joou.UShort refBlockNum,
org.joou.UInteger refBlockPrefix,
TimePointSec expirationDate,
List<Operation> operations,
List<FutureExtensions> extensions,
Long createdTime)
refBlockNum - The reference block number (see
Transaction.setRefBlockNum(UShort)).refBlockPrefix - The reference block index (see
Transaction.setRefBlockPrefix(UInteger)).expirationDate - Define until when the transaction has to be processed (see
Transaction.setExpirationDate(TimePointSec)).operations - A list of operations to process within this Transaction (see
Transaction.setOperations(List)).extensions - Extensions are currently not supported and will be ignored
(see Transaction.setExtensions(List)).createdTime - The timestamp create transaction.public SignedTransaction(BlockId blockId, List<Operation> operations, List<FutureExtensions> extensions)
SignedTransaction(BlockId, List, List),
but allows you to provide a
BlockId object as the
reference block and will also set the expirationDate to the
latest possible time.blockId - The block reference (see Transaction.setRefBlockNum(UShort) and
Transaction.setRefBlockPrefix(UInteger)).operations - A list of operations to process within this Transaction (see
Transaction.setOperations(List)).extensions - Extensions are currently not supported and will be ignored
(see Transaction.setExtensions(List)).public List<String> getSignatures()
public void sign()
throws BeowulfInvalidTransactionException
sign(String), but uses the
default chain id.BeowulfInvalidTransactionException - If the transaction can not be signed.public void sign(String chainId) throws BeowulfInvalidTransactionException
default one. Otherwise use the
sign() method.chainId - The chain id that should be used during signing.BeowulfInvalidTransactionException - If the transaction can not be signed.protected List<eu.bittrade.crypto.core.ECKey> getRequiredSignatureKeys() throws BeowulfInvalidTransactionException
BeowulfInvalidTransactionException - If the required private key is not present in the
PrivateKeyStorage.public byte[] toByteArray()
throws BeowulfInvalidTransactionException
If a chainId is provided it will be added in front of the byte array.
toByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If the transaction can not be signed.protected byte[] toByteArray(String chainId) throws BeowulfInvalidTransactionException
toByteArray(), but allows to define a Beowulf
chain id.chainId - The HEX representation of the chain Id you want to use for
this transaction.BeowulfInvalidTransactionException - If the transaction can not be signed.public TransactionId generateTransactionId() throws BeowulfInvalidTransactionException
public String toString()
toString in class TransactionCopyright © 2019. All rights reserved.