public class TransactionHeaderV1 extends Object
AccountTransactionV1.| Modifier and Type | Class and Description |
|---|---|
static class |
TransactionHeaderV1.TransactionHeaderV1Builder |
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES_WITH_SPONSOR |
static int |
BYTES_WITHOUT_SPONSOR |
| Constructor and Description |
|---|
TransactionHeaderV1(@NonNull AccountAddress sender,
@NonNull Nonce nonce,
@NonNull UInt64 maxEnergyCost,
@NonNull UInt32 payloadSize,
@NonNull Expiry expiry,
AccountAddress sponsor) |
| Modifier and Type | Method and Description |
|---|---|
static TransactionHeaderV1.TransactionHeaderV1Builder |
builder() |
static UInt64 |
calculateMaxEnergyCost(int senderSignatureCount,
int sponsorSignatureCount,
int payloadSize,
UInt64 transactionSpecificCost)
Calculate the maximum amount of energy that can be spent on executing a transaction.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static TransactionHeaderV1 |
fromBytes(ByteBuffer source) |
byte[] |
getBytes() |
@NonNull Expiry |
getExpiry()
A Unix timestamp indicating when the transaction should expire.
|
@NonNull UInt64 |
getMaxEnergyCost()
The amount of energy allocated for executing this transaction.
|
@NonNull Nonce |
getNonce()
The sequence number of the transaction, sender (source) account nonce.
|
@NonNull UInt32 |
getPayloadSize()
The size of the transaction payload in bytes.
|
@NonNull AccountAddress |
getSender()
The address of the account that is the source of the transaction.
|
Optional<AccountAddress> |
getSponsor() |
int |
hashCode() |
TransactionHeaderV1.TransactionHeaderV1Builder |
toBuilder() |
String |
toString() |
public static int BYTES_WITHOUT_SPONSOR
public static int BYTES_WITH_SPONSOR
public TransactionHeaderV1(@NonNull
@NonNull AccountAddress sender,
@NonNull
@NonNull Nonce nonce,
@NonNull
@NonNull UInt64 maxEnergyCost,
@NonNull
@NonNull UInt32 payloadSize,
@NonNull
@NonNull Expiry expiry,
@Nullable
AccountAddress sponsor)
public Optional<AccountAddress> getSponsor()
public byte[] getBytes()
public static TransactionHeaderV1 fromBytes(ByteBuffer source)
public static UInt64 calculateMaxEnergyCost(int senderSignatureCount, int sponsorSignatureCount, int payloadSize, UInt64 transactionSpecificCost)
senderSignatureCount - number of signatures by the sender in the transaction
(TransactionSigner.size())sponsorSignatureCount - number of signatures by the sponsor in the transaction
(TransactionSigner.size())payloadSize - size of the transaction payload in bytestransactionSpecificCost - cost of the specific transaction (payload) typeTransactionTypeCostpublic static TransactionHeaderV1.TransactionHeaderV1Builder builder()
public TransactionHeaderV1.TransactionHeaderV1Builder toBuilder()
@NonNull public @NonNull AccountAddress getSender()
@NonNull public @NonNull Nonce getNonce()
@NonNull public @NonNull UInt64 getMaxEnergyCost()
@NonNull public @NonNull UInt32 getPayloadSize()
@NonNull public @NonNull Expiry getExpiry()
protected boolean canEqual(Object other)
Copyright © 2026. All rights reserved.