Interface DelegateSet

All Superinterfaces:
Transaction
All Known Implementing Classes:
ImmutableDelegateSet

@Immutable @Beta public interface DelegateSet extends Transaction
A DelegateSet transaction allows an account to delegate a set of permissions to another account. This enables the authorized account to send certain types of transactions on behalf of the delegating account.

This class will be marked Beta until the featurePermissionDelegation amendment is enabled on mainnet. Its API is subject to change.

  • Field Details

    • PERMISSIONS_MAX_LENGTH

      static final int PERMISSIONS_MAX_LENGTH
      The maximum number of permissions that can be delegated in a single transaction.
      See Also:
    • NON_DELEGABLE_TRANSACTIONS

      static final Set<String> NON_DELEGABLE_TRANSACTIONS
      Set of transaction types that cannot be delegated.
  • Method Details

    • builder

      static ImmutableDelegateSet.Builder builder()
      Construct a builder for this class.
      Returns:
      An ImmutableDelegateSet.Builder.
    • flags

      @Default default TransactionFlags flags()
      Set of TransactionFlagss for this DelegateSet. Note that DelegateSet transactions do not support any transaction-specific flags, only universal flags.

      The value of the flags cannot be set manually, but exists for JSON serialization/deserialization only and for proper signature computation in rippled.

      Returns:
      Always TransactionFlags.EMPTY.
    • authorize

      Address authorize()
      The XRP Ledger Address of the account to authorize.
      Returns:
      An Address of the account to authorize.
    • permissions

      List<PermissionWrapper> permissions()
      The transaction permissions (represented by transaction type strings) that the account has been granted.
      Returns:
      A List of PermissionWrappers.
    • validateAuthorizeNotSameAsAccount

      @Check default void validateAuthorizeNotSameAsAccount()
      Validate that the Authorize field is not the same as the Account field.
    • validatePermissionsLength

      @Check default void validatePermissionsLength()
      Validate that the Permissions array has at most PERMISSIONS_MAX_LENGTH elements.
    • validateNoDuplicatePermissions

      @Check default void validateNoDuplicatePermissions()
      Validate that the Permissions array does not contain duplicate values.
    • validateNoNonDelegatableTransactions

      @Check default void validateNoNonDelegatableTransactions()
      Validate that the Permissions array does not contain non-delegatable transaction types.
    • validatePermissionValuesAreValid

      @Check default void validatePermissionValuesAreValid()
      Validate that each permission value corresponds to either a valid TransactionType or GranularPermission.