@stellar/stellar-base 10.0.1 → 11.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.
package/lib/operation.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Operation = exports.AuthRevocableFlag = exports.AuthRequiredFlag = exports.AuthImmutableFlag = exports.AuthClawbackEnabledFlag = void 0;
7
7
  var _jsXdr = require("@stellar/js-xdr");
8
- var _bignumber = _interopRequireDefault(require("bignumber.js"));
8
+ var _bignumber = _interopRequireDefault(require("./util/bignumber"));
9
9
  var _util = require("./util/util");
10
10
  var _continued_fraction = require("./util/continued_fraction");
11
11
  var _asset = require("./asset");
@@ -23,8 +23,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
23
23
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
24
  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); } }
25
25
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable no-bitwise */
26
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
27
+ 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); } /* eslint-disable no-bitwise */
28
28
  var ONE = 10000000;
29
29
  var MAX_INT64 = '9223372036854775807';
30
30
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.bumpSequence = bumpSequence;
7
7
  var _jsXdr = require("@stellar/js-xdr");
8
- var _bignumber = _interopRequireDefault(require("bignumber.js"));
8
+ var _bignumber = _interopRequireDefault(require("../util/bignumber"));
9
9
  var _xdr = _interopRequireDefault(require("../xdr"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
  /**
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.changeTrust = changeTrust;
7
7
  var _jsXdr = require("@stellar/js-xdr");
8
- var _bignumber = _interopRequireDefault(require("bignumber.js"));
8
+ var _bignumber = _interopRequireDefault(require("../util/bignumber"));
9
9
  var _xdr = _interopRequireDefault(require("../xdr"));
10
10
  var _asset = require("../asset");
11
11
  var _liquidity_pool_asset = require("../liquidity_pool_asset");
@@ -7,9 +7,9 @@ exports.extendFootprintTtl = extendFootprintTtl;
7
7
  var _xdr = _interopRequireDefault(require("../xdr"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
9
  /**
10
- * Builds an operation to bump the expiration of a footprint (read and written
11
- * ledger keys). Its only parameter is the number of ledgers to extend
12
- * expiration for.
10
+ * Builds an operation to bump the time-to-live of a footprint (read and written
11
+ * ledger keys). Its only parameter is the new, absolute ledger sequence number
12
+ * at which the entry will expire.
13
13
  *
14
14
  * The footprint itself is derived from the transaction (see
15
15
  * {@link TransactionBuilder}'s `opts.sorobanData` parameter, which is a
@@ -20,12 +20,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
20
20
  * @alias Operation.extendFootprintTtl
21
21
  *
22
22
  * @param {object} opts - object holding operation parameters
23
- * @param {number} opts.extendTo - the number of ledgers past the LCL
24
- * (last closed ledger) by which to extend the validity of the ledger keys in
25
- * this transaction
23
+ * @param {number} opts.extendTo - the absolute ledger sequence number at which
24
+ * the transaction's ledger keys will now expire
26
25
  * @param {string} [opts.source] - an optional source account
27
26
  *
28
- * @returns {xdr.Operation} a Bump Footprint Expiration operation
27
+ * @returns {xdr.Operation} an Extend Footprint TTL operation
29
28
  * (xdr.ExtendFootprintTTLOp)
30
29
  */
31
30
  function extendFootprintTtl(opts) {
package/lib/scval.js CHANGED
@@ -114,7 +114,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
114
114
  * // ]
115
115
  *
116
116
  * @example
117
- * import { nativeToScVal, scValToNative, ScInt, xdr } from 'stellar-base';
117
+ * import {
118
+ * nativeToScVal,
119
+ * scValToNative,
120
+ * ScInt,
121
+ * xdr
122
+ * } from '@stellar/stellar-base';
118
123
  *
119
124
  * let gigaMap = {
120
125
  * bool: true,
package/lib/signerkey.js CHANGED
@@ -11,8 +11,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
12
  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); } }
13
13
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
+ 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); }
16
16
  /**
17
17
  * A container class with helpers to convert between signer keys
18
18
  * (`xdr.SignerKey`) and {@link StrKey}s.
package/lib/soroban.js CHANGED
@@ -14,8 +14,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
15
  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); } }
16
16
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
18
+ 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); }
19
19
  /* Helper class to assist with formatting and parsing token amounts. */
