@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.
- package/CHANGELOG.md +23 -0
- package/README.md +14 -20
- package/dist/stellar-sdk-minimal.js +532 -375
- package/dist/stellar-sdk-minimal.min.js +1 -1
- package/dist/stellar-sdk-no-axios.js +532 -375
- package/dist/stellar-sdk-no-axios.min.js +1 -1
- package/dist/stellar-sdk-no-eventsource.js +781 -551
- package/dist/stellar-sdk-no-eventsource.min.js +1 -1
- package/dist/stellar-sdk.js +781 -551
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/contract/client.js +2 -2
- package/lib/contract/spec.js +10 -2
- package/lib/contract/utils.js +7 -7
- package/lib/errors/account_requires_memo.d.ts +0 -1
- package/lib/errors/account_requires_memo.js +0 -4
- package/lib/errors/bad_request.d.ts +0 -1
- package/lib/errors/bad_request.js +2 -8
- package/lib/errors/bad_response.d.ts +0 -1
- package/lib/errors/bad_response.js +2 -8
- package/lib/errors/network.d.ts +0 -1
- package/lib/errors/network.js +0 -3
- package/lib/errors/not_found.d.ts +0 -1
- package/lib/errors/not_found.js +2 -8
- package/lib/federation/index.d.ts +2 -2
- package/lib/horizon/call_builder.js +1 -1
- package/lib/horizon/horizon_api.js +0 -1
- package/lib/horizon/horizon_axios_client.js +4 -4
- package/lib/horizon/index.d.ts +1 -1
- package/lib/horizon/types/effects.d.ts +41 -41
- package/lib/horizon/types/trade.d.ts +1 -1
- package/lib/http-client/fetch-client.d.ts +2 -2
- package/lib/http-client/fetch-client.js +16 -16
- package/lib/http-client/index.js +2 -2
- package/lib/http-client/types.d.ts +2 -2
- package/lib/index.d.ts +11 -11
- package/lib/index.js +2 -2
- package/lib/minimal/contract/client.js +2 -2
- package/lib/minimal/contract/spec.js +10 -2
- package/lib/minimal/contract/utils.js +7 -7
- package/lib/minimal/errors/account_requires_memo.d.ts +0 -1
- package/lib/minimal/errors/account_requires_memo.js +0 -4
- package/lib/minimal/errors/bad_request.d.ts +0 -1
- package/lib/minimal/errors/bad_request.js +2 -8
- package/lib/minimal/errors/bad_response.d.ts +0 -1
- package/lib/minimal/errors/bad_response.js +2 -8
- package/lib/minimal/errors/network.d.ts +0 -1
- package/lib/minimal/errors/network.js +0 -3
- package/lib/minimal/errors/not_found.d.ts +0 -1
- package/lib/minimal/errors/not_found.js +2 -8
- package/lib/minimal/federation/index.d.ts +2 -2
- package/lib/minimal/horizon/call_builder.js +1 -1
- package/lib/minimal/horizon/horizon_api.js +0 -1
- package/lib/minimal/horizon/horizon_axios_client.js +4 -4
- package/lib/minimal/horizon/index.d.ts +1 -1
- package/lib/minimal/horizon/types/effects.d.ts +41 -41
- package/lib/minimal/horizon/types/trade.d.ts +1 -1
- package/lib/minimal/http-client/fetch-client.d.ts +2 -2
- package/lib/minimal/http-client/fetch-client.js +16 -16
- package/lib/minimal/http-client/index.js +2 -2
- package/lib/minimal/http-client/types.d.ts +2 -2
- package/lib/minimal/index.d.ts +11 -11
- package/lib/minimal/index.js +2 -2
- package/lib/minimal/rpc/api.d.ts +148 -8
- package/lib/minimal/rpc/api.js +3 -3
- package/lib/minimal/rpc/axios.js +3 -3
- package/lib/minimal/rpc/browser.d.ts +2 -2
- package/lib/minimal/rpc/index.d.ts +1 -1
- package/lib/minimal/rpc/parsers.d.ts +3 -2
- package/lib/minimal/rpc/parsers.js +42 -19
- package/lib/minimal/rpc/server.d.ts +123 -31
- package/lib/minimal/rpc/server.js +425 -267
- package/lib/minimal/rpc/transaction.d.ts +2 -2
- package/lib/minimal/rpc/transaction.js +6 -6
- package/lib/minimal/webauth/errors.d.ts +0 -2
- package/lib/minimal/webauth/errors.js +2 -8
- package/lib/minimal/webauth/index.d.ts +2 -2
- package/lib/no-axios/contract/client.js +2 -2
- package/lib/no-axios/contract/spec.js +10 -2
- package/lib/no-axios/contract/utils.js +7 -7
- package/lib/no-axios/errors/account_requires_memo.d.ts +0 -1
- package/lib/no-axios/errors/account_requires_memo.js +0 -4
- package/lib/no-axios/errors/bad_request.d.ts +0 -1
- package/lib/no-axios/errors/bad_request.js +2 -8
- package/lib/no-axios/errors/bad_response.d.ts +0 -1
- package/lib/no-axios/errors/bad_response.js +2 -8
- package/lib/no-axios/errors/network.d.ts +0 -1
- package/lib/no-axios/errors/network.js +0 -3
- package/lib/no-axios/errors/not_found.d.ts +0 -1
- package/lib/no-axios/errors/not_found.js +2 -8
- package/lib/no-axios/federation/index.d.ts +2 -2
- package/lib/no-axios/horizon/call_builder.js +1 -1
- package/lib/no-axios/horizon/horizon_api.js +0 -1
- package/lib/no-axios/horizon/horizon_axios_client.js +4 -4
- package/lib/no-axios/horizon/index.d.ts +1 -1
- package/lib/no-axios/horizon/types/effects.d.ts +41 -41
- package/lib/no-axios/horizon/types/trade.d.ts +1 -1
- package/lib/no-axios/http-client/fetch-client.d.ts +2 -2
- package/lib/no-axios/http-client/fetch-client.js +16 -16
- package/lib/no-axios/http-client/index.js +2 -2
- package/lib/no-axios/http-client/types.d.ts +2 -2
- package/lib/no-axios/index.d.ts +11 -11
- package/lib/no-axios/index.js +2 -2
- package/lib/no-axios/rpc/api.d.ts +148 -8
- package/lib/no-axios/rpc/api.js +3 -3
- package/lib/no-axios/rpc/axios.js +3 -3
- package/lib/no-axios/rpc/browser.d.ts +2 -2
- package/lib/no-axios/rpc/index.d.ts +1 -1
- package/lib/no-axios/rpc/parsers.d.ts +3 -2
- package/lib/no-axios/rpc/parsers.js +42 -19
- package/lib/no-axios/rpc/server.d.ts +123 -31
- package/lib/no-axios/rpc/server.js +425 -267
- package/lib/no-axios/rpc/transaction.d.ts +2 -2
- package/lib/no-axios/rpc/transaction.js +6 -6
- package/lib/no-axios/webauth/errors.d.ts +0 -2
- package/lib/no-axios/webauth/errors.js +2 -8
- package/lib/no-axios/webauth/index.d.ts +2 -2
- package/lib/no-eventsource/contract/client.js +2 -2
- package/lib/no-eventsource/contract/spec.js +10 -2
- package/lib/no-eventsource/contract/utils.js +7 -7
- package/lib/no-eventsource/errors/account_requires_memo.d.ts +0 -1
- package/lib/no-eventsource/errors/account_requires_memo.js +0 -4
- package/lib/no-eventsource/errors/bad_request.d.ts +0 -1
- package/lib/no-eventsource/errors/bad_request.js +2 -8
- package/lib/no-eventsource/errors/bad_response.d.ts +0 -1
- package/lib/no-eventsource/errors/bad_response.js +2 -8
- package/lib/no-eventsource/errors/network.d.ts +0 -1
- package/lib/no-eventsource/errors/network.js +0 -3
- package/lib/no-eventsource/errors/not_found.d.ts +0 -1
- package/lib/no-eventsource/errors/not_found.js +2 -8
- package/lib/no-eventsource/federation/index.d.ts +2 -2
- package/lib/no-eventsource/horizon/call_builder.js +1 -1
- package/lib/no-eventsource/horizon/horizon_api.js +0 -1
- package/lib/no-eventsource/horizon/horizon_axios_client.js +4 -4
- package/lib/no-eventsource/horizon/index.d.ts +1 -1
- package/lib/no-eventsource/horizon/types/effects.d.ts +41 -41
- package/lib/no-eventsource/horizon/types/trade.d.ts +1 -1
- package/lib/no-eventsource/http-client/fetch-client.d.ts +2 -2
- package/lib/no-eventsource/http-client/fetch-client.js +16 -16
- package/lib/no-eventsource/http-client/index.js +2 -2
- package/lib/no-eventsource/http-client/types.d.ts +2 -2
- package/lib/no-eventsource/index.d.ts +11 -11
- package/lib/no-eventsource/index.js +2 -2
- package/lib/no-eventsource/rpc/api.d.ts +148 -8
- package/lib/no-eventsource/rpc/api.js +3 -3
- package/lib/no-eventsource/rpc/axios.js +3 -3
- package/lib/no-eventsource/rpc/browser.d.ts +2 -2
- package/lib/no-eventsource/rpc/index.d.ts +1 -1
- package/lib/no-eventsource/rpc/parsers.d.ts +3 -2
- package/lib/no-eventsource/rpc/parsers.js +42 -19
- package/lib/no-eventsource/rpc/server.d.ts +123 -31
- package/lib/no-eventsource/rpc/server.js +425 -267
- package/lib/no-eventsource/rpc/transaction.d.ts +2 -2
- package/lib/no-eventsource/rpc/transaction.js +6 -6
- package/lib/no-eventsource/webauth/errors.d.ts +0 -2
- package/lib/no-eventsource/webauth/errors.js +2 -8
- package/lib/no-eventsource/webauth/index.d.ts +2 -2
- package/lib/rpc/api.d.ts +148 -8
- package/lib/rpc/api.js +3 -3
- package/lib/rpc/axios.js +3 -3
- package/lib/rpc/browser.d.ts +2 -2
- package/lib/rpc/index.d.ts +1 -1
- package/lib/rpc/parsers.d.ts +3 -2
- package/lib/rpc/parsers.js +42 -19
- package/lib/rpc/server.d.ts +123 -31
- package/lib/rpc/server.js +425 -267
- package/lib/rpc/transaction.d.ts +2 -2
- package/lib/rpc/transaction.js +6 -6
- package/lib/webauth/errors.d.ts +0 -2
- package/lib/webauth/errors.js +2 -8
- package/lib/webauth/index.d.ts +2 -2
- package/package.json +17 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FeeBumpTransaction, Transaction, TransactionBuilder } from
|
|
2
|
-
import { Api } from
|
|
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
|
|
16
|
-
case
|
|
17
|
-
case
|
|
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 (
|
|
24
|
+
if ("innerTransaction" in raw) {
|
|
25
25
|
return assembleTransaction(raw.innerTransaction, simulation);
|
|
26
26
|
}
|
|
27
27
|
if (!isSorobanTransaction(raw)) {
|
|
28
|
-
throw new TypeError(
|
|
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 ===
|
|
41
|
+
if (raw.operations[0].type === "invokeHostFunction") {
|
|
42
42
|
var _invokeOp$auth;
|
|
43
43
|
txnBuilder.clearOperations();
|
|
44
44
|
var invokeOp = raw.operations[0];
|
|
@@ -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(
|
|
25
|
-
var _this;
|
|
24
|
+
function InvalidChallengeError() {
|
|
26
25
|
_classCallCheck(this, InvalidChallengeError);
|
|
27
|
-
|
|
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
|
|
2
|
-
export { InvalidChallengeError } from
|
|
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(
|
|
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(
|
|
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
|
|
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(
|
|
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(
|
|
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() !==
|
|
150
|
-
if (_toConsumableArray(read(4)).join() !==
|
|
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(
|
|
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 &
|
|
177
|
+
value |= (byte & 0x7f) << shift;
|
|
178
178
|
if ((byte & 0x80) === 0) break;
|
|
179
|
-
if ((shift += 7) >= 32) throw new Error(
|
|
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;
|
|
@@ -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(
|
|
23
|
-
var _this;
|
|
22
|
+
function BadRequestError() {
|
|
24
23
|
_classCallCheck(this, BadRequestError);
|
|
25
|
-
|
|
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);
|
|
@@ -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(
|
|
23
|
-
var _this;
|
|
22
|
+
function BadResponseError() {
|
|
24
23
|
_classCallCheck(this, BadResponseError);
|
|
25
|
-
|
|
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);
|
|
@@ -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
|
}
|
|
@@ -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(
|
|
23
|
-
var _this;
|
|
22
|
+
function NotFoundError() {
|
|
24
23
|
_classCallCheck(this, NotFoundError);
|
|
25
|
-
|
|
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
|
|
2
|
-
export * from
|
|
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 !==
|
|
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.
|
|
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(
|
|
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) ===
|
|
32
|
+
} else if (_typeof(response.headers) === "object" && "date" in response.headers) {
|
|
33
33
|
var headers = response.headers;
|
|
34
|
-
if (typeof headers.date ===
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
97
|
+
export interface DataCreated extends DataEvents<"data_created"> {
|
|
98
98
|
type_i: EffectType.data_created;
|
|
99
99
|
}
|
|
100
|
-
export interface DataUpdated extends DataEvents<
|
|
100
|
+
export interface DataUpdated extends DataEvents<"data_updated"> {
|
|
101
101
|
type_i: EffectType.data_updated;
|
|
102
102
|
}
|
|
103
|
-
export interface DataRemoved extends DataEvents<
|
|
103
|
+
export interface DataRemoved extends DataEvents<"data_removed"> {
|
|
104
104
|
type_i: EffectType.data_removed;
|
|
105
105
|
}
|
|
106
|
-
export interface SequenceBumped extends BaseEffectRecord<
|
|
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<
|
|
115
|
+
export interface SignerCreated extends SignerEvents<"signer_created"> {
|
|
116
116
|
type_i: EffectType.signer_created;
|
|
117
117
|
}
|
|
118
|
-
export interface SignerRemoved extends SignerEvents<
|
|
118
|
+
export interface SignerRemoved extends SignerEvents<"signer_removed"> {
|
|
119
119
|
type_i: EffectType.signer_removed;
|
|
120
120
|
}
|
|
121
|
-
export interface SignerUpdated extends SignerEvents<
|
|
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<
|
|
128
|
+
export interface TrustlineCreated extends TrustlineEvents<"trustline_created"> {
|
|
129
129
|
type_i: EffectType.trustline_created;
|
|
130
130
|
}
|
|
131
|
-
export interface TrustlineRemoved extends TrustlineEvents<
|
|
131
|
+
export interface TrustlineRemoved extends TrustlineEvents<"trustline_removed"> {
|
|
132
132
|
type_i: EffectType.trustline_removed;
|
|
133
133
|
}
|
|
134
|
-
export interface TrustlineUpdated extends TrustlineEvents<
|
|
134
|
+
export interface TrustlineUpdated extends TrustlineEvents<"trustline_updated"> {
|
|
135
135
|
type_i: EffectType.trustline_updated;
|
|
136
136
|
}
|
|
137
|
-
export interface TrustlineAuthorized extends BaseEffectRecord<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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
|
-
import { AxiosRequestConfig, AxiosResponse } from
|
|
2
|
-
import { CancelToken, HttpClient, HttpClientRequestConfig, HttpClientResponse } from
|
|
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 {
|