@stellar/stellar-sdk 14.0.0 → 14.1.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 +4 -1
  2. package/dist/stellar-sdk-minimal.js +166 -137
  3. package/dist/stellar-sdk-minimal.min.js +1 -1
  4. package/dist/stellar-sdk-no-axios.js +166 -137
  5. package/dist/stellar-sdk-no-axios.min.js +1 -1
  6. package/dist/stellar-sdk-no-eventsource.js +166 -137
  7. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  8. package/dist/stellar-sdk.js +166 -137
  9. package/dist/stellar-sdk.min.js +1 -1
  10. package/lib/contract/client.js +16 -107
  11. package/lib/contract/spec.d.ts +20 -1
  12. package/lib/contract/spec.js +41 -9
  13. package/lib/contract/utils.d.ts +1 -0
  14. package/lib/contract/utils.js +94 -6
  15. package/lib/horizon/horizon_axios_client.js +1 -1
  16. package/lib/minimal/contract/client.js +16 -107
  17. package/lib/minimal/contract/spec.d.ts +20 -1
  18. package/lib/minimal/contract/spec.js +41 -9
  19. package/lib/minimal/contract/utils.d.ts +1 -0
  20. package/lib/minimal/contract/utils.js +94 -6
  21. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  22. package/lib/minimal/rpc/axios.js +1 -1
  23. package/lib/no-axios/contract/client.js +16 -107
  24. package/lib/no-axios/contract/spec.d.ts +20 -1
  25. package/lib/no-axios/contract/spec.js +41 -9
  26. package/lib/no-axios/contract/utils.d.ts +1 -0
  27. package/lib/no-axios/contract/utils.js +94 -6
  28. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  29. package/lib/no-axios/rpc/axios.js +1 -1
  30. package/lib/no-eventsource/contract/client.js +16 -107
  31. package/lib/no-eventsource/contract/spec.d.ts +20 -1
  32. package/lib/no-eventsource/contract/spec.js +41 -9
  33. package/lib/no-eventsource/contract/utils.d.ts +1 -0
  34. package/lib/no-eventsource/contract/utils.js +94 -6
  35. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  36. package/lib/no-eventsource/rpc/axios.js +1 -1
  37. package/lib/rpc/axios.js +1 -1
  38. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,8 +3,11 @@
3
3
 
4
4
  A breaking change will get clearly marked in this log.
5
5
 
6
+ ## [v14.1.0](https://github.com/stellar/js-stellar-sdk/compare/v14.0.0...v14.1.0)
6
7
 
7
- ## Unreleased
8
+ ### Added
9
+ * Add support to `new contract.Spec(...)` for constructing from a stream of `ScSpecEntry` XDR entries (base64, or binary) ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)).
10
+ * Add `contract.Spec.fromWasm(wasmFile)` for extracting contract spec from contract Wasm files. ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)).
8
11
 
9
12
  ## [v14.0.0](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0)
10
13
 
@@ -5372,8 +5372,15 @@ var Err = function () {
5372
5372
  var DEFAULT_TIMEOUT = 5 * 60;
5373
5373
  var NULL_ACCOUNT = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF";
5374
5374
  ;// ./src/contract/utils.ts
5375
+ /* provided dependency */ var Buffer = __webpack_require__(287)["Buffer"];
5375
5376
  function _regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
5376
5377
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
5378
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
5379
+ 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."); }
5380
+ 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; } }
5381
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5382
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
5383
+ 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; }
5377
5384
  function utils_typeof(o) { "@babel/helpers - typeof"; return utils_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; }, utils_typeof(o); }