20
20
  var Soroban = exports.Soroban = /*#__PURE__*/function () {
21
21
  function Soroban() {
@@ -11,8 +11,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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); } }
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
13
  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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
+ 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); }
16
16
  /**
17
17
  * Supports building {@link xdr.SorobanTransactionData} structures with various
18
18
  * items set to specific values.
package/lib/strkey.js CHANGED
@@ -13,8 +13,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
13
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
14
  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); } }
15
15
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint no-bitwise: ["error", {"allow": ["<<", ">>", "^", "&", "&="]}] */
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
17
+ 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); } /* eslint no-bitwise: ["error", {"allow": ["<<", ">>", "^", "&", "&="]}] */
18
18
  var versionBytes = {
19
19
  ed25519PublicKey: 6 << 3,
20
20
  // G (when encoded in base32)
@@ -16,15 +16,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
16
16
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
17
  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); } }
18
18
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
20
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
22
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
+ 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); }
21
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
24
22
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
25
23
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
27
25
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
28
28
  /**
29
29
  * Use {@link TransactionBuilder} to build a transaction object. If you have an
30
30
  * object or base64-encoded string of the transaction envelope XDR, use {@link
@@ -46,7 +46,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
46
46
  */
47
47
  var Transaction = exports.Transaction = /*#__PURE__*/function (_TransactionBase) {
48
48
  _inherits(Transaction, _TransactionBase);
49
- var _super = _createSuper(Transaction);
50
49
  function Transaction(envelope, networkPassphrase) {
51
50
  var _this;
52
51
  _classCallCheck(this, Transaction);
@@ -62,7 +61,7 @@ var Transaction = exports.Transaction = /*#__PURE__*/function (_TransactionBase)
62
61
  var tx = txEnvelope.tx();
63
62
  var fee = tx.fee().toString();
64
63
  var signatures = (txEnvelope.signatures() || []).slice();
65
- _this = _super.call(this, tx, signatures, fee, networkPassphrase);
64
+ _this = _callSuper(this, Transaction, [tx, signatures, fee, networkPassphrase]);
66
65
  _this._envelopeType = envelopeType;
67
66
  _this._memo = tx.memo();
68
67
  _this._sequence = tx.seqNum().toString();
@@ -12,8 +12,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12
12
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
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
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; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
  /**
18
18
  * @ignore
19
19
  */
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TransactionBuilder = exports.TimeoutInfinite = exports.BASE_FEE = void 0;
7
7
  exports.isValidDate = isValidDate;
8
8
  var _jsXdr = require("@stellar/js-xdr");
9
- var _bignumber = _interopRequireDefault(require("bignumber.js"));
9
+ var _bignumber = _interopRequireDefault(require("./util/bignumber"));
10
10
  var _xdr = _interopRequireDefault(require("./xdr"));
11
11
  var _account = require("./account");
12
12
  var _muxed_account = require("./muxed_account");
@@ -31,8 +31,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
31
31
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
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
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; }
34
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
35
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
34
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
  /**
37
37
  * Minimum base fee for transactions. If this fee is below the network
38
38
  * minimum, the transaction will fail. The more operations in the
@@ -69,7 +69,7 @@ var TimeoutInfinite = exports.TimeoutInfinite = 0;
69
69
  * source account.</p>
70
70
  *
71
71
  * <p><strong>Be careful about unsubmitted transactions!</strong> When you build
72
- * a transaction, stellar-sdk automatically increments the source account's
72
+ * a transaction, `stellar-sdk` automatically increments the source account's
73
73
  * sequence number. If you end up not submitting this transaction and submitting
74
74
  * another one instead, it'll fail due to the sequence number being wrong. So if
75
75
  * you decide not to use a built transaction, make sure to update the source
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _bignumber = _interopRequireDefault(require("bignumber.js"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ var BigNumber = _bignumber["default"].clone();
10
+ BigNumber.DEBUG = true; // gives us exceptions on bad constructor values
11
+ var _default = exports["default"] = BigNumber;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.best_r = best_r;
7
- var _bignumber = _interopRequireDefault(require("bignumber.js"));
7
+ var _bignumber = _interopRequireDefault(require("./bignumber"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _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."); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar/stellar-base",
3
- "version": "10.0.1",
3
+ "version": "11.0.0",
4
4
  "description": "Low-level support library for the Stellar network.",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -70,28 +70,28 @@
70
70
  },
71
71
  "homepage": "https://github.com/stellar/js-stellar-base",
72
72
  "devDependencies": {
73
- "@babel/cli": "^7.23.4",
74
- "@babel/core": "^7.23.5",
75
- "@babel/eslint-parser": "^7.23.3",
73
+ "@babel/cli": "^7.23.9",
74
+ "@babel/core": "^7.23.9",
75
+ "@babel/eslint-parser": "^7.23.10",
76
76
  "@babel/eslint-plugin": "^7.23.5",
77
- "@babel/preset-env": "^7.23.5",
78
- "@babel/register": "^7.22.15",
77
+ "@babel/preset-env": "^7.23.9",
78
+ "@babel/register": "^7.23.7",
79
79
  "@definitelytyped/dtslint": "^0.0.182",
80
80
  "@istanbuljs/nyc-config-babel": "3.0.0",
81
- "@types/node": "^20.10.3",
82
- "@typescript-eslint/parser": "^6.13.2",
81
+ "@types/node": "^20.11.17",
82
+ "@typescript-eslint/parser": "^6.20.0",
83
83
  "babel-loader": "^9.1.3",
84
84
  "babel-plugin-istanbul": "^6.1.1",
85
85
  "chai": "^4.3.10",
86
86
  "chai-as-promised": "^7.1.1",
87
87
  "cross-env": "^7.0.3",
88
- "eslint": "^8.55.0",
88
+ "eslint": "^8.56.0",
89
89
  "eslint-config-airbnb-base": "^15.0.0",
90
90
  "eslint-config-prettier": "^9.1.0",
91
- "eslint-plugin-import": "^2.29.0",
91
+ "eslint-plugin-import": "^2.29.1",
92
92
  "eslint-plugin-node": "^11.1.0",
93
93
  "eslint-plugin-prefer-import": "^0.0.1",
94
- "eslint-plugin-prettier": "^5.0.1",
94
+ "eslint-plugin-prettier": "^5.1.3",
95
95
  "eslint-webpack-plugin": "^4.0.0",
96
96
  "ghooks": "^2.0.4",
97
97
  "husky": "^8.0.3",
@@ -102,32 +102,32 @@
102
102
  "karma-firefox-launcher": "^2.1.1",
103
103
  "karma-mocha": "^2.0.0",
104
104
  "karma-sinon-chai": "^2.0.2",
105
- "karma-webpack": "^5.0.0",
106
- "lint-staged": "^15.2.0",
105
+ "karma-webpack": "^5.0.1",
106
+ "lint-staged": "^15.2.2",
107
107
  "minami": "^1.1.1",
108
- "mocha": "^10.2.0",
109
- "node-polyfill-webpack-plugin": "^2.0.1",
108
+ "mocha": "^10.3.0",
109
+ "node-polyfill-webpack-plugin": "^3.0.0",
110
110
  "nyc": "^15.1.0",
111
- "prettier": "^3.1.0",
111
+ "prettier": "^3.2.5",
112
112
  "randombytes": "^2.1.0",
113
113
  "sinon": "^16.1.0",
114
114
  "sinon-chai": "^3.7.0",
115
115
  "taffydb": "^2.7.3",
116
- "terser-webpack-plugin": "^5.3.8",
117
- "ts-node": "^10.9.1",
118
- "typescript": "^5.3.2",
119
- "webpack": "^5.89.0",
116
+ "terser-webpack-plugin": "^5.3.10",
117
+ "ts-node": "^10.9.2",
118
+ "webpack": "^5.90.1",
120
119
  "webpack-cli": "^5.1.1"
121
120
  },
122
121
  "dependencies": {
123
- "@stellar/js-xdr": "^3.0.1",
122
+ "@stellar/js-xdr": "^3.1.0",
124
123
  "base32.js": "^0.1.0",
125
124
  "bignumber.js": "^9.1.2",
126
125
  "buffer": "^6.0.3",
127
126
  "sha.js": "^2.3.6",
128
- "tweetnacl": "^1.0.3"
127
+ "tweetnacl": "^1.0.3",
128
+ "typescript": "^5.3.3"
129
129
  },
130
130
  "optionalDependencies": {
131
- "sodium-native": "^4.0.1"
131
+ "sodium-native": "^4.0.8"
132
132
  }
133
133
  }