@stellar/stellar-sdk 13.2.0 → 13.3.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/stellar-sdk-minimal.js +2994 -2991
  3. package/dist/stellar-sdk-minimal.min.js +1 -1
  4. package/dist/stellar-sdk-no-axios.js +2994 -2991
  5. package/dist/stellar-sdk-no-axios.min.js +1 -1
  6. package/dist/stellar-sdk-no-eventsource.js +2994 -2991
  7. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  8. package/dist/stellar-sdk.js +2994 -2991
  9. package/dist/stellar-sdk.min.js +1 -1
  10. package/lib/contract/spec.js +1 -4
  11. package/lib/horizon/horizon_axios_client.js +1 -1
  12. package/lib/horizon/payment_call_builder.d.ts +8 -0
  13. package/lib/horizon/payment_call_builder.js +6 -0
  14. package/lib/minimal/contract/spec.js +1 -4
  15. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  16. package/lib/minimal/horizon/payment_call_builder.d.ts +8 -0
  17. package/lib/minimal/horizon/payment_call_builder.js +6 -0
  18. package/lib/minimal/rpc/api.d.ts +1 -1
  19. package/lib/minimal/rpc/axios.js +1 -1
  20. package/lib/minimal/rpc/server.js +1 -1
  21. package/lib/no-axios/contract/spec.js +1 -4
  22. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  23. package/lib/no-axios/horizon/payment_call_builder.d.ts +8 -0
  24. package/lib/no-axios/horizon/payment_call_builder.js +6 -0
  25. package/lib/no-axios/rpc/api.d.ts +1 -1
  26. package/lib/no-axios/rpc/axios.js +1 -1
  27. package/lib/no-axios/rpc/server.js +1 -1
  28. package/lib/no-eventsource/contract/spec.js +1 -4
  29. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  30. package/lib/no-eventsource/horizon/payment_call_builder.d.ts +8 -0
  31. package/lib/no-eventsource/horizon/payment_call_builder.js +6 -0
  32. package/lib/no-eventsource/rpc/api.d.ts +1 -1
  33. package/lib/no-eventsource/rpc/axios.js +1 -1
  34. package/lib/no-eventsource/rpc/server.js +1 -1
  35. package/lib/rpc/api.d.ts +1 -1
  36. package/lib/rpc/axios.js +1 -1
  37. package/lib/rpc/server.js +1 -1
  38. package/package.json +7 -7
@@ -83,10 +83,7 @@ function stringToScVal(str, ty) {
83
83
  case _stellarBase.xdr.ScSpecType.scSpecTypeSymbol().value:
84
84
  return _stellarBase.xdr.ScVal.scvSymbol(str);
85
85
  case _stellarBase.xdr.ScSpecType.scSpecTypeAddress().value:
86
- {
87
- var addr = _stellarBase.Address.fromString(str);
88
- return _stellarBase.xdr.ScVal.scvAddress(addr.toScAddress());
89
- }
86
+ return _stellarBase.Address.fromString(str).toScVal();
90
87
  case _stellarBase.xdr.ScSpecType.scSpecTypeU64().value:
91
88
  return new _stellarBase.XdrLargeInt("u64", str).toScVal();
92
89
  case _stellarBase.xdr.ScSpecType.scSpecTypeI64().value:
@@ -10,7 +10,7 @@ var _urijs = _interopRequireDefault(require("urijs"));
10
10
  var _httpClient = require("../http-client");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- var version = exports.version = "13.2.0";
13
+ var version = exports.version = "13.3.0";
14
14
  var SERVER_TIME_MAP = exports.SERVER_TIME_MAP = {};
15
15
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
16
16
  headers: {
@@ -36,4 +36,12 @@ export declare class PaymentCallBuilder extends CallBuilder<ServerApi.Collection
36
36
  * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
37
37
  */
38
38
  forTransaction(transactionId: string): this;
39
+ /**
40
+ * Adds a parameter defining whether to include failed transactions.
41
+ * By default, only operations of successful transactions are returned.
42
+ *
43
+ * @param {boolean} value Set to `true` to include operations of failed transactions.
44
+ * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
45
+ */
46
+ includeFailed(value: boolean): this;
39
47
  }
@@ -42,5 +42,11 @@ var PaymentCallBuilder = exports.PaymentCallBuilder = function (_CallBuilder) {
42
42
  value: function forTransaction(transactionId) {
43
43
  return this.forEndpoint("transactions", transactionId);
44
44
  }
45
+ }, {
46
+ key: "includeFailed",
47
+ value: function includeFailed(value) {
48
+ this.url.setQuery("include_failed", value.toString());
49
+ return this;
50
+ }
45
51
  }]);
