Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
Update XDR files
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekn committed Nov 5, 2015
1 parent 77b4f2c commit 1133033
Show file tree
Hide file tree
Showing 119 changed files with 951 additions and 284 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@
*.ipr
*.iws
.idea/
/local.properties

# Gradle
.gradle
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AccountEntry.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/org/stellar/base/xdr/AccountFlags.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand All @@ -11,18 +11,22 @@
// enum AccountFlags
// { // masks for each flag
//
// // if set, TrustLines are created with authorized set to "false"
// // requiring the issuer to set it for each TrustLine
// // Flags set on issuer accounts
// // TrustLines are created with authorized set to "false" requiring
// // the issuer to set it for each TrustLine
// AUTH_REQUIRED_FLAG = 0x1,
// // if set, the authorized flag in TrustLines can be cleared
// // If set, the authorized flag in TrustLines can be cleared
// // otherwise, authorization cannot be revoked
// AUTH_REVOCABLE_FLAG = 0x2
// AUTH_REVOCABLE_FLAG = 0x2,
// // Once set, causes all AUTH_* flags to be read-only
// AUTH_IMMUTABLE_FLAG = 0x4
// };

// ===========================================================================
public enum AccountFlags {
AUTH_REQUIRED_FLAG(1),
AUTH_REVOCABLE_FLAG(2),
AUTH_IMMUTABLE_FLAG(4),
;
private int mValue;

Expand All @@ -39,6 +43,7 @@ static AccountFlags decode(XdrDataInputStream stream) throws IOException {
switch (value) {
case 1: return AUTH_REQUIRED_FLAG;
case 2: return AUTH_REVOCABLE_FLAG;
case 4: return AUTH_IMMUTABLE_FLAG;
default:
throw new RuntimeException("Unknown enum value: " + value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AccountID.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AccountMergeResult.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/org/stellar/base/xdr/AccountMergeResultCode.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand All @@ -13,19 +13,19 @@
// // codes considered as "success" for the operation
// ACCOUNT_MERGE_SUCCESS = 0,
// // codes considered as "failure" for the operation
// ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
// ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
// ACCOUNT_MERGE_HAS_CREDIT = -3, // account has active trust lines
// ACCOUNT_MERGE_CREDIT_HELD = -4 // an issuer cannot be merged if used
// ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
// ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
// ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
// ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4 // account has trust lines/offers
// };

// ===========================================================================
public enum AccountMergeResultCode {
ACCOUNT_MERGE_SUCCESS(0),
ACCOUNT_MERGE_MALFORMED(-1),
ACCOUNT_MERGE_NO_ACCOUNT(-2),
ACCOUNT_MERGE_HAS_CREDIT(-3),
ACCOUNT_MERGE_CREDIT_HELD(-4),
ACCOUNT_MERGE_IMMUTABLE_SET(-3),
ACCOUNT_MERGE_HAS_SUB_ENTRIES(-4),
;
private int mValue;

Expand All @@ -43,8 +43,8 @@ static AccountMergeResultCode decode(XdrDataInputStream stream) throws IOExcepti
case 0: return ACCOUNT_MERGE_SUCCESS;
case -1: return ACCOUNT_MERGE_MALFORMED;
case -2: return ACCOUNT_MERGE_NO_ACCOUNT;
case -3: return ACCOUNT_MERGE_HAS_CREDIT;
case -4: return ACCOUNT_MERGE_CREDIT_HELD;
case -3: return ACCOUNT_MERGE_IMMUTABLE_SET;
case -4: return ACCOUNT_MERGE_HAS_SUB_ENTRIES;
default:
throw new RuntimeException("Unknown enum value: " + value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AllowTrustOp.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AllowTrustResult.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/stellar/base/xdr/Asset.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand All @@ -16,14 +16,14 @@
// case ASSET_TYPE_CREDIT_ALPHANUM4:
// struct
// {
// opaque assetCode[4];
// opaque assetCode[4]; // 1 to 4 characters
// AccountID issuer;
// } alphaNum4;
//
// case ASSET_TYPE_CREDIT_ALPHANUM12:
// struct
// {
// opaque assetCode[12];
// opaque assetCode[12]; // 5 to 12 characters
// AccountID issuer;
// } alphaNum12;
//
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/AssetType.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/org/stellar/base/xdr/Auth.java
@@ -0,0 +1,36 @@
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;


import java.io.IOException;

// === xdr source ============================================================

// struct Auth
// {
// // Empty message, just to confirm
// // establishment of MAC keys.
// int unused;
// };

// ===========================================================================
public class Auth {
public Auth () {}
private Integer unused;
public Integer getunused() {
return this.unused;
}
public void setunused(Integer value) {
this.unused = value;
}
public static void encode(XdrDataOutputStream stream, Auth encodedAuth) throws IOException{
stream.writeInt(encodedAuth.unused);
}
public static Auth decode(XdrDataInputStream stream) throws IOException {
Auth decodedAuth = new Auth();
decodedAuth.unused = stream.readInt();
return decodedAuth;
}
}
54 changes: 54 additions & 0 deletions src/main/java/org/stellar/base/xdr/AuthCert.java
@@ -0,0 +1,54 @@
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;


import java.io.IOException;

// === xdr source ============================================================

// struct AuthCert
// {
// Curve25519Public pubkey;
// uint64 expiration;
// Signature sig;
// };

// ===========================================================================
public class AuthCert {
public AuthCert () {}
private Curve25519Public pubkey;
public Curve25519Public getpubkey() {
return this.pubkey;
}
public void setpubkey(Curve25519Public value) {
this.pubkey = value;
}
private Uint64 expiration;
public Uint64 getexpiration() {
return this.expiration;
}
public void setexpiration(Uint64 value) {
this.expiration = value;
}
private Signature sig;
public Signature getsig() {
return this.sig;
}
public void setsig(Signature value) {
this.sig = value;
}
public static void encode(XdrDataOutputStream stream, AuthCert encodedAuthCert) throws IOException{
Curve25519Public.encode(stream, encodedAuthCert.pubkey);
Uint64.encode(stream, encodedAuthCert.expiration);
Signature.encode(stream, encodedAuthCert.sig);
}
public static AuthCert decode(XdrDataInputStream stream) throws IOException {
AuthCert decodedAuthCert = new AuthCert();
decodedAuthCert.pubkey = Curve25519Public.decode(stream);
decodedAuthCert.expiration = Uint64.decode(stream);
decodedAuthCert.sig = Signature.decode(stream);
return decodedAuthCert;
}
}
54 changes: 54 additions & 0 deletions src/main/java/org/stellar/base/xdr/AuthenticatedMessage.java
@@ -0,0 +1,54 @@
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;


import java.io.IOException;

// === xdr source ============================================================

// struct AuthenticatedMessage
// {
// uint64 sequence;
// StellarMessage message;
// HmacSha256Mac mac;
// };

// ===========================================================================
public class AuthenticatedMessage {
public AuthenticatedMessage () {}
private Uint64 sequence;
public Uint64 getsequence() {
return this.sequence;
}
public void setsequence(Uint64 value) {
this.sequence = value;
}
private StellarMessage message;
public StellarMessage getmessage() {
return this.message;
}
public void setmessage(StellarMessage value) {
this.message = value;
}
private HmacSha256Mac mac;
public HmacSha256Mac getmac() {
return this.mac;
}
public void setmac(HmacSha256Mac value) {
this.mac = value;
}
public static void encode(XdrDataOutputStream stream, AuthenticatedMessage encodedAuthenticatedMessage) throws IOException{
Uint64.encode(stream, encodedAuthenticatedMessage.sequence);
StellarMessage.encode(stream, encodedAuthenticatedMessage.message);
HmacSha256Mac.encode(stream, encodedAuthenticatedMessage.mac);
}
public static AuthenticatedMessage decode(XdrDataInputStream stream) throws IOException {
AuthenticatedMessage decodedAuthenticatedMessage = new AuthenticatedMessage();
decodedAuthenticatedMessage.sequence = Uint64.decode(stream);
decodedAuthenticatedMessage.message = StellarMessage.decode(stream);
decodedAuthenticatedMessage.mac = HmacSha256Mac.decode(stream);
return decodedAuthenticatedMessage;
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/BucketEntry.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/BucketEntryType.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/ChangeTrustOp.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/ChangeTrustResult.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand All @@ -16,6 +16,7 @@
// CHANGE_TRUST_MALFORMED = -1, // bad input
// CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer
// CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance
// // cannot create with a limit of 0
// CHANGE_TRUST_LOW_RESERVE = -4 // not enough funds to create a new trust line
// };

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/ClaimOfferAtom.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/CreateAccountOp.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/base/xdr/CryptoKeyType.java
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen
// Automatically generated on 2015-11-05T11:21:06-08:00
// DO NOT EDIT or your changes may be overwritten

package org.stellar.base.xdr;
Expand Down

0 comments on commit 1133033

Please sign in to comment.