Skip to content

Commit 77ad2af

Browse files
Update xdr
1 parent b8cf9a3 commit 77ad2af

File tree

4 files changed

+145
-136
lines changed

4 files changed

+145
-136
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
source "https://rubygems.org"
12
gem 'xdrgen', git: 'git@github.com:stellar/xdrgen.git'
23
# gem "xdrgen", path: "../xdrgen"
34
gem 'pry'
45
gem 'octokit'
5-
gem 'netrc'
6+
gem 'netrc'

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ GIT
99
treetop (~> 1.5.3)
1010

1111
GEM
12+
remote: https://rubygems.org/
1213
specs:
1314
activesupport (4.2.1)
1415
i18n (~> 0.7)

src/generated/stellar-xdr_generated.js

Lines changed: 95 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Automatically generated on 2015-04-07T07:50:08-07:00
1+
// Automatically generated on 2015-04-29T12:01:45-07:00
22
// DO NOT EDIT or your changes may be overwritten
33

44
/* jshint maxstatements:2147483647 */
@@ -1131,28 +1131,30 @@ xdr.struct("ClaimOfferAtom", [
11311131
// PAYMENT_SUCCESS_MULTI = 1, // multi-path payment success
11321132
//
11331133
// // codes considered as "failure" for the operation
1134-
// PAYMENT_UNDERFUNDED = 2, // not enough funds in source account
1135-
// PAYMENT_NO_DESTINATION = 3, // destination account does not exist
1136-
// PAYMENT_NO_TRUST = 4, // destination missing a trust line for currency
1137-
// PAYMENT_NOT_AUTHORIZED = 5, // destination not authorized to hold currency
1138-
// PAYMENT_LINE_FULL = 6, // destination would go above their limit
1139-
// PAYMENT_TOO_FEW_OFFERS = 7, // not enough offers to satisfy path payment
1140-
// PAYMENT_OVER_SENDMAX = 8, // multi-path payment could not satisfy sendmax
1141-
// PAYMENT_LOW_RESERVE = 9 // would create an account below the min reserve
1134+
// PAYMENT_MALFORMED = -1, // bad input
1135+
// PAYMENT_UNDERFUNDED = -2, // not enough funds in source account
1136+
// PAYMENT_NO_DESTINATION = -3, // destination account does not exist
1137+
// PAYMENT_NO_TRUST = -4, // destination missing a trust line for currency
1138+
// PAYMENT_NOT_AUTHORIZED = -5, // destination not authorized to hold currency
1139+
// PAYMENT_LINE_FULL = -6, // destination would go above their limit
1140+
// PAYMENT_TOO_FEW_OFFERS = -7, // not enough offers to satisfy path payment
1141+
// PAYMENT_OVER_SENDMAX = -8, // multi-path payment could not satisfy sendmax
1142+
// PAYMENT_LOW_RESERVE = -9 // would create an account below the min reserve
11421143
// };
11431144
//
11441145
// ===========================================================================
11451146
xdr.enum("PaymentResultCode", {
11461147
paymentSuccess: 0,
11471148
paymentSuccessMulti: 1,
1148-
paymentUnderfunded: 2,
1149-
paymentNoDestination: 3,
1150-
paymentNoTrust: 4,
1151-
paymentNotAuthorized: 5,
1152-
paymentLineFull: 6,
1153-
paymentTooFewOffer: 7,
1154-
paymentOverSendmax: 8,
1155-
paymentLowReserve: 9,
1149+
paymentMalformed: -1,
1150+
paymentUnderfunded: -2,
1151+
paymentNoDestination: -3,
1152+
paymentNoTrust: -4,
1153+
paymentNotAuthorized: -5,
1154+
paymentLineFull: -6,
1155+
paymentTooFewOffer: -7,
1156+
paymentOverSendmax: -8,
1157+
paymentLowReserve: -9,
11561158
});
11571159

11581160
// === xdr source ============================================================
@@ -1219,33 +1221,32 @@ xdr.union("PaymentResult", {
12191221
// CREATE_OFFER_SUCCESS = 0,
12201222
//
12211223
// // codes considered as "failure" for the operation
1222-
// CREATE_OFFER_NO_TRUST = 1, // can't hold what it's buying
1223-
// CREATE_OFFER_NOT_AUTHORIZED = 2, // not authorized to hold what it's buying
1224-
// CREATE_OFFER_LINE_FULL = 3, // can't receive more of what it's buying
1225-
// CREATE_OFFER_MALFORMED = 4, // generated offer would be invalid
1226-
// CREATE_OFFER_UNDERFUNDED = 5, // doesn't hold what it's trying to sell
1227-
// CREATE_OFFER_CROSS_SELF = 6, // would cross an offer from the same user
1224+
// CREATE_OFFER_MALFORMED = -1, // generated offer would be invalid
1225+
// CREATE_OFFER_NO_TRUST = -2, // can't hold what it's buying
1226+
// CREATE_OFFER_NOT_AUTHORIZED = -3, // not authorized to hold what it's buying
1227+
// CREATE_OFFER_LINE_FULL = -4, // can't receive more of what it's buying
1228+
// CREATE_OFFER_UNDERFUNDED = -5, // doesn't hold what it's trying to sell
1229+
// CREATE_OFFER_CROSS_SELF = -6, // would cross an offer from the same user
12281230
//
12291231
// // update errors
1230-
// CREATE_OFFER_NOT_FOUND = 7, // offerID does not match an existing offer
1231-
// CREATE_OFFER_MISMATCH = 8, // currencies don't match offer
1232-
//
1233-
// CREATE_OFFER_LOW_RESERVE = 9 // not enough funds to create a new Offer
1232+
// CREATE_OFFER_NOT_FOUND = -7, // offerID does not match an existing offer
1233+
// CREATE_OFFER_MISMATCH = -8, // currencies don't match offer
12341234
//
1235+
// CREATE_OFFER_LOW_RESERVE = -9 // not enough funds to create a new Offer
12351236
// };
12361237
//
12371238
// ===========================================================================
12381239
xdr.enum("CreateOfferResultCode", {
12391240
createOfferSuccess: 0,
1240-
createOfferNoTrust: 1,
1241-
createOfferNotAuthorized: 2,
1242-
createOfferLineFull: 3,
1243-
createOfferMalformed: 4,
1244-
createOfferUnderfunded: 5,
1245-
createOfferCrossSelf: 6,
1246-
createOfferNotFound: 7,
1247-
createOfferMismatch: 8,
1248-
createOfferLowReserve: 9,
1241+
createOfferMalformed: -1,
1242+
createOfferNoTrust: -2,
1243+
createOfferNotAuthorized: -3,
1244+
createOfferLineFull: -4,
1245+
createOfferUnderfunded: -5,
1246+
createOfferCrossSelf: -6,
1247+
createOfferNotFound: -7,
1248+
createOfferMismatch: -8,
1249+
createOfferLowReserve: -9,
12491250
});
12501251

12511252
// === xdr source ============================================================
@@ -1343,17 +1344,19 @@ xdr.union("CreateOfferResult", {
13431344
// // codes considered as "success" for the operation
13441345
// SET_OPTIONS_SUCCESS = 0,
13451346
// // codes considered as "failure" for the operation
1346-
// SET_OPTIONS_LOW_RESERVE = 1, // not enough funds to add a signer
1347-
// SET_OPTIONS_TOO_MANY_SIGNERS = 2, // max number of signers already reached
1348-
// SET_OPTIONS_BAD_FLAGS = 3 // invalid combination of clear/set flags
1347+
// SET_OPTIONS_LOW_RESERVE = -1, // not enough funds to add a signer
1348+
// SET_OPTIONS_TOO_MANY_SIGNERS = -2, // max number of signers already reached
1349+
// SET_OPTIONS_BAD_FLAGS = -3, // invalid combination of clear/set flags
1350+
// SET_OPTIONS_INVALID_INFLATION = -4 // inflation account does not exist
13491351
// };
13501352
//
13511353
// ===========================================================================
13521354
xdr.enum("SetOptionsResultCode", {
13531355
setOptionsSuccess: 0,
1354-
setOptionsLowReserve: 1,
1355-
setOptionsTooManySigner: 2,
1356-
setOptionsBadFlag: 3,
1356+
setOptionsLowReserve: -1,
1357+
setOptionsTooManySigner: -2,
1358+
setOptionsBadFlag: -3,
1359+
setOptionsInvalidInflation: -4,
13571360
});
13581361

13591362
// === xdr source ============================================================
@@ -1385,17 +1388,19 @@ xdr.union("SetOptionsResult", {
13851388
// // codes considered as "success" for the operation
13861389
// CHANGE_TRUST_SUCCESS = 0,
13871390
// // codes considered as "failure" for the operation
1388-
// CHANGE_TRUST_NO_ISSUER = 1, // could not find issuer
1389-
// CHANGE_TRUST_INVALID_LIMIT = 2, // cannot drop limit below balance
1390-
// CHANGE_TRUST_LOW_RESERVE = 3 // not enough funds to create a new trust line
1391+
// CHANGE_TRUST_MALFORMED = -1, // bad input
1392+
// CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer
1393+
// CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance
1394+
// CHANGE_TRUST_LOW_RESERVE = -4 // not enough funds to create a new trust line
13911395
// };
13921396
//
13931397
// ===========================================================================
13941398
xdr.enum("ChangeTrustResultCode", {
13951399
changeTrustSuccess: 0,
1396-
changeTrustNoIssuer: 1,
1397-
changeTrustInvalidLimit: 2,
1398-
changeTrustLowReserve: 3,
1400+
changeTrustMalformed: -1,
1401+
changeTrustNoIssuer: -2,
1402+
changeTrustInvalidLimit: -3,
1403+
changeTrustLowReserve: -4,
13991404
});
14001405

14011406
// === xdr source ============================================================
@@ -1427,17 +1432,17 @@ xdr.union("ChangeTrustResult", {
14271432
// // codes considered as "success" for the operation
14281433
// ALLOW_TRUST_SUCCESS = 0,
14291434
// // codes considered as "failure" for the operation
1430-
// ALLOW_TRUST_MALFORMED = 1, // currency is not ISO4217
1431-
// ALLOW_TRUST_NO_TRUST_LINE = 2, // trustor does not have a trustline
1432-
// ALLOW_TRUST_TRUST_NOT_REQUIRED = 3 // source account does not require trust
1435+
// ALLOW_TRUST_MALFORMED = -1, // currency is not ISO4217
1436+
// ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline
1437+
// ALLOW_TRUST_TRUST_NOT_REQUIRED = -3 // source account does not require trust
14331438
// };
14341439
//
14351440
// ===========================================================================
14361441
xdr.enum("AllowTrustResultCode", {
14371442
allowTrustSuccess: 0,
1438-
allowTrustMalformed: 1,
1439-
allowTrustNoTrustLine: 2,
1440-
allowTrustTrustNotRequired: 3,
1443+
allowTrustMalformed: -1,
1444+
allowTrustNoTrustLine: -2,
1445+
allowTrustTrustNotRequired: -3,
14411446
});
14421447

14431448
// === xdr source ============================================================
@@ -1469,19 +1474,19 @@ xdr.union("AllowTrustResult", {
14691474
// // codes considered as "success" for the operation
14701475
// ACCOUNT_MERGE_SUCCESS = 0,
14711476
// // codes considered as "failure" for the operation
1472-
// ACCOUNT_MERGE_MALFORMED = 1, // can't merge onto itself
1473-
// ACCOUNT_MERGE_NO_ACCOUNT = 2, // destination does not exist
1474-
// ACCOUNT_MERGE_HAS_CREDIT = 3, // account has active trust lines
1475-
// ACCOUNT_MERGE_CREDIT_HELD = 4 // an issuer cannot be merged if used
1477+
// ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
1478+
// ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
1479+
// ACCOUNT_MERGE_HAS_CREDIT = -3, // account has active trust lines
1480+
// ACCOUNT_MERGE_CREDIT_HELD = -4 // an issuer cannot be merged if used
14761481
// };
14771482
//
14781483
// ===========================================================================
14791484
xdr.enum("AccountMergeResultCode", {
14801485
accountMergeSuccess: 0,
1481-
accountMergeMalformed: 1,
1482-
accountMergeNoAccount: 2,
1483-
accountMergeHasCredit: 3,
1484-
accountMergeCreditHeld: 4,
1486+
accountMergeMalformed: -1,
1487+
accountMergeNoAccount: -2,
1488+
accountMergeHasCredit: -3,
1489+
accountMergeCreditHeld: -4,
14851490
});
14861491

14871492
// === xdr source ============================================================
@@ -1513,13 +1518,13 @@ xdr.union("AccountMergeResult", {
15131518
// // codes considered as "success" for the operation
15141519
// INFLATION_SUCCESS = 0,
15151520
// // codes considered as "failure" for the operation
1516-
// INFLATION_NOT_TIME = 1
1521+
// INFLATION_NOT_TIME = -1
15171522
// };
15181523
//
15191524
// ===========================================================================
15201525
xdr.enum("InflationResultCode", {
15211526
inflationSuccess: 0,
1522-
inflationNotTime: 1,
1527+
inflationNotTime: -1,
15231528
});
15241529

15251530
// === xdr source ============================================================
@@ -1565,15 +1570,15 @@ xdr.union("InflationResult", {
15651570
// {
15661571
// opINNER = 0, // inner object result is valid
15671572
//
1568-
// opBAD_AUTH = 1, // not enough signatures to perform operation
1569-
// opNO_ACCOUNT = 2 // source account was not found
1573+
// opBAD_AUTH = -1, // not enough signatures to perform operation
1574+
// opNO_ACCOUNT = -2 // source account was not found
15701575
// };
15711576
//
15721577
// ===========================================================================
15731578
xdr.enum("OperationResultCode", {
15741579
opInner: 0,
1575-
opBadAuth: 1,
1576-
opNoAccount: 2,
1580+
opBadAuth: -1,
1581+
opNoAccount: -2,
15771582
});
15781583

15791584
// === xdr source ============================================================
@@ -1666,36 +1671,36 @@ xdr.union("OperationResult", {
16661671
// {
16671672
// txSUCCESS = 0, // all operations succeeded
16681673
//
1669-
// txDUPLICATE = 1, // transaction was already submited
1674+
// txDUPLICATE = -1, // transaction was already submited
16701675
//
1671-
// txFAILED = 2, // one of the operations failed (but none were applied)
1676+
// txFAILED = -2, // one of the operations failed (but none were applied)
16721677
//
1673-
// txBAD_LEDGER = 3, // ledger is not in range [minLeder; maxLedger]
1674-
// txMISSING_OPERATION = 4, // no operation was specified
1675-
// txBAD_SEQ = 5, // sequence number does not match source account
1678+
// txBAD_LEDGER = -3, // ledger is not in range [minLeder; maxLedger]
1679+
// txMISSING_OPERATION = -4, // no operation was specified
1680+
// txBAD_SEQ = -5, // sequence number does not match source account
16761681
//
1677-
// txBAD_AUTH = 6, // not enough signatures to perform transaction
1678-
// txINSUFFICIENT_BALANCE = 7, // fee would bring account below reserve
1679-
// txNO_ACCOUNT = 8, // source account not found
1680-
// txINSUFFICIENT_FEE = 9, // max fee is too small
1681-
// txBAD_AUTH_EXTRA = 10, // too many signatures on transaction
1682-
// txINTERNAL_ERROR = 0xFFFFFFFF // an unknown error occured
1682+
// txBAD_AUTH = -6, // not enough signatures to perform transaction
1683+
// txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve
1684+
// txNO_ACCOUNT = -8, // source account not found
1685+
// txINSUFFICIENT_FEE = -9, // max fee is too small
1686+
// txBAD_AUTH_EXTRA = -10, // too many signatures on transaction
1687+
// txINTERNAL_ERROR = -11 // an unknown error occured
16831688
// };
16841689
//
16851690
// ===========================================================================
16861691
xdr.enum("TransactionResultCode", {
16871692
txSuccess: 0,
1688-
txDuplicate: 1,
1689-
txFailed: 2,
1690-
txBadLedger: 3,
1691-
txMissingOperation: 4,
1692-
txBadSeq: 5,
1693-
txBadAuth: 6,
1694-
txInsufficientBalance: 7,
1695-
txNoAccount: 8,
1696-
txInsufficientFee: 9,
1697-
txBadAuthExtra: 10,
1698-
txInternalError: -1,
1693+
txDuplicate: -1,
1694+
txFailed: -2,
1695+
txBadLedger: -3,
1696+
txMissingOperation: -4,
1697+
txBadSeq: -5,
1698+
txBadAuth: -6,
1699+
txInsufficientBalance: -7,
1700+
txNoAccount: -8,
1701+
txInsufficientFee: -9,
1702+
txBadAuthExtra: -10,
1703+
txInternalError: -11,
16991704
});
17001705

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

0 commit comments

Comments
 (0)