46
52
  }(_call_builder.CallBuilder);
@@ -83,10 +83,7 @@ function stringToScVal(str, ty) {
83
83
  case _stellarBase.xdr.ScSpecType.scSpecTypeSymbol().value:
84
84
  return _stellarBase.xdr.ScVal.scvSymbol(str);
85
85
  case _stellarBase.xdr.ScSpecType.scSpecTypeAddress().value:
86
- {
87
- var addr = _stellarBase.Address.fromString(str);
88
- return _stellarBase.xdr.ScVal.scvAddress(addr.toScAddress());
89
- }
86
+ return _stellarBase.Address.fromString(str).toScVal();
90
87
  case _stellarBase.xdr.ScSpecType.scSpecTypeU64().value:
91
88
  return new _stellarBase.XdrLargeInt("u64", str).toScVal();
92
89
  case _stellarBase.xdr.ScSpecType.scSpecTypeI64().value:
@@ -10,7 +10,7 @@ var _urijs = _interopRequireDefault(require("urijs"));
10
10
  var _httpClient = require("../http-client");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- var version = exports.version = "13.2.0";
13
+ var version = exports.version = "13.3.0";
14
14
  var SERVER_TIME_MAP = exports.SERVER_TIME_MAP = {};
15
15
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
16
16
  headers: {
@@ -36,4 +36,12 @@ export declare class PaymentCallBuilder extends CallBuilder<ServerApi.Collection
36
36
  * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
37
37
  */
38
38
  forTransaction(transactionId: string): this;
39
+ /**
40
+ * Adds a parameter defining whether to include failed transactions.
41
+ * By default, only operations of successful transactions are returned.
42
+ *
43
+ * @param {boolean} value Set to `true` to include operations of failed transactions.
44
+ * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
45
+ */
46
+ includeFailed(value: boolean): this;
39
47
  }
@@ -42,5 +42,11 @@ var PaymentCallBuilder = exports.PaymentCallBuilder = function (_CallBuilder) {
42
42
  value: function forTransaction(transactionId) {
43
43
  return this.forEndpoint("transactions", transactionId);
44
44
  }
45
+ }, {
46
+ key: "includeFailed",
47
+ value: function includeFailed(value) {
48
+ this.url.setQuery("include_failed", value.toString());
49
+ return this;
50
+ }
45
51
  }]);
46
52
  }(_call_builder.CallBuilder);
@@ -139,7 +139,7 @@ export declare namespace Api {
139
139
  cursor: string;
140
140
  }
