@stellar/stellar-base 12.0.0-rc.1 → 12.0.1

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 (66) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/stellar-base.js +179 -164
  3. package/dist/stellar-base.min.js +1 -1
  4. package/lib/account.js +4 -4
  5. package/lib/address.js +4 -4
  6. package/lib/asset.js +4 -4
  7. package/lib/auth.js +3 -3
  8. package/lib/claimant.js +4 -4
  9. package/lib/contract.js +4 -4
  10. package/lib/events.js +2 -2
  11. package/lib/fee_bump_transaction.js +9 -9
  12. package/lib/get_liquidity_pool_id.js +1 -1
  13. package/lib/index.js +1 -1
  14. package/lib/keypair.js +4 -4
  15. package/lib/liquidity_pool_asset.js +5 -5
  16. package/lib/liquidity_pool_id.js +4 -4
  17. package/lib/memo.js +4 -4
  18. package/lib/muxed_account.js +4 -4
  19. package/lib/numbers/int128.js +8 -8
  20. package/lib/numbers/int256.js +8 -8
  21. package/lib/numbers/sc_int.js +8 -8
  22. package/lib/numbers/uint128.js +8 -8
  23. package/lib/numbers/uint256.js +8 -8
  24. package/lib/numbers/xdr_large_int.js +5 -5
  25. package/lib/operation.js +4 -4
  26. package/lib/operations/account_merge.js +1 -1
  27. package/lib/operations/allow_trust.js +1 -1
  28. package/lib/operations/begin_sponsoring_future_reserves.js +1 -1
  29. package/lib/operations/bump_sequence.js +1 -1
  30. package/lib/operations/change_trust.js +1 -1
  31. package/lib/operations/claim_claimable_balance.js +1 -1
  32. package/lib/operations/clawback.js +1 -1
  33. package/lib/operations/clawback_claimable_balance.js +1 -1
  34. package/lib/operations/create_account.js +1 -1
  35. package/lib/operations/create_claimable_balance.js +1 -1
  36. package/lib/operations/create_passive_sell_offer.js +1 -1
  37. package/lib/operations/end_sponsoring_future_reserves.js +1 -1
  38. package/lib/operations/extend_footprint_ttl.js +18 -9
  39. package/lib/operations/inflation.js +1 -1
  40. package/lib/operations/invoke_host_function.js +5 -5
  41. package/lib/operations/liquidity_pool_deposit.js +1 -1
  42. package/lib/operations/liquidity_pool_withdraw.js +1 -1
  43. package/lib/operations/manage_buy_offer.js +1 -1
  44. package/lib/operations/manage_data.js +1 -1
  45. package/lib/operations/manage_sell_offer.js +1 -1
  46. package/lib/operations/path_payment_strict_receive.js +1 -1
  47. package/lib/operations/path_payment_strict_send.js +1 -1
  48. package/lib/operations/payment.js +1 -1
  49. package/lib/operations/restore_footprint.js +8 -4
  50. package/lib/operations/revoke_sponsorship.js +1 -1
  51. package/lib/operations/set_options.js +1 -1
  52. package/lib/operations/set_trustline_flags.js +1 -1
  53. package/lib/scval.js +21 -19
  54. package/lib/signerkey.js +4 -4
  55. package/lib/soroban.js +8 -8
  56. package/lib/sorobandata_builder.js +5 -5
  57. package/lib/strkey.js +4 -4
  58. package/lib/transaction.js +9 -9
  59. package/lib/transaction_base.js +4 -4
  60. package/lib/transaction_builder.js +10 -10
  61. package/lib/util/bignumber.js +1 -1
  62. package/lib/util/continued_fraction.js +5 -5
  63. package/lib/util/decode_encode_muxed_account.js +1 -1
  64. package/lib/xdr.js +1 -1
  65. package/package.json +12 -12
  66. package/types/index.d.ts +1 -0
@@ -7,11 +7,11 @@ exports.TransactionBase = void 0;
7
7
  var _xdr = _interopRequireDefault(require("./xdr"));
8
8
  var _hashing = require("./hashing");
9
9
  var _keypair = require("./keypair");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
11
  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); }
