Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Pending

### Update:
- feat: add `AUTH_CLAWBACK_ENABLED_FLAG` to `AccountFlag`.

## 2.1.0

### Update:
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/stellar/sdk/AccountFlag.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ public enum AccountFlag {
* Authorization immutable (0x4): If this is set then none of the authorization flags can be set
* and the account can never be deleted.
*/
AUTH_IMMUTABLE_FLAG(AccountFlags.AUTH_IMMUTABLE_FLAG.getValue());
AUTH_IMMUTABLE_FLAG(AccountFlags.AUTH_IMMUTABLE_FLAG.getValue()),

// TODO: Add Clawback Enabled flag
/**
* Authorization clawback enabled (0x8): Allows the issuing account to clawback its credit held by
* other accounts. This flag requires that {@link #AUTH_REVOCABLE_FLAG} is also set.
*/
AUTH_CLAWBACK_ENABLED_FLAG(AccountFlags.AUTH_CLAWBACK_ENABLED_FLAG.getValue());

private final int value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ public class SetOptionsOperation extends Operation {

/**
* Indicates which flags to clear. For details about the flags, please refer to the <a
* href="https://developers.stellar.org/docs/glossary/accounts/" target="_blank">accounts doc</a>.
* You can also use {@link AccountFlag} enum.
* href="https://developers.stellar.org/docs/learn/glossary#flags" target="_blank">accounts
* doc</a>. You can also use {@link AccountFlag} enum.
*/
// TODO: change to EnumSet<AccountFlag> in next major release
@Nullable private final Integer clearFlags;

/**
* Indicates which flags to set. For details about the flags, please refer to the <a
* href="https://developers.stellar.org/docs/glossary/accounts/" target="_blank">accounts doc</a>.
* You can also use {@link AccountFlag} enum.
* href="https://developers.stellar.org/docs/learn/glossary#flags" target="_blank">accounts
* doc</a>. You can also use {@link AccountFlag} enum.
*/
@Nullable private final Integer setFlags;

Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/stellar/sdk/AccountFlagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public void testValues() {
assertEquals(1, AccountFlag.AUTH_REQUIRED_FLAG.getValue());
assertEquals(2, AccountFlag.AUTH_REVOCABLE_FLAG.getValue());
assertEquals(4, AccountFlag.AUTH_IMMUTABLE_FLAG.getValue());
assertEquals(8, AccountFlag.AUTH_CLAWBACK_ENABLED_FLAG.getValue());
}
}