@stellar/stellar-base 12.1.1 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ exports["default"] = void 0;
8
8
  var XDR = _interopRequireWildcard(require("@stellar/js-xdr"));
9
9
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
10
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
11
- // Automatically generated by xdrgen
11
+ // Automatically generated by xdrgen on 2024-09-12T11:09:00-08:00
12
12
  // DO NOT EDIT or your changes may be overwritten
13
13
 
14
14
  /* jshint maxstatements:2147483647 */
@@ -22,13 +22,6 @@ var types = XDR.config(function (xdr) {
22
22
  var SCSYMBOL_LIMIT = 32;
23
23
  var SC_SPEC_DOC_LIMIT = 1024;
24
24
 
25
- // === xdr source ============================================================
26
- //
27
- // typedef opaque Value<>;
28
- //
29
- // ===========================================================================
30
- xdr.typedef("Value", xdr.varOpaque());
31
-
32
25
  // === xdr source ============================================================
33
26
  //
34
27
  // struct SCPBallot
@@ -1785,6 +1778,250 @@ var types = XDR.config(function (xdr) {
1785
1778
  envelopeTypeSorobanAuthorization: 9
1786
1779
  });
1787
1780
 
1781
+ // === xdr source ============================================================
1782
+ //
1783
+ // enum BucketListType
1784
+ // {
1785
+ // LIVE = 0,
1786
+ // HOT_ARCHIVE = 1,
1787
+ // COLD_ARCHIVE = 2
1788
+ // };
1789
+ //
1790
+ // ===========================================================================
1791
+ xdr["enum"]("BucketListType", {
1792
+ live: 0,
1793
+ hotArchive: 1,
1794
+ coldArchive: 2
1795
+ });
1796
+
1797
+ // === xdr source ============================================================
1798
+ //
1799
+ // enum BucketEntryType
1800
+ // {
1801
+ // METAENTRY =
1802
+ // -1, // At-and-after protocol 11: bucket metadata, should come first.
1803
+ // LIVEENTRY = 0, // Before protocol 11: created-or-updated;
1804
+ // // At-and-after protocol 11: only updated.
1805
+ // DEADENTRY = 1,
1806
+ // INITENTRY = 2 // At-and-after protocol 11: only created.
1807
+ // };
1808
+ //
1809
+ // ===========================================================================
1810
+ xdr["enum"]("BucketEntryType", {
1811
+ metaentry: -1,
1812
+ liveentry: 0,
1813
+ deadentry: 1,
1814
+ initentry: 2
1815
+ });
1816
+
1817
+ // === xdr source ============================================================
1818
+ //
1819
+ // enum HotArchiveBucketEntryType
1820
+ // {
1821
+ // HOT_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first.
1822
+ // HOT_ARCHIVE_ARCHIVED = 0, // Entry is Archived
1823
+ // HOT_ARCHIVE_LIVE = 1, // Entry was previously HOT_ARCHIVE_ARCHIVED, or HOT_ARCHIVE_DELETED, but
1824
+ // // has been added back to the live BucketList.
1825
+ // // Does not need to be persisted.
1826
+ // HOT_ARCHIVE_DELETED = 2 // Entry deleted (Note: must be persisted in archive)
1827
+ // };
1828
+ //
1829
+ // ===========================================================================
1830
+ xdr["enum"]("HotArchiveBucketEntryType", {
1831
+ hotArchiveMetaentry: -1,
1832
+ hotArchiveArchived: 0,
1833
+ hotArchiveLive: 1,
1834
+ hotArchiveDeleted: 2
1835
+ });
1836
+
1837
+ // === xdr source ============================================================
1838
+ //
1839
+ // enum ColdArchiveBucketEntryType
1840
+ // {
1841
+ // COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first.
1842
+ // COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch
1843
+ // COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch
1844
+ // COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound
1845
+ // COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry
1846
+ // };
1847
+ //
1848
+ // ===========================================================================
1849
+ xdr["enum"]("ColdArchiveBucketEntryType", {
1850
+ coldArchiveMetaentry: -1,
1851
+ coldArchiveArchivedLeaf: 0,
1852
+ coldArchiveDeletedLeaf: 1,
1853
+ coldArchiveBoundaryLeaf: 2,
1854
+ coldArchiveHash: 3
1855
+ });
1856
+
1857
+ // === xdr source ============================================================
1858
+ //
1859
+ // union switch (int v)
1860
+ // {
1861
+ // case 0:
1862
+ // void;
1863
+ // case 1:
1864
+ // BucketListType bucketListType;
1865
+ // }
1866
+ //
1867
+ // ===========================================================================
1868
+ xdr.union("BucketMetadataExt", {
1869
+ switchOn: xdr["int"](),
1870
+ switchName: "v",
1871
+ switches: [[0, xdr["void"]()], [1, "bucketListType"]],
1872
+ arms: {
1873
+ bucketListType: xdr.lookup("BucketListType")
1874
+ }
1875
+ });
1876
+
1877
+ // === xdr source ============================================================
1878
+ //
1879
+ // struct BucketMetadata
1880
+ // {
1881
+ // // Indicates the protocol version used to create / merge this bucket.
1882
+ // uint32 ledgerVersion;
1883
+ //
1884
+ // // reserved for future use
1885
+ // union switch (int v)
1886
+ // {
1887
+ // case 0:
1888
+ // void;
1889
+ // case 1:
1890
+ // BucketListType bucketListType;
1891
+ // }
1892
+ // ext;
1893
+ // };
1894
+ //
1895
+ // ===========================================================================
1896
+ xdr.struct("BucketMetadata", [["ledgerVersion", xdr.lookup("Uint32")], ["ext", xdr.lookup("BucketMetadataExt")]]);
1897
+
1898
+ // === xdr source ============================================================
1899
+ //
1900
+ // union BucketEntry switch (BucketEntryType type)
1901
+ // {
1902
+ // case LIVEENTRY:
1903
+ // case INITENTRY:
1904
+ // LedgerEntry liveEntry;
1905
+ //
1906
+ // case DEADENTRY:
1907
+ // LedgerKey deadEntry;
1908
+ // case METAENTRY:
1909
+ // BucketMetadata metaEntry;
1910
+ // };
1911
+ //
1912
+ // ===========================================================================
1913
+ xdr.union("BucketEntry", {
1914
+ switchOn: xdr.lookup("BucketEntryType"),
1915
+ switchName: "type",
1916
+ switches: [["liveentry", "liveEntry"], ["initentry", "liveEntry"], ["deadentry", "deadEntry"], ["metaentry", "metaEntry"]],
1917
+ arms: {
1918
+ liveEntry: xdr.lookup("LedgerEntry"),
1919
+ deadEntry: xdr.lookup("LedgerKey"),
1920
+ metaEntry: xdr.lookup("BucketMetadata")
1921
+ }
1922
+ });
1923
+
1924
+ // === xdr source ============================================================
1925
+ //
1926
+ // union HotArchiveBucketEntry switch (HotArchiveBucketEntryType type)
1927
+ // {
1928
+ // case HOT_ARCHIVE_ARCHIVED:
1929
+ // LedgerEntry archivedEntry;
1930
+ //
1931
+ // case HOT_ARCHIVE_LIVE:
1932
+ // case HOT_ARCHIVE_DELETED:
1933
+ // LedgerKey key;
1934
+ // case HOT_ARCHIVE_METAENTRY:
1935
+ // BucketMetadata metaEntry;
1936
+ // };
1937
+ //
1938
+ // ===========================================================================
1939
+ xdr.union("HotArchiveBucketEntry", {
1940
+ switchOn: xdr.lookup("HotArchiveBucketEntryType"),
1941
+ switchName: "type",
1942
+ switches: [["hotArchiveArchived", "archivedEntry"], ["hotArchiveLive", "key"], ["hotArchiveDeleted", "key"], ["hotArchiveMetaentry", "metaEntry"]],
1943
+ arms: {
1944
+ archivedEntry: xdr.lookup("LedgerEntry"),
1945
+ key: xdr.lookup("LedgerKey"),
1946
+ metaEntry: xdr.lookup("BucketMetadata")
1947
+ }
1948
+ });
1949
+
1950
+ // === xdr source ============================================================
1951
+ //
1952
+ // struct ColdArchiveArchivedLeaf
1953
+ // {
1954
+ // uint32 index;
1955
+ // LedgerEntry archivedEntry;
1956
+ // };
1957
+ //
1958
+ // ===========================================================================
1959
+ xdr.struct("ColdArchiveArchivedLeaf", [["index", xdr.lookup("Uint32")], ["archivedEntry", xdr.lookup("LedgerEntry")]]);
1960
+
1961
+ // === xdr source ============================================================
1962
+ //
1963
+ // struct ColdArchiveDeletedLeaf
1964
+ // {
1965
+ // uint32 index;
1966
+ // LedgerKey deletedKey;
1967
+ // };
1968
+ //
1969
+ // ===========================================================================
1970
+ xdr.struct("ColdArchiveDeletedLeaf", [["index", xdr.lookup("Uint32")], ["deletedKey", xdr.lookup("LedgerKey")]]);
1971
+
1972
+ // === xdr source ============================================================
1973
+ //
1974
+ // struct ColdArchiveBoundaryLeaf
1975
+ // {
1976
+ // uint32 index;
1977
+ // bool isLowerBound;
1978
+ // };
1979
+ //
1980
+ // ===========================================================================
1981
+ xdr.struct("ColdArchiveBoundaryLeaf", [["index", xdr.lookup("Uint32")], ["isLowerBound", xdr.bool()]]);
1982
+
1983
+ // === xdr source ============================================================
1984
+ //
1985
+ // struct ColdArchiveHashEntry
1986
+ // {
1987
+ // uint32 index;
1988
+ // uint32 level;
1989
+ // Hash hash;
1990
+ // };
1991
+ //
1992
+ // ===========================================================================
1993
+ xdr.struct("ColdArchiveHashEntry", [["index", xdr.lookup("Uint32")], ["level", xdr.lookup("Uint32")], ["hash", xdr.lookup("Hash")]]);
1994
+
1995
+ // === xdr source ============================================================
1996
+ //
1997
+ // union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type)
1998
+ // {
1999
+ // case COLD_ARCHIVE_METAENTRY:
2000
+ // BucketMetadata metaEntry;
2001
+ // case COLD_ARCHIVE_ARCHIVED_LEAF:
2002
+ // ColdArchiveArchivedLeaf archivedLeaf;
2003
+ // case COLD_ARCHIVE_DELETED_LEAF:
2004
+ // ColdArchiveDeletedLeaf deletedLeaf;
2005
+ // case COLD_ARCHIVE_BOUNDARY_LEAF:
2006
+ // ColdArchiveBoundaryLeaf boundaryLeaf;
2007
+ // case COLD_ARCHIVE_HASH:
2008
+ // ColdArchiveHashEntry hashEntry;
2009
+ // };
2010
+ //
2011
+ // ===========================================================================
2012
+ xdr.union("ColdArchiveBucketEntry", {
2013
+ switchOn: xdr.lookup("ColdArchiveBucketEntryType"),
2014
+ switchName: "type",
2015
+ switches: [["coldArchiveMetaentry", "metaEntry"], ["coldArchiveArchivedLeaf", "archivedLeaf"], ["coldArchiveDeletedLeaf", "deletedLeaf"], ["coldArchiveBoundaryLeaf", "boundaryLeaf"], ["coldArchiveHash", "hashEntry"]],
2016
+ arms: {
2017
+ metaEntry: xdr.lookup("BucketMetadata"),
2018
+ archivedLeaf: xdr.lookup("ColdArchiveArchivedLeaf"),
2019
+ deletedLeaf: xdr.lookup("ColdArchiveDeletedLeaf"),
2020
+ boundaryLeaf: xdr.lookup("ColdArchiveBoundaryLeaf"),
2021
+ hashEntry: xdr.lookup("ColdArchiveHashEntry")
2022
+ }
2023
+ });
2024
+
1788
2025
  // === xdr source ============================================================
1789
2026
  //
1790
2027
  // typedef opaque UpgradeType<128>;
@@ -2070,98 +2307,42 @@ var types = XDR.config(function (xdr) {
2070
2307
 
2071
2308
  // === xdr source ============================================================
2072
2309
  //
2073
- // enum BucketEntryType
2310
+ // enum TxSetComponentType
2074
2311
  // {
2075
- // METAENTRY =
2076
- // -1, // At-and-after protocol 11: bucket metadata, should come first.
2077
- // LIVEENTRY = 0, // Before protocol 11: created-or-updated;
2078
- // // At-and-after protocol 11: only updated.
2079
- // DEADENTRY = 1,
2080
- // INITENTRY = 2 // At-and-after protocol 11: only created.
2312
+ // // txs with effective fee <= bid derived from a base fee (if any).
2313
+ // // If base fee is not specified, no discount is applied.
2314
+ // TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0
2081
2315
  // };
2082
2316
  //
2083
2317
  // ===========================================================================
2084
- xdr["enum"]("BucketEntryType", {
2085
- metaentry: -1,
2086
- liveentry: 0,
2087
- deadentry: 1,
2088
- initentry: 2
2318
+ xdr["enum"]("TxSetComponentType", {
2319
+ txsetCompTxsMaybeDiscountedFee: 0
2089
2320
  });
2090
2321
 
2091
2322
  // === xdr source ============================================================
2092
2323
  //
2093
- // union switch (int v)
2094
- // {
2095
- // case 0:
2096
- // void;
2097
- // }
2324
+ // typedef TransactionEnvelope TxExecutionThread<>;
2098
2325
  //
2099
2326
  // ===========================================================================
2100
- xdr.union("BucketMetadataExt", {
2101
- switchOn: xdr["int"](),
2102
- switchName: "v",
2103
- switches: [[0, xdr["void"]()]],
2104
- arms: {}
2105
- });
2327
+ xdr.typedef("TxExecutionThread", xdr.varArray(xdr.lookup("TransactionEnvelope"), 2147483647));
2106
2328
 
2107
2329
  // === xdr source ============================================================
2108
2330
  //
2109
- // struct BucketMetadata
2110
- // {
2111
- // // Indicates the protocol version used to create / merge this bucket.
2112
- // uint32 ledgerVersion;
2113
- //
2114
- // // reserved for future use
2115
- // union switch (int v)
2116
- // {
2117
- // case 0:
2118
- // void;
2119
- // }
2120
- // ext;
2121
- // };
2331
+ // typedef TxExecutionThread ParallelTxExecutionStage<>;
2122
2332
  //
2123
2333
  // ===========================================================================
2124
- xdr.struct("BucketMetadata", [["ledgerVersion", xdr.lookup("Uint32")], ["ext", xdr.lookup("BucketMetadataExt")]]);
2334
+ xdr.typedef("ParallelTxExecutionStage", xdr.varArray(xdr.lookup("TxExecutionThread"), 2147483647));
2125
2335
 
2126
2336
  // === xdr source ============================================================
2127
2337
  //
2128
- // union BucketEntry switch (BucketEntryType type)
2338
+ // struct ParallelTxsComponent
2129
2339
  // {
2130
- // case LIVEENTRY:
2131
- // case INITENTRY:
2132
- // LedgerEntry liveEntry;
2133
- //
2134
- // case DEADENTRY:
2135
- // LedgerKey deadEntry;
2136
- // case METAENTRY:
2137
- // BucketMetadata metaEntry;
2340
+ // int64* baseFee;
2341
+ // ParallelTxExecutionStage executionStages<>;
2138
2342
  // };
2139
2343
  //
2140
2344
  // ===========================================================================
2141
- xdr.union("BucketEntry", {
2142
- switchOn: xdr.lookup("BucketEntryType"),
2143
- switchName: "type",
2144
- switches: [["liveentry", "liveEntry"], ["initentry", "liveEntry"], ["deadentry", "deadEntry"], ["metaentry", "metaEntry"]],
2145
- arms: {
2146
- liveEntry: xdr.lookup("LedgerEntry"),
2147
- deadEntry: xdr.lookup("LedgerKey"),
2148
- metaEntry: xdr.lookup("BucketMetadata")
2149
- }
2150
- });
2151
-
2152
- // === xdr source ============================================================
2153
- //
2154
- // enum TxSetComponentType
2155
- // {
2156
- // // txs with effective fee <= bid derived from a base fee (if any).
2157
- // // If base fee is not specified, no discount is applied.
2158
- // TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0
2159
- // };
2160
- //
2161
- // ===========================================================================
2162
- xdr["enum"]("TxSetComponentType", {
2163
- txsetCompTxsMaybeDiscountedFee: 0
2164
- });
2345
+ xdr.struct("ParallelTxsComponent", [["baseFee", xdr.option(xdr.lookup("Int64"))], ["executionStages", xdr.varArray(xdr.lookup("ParallelTxExecutionStage"), 2147483647)]]);
2165
2346
 
2166
2347
  // === xdr source ============================================================
2167
2348
  //
@@ -2202,15 +2383,18 @@ var types = XDR.config(function (xdr) {
2202
2383
  // {
2203
2384
  // case 0:
2204
2385
  // TxSetComponent v0Components<>;
2386
+ // case 1:
2387
+ // ParallelTxsComponent parallelTxsComponent;
2205
2388
  // };
2206
2389
  //
2207
2390
  // ===========================================================================
2208
2391
  xdr.union("TransactionPhase", {
2209
2392
  switchOn: xdr["int"](),
2210
2393
  switchName: "v",
2211
- switches: [[0, "v0Components"]],
2394
+ switches: [[0, "v0Components"], [1, "parallelTxsComponent"]],
2212
2395
  arms: {
2213
- v0Components: xdr.varArray(xdr.lookup("TxSetComponent"), 2147483647)
2396
+ v0Components: xdr.varArray(xdr.lookup("TxSetComponent"), 2147483647),
2397
+ parallelTxsComponent: xdr.lookup("ParallelTxsComponent")
2214
2398
  }
2215
2399
  });
2216
2400
 
@@ -3054,7 +3238,12 @@ var types = XDR.config(function (xdr) {
3054
3238
  // SEND_MORE_EXTENDED = 20,
3055
3239
  //
3056
3240
  // FLOOD_ADVERT = 18,
3057
- // FLOOD_DEMAND = 19
3241
+ // FLOOD_DEMAND = 19,
3242
+ //
3243
+ // TIME_SLICED_SURVEY_REQUEST = 21,
3244
+ // TIME_SLICED_SURVEY_RESPONSE = 22,
3245
+ // TIME_SLICED_SURVEY_START_COLLECTING = 23,
3246
+ // TIME_SLICED_SURVEY_STOP_COLLECTING = 24
3058
3247
  // };
3059
3248
  //
3060
3249
  // ===========================================================================
@@ -3078,7 +3267,11 @@ var types = XDR.config(function (xdr) {
3078
3267
  sendMore: 16,
3079
3268
  sendMoreExtended: 20,
3080
3269
  floodAdvert: 18,
3081
- floodDemand: 19
3270
+ floodDemand: 19,
3271
+ timeSlicedSurveyRequest: 21,
3272
+ timeSlicedSurveyResponse: 22,
3273
+ timeSlicedSurveyStartCollecting: 23,
3274
+ timeSlicedSurveyStopCollecting: 24
3082
3275
  });
3083
3276
 
3084
3277
  // === xdr source ============================================================
@@ -3096,12 +3289,14 @@ var types = XDR.config(function (xdr) {
3096
3289
  //
3097
3290
  // enum SurveyMessageCommandType
3098
3291
  // {
3099
- // SURVEY_TOPOLOGY = 0
3292
+ // SURVEY_TOPOLOGY = 0,
3293
+ // TIME_SLICED_SURVEY_TOPOLOGY = 1
3100
3294
  // };
3101
3295
  //
3102
3296
  // ===========================================================================
3103
3297
  xdr["enum"]("SurveyMessageCommandType", {
3104
- surveyTopology: 0
3298
+ surveyTopology: 0,
3299
+ timeSlicedSurveyTopology: 1
3105
3300
  });
3106
3301
 
3107
3302
  // === xdr source ============================================================
@@ -3109,15 +3304,63 @@ var types = XDR.config(function (xdr) {
3109
3304
  // enum SurveyMessageResponseType
3110
3305
  // {
3111
3306
  // SURVEY_TOPOLOGY_RESPONSE_V0 = 0,
3112
- // SURVEY_TOPOLOGY_RESPONSE_V1 = 1
3307
+ // SURVEY_TOPOLOGY_RESPONSE_V1 = 1,
3308
+ // SURVEY_TOPOLOGY_RESPONSE_V2 = 2
3113
3309
  // };
3114
3310
  //
3115
3311
  // ===========================================================================
3116
3312
  xdr["enum"]("SurveyMessageResponseType", {
3117
3313
  surveyTopologyResponseV0: 0,
3118
- surveyTopologyResponseV1: 1
3314
+ surveyTopologyResponseV1: 1,
3315
+ surveyTopologyResponseV2: 2
3119
3316
  });
3120
3317
 
3318
+ // === xdr source ============================================================
3319
+ //
3320
+ // struct TimeSlicedSurveyStartCollectingMessage
3321
+ // {
3322
+ // NodeID surveyorID;
3323
+ // uint32 nonce;
3324
+ // uint32 ledgerNum;
3325
+ // };
3326
+ //
3327
+ // ===========================================================================
3328
+ xdr.struct("TimeSlicedSurveyStartCollectingMessage", [["surveyorId", xdr.lookup("NodeId")], ["nonce", xdr.lookup("Uint32")], ["ledgerNum", xdr.lookup("Uint32")]]);
3329
+
3330
+ // === xdr source ============================================================
3331
+ //
3332
+ // struct SignedTimeSlicedSurveyStartCollectingMessage
3333
+ // {
3334
+ // Signature signature;
3335
+ // TimeSlicedSurveyStartCollectingMessage startCollecting;
3336
+ // };
3337
+ //
3338
+ // ===========================================================================
3339
+ xdr.struct("SignedTimeSlicedSurveyStartCollectingMessage", [["signature", xdr.lookup("Signature")], ["startCollecting", xdr.lookup("TimeSlicedSurveyStartCollectingMessage")]]);
3340
+
3341
+ // === xdr source ============================================================
3342
+ //
3343
+ // struct TimeSlicedSurveyStopCollectingMessage
3344
+ // {
3345
+ // NodeID surveyorID;
3346
+ // uint32 nonce;
3347
+ // uint32 ledgerNum;
3348
+ // };
3349
+ //
3350
+ // ===========================================================================
3351
+ xdr.struct("TimeSlicedSurveyStopCollectingMessage", [["surveyorId", xdr.lookup("NodeId")], ["nonce", xdr.lookup("Uint32")], ["ledgerNum", xdr.lookup("Uint32")]]);
3352
+
3353
+ // === xdr source ============================================================
3354
+ //
3355
+ // struct SignedTimeSlicedSurveyStopCollectingMessage
3356
+ // {
3357
+ // Signature signature;
3358
+ // TimeSlicedSurveyStopCollectingMessage stopCollecting;
3359
+ // };
3360
+ //
3361
+ // ===========================================================================
3362
+ xdr.struct("SignedTimeSlicedSurveyStopCollectingMessage", [["signature", xdr.lookup("Signature")], ["stopCollecting", xdr.lookup("TimeSlicedSurveyStopCollectingMessage")]]);
3363
+
3121
3364
  // === xdr source ============================================================
3122
3365
  //
3123
3366
  // struct SurveyRequestMessage
@@ -3132,6 +3375,19 @@ var types = XDR.config(function (xdr) {
3132
3375
  // ===========================================================================
3133
3376
  xdr.struct("SurveyRequestMessage", [["surveyorPeerId", xdr.lookup("NodeId")], ["surveyedPeerId", xdr.lookup("NodeId")], ["ledgerNum", xdr.lookup("Uint32")], ["encryptionKey", xdr.lookup("Curve25519Public")], ["commandType", xdr.lookup("SurveyMessageCommandType")]]);
3134
3377
 
3378
+ // === xdr source ============================================================
3379
+ //
3380
+ // struct TimeSlicedSurveyRequestMessage
3381
+ // {
3382
+ // SurveyRequestMessage request;
3383
+ // uint32 nonce;
3384
+ // uint32 inboundPeersIndex;
3385
+ // uint32 outboundPeersIndex;
3386
+ // };
3387
+ //
3388
+ // ===========================================================================
3389
+ xdr.struct("TimeSlicedSurveyRequestMessage", [["request", xdr.lookup("SurveyRequestMessage")], ["nonce", xdr.lookup("Uint32")], ["inboundPeersIndex", xdr.lookup("Uint32")], ["outboundPeersIndex", xdr.lookup("Uint32")]]);
3390
+
3135
3391
  // === xdr source ============================================================
3136
3392
  //
3137
3393
  // struct SignedSurveyRequestMessage
@@ -3143,6 +3399,17 @@ var types = XDR.config(function (xdr) {
3143
3399
  // ===========================================================================
3144
3400
  xdr.struct("SignedSurveyRequestMessage", [["requestSignature", xdr.lookup("Signature")], ["request", xdr.lookup("SurveyRequestMessage")]]);
3145
3401
 
3402
+ // === xdr source ============================================================
3403
+ //
3404
+ // struct SignedTimeSlicedSurveyRequestMessage
3405
+ // {
3406
+ // Signature requestSignature;
3407
+ // TimeSlicedSurveyRequestMessage request;
3408
+ // };
3409
+ //
3410
+ // ===========================================================================
3411
+ xdr.struct("SignedTimeSlicedSurveyRequestMessage", [["requestSignature", xdr.lookup("Signature")], ["request", xdr.lookup("TimeSlicedSurveyRequestMessage")]]);
3412
+
3146
3413
  // === xdr source ============================================================
3147
3414
  //
3148
3415
  // typedef opaque EncryptedBody<64000>;
@@ -3164,6 +3431,17 @@ var types = XDR.config(function (xdr) {
3164
3431
  // ===========================================================================
3165
3432
  xdr.struct("SurveyResponseMessage", [["surveyorPeerId", xdr.lookup("NodeId")], ["surveyedPeerId", xdr.lookup("NodeId")], ["ledgerNum", xdr.lookup("Uint32")], ["commandType", xdr.lookup("SurveyMessageCommandType")], ["encryptedBody", xdr.lookup("EncryptedBody")]]);
3166
3433
 
3434
+ // === xdr source ============================================================
3435
+ //
3436
+ // struct TimeSlicedSurveyResponseMessage
3437
+ // {
3438
+ // SurveyResponseMessage response;
3439
+ // uint32 nonce;
3440
+ // };
3441
+ //
3442
+ // ===========================================================================
3443
+ xdr.struct("TimeSlicedSurveyResponseMessage", [["response", xdr.lookup("SurveyResponseMessage")], ["nonce", xdr.lookup("Uint32")]]);
3444
+
3167
3445
  // === xdr source ============================================================
3168
3446
  //
3169
3447
  // struct SignedSurveyResponseMessage
@@ -3175,6 +3453,17 @@ var types = XDR.config(function (xdr) {
3175
3453
  // ===========================================================================
3176
3454
  xdr.struct("SignedSurveyResponseMessage", [["responseSignature", xdr.lookup("Signature")], ["response", xdr.lookup("SurveyResponseMessage")]]);
3177
3455
 
3456
+ // === xdr source ============================================================
3457
+ //
3458
+ // struct SignedTimeSlicedSurveyResponseMessage
3459
+ // {
3460
+ // Signature responseSignature;
3461
+ // TimeSlicedSurveyResponseMessage response;
3462
+ // };
3463
+ //
3464
+ // ===========================================================================
3465
+ xdr.struct("SignedTimeSlicedSurveyResponseMessage", [["responseSignature", xdr.lookup("Signature")], ["response", xdr.lookup("TimeSlicedSurveyResponseMessage")]]);
3466
+
3178
3467
  // === xdr source ============================================================
3179
3468
  //
3180
3469
  // struct PeerStats
@@ -3208,6 +3497,49 @@ var types = XDR.config(function (xdr) {
3208
3497
  // ===========================================================================
3209
3498
  xdr.typedef("PeerStatList", xdr.varArray(xdr.lookup("PeerStats"), 25));
3210
3499
 
3500
+ // === xdr source ============================================================
3501
+ //
3502
+ // struct TimeSlicedNodeData
3503
+ // {
3504
+ // uint32 addedAuthenticatedPeers;
3505
+ // uint32 droppedAuthenticatedPeers;
3506
+ // uint32 totalInboundPeerCount;
3507
+ // uint32 totalOutboundPeerCount;
3508
+ //
3509
+ // // SCP stats
3510
+ // uint32 p75SCPFirstToSelfLatencyMs;
3511
+ // uint32 p75SCPSelfToOtherLatencyMs;
3512
+ //
3513
+ // // How many times the node lost sync in the time slice
3514
+ // uint32 lostSyncCount;
3515
+ //
3516
+ // // Config data
3517
+ // bool isValidator;
3518
+ // uint32 maxInboundPeerCount;
3519
+ // uint32 maxOutboundPeerCount;
3520
+ // };
3521
+ //
3522
+ // ===========================================================================
3523
+ xdr.struct("TimeSlicedNodeData", [["addedAuthenticatedPeers", xdr.lookup("Uint32")], ["droppedAuthenticatedPeers", xdr.lookup("Uint32")], ["totalInboundPeerCount", xdr.lookup("Uint32")], ["totalOutboundPeerCount", xdr.lookup("Uint32")], ["p75ScpFirstToSelfLatencyMs", xdr.lookup("Uint32")], ["p75ScpSelfToOtherLatencyMs", xdr.lookup("Uint32")], ["lostSyncCount", xdr.lookup("Uint32")], ["isValidator", xdr.bool()], ["maxInboundPeerCount", xdr.lookup("Uint32")], ["maxOutboundPeerCount", xdr.lookup("Uint32")]]);
3524
+
3525
+ // === xdr source ============================================================
3526
+ //
3527
+ // struct TimeSlicedPeerData
3528
+ // {
3529
+ // PeerStats peerStats;
3530
+ // uint32 averageLatencyMs;
3531
+ // };
3532
+ //
3533
+ // ===========================================================================
3534
+ xdr.struct("TimeSlicedPeerData", [["peerStats", xdr.lookup("PeerStats")], ["averageLatencyMs", xdr.lookup("Uint32")]]);
3535
+
3536
+ // === xdr source ============================================================
3537
+ //
3538
+ // typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>;
3539
+ //
3540
+ // ===========================================================================
3541
+ xdr.typedef("TimeSlicedPeerDataList", xdr.varArray(xdr.lookup("TimeSlicedPeerData"), 25));
3542
+
3211
3543
  // === xdr source ============================================================
3212
3544
  //
3213
3545
  // struct TopologyResponseBodyV0
@@ -3239,6 +3571,18 @@ var types = XDR.config(function (xdr) {
3239
3571
  // ===========================================================================
3240
3572
  xdr.struct("TopologyResponseBodyV1", [["inboundPeers", xdr.lookup("PeerStatList")], ["outboundPeers", xdr.lookup("PeerStatList")], ["totalInboundPeerCount", xdr.lookup("Uint32")], ["totalOutboundPeerCount", xdr.lookup("Uint32")], ["maxInboundPeerCount", xdr.lookup("Uint32")], ["maxOutboundPeerCount", xdr.lookup("Uint32")]]);
3241
3573
 
3574
+ // === xdr source ============================================================
3575
+ //
3576
+ // struct TopologyResponseBodyV2
3577
+ // {
3578
+ // TimeSlicedPeerDataList inboundPeers;
3579
+ // TimeSlicedPeerDataList outboundPeers;
3580
+ // TimeSlicedNodeData nodeData;
3581
+ // };
3582
+ //
3583
+ // ===========================================================================
3584
+ xdr.struct("TopologyResponseBodyV2", [["inboundPeers", xdr.lookup("TimeSlicedPeerDataList")], ["outboundPeers", xdr.lookup("TimeSlicedPeerDataList")], ["nodeData", xdr.lookup("TimeSlicedNodeData")]]);
3585
+
3242
3586
  // === xdr source ============================================================
3243
3587
  //
3244
3588
  // union SurveyResponseBody switch (SurveyMessageResponseType type)
@@ -3247,16 +3591,19 @@ var types = XDR.config(function (xdr) {
3247
3591
  // TopologyResponseBodyV0 topologyResponseBodyV0;
3248
3592
  // case SURVEY_TOPOLOGY_RESPONSE_V1:
3249
3593
  // TopologyResponseBodyV1 topologyResponseBodyV1;
3594
+ // case SURVEY_TOPOLOGY_RESPONSE_V2:
3595
+ // TopologyResponseBodyV2 topologyResponseBodyV2;
3250
3596
  // };
3251
3597
  //
3252
3598
  // ===========================================================================
3253
3599
  xdr.union("SurveyResponseBody", {
3254
3600
  switchOn: xdr.lookup("SurveyMessageResponseType"),
3255
3601
  switchName: "type",
3256
- switches: [["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"]],
3602
+ switches: [["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"], ["surveyTopologyResponseV2", "topologyResponseBodyV2"]],
3257
3603
  arms: {
3258
3604
  topologyResponseBodyV0: xdr.lookup("TopologyResponseBodyV0"),
3259
- topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1")
3605
+ topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1"),
3606
+ topologyResponseBodyV2: xdr.lookup("TopologyResponseBodyV2")
3260
3607
  }
3261
3608
  });
3262
3609
 
@@ -3341,6 +3688,20 @@ var types = XDR.config(function (xdr) {
3341
3688
  // case SURVEY_RESPONSE:
3342
3689
  // SignedSurveyResponseMessage signedSurveyResponseMessage;
3343
3690
  //
3691
+ // case TIME_SLICED_SURVEY_REQUEST:
3692
+ // SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage;
3693
+ //
3694
+ // case TIME_SLICED_SURVEY_RESPONSE:
3695
+ // SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage;
3696
+ //
3697
+ // case TIME_SLICED_SURVEY_START_COLLECTING:
3698
+ // SignedTimeSlicedSurveyStartCollectingMessage
3699
+ // signedTimeSlicedSurveyStartCollectingMessage;
3700
+ //
3701
+ // case TIME_SLICED_SURVEY_STOP_COLLECTING:
3702
+ // SignedTimeSlicedSurveyStopCollectingMessage
3703
+ // signedTimeSlicedSurveyStopCollectingMessage;
3704
+ //
3344
3705
  // // SCP
3345
3706
  // case GET_SCP_QUORUMSET:
3346
3707
  // uint256 qSetHash;
@@ -3365,7 +3726,7 @@ var types = XDR.config(function (xdr) {
3365
3726
  xdr.union("StellarMessage", {
3366
3727
  switchOn: xdr.lookup("MessageType"),
3367
3728
  switchName: "type",
3368
- switches: [["errorMsg", "error"], ["hello", "hello"], ["auth", "auth"], ["dontHave", "dontHave"], ["getPeers", xdr["void"]()], ["peers", "peers"], ["getTxSet", "txSetHash"], ["txSet", "txSet"], ["generalizedTxSet", "generalizedTxSet"], ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], ["sendMoreExtended", "sendMoreExtendedMessage"], ["floodAdvert", "floodAdvert"], ["floodDemand", "floodDemand"]],
3729
+ switches: [["errorMsg", "error"], ["hello", "hello"], ["auth", "auth"], ["dontHave", "dontHave"], ["getPeers", xdr["void"]()], ["peers", "peers"], ["getTxSet", "txSetHash"], ["txSet", "txSet"], ["generalizedTxSet", "generalizedTxSet"], ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], ["timeSlicedSurveyRequest", "signedTimeSlicedSurveyRequestMessage"], ["timeSlicedSurveyResponse", "signedTimeSlicedSurveyResponseMessage"], ["timeSlicedSurveyStartCollecting", "signedTimeSlicedSurveyStartCollectingMessage"], ["timeSlicedSurveyStopCollecting", "signedTimeSlicedSurveyStopCollectingMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], ["sendMoreExtended", "sendMoreExtendedMessage"], ["floodAdvert", "floodAdvert"], ["floodDemand", "floodDemand"]],
3369
3730
  arms: {
3370
3731
  error: xdr.lookup("Error"),
3371
3732
  hello: xdr.lookup("Hello"),
@@ -3378,6 +3739,10 @@ var types = XDR.config(function (xdr) {
3378
3739
  transaction: xdr.lookup("TransactionEnvelope"),
3379
3740
  signedSurveyRequestMessage: xdr.lookup("SignedSurveyRequestMessage"),
3380
3741
  signedSurveyResponseMessage: xdr.lookup("SignedSurveyResponseMessage"),
3742
+ signedTimeSlicedSurveyRequestMessage: xdr.lookup("SignedTimeSlicedSurveyRequestMessage"),
3743
+ signedTimeSlicedSurveyResponseMessage: xdr.lookup("SignedTimeSlicedSurveyResponseMessage"),
3744
+ signedTimeSlicedSurveyStartCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStartCollectingMessage"),
3745
+ signedTimeSlicedSurveyStopCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStopCollectingMessage"),
3381
3746
  qSetHash: xdr.lookup("Uint256"),
3382
3747
  qSet: xdr.lookup("ScpQuorumSet"),
3383
3748
  envelope: xdr.lookup("ScpEnvelope"),
@@ -3929,14 +4294,16 @@ var types = XDR.config(function (xdr) {
3929
4294
  // {
3930
4295
  // HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0,
3931
4296
  // HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1,
3932
- // HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2
4297
+ // HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2,
4298
+ // HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3
3933
4299
  // };
3934
4300
  //
3935
4301
  // ===========================================================================
3936
4302
  xdr["enum"]("HostFunctionType", {
3937
4303
  hostFunctionTypeInvokeContract: 0,
3938
4304
  hostFunctionTypeCreateContract: 1,
3939
- hostFunctionTypeUploadContractWasm: 2
4305
+ hostFunctionTypeUploadContractWasm: 2,
4306
+ hostFunctionTypeCreateContractV2: 3
3940
4307
  });
3941
4308
 
3942
4309
  // === xdr source ============================================================
@@ -4000,6 +4367,19 @@ var types = XDR.config(function (xdr) {
4000
4367
  // ===========================================================================
4001
4368
  xdr.struct("CreateContractArgs", [["contractIdPreimage", xdr.lookup("ContractIdPreimage")], ["executable", xdr.lookup("ContractExecutable")]]);
4002
4369
 
4370
+ // === xdr source ============================================================
4371
+ //
4372
+ // struct CreateContractArgsV2
4373
+ // {
4374
+ // ContractIDPreimage contractIDPreimage;
4375
+ // ContractExecutable executable;
4376
+ // // Arguments of the contract's constructor.
4377
+ // SCVal constructorArgs<>;
4378
+ // };
4379
+ //
4380
+ // ===========================================================================
4381
+ xdr.struct("CreateContractArgsV2", [["contractIdPreimage", xdr.lookup("ContractIdPreimage")], ["executable", xdr.lookup("ContractExecutable")], ["constructorArgs", xdr.varArray(xdr.lookup("ScVal"), 2147483647)]]);
4382
+
4003
4383
  // === xdr source ============================================================
4004
4384
  //
4005
4385
  // struct InvokeContractArgs {
@@ -4021,17 +4401,20 @@ var types = XDR.config(function (xdr) {
4021
4401
  // CreateContractArgs createContract;
4022
4402
  // case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM:
4023
4403
  // opaque wasm<>;
4404
+ // case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2:
4405
+ // CreateContractArgsV2 createContractV2;
4024
4406
  // };
4025
4407
  //
4026
4408
  // ===========================================================================
4027
4409
  xdr.union("HostFunction", {
4028
4410
  switchOn: xdr.lookup("HostFunctionType"),
4029
4411
  switchName: "type",
4030
- switches: [["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"]],
4412
+ switches: [["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"], ["hostFunctionTypeCreateContractV2", "createContractV2"]],
4031
4413
  arms: {
4032
4414
  invokeContract: xdr.lookup("InvokeContractArgs"),
4033
4415
  createContract: xdr.lookup("CreateContractArgs"),
4034
- wasm: xdr.varOpaque()
4416
+ wasm: xdr.varOpaque(),
4417
+ createContractV2: xdr.lookup("CreateContractArgsV2")
4035
4418
  }
4036
4419
  });
4037
4420
 
@@ -4040,13 +4423,15 @@ var types = XDR.config(function (xdr) {
4040
4423
  // enum SorobanAuthorizedFunctionType
4041
4424
  // {
4042
4425
  // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0,
4043
- // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1
4426
+ // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1,
4427
+ // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2
4044
4428
  // };
4045
4429
  //
4046
4430
  // ===========================================================================
4047
4431
  xdr["enum"]("SorobanAuthorizedFunctionType", {
4048
4432
  sorobanAuthorizedFunctionTypeContractFn: 0,
4049
- sorobanAuthorizedFunctionTypeCreateContractHostFn: 1
4433
+ sorobanAuthorizedFunctionTypeCreateContractHostFn: 1,
4434
+ sorobanAuthorizedFunctionTypeCreateContractV2HostFn: 2
4050
4435
  });
4051
4436
 
4052
4437
  // === xdr source ============================================================
@@ -4055,18 +4440,29 @@ var types = XDR.config(function (xdr) {
4055
4440
  // {
4056
4441
  // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN:
4057
4442
  // InvokeContractArgs contractFn;
4443
+ // // This variant of auth payload for creating new contract instances
4444
+ // // doesn't allow specifying the constructor arguments, creating contracts
4445
+ // // with constructors that take arguments is only possible by authorizing
4446
+ // // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN`
4447
+ // // (protocol 22+).
4058
4448
  // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
4059
4449
  // CreateContractArgs createContractHostFn;
4450
+ // // This variant of auth payload for creating new contract instances
4451
+ // // is only accepted in and after protocol 22. It allows authorizing the
4452
+ // // contract constructor arguments.
4453
+ // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN:
4454
+ // CreateContractArgsV2 createContractV2HostFn;
4060
4455
  // };
4061
4456
  //
4062
4457
  // ===========================================================================
4063
4458
  xdr.union("SorobanAuthorizedFunction", {
4064
4459
  switchOn: xdr.lookup("SorobanAuthorizedFunctionType"),
4065
4460
  switchName: "type",
4066
- switches: [["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"]],
4461
+ switches: [["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"], ["sorobanAuthorizedFunctionTypeCreateContractV2HostFn", "createContractV2HostFn"]],
4067
4462
  arms: {
4068
4463
  contractFn: xdr.lookup("InvokeContractArgs"),
4069
- createContractHostFn: xdr.lookup("CreateContractArgs")
4464
+ createContractHostFn: xdr.lookup("CreateContractArgs"),
4465
+ createContractV2HostFn: xdr.lookup("CreateContractArgsV2")
4070
4466
  }
4071
4467
  });
4072
4468
 
@@ -4597,6 +4993,110 @@ var types = XDR.config(function (xdr) {
4597
4993
  // ===========================================================================
4598
4994
  xdr.struct("LedgerFootprint", [["readOnly", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ["readWrite", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)]]);
4599
4995
 
4996
+ // === xdr source ============================================================
4997
+ //
4998
+ // enum ArchivalProofType
4999
+ // {
5000
+ // EXISTENCE = 0,
5001
+ // NONEXISTENCE = 1
5002
+ // };
5003
+ //
5004
+ // ===========================================================================
5005
+ xdr["enum"]("ArchivalProofType", {
5006
+ existence: 0,
5007
+ nonexistence: 1
5008
+ });
5009
+
5010
+ // === xdr source ============================================================
5011
+ //
5012
+ // struct ArchivalProofNode
5013
+ // {
5014
+ // uint32 index;
5015
+ // Hash hash;
5016
+ // };
5017
+ //
5018
+ // ===========================================================================
5019
+ xdr.struct("ArchivalProofNode", [["index", xdr.lookup("Uint32")], ["hash", xdr.lookup("Hash")]]);
5020
+
5021
+ // === xdr source ============================================================
5022
+ //
5023
+ // typedef ArchivalProofNode ProofLevel<>;
5024
+ //
5025
+ // ===========================================================================
5026
+ xdr.typedef("ProofLevel", xdr.varArray(xdr.lookup("ArchivalProofNode"), 2147483647));
5027
+
5028
+ // === xdr source ============================================================
5029
+ //
5030
+ // struct NonexistenceProofBody
5031
+ // {
5032
+ // ColdArchiveBucketEntry entriesToProve<>;
5033
+ //
5034
+ // // Vector of vectors, where proofLevels[level]
5035
+ // // contains all HashNodes that correspond with that level
5036
+ // ProofLevel proofLevels<>;
5037
+ // };
5038
+ //
5039
+ // ===========================================================================
5040
+ xdr.struct("NonexistenceProofBody", [["entriesToProve", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)]]);
5041
+
5042
+ // === xdr source ============================================================
5043
+ //
5044
+ // struct ExistenceProofBody
5045
+ // {
5046
+ // LedgerKey keysToProve<>;
5047
+ //
5048
+ // // Bounds for each key being proved, where bound[n]
5049
+ // // corresponds to keysToProve[n]
5050
+ // ColdArchiveBucketEntry lowBoundEntries<>;
5051
+ // ColdArchiveBucketEntry highBoundEntries<>;
5052
+ //
5053
+ // // Vector of vectors, where proofLevels[level]
5054
+ // // contains all HashNodes that correspond with that level
5055
+ // ProofLevel proofLevels<>;
5056
+ // };
5057
+ //
5058
+ // ===========================================================================
5059
+ xdr.struct("ExistenceProofBody", [["keysToProve", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ["lowBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["highBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)]]);
5060
+
5061
+ // === xdr source ============================================================
5062
+ //
5063
+ // union switch (ArchivalProofType t)
5064
+ // {
5065
+ // case EXISTENCE:
5066
+ // NonexistenceProofBody nonexistenceProof;
5067
+ // case NONEXISTENCE:
5068
+ // ExistenceProofBody existenceProof;
5069
+ // }
5070
+ //
5071
+ // ===========================================================================
5072
+ xdr.union("ArchivalProofBody", {
5073
+ switchOn: xdr.lookup("ArchivalProofType"),
5074
+ switchName: "t",
5075
+ switches: [["existence", "nonexistenceProof"], ["nonexistence", "existenceProof"]],
5076
+ arms: {
5077
+ nonexistenceProof: xdr.lookup("NonexistenceProofBody"),
5078
+ existenceProof: xdr.lookup("ExistenceProofBody")
5079
+ }
5080
+ });
5081
+
5082
+ // === xdr source ============================================================
5083
+ //
5084
+ // struct ArchivalProof
5085
+ // {
5086
+ // uint32 epoch; // AST Subtree for this proof
5087
+ //
5088
+ // union switch (ArchivalProofType t)
5089
+ // {
5090
+ // case EXISTENCE:
5091
+ // NonexistenceProofBody nonexistenceProof;
5092
+ // case NONEXISTENCE:
5093
+ // ExistenceProofBody existenceProof;
5094
+ // } body;
5095
+ // };
5096
+ //
5097
+ // ===========================================================================
5098
+ xdr.struct("ArchivalProof", [["epoch", xdr.lookup("Uint32")], ["body", xdr.lookup("ArchivalProofBody")]]);
5099
+
4600
5100
  // === xdr source ============================================================
4601
5101
  //
4602
5102
  // struct SorobanResources
@@ -4615,11 +5115,37 @@ var types = XDR.config(function (xdr) {
4615
5115
  // ===========================================================================
4616
5116
  xdr.struct("SorobanResources", [["footprint", xdr.lookup("LedgerFootprint")], ["instructions", xdr.lookup("Uint32")], ["readBytes", xdr.lookup("Uint32")], ["writeBytes", xdr.lookup("Uint32")]]);
4617
5117
 
5118
+ // === xdr source ============================================================
5119
+ //
5120
+ // union switch (int v)
5121
+ // {
5122
+ // case 0:
5123
+ // void;
5124
+ // case 1:
5125
+ // ArchivalProof proofs<>;
5126
+ // }
5127
+ //
5128
+ // ===========================================================================
5129
+ xdr.union("SorobanTransactionDataExt", {
5130
+ switchOn: xdr["int"](),
5131
+ switchName: "v",
5132
+ switches: [[0, xdr["void"]()], [1, "proofs"]],
5133
+ arms: {
5134
+ proofs: xdr.varArray(xdr.lookup("ArchivalProof"), 2147483647)
5135
+ }
5136
+ });
5137
+
4618
5138
  // === xdr source ============================================================
4619
5139
  //
4620
5140
  // struct SorobanTransactionData
4621
5141
  // {
4622
- // ExtensionPoint ext;
5142
+ // union switch (int v)
5143
+ // {
5144
+ // case 0:
5145
+ // void;
5146
+ // case 1:
5147
+ // ArchivalProof proofs<>;
5148
+ // } ext;
4623
5149
  // SorobanResources resources;
4624
5150
  // // Amount of the transaction `fee` allocated to the Soroban resource fees.
4625
5151
  // // The fraction of `resourceFee` corresponding to `resources` specified
@@ -4634,7 +5160,7 @@ var types = XDR.config(function (xdr) {
4634
5160
  // };
4635
5161
  //
4636
5162
  // ===========================================================================
4637
- xdr.struct("SorobanTransactionData", [["ext", xdr.lookup("ExtensionPoint")], ["resources", xdr.lookup("SorobanResources")], ["resourceFee", xdr.lookup("Int64")]]);
5163
+ xdr.struct("SorobanTransactionData", [["ext", xdr.lookup("SorobanTransactionDataExt")], ["resources", xdr.lookup("SorobanResources")], ["resourceFee", xdr.lookup("Int64")]]);
4638
5164
 
4639
5165
  // === xdr source ============================================================
4640
5166
  //
@@ -7170,6 +7696,56 @@ var types = XDR.config(function (xdr) {
7170
7696
  // ===========================================================================
7171
7697
  xdr.struct("HmacSha256Mac", [["mac", xdr.opaque(32)]]);
7172
7698
 
7699
+ // === xdr source ============================================================
7700
+ //
7701
+ // struct ShortHashSeed
7702
+ // {
7703
+ // opaque seed[16];
7704
+ // };
7705
+ //
7706
+ // ===========================================================================
7707
+ xdr.struct("ShortHashSeed", [["seed", xdr.opaque(16)]]);
7708
+
7709
+ // === xdr source ============================================================
7710
+ //
7711
+ // enum BinaryFuseFilterType
7712
+ // {
7713
+ // BINARY_FUSE_FILTER_8_BIT = 0,
7714
+ // BINARY_FUSE_FILTER_16_BIT = 1,
7715
+ // BINARY_FUSE_FILTER_32_BIT = 2
7716
+ // };
7717
+ //
7718
+ // ===========================================================================
7719
+ xdr["enum"]("BinaryFuseFilterType", {
7720
+ binaryFuseFilter8Bit: 0,
7721
+ binaryFuseFilter16Bit: 1,
7722
+ binaryFuseFilter32Bit: 2
7723
+ });
7724
+
7725
+ // === xdr source ============================================================
7726
+ //
7727
+ // struct SerializedBinaryFuseFilter
7728
+ // {
7729
+ // BinaryFuseFilterType type;
7730
+ //
7731
+ // // Seed used to hash input to filter
7732
+ // ShortHashSeed inputHashSeed;
7733
+ //
7734
+ // // Seed used for internal filter hash operations
7735
+ // ShortHashSeed filterSeed;
7736
+ // uint32 segmentLength;
7737
+ // uint32 segementLengthMask;
7738
+ // uint32 segmentCount;
7739
+ // uint32 segmentCountLength;
7740
+ // uint32 fingerprintLength; // Length in terms of element count, not bytes
7741
+ //
7742
+ // // Array of uint8_t, uint16_t, or uint32_t depending on filter type
7743
+ // opaque fingerprints<>;
7744
+ // };
7745
+ //
7746
+ // ===========================================================================
7747
+ xdr.struct("SerializedBinaryFuseFilter", [["type", xdr.lookup("BinaryFuseFilterType")], ["inputHashSeed", xdr.lookup("ShortHashSeed")], ["filterSeed", xdr.lookup("ShortHashSeed")], ["segmentLength", xdr.lookup("Uint32")], ["segementLengthMask", xdr.lookup("Uint32")], ["segmentCount", xdr.lookup("Uint32")], ["segmentCountLength", xdr.lookup("Uint32")], ["fingerprintLength", xdr.lookup("Uint32")], ["fingerprints", xdr.varOpaque()]]);
7748
+
7173
7749
  // === xdr source ============================================================
7174
7750
  //
7175
7751
  // enum SCValType
@@ -7632,12 +8208,25 @@ var types = XDR.config(function (xdr) {
7632
8208
  scEnvMetaKindInterfaceVersion: 0
7633
8209
  });
7634
8210
 
8211
+ // === xdr source ============================================================
8212
+ //
8213
+ // struct {
8214
+ // uint32 protocol;
8215
+ // uint32 preRelease;
8216
+ // }
8217
+ //
8218
+ // ===========================================================================
8219
+ xdr.struct("ScEnvMetaEntryInterfaceVersion", [["protocol", xdr.lookup("Uint32")], ["preRelease", xdr.lookup("Uint32")]]);
8220
+
7635
8221
  // === xdr source ============================================================
7636
8222
  //
7637
8223
  // union SCEnvMetaEntry switch (SCEnvMetaKind kind)
7638
8224
  // {
7639
8225
  // case SC_ENV_META_KIND_INTERFACE_VERSION:
7640
- // uint64 interfaceVersion;
8226
+ // struct {
8227
+ // uint32 protocol;
8228
+ // uint32 preRelease;
8229
+ // } interfaceVersion;
7641
8230
  // };
7642
8231
  //
7643
8232
  // ===========================================================================
@@ -7646,7 +8235,7 @@ var types = XDR.config(function (xdr) {
7646
8235
  switchName: "kind",
7647
8236
  switches: [["scEnvMetaKindInterfaceVersion", "interfaceVersion"]],
7648
8237
  arms: {
7649
- interfaceVersion: xdr.lookup("Uint64")
8238
+ interfaceVersion: xdr.lookup("ScEnvMetaEntryInterfaceVersion")
7650
8239
  }
7651
8240
  });
7652
8241
 
@@ -8142,6 +8731,22 @@ var types = XDR.config(function (xdr) {
8142
8731
  // ===========================================================================
8143
8732
  xdr.struct("ConfigSettingContractComputeV0", [["ledgerMaxInstructions", xdr.lookup("Int64")], ["txMaxInstructions", xdr.lookup("Int64")], ["feeRatePerInstructionsIncrement", xdr.lookup("Int64")], ["txMemoryLimit", xdr.lookup("Uint32")]]);
8144
8733
 
8734
+ // === xdr source ============================================================
8735
+ //
8736
+ // struct ConfigSettingContractParallelComputeV0
8737
+ // {
8738
+ // // Maximum number of threads that can be used to apply a
8739
+ // // transaction set to close the ledger.
8740
+ // // This doesn't limit or defined the actual number of
8741
+ // // threads used and instead only defines the minimum number
8742
+ // // of physical threads that a tier-1 validator has to support
8743
+ // // in order to not fall out of sync with the network.
8744
+ // uint32 ledgerMaxParallelThreads;
8745
+ // };
8746
+ //
8747
+ // ===========================================================================
8748
+ xdr.struct("ConfigSettingContractParallelComputeV0", [["ledgerMaxParallelThreads", xdr.lookup("Uint32")]]);
8749
+
8145
8750
  // === xdr source ============================================================
8146
8751
  //
8147
8752
  // struct ConfigSettingContractLedgerCostV0
@@ -8323,7 +8928,58 @@ var types = XDR.config(function (xdr) {
8323
8928
  // // point on a 256-bit elliptic curve
8324
8929
  // Sec1DecodePointUncompressed = 43,
8325
8930
  // // Cost of verifying an ECDSA Secp256r1 signature
8326
- // VerifyEcdsaSecp256r1Sig = 44
8931
+ // VerifyEcdsaSecp256r1Sig = 44,
8932
+ //
8933
+ // // Cost of encoding a BLS12-381 Fp (base field element)
8934
+ // Bls12381EncodeFp = 45,
8935
+ // // Cost of decoding a BLS12-381 Fp (base field element)
8936
+ // Bls12381DecodeFp = 46,
8937
+ // // Cost of checking a G1 point lies on the curve
8938
+ // Bls12381G1CheckPointOnCurve = 47,
8939
+ // // Cost of checking a G1 point belongs to the correct subgroup
8940
+ // Bls12381G1CheckPointInSubgroup = 48,
8941
+ // // Cost of checking a G2 point lies on the curve
8942
+ // Bls12381G2CheckPointOnCurve = 49,
8943
+ // // Cost of checking a G2 point belongs to the correct subgroup
8944
+ // Bls12381G2CheckPointInSubgroup = 50,
8945
+ // // Cost of converting a BLS12-381 G1 point from projective to affine coordinates
8946
+ // Bls12381G1ProjectiveToAffine = 51,
8947
+ // // Cost of converting a BLS12-381 G2 point from projective to affine coordinates
8948
+ // Bls12381G2ProjectiveToAffine = 52,
8949
+ // // Cost of performing BLS12-381 G1 point addition
8950
+ // Bls12381G1Add = 53,
8951
+ // // Cost of performing BLS12-381 G1 scalar multiplication
8952
+ // Bls12381G1Mul = 54,
8953
+ // // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM)
8954
+ // Bls12381G1Msm = 55,
8955
+ // // Cost of mapping a BLS12-381 Fp field element to a G1 point
8956
+ // Bls12381MapFpToG1 = 56,
8957
+ // // Cost of hashing to a BLS12-381 G1 point
8958
+ // Bls12381HashToG1 = 57,
8959
+ // // Cost of performing BLS12-381 G2 point addition
8960
+ // Bls12381G2Add = 58,
8961
+ // // Cost of performing BLS12-381 G2 scalar multiplication
8962
+ // Bls12381G2Mul = 59,
8963
+ // // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM)
8964
+ // Bls12381G2Msm = 60,
8965
+ // // Cost of mapping a BLS12-381 Fp2 field element to a G2 point
8966
+ // Bls12381MapFp2ToG2 = 61,
8967
+ // // Cost of hashing to a BLS12-381 G2 point
8968
+ // Bls12381HashToG2 = 62,
8969
+ // // Cost of performing BLS12-381 pairing operation
8970
+ // Bls12381Pairing = 63,
8971
+ // // Cost of converting a BLS12-381 scalar element from U256
8972
+ // Bls12381FrFromU256 = 64,
8973
+ // // Cost of converting a BLS12-381 scalar element to U256
8974
+ // Bls12381FrToU256 = 65,
8975
+ // // Cost of performing BLS12-381 scalar element addition/subtraction
8976
+ // Bls12381FrAddSub = 66,
8977
+ // // Cost of performing BLS12-381 scalar element multiplication
8978
+ // Bls12381FrMul = 67,
8979
+ // // Cost of performing BLS12-381 scalar element exponentiation
8980
+ // Bls12381FrPow = 68,
8981
+ // // Cost of performing BLS12-381 scalar element inversion
8982
+ // Bls12381FrInv = 69
8327
8983
  // };
8328
8984
  //
8329
8985
  // ===========================================================================
@@ -8372,7 +9028,32 @@ var types = XDR.config(function (xdr) {
8372
9028
  instantiateWasmExports: 41,
8373
9029
  instantiateWasmDataSegmentBytes: 42,
8374
9030
  sec1DecodePointUncompressed: 43,
8375
- verifyEcdsaSecp256r1Sig: 44
9031
+ verifyEcdsaSecp256r1Sig: 44,
9032
+ bls12381EncodeFp: 45,
9033
+ bls12381DecodeFp: 46,
9034
+ bls12381G1CheckPointOnCurve: 47,
9035
+ bls12381G1CheckPointInSubgroup: 48,
9036
+ bls12381G2CheckPointOnCurve: 49,
9037
+ bls12381G2CheckPointInSubgroup: 50,
9038
+ bls12381G1ProjectiveToAffine: 51,
9039
+ bls12381G2ProjectiveToAffine: 52,
9040
+ bls12381G1Add: 53,
9041
+ bls12381G1Mul: 54,
9042
+ bls12381G1Msm: 55,
9043
+ bls12381MapFpToG1: 56,
9044
+ bls12381HashToG1: 57,
9045
+ bls12381G2Add: 58,
9046
+ bls12381G2Mul: 59,
9047
+ bls12381G2Msm: 60,
9048
+ bls12381MapFp2ToG2: 61,
9049
+ bls12381HashToG2: 62,
9050
+ bls12381Pairing: 63,
9051
+ bls12381FrFromU256: 64,
9052
+ bls12381FrToU256: 65,
9053
+ bls12381FrAddSub: 66,
9054
+ bls12381FrMul: 67,
9055
+ bls12381FrPow: 68,
9056
+ bls12381FrInv: 69
8376
9057
  });
8377
9058
 
8378
9059
  // === xdr source ============================================================
@@ -8460,7 +9141,8 @@ var types = XDR.config(function (xdr) {
8460
9141
  // CONFIG_SETTING_STATE_ARCHIVAL = 10,
8461
9142
  // CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11,
8462
9143
  // CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12,
8463
- // CONFIG_SETTING_EVICTION_ITERATOR = 13
9144
+ // CONFIG_SETTING_EVICTION_ITERATOR = 13,
9145
+ // CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14
8464
9146
  // };
8465
9147
  //
8466
9148
  // ===========================================================================
@@ -8478,7 +9160,8 @@ var types = XDR.config(function (xdr) {
8478
9160
  configSettingStateArchival: 10,
8479
9161
  configSettingContractExecutionLanes: 11,
8480
9162
  configSettingBucketlistSizeWindow: 12,
8481
- configSettingEvictionIterator: 13
9163
+ configSettingEvictionIterator: 13,
9164
+ configSettingContractParallelComputeV0: 14
8482
9165
  });
8483
9166
 
8484
9167
  // === xdr source ============================================================
@@ -8513,13 +9196,15 @@ var types = XDR.config(function (xdr) {
8513
9196
  // uint64 bucketListSizeWindow<>;
8514
9197
  // case CONFIG_SETTING_EVICTION_ITERATOR:
8515
9198
  // EvictionIterator evictionIterator;
9199
+ // case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0:
9200
+ // ConfigSettingContractParallelComputeV0 contractParallelCompute;
8516
9201
  // };
8517
9202
  //
8518
9203
  // ===========================================================================
8519
9204
  xdr.union("ConfigSettingEntry", {
8520
9205
  switchOn: xdr.lookup("ConfigSettingId"),
8521
9206
  switchName: "configSettingId",
8522
- switches: [["configSettingContractMaxSizeBytes", "contractMaxSizeBytes"], ["configSettingContractComputeV0", "contractCompute"], ["configSettingContractLedgerCostV0", "contractLedgerCost"], ["configSettingContractHistoricalDataV0", "contractHistoricalData"], ["configSettingContractEventsV0", "contractEvents"], ["configSettingContractBandwidthV0", "contractBandwidth"], ["configSettingContractCostParamsCpuInstructions", "contractCostParamsCpuInsns"], ["configSettingContractCostParamsMemoryBytes", "contractCostParamsMemBytes"], ["configSettingContractDataKeySizeBytes", "contractDataKeySizeBytes"], ["configSettingContractDataEntrySizeBytes", "contractDataEntrySizeBytes"], ["configSettingStateArchival", "stateArchivalSettings"], ["configSettingContractExecutionLanes", "contractExecutionLanes"], ["configSettingBucketlistSizeWindow", "bucketListSizeWindow"], ["configSettingEvictionIterator", "evictionIterator"]],
9207
+ switches: [["configSettingContractMaxSizeBytes", "contractMaxSizeBytes"], ["configSettingContractComputeV0", "contractCompute"], ["configSettingContractLedgerCostV0", "contractLedgerCost"], ["configSettingContractHistoricalDataV0", "contractHistoricalData"], ["configSettingContractEventsV0", "contractEvents"], ["configSettingContractBandwidthV0", "contractBandwidth"], ["configSettingContractCostParamsCpuInstructions", "contractCostParamsCpuInsns"], ["configSettingContractCostParamsMemoryBytes", "contractCostParamsMemBytes"], ["configSettingContractDataKeySizeBytes", "contractDataKeySizeBytes"], ["configSettingContractDataEntrySizeBytes", "contractDataEntrySizeBytes"], ["configSettingStateArchival", "stateArchivalSettings"], ["configSettingContractExecutionLanes", "contractExecutionLanes"], ["configSettingBucketlistSizeWindow", "bucketListSizeWindow"], ["configSettingEvictionIterator", "evictionIterator"], ["configSettingContractParallelComputeV0", "contractParallelCompute"]],
8523
9208
  arms: {
8524
9209
  contractMaxSizeBytes: xdr.lookup("Uint32"),
8525
9210
  contractCompute: xdr.lookup("ConfigSettingContractComputeV0"),
@@ -8534,7 +9219,8 @@ var types = XDR.config(function (xdr) {
8534
9219
  stateArchivalSettings: xdr.lookup("StateArchivalSettings"),
8535
9220
  contractExecutionLanes: xdr.lookup("ConfigSettingContractExecutionLanesV0"),
8536
9221
  bucketListSizeWindow: xdr.varArray(xdr.lookup("Uint64"), 2147483647),
8537
- evictionIterator: xdr.lookup("EvictionIterator")
9222
+ evictionIterator: xdr.lookup("EvictionIterator"),
9223
+ contractParallelCompute: xdr.lookup("ConfigSettingContractParallelComputeV0")
8538
9224
  }
8539
9225
  });
8540
9226
  });