Package com.algorand.algosdk.transaction
Class Transaction
- java.lang.Object
-
- com.algorand.algosdk.transaction.Transaction
-
- All Implemented Interfaces:
Serializable
public class Transaction extends Object implements Serializable
A raw serializable transaction class, used to generate transactions to broadcast to the network. This is distinct from algod.model.Transaction, which is only returned for GET requests to algod.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Transaction.BoxReference
static class
Transaction.OnCompletion
static class
Transaction.Type
TxType represents a transaction type.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Transaction()
-
Method Summary
-
-
-
Field Detail
-
type
public Transaction.Type type
-
sender
public Address sender
-
fee
public BigInteger fee
-
firstValid
public BigInteger firstValid
-
lastValid
public BigInteger lastValid
-
note
public byte[] note
-
genesisID
public String genesisID
-
genesisHash
public Digest genesisHash
-
group
public Digest group
-
lease
public byte[] lease
-
rekeyTo
public Address rekeyTo
-
amount
public BigInteger amount
-
receiver
public Address receiver
-
closeRemainderTo
public Address closeRemainderTo
-
votePK
public ParticipationPublicKey votePK
-
selectionPK
public VRFPublicKey selectionPK
-
stateProofKey
public MerkleVerifier stateProofKey
-
nonpart
public boolean nonpart
-
voteFirst
public BigInteger voteFirst
-
voteLast
public BigInteger voteLast
-
voteKeyDilution
public BigInteger voteKeyDilution
-
assetParams
public AssetParams assetParams
-
assetIndex
public BigInteger assetIndex
-
xferAsset
public BigInteger xferAsset
-
assetAmount
public BigInteger assetAmount
-
assetSender
public Address assetSender
-
assetReceiver
public Address assetReceiver
-
assetCloseTo
public Address assetCloseTo
-
freezeTarget
public Address freezeTarget
-
assetFreezeID
public BigInteger assetFreezeID
-
freezeState
public boolean freezeState
-
applicationArgs
public List<byte[]> applicationArgs
-
onCompletion
public Transaction.OnCompletion onCompletion
-
approvalProgram
public TEALProgram approvalProgram
-
boxReferences
public List<Transaction.BoxReference> boxReferences
-
globalStateSchema
public StateSchema globalStateSchema
-
applicationId
public Long applicationId
-
localStateSchema
public StateSchema localStateSchema
-
clearStateProgram
public TEALProgram clearStateProgram
-
extraPages
public Long extraPages
-
stateProofType
public Integer stateProofType
-
-
Method Detail
-
setLease
public void setLease(Lease lease)
Lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed. The Size is fixed at 32 bytes.- Parameters:
lease
- Lease object
-
bytes
public byte[] bytes() throws IOException
Return encoded representation of the transaction- Throws:
IOException
-
bytesToSign
public byte[] bytesToSign() throws IOException
Return encoded representation of the transaction with a prefix suitable for signing- Throws:
IOException
-
rawTxID
public Digest rawTxID() throws IOException
Return transaction ID as Digest- Throws:
IOException
-
txID
public String txID() throws IOException, NoSuchAlgorithmException
Return transaction ID as string- Throws:
IOException
NoSuchAlgorithmException
-
assignGroupID
public void assignGroupID(Digest gid)
-
PaymentTransactionBuilder
public static PaymentTransactionBuilder<?> PaymentTransactionBuilder()
Create aPaymentTransactionBuilder
.
-
KeyRegistrationTransactionBuilder
public static KeyRegistrationTransactionBuilder<?> KeyRegistrationTransactionBuilder()
Create aKeyRegistrationTransactionBuilder
.
-
AssetCreateTransactionBuilder
public static AssetCreateTransactionBuilder<?> AssetCreateTransactionBuilder()
Create aAssetCreateTransactionBuilder
.
-
AssetConfigureTransactionBuilder
public static AssetConfigureTransactionBuilder<?> AssetConfigureTransactionBuilder()
Create aAssetConfigureTransactionBuilder
.
-
AssetDestroyTransactionBuilder
public static AssetDestroyTransactionBuilder<?> AssetDestroyTransactionBuilder()
Create aAssetDestroyTransactionBuilder
.
-
AssetAcceptTransactionBuilder
public static AssetAcceptTransactionBuilder<?> AssetAcceptTransactionBuilder()
Create aAssetAcceptTransactionBuilder
.
-
AssetTransferTransactionBuilder
public static AssetTransferTransactionBuilder<?> AssetTransferTransactionBuilder()
Create aAssetTransferTransactionBuilder
.
-
AssetClawbackTransactionBuilder
public static AssetClawbackTransactionBuilder<?> AssetClawbackTransactionBuilder()
Create aAssetClawbackTransactionBuilder
.
-
AssetFreezeTransactionBuilder
public static AssetFreezeTransactionBuilder<?> AssetFreezeTransactionBuilder()
Create aAssetFreezeTransactionBuilder
.
-
ApplicationCreateTransactionBuilder
public static ApplicationCreateTransactionBuilder<?> ApplicationCreateTransactionBuilder()
Create aApplicationCreateTransactionBuilder
.
-
ApplicationUpdateTransactionBuilder
public static ApplicationUpdateTransactionBuilder<?> ApplicationUpdateTransactionBuilder()
Create aApplicationUpdateTransactionBuilder
.
-
ApplicationDeleteTransactionBuilder
public static ApplicationDeleteTransactionBuilder<?> ApplicationDeleteTransactionBuilder()
Create aApplicationDeleteTransactionBuilder
.
-
ApplicationOptInTransactionBuilder
public static ApplicationOptInTransactionBuilder<?> ApplicationOptInTransactionBuilder()
Create aApplicationOptInTransactionBuilder
.
-
ApplicationCloseTransactionBuilder
public static ApplicationCloseTransactionBuilder<?> ApplicationCloseTransactionBuilder()
Create aApplicationCloseTransactionBuilder
.
-
ApplicationCallTransactionBuilder
public static ApplicationCallTransactionBuilder<?> ApplicationCallTransactionBuilder()
Create aApplicationCallTransactionBuilder
.
-
ApplicationClearTransactionBuilder
public static ApplicationClearTransactionBuilder<?> ApplicationClearTransactionBuilder()
Create aApplicationClearTransactionBuilder
.
-
-