public class PersistentHarvestingDelegationMessage extends Message
Modifier and Type | Class and Description |
---|---|
static class |
PersistentHarvestingDelegationMessage.HarvestingKeys
When decrypting, the message is converted back to the 2 original private keys.
|
Modifier and Type | Field and Description |
---|---|
static int |
HEX_PAYLOAD_SIZE |
Constructor and Description |
---|
PersistentHarvestingDelegationMessage(java.lang.String payload) |
Modifier and Type | Method and Description |
---|---|
static PersistentHarvestingDelegationMessage |
create(PrivateKey signingPrivateKey,
PrivateKey vrfPrivateKey,
PublicKey nodePublicKey)
Helper constructor that allow users to create an encrypted Persistent Harvesting Delegation
Message
|
PersistentHarvestingDelegationMessage.HarvestingKeys |
decryptPayload(PrivateKey recipientPrivateKey)
Utility method that allow users to decrypt a message if it was created using the Java SDK or
the Typescript SDK.
|
java.lang.String |
getText()
Returns payload as text.
|
createFromHexPayload, createFromPayload, equals, getPayload, getPayloadByteBuffer, getPayloadHex, getType, hashCode
public static final int HEX_PAYLOAD_SIZE
public PersistentHarvestingDelegationMessage(java.lang.String payload)
public static PersistentHarvestingDelegationMessage create(PrivateKey signingPrivateKey, PrivateKey vrfPrivateKey, PublicKey nodePublicKey)
Note, the strategy to encrypt and decrypt should be shared between the different SDKs. A client may send a transaction using a sdk and the recipient may be using a different one.
The strategy is:
"plain text" string - utf8 byte array - encrypted byte array - hex string (the encrypted message string)
signingPrivateKey
- Remote harvester signing private key linked to the main accountvrfPrivateKey
- VRF private key linked to the main accountnodePublicKey
- Recipient public keyPersistentHarvestingDelegationMessage
public PersistentHarvestingDelegationMessage.HarvestingKeys decryptPayload(PrivateKey recipientPrivateKey)
recipientPrivateKey
- Recipient private key