12
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
14
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
17
  /**
@@ -17,20 +17,20 @@ var _sorobandata_builder = require("./sorobandata_builder");
17
17
  var _strkey = require("./strkey");
18
18
  var _signerkey = require("./signerkey");
19
19
  var _memo = require("./memo");
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
21
21
  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); }
22
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
22
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
23
23
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
24
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
25
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
26
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
27
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
28
28
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29
29
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
33
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
30
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
31
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
32
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
33
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
34
34
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
35
35
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
36
36
  /**
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _bignumber = _interopRequireDefault(require("bignumber.js"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  var BigNumber = _bignumber["default"].clone();
10
10
  BigNumber.DEBUG = true; // gives us exceptions on bad constructor values
11
11
  var _default = exports["default"] = BigNumber;
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.best_r = best_r;
7
7
  var _bignumber = _interopRequireDefault(require("./bignumber"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
13
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
15
  // eslint-disable-next-line no-bitwise
16
16
  var MAX_INT = (1 << 31 >>> 0) - 1;
17
17
 
@@ -9,7 +9,7 @@ exports.encodeMuxedAccountToAddress = encodeMuxedAccountToAddress;
9
9
  exports.extractBaseAddress = extractBaseAddress;
10
10
  var _xdr = _interopRequireDefault(require("../xdr"));
11
11
  var _strkey = require("../strkey");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
13
  /**
14
14
  * Converts a Stellar address (in G... or M... form) to an `xdr.MuxedAccount`
15
15
  * structure, using the ed25519 representation when possible.
package/lib/xdr.js CHANGED
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _curr_generated = _interopRequireDefault(require("./generated/curr_generated"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  var _default = exports["default"] = _curr_generated["default"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar/stellar-base",
3
- "version": "12.0.0-rc.1",
3
+ "version": "12.0.1",
4
4
  "description": "Low-level support library for the Stellar network.",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -70,15 +70,15 @@
70
70
  },
71
71
  "homepage": "https://github.com/stellar/js-stellar-base",
72
72
  "devDependencies": {
73
- "@babel/cli": "^7.24.5",
74
- "@babel/core": "^7.24.5",
75
- "@babel/eslint-parser": "^7.24.5",
76
- "@babel/eslint-plugin": "^7.24.5",
77
- "@babel/preset-env": "^7.24.5",
78
- "@babel/register": "^7.23.7",
73
+ "@babel/cli": "^7.24.7",
74
+ "@babel/core": "^7.24.7",
75
+ "@babel/eslint-parser": "^7.24.7",
76
+ "@babel/eslint-plugin": "^7.24.7",
77
+ "@babel/preset-env": "^7.24.7",
78
+ "@babel/register": "^7.24.6",
79
79
  "@definitelytyped/dtslint": "^0.0.182",
80
80
  "@istanbuljs/nyc-config-babel": "3.0.0",
81
- "@types/node": "^20.12.12",
81
+ "@types/node": "^20.14.2",
82
82
  "@typescript-eslint/parser": "^6.20.0",
83
83
  "babel-loader": "^9.1.3",
84
84
  "babel-plugin-istanbul": "^6.1.1",
@@ -92,7 +92,7 @@
92
92
  "eslint-plugin-node": "^11.1.0",
93
93
  "eslint-plugin-prefer-import": "^0.0.1",
94
94
  "eslint-plugin-prettier": "^5.1.3",
95
- "eslint-webpack-plugin": "^4.1.0",
95
+ "eslint-webpack-plugin": "^4.2.0",
96
96
  "ghooks": "^2.0.4",
97
97
  "husky": "^8.0.3",
98
98
  "jsdoc": "^4.0.3",
@@ -103,12 +103,12 @@
103
103
  "karma-mocha": "^2.0.0",
104
104
  "karma-sinon-chai": "^2.0.2",
105
105
  "karma-webpack": "^5.0.1",
106
- "lint-staged": "^15.2.2",
106
+ "lint-staged": "^15.2.7",
107
107
  "minami": "^1.1.1",
108
108
  "mocha": "^10.4.0",
109
109
  "node-polyfill-webpack-plugin": "^3.0.0",
110
110
  "nyc": "^15.1.0",
111
- "prettier": "^3.2.5",
111
+ "prettier": "^3.3.2",
112
112
  "randombytes": "^2.1.0",
113
113
  "sinon": "^16.1.0",
114
114
  "sinon-chai": "^3.7.0",
@@ -116,7 +116,7 @@
116
116
  "terser-webpack-plugin": "^5.3.10",
117
117
  "ts-node": "^10.9.2",
118
118
  "typescript": "^5.4.5",
119
- "webpack": "^5.90.3",
119
+ "webpack": "^5.92.0",
120
120
  "webpack-cli": "^5.1.1"
121
121
  },
122
122
  "dependencies": {
package/types/index.d.ts CHANGED
@@ -988,6 +988,7 @@ export namespace StrKey {
988
988
 
989
989
  function encodeContract(data: Buffer): string;
990
990
  function decodeContract(address: string): Buffer;
991
+ function isValidContract(address: string): boolean;
991
992
  }
992
993
 
993
994
  export namespace SignerKey {