Module software.sava.core
Record Class ConfidentialTransferAccount
java.lang.Object
java.lang.Record
software.sava.core.accounts.token.extensions.ConfidentialTransferAccount
- All Implemented Interfaces:
AccountTokenExtension,TokenExtension,Serializable
public record ConfidentialTransferAccount(boolean approved, PublicKey elgamalPubkey, byte[] pendingBalanceLo, byte[] pendingBalanceHi, byte[] availableBalance, byte[] decryptableAvailableBalance, boolean allowConfidentialCredits, boolean allowNonConfidentialCredits, long pendingBalanceCreditCounter, long maximumPendingBalanceCreditCounter, long expectedPendingBalanceCreditCounter, long actualPendingBalanceCreditCounter)
extends Record
implements AccountTokenExtension
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final longstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionConfidentialTransferAccount(boolean approved, PublicKey elgamalPubkey, byte[] pendingBalanceLo, byte[] pendingBalanceHi, byte[] availableBalance, byte[] decryptableAvailableBalance, boolean allowConfidentialCredits, boolean allowNonConfidentialCredits, long pendingBalanceCreditCounter, long maximumPendingBalanceCreditCounter, long expectedPendingBalanceCreditCounter, long actualPendingBalanceCreditCounter) Creates an instance of aConfidentialTransferAccountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactualPendingBalanceCreditCounterrecord component.booleanReturns the value of theallowConfidentialCreditsrecord component.booleanReturns the value of theallowNonConfidentialCreditsrecord component.booleanapproved()Returns the value of theapprovedrecord component.byte[]Returns the value of theavailableBalancerecord component.byte[]Returns the value of thedecryptableAvailableBalancerecord component.Returns the value of theelgamalPubkeyrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpectedPendingBalanceCreditCounterrecord component.final inthashCode()Returns a hash code value for this object.intl()longReturns the value of themaximumPendingBalanceCreditCounterrecord component.longReturns the value of thependingBalanceCreditCounterrecord component.byte[]Returns the value of thependingBalanceHirecord component.byte[]Returns the value of thependingBalanceLorecord component.static ConfidentialTransferAccountread(byte[] data, int offset) final StringtoString()Returns a string representation of this record class.intwrite(byte[] data, int offset) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, writeMethods inherited from interface software.sava.core.accounts.token.extensions.TokenExtension
ordinal
-
Field Details
-
MAXIMUM_DEPOSIT_TRANSFER_AMOUNT
public static final long MAXIMUM_DEPOSIT_TRANSFER_AMOUNT- See Also:
-
PENDING_BALANCE_LO_BIT_LENGTH
public static final int PENDING_BALANCE_LO_BIT_LENGTH- See Also:
-
DEFAULT_MAXIMUM_PENDING_BALANCE_CREDIT_COUNTER
public static final int DEFAULT_MAXIMUM_PENDING_BALANCE_CREDIT_COUNTER- See Also:
-
BYTES
public static final int BYTES- See Also:
-
-
Constructor Details
-
ConfidentialTransferAccount
public ConfidentialTransferAccount(boolean approved, PublicKey elgamalPubkey, byte[] pendingBalanceLo, byte[] pendingBalanceHi, byte[] availableBalance, byte[] decryptableAvailableBalance, boolean allowConfidentialCredits, boolean allowNonConfidentialCredits, long pendingBalanceCreditCounter, long maximumPendingBalanceCreditCounter, long expectedPendingBalanceCreditCounter, long actualPendingBalanceCreditCounter) Creates an instance of aConfidentialTransferAccountrecord class.- Parameters:
approved- the value for theapprovedrecord componentelgamalPubkey- the value for theelgamalPubkeyrecord componentpendingBalanceLo- the value for thependingBalanceLorecord componentpendingBalanceHi- the value for thependingBalanceHirecord componentavailableBalance- the value for theavailableBalancerecord componentdecryptableAvailableBalance- the value for thedecryptableAvailableBalancerecord componentallowConfidentialCredits- the value for theallowConfidentialCreditsrecord componentallowNonConfidentialCredits- the value for theallowNonConfidentialCreditsrecord componentpendingBalanceCreditCounter- the value for thependingBalanceCreditCounterrecord componentmaximumPendingBalanceCreditCounter- the value for themaximumPendingBalanceCreditCounterrecord componentexpectedPendingBalanceCreditCounter- the value for theexpectedPendingBalanceCreditCounterrecord componentactualPendingBalanceCreditCounter- the value for theactualPendingBalanceCreditCounterrecord component
-
-
Method Details
-
read
-
extensionType
- Specified by:
extensionTypein interfaceTokenExtension
-
write
public int write(byte[] data, int offset) - Specified by:
writein interfaceSerializable
-
l
public int l()- Specified by:
lin interfaceSerializable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
approved
public boolean approved()Returns the value of theapprovedrecord component.- Returns:
- the value of the
approvedrecord component
-
elgamalPubkey
Returns the value of theelgamalPubkeyrecord component.- Returns:
- the value of the
elgamalPubkeyrecord component
-
pendingBalanceLo
public byte[] pendingBalanceLo()Returns the value of thependingBalanceLorecord component.- Returns:
- the value of the
pendingBalanceLorecord component
-
pendingBalanceHi
public byte[] pendingBalanceHi()Returns the value of thependingBalanceHirecord component.- Returns:
- the value of the
pendingBalanceHirecord component
-
availableBalance
public byte[] availableBalance()Returns the value of theavailableBalancerecord component.- Returns:
- the value of the
availableBalancerecord component
-
decryptableAvailableBalance
public byte[] decryptableAvailableBalance()Returns the value of thedecryptableAvailableBalancerecord component.- Returns:
- the value of the
decryptableAvailableBalancerecord component
-
allowConfidentialCredits
public boolean allowConfidentialCredits()Returns the value of theallowConfidentialCreditsrecord component.- Returns:
- the value of the
allowConfidentialCreditsrecord component
-
allowNonConfidentialCredits
public boolean allowNonConfidentialCredits()Returns the value of theallowNonConfidentialCreditsrecord component.- Returns:
- the value of the
allowNonConfidentialCreditsrecord component
-
pendingBalanceCreditCounter
public long pendingBalanceCreditCounter()Returns the value of thependingBalanceCreditCounterrecord component.- Returns:
- the value of the
pendingBalanceCreditCounterrecord component
-
maximumPendingBalanceCreditCounter
public long maximumPendingBalanceCreditCounter()Returns the value of themaximumPendingBalanceCreditCounterrecord component.- Returns:
- the value of the
maximumPendingBalanceCreditCounterrecord component
-
expectedPendingBalanceCreditCounter
public long expectedPendingBalanceCreditCounter()Returns the value of theexpectedPendingBalanceCreditCounterrecord component.- Returns:
- the value of the
expectedPendingBalanceCreditCounterrecord component
-
actualPendingBalanceCreditCounter
public long actualPendingBalanceCreditCounter()Returns the value of theactualPendingBalanceCreditCounterrecord component.- Returns:
- the value of the
actualPendingBalanceCreditCounterrecord component
-