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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- fix: make Horizon request builder URL generation idempotent so repeated `buildUri()` or `execute()` calls on the same builder do not duplicate path segments.
- docs: add an [Agent Skill](https://agentskills.io/) for the Java Stellar SDK under `skills/`, plus Claude Code plugin manifests in `.claude-plugin/`. The skill gives AI coding agents concise, Stellar-specific guidance (transactions, operations, Horizon, Soroban, XDR/SCVal, and SEP protocols) when generating application code with `stellar-sdk`.
- feat: add SEP-0046, SEP-0047, and SEP-0048 contract introspection support. New `ContractMeta`, `ContractSpec`, and `ContractInfo` wrappers under `org.stellar.sdk.contract` parse contract Wasm metadata and interface specs locally. `SorobanServer` adds `getContractWasm`, `getContractWasmByHash`, `getContractMeta`, `getContractSpec`, and `getContractInfo` for RPC-backed retrieval.
- chore: upgrade generated XDR definitions to Protocol 27.

## 3.0.0

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ xdr/Stellar-transaction.x \
xdr/Stellar-types.x

# stellar-xdr commit to use, see https://github.com/stellar/stellar-xdr
XDR_COMMIT=cff714a5ebaaaf2dac343b3546c2df73f0b7a36e
XDR_COMMIT=68fa1ac55692f68ad2a2ca549d0a283273554439

.PHONY: xdr xdr-clean xdr-update xdr-generator-test xdr-generator-update-snapshots

Expand Down
82 changes: 82 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,84 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AccountEntry implements XdrElement {
/**
* Value of the {@code accountID} field.
*
* @param accountID the {@code accountID} field value
* @return the {@code accountID} field value
*/
private AccountID accountID;

/**
* Value of the {@code balance} field.
*
* @param balance the {@code balance} field value
* @return the {@code balance} field value
*/
private Int64 balance;

/**
* Value of the {@code seqNum} field.
*
* @param seqNum the {@code seqNum} field value
* @return the {@code seqNum} field value
*/
private SequenceNumber seqNum;

/**
* Value of the {@code numSubEntries} field.
*
* @param numSubEntries the {@code numSubEntries} field value
* @return the {@code numSubEntries} field value
*/
private Uint32 numSubEntries;

/**
* Value of the {@code inflationDest} field.
*
* @param inflationDest the {@code inflationDest} field value
* @return the {@code inflationDest} field value
*/
private AccountID inflationDest;

/**
* Value of the {@code flags} field.
*
* @param flags the {@code flags} field value
* @return the {@code flags} field value
*/
private Uint32 flags;

/**
* Value of the {@code homeDomain} field.
*
* @param homeDomain the {@code homeDomain} field value
* @return the {@code homeDomain} field value
*/
private String32 homeDomain;

/**
* Value of the {@code thresholds} field.
*
* @param thresholds the {@code thresholds} field value
* @return the {@code thresholds} field value
*/
private Thresholds thresholds;

/**
* Value of the {@code signers} field.
*
* @param signers the {@code signers} field value
* @return the {@code signers} field value
*/
private Signer[] signers;

/**
* Value of the {@code ext} field.
*
* @param ext the {@code ext} field value
* @return the {@code ext} field value
*/
private AccountEntryExt ext;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down Expand Up @@ -210,7 +279,20 @@ static AccountEntry fromJsonObject(Object json) {
@AllArgsConstructor
@Builder(toBuilder = true)
public static class AccountEntryExt implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private Integer discriminant;

/**
* Value of the {@code v1} field.
*
* @param v1 the {@code v1} field value
* @return the {@code v1} field value
*/
private AccountEntryExtensionV1 v1;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountEntryExtensionV1.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AccountEntryExtensionV1 implements XdrElement {
/**
* Value of the {@code liabilities} field.
*
* @param liabilities the {@code liabilities} field value
* @return the {@code liabilities} field value
*/
private Liabilities liabilities;

/**
* Value of the {@code ext} field.
*
* @param ext the {@code ext} field value
* @return the {@code ext} field value
*/
private AccountEntryExtensionV1Ext ext;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down Expand Up @@ -115,7 +128,20 @@ static AccountEntryExtensionV1 fromJsonObject(Object json) {
@AllArgsConstructor
@Builder(toBuilder = true)
public static class AccountEntryExtensionV1Ext implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private Integer discriminant;

/**
* Value of the {@code v2} field.
*
* @param v2 the {@code v2} field value
* @return the {@code v2} field value
*/
private AccountEntryExtensionV2 v2;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountEntryExtensionV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,36 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AccountEntryExtensionV2 implements XdrElement {
/**
* Value of the {@code numSponsored} field.
*
* @param numSponsored the {@code numSponsored} field value
* @return the {@code numSponsored} field value
*/
private Uint32 numSponsored;

/**
* Value of the {@code numSponsoring} field.
*
* @param numSponsoring the {@code numSponsoring} field value
* @return the {@code numSponsoring} field value
*/
private Uint32 numSponsoring;

/**
* Value of the {@code signerSponsoringIDs} field.
*
* @param signerSponsoringIDs the {@code signerSponsoringIDs} field value
* @return the {@code signerSponsoringIDs} field value
*/
private SponsorshipDescriptor[] signerSponsoringIDs;

/**
* Value of the {@code ext} field.
*
* @param ext the {@code ext} field value
* @return the {@code ext} field value
*/
private AccountEntryExtensionV2Ext ext;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down Expand Up @@ -165,7 +192,20 @@ static AccountEntryExtensionV2 fromJsonObject(Object json) {
@AllArgsConstructor
@Builder(toBuilder = true)
public static class AccountEntryExtensionV2Ext implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private Integer discriminant;

/**
* Value of the {@code v3} field.
*
* @param v3 the {@code v3} field value
* @return the {@code v3} field value
*/
private AccountEntryExtensionV3 v3;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountEntryExtensionV3.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,28 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AccountEntryExtensionV3 implements XdrElement {
/**
* Value of the {@code ext} field.
*
* @param ext the {@code ext} field value
* @return the {@code ext} field value
*/
private ExtensionPoint ext;

/**
* Value of the {@code seqLedger} field.
*
* @param seqLedger the {@code seqLedger} field value
* @return the {@code seqLedger} field value
*/
private Uint32 seqLedger;

/**
* Value of the {@code seqTime} field.
*
* @param seqTime the {@code seqTime} field value
* @return the {@code seqTime} field value
*/
private TimePoint seqTime;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountID.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
@NoArgsConstructor
@AllArgsConstructor
public class AccountID implements XdrElement {
/**
* Value of the {@code AccountID} field.
*
* @param AccountID the {@code AccountID} field value
* @return the {@code AccountID} field value
*/
private PublicKey AccountID;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AccountMergeResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AccountMergeResult implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private AccountMergeResultCode discriminant;

/**
* Value of the {@code sourceAccountBalance} field.
*
* @param sourceAccountBalance the {@code sourceAccountBalance} field value
* @return the {@code sourceAccountBalance} field value
*/
private Int64 sourceAccountBalance;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AllowTrustOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,28 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AllowTrustOp implements XdrElement {
/**
* Value of the {@code trustor} field.
*
* @param trustor the {@code trustor} field value
* @return the {@code trustor} field value
*/
private AccountID trustor;

/**
* Value of the {@code asset} field.
*
* @param asset the {@code asset} field value
* @return the {@code asset} field value
*/
private AssetCode asset;

/**
* Value of the {@code authorize} field.
*
* @param authorize the {@code authorize} field value
* @return the {@code authorize} field value
*/
private Uint32 authorize;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AllowTrustResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AllowTrustResult implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private AllowTrustResultCode discriminant;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AlphaNum12.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,20 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AlphaNum12 implements XdrElement {
/**
* Value of the {@code assetCode} field.
*
* @param assetCode the {@code assetCode} field value
* @return the {@code assetCode} field value
*/
private AssetCode12 assetCode;

/**
* Value of the {@code issuer} field.
*
* @param issuer the {@code issuer} field value
* @return the {@code issuer} field value
*/
private AccountID issuer;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/AlphaNum4.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,20 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class AlphaNum4 implements XdrElement {
/**
* Value of the {@code assetCode} field.
*
* @param assetCode the {@code assetCode} field value
* @return the {@code assetCode} field value
*/
private AssetCode4 assetCode;

/**
* Value of the {@code issuer} field.
*
* @param issuer the {@code issuer} field value
* @return the {@code issuer} field value
*/
private AccountID issuer;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/stellar/sdk/xdr/Asset.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,28 @@
@AllArgsConstructor
@Builder(toBuilder = true)
public class Asset implements XdrElement {
/**
* Value of the {@code discriminant} field.
*
* @param discriminant the {@code discriminant} field value
* @return the {@code discriminant} field value
*/
private AssetType discriminant;

/**
* Value of the {@code alphaNum4} field.
*
* @param alphaNum4 the {@code alphaNum4} field value
* @return the {@code alphaNum4} field value
*/
private AlphaNum4 alphaNum4;

/**
* Value of the {@code alphaNum12} field.
*
* @param alphaNum12 the {@code alphaNum12} field value
* @return the {@code alphaNum12} field value
*/
private AlphaNum12 alphaNum12;

public void encode(XdrDataOutputStream stream) throws IOException {
Expand Down
Loading
Loading