141
141
  export interface RawGetTransactionsResponse {
142
- transactions: RawTransactionInfo[];
142
+ transactions: RawTransactionInfo[] | null;
143
143
  latestLedger: number;
144
144
  latestLedgerCloseTimestamp: number;
145
145
  oldestLedger: number;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.default = exports.AxiosClient = void 0;
7
7
  var _httpClient = require("../http-client");
8
- var version = exports.version = "13.2.0";
8
+ var version = exports.version = "13.3.0";
9
9
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
10
10
  headers: {
11
11
  'X-Client-Name': 'js-soroban-client',
@@ -451,7 +451,7 @@ var RpcServer = exports.RpcServer = function () {
451
451
  case 0:
452
452
  return _context11.abrupt("return", this._getTransactions(request).then(function (raw) {
453
453
  var result = {
454
- transactions: raw.transactions.map(_parsers.parseRawTransactions),
454
+ transactions: (raw.transactions || []).map(_parsers.parseRawTransactions),
455
455
  latestLedger: raw.latestLedger,
456
456
  latestLedgerCloseTimestamp: raw.latestLedgerCloseTimestamp,
457
457
  oldestLedger: raw.oldestLedger,
@@ -83,10 +83,7 @@ function stringToScVal(str, ty) {
83
83
  case _stellarBase.xdr.ScSpecType.scSpecTypeSymbol().value:
84
84
  return _stellarBase.xdr.ScVal.scvSymbol(str);
85
85
  case _stellarBase.xdr.ScSpecType.scSpecTypeAddress().value:
86
- {
87
- var addr = _stellarBase.Address.fromString(str);
88
- return _stellarBase.xdr.ScVal.scvAddress(addr.toScAddress());
89
- }
86
+ return _stellarBase.Address.fromString(str).toScVal();
90
87
  case _stellarBase.xdr.ScSpecType.scSpecTypeU64().value:
91
88
  return new _stellarBase.XdrLargeInt("u64", str).toScVal();
92
89
  case _stellarBase.xdr.ScSpecType.scSpecTypeI64().value:
@@ -10,7 +10,7 @@ var _urijs = _interopRequireDefault(require("urijs"));
10
10
  var _httpClient = require("../http-client");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- var version = exports.version = "13.2.0";
13
+ var version = exports.version = "13.3.0";
14
14
  var SERVER_TIME_MAP = exports.SERVER_TIME_MAP = {};
15
15
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
16
16
  headers: {
@@ -36,4 +36,12 @@ export declare class PaymentCallBuilder extends CallBuilder<ServerApi.Collection
36
36
  * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
37
37
  */
38
38
  forTransaction(transactionId: string): this;
39
+ /**
40
+ * Adds a parameter defining whether to include failed transactions.
41
+ * By default, only operations of successful transactions are returned.
42
+ *
43
+ * @param {boolean} value Set to `true` to include operations of failed transactions.
44
+ * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
45
+ */
46
+ includeFailed(value: boolean): this;
39
47
  }
@@ -42,5 +42,11 @@ var PaymentCallBuilder = exports.PaymentCallBuilder = function (_CallBuilder) {
42
42
  value: function forTransaction(transactionId) {
43
43
  return this.forEndpoint("transactions", transactionId);
44
44
  }
45
+ }, {
46
+ key: "includeFailed",
47
+ value: function includeFailed(value) {
48
+ this.url.setQuery("include_failed", value.toString());
49
+ return this;
50
+ }
45
51
  }]);
46
52
  }(_call_builder.CallBuilder);
@@ -139,7 +139,7 @@ export declare namespace Api {
139
139
  cursor: string;
140
140
  }
141
141
  export interface RawGetTransactionsResponse {
142
- transactions: RawTransactionInfo[];
142
+ transactions: RawTransactionInfo[] | null;
143
143
  latestLedger: number;
144
144
  latestLedgerCloseTimestamp: number;
145
145
  oldestLedger: number;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.default = exports.AxiosClient = void 0;
7
7
  var _httpClient = require("../http-client");
8
- var version = exports.version = "13.2.0";
8
+ var version = exports.version = "13.3.0";
9
9
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
10
10
  headers: {
11
11
  'X-Client-Name': 'js-soroban-client',
@@ -451,7 +451,7 @@ var RpcServer = exports.RpcServer = function () {
451
451
  case 0:
452
452
  return _context11.abrupt("return", this._getTransactions(request).then(function (raw) {
453
453
  var result = {
454
- transactions: raw.transactions.map(_parsers.parseRawTransactions),
454
+ transactions: (raw.transactions || []).map(_parsers.parseRawTransactions),
455
455
  latestLedger: raw.latestLedger,
456
456
  latestLedgerCloseTimestamp: raw.latestLedgerCloseTimestamp,
457
457
  oldestLedger: raw.oldestLedger,
@@ -83,10 +83,7 @@ function stringToScVal(str, ty) {
83
83
  case _stellarBase.xdr.ScSpecType.scSpecTypeSymbol().value:
84
84
  return _stellarBase.xdr.ScVal.scvSymbol(str);
85
85
  case _stellarBase.xdr.ScSpecType.scSpecTypeAddress().value:
86
- {
87
- var addr = _stellarBase.Address.fromString(str);
88
- return _stellarBase.xdr.ScVal.scvAddress(addr.toScAddress());
89
- }
86
+ return _stellarBase.Address.fromString(str).toScVal();
90
87
  case _stellarBase.xdr.ScSpecType.scSpecTypeU64().value:
91
88
  return new _stellarBase.XdrLargeInt("u64", str).toScVal();
92
89
  case _stellarBase.xdr.ScSpecType.scSpecTypeI64().value:
@@ -10,7 +10,7 @@ var _urijs = _interopRequireDefault(require("urijs"));
10
10
  var _httpClient = require("../http-client");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- var version = exports.version = "13.2.0";
13
+ var version = exports.version = "13.3.0";
14
14
  var SERVER_TIME_MAP = exports.SERVER_TIME_MAP = {};
15
15
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
16
16
  headers: {
@@ -36,4 +36,12 @@ export declare class PaymentCallBuilder extends CallBuilder<ServerApi.Collection
36
36
  * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
37
37
  */
38
38
  forTransaction(transactionId: string): this;
39
+ /**
40
+ * Adds a parameter defining whether to include failed transactions.
41
+ * By default, only operations of successful transactions are returned.
42
+ *
43
+ * @param {boolean} value Set to `true` to include operations of failed transactions.
44
+ * @returns {PaymentCallBuilder} this PaymentCallBuilder instance
45
+ */
46
+ includeFailed(value: boolean): this;
39
47
  }
@@ -42,5 +42,11 @@ var PaymentCallBuilder = exports.PaymentCallBuilder = function (_CallBuilder) {
42
42
  value: function forTransaction(transactionId) {
43
43
  return this.forEndpoint("transactions", transactionId);
44
44
  }
45
+ }, {
46
+ key: "includeFailed",
47
+ value: function includeFailed(value) {
48
+ this.url.setQuery("include_failed", value.toString());
49
+ return this;
50
+ }
45
51
  }]);
46
52
  }(_call_builder.CallBuilder);
@@ -139,7 +139,7 @@ export declare namespace Api {
139
139
  cursor: string;
140
140
  }
141
141
  export interface RawGetTransactionsResponse {
142
- transactions: RawTransactionInfo[];
142
+ transactions: RawTransactionInfo[] | null;
143
143
  latestLedger: number;
144
144
  latestLedgerCloseTimestamp: number;
145
145
  oldestLedger: number;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.default = exports.AxiosClient = void 0;
7
7
  var _httpClient = require("../http-client");
8
- var version = exports.version = "13.2.0";
8
+ var version = exports.version = "13.3.0";
9
9
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
10
10
  headers: {
11
11
  'X-Client-Name': 'js-soroban-client',
@@ -451,7 +451,7 @@ var RpcServer = exports.RpcServer = function () {
451
451
  case 0:
452
452
  return _context11.abrupt("return", this._getTransactions(request).then(function (raw) {
453
453
  var result = {
454
- transactions: raw.transactions.map(_parsers.parseRawTransactions),
454
+ transactions: (raw.transactions || []).map(_parsers.parseRawTransactions),
455
455
  latestLedger: raw.latestLedger,
456
456
  latestLedgerCloseTimestamp: raw.latestLedgerCloseTimestamp,
457
457
  oldestLedger: raw.oldestLedger,
package/lib/rpc/api.d.ts CHANGED
@@ -139,7 +139,7 @@ export declare namespace Api {
139
139
  cursor: string;
140
140
  }
141
141
  export interface RawGetTransactionsResponse {
142
- transactions: RawTransactionInfo[];
142
+ transactions: RawTransactionInfo[] | null;
143
143
  latestLedger: number;
144
144
  latestLedgerCloseTimestamp: number;
145
145
  oldestLedger: number;
package/lib/rpc/axios.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.default = exports.AxiosClient = void 0;
7
7
  var _httpClient = require("../http-client");
8
- var version = exports.version = "13.2.0";
8
+ var version = exports.version = "13.3.0";
9
9
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
10
10
  headers: {
11
11
  'X-Client-Name': 'js-soroban-client',
package/lib/rpc/server.js CHANGED
@@ -451,7 +451,7 @@ var RpcServer = exports.RpcServer = function () {
451
451
  case 0:
452
452
  return _context11.abrupt("return", this._getTransactions(request).then(function (raw) {
453
453
  var result = {
454
- transactions: raw.transactions.map(_parsers.parseRawTransactions),
454
+ transactions: (raw.transactions || []).map(_parsers.parseRawTransactions),
455
455
  latestLedger: raw.latestLedger,
456
456
  latestLedgerCloseTimestamp: raw.latestLedgerCloseTimestamp,
457
457
  oldestLedger: raw.oldestLedger,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar/stellar-sdk",
3
- "version": "13.2.0",
3
+ "version": "13.3.0",
4
4
  "description": "A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.",
5
5
  "keywords": [
6
6
  "stellar"
@@ -176,7 +176,7 @@
176
176
  "chai-as-promised": "^7.1.1",
177
177
  "chai-http": "^4.3.0",
178
178
  "cross-env": "^7.0.3",
179
- "dotenv": "^16.4.7",
179
+ "dotenv": "^16.5.0",
180
180
  "eslint": "^8.57.0",
181
181
  "eslint-config-airbnb-base": "^15.0.0",
182
182
  "eslint-config-airbnb-typescript": "^18.0.0",
@@ -190,7 +190,7 @@
190
190
  "ghooks": "^2.0.4",
191
191
  "husky": "^9.1.6",
192
192
  "jsdoc": "^4.0.4",
193
- "json-schema-faker": "^0.5.8",
193
+ "json-schema-faker": "^0.5.9",
194
194
  "karma": "^6.4.3",
195
195
  "karma-chai": "^0.1.0",
196
196
  "karma-chrome-launcher": "^3.1.0",
@@ -199,7 +199,7 @@
199
199
  "karma-mocha": "^2.0.0",
200
200
  "karma-sinon-chai": "^2.0.2",
201
201
  "karma-webpack": "^5.0.1",
202
- "lint-staged": "^15.5.0",
202
+ "lint-staged": "^15.5.1",
203
203
  "lodash": "^4.17.21",
204
204
  "mocha": "^10.8.2",
205
205
  "node-polyfill-webpack-plugin": "^3.0.0",
@@ -212,14 +212,14 @@
212
212
  "taffydb": "^2.7.3",
213
213
  "terser-webpack-plugin": "^5.3.14",
214
214
  "ts-node": "^10.9.2",
215
- "typescript": "^5.8.2",
216
- "webpack": "^5.98.0",
215
+ "typescript": "^5.8.3",
216
+ "webpack": "^5.99.6",
217
217
  "webpack-cli": "^5.0.1"
218
218
  },
219
219
  "dependencies": {
220
220
  "@stellar/stellar-base": "^13.1.0",
221
221
  "axios": "^1.8.4",
222
- "bignumber.js": "^9.1.2",
222
+ "bignumber.js": "^9.3.0",
223
223
  "eventsource": "^2.0.2",
224
224
  "feaxios": "^0.0.23",
225
225
  "randombytes": "^2.1.0",