@stellar/stellar-sdk 14.1.1 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +14 -20
  3. package/dist/stellar-sdk-minimal.js +532 -375
  4. package/dist/stellar-sdk-minimal.min.js +1 -1
  5. package/dist/stellar-sdk-no-axios.js +532 -375
  6. package/dist/stellar-sdk-no-axios.min.js +1 -1
  7. package/dist/stellar-sdk-no-eventsource.js +781 -551
  8. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  9. package/dist/stellar-sdk.js +781 -551
  10. package/dist/stellar-sdk.min.js +1 -1
  11. package/lib/contract/client.js +2 -2
  12. package/lib/contract/spec.js +10 -2
  13. package/lib/contract/utils.js +7 -7
  14. package/lib/errors/account_requires_memo.d.ts +0 -1
  15. package/lib/errors/account_requires_memo.js +0 -4
  16. package/lib/errors/bad_request.d.ts +0 -1
  17. package/lib/errors/bad_request.js +2 -8
  18. package/lib/errors/bad_response.d.ts +0 -1
  19. package/lib/errors/bad_response.js +2 -8
  20. package/lib/errors/network.d.ts +0 -1
  21. package/lib/errors/network.js +0 -3
  22. package/lib/errors/not_found.d.ts +0 -1
  23. package/lib/errors/not_found.js +2 -8
  24. package/lib/federation/index.d.ts +2 -2
  25. package/lib/horizon/call_builder.js +1 -1
  26. package/lib/horizon/horizon_api.js +0 -1
  27. package/lib/horizon/horizon_axios_client.js +4 -4
  28. package/lib/horizon/index.d.ts +1 -1
  29. package/lib/horizon/types/effects.d.ts +41 -41
  30. package/lib/horizon/types/trade.d.ts +1 -1
  31. package/lib/http-client/fetch-client.d.ts +2 -2
  32. package/lib/http-client/fetch-client.js +16 -16
  33. package/lib/http-client/index.js +2 -2
  34. package/lib/http-client/types.d.ts +2 -2
  35. package/lib/index.d.ts +11 -11
  36. package/lib/index.js +2 -2
  37. package/lib/minimal/contract/client.js +2 -2
  38. package/lib/minimal/contract/spec.js +10 -2
  39. package/lib/minimal/contract/utils.js +7 -7
  40. package/lib/minimal/errors/account_requires_memo.d.ts +0 -1
  41. package/lib/minimal/errors/account_requires_memo.js +0 -4
  42. package/lib/minimal/errors/bad_request.d.ts +0 -1
  43. package/lib/minimal/errors/bad_request.js +2 -8
  44. package/lib/minimal/errors/bad_response.d.ts +0 -1
  45. package/lib/minimal/errors/bad_response.js +2 -8
  46. package/lib/minimal/errors/network.d.ts +0 -1
  47. package/lib/minimal/errors/network.js +0 -3
  48. package/lib/minimal/errors/not_found.d.ts +0 -1
  49. package/lib/minimal/errors/not_found.js +2 -8
  50. package/lib/minimal/federation/index.d.ts +2 -2
  51. package/lib/minimal/horizon/call_builder.js +1 -1
  52. package/lib/minimal/horizon/horizon_api.js +0 -1
  53. package/lib/minimal/horizon/horizon_axios_client.js +4 -4
  54. package/lib/minimal/horizon/index.d.ts +1 -1
  55. package/lib/minimal/horizon/types/effects.d.ts +41 -41
  56. package/lib/minimal/horizon/types/trade.d.ts +1 -1
  57. package/lib/minimal/http-client/fetch-client.d.ts +2 -2
  58. package/lib/minimal/http-client/fetch-client.js +16 -16
  59. package/lib/minimal/http-client/index.js +2 -2
  60. package/lib/minimal/http-client/types.d.ts +2 -2
  61. package/lib/minimal/index.d.ts +11 -11
  62. package/lib/minimal/index.js +2 -2
  63. package/lib/minimal/rpc/api.d.ts +148 -8
  64. package/lib/minimal/rpc/api.js +3 -3
  65. package/lib/minimal/rpc/axios.js +3 -3
  66. package/lib/minimal/rpc/browser.d.ts +2 -2
  67. package/lib/minimal/rpc/index.d.ts +1 -1
  68. package/lib/minimal/rpc/parsers.d.ts +3 -2
  69. package/lib/minimal/rpc/parsers.js +42 -19
  70. package/lib/minimal/rpc/server.d.ts +123 -31
  71. package/lib/minimal/rpc/server.js +425 -267
  72. package/lib/minimal/rpc/transaction.d.ts +2 -2
  73. package/lib/minimal/rpc/transaction.js +6 -6
  74. package/lib/minimal/webauth/errors.d.ts +0 -2
  75. package/lib/minimal/webauth/errors.js +2 -8
  76. package/lib/minimal/webauth/index.d.ts +2 -2
  77. package/lib/no-axios/contract/client.js +2 -2
  78. package/lib/no-axios/contract/spec.js +10 -2
  79. package/lib/no-axios/contract/utils.js +7 -7
  80. package/lib/no-axios/errors/account_requires_memo.d.ts +0 -1
  81. package/lib/no-axios/errors/account_requires_memo.js +0 -4
  82. package/lib/no-axios/errors/bad_request.d.ts +0 -1
  83. package/lib/no-axios/errors/bad_request.js +2 -8
  84. package/lib/no-axios/errors/bad_response.d.ts +0 -1
  85. package/lib/no-axios/errors/bad_response.js +2 -8
  86. package/lib/no-axios/errors/network.d.ts +0 -1
  87. package/lib/no-axios/errors/network.js +0 -3
  88. package/lib/no-axios/errors/not_found.d.ts +0 -1
  89. package/lib/no-axios/errors/not_found.js +2 -8
  90. package/lib/no-axios/federation/index.d.ts +2 -2
  91. package/lib/no-axios/horizon/call_builder.js +1 -1
  92. package/lib/no-axios/horizon/horizon_api.js +0 -1
  93. package/lib/no-axios/horizon/horizon_axios_client.js +4 -4
  94. package/lib/no-axios/horizon/index.d.ts +1 -1
  95. package/lib/no-axios/horizon/types/effects.d.ts +41 -41
  96. package/lib/no-axios/horizon/types/trade.d.ts +1 -1
  97. package/lib/no-axios/http-client/fetch-client.d.ts +2 -2
  98. package/lib/no-axios/http-client/fetch-client.js +16 -16
  99. package/lib/no-axios/http-client/index.js +2 -2
  100. package/lib/no-axios/http-client/types.d.ts +2 -2
  101. package/lib/no-axios/index.d.ts +11 -11
  102. package/lib/no-axios/index.js +2 -2
  103. package/lib/no-axios/rpc/api.d.ts +148 -8
  104. package/lib/no-axios/rpc/api.js +3 -3
  105. package/lib/no-axios/rpc/axios.js +3 -3
  106. package/lib/no-axios/rpc/browser.d.ts +2 -2
  107. package/lib/no-axios/rpc/index.d.ts +1 -1
  108. package/lib/no-axios/rpc/parsers.d.ts +3 -2
  109. package/lib/no-axios/rpc/parsers.js +42 -19
  110. package/lib/no-axios/rpc/server.d.ts +123 -31
  111. package/lib/no-axios/rpc/server.js +425 -267
  112. package/lib/no-axios/rpc/transaction.d.ts +2 -2
  113. package/lib/no-axios/rpc/transaction.js +6 -6
  114. package/lib/no-axios/webauth/errors.d.ts +0 -2
  115. package/lib/no-axios/webauth/errors.js +2 -8
  116. package/lib/no-axios/webauth/index.d.ts +2 -2
  117. package/lib/no-eventsource/contract/client.js +2 -2
  118. package/lib/no-eventsource/contract/spec.js +10 -2
  119. package/lib/no-eventsource/contract/utils.js +7 -7
  120. package/lib/no-eventsource/errors/account_requires_memo.d.ts +0 -1
  121. package/lib/no-eventsource/errors/account_requires_memo.js +0 -4
  122. package/lib/no-eventsource/errors/bad_request.d.ts +0 -1
  123. package/lib/no-eventsource/errors/bad_request.js +2 -8
  124. package/lib/no-eventsource/errors/bad_response.d.ts +0 -1
  125. package/lib/no-eventsource/errors/bad_response.js +2 -8
  126. package/lib/no-eventsource/errors/network.d.ts +0 -1
  127. package/lib/no-eventsource/errors/network.js +0 -3
  128. package/lib/no-eventsource/errors/not_found.d.ts +0 -1
  129. package/lib/no-eventsource/errors/not_found.js +2 -8
  130. package/lib/no-eventsource/federation/index.d.ts +2 -2
  131. package/lib/no-eventsource/horizon/call_builder.js +1 -1
  132. package/lib/no-eventsource/horizon/horizon_api.js +0 -1
  133. package/lib/no-eventsource/horizon/horizon_axios_client.js +4 -4
  134. package/lib/no-eventsource/horizon/index.d.ts +1 -1
  135. package/lib/no-eventsource/horizon/types/effects.d.ts +41 -41
  136. package/lib/no-eventsource/horizon/types/trade.d.ts +1 -1
  137. package/lib/no-eventsource/http-client/fetch-client.d.ts +2 -2
  138. package/lib/no-eventsource/http-client/fetch-client.js +16 -16
  139. package/lib/no-eventsource/http-client/index.js +2 -2
  140. package/lib/no-eventsource/http-client/types.d.ts +2 -2
  141. package/lib/no-eventsource/index.d.ts +11 -11
  142. package/lib/no-eventsource/index.js +2 -2
  143. package/lib/no-eventsource/rpc/api.d.ts +148 -8
  144. package/lib/no-eventsource/rpc/api.js +3 -3
  145. package/lib/no-eventsource/rpc/axios.js +3 -3
  146. package/lib/no-eventsource/rpc/browser.d.ts +2 -2
  147. package/lib/no-eventsource/rpc/index.d.ts +1 -1
  148. package/lib/no-eventsource/rpc/parsers.d.ts +3 -2
  149. package/lib/no-eventsource/rpc/parsers.js +42 -19
  150. package/lib/no-eventsource/rpc/server.d.ts +123 -31
  151. package/lib/no-eventsource/rpc/server.js +425 -267
  152. package/lib/no-eventsource/rpc/transaction.d.ts +2 -2
  153. package/lib/no-eventsource/rpc/transaction.js +6 -6
  154. package/lib/no-eventsource/webauth/errors.d.ts +0 -2
  155. package/lib/no-eventsource/webauth/errors.js +2 -8
  156. package/lib/no-eventsource/webauth/index.d.ts +2 -2
  157. package/lib/rpc/api.d.ts +148 -8
  158. package/lib/rpc/api.js +3 -3
  159. package/lib/rpc/axios.js +3 -3
  160. package/lib/rpc/browser.d.ts +2 -2
  161. package/lib/rpc/index.d.ts +1 -1
  162. package/lib/rpc/parsers.d.ts +3 -2
  163. package/lib/rpc/parsers.js +42 -19
  164. package/lib/rpc/server.d.ts +123 -31
  165. package/lib/rpc/server.js +425 -267
  166. package/lib/rpc/transaction.d.ts +2 -2
  167. package/lib/rpc/transaction.js +6 -6
  168. package/lib/webauth/errors.d.ts +0 -2
  169. package/lib/webauth/errors.js +2 -8
  170. package/lib/webauth/index.d.ts +2 -2
  171. package/package.json +17 -9
@@ -1,5 +1,5 @@
1
- import { FeeBumpTransaction, Transaction, TransactionBuilder } from '@stellar/stellar-base';
2
- import { Api } from './api';
1
+ import { FeeBumpTransaction, Transaction, TransactionBuilder } from "@stellar/stellar-base";
2
+ import { Api } from "./api";
3
3
  /**
4
4
  * Combines the given raw transaction alongside the simulation results.
5
5
  * If the given transaction already has authorization entries in a host
@@ -12,20 +12,20 @@ function isSorobanTransaction(tx) {
12
12
  return false;
13
13
  }
14
14
  switch (tx.operations[0].type) {
15
- case 'invokeHostFunction':
16
- case 'extendFootprintTtl':
17
- case 'restoreFootprint':
15
+ case "invokeHostFunction":
16
+ case "extendFootprintTtl":
17
+ case "restoreFootprint":
18
18
  return true;
19
19
  default:
20
20
  return false;
21
21
  }
22
22
  }
23
23
  function assembleTransaction(raw, simulation) {
24
- if ('innerTransaction' in raw) {
24
+ if ("innerTransaction" in raw) {
25
25
  return assembleTransaction(raw.innerTransaction, simulation);
26
26
  }
27
27
  if (!isSorobanTransaction(raw)) {
28
- throw new TypeError('unsupported transaction: must contain exactly one ' + 'invokeHostFunction, extendFootprintTtl, or restoreFootprint ' + 'operation');
28
+ throw new TypeError("unsupported transaction: must contain exactly one " + "invokeHostFunction, extendFootprintTtl, or restoreFootprint " + "operation");
29
29
  }
30
30
  var success = (0, _parsers.parseRawSimulation)(simulation);
31
31
  if (!_api.Api.isSimulationSuccess(success)) {
@@ -38,7 +38,7 @@ function assembleTransaction(raw, simulation) {
38
38
  sorobanData: success.transactionData.build(),
39
39
  networkPassphrase: raw.networkPassphrase
40
40
  });
41
- if (raw.operations[0].type === 'invokeHostFunction') {
41
+ if (raw.operations[0].type === "invokeHostFunction") {
42
42
  var _invokeOp$auth;
43
43
  txnBuilder.clearOperations();
44
44
  var invokeOp = raw.operations[0];
@@ -8,6 +8,4 @@
8
8
  * @param {string} message Human-readable error message.
9
9
  */
10
10
  export declare class InvalidChallengeError extends Error {
11
- __proto__: InvalidChallengeError;
12
- constructor(message: string);
13
11
  }
@@ -21,15 +21,9 @@ function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).in
21
21
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
22
22
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
23
  var InvalidChallengeError = exports.InvalidChallengeError = function (_Error) {
24
- function InvalidChallengeError(message) {
25
- var _this;
24
+ function InvalidChallengeError() {
26
25
  _classCallCheck(this, InvalidChallengeError);
27
- var trueProto = (this instanceof InvalidChallengeError ? this.constructor : void 0).prototype;
28
- _this = _callSuper(this, InvalidChallengeError, [message]);
29
- _this.__proto__ = trueProto;
30
- _this.constructor = InvalidChallengeError;
31
- _this.name = "InvalidChallengeError";
32
- return _this;
26
+ return _callSuper(this, InvalidChallengeError, arguments);
33
27
  }
34
28
  _inherits(InvalidChallengeError, _Error);
35
29
  return _createClass(InvalidChallengeError);
@@ -1,2 +1,2 @@
1
- export * from './utils';
2
- export { InvalidChallengeError } from './errors';
1
+ export * from "./utils";
2
+ export { InvalidChallengeError } from "./errors";
@@ -167,7 +167,7 @@ var Client = exports.Client = function () {
167
167
  _context2.n = 1;
168
168
  break;
169
169
  }
170
- throw new TypeError('options must contain rpcUrl');
170
+ throw new TypeError("options must contain rpcUrl");
171
171
  case 1:
172
172
  rpcUrl = options.rpcUrl, allowHttp = options.allowHttp;
173
173
  serverOpts = {
@@ -220,7 +220,7 @@ var Client = exports.Client = function () {
220
220
  _context4.n = 1;
221
221
  break;
222
222
  }
223
- throw new TypeError('options must contain rpcUrl and contractId');
223
+ throw new TypeError("options must contain rpcUrl and contractId");
224
224
  case 1:
225
225
  rpcUrl = options.rpcUrl, contractId = options.contractId, allowHttp = options.allowHttp;
226
226
  serverOpts = {
@@ -559,7 +559,7 @@ var Spec = exports.Spec = function () {
559
559
  }
560
560
  if (value === _stellarBase.xdr.ScSpecType.scSpecTypeOption().value) {
561
561
  var opt = ty.option();
562
- if (val === undefined) {
562
+ if (val === null || val === undefined) {
563
563
  return _stellarBase.xdr.ScVal.scvVoid();
564
564
  }
565
565
  return this.nativeToScVal(val, opt.valueType());
@@ -823,12 +823,20 @@ var Spec = exports.Spec = function () {
823
823
  var _this5 = this;
824
824
  var t = typeDef.switch();
825
825
  var value = t.value;
826
+ if (value === _stellarBase.xdr.ScSpecType.scSpecTypeOption().value) {
827
+ switch (scv.switch().value) {
828
+ case _stellarBase.xdr.ScValType.scvVoid().value:
829
+ return null;
830
+ default:
831
+ return this.scValToNative(scv, typeDef.option().valueType());
832
+ }
833
+ }
826
834
  if (value === _stellarBase.xdr.ScSpecType.scSpecTypeUdt().value) {
827
835
  return this.scValUdtToNative(scv, typeDef.udt());
828
836
  }
829
837
  switch (scv.switch().value) {
830
838
  case _stellarBase.xdr.ScValType.scvVoid().value:
831
- return undefined;
839
+ return null;
832
840
  case _stellarBase.xdr.ScValType.scvU64().value:
833
841
  case _stellarBase.xdr.ScValType.scvI64().value:
834
842
  case _stellarBase.xdr.ScValType.scvU128().value:
@@ -122,7 +122,7 @@ function _specFromWasm() {
122
122
  _context2.p = 2;
123
123
  _t3 = _context2.v;
124
124
  customData = parseWasmCustomSections(wasm);
125
- xdrSections = customData.get('contractspecv0');
125
+ xdrSections = customData.get("contractspecv0");
126
126
  case 3:
127
127
  if (!(!xdrSections || xdrSections.length === 0)) {
128
128
  _context2.n = 4;
@@ -141,13 +141,13 @@ function parseWasmCustomSections(buffer) {
141
141
  var arrayBuffer = buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
142
142
  var offset = 0;
143
143
  var read = function read(length) {
144
- if (offset + length > buffer.byteLength) throw new Error('Buffer overflow');
144
+ if (offset + length > buffer.byteLength) throw new Error("Buffer overflow");
145
145
  var bytes = new Uint8Array(arrayBuffer, offset, length);
146
146
  offset += length;
147
147
  return bytes;
148
148
  };
149
- if (_toConsumableArray(read(4)).join() !== '0,97,115,109') throw new Error('Invalid WASM magic');
150
- if (_toConsumableArray(read(4)).join() !== '1,0,0,0') throw new Error('Invalid WASM version');
149
+ if (_toConsumableArray(read(4)).join() !== "0,97,115,109") throw new Error("Invalid WASM magic");
150
+ if (_toConsumableArray(read(4)).join() !== "1,0,0,0") throw new Error("Invalid WASM version");
151
151
  while (offset < buffer.byteLength) {
152
152
  var sectionId = read(1)[0];
153
153
  var sectionLength = readVarUint32();
@@ -158,7 +158,7 @@ function parseWasmCustomSections(buffer) {
158
158
  var nameBytes = read(nameLen);
159
159
  var payload = read(sectionLength - (offset - start));
160
160
  try {
161
- var name = new TextDecoder('utf-8', {
161
+ var name = new TextDecoder("utf-8", {
162
162
  fatal: true
163
163
  }).decode(nameBytes);
164
164
  if (payload.length > 0) {
@@ -174,9 +174,9 @@ function parseWasmCustomSections(buffer) {
174
174
  shift = 0;
175
175
  while (true) {
176
176
  var byte = read(1)[0];
177
- value |= (byte & 0x7F) << shift;
177
+ value |= (byte & 0x7f) << shift;
178
178
  if ((byte & 0x80) === 0) break;
179
- if ((shift += 7) >= 32) throw new Error('Invalid WASM value');
179
+ if ((shift += 7) >= 32) throw new Error("Invalid WASM value");
180
180
  }
181
181
  return value >>> 0;
182
182
  }
@@ -17,7 +17,6 @@
17
17
  * console.log('The account is used in operation: ', err.operationIndex)
18
18
  */
19
19
  export declare class AccountRequiresMemoError extends Error {
20
- __proto__: AccountRequiresMemoError;
21
20
  accountId: string;
22
21
  operationIndex: number;
23
22
  constructor(message: string, accountId: string, operationIndex: number);
@@ -24,11 +24,7 @@ var AccountRequiresMemoError = exports.AccountRequiresMemoError = function (_Err
24
24
  function AccountRequiresMemoError(message, accountId, operationIndex) {
25
25
  var _this;
26
26
  _classCallCheck(this, AccountRequiresMemoError);
27
- var trueProto = (this instanceof AccountRequiresMemoError ? this.constructor : void 0).prototype;
28
27
  _this = _callSuper(this, AccountRequiresMemoError, [message]);
29
- _this.__proto__ = trueProto;
30
- _this.constructor = AccountRequiresMemoError;
31
- _this.name = "AccountRequiresMemoError";
32
28
  _this.accountId = accountId;
33
29
  _this.operationIndex = operationIndex;
34
30
  return _this;
@@ -10,5 +10,4 @@ import { NetworkError } from "./network";
10
10
  * @param {any} response Response details, received from the Horizon server
11
11
  */
12
12
  export declare class BadRequestError extends NetworkError {
13
- constructor(message: string, response: any);
14
13
  }
@@ -19,15 +19,9 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
19
19
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
20
20
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
21
  var BadRequestError = exports.BadRequestError = function (_NetworkError) {
22
- function BadRequestError(message, response) {
23
- var _this;
22
+ function BadRequestError() {
24
23
  _classCallCheck(this, BadRequestError);
25
- var trueProto = (this instanceof BadRequestError ? this.constructor : void 0).prototype;
26
- _this = _callSuper(this, BadRequestError, [message, response]);
27
- _this.__proto__ = trueProto;
28
- _this.constructor = BadRequestError;
29
- _this.name = "BadRequestError";
30
- return _this;
24
+ return _callSuper(this, BadRequestError, arguments);
31
25
  }
32
26
  _inherits(BadRequestError, _NetworkError);
33
27
  return _createClass(BadRequestError);
@@ -13,5 +13,4 @@ import { NetworkError } from "./network";
13
13
  * @param {any} response Response details, received from the server.
14
14
  */
15
15
  export declare class BadResponseError extends NetworkError {
16
- constructor(message: string, response: any);
17
16
  }
@@ -19,15 +19,9 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
19
19
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
20
20
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
21
  var BadResponseError = exports.BadResponseError = function (_NetworkError) {
22
- function BadResponseError(message, response) {
23
- var _this;
22
+ function BadResponseError() {
24
23
  _classCallCheck(this, BadResponseError);
25
- var trueProto = (this instanceof BadResponseError ? this.constructor : void 0).prototype;
26
- _this = _callSuper(this, BadResponseError, [message, response]);
27
- _this.__proto__ = trueProto;
28
- _this.constructor = BadResponseError;
29
- _this.name = "BadResponseError";
30
- return _this;
24
+ return _callSuper(this, BadResponseError, arguments);
31
25
  }
32
26
  _inherits(BadResponseError, _NetworkError);
33
27
  return _createClass(BadResponseError);
@@ -18,7 +18,6 @@ export declare class NetworkError extends Error {
18
18
  statusText?: string;
19
19
  url?: string;
20
20
  };
21
- __proto__: NetworkError;
22
21
  constructor(message: string, response: any);
23
22
  /**
24
23
  * Returns the error response sent by the Horizon server.
@@ -24,10 +24,7 @@ var NetworkError = exports.NetworkError = function (_Error) {
24
24
  function NetworkError(message, response) {
25
25
  var _this;
26
26
  _classCallCheck(this, NetworkError);
27
- var trueProto = (this instanceof NetworkError ? this.constructor : void 0).prototype;
28
27
  _this = _callSuper(this, NetworkError, [message]);
29
- _this.__proto__ = trueProto;
30
- _this.constructor = NetworkError;
31
28
  _this.response = response;
32
29
  return _this;
33
30
  }
@@ -10,5 +10,4 @@ import { NetworkError } from "./network";
10
10
  * @param {any} response Response details, received from the Horizon server
11
11
  */
12
12
  export declare class NotFoundError extends NetworkError {
13
- constructor(message: string, response: any);
14
13
  }
@@ -19,15 +19,9 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
19
19
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
20
20
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
21
  var NotFoundError = exports.NotFoundError = function (_NetworkError) {
22
- function NotFoundError(message, response) {
23
- var _this;
22
+ function NotFoundError() {
24
23
  _classCallCheck(this, NotFoundError);
25
- var trueProto = (this instanceof NotFoundError ? this.constructor : void 0).prototype;
26
- _this = _callSuper(this, NotFoundError, [message, response]);
27
- _this.__proto__ = trueProto;
28
- _this.constructor = NotFoundError;
29
- _this.name = "NotFoundError";
30
- return _this;
24
+ return _callSuper(this, NotFoundError, arguments);
31
25
  }
32
26
  _inherits(NotFoundError, _NetworkError);
33
27
  return _createClass(NotFoundError);
@@ -1,2 +1,2 @@
1
- export { FederationServer as Server, FEDERATION_RESPONSE_MAX_SIZE } from './server';
2
- export * from './api';
1
+ export { FederationServer as Server, FEDERATION_RESPONSE_MAX_SIZE, } from "./server";
2
+ export * from "./api";
@@ -22,7 +22,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
22
22
  var JOINABLE = ["transaction"];
23
23
  var anyGlobal = global;
24
24
  var EventSource;
25
- if (typeof true !== 'undefined' && true) {
25
+ if (typeof true !== "undefined" && true) {
26
26
  var _ref, _anyGlobal$EventSourc, _anyGlobal$window;
27
27
  EventSource = (_ref = (_anyGlobal$EventSourc = anyGlobal.EventSource) !== null && _anyGlobal$EventSourc !== void 0 ? _anyGlobal$EventSourc : (_anyGlobal$window = anyGlobal.window) === null || _anyGlobal$window === void 0 ? void 0 : _anyGlobal$window.EventSource) !== null && _ref !== void 0 ? _ref : require("eventsource");
28
28
  }
@@ -73,7 +73,6 @@ var HorizonApi;
73
73
  return OperationResponseTypeI;
74
74
  }({});
75
75
  _HorizonApi.OperationResponseTypeI = OperationResponseTypeI;
76
- ;
77
76
  var TransactionFailedResultCodes = function (TransactionFailedResultCodes) {
78
77
  TransactionFailedResultCodes["TX_FAILED"] = "tx_failed";
79
78
  TransactionFailedResultCodes["TX_BAD_SEQ"] = "tx_bad_seq";
@@ -10,7 +10,7 @@ var _urijs = _interopRequireDefault(require("urijs"));
10
10
  var _httpClient = require("../http-client");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- var version = exports.version = "14.1.1";
13
+ var version = exports.version = "14.3.0";
14
14
  var SERVER_TIME_MAP = exports.SERVER_TIME_MAP = {};
15
15
  var AxiosClient = exports.AxiosClient = (0, _httpClient.create)({
16
16
  headers: {
@@ -25,13 +25,13 @@ AxiosClient.interceptors.response.use(function (response) {
25
25
  var hostname = (0, _urijs.default)(response.config.url).hostname();
26
26
  var serverTime = 0;
27
27
  if (response.headers instanceof Headers) {
28
- var dateHeader = response.headers.get('date');
28
+ var dateHeader = response.headers.get("date");
29
29
  if (dateHeader) {
30
30
  serverTime = toSeconds(Date.parse(dateHeader));
31
31
  }
32
- } else if (_typeof(response.headers) === 'object' && 'date' in response.headers) {
32
+ } else if (_typeof(response.headers) === "object" && "date" in response.headers) {
33
33
  var headers = response.headers;
34
- if (typeof headers.date === 'string') {
34
+ if (typeof headers.date === "string") {
35
35
  serverTime = toSeconds(Date.parse(headers.date));
36
36
  }
37
37
  }
@@ -3,6 +3,6 @@ export * from "./horizon_api";
3
3
  export * from "./server_api";
4
4
  export * from "./account_response";
5
5
  export { HorizonServer as Server } from "./server";
6
- export { default as AxiosClient, SERVER_TIME_MAP, getCurrentServerTime } from "./horizon_axios_client";
6
+ export { default as AxiosClient, SERVER_TIME_MAP, getCurrentServerTime, } from "./horizon_axios_client";
7
7
  declare const _default: any;
8
8
  export default _default;
@@ -63,29 +63,29 @@ export interface BaseEffectRecord<T extends string = string> extends HorizonApi.
63
63
  type: T;
64
64
  created_at: string;
65
65
  }
66
- export interface AccountCreated extends BaseEffectRecord<'account_created'> {
66
+ export interface AccountCreated extends BaseEffectRecord<"account_created"> {
67
67
  type_i: EffectType.account_created;
68
68
  starting_balance: string;
69
69
  }
70
- export interface AccountCredited extends BaseEffectRecord<'account_credited'>, OfferAsset {
70
+ export interface AccountCredited extends BaseEffectRecord<"account_credited">, OfferAsset {
71
71
  type_i: EffectType.account_credited;
72
72
  amount: string;
73
73
  }
74
- export interface AccountDebited extends BaseEffectRecord<'account_debited'>, OfferAsset {
74
+ export interface AccountDebited extends BaseEffectRecord<"account_debited">, OfferAsset {
75
75
  type_i: EffectType.account_debited;
76
76
  amount: string;
77
77
  }
78
- export interface AccountThresholdsUpdated extends BaseEffectRecord<'account_thresholds_updated'> {
78
+ export interface AccountThresholdsUpdated extends BaseEffectRecord<"account_thresholds_updated"> {
79
79
  type_i: EffectType.account_thresholds_updated;
80
80
  low_threshold: number;
81
81
  med_threshold: number;
82
82
  high_threshold: number;
83
83
  }
84
- export interface AccountHomeDomainUpdated extends BaseEffectRecord<'account_home_domain_updated'> {
84
+ export interface AccountHomeDomainUpdated extends BaseEffectRecord<"account_home_domain_updated"> {
85
85
  type_i: EffectType.account_home_domain_updated;
86
86
  home_domain: string;
87
87
  }
88
- export interface AccountFlagsUpdated extends BaseEffectRecord<'account_flags_updated'> {
88
+ export interface AccountFlagsUpdated extends BaseEffectRecord<"account_flags_updated"> {
89
89
  type_i: EffectType.account_flags_updated;
90
90
  auth_required_flag: boolean;
91
91
  auth_revokable_flag: boolean;
@@ -94,16 +94,16 @@ interface DataEvents<T extends string> extends BaseEffectRecord<T> {
94
94
  name: boolean;
95
95
  value: boolean;
96
96
  }
97
- export interface DataCreated extends DataEvents<'data_created'> {
97
+ export interface DataCreated extends DataEvents<"data_created"> {
98
98
  type_i: EffectType.data_created;
99
99
  }
100
- export interface DataUpdated extends DataEvents<'data_updated'> {
100
+ export interface DataUpdated extends DataEvents<"data_updated"> {
101
101
  type_i: EffectType.data_updated;
102
102
  }
103
- export interface DataRemoved extends DataEvents<'data_removed'> {
103
+ export interface DataRemoved extends DataEvents<"data_removed"> {
104
104
  type_i: EffectType.data_removed;
105
105
  }
106
- export interface SequenceBumped extends BaseEffectRecord<'sequence_bumped'> {
106
+ export interface SequenceBumped extends BaseEffectRecord<"sequence_bumped"> {
107
107
  type_i: EffectType.sequence_bumped;
108
108
  new_seq: number | string;
109
109
  }
@@ -112,29 +112,29 @@ interface SignerEvents<T extends string> extends BaseEffectRecord<T> {
112
112
  key: string;
113
113
  public_key: string;
114
114
  }
115
- export interface SignerCreated extends SignerEvents<'signer_created'> {
115
+ export interface SignerCreated extends SignerEvents<"signer_created"> {
116
116
  type_i: EffectType.signer_created;
117
117
  }
118
- export interface SignerRemoved extends SignerEvents<'signer_removed'> {
118
+ export interface SignerRemoved extends SignerEvents<"signer_removed"> {
119
119
  type_i: EffectType.signer_removed;
120
120
  }
121
- export interface SignerUpdated extends SignerEvents<'signer_updated'> {
121
+ export interface SignerUpdated extends SignerEvents<"signer_updated"> {
122
122
  type_i: EffectType.signer_updated;
123
123
  }
124
124
  interface TrustlineEvents<T extends string> extends BaseEffectRecord<T>, OfferAsset {
125
125
  limit: string;
126
126
  liquidity_pool_id?: string;
127
127
  }
128
- export interface TrustlineCreated extends TrustlineEvents<'trustline_created'> {
128
+ export interface TrustlineCreated extends TrustlineEvents<"trustline_created"> {
129
129
  type_i: EffectType.trustline_created;
130
130
  }
131
- export interface TrustlineRemoved extends TrustlineEvents<'trustline_removed'> {
131
+ export interface TrustlineRemoved extends TrustlineEvents<"trustline_removed"> {
132
132
  type_i: EffectType.trustline_removed;
133
133
  }
134
- export interface TrustlineUpdated extends TrustlineEvents<'trustline_updated'> {
134
+ export interface TrustlineUpdated extends TrustlineEvents<"trustline_updated"> {
135
135
  type_i: EffectType.trustline_updated;
136
136
  }
137
- export interface TrustlineAuthorized extends BaseEffectRecord<'trustline_authorized'> {
137
+ export interface TrustlineAuthorized extends BaseEffectRecord<"trustline_authorized"> {
138
138
  type_i: EffectType.trustline_authorized;
139
139
  asset_type: OfferAsset["asset_type"];
140
140
  asset_code: OfferAsset["asset_code"];
@@ -146,7 +146,7 @@ export interface TrustlineDeauthorized extends Omit<TrustlineAuthorized, "type_i
146
146
  export interface TrustlineAuthorizedToMaintainLiabilities extends Omit<TrustlineAuthorized, "type_i"> {
147
147
  type_i: EffectType.trustline_authorized_to_maintain_liabilities;
148
148
  }
149
- export interface ClaimableBalanceCreated extends BaseEffectRecord<'claimable_balance_created'> {
149
+ export interface ClaimableBalanceCreated extends BaseEffectRecord<"claimable_balance_created"> {
150
150
  type_i: EffectType.claimable_balance_created;
151
151
  amount: string;
152
152
  balance_type_i: string;
@@ -165,62 +165,62 @@ interface SponsorshipFields {
165
165
  }
166
166
  interface AccountSponsorshipEvents<T extends string> extends BaseEffectRecord<T>, SponsorshipFields {
167
167
  }
168
- export type AccountSponsorshipCreated = Omit<AccountSponsorshipEvents<'account_sponsorship_created'>, "new_sponsor" | "former_sponsor"> & {
168
+ export type AccountSponsorshipCreated = Omit<AccountSponsorshipEvents<"account_sponsorship_created">, "new_sponsor" | "former_sponsor"> & {
169
169
  type_i: EffectType.account_sponsorship_created;
170
170
  };
171
- export type AccountSponsorshipUpdated = Omit<AccountSponsorshipEvents<'account_sponsorship_updated'>, "sponsor"> & {
171
+ export type AccountSponsorshipUpdated = Omit<AccountSponsorshipEvents<"account_sponsorship_updated">, "sponsor"> & {
172
172
  type_i: EffectType.account_sponsorship_updated;
173
173
  };
174
- export type AccountSponsorshipRemoved = Omit<AccountSponsorshipEvents<'account_sponsorship_removed'>, "new_sponsor" | "sponsor"> & {
174
+ export type AccountSponsorshipRemoved = Omit<AccountSponsorshipEvents<"account_sponsorship_removed">, "new_sponsor" | "sponsor"> & {
175
175
  type_i: EffectType.account_sponsorship_removed;
176
176
  };
177
177
  interface TrustlineSponsorshipEvents<T extends string> extends BaseEffectRecord<T>, SponsorshipFields {
178
178
  asset?: string;
179
179
  liquidity_pool_id?: string;
180
180
  }
181
- export type TrustlineSponsorshipCreated = Omit<TrustlineSponsorshipEvents<'trustline_sponsorship_created'>, "new_sponsor" | "former_sponsor"> & {
181
+ export type TrustlineSponsorshipCreated = Omit<TrustlineSponsorshipEvents<"trustline_sponsorship_created">, "new_sponsor" | "former_sponsor"> & {
182
182
  type_i: EffectType.trustline_sponsorship_created;
183
183
  };
184
- export type TrustlineSponsorshipUpdated = Omit<TrustlineSponsorshipEvents<'trustline_sponsorship_updated'>, "sponsor"> & {
184
+ export type TrustlineSponsorshipUpdated = Omit<TrustlineSponsorshipEvents<"trustline_sponsorship_updated">, "sponsor"> & {
185
185
  type_i: EffectType.trustline_sponsorship_updated;
186
186
  };
187
- export type TrustlineSponsorshipRemoved = Omit<TrustlineSponsorshipEvents<'trustline_sponsorship_removed'>, "new_sponsor" | "sponsor"> & {
187
+ export type TrustlineSponsorshipRemoved = Omit<TrustlineSponsorshipEvents<"trustline_sponsorship_removed">, "new_sponsor" | "sponsor"> & {
188
188
  type_i: EffectType.trustline_sponsorship_removed;
189
189
  };
190
190
  interface DataSponsorshipEvents<T extends string> extends BaseEffectRecord<T>, SponsorshipFields {
191
191
  data_name: string;
192
192
  }
193
- export type DateSponsorshipCreated = Omit<DataSponsorshipEvents<'data_sponsorship_created'>, "new_sponsor" | "former_sponsor"> & {
193
+ export type DateSponsorshipCreated = Omit<DataSponsorshipEvents<"data_sponsorship_created">, "new_sponsor" | "former_sponsor"> & {
194
194
  type_i: EffectType.data_sponsorship_created;
195
195
  };
196
- export type DateSponsorshipUpdated = Omit<DataSponsorshipEvents<'data_sponsorship_updated'>, "sponsor"> & {
196
+ export type DateSponsorshipUpdated = Omit<DataSponsorshipEvents<"data_sponsorship_updated">, "sponsor"> & {
197
197
  type_i: EffectType.data_sponsorship_updated;
198
198
  };
199
- export type DateSponsorshipRemoved = Omit<DataSponsorshipEvents<'data_sponsorship_removed'>, "new_sponsor" | "sponsor"> & {
199
+ export type DateSponsorshipRemoved = Omit<DataSponsorshipEvents<"data_sponsorship_removed">, "new_sponsor" | "sponsor"> & {
200
200
  type_i: EffectType.data_sponsorship_removed;
201
201
  };
202
202
  interface ClaimableBalanceSponsorshipEvents<T extends string> extends BaseEffectRecord<T>, SponsorshipFields {
203
203
  balance_type_i: string;
204
204
  }
205
- export type ClaimableBalanceSponsorshipCreated = Omit<ClaimableBalanceSponsorshipEvents<'claimable_balance_sponsorship_created'>, "new_sponsor" | "former_sponsor"> & {
205
+ export type ClaimableBalanceSponsorshipCreated = Omit<ClaimableBalanceSponsorshipEvents<"claimable_balance_sponsorship_created">, "new_sponsor" | "former_sponsor"> & {
206
206
  type_i: EffectType.claimable_balance_sponsorship_created;
207
207
  };
208
- export type ClaimableBalanceSponsorshipUpdated = Omit<ClaimableBalanceSponsorshipEvents<'claimable_balance_sponsorship_updated'>, "sponsor"> & {
208
+ export type ClaimableBalanceSponsorshipUpdated = Omit<ClaimableBalanceSponsorshipEvents<"claimable_balance_sponsorship_updated">, "sponsor"> & {
209
209
  type_i: EffectType.claimable_balance_sponsorship_updated;
210
210
  };
211
- export type ClaimableBalanceSponsorshipRemoved = Omit<ClaimableBalanceSponsorshipEvents<'claimable_balance_sponsorship_removed'>, "new_sponsor" | "sponsor"> & {
211
+ export type ClaimableBalanceSponsorshipRemoved = Omit<ClaimableBalanceSponsorshipEvents<"claimable_balance_sponsorship_removed">, "new_sponsor" | "sponsor"> & {
212
212
  type_i: EffectType.claimable_balance_sponsorship_removed;
213
213
  };
214
214
  interface SignerSponsorshipEvents<T extends string> extends BaseEffectRecord<T>, SponsorshipFields {
215
215
  signer: string;
216
216
  }
217
- export type SignerSponsorshipCreated = Omit<SignerSponsorshipEvents<'signer_sponsorship_created'>, "new_sponsor" | "former_sponsor"> & {
217
+ export type SignerSponsorshipCreated = Omit<SignerSponsorshipEvents<"signer_sponsorship_created">, "new_sponsor" | "former_sponsor"> & {
218
218
  type_i: EffectType.signer_sponsorship_created;
219
219
  };
220
- export type SignerSponsorshipUpdated = Omit<SignerSponsorshipEvents<'signer_sponsorship_updated'>, "sponsor"> & {
220
+ export type SignerSponsorshipUpdated = Omit<SignerSponsorshipEvents<"signer_sponsorship_updated">, "sponsor"> & {
221
221
  type_i: EffectType.signer_sponsorship_updated;
222
222
  };
223
- export type SignerSponsorshipRemoved = Omit<SignerSponsorshipEvents<'signer_sponsorship_removed'>, "new_sponsor" | "sponsor"> & {
223
+ export type SignerSponsorshipRemoved = Omit<SignerSponsorshipEvents<"signer_sponsorship_removed">, "new_sponsor" | "sponsor"> & {
224
224
  type_i: EffectType.signer_sponsorship_removed;
225
225
  };
226
226
  export interface ClaimableBalanceClawedBack extends HorizonApi.BaseResponse {
@@ -234,33 +234,33 @@ export interface LiquidityPoolEffectRecord extends HorizonApi.BaseResponse {
234
234
  total_shares: string;
235
235
  reserves: HorizonApi.Reserve[];
236
236
  }
237
- export interface LiquidityPoolDeposited extends BaseEffectRecord<'liquidity_pool_deposited'> {
237
+ export interface LiquidityPoolDeposited extends BaseEffectRecord<"liquidity_pool_deposited"> {
238
238
  type_i: EffectType.liquidity_pool_deposited;
239
239
  liquidity_pool: LiquidityPoolEffectRecord;
240
240
  reserves_deposited: HorizonApi.Reserve[];
241
241
  shares_received: string;
242
242
  }
243
- export interface LiquidityPoolWithdrew extends BaseEffectRecord<'liquidity_pool_withdrew'> {
243
+ export interface LiquidityPoolWithdrew extends BaseEffectRecord<"liquidity_pool_withdrew"> {
244
244
  type_i: EffectType.liquidity_pool_withdrew;
245
245
  liquidity_pool: LiquidityPoolEffectRecord;
246
246
  reserves_received: HorizonApi.Reserve[];
247
247
  shares_redeemed: string;
248
248
  }
249
- export interface LiquidityPoolTrade extends BaseEffectRecord<'liquidity_pool_trade'> {
249
+ export interface LiquidityPoolTrade extends BaseEffectRecord<"liquidity_pool_trade"> {
250
250
  type_i: EffectType.liquidity_pool_trade;
251
251
  liquidity_pool: LiquidityPoolEffectRecord;
252
252
  sold: HorizonApi.Reserve;
253
253
  bought: HorizonApi.Reserve;
254
254
  }
255
- export interface LiquidityPoolCreated extends BaseEffectRecord<'liquidity_pool_created'> {
255
+ export interface LiquidityPoolCreated extends BaseEffectRecord<"liquidity_pool_created"> {
256
256
  type_i: EffectType.liquidity_pool_created;
257
257
  liquidity_pool: LiquidityPoolEffectRecord;
258
258
  }
259
- export interface LiquidityPoolRemoved extends BaseEffectRecord<'liquidity_pool_removed'> {
259
+ export interface LiquidityPoolRemoved extends BaseEffectRecord<"liquidity_pool_removed"> {
260
260
  type_i: EffectType.liquidity_pool_removed;
261
261
  liquidity_pool_id: string;
262
262
  }
263
- export interface LiquidityPoolRevoked extends BaseEffectRecord<'liquidity_pool_revoked'> {
263
+ export interface LiquidityPoolRevoked extends BaseEffectRecord<"liquidity_pool_revoked"> {
264
264
  type_i: EffectType.liquidity_pool_revoked;
265
265
  liquidity_pool: LiquidityPoolEffectRecord;
266
266
  reserves_revoked: [
@@ -272,12 +272,12 @@ export interface LiquidityPoolRevoked extends BaseEffectRecord<'liquidity_pool_r
272
272
  ];
273
273
  shares_revoked: string;
274
274
  }
275
- export interface ContractCredited extends BaseEffectRecord<'contract_credited'>, OfferAsset {
275
+ export interface ContractCredited extends BaseEffectRecord<"contract_credited">, OfferAsset {
276
276
  type_i: EffectType.contract_credited;
277
277
  contract: string;
278
278
  amount: string;
279
279
  }
280
- export interface ContractDebited extends BaseEffectRecord<'contract_debited'>, OfferAsset {
280
+ export interface ContractDebited extends BaseEffectRecord<"contract_debited">, OfferAsset {
281
281
  type_i: EffectType.contract_debited;
282
282
  contract: string;
283
283
  amount: string;
@@ -1,5 +1,5 @@
1
1
  import { BaseEffectRecord, EffectType } from "./effects";
2
- export interface Trade extends BaseEffectRecord<'trade'> {
2
+ export interface Trade extends BaseEffectRecord<"trade"> {
3
3
  type_i: EffectType.trade;
4
4
  seller: string;
5
5
  offer_id: number | string;
@@ -1,5 +1,5 @@
1
- import { AxiosRequestConfig, AxiosResponse } from 'feaxios';
2
- import { CancelToken, HttpClient, HttpClientRequestConfig, HttpClientResponse } from './types';
1
+ import { AxiosRequestConfig, AxiosResponse } from "feaxios";
2
+ import { CancelToken, HttpClient, HttpClientRequestConfig, HttpClientResponse } from "./types";
3
3
  export interface HttpResponse<T = any> extends AxiosResponse<T> {
4
4
  }
5
5
  export interface FetchClientConfig<T = any> extends AxiosRequestConfig {