Package org.stellar.sdk.xdr
Class SorobanCredentials
java.lang.Object
org.stellar.sdk.xdr.SorobanCredentials
- All Implemented Interfaces:
XdrElement
SorobanCredentials's original definition in the XDR file is:
union SorobanCredentials switch (SorobanCredentialsType type)
{
case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT:
void;
case SOROBAN_CREDENTIALS_ADDRESS:
SorobanAddressCredentials address;
case SOROBAN_CREDENTIALS_ADDRESS_V2:
SorobanAddressCredentials addressV2;
case SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES:
SorobanAddressCredentialsWithDelegates addressWithDelegates;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSorobanCredentials(SorobanCredentialsType discriminant, SorobanAddressCredentials address, SorobanAddressCredentials addressV2, SorobanAddressCredentialsWithDelegates addressWithDelegates) Creates a newSorobanCredentialsinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SorobanCredentialsdecode(XdrDataInputStream stream) static SorobanCredentialsdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SorobanCredentialsstatic SorobanCredentialsfromXdrBase64(String xdr) static SorobanCredentialsfromXdrByteArray(byte[] xdr) Value of theaddressfield.Value of theaddressV2field.Value of theaddressWithDelegatesfield.Value of thediscriminantfield.inthashCode()voidsetAddress(SorobanAddressCredentials address) Value of theaddressfield.voidsetAddressV2(SorobanAddressCredentials addressV2) Value of theaddressV2field.voidsetAddressWithDelegates(SorobanAddressCredentialsWithDelegates addressWithDelegates) Value of theaddressWithDelegatesfield.voidsetDiscriminant(SorobanCredentialsType discriminant) Value of thediscriminantfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SorobanCredentials
public SorobanCredentials() -
SorobanCredentials
public SorobanCredentials(SorobanCredentialsType discriminant, SorobanAddressCredentials address, SorobanAddressCredentials addressV2, SorobanAddressCredentialsWithDelegates addressWithDelegates) Creates a newSorobanCredentialsinstance.- Parameters:
discriminant- thediscriminantfield valueaddress- theaddressfield valueaddressV2- theaddressV2field valueaddressWithDelegates- theaddressWithDelegatesfield 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
-
getAddress
Value of theaddressfield.- Returns:
- the
addressfield value
-
getAddressV2
Value of theaddressV2field.- Returns:
- the
addressV2field value
-
getAddressWithDelegates
Value of theaddressWithDelegatesfield.- Returns:
- the
addressWithDelegatesfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setAddress
Value of theaddressfield.- Parameters:
address- theaddressfield value
-
setAddressV2
Value of theaddressV2field.- Parameters:
addressV2- theaddressV2field value
-
setAddressWithDelegates
Value of theaddressWithDelegatesfield.- Parameters:
addressWithDelegates- theaddressWithDelegatesfield value
-
equals
-
hashCode
public int hashCode() -
toString
-