5378
5385
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
5379
5386
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
@@ -5458,6 +5465,87 @@ var contractErrorPattern = /Error\(Contract, #(\d+)\)/;
5458
5465
  function implementsToString(obj) {
5459
5466
  return utils_typeof(obj) === "object" && obj !== null && "toString" in obj;
5460
5467
  }
5468
+ function specFromWasm(_x4) {
5469
+ return _specFromWasm.apply(this, arguments);
5470
+ }
5471
+ function _specFromWasm() {
5472
+ _specFromWasm = _asyncToGenerator(_regenerator().m(function _callee2(wasm) {
5473
+ var xdrSections, wasmModule, customData, _t3;
5474
+ return _regenerator().w(function (_context2) {
5475
+ while (1) switch (_context2.p = _context2.n) {
5476
+ case 0:
5477
+ _context2.p = 0;
5478
+ _context2.n = 1;
5479
+ return WebAssembly.compile(wasm);
5480
+ case 1:
5481
+ wasmModule = _context2.v;
5482
+ xdrSections = WebAssembly.Module.customSections(wasmModule, "contractspecv0");
5483
+ _context2.n = 3;
5484
+ break;
5485
+ case 2:
5486
+ _context2.p = 2;
5487
+ _t3 = _context2.v;
5488
+ customData = parseWasmCustomSections(wasm);
5489
+ xdrSections = customData.get('contractspecv0');
5490
+ case 3:
5491
+ if (!(!xdrSections || xdrSections.length === 0)) {
5492
+ _context2.n = 4;
5493
+ break;
5494
+ }
5495
+ throw new Error("Could not obtain contract spec from wasm");
5496
+ case 4:
5497
+ return _context2.a(2, Buffer.from(xdrSections[0]));
5498
+ }
5499
+ }, _callee2, null, [[0, 2]]);
5500
+ }));
5501
+ return _specFromWasm.apply(this, arguments);
5502
+ }
5503
+ function parseWasmCustomSections(buffer) {
5504
+ var sections = new Map();
5505
+ var arrayBuffer = buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
5506
+ var offset = 0;
5507
+ var read = function read(length) {
5508
+ if (offset + length > buffer.byteLength) throw new Error('Buffer overflow');
5509
+ var bytes = new Uint8Array(arrayBuffer, offset, length);
5510
+ offset += length;
5511
+ return bytes;
5512
+ };
5513
+ if (_toConsumableArray(read(4)).join() !== '0,97,115,109') throw new Error('Invalid WASM magic');
5514
+ if (_toConsumableArray(read(4)).join() !== '1,0,0,0') throw new Error('Invalid WASM version');
5515
+ while (offset < buffer.byteLength) {
5516
+ var sectionId = read(1)[0];
5517
+ var sectionLength = readVarUint32();
5518
+ var start = offset;
5519
+ if (sectionId === 0) {
5520
+ var nameLen = readVarUint32();
5521
+ if (nameLen === 0 || offset + nameLen > start + sectionLength) continue;
5522
+ var nameBytes = read(nameLen);
5523
+ var payload = read(sectionLength - (offset - start));
5524
+ try {
5525
+ var name = new TextDecoder('utf-8', {
5526
+ fatal: true
5527
+ }).decode(nameBytes);
5528
+ if (payload.length > 0) {
5529
+ sections.set(name, (sections.get(name) || []).concat(payload));
5530
+ }
5531
+ } catch (_unused) {}
5532
+ } else {
5533
+ offset += sectionLength;
5534
+ }
5535
+ }
5536
+ function readVarUint32() {
5537
+ var value = 0,
5538
+ shift = 0;
5539
+ while (true) {
5540
+ var byte = read(1)[0];
5541
+ value |= (byte & 0x7F) << shift;
5542
+ if ((byte & 0x80) === 0) break;
5543
+ if ((shift += 7) >= 32) throw new Error('Invalid WASM value');
5544
+ }
5545
+ return value >>> 0;
5546
+ }
5547
+ return sections;
5548
+ }
5461
5549
  function processSpecEntryStream(buffer) {
5462
5550
  var reader = new stellar_base_min.cereal.XdrReader(buffer);
5463
5551
  var res = [];
@@ -5466,17 +5554,17 @@ function processSpecEntryStream(buffer) {
5466
5554
  }
5467
5555
  return res;
5468
5556
  }
5469
- function getAccount(_x4, _x5) {
5557
+ function getAccount(_x5, _x6) {
5470
5558
  return _getAccount.apply(this, arguments);
5471
5559
  }
5472
5560
  function _getAccount() {
5473
- _getAccount = _asyncToGenerator(_regenerator().m(function _callee2(options, server) {
5474
- return _regenerator().w(function (_context2) {
5475
- while (1) switch (_context2.n) {
5561
+ _getAccount = _asyncToGenerator(_regenerator().m(function _callee3(options, server) {
5562
+ return _regenerator().w(function (_context3) {
5563
+ while (1) switch (_context3.n) {
5476
5564
  case 0:
5477
- return _context2.a(2, options.publicKey ? server.getAccount(options.publicKey) : new stellar_base_min.Account(NULL_ACCOUNT, "0"));
5565
+ return _context3.a(2, options.publicKey ? server.getAccount(options.publicKey) : new stellar_base_min.Account(NULL_ACCOUNT, "0"));
5478
5566
  }
5479
- }, _callee2);
5567
+ }, _callee3);
5480
5568
  }));
5481
5569
  return _getAccount.apply(this, arguments);
5482
5570
  }
@@ -5642,7 +5730,7 @@ var Watcher = sent_transaction_createClass(function Watcher() {
5642
5730
  sent_transaction_classCallCheck(this, Watcher);
5643
5731
  });
5644
5732
  ;// ./src/contract/assembled_transaction.ts
5645
- /* provided dependency */ var Buffer = __webpack_require__(287)["Buffer"];
5733
+ /* provided dependency */ var assembled_transaction_Buffer = __webpack_require__(287)["Buffer"];
5646
5734
  function assembled_transaction_callSuper(t, o, e) { return o = assembled_transaction_getPrototypeOf(o), assembled_transaction_possibleConstructorReturn(t, assembled_transaction_isNativeReflectConstruct() ? Reflect.construct(o, e || [], assembled_transaction_getPrototypeOf(t).constructor) : o.apply(t, e)); }
5647
5735
  function assembled_transaction_possibleConstructorReturn(t, e) { if (e && ("object" == assembled_transaction_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return assembled_transaction_assertThisInitialized(t); }
5648
5736
  function assembled_transaction_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
@@ -5657,19 +5745,19 @@ function assembled_transaction_typeof(o) { "@babel/helpers - typeof"; return ass
5657
5745
  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; }
5658
5746
  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) { assembled_transaction_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; }
5659
5747
  function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(assembled_transaction_typeof(e) + " is not iterable"); }
5660
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
5748
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || assembled_transaction_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
5661
5749
  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."); }
5662
5750
  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; } }
5663
5751
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
5664
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
5752
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = assembled_transaction_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
5665
5753
  function assembled_transaction_regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return assembled_transaction_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (assembled_transaction_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, assembled_transaction_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, assembled_transaction_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), assembled_transaction_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", assembled_transaction_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), assembled_transaction_regeneratorDefine2(u), assembled_transaction_regeneratorDefine2(u, o, "Generator"), assembled_transaction_regeneratorDefine2(u, n, function () { return this; }), assembled_transaction_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (assembled_transaction_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
5666
5754
  function assembled_transaction_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } assembled_transaction_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { assembled_transaction_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, assembled_transaction_regeneratorDefine2(e, r, n, t); }
5667
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
5668
- 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."); }
5669
- 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; } }
5670
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5671
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
5672
- 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; }
5755
+ function assembled_transaction_toConsumableArray(r) { return assembled_transaction_arrayWithoutHoles(r) || assembled_transaction_iterableToArray(r) || assembled_transaction_unsupportedIterableToArray(r) || assembled_transaction_nonIterableSpread(); }
5756
+ function assembled_transaction_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."); }
5757
+ function assembled_transaction_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return assembled_transaction_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) ? assembled_transaction_arrayLikeToArray(r, a) : void 0; } }
5758
+ function assembled_transaction_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5759
+ function assembled_transaction_arrayWithoutHoles(r) { if (Array.isArray(r)) return assembled_transaction_arrayLikeToArray(r); }
5760
+ function assembled_transaction_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; }
5673
5761
  function assembled_transaction_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
