Package org.stellar.sdk.xdr
Class HashIDPreimage
java.lang.Object
org.stellar.sdk.xdr.HashIDPreimage
- All Implemented Interfaces:
XdrElement
HashIDPreimage's original definition in the XDR file is:
union HashIDPreimage switch (EnvelopeType type)
{
case ENVELOPE_TYPE_OP_ID:
struct
{
AccountID sourceAccount;
SequenceNumber seqNum;
uint32 opNum;
} operationID;
case ENVELOPE_TYPE_POOL_REVOKE_OP_ID:
struct
{
AccountID sourceAccount;
SequenceNumber seqNum;
uint32 opNum;
PoolID liquidityPoolID;
Asset asset;
} revokeID;
case ENVELOPE_TYPE_CONTRACT_ID:
struct
{
Hash networkID;
ContractIDPreimage contractIDPreimage;
} contractID;
case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION:
struct
{
Hash networkID;
int64 nonce;
uint32 signatureExpirationLedger;
SorobanAuthorizedInvocation invocation;
} sorobanAuthorization;
case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS:
struct
{
Hash networkID;
int64 nonce;
uint32 signatureExpirationLedger;
SCAddress address;
SorobanAuthorizedInvocation invocation;
} sorobanAuthorizationWithAddress;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classHashIDPreimageContractID's original definition in the XDR file is:static classHashIDPreimageOperationID's original definition in the XDR file is:static classHashIDPreimageRevokeID's original definition in the XDR file is:static classHashIDPreimageSorobanAuthorization's original definition in the XDR file is:static classHashIDPreimageSorobanAuthorizationWithAddress's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionHashIDPreimage(EnvelopeType discriminant, HashIDPreimage.HashIDPreimageOperationID operationID, HashIDPreimage.HashIDPreimageRevokeID revokeID, HashIDPreimage.HashIDPreimageContractID contractID, HashIDPreimage.HashIDPreimageSorobanAuthorization sorobanAuthorization, HashIDPreimage.HashIDPreimageSorobanAuthorizationWithAddress sorobanAuthorizationWithAddress) Creates a newHashIDPreimageinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static HashIDPreimagedecode(XdrDataInputStream stream) static HashIDPreimagedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic HashIDPreimagestatic HashIDPreimagefromXdrBase64(String xdr) static HashIDPreimagefromXdrByteArray(byte[] xdr) Value of thecontractIDfield.Value of thediscriminantfield.Value of theoperationIDfield.Value of therevokeIDfield.Value of thesorobanAuthorizationfield.Value of thesorobanAuthorizationWithAddressfield.inthashCode()voidsetContractID(HashIDPreimage.HashIDPreimageContractID contractID) Value of thecontractIDfield.voidsetDiscriminant(EnvelopeType discriminant) Value of thediscriminantfield.voidsetOperationID(HashIDPreimage.HashIDPreimageOperationID operationID) Value of theoperationIDfield.voidValue of therevokeIDfield.voidsetSorobanAuthorization(HashIDPreimage.HashIDPreimageSorobanAuthorization sorobanAuthorization) Value of thesorobanAuthorizationfield.voidsetSorobanAuthorizationWithAddress(HashIDPreimage.HashIDPreimageSorobanAuthorizationWithAddress sorobanAuthorizationWithAddress) Value of thesorobanAuthorizationWithAddressfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
HashIDPreimage
public HashIDPreimage() -
HashIDPreimage
public HashIDPreimage(EnvelopeType discriminant, HashIDPreimage.HashIDPreimageOperationID operationID, HashIDPreimage.HashIDPreimageRevokeID revokeID, HashIDPreimage.HashIDPreimageContractID contractID, HashIDPreimage.HashIDPreimageSorobanAuthorization sorobanAuthorization, HashIDPreimage.HashIDPreimageSorobanAuthorizationWithAddress sorobanAuthorizationWithAddress) Creates a newHashIDPreimageinstance.- Parameters:
discriminant- thediscriminantfield valueoperationID- theoperationIDfield valuerevokeID- therevokeIDfield valuecontractID- thecontractIDfield valuesorobanAuthorization- thesorobanAuthorizationfield valuesorobanAuthorizationWithAddress- thesorobanAuthorizationWithAddressfield 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
-
getOperationID
Value of theoperationIDfield.- Returns:
- the
operationIDfield value
-
getRevokeID
Value of therevokeIDfield.- Returns:
- the
revokeIDfield value
-
getContractID
Value of thecontractIDfield.- Returns:
- the
contractIDfield value
-
getSorobanAuthorization
Value of thesorobanAuthorizationfield.- Returns:
- the
sorobanAuthorizationfield value
-
getSorobanAuthorizationWithAddress
public HashIDPreimage.HashIDPreimageSorobanAuthorizationWithAddress getSorobanAuthorizationWithAddress()Value of thesorobanAuthorizationWithAddressfield.- Returns:
- the
sorobanAuthorizationWithAddressfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setOperationID
Value of theoperationIDfield.- Parameters:
operationID- theoperationIDfield value
-
setRevokeID
Value of therevokeIDfield.- Parameters:
revokeID- therevokeIDfield value
-
setContractID
Value of thecontractIDfield.- Parameters:
contractID- thecontractIDfield value
-
setSorobanAuthorization
public void setSorobanAuthorization(HashIDPreimage.HashIDPreimageSorobanAuthorization sorobanAuthorization) Value of thesorobanAuthorizationfield.- Parameters:
sorobanAuthorization- thesorobanAuthorizationfield value
-
setSorobanAuthorizationWithAddress
public void setSorobanAuthorizationWithAddress(HashIDPreimage.HashIDPreimageSorobanAuthorizationWithAddress sorobanAuthorizationWithAddress) Value of thesorobanAuthorizationWithAddressfield.- Parameters:
sorobanAuthorizationWithAddress- thesorobanAuthorizationWithAddressfield value
-
equals
-
hashCode
public int hashCode() -
toString
-