@stellar/stellar-sdk 13.0.0-beta.1 → 13.0.0-rc.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 (82) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/stellar-sdk-minimal.js +224 -162
  3. package/dist/stellar-sdk-minimal.min.js +1 -1
  4. package/dist/stellar-sdk-no-axios.js +224 -162
  5. package/dist/stellar-sdk-no-axios.min.js +1 -1
  6. package/dist/stellar-sdk-no-eventsource.js +224 -162
  7. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  8. package/dist/stellar-sdk.js +224 -162
  9. package/dist/stellar-sdk.min.js +1 -1
  10. package/lib/contract/assembled_transaction.js +1 -1
  11. package/lib/contract/sent_transaction.d.ts +2 -3
  12. package/lib/contract/sent_transaction.js +4 -4
  13. package/lib/horizon/horizon_axios_client.js +1 -1
  14. package/lib/horizon/server_api.d.ts +0 -15
  15. package/lib/horizon/types/assets.d.ts +0 -2
  16. package/lib/index.d.ts +0 -4
  17. package/lib/index.js +1 -4
  18. package/lib/minimal/contract/assembled_transaction.js +1 -1
  19. package/lib/minimal/contract/sent_transaction.d.ts +2 -3
  20. package/lib/minimal/contract/sent_transaction.js +4 -4
  21. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  22. package/lib/minimal/horizon/server_api.d.ts +0 -15
  23. package/lib/minimal/horizon/types/assets.d.ts +0 -2
  24. package/lib/minimal/index.d.ts +0 -4
  25. package/lib/minimal/index.js +1 -4
  26. package/lib/minimal/rpc/api.d.ts +12 -9
  27. package/lib/minimal/rpc/axios.js +1 -1
  28. package/lib/minimal/rpc/index.d.ts +1 -1
  29. package/lib/minimal/rpc/index.js +14 -0
  30. package/lib/minimal/rpc/parsers.d.ts +1 -1
  31. package/lib/minimal/rpc/parsers.js +3 -3
  32. package/lib/minimal/rpc/server.d.ts +41 -3
  33. package/lib/minimal/rpc/server.js +203 -149
  34. package/lib/minimal/utils.d.ts +1 -0
  35. package/lib/minimal/utils.js +7 -0
  36. package/lib/no-axios/contract/assembled_transaction.js +1 -1
  37. package/lib/no-axios/contract/sent_transaction.d.ts +2 -3
  38. package/lib/no-axios/contract/sent_transaction.js +4 -4
  39. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  40. package/lib/no-axios/horizon/server_api.d.ts +0 -15
  41. package/lib/no-axios/horizon/types/assets.d.ts +0 -2
  42. package/lib/no-axios/index.d.ts +0 -4
  43. package/lib/no-axios/index.js +1 -4
  44. package/lib/no-axios/rpc/api.d.ts +12 -9
  45. package/lib/no-axios/rpc/axios.js +1 -1
  46. package/lib/no-axios/rpc/index.d.ts +1 -1
  47. package/lib/no-axios/rpc/index.js +14 -0
  48. package/lib/no-axios/rpc/parsers.d.ts +1 -1
  49. package/lib/no-axios/rpc/parsers.js +3 -3
  50. package/lib/no-axios/rpc/server.d.ts +41 -3
  51. package/lib/no-axios/rpc/server.js +203 -149
  52. package/lib/no-axios/utils.d.ts +1 -0
  53. package/lib/no-axios/utils.js +7 -0
  54. package/lib/no-eventsource/contract/assembled_transaction.js +1 -1
  55. package/lib/no-eventsource/contract/sent_transaction.d.ts +2 -3
  56. package/lib/no-eventsource/contract/sent_transaction.js +4 -4
  57. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  58. package/lib/no-eventsource/horizon/server_api.d.ts +0 -15
  59. package/lib/no-eventsource/horizon/types/assets.d.ts +0 -2
  60. package/lib/no-eventsource/index.d.ts +0 -4
  61. package/lib/no-eventsource/index.js +1 -4
  62. package/lib/no-eventsource/rpc/api.d.ts +12 -9
  63. package/lib/no-eventsource/rpc/axios.js +1 -1
  64. package/lib/no-eventsource/rpc/index.d.ts +1 -1
  65. package/lib/no-eventsource/rpc/index.js +14 -0
  66. package/lib/no-eventsource/rpc/parsers.d.ts +1 -1
  67. package/lib/no-eventsource/rpc/parsers.js +3 -3
  68. package/lib/no-eventsource/rpc/server.d.ts +41 -3
  69. package/lib/no-eventsource/rpc/server.js +203 -149
  70. package/lib/no-eventsource/utils.d.ts +1 -0
  71. package/lib/no-eventsource/utils.js +7 -0
  72. package/lib/rpc/api.d.ts +12 -9
  73. package/lib/rpc/axios.js +1 -1
  74. package/lib/rpc/index.d.ts +1 -1
  75. package/lib/rpc/index.js +14 -0
  76. package/lib/rpc/parsers.d.ts +1 -1
  77. package/lib/rpc/parsers.js +3 -3
  78. package/lib/rpc/server.d.ts +41 -3
  79. package/lib/rpc/server.js +203 -149
  80. package/lib/utils.d.ts +1 -0
  81. package/lib/utils.js +7 -0
  82. package/package.json +16 -16
@@ -21763,7 +21763,7 @@ function sent_transaction_toPrimitive(t, r) { if ("object" != sent_transaction_t
21763
21763
 
21764
21764
 
21765
21765
  var SentTransaction = function () {
21766
- function SentTransaction(_, assembled) {
21766
+ function SentTransaction(assembled) {
21767
21767
  var _this = this,
21768
21768
  _this$assembled$optio2;
21769
21769
  sent_transaction_classCallCheck(this, SentTransaction);
@@ -21861,12 +21861,12 @@ _defineProperty(SentTransaction, "Errors", {
21861
21861
  }(_wrapNativeSuper(Error))
21862
21862
  });
21863
21863
  _defineProperty(SentTransaction, "init", function () {
21864
- var _ref2 = sent_transaction_asyncToGenerator(sent_transaction_regeneratorRuntime().mark(function _callee2(_, assembled) {
21864
+ var _ref2 = sent_transaction_asyncToGenerator(sent_transaction_regeneratorRuntime().mark(function _callee2(assembled) {
21865
21865
  var tx, sent;
21866
21866
  return sent_transaction_regeneratorRuntime().wrap(function _callee2$(_context2) {
21867
21867
  while (1) switch (_context2.prev = _context2.next) {
21868
21868
  case 0:
21869
- tx = new _SentTransaction(undefined, assembled);
21869
+ tx = new _SentTransaction(assembled);
21870
21870
  _context2.next = 3;
21871
21871
  return tx.send();
21872
21872
  case 3:
@@ -21878,7 +21878,7 @@ _defineProperty(SentTransaction, "init", function () {
21878
21878
  }
21879
21879
  }, _callee2);
21880
21880
  }));
21881
- return function (_x, _x2) {
21881
+ return function (_x) {
21882
21882
  return _ref2.apply(this, arguments);
21883
21883
  };
21884
21884
  }());
@@ -22375,7 +22375,7 @@ var AssembledTransaction = function () {
22375
22375
  throw new Error("The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.");
22376
22376
  case 2:
22377
22377
  _context8.next = 4;
22378
- return SentTransaction.init(undefined, this);
22378
+ return SentTransaction.init(this);
22379
22379
  case 4:
22380
22380
  sent = _context8.sent;
22381
22381
  return _context8.abrupt("return", sent);
@@ -27446,7 +27446,7 @@ var http_client = __webpack_require__(9983);
27446
27446
  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); }
27447
27447
 
27448
27448
 
27449
- var version = "13.0.0-beta.1";
27449
+ var version = "13.0.0-rc.1";
27450
27450
  var SERVER_TIME_MAP = {};
27451
27451
  var AxiosClient = (0,http_client/* create */.vt)({
27452
27452
  headers: {
@@ -33348,7 +33348,6 @@ __webpack_require__.r(__webpack_exports__);
33348
33348
  /* harmony export */ Horizon: () => (/* reexport module object */ _horizon__WEBPACK_IMPORTED_MODULE_7__),
33349
33349
  /* harmony export */ NetworkError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_0__.Dr),
33350
33350
  /* harmony export */ NotFoundError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_0__.m_),
33351
- /* harmony export */ SorobanRpc: () => (/* reexport module object */ _rpc__WEBPACK_IMPORTED_MODULE_8__),
33352
33351
  /* harmony export */ StellarToml: () => (/* reexport module object */ _stellartoml__WEBPACK_IMPORTED_MODULE_3__),
33353
33352
  /* harmony export */ Utils: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_2__.A),
33354
33353
  /* harmony export */ WebAuth: () => (/* reexport module object */ _webauth__WEBPACK_IMPORTED_MODULE_5__),
@@ -33369,7 +33368,7 @@ __webpack_require__.r(__webpack_exports__);
33369
33368
  /* harmony import */ var _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(356);
33370
33369
  /* harmony import */ var _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__);
33371
33370
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
33372
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__) if(["default","Config","Utils","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","SorobanRpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__[__WEBPACK_IMPORT_KEY__]
33371
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__) if(["default","Config","Utils","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_10__[__WEBPACK_IMPORT_KEY__]
33373
33372
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
33374
33373
  /* module decorator */ module = __webpack_require__.hmd(module);
33375
33374
 
@@ -33390,8 +33389,6 @@ __webpack_require__.r(__webpack_exports__);
33390
33389
 
33391
33390
 
33392
33391
 
33393
-
33394
-
33395
33392
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (module.exports);
33396
33393
  if (typeof __webpack_require__.g.__USE_AXIOS__ === 'undefined') {
33397
33394
  __webpack_require__.g.__USE_AXIOS__ = true;
@@ -33449,7 +33446,9 @@ __webpack_require__.r(__webpack_exports__);
33449
33446
  __webpack_require__.d(__webpack_exports__, {
33450
33447
  Api: () => (/* reexport */ api/* Api */.j),
33451
33448
  AxiosClient: () => (/* reexport */ axios),
33449
+ BasicSleepStrategy: () => (/* reexport */ BasicSleepStrategy),
33452
33450
  Durability: () => (/* reexport */ Durability),
33451
+ LinearSleepStrategy: () => (/* reexport */ LinearSleepStrategy),
33453
33452
  Server: () => (/* reexport */ RpcServer),
33454
33453
  assembleTransaction: () => (/* reexport */ transaction/* assembleTransaction */.X),
33455
33454
  "default": () => (/* binding */ rpc),
@@ -33468,7 +33467,7 @@ var lib = __webpack_require__(356);
33468
33467
  var http_client = __webpack_require__(9983);
33469
33468
  ;// ./src/rpc/axios.ts
33470
33469
 
33471
- var version = "13.0.0-beta.1";
33470
+ var version = "13.0.0-rc.1";
33472
33471
  var AxiosClient = (0,http_client/* create */.vt)({
33473
33472
  headers: {
33474
33473
  'X-Client-Name': 'js-soroban-client',
@@ -33526,6 +33525,8 @@ function _postObject() {
33526
33525
  var transaction = __webpack_require__(8680);
33527
33526
  // EXTERNAL MODULE: ./src/rpc/parsers.ts
33528
33527
  var parsers = __webpack_require__(784);
33528
+ // EXTERNAL MODULE: ./src/utils.ts
33529
+ var utils = __webpack_require__(3121);
33529
33530
  ;// ./src/rpc/server.ts
33530
33531
  /* provided dependency */ var Buffer = __webpack_require__(8287)["Buffer"];
33531
33532
  function server_typeof(o) { "@babel/helpers - typeof"; return server_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; }, server_typeof(o); }
@@ -33547,12 +33548,20 @@ function _toPrimitive(t, r) { if ("object" != server_typeof(t) || !t) return t;
33547
33548
 
33548
33549
 
33549
33550
 
33551
+
33550
33552
  var SUBMIT_TRANSACTION_TIMEOUT = (/* unused pure expression or super */ null && (60 * 1000));
33551
33553
  var Durability = function (Durability) {
33552
33554
  Durability["Temporary"] = "temporary";
33553
33555
  Durability["Persistent"] = "persistent";
33554
33556
  return Durability;
33555
33557
  }({});
33558
+ var DEFAULT_GET_TRANSACTION_TIMEOUT = 30;
33559
+ var BasicSleepStrategy = function BasicSleepStrategy(_iter) {
33560
+ return 1000;
33561
+ };
33562
+ var LinearSleepStrategy = function LinearSleepStrategy(iter) {
33563
+ return 1000 * iter;
33564
+ };
33556
33565
  function findCreatedAccountSequenceInTransactionMeta(meta) {
33557
33566
  var _operations$flatMap$f;
33558
33567
  var operations = [];
@@ -33857,19 +33866,65 @@ var RpcServer = function () {
33857
33866
  return _getLedgerEntries;
33858
33867
  }()
33859
33868
  }, {
33860
- key: "getTransaction",
33869
+ key: "pollTransaction",
33861
33870
  value: (function () {
33862
- var _getTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee8(hash) {
33871
+ var _pollTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee8(hash, opts) {
33872
+ var _opts$attempts, _opts$attempts2;
33873
+ var maxAttempts, foundInfo, attempt, _opts$sleepStrategy;
33863
33874
  return server_regeneratorRuntime().wrap(function _callee8$(_context8) {
33864
33875
  while (1) switch (_context8.prev = _context8.next) {
33865
33876
  case 0:
33866
- return _context8.abrupt("return", this._getTransaction(hash).then(function (raw) {
33877
+ maxAttempts = ((_opts$attempts = opts === null || opts === void 0 ? void 0 : opts.attempts) !== null && _opts$attempts !== void 0 ? _opts$attempts : 0) < 1 ? DEFAULT_GET_TRANSACTION_TIMEOUT : (_opts$attempts2 = opts === null || opts === void 0 ? void 0 : opts.attempts) !== null && _opts$attempts2 !== void 0 ? _opts$attempts2 : DEFAULT_GET_TRANSACTION_TIMEOUT;
33878
+ attempt = 1;
33879
+ case 2:
33880
+ if (!(attempt < maxAttempts)) {
33881
+ _context8.next = 13;
33882
+ break;
33883
+ }
33884
+ _context8.next = 5;
33885
+ return this.getTransaction(hash);
33886
+ case 5:
33887
+ foundInfo = _context8.sent;
33888
+ if (!(foundInfo.status !== api/* Api */.j.GetTransactionStatus.NOT_FOUND)) {
33889
+ _context8.next = 8;
33890
+ break;
33891
+ }
33892
+ return _context8.abrupt("return", foundInfo);
33893
+ case 8:
33894
+ _context8.next = 10;
33895
+ return utils/* Utils */.A.sleep(((_opts$sleepStrategy = opts === null || opts === void 0 ? void 0 : opts.sleepStrategy) !== null && _opts$sleepStrategy !== void 0 ? _opts$sleepStrategy : BasicSleepStrategy)(attempt));
33896
+ case 10:
33897
+ attempt++;
33898
+ _context8.next = 2;
33899
+ break;
33900
+ case 13:
33901
+ return _context8.abrupt("return", foundInfo);
33902
+ case 14:
33903
+ case "end":
33904
+ return _context8.stop();
33905
+ }
33906
+ }, _callee8, this);
33907
+ }));
33908
+ function pollTransaction(_x6, _x7) {
33909
+ return _pollTransaction.apply(this, arguments);
33910
+ }
33911
+ return pollTransaction;
33912
+ }())
33913
+ }, {
33914
+ key: "getTransaction",
33915
+ value: (function () {
33916
+ var _getTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee9(hash) {
33917
+ return server_regeneratorRuntime().wrap(function _callee9$(_context9) {
33918
+ while (1) switch (_context9.prev = _context9.next) {
33919
+ case 0:
33920
+ return _context9.abrupt("return", this._getTransaction(hash).then(function (raw) {
33867
33921
  var foundInfo = {};
33868
33922
  if (raw.status !== api/* Api */.j.GetTransactionStatus.NOT_FOUND) {
33869
33923
  Object.assign(foundInfo, (0,parsers/* parseTransactionInfo */.WC)(raw));
33870
33924
  }
33871
33925
  var result = _objectSpread({
33872
33926
  status: raw.status,
33927
+ txHash: hash,
33873
33928
  latestLedger: raw.latestLedger,
33874
33929
  latestLedgerCloseTime: raw.latestLedgerCloseTime,
33875
33930
  oldestLedger: raw.oldestLedger,
@@ -33879,11 +33934,11 @@ var RpcServer = function () {
33879
33934
  }));
33880
33935
  case 1:
33881
33936
  case "end":
33882
- return _context8.stop();
33937
+ return _context9.stop();
33883
33938
  }
33884
- }, _callee8, this);
33939
+ }, _callee9, this);
33885
33940
  }));
33886
- function getTransaction(_x6) {
33941
+ function getTransaction(_x8) {
33887
33942
  return _getTransaction2.apply(this, arguments);
33888
33943
  }
33889
33944
  return getTransaction;
@@ -33891,20 +33946,20 @@ var RpcServer = function () {
33891
33946
  }, {
33892
33947
  key: "_getTransaction",
33893
33948
  value: function () {
33894
- var _getTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee9(hash) {
33895
- return server_regeneratorRuntime().wrap(function _callee9$(_context9) {
33896
- while (1) switch (_context9.prev = _context9.next) {
33949
+ var _getTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee10(hash) {
33950
+ return server_regeneratorRuntime().wrap(function _callee10$(_context10) {
33951
+ while (1) switch (_context10.prev = _context10.next) {
33897
33952
  case 0:
33898
- return _context9.abrupt("return", postObject(this.serverURL.toString(), 'getTransaction', {
33953
+ return _context10.abrupt("return", postObject(this.serverURL.toString(), 'getTransaction', {
33899
33954
  hash: hash
33900
33955
  }));
33901
33956
  case 1:
33902
33957
  case "end":
33903
- return _context9.stop();
33958
+ return _context10.stop();
33904
33959
  }
33905
- }, _callee9, this);
33960
+ }, _callee10, this);
33906
33961
  }));
33907
- function _getTransaction(_x7) {
33962
+ function _getTransaction(_x9) {
33908
33963
  return _getTransaction3.apply(this, arguments);
33909
33964
  }
33910
33965
  return _getTransaction;
@@ -33912,11 +33967,11 @@ var RpcServer = function () {
33912
33967
  }, {
33913
33968
  key: "getTransactions",
33914
33969
  value: (function () {
33915
- var _getTransactions2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee10(request) {
33916
- return server_regeneratorRuntime().wrap(function _callee10$(_context10) {
33917
- while (1) switch (_context10.prev = _context10.next) {
33970
+ var _getTransactions2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee11(request) {
33971
+ return server_regeneratorRuntime().wrap(function _callee11$(_context11) {
33972
+ while (1) switch (_context11.prev = _context11.next) {
33918
33973
  case 0:
33919
- return _context10.abrupt("return", this._getTransactions(request).then(function (raw) {
33974
+ return _context11.abrupt("return", this._getTransactions(request).then(function (raw) {
33920
33975
  var result = {
33921
33976
  transactions: raw.transactions.map(parsers/* parseRawTransactions */.tR),
33922
33977
  latestLedger: raw.latestLedger,
@@ -33929,11 +33984,11 @@ var RpcServer = function () {
33929
33984
  }));
33930
33985
  case 1:
33931
33986
  case "end":
33932
- return _context10.stop();
33987
+ return _context11.stop();
33933
33988
  }
33934
- }, _callee10, this);
33989
+ }, _callee11, this);
33935
33990
  }));
33936
- function getTransactions(_x8) {
33991
+ function getTransactions(_x10) {
33937
33992
  return _getTransactions2.apply(this, arguments);
33938
33993
  }
33939
33994
  return getTransactions;
@@ -33941,18 +33996,18 @@ var RpcServer = function () {
33941
33996
  }, {
33942
33997
  key: "_getTransactions",
33943
33998
  value: function () {
33944
- var _getTransactions3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee11(request) {
33945
- return server_regeneratorRuntime().wrap(function _callee11$(_context11) {
33946
- while (1) switch (_context11.prev = _context11.next) {
33999
+ var _getTransactions3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee12(request) {
34000
+ return server_regeneratorRuntime().wrap(function _callee12$(_context12) {
34001
+ while (1) switch (_context12.prev = _context12.next) {
33947
34002
  case 0:
33948
- return _context11.abrupt("return", postObject(this.serverURL.toString(), 'getTransactions', request));
34003
+ return _context12.abrupt("return", postObject(this.serverURL.toString(), 'getTransactions', request));
33949
34004
  case 1:
33950
34005
  case "end":
33951
- return _context11.stop();
34006
+ return _context12.stop();
33952
34007
  }
33953
- }, _callee11, this);
34008
+ }, _callee12, this);
33954
34009
  }));
33955
- function _getTransactions(_x9) {
34010
+ function _getTransactions(_x11) {
33956
34011
  return _getTransactions3.apply(this, arguments);
33957
34012
  }
33958
34013
  return _getTransactions;
@@ -33960,18 +34015,18 @@ var RpcServer = function () {
33960
34015
  }, {
33961
34016
  key: "getEvents",
33962
34017
  value: (function () {
33963
- var _getEvents2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee12(request) {
33964
- return server_regeneratorRuntime().wrap(function _callee12$(_context12) {
33965
- while (1) switch (_context12.prev = _context12.next) {
34018
+ var _getEvents2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee13(request) {
34019
+ return server_regeneratorRuntime().wrap(function _callee13$(_context13) {
34020
+ while (1) switch (_context13.prev = _context13.next) {
33966
34021
  case 0:
33967
- return _context12.abrupt("return", this._getEvents(request).then(parsers/* parseRawEvents */.fG));
34022
+ return _context13.abrupt("return", this._getEvents(request).then(parsers/* parseRawEvents */.fG));
33968
34023
  case 1:
33969
34024
  case "end":
33970
- return _context12.stop();
34025
+ return _context13.stop();
33971
34026
  }
33972
- }, _callee12, this);
34027
+ }, _callee13, this);
33973
34028
  }));
33974
- function getEvents(_x10) {
34029
+ function getEvents(_x12) {
33975
34030
  return _getEvents2.apply(this, arguments);
33976
34031
  }
33977
34032
  return getEvents;
@@ -33979,12 +34034,12 @@ var RpcServer = function () {
33979
34034
  }, {
33980
34035
  key: "_getEvents",
33981
34036
  value: function () {
33982
- var _getEvents3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee13(request) {
34037
+ var _getEvents3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee14(request) {
33983
34038
  var _request$filters;
33984
- return server_regeneratorRuntime().wrap(function _callee13$(_context13) {
33985
- while (1) switch (_context13.prev = _context13.next) {
34039
+ return server_regeneratorRuntime().wrap(function _callee14$(_context14) {
34040
+ while (1) switch (_context14.prev = _context14.next) {
33986
34041
  case 0:
33987
- return _context13.abrupt("return", postObject(this.serverURL.toString(), 'getEvents', _objectSpread(_objectSpread({
34042
+ return _context14.abrupt("return", postObject(this.serverURL.toString(), 'getEvents', _objectSpread(_objectSpread({
33988
34043
  filters: (_request$filters = request.filters) !== null && _request$filters !== void 0 ? _request$filters : [],
33989
34044
  pagination: _objectSpread(_objectSpread({}, request.cursor && {
33990
34045
  cursor: request.cursor
@@ -33998,11 +34053,11 @@ var RpcServer = function () {
33998
34053
  })));
33999
34054
  case 1:
34000
34055
  case "end":
34001
- return _context13.stop();
34056
+ return _context14.stop();
34002
34057
  }
34003
- }, _callee13, this);
34058
+ }, _callee14, this);
34004
34059
  }));
34005
- function _getEvents(_x11) {
34060
+ function _getEvents(_x13) {
34006
34061
  return _getEvents3.apply(this, arguments);
34007
34062
  }
34008
34063
  return _getEvents;
@@ -34010,16 +34065,16 @@ var RpcServer = function () {
34010
34065
  }, {
34011
34066
  key: "getNetwork",
34012
34067
  value: (function () {
34013
- var _getNetwork = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee14() {
34014
- return server_regeneratorRuntime().wrap(function _callee14$(_context14) {
34015
- while (1) switch (_context14.prev = _context14.next) {
34068
+ var _getNetwork = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee15() {
34069
+ return server_regeneratorRuntime().wrap(function _callee15$(_context15) {
34070
+ while (1) switch (_context15.prev = _context15.next) {
34016
34071
  case 0:
34017
- return _context14.abrupt("return", postObject(this.serverURL.toString(), 'getNetwork'));
34072
+ return _context15.abrupt("return", postObject(this.serverURL.toString(), 'getNetwork'));
34018
34073
  case 1:
34019
34074
  case "end":
34020
- return _context14.stop();
34075
+ return _context15.stop();
34021
34076
  }
34022
- }, _callee14, this);
34077
+ }, _callee15, this);
34023
34078
  }));
34024
34079
  function getNetwork() {
34025
34080
  return _getNetwork.apply(this, arguments);
@@ -34029,16 +34084,16 @@ var RpcServer = function () {
34029
34084
  }, {
34030
34085
  key: "getLatestLedger",
34031
34086
  value: (function () {
34032
- var _getLatestLedger = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee15() {
34033
- return server_regeneratorRuntime().wrap(function _callee15$(_context15) {
34034
- while (1) switch (_context15.prev = _context15.next) {
34087
+ var _getLatestLedger = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee16() {
34088
+ return server_regeneratorRuntime().wrap(function _callee16$(_context16) {
34089
+ while (1) switch (_context16.prev = _context16.next) {
34035
34090
  case 0:
34036
- return _context15.abrupt("return", postObject(this.serverURL.toString(), 'getLatestLedger'));
34091
+ return _context16.abrupt("return", postObject(this.serverURL.toString(), 'getLatestLedger'));
34037
34092
  case 1:
34038
34093
  case "end":
34039
- return _context15.stop();
34094
+ return _context16.stop();
34040
34095
  }
34041
- }, _callee15, this);
34096
+ }, _callee16, this);
34042
34097
  }));
34043
34098
  function getLatestLedger() {
34044
34099
  return _getLatestLedger.apply(this, arguments);
@@ -34048,18 +34103,18 @@ var RpcServer = function () {
34048
34103
  }, {
34049
34104
  key: "simulateTransaction",
34050
34105
  value: (function () {
34051
- var _simulateTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee16(tx, addlResources) {
34052
- return server_regeneratorRuntime().wrap(function _callee16$(_context16) {
34053
- while (1) switch (_context16.prev = _context16.next) {
34106
+ var _simulateTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee17(tx, addlResources) {
34107
+ return server_regeneratorRuntime().wrap(function _callee17$(_context17) {
34108
+ while (1) switch (_context17.prev = _context17.next) {
34054
34109
  case 0:
34055
- return _context16.abrupt("return", this._simulateTransaction(tx, addlResources).then(parsers/* parseRawSimulation */.jr));
34110
+ return _context17.abrupt("return", this._simulateTransaction(tx, addlResources).then(parsers/* parseRawSimulation */.jr));
34056
34111
  case 1:
34057
34112
  case "end":
34058
- return _context16.stop();
34113
+ return _context17.stop();
34059
34114
  }
34060
- }, _callee16, this);
34115
+ }, _callee17, this);
34061
34116
  }));
34062
- function simulateTransaction(_x12, _x13) {
34117
+ function simulateTransaction(_x14, _x15) {
34063
34118
  return _simulateTransaction2.apply(this, arguments);
34064
34119
  }
34065
34120
  return simulateTransaction;
@@ -34067,11 +34122,11 @@ var RpcServer = function () {
34067
34122
  }, {
34068
34123
  key: "_simulateTransaction",
34069
34124
  value: function () {
34070
- var _simulateTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee17(transaction, addlResources) {
34071
- return server_regeneratorRuntime().wrap(function _callee17$(_context17) {
34072
- while (1) switch (_context17.prev = _context17.next) {
34125
+ var _simulateTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee18(transaction, addlResources) {
34126
+ return server_regeneratorRuntime().wrap(function _callee18$(_context18) {
34127
+ while (1) switch (_context18.prev = _context18.next) {
34073
34128
  case 0:
34074
- return _context17.abrupt("return", postObject(this.serverURL.toString(), 'simulateTransaction', _objectSpread({
34129
+ return _context18.abrupt("return", postObject(this.serverURL.toString(), 'simulateTransaction', _objectSpread({
34075
34130
  transaction: transaction.toXDR()
34076
34131
  }, addlResources !== undefined && {
34077
34132
  resourceConfig: {
@@ -34080,11 +34135,11 @@ var RpcServer = function () {
34080
34135
  })));
34081
34136
  case 1:
34082
34137
  case "end":
34083
- return _context17.stop();
34138
+ return _context18.stop();
34084
34139
  }
34085
- }, _callee17, this);
34140
+ }, _callee18, this);
34086
34141
  }));
34087
- function _simulateTransaction(_x14, _x15) {
34142
+ function _simulateTransaction(_x16, _x17) {
34088
34143
  return _simulateTransaction3.apply(this, arguments);
34089
34144
  }
34090
34145
  return _simulateTransaction;
@@ -34092,29 +34147,29 @@ var RpcServer = function () {
34092
34147
  }, {
34093
34148
  key: "prepareTransaction",
34094
34149
  value: (function () {
34095
- var _prepareTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee18(tx) {
34150
+ var _prepareTransaction = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee19(tx) {
34096
34151
  var simResponse;
34097
- return server_regeneratorRuntime().wrap(function _callee18$(_context18) {
34098
- while (1) switch (_context18.prev = _context18.next) {
34152
+ return server_regeneratorRuntime().wrap(function _callee19$(_context19) {
34153
+ while (1) switch (_context19.prev = _context19.next) {
34099
34154
  case 0:
34100
- _context18.next = 2;
34155
+ _context19.next = 2;
34101
34156
  return this.simulateTransaction(tx);
34102
34157
  case 2:
34103
- simResponse = _context18.sent;
34158
+ simResponse = _context19.sent;
34104
34159
  if (!api/* Api */.j.isSimulationError(simResponse)) {
34105
- _context18.next = 5;
34160
+ _context19.next = 5;
34106
34161
  break;
34107
34162
  }
34108
34163
  throw new Error(simResponse.error);
34109
34164
  case 5:
34110
- return _context18.abrupt("return", (0,transaction/* assembleTransaction */.X)(tx, simResponse).build());
34165
+ return _context19.abrupt("return", (0,transaction/* assembleTransaction */.X)(tx, simResponse).build());
34111
34166
  case 6:
34112
34167
  case "end":
34113
- return _context18.stop();
34168
+ return _context19.stop();
34114
34169
  }
34115
- }, _callee18, this);
34170
+ }, _callee19, this);
34116
34171
  }));
34117
- function prepareTransaction(_x16) {
34172
+ function prepareTransaction(_x18) {
34118
34173
  return _prepareTransaction.apply(this, arguments);
34119
34174
  }
34120
34175
  return prepareTransaction;
@@ -34122,18 +34177,18 @@ var RpcServer = function () {
34122
34177
  }, {
34123
34178
  key: "sendTransaction",
34124
34179
  value: (function () {
34125
- var _sendTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee19(transaction) {
34126
- return server_regeneratorRuntime().wrap(function _callee19$(_context19) {
34127
- while (1) switch (_context19.prev = _context19.next) {
34180
+ var _sendTransaction2 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee20(transaction) {
34181
+ return server_regeneratorRuntime().wrap(function _callee20$(_context20) {
34182
+ while (1) switch (_context20.prev = _context20.next) {
34128
34183
  case 0:
34129
- return _context19.abrupt("return", this._sendTransaction(transaction).then(parsers/* parseRawSendTransaction */.Af));
34184
+ return _context20.abrupt("return", this._sendTransaction(transaction).then(parsers/* parseRawSendTransaction */.Af));
34130
34185
  case 1:
34131
34186
  case "end":
34132
- return _context19.stop();
34187
+ return _context20.stop();
34133
34188
  }
34134
- }, _callee19, this);
34189
+ }, _callee20, this);
34135
34190
  }));
34136
- function sendTransaction(_x17) {
34191
+ function sendTransaction(_x19) {
34137
34192
  return _sendTransaction2.apply(this, arguments);
34138
34193
  }
34139
34194
  return sendTransaction;
@@ -34141,20 +34196,20 @@ var RpcServer = function () {
34141
34196
  }, {
34142
34197
  key: "_sendTransaction",
34143
34198
  value: function () {
34144
- var _sendTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee20(transaction) {
34145
- return server_regeneratorRuntime().wrap(function _callee20$(_context20) {
34146
- while (1) switch (_context20.prev = _context20.next) {
34199
+ var _sendTransaction3 = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee21(transaction) {
34200
+ return server_regeneratorRuntime().wrap(function _callee21$(_context21) {
34201
+ while (1) switch (_context21.prev = _context21.next) {
34147
34202
  case 0:
34148
- return _context20.abrupt("return", postObject(this.serverURL.toString(), 'sendTransaction', {
34203
+ return _context21.abrupt("return", postObject(this.serverURL.toString(), 'sendTransaction', {
34149
34204
  transaction: transaction.toXDR()
34150
34205
  }));
34151
34206
  case 1:
34152
34207
  case "end":
34153
- return _context20.stop();
34208
+ return _context21.stop();
34154
34209
  }
34155
- }, _callee20, this);
34210
+ }, _callee21, this);
34156
34211
  }));
34157
- function _sendTransaction(_x18) {
34212
+ function _sendTransaction(_x20) {
34158
34213
  return _sendTransaction3.apply(this, arguments);
34159
34214
  }
34160
34215
  return _sendTransaction;
@@ -34162,58 +34217,58 @@ var RpcServer = function () {
34162
34217
  }, {
34163
34218
  key: "requestAirdrop",
34164
34219
  value: (function () {
34165
- var _requestAirdrop = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee21(address, friendbotUrl) {
34220
+ var _requestAirdrop = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee22(address, friendbotUrl) {
34166
34221
  var account, response, meta, sequence, _error$response, _error$response$detai;
34167
- return server_regeneratorRuntime().wrap(function _callee21$(_context21) {
34168
- while (1) switch (_context21.prev = _context21.next) {
34222
+ return server_regeneratorRuntime().wrap(function _callee22$(_context22) {
34223
+ while (1) switch (_context22.prev = _context22.next) {
34169
34224
  case 0:
34170
34225
  account = typeof address === 'string' ? address : address.accountId();
34171
- _context21.t0 = friendbotUrl;
34172
- if (_context21.t0) {
34173
- _context21.next = 6;
34226
+ _context22.t0 = friendbotUrl;
34227
+ if (_context22.t0) {
34228
+ _context22.next = 6;
34174
34229
  break;
34175
34230
  }
34176
- _context21.next = 5;
34231
+ _context22.next = 5;
34177
34232
  return this.getNetwork();
34178
34233
  case 5:
34179
- _context21.t0 = _context21.sent.friendbotUrl;
34234
+ _context22.t0 = _context22.sent.friendbotUrl;
34180
34235
  case 6:
34181
- friendbotUrl = _context21.t0;
34236
+ friendbotUrl = _context22.t0;
34182
34237
  if (friendbotUrl) {
34183
- _context21.next = 9;
34238
+ _context22.next = 9;
34184
34239
  break;
34185
34240
  }
34186
34241
  throw new Error('No friendbot URL configured for current network');
34187
34242
  case 9:
34188
- _context21.prev = 9;
34189
- _context21.next = 12;
34243
+ _context22.prev = 9;
34244
+ _context22.next = 12;
34190
34245
  return axios.post("".concat(friendbotUrl, "?addr=").concat(encodeURIComponent(account)));
34191
34246
  case 12:
34192
- response = _context21.sent;
34247
+ response = _context22.sent;
34193
34248
  meta = lib.xdr.TransactionMeta.fromXDR(response.data.result_meta_xdr, 'base64');
34194
34249
  sequence = findCreatedAccountSequenceInTransactionMeta(meta);
34195
- return _context21.abrupt("return", new lib.Account(account, sequence));
34250
+ return _context22.abrupt("return", new lib.Account(account, sequence));
34196
34251
  case 18:
34197
- _context21.prev = 18;
34198
- _context21.t1 = _context21["catch"](9);
34199
- if (!(((_error$response = _context21.t1.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 400)) {
34200
- _context21.next = 23;
34252
+ _context22.prev = 18;
34253
+ _context22.t1 = _context22["catch"](9);
34254
+ if (!(((_error$response = _context22.t1.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 400)) {
34255
+ _context22.next = 23;
34201
34256
  break;
34202
34257
  }
34203
- if (!((_error$response$detai = _context21.t1.response.detail) !== null && _error$response$detai !== void 0 && _error$response$detai.includes('createAccountAlreadyExist'))) {
34204
- _context21.next = 23;
34258
+ if (!((_error$response$detai = _context22.t1.response.detail) !== null && _error$response$detai !== void 0 && _error$response$detai.includes('createAccountAlreadyExist'))) {
34259
+ _context22.next = 23;
34205
34260
  break;
34206
34261
  }
34207
- return _context21.abrupt("return", this.getAccount(account));
34262
+ return _context22.abrupt("return", this.getAccount(account));
34208
34263
  case 23:
34209
- throw _context21.t1;
34264
+ throw _context22.t1;
34210
34265
  case 24:
34211
34266
  case "end":
34212
- return _context21.stop();
34267
+ return _context22.stop();
34213
34268
  }
34214
- }, _callee21, this, [[9, 18]]);
34269
+ }, _callee22, this, [[9, 18]]);
34215
34270
  }));
34216
- function requestAirdrop(_x19, _x20) {
34271
+ function requestAirdrop(_x21, _x22) {
34217
34272
  return _requestAirdrop.apply(this, arguments);
34218
34273
  }
34219
34274
  return requestAirdrop;
@@ -34221,16 +34276,16 @@ var RpcServer = function () {
34221
34276
  }, {
34222
34277
  key: "getFeeStats",
34223
34278
  value: (function () {
34224
- var _getFeeStats = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee22() {
34225
- return server_regeneratorRuntime().wrap(function _callee22$(_context22) {
34226
- while (1) switch (_context22.prev = _context22.next) {
34279
+ var _getFeeStats = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee23() {
34280
+ return server_regeneratorRuntime().wrap(function _callee23$(_context23) {
34281
+ while (1) switch (_context23.prev = _context23.next) {
34227
34282
  case 0:
34228
- return _context22.abrupt("return", postObject(this.serverURL.toString(), 'getFeeStats'));
34283
+ return _context23.abrupt("return", postObject(this.serverURL.toString(), 'getFeeStats'));
34229
34284
  case 1:
34230
34285
  case "end":
34231
- return _context22.stop();
34286
+ return _context23.stop();
34232
34287
  }
34233
- }, _callee22, this);
34288
+ }, _callee23, this);
34234
34289
  }));
34235
34290
  function getFeeStats() {
34236
34291
  return _getFeeStats.apply(this, arguments);
@@ -34240,16 +34295,16 @@ var RpcServer = function () {
34240
34295
  }, {
34241
34296
  key: "getVersionInfo",
34242
34297
  value: (function () {
34243
- var _getVersionInfo = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee23() {
34244
- return server_regeneratorRuntime().wrap(function _callee23$(_context23) {
34245
- while (1) switch (_context23.prev = _context23.next) {
34298
+ var _getVersionInfo = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee24() {
34299
+ return server_regeneratorRuntime().wrap(function _callee24$(_context24) {
34300
+ while (1) switch (_context24.prev = _context24.next) {
34246
34301
  case 0:
34247
- return _context23.abrupt("return", postObject(this.serverURL.toString(), 'getVersionInfo'));
34302
+ return _context24.abrupt("return", postObject(this.serverURL.toString(), 'getVersionInfo'));
34248
34303
  case 1:
34249
34304
  case "end":
34250
- return _context23.stop();
34305
+ return _context24.stop();
34251
34306
  }
34252
- }, _callee23, this);
34307
+ }, _callee24, this);
34253
34308
  }));
34254
34309
  function getVersionInfo() {
34255
34310
  return _getVersionInfo.apply(this, arguments);
@@ -34259,33 +34314,33 @@ var RpcServer = function () {
34259
34314
  }, {
34260
34315
  key: "getSACBalance",
34261
34316
  value: (function () {
34262
- var _getSACBalance = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee24(contractId, sac, networkPassphrase) {
34317
+ var _getSACBalance = server_asyncToGenerator(server_regeneratorRuntime().mark(function _callee25(contractId, sac, networkPassphrase) {
34263
34318
  var passphrase, sacId, key, ledgerKey, response, _response$entries$2, lastModifiedLedgerSeq, liveUntilLedgerSeq, val, entry;
34264
- return server_regeneratorRuntime().wrap(function _callee24$(_context24) {
34265
- while (1) switch (_context24.prev = _context24.next) {
34319
+ return server_regeneratorRuntime().wrap(function _callee25$(_context25) {
34320
+ while (1) switch (_context25.prev = _context25.next) {
34266
34321
  case 0:
34267
34322
  if (lib.StrKey.isValidContract(contractId)) {
34268
- _context24.next = 2;
34323
+ _context25.next = 2;
34269
34324
  break;
34270
34325
  }
34271
34326
  throw new TypeError("expected contract ID, got ".concat(contractId));
34272
34327
  case 2:
34273
34328
  if (!(networkPassphrase !== null && networkPassphrase !== void 0)) {
34274
- _context24.next = 6;
34329
+ _context25.next = 6;
34275
34330
  break;
34276
34331
  }
34277
- _context24.t0 = networkPassphrase;
34278
- _context24.next = 9;
34332
+ _context25.t0 = networkPassphrase;
34333
+ _context25.next = 9;
34279
34334
  break;
34280
34335
  case 6:
34281
- _context24.next = 8;
34336
+ _context25.next = 8;
34282
34337
  return this.getNetwork().then(function (n) {
34283
34338
  return n.passphrase;
34284
34339
  });
34285
34340
  case 8:
34286
- _context24.t0 = _context24.sent;
34341
+ _context25.t0 = _context25.sent;
34287
34342
  case 9:
34288
- passphrase = _context24.t0;
34343
+ passphrase = _context25.t0;
34289
34344
  sacId = sac.contractId(passphrase);
34290
34345
  key = lib.xdr.ScVal.scvVec([(0,lib.nativeToScVal)("Balance", {
34291
34346
  type: "symbol"
@@ -34297,29 +34352,29 @@ var RpcServer = function () {
34297
34352
  durability: lib.xdr.ContractDataDurability.persistent(),
34298
34353
  key: key
34299
34354
  }));
34300
- _context24.next = 15;
34355
+ _context25.next = 15;
34301
34356
  return this.getLedgerEntries(ledgerKey);
34302
34357
  case 15:
34303
- response = _context24.sent;
34358
+ response = _context25.sent;
34304
34359
  if (!(response.entries.length === 0)) {
34305
- _context24.next = 18;
34360
+ _context25.next = 18;
34306
34361
  break;
34307
34362
  }
34308
- return _context24.abrupt("return", {
34363
+ return _context25.abrupt("return", {
34309
34364
  latestLedger: response.latestLedger
34310
34365
  });
34311
34366
  case 18:
34312
34367
  _response$entries$2 = response.entries[0], lastModifiedLedgerSeq = _response$entries$2.lastModifiedLedgerSeq, liveUntilLedgerSeq = _response$entries$2.liveUntilLedgerSeq, val = _response$entries$2.val;
34313
34368
  if (!(val.switch().value !== lib.xdr.LedgerEntryType.contractData().value)) {
34314
- _context24.next = 21;
34369
+ _context25.next = 21;
34315
34370
  break;
34316
34371
  }
34317
- return _context24.abrupt("return", {
34372
+ return _context25.abrupt("return", {
34318
34373
  latestLedger: response.latestLedger
34319
34374
  });
34320
34375
  case 21:
34321
34376
  entry = (0,lib.scValToNative)(val.contractData().val());
34322
- return _context24.abrupt("return", {
34377
+ return _context25.abrupt("return", {
34323
34378
  latestLedger: response.latestLedger,
34324
34379
  balanceEntry: {
34325
34380
  liveUntilLedgerSeq: liveUntilLedgerSeq,
@@ -34331,11 +34386,11 @@ var RpcServer = function () {
34331
34386
  });
34332
34387
  case 23:
34333
34388
  case "end":
34334
- return _context24.stop();
34389
+ return _context25.stop();
34335
34390
  }
34336
- }, _callee24, this);
34391
+ }, _callee25, this);
34337
34392
  }));
34338
- function getSACBalance(_x21, _x22, _x23) {
34393
+ function getSACBalance(_x23, _x24, _x25) {
34339
34394
  return _getSACBalance.apply(this, arguments);
34340
34395
  }
34341
34396
  return getSACBalance;
@@ -34416,7 +34471,8 @@ function parseTransactionInfo(raw) {
34416
34471
  }
34417
34472
  function parseRawTransactions(r) {
34418
34473
  return _objectSpread({
34419
- status: r.status
34474
+ status: r.status,
34475
+ txHash: r.txHash
34420
34476
  }, parseTransactionInfo(r));
34421
34477
  }
34422
34478
  function parseRawEvents(raw) {
@@ -34459,8 +34515,7 @@ function parseSuccessful(sim, partial) {
34459
34515
  var _sim$results$length, _sim$results, _sim$stateChanges$len, _sim$stateChanges, _sim$stateChanges2;
34460
34516
  var success = _objectSpread(_objectSpread(_objectSpread({}, partial), {}, {
34461
34517
  transactionData: new _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_0__.SorobanDataBuilder(sim.transactionData),
34462
- minResourceFee: sim.minResourceFee,
34463
- cost: sim.cost
34518
+ minResourceFee: sim.minResourceFee
34464
34519
  }, ((_sim$results$length = (_sim$results = sim.results) === null || _sim$results === void 0 ? void 0 : _sim$results.length) !== null && _sim$results$length !== void 0 ? _sim$results$length : 0 > 0) && {
34465
34520
  result: sim.results.map(function (row) {
34466
34521
  var _row$auth;
@@ -34693,6 +34748,13 @@ var Utils = function () {
34693
34748
  maxTime = _transaction$timeBoun.maxTime;
34694
34749
  return now >= Number.parseInt(minTime, 10) - gracePeriod && now <= Number.parseInt(maxTime, 10) + gracePeriod;
34695
34750
  }
34751
+ }, {
34752
+ key: "sleep",
34753
+ value: function sleep(ms) {
34754
+ return new Promise(function (resolve) {
34755
+ return setTimeout(resolve, ms);
34756
+ });
34757
+ }
34696
34758
  }]);
34697
34759
  }();
34698
34760