5674
5762
  function assembled_transaction_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { assembled_transaction_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { assembled_transaction_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
5675
5763
  function assembled_transaction_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -5745,7 +5833,7 @@ var AssembledTransaction = function () {
5745
5833
  _this.raw = new stellar_base_min.TransactionBuilder(account, {
5746
5834
  fee: (_this$options$fee = _this.options.fee) !== null && _this$options$fee !== void 0 ? _this$options$fee : stellar_base_min.BASE_FEE,
5747
5835
  networkPassphrase: _this.options.networkPassphrase
5748
- }).addOperation(contract.call.apply(contract, [_this.options.method].concat(_toConsumableArray((_this$options$args = _this.options.args) !== null && _this$options$args !== void 0 ? _this$options$args : [])))).setTimeout((_this$options$timeout = _this.options.timeoutInSeconds) !== null && _this$options$timeout !== void 0 ? _this$options$timeout : DEFAULT_TIMEOUT);
5836
+ }).addOperation(contract.call.apply(contract, [_this.options.method].concat(assembled_transaction_toConsumableArray((_this$options$args = _this.options.args) !== null && _this$options$args !== void 0 ? _this$options$args : [])))).setTimeout((_this$options$timeout = _this.options.timeoutInSeconds) !== null && _this$options$timeout !== void 0 ? _this$options$timeout : DEFAULT_TIMEOUT);
5749
5837
  _context.n = 6;
5750
5838
  return _this.simulate();
5751
5839
  case 6:
@@ -5878,7 +5966,7 @@ var AssembledTransaction = function () {
5878
5966
  throw new Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(_this.built)));
