Class SetOptionsOperation.Builder

java.lang.Object
org.stellar.sdk.SetOptionsOperation.Builder
Enclosing class:
SetOptionsOperation

public static class SetOptionsOperation.Builder extends Object
Builds SetOptions operation.
See Also:
  • Constructor Details

    • Builder

      public Builder()
      Creates a new SetOptionsOperation builder.
  • Method Details

    • setInflationDestination

      public SetOptionsOperation.Builder setInflationDestination(String inflationDestination)
      Sets the inflation destination for the account.
      Parameters:
      inflationDestination - The inflation destination account.
      Returns:
      Builder object so you can chain methods.
    • setClearFlags

      public SetOptionsOperation.Builder setClearFlags(int clearFlags)
      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

      public SetOptionsOperation.Builder setSetFlags(int setFlags)
      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

      public SetOptionsOperation.Builder setMasterKeyWeight(int masterKeyWeight)
      Weight of the master key.
      Parameters:
      masterKeyWeight - Number between 0 and 255
      Returns:
      Builder object so you can chain methods.
    • setLowThreshold

      public SetOptionsOperation.Builder setLowThreshold(int lowThreshold)
      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

      public SetOptionsOperation.Builder setMediumThreshold(int mediumThreshold)
      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

      public SetOptionsOperation.Builder setHighThreshold(int highThreshold)
      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

      public SetOptionsOperation.Builder setHomeDomain(String homeDomain)
      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. Use Signer helper to create this object.
      weight - The weight to attach to the signer (0-255).
      Returns:
      Builder object so you can chain methods.
    • setSourceAccount

      public SetOptionsOperation.Builder setSourceAccount(String sourceAccount)
      Sets the source account for this operation.
      Parameters:
      sourceAccount - The operation's source account.
      Returns:
      Builder object so you can chain methods.
    • build

      public SetOptionsOperation build()
      Builds an operation