public class TransferToVestingOperation extends Operation
| Modifier and Type | Field and Description |
|---|---|
protected Asset |
amount |
protected AccountName |
from |
protected AccountName |
to |
| Constructor and Description |
|---|
TransferToVestingOperation(AccountName from,
AccountName to,
Asset amount,
Asset fee)
Create a new transfer to vesting operation to transfer Beowulf Power to
other users.
|
TransferToVestingOperation(AccountName from,
Asset amount,
Asset fee)
Like
TransferToVestingOperation(AccountName, AccountName, Asset, Asset), but
will transform the asset from the from account
to the from account. |
| Modifier and Type | Method and Description |
|---|---|
Asset |
getAmount()
Get the
amount of that has been send. |
Asset |
getFee() |
AccountName |
getFrom()
Get the account name of the user who transfered the
amount. |
Map<SignatureObject,PrivateKeyType> |
getRequiredAuthorities(Map<SignatureObject,PrivateKeyType> requiredAuthoritiesBase)
Add the authorities which are required to sign this operation to an
existing map.
|
AccountName |
getTo()
Get the account name of the user who received the
amount. |
void |
setAmount(Asset amount)
Set the
amount of that will be send. |
void |
setFee(Asset fee) |
void |
setFrom(AccountName from)
Set the account name of the user who transfers the
amount. |
void |
setTo(AccountName to)
Set the account name of the user who will received the
amount. |
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
void |
validate(ValidationType validationType)
Use this method to verify that this object is valid.
|
isVirtual, mergeRequiredAuthorities, mergeRequiredAuthoritiesprotected AccountName from
protected AccountName to
protected Asset amount
public TransferToVestingOperation(AccountName from, AccountName to, Asset amount, Asset fee)
This operation converts BWF into VFS (Vesting Fund Shares) at the current exchange rate. With this operation it is possible to give another account vesting shares so that faucets can pre-fund new accounts with vesting shares.
from - The account to transfer the vestings from (see
setFrom(AccountName)).to - The account that will receive the transfered vestings (see
setTo(AccountName)).amount - The amount of vests to transfer (see
setAmount(Asset)).fee - The fee of transaction.InvalidParameterException - If one of the arguments does not fulfill the requirements.public TransferToVestingOperation(AccountName from, Asset amount, Asset fee)
TransferToVestingOperation(AccountName, AccountName, Asset, Asset), but
will transform the asset from the from account
to the from account.from - The account to transfer the vestings from (see
setFrom(AccountName)).amount - The amount of vests to transfer (see
setAmount(Asset)).fee - The fee of transaction.InvalidParameterException - If one of the arguments does not fulfill the requirements.public void setTo(AccountName to)
amount.to - The account name of the user who will received the
amount.public void setAmount(Asset amount)
amount of that will be send.amount - The amount of that will be send.InvalidParameterException - If the amount is null, not of symbol type BWF
or less than 1.public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.public void validate(ValidationType validationType)
Validatablevalidate in interface ValidatablevalidationType - An indicator telling the method what should be validated.public AccountName getFrom()
amount.amount.public void setFrom(AccountName from)
amount.
Notice: The private active key of this account needs to be stored
in the key storage.from - The account name of the user who will transfer the
amount.InvalidParameterException - If the from account is null.public AccountName getTo()
amount.amount.public Asset getAmount()
amount of that has been send.amount of that has been send.public Asset getFee()
public void setFee(Asset fee)
public Map<SignatureObject,PrivateKeyType> getRequiredAuthorities(Map<SignatureObject,PrivateKeyType> requiredAuthoritiesBase)
OperationgetRequiredAuthorities in class OperationrequiredAuthoritiesBase - A map to which the required authorities of this operation
should be added to.Copyright © 2019. All rights reserved.