5879
5967
  }
5880
5968
  var rawInvokeHostFunctionOp = _this.built.operations[0];
5881
- return _toConsumableArray(new Set(((_rawInvokeHostFunctio = rawInvokeHostFunctionOp.auth) !== null && _rawInvokeHostFunctio !== void 0 ? _rawInvokeHostFunctio : []).filter(function (entry) {
5969
+ return assembled_transaction_toConsumableArray(new Set(((_rawInvokeHostFunctio = rawInvokeHostFunctionOp.auth) !== null && _rawInvokeHostFunctio !== void 0 ? _rawInvokeHostFunctio : []).filter(function (entry) {
5882
5970
  return entry.credentials().switch() === stellar_base_min.xdr.SorobanCredentialsType.sorobanCredentialsAddress() && (includeAlreadySigned || entry.credentials().address().signature().switch().name === "scvVoid");
5883
5971
  }).map(function (entry) {
5884
5972
  return stellar_base_min.Address.fromScAddress(entry.credentials().address().address()).toString();
@@ -5991,7 +6079,7 @@ var AssembledTransaction = function () {
5991
6079
  signedAuthEntry = _yield$sign.signedAuthEntry;
5992
6080
  error = _yield$sign.error;
5993
6081
  _this.handleWalletError(error);
5994
- return _context5.a(2, Buffer.from(signedAuthEntry, "base64"));
6082
+ return _context5.a(2, assembled_transaction_Buffer.from(signedAuthEntry, "base64"));
5995
6083
  }
5996
6084
  }, _callee5);
5997
6085
  }));
@@ -6280,7 +6368,7 @@ var AssembledTransaction = function () {
6280
6368
  value: function build(options) {
6281
6369
  var _options$args;
6282
6370
  var contract = new stellar_base_min.Contract(options.contractId);
6283
- return AssembledTransaction.buildWithOp(contract.call.apply(contract, [options.method].concat(_toConsumableArray((_options$args = options.args) !== null && _options$args !== void 0 ? _options$args : []))), options);
6371
+ return AssembledTransaction.buildWithOp(contract.call.apply(contract, [options.method].concat(assembled_transaction_toConsumableArray((_options$args = options.args) !== null && _options$args !== void 0 ? _options$args : []))), options);
6284
6372
  }
6285
6373
  }, {
6286
6374
  key: "buildWithOp",
@@ -6504,6 +6592,10 @@ var basicNodeSigner = function basicNodeSigner(keypair, networkPassphrase) {
6504
6592
  };
6505
6593
  ;// ./src/contract/spec.ts
6506
6594
  /* provided dependency */ var spec_Buffer = __webpack_require__(287)["Buffer"];
6595
+ function spec_regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return spec_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (spec_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, spec_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, spec_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), spec_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", spec_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), spec_regeneratorDefine2(u), spec_regeneratorDefine2(u, o, "Generator"), spec_regeneratorDefine2(u, n, function () { return this; }), spec_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (spec_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
6596
+ function spec_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } spec_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { spec_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, spec_regeneratorDefine2(e, r, n, t); }
6597
+ function spec_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
6598
+ function spec_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { spec_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { spec_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
6507
6599
  function spec_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; }
6508
6600
  function spec_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? spec_ownKeys(Object(t), !0).forEach(function (r) { spec_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : spec_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6509
6601
  function spec_typeof(o) { "@babel/helpers - typeof"; return spec_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; }, spec_typeof(o); }
@@ -6521,6 +6613,7 @@ function spec_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined
6521
6613
  function spec_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
6522
6614
 
6523
6615
 
6616
+
6524
6617
  function enumToJsonSchema(udt) {
6525
6618
  var description = udt.doc().toString();
6526
6619
  var cases = udt.cases();
@@ -6968,16 +7061,22 @@ var Spec = function () {
6968
7061
  function Spec(entries) {
6969
7062
  spec_classCallCheck(this, Spec);
6970
7063
  spec_defineProperty(this, "entries", []);
6971
- if (entries.length === 0) {
6972
- throw new Error("Contract spec must have at least one entry");
6973
- }
6974
- var entry = entries[0];
6975
- if (typeof entry === "string") {
6976
- this.entries = entries.map(function (s) {
6977
- return stellar_base_min.xdr.ScSpecEntry.fromXDR(s, "base64");
6978
- });
7064
+ if (spec_Buffer.isBuffer(entries)) {
7065
+ this.entries = processSpecEntryStream(entries);
7066
+ } else if (typeof entries === "string") {
7067
+ this.entries = processSpecEntryStream(spec_Buffer.from(entries, "base64"));
6979
7068
  } else {
6980
- this.entries = entries;
7069
+ if (entries.length === 0) {
7070
+ throw new Error("Contract spec must have at least one entry");
7071
+ }
7072
+ var entry = entries[0];
7073
+ if (typeof entry === "string") {
7074
+ this.entries = entries.map(function (s) {
7075
+ return stellar_base_min.xdr.ScSpecEntry.fromXDR(s, "base64");
7076
+ });
7077
+ } else {
7078
+ this.entries = entries;
7079
+ }
6981
7080
  }
6982
7081
  }
6983
7082
  return spec_createClass(Spec, [{
@@ -7517,6 +7616,27 @@ var Spec = function () {
7517
7616
  }
7518
7617
  return res;
7519
7618
  }
7619
+ }], [{
7620
+ key: "fromWasm",
7621
+ value: (function () {
7622
+ var _fromWasm = spec_asyncToGenerator(spec_regenerator().m(function _callee(wasm) {
7623
+ var spec;
7624
+ return spec_regenerator().w(function (_context) {
7625
+ while (1) switch (_context.n) {
7626
+ case 0:
7627
+ _context.n = 1;
7628
+ return specFromWasm(wasm);
7629
+ case 1:
7630
+ spec = _context.v;
7631
+ return _context.a(2, new Spec(spec));
7632
+ }
7633
+ }, _callee);
7634
+ }));
7635
+ function fromWasm(_x) {
7636
+ return _fromWasm.apply(this, arguments);
7637
+ }
7638
+ return fromWasm;
7639
+ }())
7520
7640
  }]);
7521
7641
  }();
7522
7642
  ;// ./src/contract/client.ts
@@ -7536,122 +7656,31 @@ function client_createClass(e, r, t) { return r && client_defineProperties(e.pro
7536
7656
  function client_defineProperty(e, r, t) { return (r = client_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7537
7657
  function client_toPropertyKey(t) { var i = client_toPrimitive(t, "string"); return "symbol" == client_typeof(i) ? i : i + ""; }
7538
7658
  function client_toPrimitive(t, r) { if ("object" != client_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != client_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7539
- function client_toConsumableArray(r) { return client_arrayWithoutHoles(r) || client_iterableToArray(r) || client_unsupportedIterableToArray(r) || client_nonIterableSpread(); }
7540
- function client_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."); }
7541
- function client_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return client_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) ? client_arrayLikeToArray(r, a) : void 0; } }
7542
- function client_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
7543
- function client_arrayWithoutHoles(r) { if (Array.isArray(r)) return client_arrayLikeToArray(r); }
7544
- function client_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; }
7545
7659
  function client_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
7546
7660
  function client_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { client_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { client_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
7547
7661
 
7548
7662
 
7549
7663
 
7550
7664
 
7551
-
7552
7665
  var CONSTRUCTOR_FUNC = "__constructor";
7553
- function specFromWasm(_x) {
7554
- return _specFromWasm.apply(this, arguments);
7555
- }
7556
- function _specFromWasm() {
7557
- _specFromWasm = client_asyncToGenerator(client_regenerator().m(function _callee5(wasm) {
7558
- var xdrSections, wasmModule, customData, bufferSection, specEntryArray, spec, _t;
7559
- return client_regenerator().w(function (_context5) {
7560
- while (1) switch (_context5.p = _context5.n) {
7561
- case 0:
7562
- _context5.p = 0;
7563
- _context5.n = 1;
7564
- return WebAssembly.compile(wasm);
7565
- case 1:
7566
- wasmModule = _context5.v;
7567
- xdrSections = WebAssembly.Module.customSections(wasmModule, "contractspecv0");
7568
- _context5.n = 3;
7569
- break;
7570
- case 2:
7571
- _context5.p = 2;
7572
- _t = _context5.v;
7573
- customData = parseWasmCustomSections(wasm);
7574
- xdrSections = customData.get('contractspecv0');
7575
- case 3:
7576
- if (!(!xdrSections || xdrSections.length === 0)) {
7577
- _context5.n = 4;
7578
- break;
7579
- }
7580
- throw new Error("Could not obtain contract spec from wasm");
7581
- case 4:
7582
- bufferSection = client_Buffer.from(xdrSections[0]);
7583
- specEntryArray = processSpecEntryStream(bufferSection);
7584
- spec = new Spec(specEntryArray);
7585
- return _context5.a(2, spec);
7586
- }
7587
- }, _callee5, null, [[0, 2]]);
7588
- }));
7589
- return _specFromWasm.apply(this, arguments);
7590
- }
7591
- function parseWasmCustomSections(buffer) {
7592
- var sections = new Map();
7593
- var arrayBuffer = buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
7594
- var offset = 0;
7595
- var read = function read(length) {
7596
- if (offset + length > buffer.byteLength) throw new Error('Buffer overflow');
7597
- var bytes = new Uint8Array(arrayBuffer, offset, length);
7598
- offset += length;
7599
- return bytes;
7600
- };
7601
- if (client_toConsumableArray(read(4)).join() !== '0,97,115,109') throw new Error('Invalid WASM magic');
7602
- if (client_toConsumableArray(read(4)).join() !== '1,0,0,0') throw new Error('Invalid WASM version');
7603
- while (offset < buffer.byteLength) {
7604
- var sectionId = read(1)[0];
7605
- var sectionLength = readVarUint32();
7606
- var start = offset;
7607
- if (sectionId === 0) {
7608
- var nameLen = readVarUint32();
7609
- if (nameLen === 0 || offset + nameLen > start + sectionLength) continue;
7610
- var nameBytes = read(nameLen);
7611
- var payload = read(sectionLength - (offset - start));
7612
- try {
7613
- var name = new TextDecoder('utf-8', {
7614
- fatal: true
7615
- }).decode(nameBytes);
7616
- if (payload.length > 0) {
7617
- sections.set(name, (sections.get(name) || []).concat(payload));
7618
- }
7619
- } catch (_unused) {}
7620
- } else {
7621
- offset += sectionLength;
7622
- }
7623
- }
7624
- function readVarUint32() {
7625
- var value = 0,
7626
- shift = 0;
7627
- while (true) {
7628
- var byte = read(1)[0];
7629
- value |= (byte & 0x7F) << shift;
7630
- if ((byte & 0x80) === 0) break;
7631
- if ((shift += 7) >= 32) throw new Error('Invalid WASM value');
7632
- }
7633
- return value >>> 0;
7634
- }
7635
- return sections;
7636
- }
7637
- function specFromWasmHash(_x2, _x3) {
7666
+ function specFromWasmHash(_x, _x2) {
7638
7667
  return _specFromWasmHash.apply(this, arguments);
7639
7668
  }
7640
7669
  function _specFromWasmHash() {
7641
- _specFromWasmHash = client_asyncToGenerator(client_regenerator().m(function _callee6(wasmHash, options) {
7670
+ _specFromWasmHash = client_asyncToGenerator(client_regenerator().m(function _callee5(wasmHash, options) {
7642
7671
  var format,
7643
7672
  rpcUrl,
7644
7673
  allowHttp,
7645
7674
  serverOpts,
7646
7675
  server,
7647
7676
  wasm,
7648
- _args6 = arguments;
7649
- return client_regenerator().w(function (_context6) {
7650
- while (1) switch (_context6.n) {
7677
+ _args5 = arguments;
7678
+ return client_regenerator().w(function (_context5) {
7679
+ while (1) switch (_context5.n) {
7651
7680
  case 0:
7652
- format = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : "hex";
7681
+ format = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : "hex";
7653
7682
  if (!(!options || !options.rpcUrl)) {
7654
- _context6.n = 1;
7683
+ _context5.n = 1;
7655
7684
  break;
7656
7685
  }
7657
7686
  throw new TypeError("options must contain rpcUrl");
@@ -7661,13 +7690,13 @@ function _specFromWasmHash() {
7661
7690
  allowHttp: allowHttp
7662
7691
  };
7663
7692
  server = new rpc.Server(rpcUrl, serverOpts);
7664
- _context6.n = 2;
7693
+ _context5.n = 2;
7665
7694
  return server.getContractWasmByHash(wasmHash, format);
7666
7695
  case 2:
7667
- wasm = _context6.v;
7668
- return _context6.a(2, specFromWasm(wasm));
7696
+ wasm = _context5.v;
7697
+ return _context5.a(2, Spec.fromWasm(wasm));
7669
7698
  }
7670
- }, _callee6);
7699
+ }, _callee5);
7671
7700
  }));
7672
7701
  return _specFromWasmHash.apply(this, arguments);
7673
7702
  }
@@ -7751,7 +7780,7 @@ var Client = function () {
7751
7780
  }
7752
7781
  }, _callee);
7753
7782
  }));
7754
- function deploy(_x4, _x5) {
7783
+ function deploy(_x3, _x4) {
7755
7784
  return _deploy.apply(this, arguments);
7756
7785
  }
7757
7786
  return deploy;
@@ -7790,7 +7819,7 @@ var Client = function () {
7790
7819
  }
7791
7820
  }, _callee2);
7792
7821
  }));
7793
- function fromWasmHash(_x6, _x7) {
7822
+ function fromWasmHash(_x5, _x6) {
7794
7823
  return _fromWasmHash.apply(this, arguments);
7795
7824
  }
7796
7825
  return fromWasmHash;
@@ -7804,14 +7833,14 @@ var Client = function () {
7804
7833
  while (1) switch (_context3.n) {
7805
7834
  case 0:
7806
7835
  _context3.n = 1;
7807
- return specFromWasm(wasm);
7836
+ return Spec.fromWasm(wasm);
7808
7837
  case 1:
7809
7838
  spec = _context3.v;
7810
7839
  return _context3.a(2, new Client(spec, options));
7811
7840
  }
7812
7841
  }, _callee3);
7813
7842
  }));
7814
- function fromWasm(_x8, _x9) {
7843
+ function fromWasm(_x7, _x8) {
7815
7844
  return _fromWasm.apply(this, arguments);
7816
7845
  }
7817
7846
  return fromWasm;
@@ -7843,7 +7872,7 @@ var Client = function () {
7843
7872
  }
7844
7873
  }, _callee4);
7845
7874
  }));
7846
- function from(_x0) {
7875
+ function from(_x9) {
7847
7876
  return _from.apply(this, arguments);
7848
7877
  }
7849
7878
  return from;
@@ -9087,7 +9116,7 @@ var stellar_base_min = __webpack_require__(950);
9087
9116
  var http_client = __webpack_require__(371);
9088
9117
  ;// ./src/rpc/axios.ts
9089
9118
 
9090
- var version = "14.0.0";
9119
+ var version = "14.1.0";
9091
9120
  var AxiosClient = (0,http_client/* create */.vt)({
9092
9121
  headers: {
9093
9122
  'X-Client-Name': 'js-soroban-client',
@@ -17971,7 +18000,7 @@ var http_client = __webpack_require__(371);
17971
18000
  function horizon_axios_client_typeof(o) { "@babel/helpers - typeof"; return horizon_axios_client_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; }, horizon_axios_client_typeof(o); }
17972
18001
 
17973
18002
 
17974
- var version = "14.0.0";
18003
+ var version = "14.1.0";
17975
18004
  var SERVER_TIME_MAP = {};
17976
18005
  var AxiosClient = (0,http_client/* create */.vt)({
17977
18006
  headers: {