stellar-base 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/generated/stellar-base-generated.rb +7 -2
- data/generated/stellar/ledger_entry_change.rb +31 -0
- data/generated/stellar/ledger_entry_change_type.rb +24 -0
- data/generated/stellar/transaction_meta.rb +3 -3
- data/generated/stellar/transaction_result_code.rb +23 -26
- data/lib/stellar/base/version.rb +1 -1
- data/xdr/Stellar-ledger.x +24 -4
- data/xdr/Stellar-transaction.x +13 -15
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a47723e2d9150d6aea05202da7fb79397f38b41
|
4
|
+
data.tar.gz: 6fe5b0dda6af9aac8f9932115f6a955cfa4cef9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fac3fc2d37981496c6988302c736ae5c2860b47bbed7dac258a3bdeef3f8d9d2bd4dedc6ba5d41db0526cb12cd98fc6429b55cbc1aac5a74df633459d4820a42
|
7
|
+
data.tar.gz: 49dcadf00e391dc2ed30182a17f7c53fb619710debef5631d3e11876e6c291aba0b820b95db26037168d7661f2dc75f2608471a6a266b911acf0ece590bda8e5
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Automatically generated on 2015-05-
|
1
|
+
# Automatically generated on 2015-05-14T08:36:04-07:00
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
3
3
|
|
4
4
|
require 'xdr'
|
@@ -54,10 +54,15 @@ module Stellar
|
|
54
54
|
autoload :TransactionSet
|
55
55
|
autoload :TransactionResultPair
|
56
56
|
autoload :TransactionResultSet
|
57
|
-
autoload :TransactionMeta
|
58
57
|
autoload :TransactionHistoryEntry
|
59
58
|
autoload :TransactionHistoryResultEntry
|
60
59
|
autoload :LedgerHeaderHistoryEntry
|
60
|
+
|
61
|
+
autoload :LedgerEntryChangeType
|
62
|
+
|
63
|
+
autoload :LedgerEntryChange
|
64
|
+
|
65
|
+
autoload :TransactionMeta
|
61
66
|
end
|
62
67
|
module Stellar
|
63
68
|
include XDR::Namespace
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Automatically generated on 2015-05-14T08:36:04-07:00
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# union LedgerEntryChange switch (LedgerEntryChangeType type)
|
9
|
+
# {
|
10
|
+
# case LEDGER_ENTRY_CREATED:
|
11
|
+
# LedgerEntry created;
|
12
|
+
# case LEDGER_ENTRY_UPDATED:
|
13
|
+
# LedgerEntry updated;
|
14
|
+
# case LEDGER_ENTRY_REMOVED:
|
15
|
+
# LedgerKey removed;
|
16
|
+
# };
|
17
|
+
#
|
18
|
+
# ===========================================================================
|
19
|
+
module Stellar
|
20
|
+
class LedgerEntryChange < XDR::Union
|
21
|
+
switch_on LedgerEntryChangeType, :type
|
22
|
+
|
23
|
+
switch :ledger_entry_created, :created
|
24
|
+
switch :ledger_entry_updated, :updated
|
25
|
+
switch :ledger_entry_removed, :removed
|
26
|
+
|
27
|
+
attribute :created, LedgerEntry
|
28
|
+
attribute :updated, LedgerEntry
|
29
|
+
attribute :removed, LedgerKey
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Automatically generated on 2015-05-14T08:36:04-07:00
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# enum LedgerEntryChangeType
|
9
|
+
# {
|
10
|
+
# LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
|
11
|
+
# LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
|
12
|
+
# LEDGER_ENTRY_REMOVED = 2 // entry was removed from the ledger
|
13
|
+
# };
|
14
|
+
#
|
15
|
+
# ===========================================================================
|
16
|
+
module Stellar
|
17
|
+
class LedgerEntryChangeType < XDR::Enum
|
18
|
+
member :ledger_entry_created, 0
|
19
|
+
member :ledger_entry_updated, 1
|
20
|
+
member :ledger_entry_removed, 2
|
21
|
+
|
22
|
+
seal
|
23
|
+
end
|
24
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Automatically generated on 2015-05-
|
1
|
+
# Automatically generated on 2015-05-14T08:36:04-07:00
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
3
3
|
|
4
4
|
require 'xdr'
|
@@ -7,12 +7,12 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# struct TransactionMeta
|
9
9
|
# {
|
10
|
-
#
|
10
|
+
# LedgerEntryChange changes<>;
|
11
11
|
# };
|
12
12
|
#
|
13
13
|
# ===========================================================================
|
14
14
|
module Stellar
|
15
15
|
class TransactionMeta < XDR::Struct
|
16
|
-
attribute :
|
16
|
+
attribute :changes, XDR::VarArray[LedgerEntryChange]
|
17
17
|
end
|
18
18
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Automatically generated on 2015-05-
|
1
|
+
# Automatically generated on 2015-05-14T08:36:04-07:00
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
3
3
|
|
4
4
|
require 'xdr'
|
@@ -9,39 +9,36 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# txSUCCESS = 0, // all operations succeeded
|
11
11
|
#
|
12
|
-
#
|
12
|
+
# txFAILED = -1, // one of the operations failed (but none were applied)
|
13
13
|
#
|
14
|
-
#
|
14
|
+
# txTOO_EARLY = -2, // ledger closeTime before minTime
|
15
|
+
# txTOO_LATE = -3, // ledger closeTime after maxTime
|
16
|
+
# txMISSING_OPERATION = -4, // no operation was specified
|
17
|
+
# txBAD_SEQ = -5, // sequence number does not match source account
|
15
18
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# txINSUFFICIENT_BALANCE = -8, // fee would bring account below reserve
|
23
|
-
# txNO_ACCOUNT = -9, // source account not found
|
24
|
-
# txINSUFFICIENT_FEE = -10, // fee is too small
|
25
|
-
# txBAD_AUTH_EXTRA = -11, // too many signatures on transaction
|
26
|
-
# txINTERNAL_ERROR = -12 // an unknown error occured
|
19
|
+
# txBAD_AUTH = -6, // not enough signatures to perform transaction
|
20
|
+
# txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve
|
21
|
+
# txNO_ACCOUNT = -8, // source account not found
|
22
|
+
# txINSUFFICIENT_FEE = -9, // fee is too small
|
23
|
+
# txBAD_AUTH_EXTRA = -10, // too many signatures on transaction
|
24
|
+
# txINTERNAL_ERROR = -11 // an unknown error occured
|
27
25
|
# };
|
28
26
|
#
|
29
27
|
# ===========================================================================
|
30
28
|
module Stellar
|
31
29
|
class TransactionResultCode < XDR::Enum
|
32
30
|
member :tx_success, 0
|
33
|
-
member :
|
34
|
-
member :
|
35
|
-
member :
|
36
|
-
member :
|
37
|
-
member :
|
38
|
-
member :
|
39
|
-
member :
|
40
|
-
member :
|
41
|
-
member :
|
42
|
-
member :
|
43
|
-
member :
|
44
|
-
member :tx_internal_error, -12
|
31
|
+
member :tx_failed, -1
|
32
|
+
member :tx_too_early, -2
|
33
|
+
member :tx_too_late, -3
|
34
|
+
member :tx_missing_operation, -4
|
35
|
+
member :tx_bad_seq, -5
|
36
|
+
member :tx_bad_auth, -6
|
37
|
+
member :tx_insufficient_balance, -7
|
38
|
+
member :tx_no_account, -8
|
39
|
+
member :tx_insufficient_fee, -9
|
40
|
+
member :tx_bad_auth_extra, -10
|
41
|
+
member :tx_internal_error, -11
|
45
42
|
|
46
43
|
seal
|
47
44
|
end
|
data/lib/stellar/base/version.rb
CHANGED
data/xdr/Stellar-ledger.x
CHANGED
@@ -92,10 +92,6 @@ struct TransactionResultSet
|
|
92
92
|
};
|
93
93
|
|
94
94
|
// Entries below are used in the historical subsystem
|
95
|
-
struct TransactionMeta
|
96
|
-
{
|
97
|
-
BucketEntry entries<>;
|
98
|
-
};
|
99
95
|
|
100
96
|
struct TransactionHistoryEntry
|
101
97
|
{
|
@@ -114,4 +110,28 @@ struct LedgerHeaderHistoryEntry
|
|
114
110
|
Hash hash;
|
115
111
|
LedgerHeader header;
|
116
112
|
};
|
113
|
+
|
114
|
+
// represents the meta in the transaction table history
|
115
|
+
|
116
|
+
enum LedgerEntryChangeType
|
117
|
+
{
|
118
|
+
LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
|
119
|
+
LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
|
120
|
+
LEDGER_ENTRY_REMOVED = 2 // entry was removed from the ledger
|
121
|
+
};
|
122
|
+
|
123
|
+
union LedgerEntryChange switch (LedgerEntryChangeType type)
|
124
|
+
{
|
125
|
+
case LEDGER_ENTRY_CREATED:
|
126
|
+
LedgerEntry created;
|
127
|
+
case LEDGER_ENTRY_UPDATED:
|
128
|
+
LedgerEntry updated;
|
129
|
+
case LEDGER_ENTRY_REMOVED:
|
130
|
+
LedgerKey removed;
|
131
|
+
};
|
132
|
+
|
133
|
+
struct TransactionMeta
|
134
|
+
{
|
135
|
+
LedgerEntryChange changes<>;
|
136
|
+
};
|
117
137
|
}
|
data/xdr/Stellar-transaction.x
CHANGED
@@ -582,21 +582,19 @@ enum TransactionResultCode
|
|
582
582
|
{
|
583
583
|
txSUCCESS = 0, // all operations succeeded
|
584
584
|
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
txBAD_AUTH_EXTRA = -11, // too many signatures on transaction
|
599
|
-
txINTERNAL_ERROR = -12 // an unknown error occured
|
585
|
+
txFAILED = -1, // one of the operations failed (but none were applied)
|
586
|
+
|
587
|
+
txTOO_EARLY = -2, // ledger closeTime before minTime
|
588
|
+
txTOO_LATE = -3, // ledger closeTime after maxTime
|
589
|
+
txMISSING_OPERATION = -4, // no operation was specified
|
590
|
+
txBAD_SEQ = -5, // sequence number does not match source account
|
591
|
+
|
592
|
+
txBAD_AUTH = -6, // not enough signatures to perform transaction
|
593
|
+
txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve
|
594
|
+
txNO_ACCOUNT = -8, // source account not found
|
595
|
+
txINSUFFICIENT_FEE = -9, // fee is too small
|
596
|
+
txBAD_AUTH_EXTRA = -10, // too many signatures on transaction
|
597
|
+
txINTERNAL_ERROR = -11 // an unknown error occured
|
600
598
|
};
|
601
599
|
|
602
600
|
struct TransactionResult
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stellar-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Fleckenstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xdr
|
@@ -235,6 +235,8 @@ files:
|
|
235
235
|
- generated/stellar/inflation_result.rb
|
236
236
|
- generated/stellar/inflation_result_code.rb
|
237
237
|
- generated/stellar/ledger_entry.rb
|
238
|
+
- generated/stellar/ledger_entry_change.rb
|
239
|
+
- generated/stellar/ledger_entry_change_type.rb
|
238
240
|
- generated/stellar/ledger_entry_type.rb
|
239
241
|
- generated/stellar/ledger_header.rb
|
240
242
|
- generated/stellar/ledger_header_history_entry.rb
|