-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/client/ledger/MpTokenLedgerEntryParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.xrpl.xrpl4j.model.client.ledger; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value.Immutable; | ||
import org.xrpl.xrpl4j.model.transactions.Address; | ||
import org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId; | ||
|
||
@Immutable | ||
@JsonSerialize(as = ImmutableMpTokenLedgerEntryParams.class) | ||
@JsonDeserialize(as = ImmutableMpTokenLedgerEntryParams.class) | ||
public interface MpTokenLedgerEntryParams { | ||
|
||
/** | ||
* Construct a {@code MpTokenLedgerEntryParams} builder. | ||
* | ||
* @return An {@link ImmutableMpTokenLedgerEntryParams.Builder}. | ||
*/ | ||
static ImmutableMpTokenLedgerEntryParams.Builder builder() { | ||
return ImmutableMpTokenLedgerEntryParams.builder(); | ||
} | ||
|
||
@JsonProperty("mpt_issuance_id") | ||
MpTokenIssuanceId mpTokenIssuanceId(); | ||
|
||
Address account(); | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/client/mpt/MptHoldersMpToken.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.xrpl.xrpl4j.model.client.mpt; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value.Immutable; | ||
import org.xrpl.xrpl4j.model.flags.MpTokenFlags; | ||
import org.xrpl.xrpl4j.model.transactions.Address; | ||
import org.xrpl.xrpl4j.model.transactions.Hash256; | ||
import org.xrpl.xrpl4j.model.transactions.MpTokenAmount; | ||
import org.xrpl.xrpl4j.model.transactions.MpTokenObjectAmount; | ||
|
||
import java.util.Optional; | ||
|
||
@Immutable | ||
@JsonSerialize(as = ImmutableMptHoldersMpToken.class) | ||
@JsonDeserialize(as = ImmutableMptHoldersMpToken.class) | ||
public interface MptHoldersMpToken { | ||
|
||
/** | ||
* Construct a {@code MptHoldersMpToken} builder. | ||
* | ||
* @return An {@link ImmutableMptHoldersMpToken.Builder}. | ||
*/ | ||
static ImmutableMptHoldersMpToken.Builder builder() { | ||
return ImmutableMptHoldersMpToken.builder(); | ||
} | ||
|
||
Address account(); | ||
|
||
MpTokenFlags flags(); | ||
|
||
@JsonProperty("mpt_amount") | ||
MpTokenObjectAmount mptAmount(); | ||
|
||
@JsonProperty("locked_amount") | ||
Optional<MpTokenAmount> lockedAmount(); | ||
|
||
@JsonProperty("mptoken_index") | ||
Hash256 mpTokenIndex(); | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/client/mpt/MptHoldersRequestParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.xrpl.xrpl4j.model.client.mpt; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import com.google.common.primitives.UnsignedInteger; | ||
import org.immutables.value.Value.Immutable; | ||
import org.xrpl.xrpl4j.model.client.common.LedgerSpecifier; | ||
import org.xrpl.xrpl4j.model.transactions.Marker; | ||
import org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId; | ||
|
||
import java.util.Optional; | ||
|
||
@Immutable | ||
@JsonSerialize(as = ImmutableMptHoldersRequestParams.class) | ||
@JsonDeserialize(as = ImmutableMptHoldersRequestParams.class) | ||
public interface MptHoldersRequestParams { | ||
|
||
/** | ||
* Construct a {@code MptHoldersRequestParams} builder. | ||
* | ||
* @return An {@link ImmutableMptHoldersRequestParams.Builder}. | ||
*/ | ||
static ImmutableMptHoldersRequestParams.Builder builder() { | ||
return ImmutableMptHoldersRequestParams.builder(); | ||
} | ||
|
||
@JsonProperty("mpt_issuance_id") | ||
MpTokenIssuanceId mpTokenIssuanceId(); | ||
|
||
@JsonUnwrapped | ||
LedgerSpecifier ledgerSpecifier(); | ||
|
||
Optional<Marker> marker(); | ||
|
||
Optional<UnsignedInteger> limit(); | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/client/mpt/MptHoldersResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.xrpl.xrpl4j.model.client.mpt; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import com.google.common.primitives.UnsignedInteger; | ||
import org.immutables.value.Value.Immutable; | ||
import org.xrpl.xrpl4j.model.client.common.LedgerIndex; | ||
import org.xrpl.xrpl4j.model.transactions.Marker; | ||
import org.xrpl.xrpl4j.model.transactions.MpTokenIssuanceId; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
@Immutable | ||
@JsonSerialize(as = ImmutableMptHoldersResponse.class) | ||
@JsonDeserialize(as = ImmutableMptHoldersResponse.class) | ||
public interface MptHoldersResponse { | ||
|
||
/** | ||
* Construct a {@code MptHoldersResponse} builder. | ||
* | ||
* @return An {@link ImmutableMptHoldersResponse.Builder}. | ||
*/ | ||
static ImmutableMptHoldersResponse.Builder builder() { | ||
return ImmutableMptHoldersResponse.builder(); | ||
} | ||
|
||
@JsonProperty("mpt_issuance_id") | ||
MpTokenIssuanceId mpTokenIssuanceId(); | ||
|
||
@JsonProperty("mptokens") | ||
List<MptHoldersMpToken> mpTokens(); | ||
|
||
Optional<Marker> marker(); | ||
|
||
Optional<UnsignedInteger> limit(); | ||
|
||
// FIXME: Is this always the field, or does clio also return `ledger_hash` and potentially `ledger_current_index`? | ||
@JsonProperty("ledger_index") | ||
LedgerIndex ledgerIndex(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters