xdr/Stellar-transaction.x in stellar-base-0.10.0 vs xdr/Stellar-transaction.x in stellar-base-0.11.0
- old
+ new
@@ -22,11 +22,12 @@
CREATE_PASSIVE_OFFER = 4,
SET_OPTIONS = 5,
CHANGE_TRUST = 6,
ALLOW_TRUST = 7,
ACCOUNT_MERGE = 8,
- INFLATION = 9
+ INFLATION = 9,
+ MANAGE_DATA = 10
};
/* CreateAccount
Creates and funds a new account with the specified starting balance.
@@ -203,10 +204,25 @@
Threshold: high
Result : AccountMergeResult
*/
+/* ManageData
+ Adds, Updates, or Deletes a key value pair associated with a particular
+ account.
+
+ Threshold: med
+
+ Result: ManageDataResult
+*/
+
+struct ManageDataOp
+{
+ string64 dataName;
+ DataValue* dataValue; // set to null to clear
+};
+
/* An operation is the lowest unit of work that a transaction does */
struct Operation
{
// sourceAccount is the account used to run the operation
// if not set, the runtime defaults to "sourceAccount" specified at
@@ -233,10 +249,12 @@
AllowTrustOp allowTrustOp;
case ACCOUNT_MERGE:
AccountID destination;
case INFLATION:
void;
+ case MANAGE_DATA:
+ ManageDataOp manageDataOp;
}
body;
};
enum MemoType
@@ -590,10 +608,31 @@
InflationPayout payouts<>;
default:
void;
};
+/******* ManageData Result ********/
+
+enum ManageDataResultCode
+{
+ // codes considered as "success" for the operation
+ MANAGE_DATA_SUCCESS = 0,
+ // codes considered as "failure" for the operation
+ MANAGE_DATA_NOT_SUPPORTED_YET = -1, // The network hasn't moved to this protocol change yet
+ MANAGE_DATA_NAME_NOT_FOUND = -2, // Trying to remove a Data Entry that isn't there
+ MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry
+ MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string
+};
+
+union ManageDataResult switch (ManageDataResultCode code)
+{
+case MANAGE_DATA_SUCCESS:
+ void;
+default:
+ void;
+};
+
/* High level Operation Result */
enum OperationResultCode
{
opINNER = 0, // inner object result is valid
@@ -625,9 +664,11 @@
AllowTrustResult allowTrustResult;
case ACCOUNT_MERGE:
AccountMergeResult accountMergeResult;
case INFLATION:
InflationResult inflationResult;
+ case MANAGE_DATA:
+ ManageDataResult manageDataResult;
}
tr;
default:
void;
};