Package org.stellar.sdk
Class SetOptionsOperation.Builder
java.lang.Object
org.stellar.sdk.SetOptionsOperation.Builder
- Enclosing class:
SetOptionsOperation
Builds SetOptions operation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an operationsetClearFlags(int clearFlags) Clears the given flags from the account.setHighThreshold(int highThreshold) A number from 0-255 representing the threshold this account sets on all operations it performs that have a high threshold.setHomeDomain(String homeDomain) Sets the account's home domain address used in Federation.setInflationDestination(String inflationDestination) Sets the inflation destination for the account.setLowThreshold(int lowThreshold) A number from 0-255 representing the threshold this account sets on all operations it performs that have a low threshold.setMasterKeyWeight(int masterKeyWeight) Weight of the master key.setMediumThreshold(int mediumThreshold) A number from 0-255 representing the threshold this account sets on all operations it performs that have a medium threshold.setSetFlags(int setFlags) Sets the given flags on the account.Add, update, or remove a signer from the account.setSourceAccount(String sourceAccount) Sets the source account for this operation.
-
Constructor Details
-
Builder
public Builder()Creates a new SetOptionsOperation builder.
-
-
Method Details
-
setInflationDestination
Sets the inflation destination for the account.- Parameters:
inflationDestination- The inflation destination account.- Returns:
- Builder object so you can chain methods.
-
setClearFlags
Clears the given flags from the account.- Parameters:
clearFlags- For details about the flags, please refer to the accounts doc.- Returns:
- Builder object so you can chain methods.
-
setSetFlags
Sets the given flags on the account.- Parameters:
setFlags- For details about the flags, please refer to the accounts doc.- Returns:
- Builder object so you can chain methods.
-
setMasterKeyWeight
Weight of the master key.- Parameters:
masterKeyWeight- Number between 0 and 255- Returns:
- Builder object so you can chain methods.
-
setLowThreshold
A number from 0-255 representing the threshold this account sets on all operations it performs that have a low threshold.- Parameters:
lowThreshold- Number between 0 and 255- Returns:
- Builder object so you can chain methods.
-
setMediumThreshold
A number from 0-255 representing the threshold this account sets on all operations it performs that have a medium threshold.- Parameters:
mediumThreshold- Number between 0 and 255- Returns:
- Builder object so you can chain methods.
-
setHighThreshold
A number from 0-255 representing the threshold this account sets on all operations it performs that have a high threshold.- Parameters:
highThreshold- Number between 0 and 255- Returns:
- Builder object so you can chain methods.
-
setHomeDomain
Sets the account's home domain address used in Federation.- Parameters:
homeDomain- A string of the address which can be up to 32 characters.- Returns:
- Builder object so you can chain methods.
-
setSigner
public SetOptionsOperation.Builder setSigner(@NonNull @NonNull SignerKey signer, @NonNull @NonNull Integer weight) Add, update, or remove a signer from the account. Signer is deleted if the weight = 0;- Parameters:
signer- The signer key. UseSignerhelper to create this object.weight- The weight to attach to the signer (0-255).- Returns:
- Builder object so you can chain methods.
-
setSourceAccount
Sets the source account for this operation.- Parameters:
sourceAccount- The operation's source account.- Returns:
- Builder object so you can chain methods.
-
build
Builds an operation
-