Package org.stellar.sdk.xdr
Class LedgerKey
java.lang.Object
org.stellar.sdk.xdr.LedgerKey
- All Implemented Interfaces:
XdrElement
LedgerKey's original definition in the XDR file is:
union LedgerKey switch (LedgerEntryType type)
{
case ACCOUNT:
struct
{
AccountID accountID;
} account;
case TRUSTLINE:
struct
{
AccountID accountID;
TrustLineAsset asset;
} trustLine;
case OFFER:
struct
{
AccountID sellerID;
int64 offerID;
} offer;
case DATA:
struct
{
AccountID accountID;
string64 dataName;
} data;
case CLAIMABLE_BALANCE:
struct
{
ClaimableBalanceID balanceID;
} claimableBalance;
case LIQUIDITY_POOL:
struct
{
PoolID liquidityPoolID;
} liquidityPool;
case CONTRACT_DATA:
struct
{
SCAddress contract;
SCVal key;
ContractDataDurability durability;
} contractData;
case CONTRACT_CODE:
struct
{
Hash hash;
} contractCode;
case CONFIG_SETTING:
struct
{
ConfigSettingID configSettingID;
} configSetting;
case TTL:
struct
{
// Hash of the LedgerKey that is associated with this TTLEntry
Hash keyHash;
} ttl;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLedgerKeyAccount's original definition in the XDR file is:static classstatic classLedgerKeyClaimableBalance's original definition in the XDR file is:static classLedgerKeyConfigSetting's original definition in the XDR file is:static classLedgerKeyContractCode's original definition in the XDR file is:static classLedgerKeyContractData's original definition in the XDR file is:static classLedgerKeyData's original definition in the XDR file is:static classLedgerKeyLiquidityPool's original definition in the XDR file is:static classLedgerKeyOffer's original definition in the XDR file is:static classLedgerKeyTrustLine's original definition in the XDR file is:static classLedgerKeyTtl's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerKey(LedgerEntryType discriminant, LedgerKey.LedgerKeyAccount account, LedgerKey.LedgerKeyTrustLine trustLine, LedgerKey.LedgerKeyOffer offer, LedgerKey.LedgerKeyData data, LedgerKey.LedgerKeyClaimableBalance claimableBalance, LedgerKey.LedgerKeyLiquidityPool liquidityPool, LedgerKey.LedgerKeyContractData contractData, LedgerKey.LedgerKeyContractCode contractCode, LedgerKey.LedgerKeyConfigSetting configSetting, LedgerKey.LedgerKeyTtl ttl) Creates a newLedgerKeyinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic LedgerKey.LedgerKeyBuilderbuilder()static LedgerKeydecode(XdrDataInputStream stream) static LedgerKeydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerKeystatic LedgerKeyfromXdrBase64(String xdr) static LedgerKeyfromXdrByteArray(byte[] xdr) Value of theaccountfield.Value of theclaimableBalancefield.Value of theconfigSettingfield.Value of thecontractCodefield.Value of thecontractDatafield.getData()Value of thedatafield.Value of thediscriminantfield.Value of theliquidityPoolfield.getOffer()Value of theofferfield.Value of thetrustLinefield.getTtl()Value of thettlfield.inthashCode()voidsetAccount(LedgerKey.LedgerKeyAccount account) Value of theaccountfield.voidsetClaimableBalance(LedgerKey.LedgerKeyClaimableBalance claimableBalance) Value of theclaimableBalancefield.voidsetConfigSetting(LedgerKey.LedgerKeyConfigSetting configSetting) Value of theconfigSettingfield.voidsetContractCode(LedgerKey.LedgerKeyContractCode contractCode) Value of thecontractCodefield.voidsetContractData(LedgerKey.LedgerKeyContractData contractData) Value of thecontractDatafield.voidValue of thedatafield.voidsetDiscriminant(LedgerEntryType discriminant) Value of thediscriminantfield.voidsetLiquidityPool(LedgerKey.LedgerKeyLiquidityPool liquidityPool) Value of theliquidityPoolfield.voidsetOffer(LedgerKey.LedgerKeyOffer offer) Value of theofferfield.voidsetTrustLine(LedgerKey.LedgerKeyTrustLine trustLine) Value of thetrustLinefield.voidValue of thettlfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerKey
public LedgerKey() -
LedgerKey
public LedgerKey(LedgerEntryType discriminant, LedgerKey.LedgerKeyAccount account, LedgerKey.LedgerKeyTrustLine trustLine, LedgerKey.LedgerKeyOffer offer, LedgerKey.LedgerKeyData data, LedgerKey.LedgerKeyClaimableBalance claimableBalance, LedgerKey.LedgerKeyLiquidityPool liquidityPool, LedgerKey.LedgerKeyContractData contractData, LedgerKey.LedgerKeyContractCode contractCode, LedgerKey.LedgerKeyConfigSetting configSetting, LedgerKey.LedgerKeyTtl ttl) Creates a newLedgerKeyinstance.- Parameters:
discriminant- thediscriminantfield valueaccount- theaccountfield valuetrustLine- thetrustLinefield valueoffer- theofferfield valuedata- thedatafield valueclaimableBalance- theclaimableBalancefield valueliquidityPool- theliquidityPoolfield valuecontractData- thecontractDatafield valuecontractCode- thecontractCodefield valueconfigSetting- theconfigSettingfield valuettl- thettlfield 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
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getAccount
Value of theaccountfield.- Returns:
- the
accountfield value
-
getTrustLine
Value of thetrustLinefield.- Returns:
- the
trustLinefield value
-
getOffer
Value of theofferfield.- Returns:
- the
offerfield value
-
getData
Value of thedatafield.- Returns:
- the
datafield value
-
getClaimableBalance
Value of theclaimableBalancefield.- Returns:
- the
claimableBalancefield value
-
getLiquidityPool
Value of theliquidityPoolfield.- Returns:
- the
liquidityPoolfield value
-
getContractData
Value of thecontractDatafield.- Returns:
- the
contractDatafield value
-
getContractCode
Value of thecontractCodefield.- Returns:
- the
contractCodefield value
-
getConfigSetting
Value of theconfigSettingfield.- Returns:
- the
configSettingfield value
-
getTtl
Value of thettlfield.- Returns:
- the
ttlfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setAccount
Value of theaccountfield.- Parameters:
account- theaccountfield value
-
setTrustLine
Value of thetrustLinefield.- Parameters:
trustLine- thetrustLinefield value
-
setOffer
Value of theofferfield.- Parameters:
offer- theofferfield value
-
setData
Value of thedatafield.- Parameters:
data- thedatafield value
-
setClaimableBalance
Value of theclaimableBalancefield.- Parameters:
claimableBalance- theclaimableBalancefield value
-
setLiquidityPool
Value of theliquidityPoolfield.- Parameters:
liquidityPool- theliquidityPoolfield value
-
setContractData
Value of thecontractDatafield.- Parameters:
contractData- thecontractDatafield value
-
setContractCode
Value of thecontractCodefield.- Parameters:
contractCode- thecontractCodefield value
-
setConfigSetting
Value of theconfigSettingfield.- Parameters:
configSetting- theconfigSettingfield value
-
setTtl
Value of thettlfield.- Parameters:
ttl- thettlfield value
-
equals
-
hashCode
public int hashCode() -
toString
-