Package org.stellar.sdk.xdr
Class AccountEntry
java.lang.Object
org.stellar.sdk.xdr.AccountEntry
- All Implemented Interfaces:
XdrElement
AccountEntry's original definition in the XDR file is:
struct AccountEntry
{
AccountID accountID; // master public key for this account
int64 balance; // in stroops
SequenceNumber seqNum; // last sequence number used for this account
uint32 numSubEntries; // number of sub-entries this account has
// drives the reserve
AccountID* inflationDest; // Account to vote for during inflation
uint32 flags; // see AccountFlags
string32 homeDomain; // can be used for reverse federation and memo lookup
// fields used for signatures
// thresholds stores unsigned bytes: [weight of master|low|medium|high]
Thresholds thresholds;
Signer signers<MAX_SIGNERS>; // possible signers for this account
// reserved for future use
union switch (int v)
{
case 0:
void;
case 1:
AccountEntryExtensionV1 v1;
}
ext;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classAccountEntryExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionAccountEntry(AccountID accountID, Int64 balance, SequenceNumber seqNum, Uint32 numSubEntries, AccountID inflationDest, Uint32 flags, String32 homeDomain, Thresholds thresholds, Signer[] signers, AccountEntry.AccountEntryExt ext) Creates a newAccountEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static AccountEntrydecode(XdrDataInputStream stream) static AccountEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic AccountEntrystatic AccountEntryfromXdrBase64(String xdr) static AccountEntryfromXdrByteArray(byte[] xdr) Value of theaccountIDfield.Value of thebalancefield.getExt()Value of theextfield.getFlags()Value of theflagsfield.Value of thehomeDomainfield.Value of theinflationDestfield.Value of thenumSubEntriesfield.Value of theseqNumfield.Signer[]Value of thesignersfield.Value of thethresholdsfield.inthashCode()voidsetAccountID(AccountID accountID) Value of theaccountIDfield.voidsetBalance(Int64 balance) Value of thebalancefield.voidValue of theextfield.voidValue of theflagsfield.voidsetHomeDomain(String32 homeDomain) Value of thehomeDomainfield.voidsetInflationDest(AccountID inflationDest) Value of theinflationDestfield.voidsetNumSubEntries(Uint32 numSubEntries) Value of thenumSubEntriesfield.voidsetSeqNum(SequenceNumber seqNum) Value of theseqNumfield.voidsetSigners(Signer[] signers) Value of thesignersfield.voidsetThresholds(Thresholds thresholds) Value of thethresholdsfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
AccountEntry
public AccountEntry() -
AccountEntry
public AccountEntry(AccountID accountID, Int64 balance, SequenceNumber seqNum, Uint32 numSubEntries, AccountID inflationDest, Uint32 flags, String32 homeDomain, Thresholds thresholds, Signer[] signers, AccountEntry.AccountEntryExt ext) Creates a newAccountEntryinstance.- Parameters:
accountID- theaccountIDfield valuebalance- thebalancefield valueseqNum- theseqNumfield valuenumSubEntries- thenumSubEntriesfield valueinflationDest- theinflationDestfield valueflags- theflagsfield valuehomeDomain- thehomeDomainfield valuethresholds- thethresholdsfield valuesigners- thesignersfield valueext- theextfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getAccountID
Value of theaccountIDfield.- Returns:
- the
accountIDfield value
-
getBalance
Value of thebalancefield.- Returns:
- the
balancefield value
-
getSeqNum
Value of theseqNumfield.- Returns:
- the
seqNumfield value
-
getNumSubEntries
Value of thenumSubEntriesfield.- Returns:
- the
numSubEntriesfield value
-
getInflationDest
Value of theinflationDestfield.- Returns:
- the
inflationDestfield value
-
getFlags
Value of theflagsfield.- Returns:
- the
flagsfield value
-
getHomeDomain
Value of thehomeDomainfield.- Returns:
- the
homeDomainfield value
-
getThresholds
Value of thethresholdsfield.- Returns:
- the
thresholdsfield value
-
getSigners
Value of thesignersfield.- Returns:
- the
signersfield value
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
setAccountID
Value of theaccountIDfield.- Parameters:
accountID- theaccountIDfield value
-
setBalance
Value of thebalancefield.- Parameters:
balance- thebalancefield value
-
setSeqNum
Value of theseqNumfield.- Parameters:
seqNum- theseqNumfield value
-
setNumSubEntries
Value of thenumSubEntriesfield.- Parameters:
numSubEntries- thenumSubEntriesfield value
-
setInflationDest
Value of theinflationDestfield.- Parameters:
inflationDest- theinflationDestfield value
-
setFlags
Value of theflagsfield.- Parameters:
flags- theflagsfield value
-
setHomeDomain
Value of thehomeDomainfield.- Parameters:
homeDomain- thehomeDomainfield value
-
setThresholds
Value of thethresholdsfield.- Parameters:
thresholds- thethresholdsfield value
-
setSigners
Value of thesignersfield.- Parameters:
signers- thesignersfield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
equals
-
hashCode
public int hashCode() -
toString
-