Class EncryptedBalance
- Namespace
- Concordium.Grpc.V2
- Assembly
- Concordium.Sdk.dll
public sealed class EncryptedBalance : IMessage<EncryptedBalance>, IEquatable<EncryptedBalance>, IDeepCloneable<EncryptedBalance>, IBufferMessage, IMessage
- Inheritance
-
EncryptedBalance
- Implements
-
IMessage<EncryptedBalance>IDeepCloneable<EncryptedBalance>IBufferMessageIMessage
- Inherited Members
Constructors
EncryptedBalance()
public EncryptedBalance()
EncryptedBalance(EncryptedBalance)
public EncryptedBalance(EncryptedBalance other)
Parameters
other
EncryptedBalance
Fields
AggregatedAmountFieldNumber
Field number for the "aggregated_amount" field.
public const int AggregatedAmountFieldNumber = 3
Field Value
IncomingAmountsFieldNumber
Field number for the "incoming_amounts" field.
public const int IncomingAmountsFieldNumber = 5
Field Value
NumAggregatedFieldNumber
Field number for the "num_aggregated" field.
public const int NumAggregatedFieldNumber = 4
Field Value
SelfAmountFieldNumber
Field number for the "self_amount" field.
public const int SelfAmountFieldNumber = 1
Field Value
StartIndexFieldNumber
Field number for the "start_index" field.
public const int StartIndexFieldNumber = 2
Field Value
Properties
AggregatedAmount
If present, the amount that has resulted from aggregating other amounts
If this field is present so is num_aggregated
.
public EncryptedAmount AggregatedAmount { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
HasNumAggregated
Gets whether the "num_aggregated" field is set
public bool HasNumAggregated { get; }
Property Value
IncomingAmounts
Amounts starting at start_index
(or at start_index + 1
if there is
an aggregated amount present). They are assumed to be numbered
sequentially. The length of this list is bounded by the maximum number
of incoming amounts on the accounts, which is currently 32. After
that aggregation kicks in.
public RepeatedField<EncryptedAmount> IncomingAmounts { get; }
Property Value
- RepeatedField<EncryptedAmount>
NumAggregated
The number of aggregated amounts (must be at least 2 if present). This
field is present if and only if aggregated_amount
is present.
public uint NumAggregated { get; set; }
Property Value
Parser
public static MessageParser<EncryptedBalance> Parser { get; }
Property Value
- MessageParser<EncryptedBalance>
SelfAmount
Encrypted amount that is a result of this account's actions. In particular this list includes the aggregate of
- remaining amounts that result when transferring to public balance
- remaining amounts when transferring to another account
- encrypted amounts that are transferred from public balance
When a transfer is made all of these must always be used.
public EncryptedAmount SelfAmount { get; set; }
Property Value
StartIndex
Starting index for incoming encrypted amounts. If an aggregated amount is present then this index is associated with such an amount and the list of incoming encrypted amounts starts at the index `start_index
- 1`.
public ulong StartIndex { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
ClearNumAggregated()
Clears the value of the "num_aggregated" field
public void ClearNumAggregated()
Clone()
Creates a deep clone of this object.
public EncryptedBalance Clone()
Returns
- EncryptedBalance
A deep clone of this object.
Equals(EncryptedBalance)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(EncryptedBalance other)
Parameters
other
EncryptedBalanceAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
other
object
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(EncryptedBalance)
Merges the given message into this one.
public void MergeFrom(EncryptedBalance other)
Parameters
other
EncryptedBalance
Remarks
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
input
CodedInputStream
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
output
CodedOutputStreamCoded output stream to write the data to. Must not be null.