Package org.stellar.sdk.xdr
Class SCAddress
java.lang.Object
org.stellar.sdk.xdr.SCAddress
- All Implemented Interfaces:
XdrElement
SCAddress's original definition in the XDR file is:
union SCAddress switch (SCAddressType type)
{
case SC_ADDRESS_TYPE_ACCOUNT:
AccountID accountId;
case SC_ADDRESS_TYPE_CONTRACT:
ContractID contractId;
case SC_ADDRESS_TYPE_MUXED_ACCOUNT:
MuxedEd25519Account muxedAccount;
case SC_ADDRESS_TYPE_CLAIMABLE_BALANCE:
ClaimableBalanceID claimableBalanceId;
case SC_ADDRESS_TYPE_LIQUIDITY_POOL:
PoolID liquidityPoolId;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCAddress(SCAddressType discriminant, AccountID accountId, ContractID contractId, MuxedEd25519Account muxedAccount, ClaimableBalanceID claimableBalanceId, PoolID liquidityPoolId) Creates a newSCAddressinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic SCAddress.SCAddressBuilderbuilder()static SCAddressdecode(XdrDataInputStream stream) static SCAddressdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCAddressstatic SCAddressfromXdrBase64(String xdr) static SCAddressfromXdrByteArray(byte[] xdr) Value of theaccountIdfield.Value of theclaimableBalanceIdfield.Value of thecontractIdfield.Value of thediscriminantfield.Value of theliquidityPoolIdfield.Value of themuxedAccountfield.inthashCode()voidsetAccountId(AccountID accountId) Value of theaccountIdfield.voidsetClaimableBalanceId(ClaimableBalanceID claimableBalanceId) Value of theclaimableBalanceIdfield.voidsetContractId(ContractID contractId) Value of thecontractIdfield.voidsetDiscriminant(SCAddressType discriminant) Value of thediscriminantfield.voidsetLiquidityPoolId(PoolID liquidityPoolId) Value of theliquidityPoolIdfield.voidsetMuxedAccount(MuxedEd25519Account muxedAccount) Value of themuxedAccountfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCAddress
public SCAddress() -
SCAddress
public SCAddress(SCAddressType discriminant, AccountID accountId, ContractID contractId, MuxedEd25519Account muxedAccount, ClaimableBalanceID claimableBalanceId, PoolID liquidityPoolId) Creates a newSCAddressinstance.- Parameters:
discriminant- thediscriminantfield valueaccountId- theaccountIdfield valuecontractId- thecontractIdfield valuemuxedAccount- themuxedAccountfield valueclaimableBalanceId- theclaimableBalanceIdfield valueliquidityPoolId- theliquidityPoolIdfield 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
-
getAccountId
Value of theaccountIdfield.- Returns:
- the
accountIdfield value
-
getContractId
Value of thecontractIdfield.- Returns:
- the
contractIdfield value
-
getMuxedAccount
Value of themuxedAccountfield.- Returns:
- the
muxedAccountfield value
-
getClaimableBalanceId
Value of theclaimableBalanceIdfield.- Returns:
- the
claimableBalanceIdfield value
-
getLiquidityPoolId
Value of theliquidityPoolIdfield.- Returns:
- the
liquidityPoolIdfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setAccountId
Value of theaccountIdfield.- Parameters:
accountId- theaccountIdfield value
-
setContractId
Value of thecontractIdfield.- Parameters:
contractId- thecontractIdfield value
-
setMuxedAccount
Value of themuxedAccountfield.- Parameters:
muxedAccount- themuxedAccountfield value
-
setClaimableBalanceId
Value of theclaimableBalanceIdfield.- Parameters:
claimableBalanceId- theclaimableBalanceIdfield value
-
setLiquidityPoolId
Value of theliquidityPoolIdfield.- Parameters:
liquidityPoolId- theliquidityPoolIdfield value
-
equals
-
hashCode
public int hashCode() -
toString
-