@stellar/stellar-sdk 14.2.0 → 14.3.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.
- package/CHANGELOG.md +21 -0
- package/dist/stellar-sdk-minimal.js +273 -210
- package/dist/stellar-sdk-minimal.min.js +1 -1
- package/dist/stellar-sdk-no-axios.js +273 -210
- package/dist/stellar-sdk-no-axios.min.js +1 -1
- package/dist/stellar-sdk-no-eventsource.js +273 -210
- package/dist/stellar-sdk-no-eventsource.min.js +1 -1
- package/dist/stellar-sdk.js +273 -210
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/contract/assembled_transaction.js +9 -4
- package/lib/contract/client.d.ts +1 -1
- package/lib/contract/client.js +25 -14
- package/lib/contract/sent_transaction.js +9 -4
- package/lib/contract/spec.js +10 -2
- package/lib/contract/types.d.ts +9 -1
- 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/horizon/account_call_builder.d.ts +2 -1
- package/lib/horizon/account_call_builder.js +3 -3
- package/lib/horizon/assets_call_builder.d.ts +2 -1
- package/lib/horizon/assets_call_builder.js +2 -2
- package/lib/horizon/call_builder.d.ts +3 -1
- package/lib/horizon/call_builder.js +4 -3
- package/lib/horizon/claimable_balances_call_builder.d.ts +2 -1
- package/lib/horizon/claimable_balances_call_builder.js +3 -3
- package/lib/horizon/effect_call_builder.d.ts +2 -1
- package/lib/horizon/effect_call_builder.js +2 -2
- package/lib/horizon/friendbot_builder.d.ts +2 -1
- package/lib/horizon/friendbot_builder.js +2 -2
- package/lib/horizon/horizon_axios_client.d.ts +2 -2
- package/lib/horizon/horizon_axios_client.js +38 -30
- package/lib/horizon/index.d.ts +1 -1
- package/lib/horizon/index.js +1 -10
- package/lib/horizon/ledger_call_builder.d.ts +2 -1
- package/lib/horizon/ledger_call_builder.js +2 -2
- package/lib/horizon/liquidity_pool_call_builder.d.ts +2 -1
- package/lib/horizon/liquidity_pool_call_builder.js +3 -3
- package/lib/horizon/offer_call_builder.d.ts +2 -1
- package/lib/horizon/offer_call_builder.js +3 -3
- package/lib/horizon/operation_call_builder.d.ts +2 -1
- package/lib/horizon/operation_call_builder.js +3 -3
- package/lib/horizon/orderbook_call_builder.d.ts +2 -1
- package/lib/horizon/orderbook_call_builder.js +2 -2
- package/lib/horizon/path_call_builder.d.ts +2 -1
- package/lib/horizon/path_call_builder.js +2 -2
- package/lib/horizon/payment_call_builder.d.ts +2 -1
- package/lib/horizon/payment_call_builder.js +2 -2
- package/lib/horizon/server.d.ts +25 -10
- package/lib/horizon/server.js +23 -30
- package/lib/horizon/strict_receive_path_call_builder.d.ts +2 -1
- package/lib/horizon/strict_receive_path_call_builder.js +2 -2
- package/lib/horizon/strict_send_path_call_builder.d.ts +2 -1
- package/lib/horizon/strict_send_path_call_builder.js +2 -2
- package/lib/horizon/trade_aggregation_call_builder.d.ts +2 -1
- package/lib/horizon/trade_aggregation_call_builder.js +2 -2
- package/lib/horizon/trades_call_builder.d.ts +2 -1
- package/lib/horizon/trades_call_builder.js +2 -2
- package/lib/horizon/transaction_call_builder.d.ts +2 -1
- package/lib/horizon/transaction_call_builder.js +3 -3
- package/lib/minimal/contract/assembled_transaction.js +9 -4
- package/lib/minimal/contract/client.d.ts +1 -1
- package/lib/minimal/contract/client.js +25 -14
- package/lib/minimal/contract/sent_transaction.js +9 -4
- package/lib/minimal/contract/spec.js +10 -2
- package/lib/minimal/contract/types.d.ts +9 -1
- 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/horizon/account_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/account_call_builder.js +3 -3
- package/lib/minimal/horizon/assets_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/assets_call_builder.js +2 -2
- package/lib/minimal/horizon/call_builder.d.ts +3 -1
- package/lib/minimal/horizon/call_builder.js +4 -3
- package/lib/minimal/horizon/claimable_balances_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/claimable_balances_call_builder.js +3 -3
- package/lib/minimal/horizon/effect_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/effect_call_builder.js +2 -2
- package/lib/minimal/horizon/friendbot_builder.d.ts +2 -1
- package/lib/minimal/horizon/friendbot_builder.js +2 -2
- package/lib/minimal/horizon/horizon_axios_client.d.ts +2 -2
- package/lib/minimal/horizon/horizon_axios_client.js +38 -30
- package/lib/minimal/horizon/index.d.ts +1 -1
- package/lib/minimal/horizon/index.js +1 -10
- package/lib/minimal/horizon/ledger_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/ledger_call_builder.js +2 -2
- package/lib/minimal/horizon/liquidity_pool_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/liquidity_pool_call_builder.js +3 -3
- package/lib/minimal/horizon/offer_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/offer_call_builder.js +3 -3
- package/lib/minimal/horizon/operation_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/operation_call_builder.js +3 -3
- package/lib/minimal/horizon/orderbook_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/orderbook_call_builder.js +2 -2
- package/lib/minimal/horizon/path_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/path_call_builder.js +2 -2
- package/lib/minimal/horizon/payment_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/payment_call_builder.js +2 -2
- package/lib/minimal/horizon/server.d.ts +25 -10
- package/lib/minimal/horizon/server.js +23 -30
- package/lib/minimal/horizon/strict_receive_path_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/strict_receive_path_call_builder.js +2 -2
- package/lib/minimal/horizon/strict_send_path_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/strict_send_path_call_builder.js +2 -2
- package/lib/minimal/horizon/trade_aggregation_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/trade_aggregation_call_builder.js +2 -2
- package/lib/minimal/horizon/trades_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/trades_call_builder.js +2 -2
- package/lib/minimal/horizon/transaction_call_builder.d.ts +2 -1
- package/lib/minimal/horizon/transaction_call_builder.js +3 -3
- package/lib/minimal/rpc/api.d.ts +132 -0
- package/lib/minimal/rpc/axios.d.ts +1 -2
- package/lib/minimal/rpc/axios.js +17 -9
- package/lib/minimal/rpc/index.d.ts +0 -1
- package/lib/minimal/rpc/index.js +0 -9
- package/lib/minimal/rpc/jsonrpc.d.ts +2 -1
- package/lib/minimal/rpc/jsonrpc.js +4 -6
- package/lib/minimal/rpc/parsers.d.ts +1 -0
- package/lib/minimal/rpc/parsers.js +23 -0
- package/lib/minimal/rpc/server.d.ts +82 -20
- package/lib/minimal/rpc/server.js +56 -19
- package/lib/minimal/webauth/errors.d.ts +0 -2
- package/lib/minimal/webauth/errors.js +2 -8
- package/lib/no-axios/contract/assembled_transaction.js +9 -4
- package/lib/no-axios/contract/client.d.ts +1 -1
- package/lib/no-axios/contract/client.js +25 -14
- package/lib/no-axios/contract/sent_transaction.js +9 -4
- package/lib/no-axios/contract/spec.js +10 -2
- package/lib/no-axios/contract/types.d.ts +9 -1
- 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/horizon/account_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/account_call_builder.js +3 -3
- package/lib/no-axios/horizon/assets_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/assets_call_builder.js +2 -2
- package/lib/no-axios/horizon/call_builder.d.ts +3 -1
- package/lib/no-axios/horizon/call_builder.js +4 -3
- package/lib/no-axios/horizon/claimable_balances_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/claimable_balances_call_builder.js +3 -3
- package/lib/no-axios/horizon/effect_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/effect_call_builder.js +2 -2
- package/lib/no-axios/horizon/friendbot_builder.d.ts +2 -1
- package/lib/no-axios/horizon/friendbot_builder.js +2 -2
- package/lib/no-axios/horizon/horizon_axios_client.d.ts +2 -2
- package/lib/no-axios/horizon/horizon_axios_client.js +38 -30
- package/lib/no-axios/horizon/index.d.ts +1 -1
- package/lib/no-axios/horizon/index.js +1 -10
- package/lib/no-axios/horizon/ledger_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/ledger_call_builder.js +2 -2
- package/lib/no-axios/horizon/liquidity_pool_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/liquidity_pool_call_builder.js +3 -3
- package/lib/no-axios/horizon/offer_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/offer_call_builder.js +3 -3
- package/lib/no-axios/horizon/operation_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/operation_call_builder.js +3 -3
- package/lib/no-axios/horizon/orderbook_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/orderbook_call_builder.js +2 -2
- package/lib/no-axios/horizon/path_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/path_call_builder.js +2 -2
- package/lib/no-axios/horizon/payment_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/payment_call_builder.js +2 -2
- package/lib/no-axios/horizon/server.d.ts +25 -10
- package/lib/no-axios/horizon/server.js +23 -30
- package/lib/no-axios/horizon/strict_receive_path_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/strict_receive_path_call_builder.js +2 -2
- package/lib/no-axios/horizon/strict_send_path_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/strict_send_path_call_builder.js +2 -2
- package/lib/no-axios/horizon/trade_aggregation_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/trade_aggregation_call_builder.js +2 -2
- package/lib/no-axios/horizon/trades_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/trades_call_builder.js +2 -2
- package/lib/no-axios/horizon/transaction_call_builder.d.ts +2 -1
- package/lib/no-axios/horizon/transaction_call_builder.js +3 -3
- package/lib/no-axios/rpc/api.d.ts +132 -0
- package/lib/no-axios/rpc/axios.d.ts +1 -2
- package/lib/no-axios/rpc/axios.js +17 -9
- package/lib/no-axios/rpc/index.d.ts +0 -1
- package/lib/no-axios/rpc/index.js +0 -9
- package/lib/no-axios/rpc/jsonrpc.d.ts +2 -1
- package/lib/no-axios/rpc/jsonrpc.js +4 -6
- package/lib/no-axios/rpc/parsers.d.ts +1 -0
- package/lib/no-axios/rpc/parsers.js +23 -0
- package/lib/no-axios/rpc/server.d.ts +82 -20
- package/lib/no-axios/rpc/server.js +56 -19
- package/lib/no-axios/webauth/errors.d.ts +0 -2
- package/lib/no-axios/webauth/errors.js +2 -8
- package/lib/no-eventsource/contract/assembled_transaction.js +9 -4
- package/lib/no-eventsource/contract/client.d.ts +1 -1
- package/lib/no-eventsource/contract/client.js +25 -14
- package/lib/no-eventsource/contract/sent_transaction.js +9 -4
- package/lib/no-eventsource/contract/spec.js +10 -2
- package/lib/no-eventsource/contract/types.d.ts +9 -1
- 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/horizon/account_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/account_call_builder.js +3 -3
- package/lib/no-eventsource/horizon/assets_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/assets_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/call_builder.d.ts +3 -1
- package/lib/no-eventsource/horizon/call_builder.js +4 -3
- package/lib/no-eventsource/horizon/claimable_balances_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/claimable_balances_call_builder.js +3 -3
- package/lib/no-eventsource/horizon/effect_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/effect_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/friendbot_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/friendbot_builder.js +2 -2
- package/lib/no-eventsource/horizon/horizon_axios_client.d.ts +2 -2
- package/lib/no-eventsource/horizon/horizon_axios_client.js +38 -30
- package/lib/no-eventsource/horizon/index.d.ts +1 -1
- package/lib/no-eventsource/horizon/index.js +1 -10
- package/lib/no-eventsource/horizon/ledger_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/ledger_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/liquidity_pool_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/liquidity_pool_call_builder.js +3 -3
- package/lib/no-eventsource/horizon/offer_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/offer_call_builder.js +3 -3
- package/lib/no-eventsource/horizon/operation_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/operation_call_builder.js +3 -3
- package/lib/no-eventsource/horizon/orderbook_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/orderbook_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/path_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/path_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/payment_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/payment_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/server.d.ts +25 -10
- package/lib/no-eventsource/horizon/server.js +23 -30
- package/lib/no-eventsource/horizon/strict_receive_path_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/strict_receive_path_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/strict_send_path_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/strict_send_path_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/trade_aggregation_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/trade_aggregation_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/trades_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/trades_call_builder.js +2 -2
- package/lib/no-eventsource/horizon/transaction_call_builder.d.ts +2 -1
- package/lib/no-eventsource/horizon/transaction_call_builder.js +3 -3
- package/lib/no-eventsource/rpc/api.d.ts +132 -0
- package/lib/no-eventsource/rpc/axios.d.ts +1 -2
- package/lib/no-eventsource/rpc/axios.js +17 -9
- package/lib/no-eventsource/rpc/index.d.ts +0 -1
- package/lib/no-eventsource/rpc/index.js +0 -9
- package/lib/no-eventsource/rpc/jsonrpc.d.ts +2 -1
- package/lib/no-eventsource/rpc/jsonrpc.js +4 -6
- package/lib/no-eventsource/rpc/parsers.d.ts +1 -0
- package/lib/no-eventsource/rpc/parsers.js +23 -0
- package/lib/no-eventsource/rpc/server.d.ts +82 -20
- package/lib/no-eventsource/rpc/server.js +56 -19
- package/lib/no-eventsource/webauth/errors.d.ts +0 -2
- package/lib/no-eventsource/webauth/errors.js +2 -8
- package/lib/rpc/api.d.ts +132 -0
- package/lib/rpc/axios.d.ts +1 -2
- package/lib/rpc/axios.js +17 -9
- package/lib/rpc/index.d.ts +0 -1
- package/lib/rpc/index.js +0 -9
- package/lib/rpc/jsonrpc.d.ts +2 -1
- package/lib/rpc/jsonrpc.js +4 -6
- package/lib/rpc/parsers.d.ts +1 -0
- package/lib/rpc/parsers.js +23 -0
- package/lib/rpc/server.d.ts +82 -20
- package/lib/rpc/server.js +56 -19
- package/lib/webauth/errors.d.ts +0 -2
- package/lib/webauth/errors.js +2 -8
- package/package.json +20 -45
|
@@ -9701,8 +9701,7 @@ function sent_transaction_toPrimitive(t, r) { if ("object" != sent_transaction_t
|
|
|
9701
9701
|
|
|
9702
9702
|
var SentTransaction = function () {
|
|
9703
9703
|
function SentTransaction(assembled) {
|
|
9704
|
-
var _this = this
|
|
9705
|
-
_this$assembled$optio2;
|
|
9704
|
+
var _this = this;
|
|
9706
9705
|
sent_transaction_classCallCheck(this, SentTransaction);
|
|
9707
9706
|
_defineProperty(this, "send", function () {
|
|
9708
9707
|
var _ref = sent_transaction_asyncToGenerator(sent_transaction_regenerator().m(function _callee2(watcher) {
|
|
@@ -9759,8 +9758,14 @@ var SentTransaction = function () {
|
|
|
9759
9758
|
};
|
|
9760
9759
|
}());
|
|
9761
9760
|
this.assembled = assembled;
|
|
9762
|
-
|
|
9763
|
-
|
|
9761
|
+
var _this$assembled$optio2 = this.assembled.options,
|
|
9762
|
+
server = _this$assembled$optio2.server,
|
|
9763
|
+
allowHttp = _this$assembled$optio2.allowHttp,
|
|
9764
|
+
headers = _this$assembled$optio2.headers,
|
|
9765
|
+
rpcUrl = _this$assembled$optio2.rpcUrl;
|
|
9766
|
+
this.server = server !== null && server !== void 0 ? server : new rpc.Server(rpcUrl, {
|
|
9767
|
+
allowHttp: allowHttp,
|
|
9768
|
+
headers: headers
|
|
9764
9769
|
});
|
|
9765
9770
|
}
|
|
9766
9771
|
return sent_transaction_createClass(SentTransaction, [{
|
|
@@ -9881,8 +9886,7 @@ function assembled_transaction_toPrimitive(t, r) { if ("object" != assembled_tra
|
|
|
9881
9886
|
var AssembledTransaction = function () {
|
|
9882
9887
|
function AssembledTransaction(options) {
|
|
9883
9888
|
var _this = this,
|
|
9884
|
-
_this$options$simulat
|
|
9885
|
-
_this$options$allowHt;
|
|
9889
|
+
_this$options$simulat;
|
|
9886
9890
|
assembled_transaction_classCallCheck(this, AssembledTransaction);
|
|
9887
9891
|
assembled_transaction_defineProperty(this, "simulate", assembled_transaction_asyncToGenerator(assembled_transaction_regenerator().m(function _callee() {
|
|
9888
9892
|
var _ref2,
|
|
@@ -10238,8 +10242,14 @@ var AssembledTransaction = function () {
|
|
|
10238
10242
|
})));
|
|
10239
10243
|
this.options = options;
|
|
10240
10244
|
this.options.simulate = (_this$options$simulat = this.options.simulate) !== null && _this$options$simulat !== void 0 ? _this$options$simulat : true;
|
|
10241
|
-
|
|
10242
|
-
|
|
10245
|
+
var _this$options = this.options,
|
|
10246
|
+
server = _this$options.server,
|
|
10247
|
+
allowHttp = _this$options.allowHttp,
|
|
10248
|
+
headers = _this$options.headers,
|
|
10249
|
+
rpcUrl = _this$options.rpcUrl;
|
|
10250
|
+
this.server = server !== null && server !== void 0 ? server : new rpc.Server(rpcUrl, {
|
|
10251
|
+
allowHttp: allowHttp,
|
|
10252
|
+
headers: headers
|
|
10243
10253
|
});
|
|
10244
10254
|
}
|
|
10245
10255
|
return assembled_transaction_createClass(AssembledTransaction, [{
|
|
@@ -11255,7 +11265,7 @@ var Spec = function () {
|
|
|
11255
11265
|
}
|
|
11256
11266
|
if (value === stellar_base_min.xdr.ScSpecType.scSpecTypeOption().value) {
|
|
11257
11267
|
var opt = ty.option();
|
|
11258
|
-
if (val === undefined) {
|
|
11268
|
+
if (val === null || val === undefined) {
|
|
11259
11269
|
return stellar_base_min.xdr.ScVal.scvVoid();
|
|
11260
11270
|
}
|
|
11261
11271
|
return this.nativeToScVal(val, opt.valueType());
|
|
@@ -11519,12 +11529,20 @@ var Spec = function () {
|
|
|
11519
11529
|
var _this5 = this;
|
|
11520
11530
|
var t = typeDef.switch();
|
|
11521
11531
|
var value = t.value;
|
|
11532
|
+
if (value === stellar_base_min.xdr.ScSpecType.scSpecTypeOption().value) {
|
|
11533
|
+
switch (scv.switch().value) {
|
|
11534
|
+
case stellar_base_min.xdr.ScValType.scvVoid().value:
|
|
11535
|
+
return null;
|
|
11536
|
+
default:
|
|
11537
|
+
return this.scValToNative(scv, typeDef.option().valueType());
|
|
11538
|
+
}
|
|
11539
|
+
}
|
|
11522
11540
|
if (value === stellar_base_min.xdr.ScSpecType.scSpecTypeUdt().value) {
|
|
11523
11541
|
return this.scValUdtToNative(scv, typeDef.udt());
|
|
11524
11542
|
}
|
|
11525
11543
|
switch (scv.switch().value) {
|
|
11526
11544
|
case stellar_base_min.xdr.ScValType.scvVoid().value:
|
|
11527
|
-
return
|
|
11545
|
+
return null;
|
|
11528
11546
|
case stellar_base_min.xdr.ScValType.scvU64().value:
|
|
11529
11547
|
case stellar_base_min.xdr.ScValType.scvI64().value:
|
|
11530
11548
|
case stellar_base_min.xdr.ScValType.scvU128().value:
|
|
@@ -11775,6 +11793,7 @@ function _specFromWasmHash() {
|
|
|
11775
11793
|
var format,
|
|
11776
11794
|
rpcUrl,
|
|
11777
11795
|
allowHttp,
|
|
11796
|
+
headers,
|
|
11778
11797
|
serverOpts,
|
|
11779
11798
|
server,
|
|
11780
11799
|
wasm,
|
|
@@ -11789,9 +11808,10 @@ function _specFromWasmHash() {
|
|
|
11789
11808
|
}
|
|
11790
11809
|
throw new TypeError("options must contain rpcUrl");
|
|
11791
11810
|
case 1:
|
|
11792
|
-
rpcUrl = options.rpcUrl, allowHttp = options.allowHttp;
|
|
11811
|
+
rpcUrl = options.rpcUrl, allowHttp = options.allowHttp, headers = options.headers;
|
|
11793
11812
|
serverOpts = {
|
|
11794
|
-
allowHttp: allowHttp
|
|
11813
|
+
allowHttp: allowHttp,
|
|
11814
|
+
headers: headers
|
|
11795
11815
|
};
|
|
11796
11816
|
server = new rpc.Server(rpcUrl, serverOpts);
|
|
11797
11817
|
_context5.n = 2;
|
|
@@ -11824,6 +11844,14 @@ var Client = function () {
|
|
|
11824
11844
|
});
|
|
11825
11845
|
this.spec = spec;
|
|
11826
11846
|
this.options = options;
|
|
11847
|
+
if (options.server === undefined) {
|
|
11848
|
+
var allowHttp = options.allowHttp,
|
|
11849
|
+
headers = options.headers;
|
|
11850
|
+
options.server = new rpc.Server(options.rpcUrl, {
|
|
11851
|
+
allowHttp: allowHttp,
|
|
11852
|
+
headers: headers
|
|
11853
|
+
});
|
|
11854
|
+
}
|
|
11827
11855
|
this.spec.funcs().forEach(function (xdrFn) {
|
|
11828
11856
|
var method = xdrFn.name().toString();
|
|
11829
11857
|
if (method === CONSTRUCTOR_FUNC) {
|
|
@@ -11893,10 +11921,11 @@ var Client = function () {
|
|
|
11893
11921
|
key: "fromWasmHash",
|
|
11894
11922
|
value: (function () {
|
|
11895
11923
|
var _fromWasmHash = client_asyncToGenerator(client_regenerator().m(function _callee2(wasmHash, options) {
|
|
11924
|
+
var _options$server;
|
|
11896
11925
|
var format,
|
|
11897
11926
|
rpcUrl,
|
|
11898
11927
|
allowHttp,
|
|
11899
|
-
|
|
11928
|
+
headers,
|
|
11900
11929
|
server,
|
|
11901
11930
|
wasm,
|
|
11902
11931
|
_args2 = arguments;
|
|
@@ -11910,11 +11939,11 @@ var Client = function () {
|
|
|
11910
11939
|
}
|
|
11911
11940
|
throw new TypeError("options must contain rpcUrl");
|
|
11912
11941
|
case 1:
|
|
11913
|
-
rpcUrl = options.rpcUrl, allowHttp = options.allowHttp;
|
|
11914
|
-
|
|
11915
|
-
allowHttp: allowHttp
|
|
11916
|
-
|
|
11917
|
-
|
|
11942
|
+
rpcUrl = options.rpcUrl, allowHttp = options.allowHttp, headers = options.headers;
|
|
11943
|
+
server = (_options$server = options.server) !== null && _options$server !== void 0 ? _options$server : new rpc.Server(rpcUrl, {
|
|
11944
|
+
allowHttp: allowHttp,
|
|
11945
|
+
headers: headers
|
|
11946
|
+
});
|
|
11918
11947
|
_context2.n = 2;
|
|
11919
11948
|
return server.getContractWasmByHash(wasmHash, format);
|
|
11920
11949
|
case 2:
|
|
@@ -11953,7 +11982,7 @@ var Client = function () {
|
|
|
11953
11982
|
key: "from",
|
|
11954
11983
|
value: (function () {
|
|
11955
11984
|
var _from = client_asyncToGenerator(client_regenerator().m(function _callee4(options) {
|
|
11956
|
-
var rpcUrl, contractId, allowHttp,
|
|
11985
|
+
var rpcUrl, contractId, allowHttp, headers, server, wasm;
|
|
11957
11986
|
return client_regenerator().w(function (_context4) {
|
|
11958
11987
|
while (1) switch (_context4.n) {
|
|
11959
11988
|
case 0:
|
|
@@ -11963,11 +11992,11 @@ var Client = function () {
|
|
|
11963
11992
|
}
|
|
11964
11993
|
throw new TypeError("options must contain rpcUrl and contractId");
|
|
11965
11994
|
case 1:
|
|
11966
|
-
rpcUrl = options.rpcUrl, contractId = options.contractId, allowHttp = options.allowHttp;
|
|
11967
|
-
|
|
11968
|
-
allowHttp: allowHttp
|
|
11969
|
-
|
|
11970
|
-
|
|
11995
|
+
rpcUrl = options.rpcUrl, contractId = options.contractId, allowHttp = options.allowHttp, headers = options.headers;
|
|
11996
|
+
server = new rpc.Server(rpcUrl, {
|
|
11997
|
+
allowHttp: allowHttp,
|
|
11998
|
+
headers: headers
|
|
11999
|
+
});
|
|
11971
12000
|
_context4.n = 2;
|
|
11972
12001
|
return server.getContractWasmByContractId(contractId);
|
|
11973
12002
|
case 2:
|
|
@@ -12825,15 +12854,9 @@ function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).in
|
|
|
12825
12854
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12826
12855
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12827
12856
|
var InvalidChallengeError = function (_Error) {
|
|
12828
|
-
function InvalidChallengeError(
|
|
12829
|
-
var _this;
|
|
12857
|
+
function InvalidChallengeError() {
|
|
12830
12858
|
_classCallCheck(this, InvalidChallengeError);
|
|
12831
|
-
|
|
12832
|
-
_this = _callSuper(this, InvalidChallengeError, [message]);
|
|
12833
|
-
_this.__proto__ = trueProto;
|
|
12834
|
-
_this.constructor = InvalidChallengeError;
|
|
12835
|
-
_this.name = "InvalidChallengeError";
|
|
12836
|
-
return _this;
|
|
12859
|
+
return _callSuper(this, InvalidChallengeError, arguments);
|
|
12837
12860
|
}
|
|
12838
12861
|
_inherits(InvalidChallengeError, _Error);
|
|
12839
12862
|
return _createClass(InvalidChallengeError);
|
|
@@ -13176,7 +13199,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13176
13199
|
// EXPORTS
|
|
13177
13200
|
__webpack_require__.d(__webpack_exports__, {
|
|
13178
13201
|
Api: () => (/* reexport */ api/* Api */.j),
|
|
13179
|
-
AxiosClient: () => (/* reexport */ axios),
|
|
13180
13202
|
BasicSleepStrategy: () => (/* reexport */ BasicSleepStrategy),
|
|
13181
13203
|
Durability: () => (/* reexport */ Durability),
|
|
13182
13204
|
LinearSleepStrategy: () => (/* reexport */ LinearSleepStrategy),
|
|
@@ -13197,29 +13219,35 @@ var stellar_base_min = __webpack_require__(950);
|
|
|
13197
13219
|
// EXTERNAL MODULE: ./src/http-client/index.ts + 1 modules
|
|
13198
13220
|
var http_client = __webpack_require__(983);
|
|
13199
13221
|
;// ./src/rpc/axios.ts
|
|
13222
|
+
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); }
|
|
13223
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13224
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13225
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13226
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13227
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13200
13228
|
|
|
13201
|
-
var version = "14.
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
})
|
|
13208
|
-
|
|
13229
|
+
var version = "14.3.1";
|
|
13230
|
+
function createHttpClient(headers) {
|
|
13231
|
+
return (0,http_client/* create */.vt)({
|
|
13232
|
+
headers: _objectSpread(_objectSpread({}, headers), {}, {
|
|
13233
|
+
"X-Client-Name": "js-stellar-sdk",
|
|
13234
|
+
"X-Client-Version": version
|
|
13235
|
+
})
|
|
13236
|
+
});
|
|
13237
|
+
}
|
|
13209
13238
|
;// ./src/rpc/jsonrpc.ts
|
|
13210
13239
|
function _regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
13211
13240
|
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
13212
13241
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
13213
13242
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13214
|
-
|
|
13215
13243
|
function jsonrpc_hasOwnProperty(obj, prop) {
|
|
13216
13244
|
return obj.hasOwnProperty(prop);
|
|
13217
13245
|
}
|
|
13218
|
-
function postObject(_x, _x2) {
|
|
13246
|
+
function postObject(_x, _x2, _x3) {
|
|
13219
13247
|
return _postObject.apply(this, arguments);
|
|
13220
13248
|
}
|
|
13221
13249
|
function _postObject() {
|
|
13222
|
-
_postObject = _asyncToGenerator(_regenerator().m(function _callee(url, method) {
|
|
13250
|
+
_postObject = _asyncToGenerator(_regenerator().m(function _callee(client, url, method) {
|
|
13223
13251
|
var param,
|
|
13224
13252
|
response,
|
|
13225
13253
|
_response$data,
|
|
@@ -13227,9 +13255,9 @@ function _postObject() {
|
|
|
13227
13255
|
return _regenerator().w(function (_context) {
|
|
13228
13256
|
while (1) switch (_context.n) {
|
|
13229
13257
|
case 0:
|
|
13230
|
-
param = _args.length >
|
|
13258
|
+
param = _args.length > 3 && _args[3] !== undefined ? _args[3] : null;
|
|
13231
13259
|
_context.n = 1;
|
|
13232
|
-
return
|
|
13260
|
+
return client.post(url, {
|
|
13233
13261
|
jsonrpc: "2.0",
|
|
13234
13262
|
id: 1,
|
|
13235
13263
|
method: method,
|
|
@@ -13259,19 +13287,19 @@ var parsers = __webpack_require__(784);
|
|
|
13259
13287
|
var utils = __webpack_require__(502);
|
|
13260
13288
|
;// ./src/rpc/server.ts
|
|
13261
13289
|
/* provided dependency */ var Buffer = __webpack_require__(287)["Buffer"];
|
|
13262
|
-
function
|
|
13263
|
-
function
|
|
13264
|
-
function
|
|
13265
|
-
function
|
|
13290
|
+
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); }
|
|
13291
|
+
function server_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13292
|
+
function server_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? server_ownKeys(Object(t), !0).forEach(function (r) { server_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : server_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13293
|
+
function server_defineProperty(e, r, t) { return (r = server_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13266
13294
|
function server_regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return server_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (server_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, server_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, server_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), server_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", server_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), server_regeneratorDefine2(u), server_regeneratorDefine2(u, o, "Generator"), server_regeneratorDefine2(u, n, function () { return this; }), server_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (server_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
13267
13295
|
function server_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } server_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { server_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, server_regeneratorDefine2(e, r, n, t); }
|
|
13268
13296
|
function server_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
13269
13297
|
function server_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { server_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { server_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13270
13298
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13271
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e,
|
|
13299
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, server_toPropertyKey(o.key), o); } }
|
|
13272
13300
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13273
|
-
function
|
|
13274
|
-
function
|
|
13301
|
+
function server_toPropertyKey(t) { var i = server_toPrimitive(t, "string"); return "symbol" == server_typeof(i) ? i : i + ""; }
|
|
13302
|
+
function server_toPrimitive(t, r) { if ("object" != server_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != server_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13275
13303
|
|
|
13276
13304
|
|
|
13277
13305
|
|
|
@@ -13324,12 +13352,7 @@ var RpcServer = function () {
|
|
|
13324
13352
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13325
13353
|
_classCallCheck(this, RpcServer);
|
|
13326
13354
|
this.serverURL = URI_default()(serverURL);
|
|
13327
|
-
|
|
13328
|
-
axios.interceptors.request.use(function (config) {
|
|
13329
|
-
config.headers = Object.assign(config.headers, opts.headers);
|
|
13330
|
-
return config;
|
|
13331
|
-
});
|
|
13332
|
-
}
|
|
13355
|
+
this.httpClient = createHttpClient(opts.headers);
|
|
13333
13356
|
if (this.serverURL.protocol() !== "https" && !opts.allowHttp) {
|
|
13334
13357
|
throw new Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set");
|
|
13335
13358
|
}
|
|
@@ -13484,7 +13507,7 @@ var RpcServer = function () {
|
|
|
13484
13507
|
return server_regenerator().w(function (_context5) {
|
|
13485
13508
|
while (1) switch (_context5.n) {
|
|
13486
13509
|
case 0:
|
|
13487
|
-
return _context5.a(2, postObject(this.serverURL.toString(), "getHealth"));
|
|
13510
|
+
return _context5.a(2, postObject(this.httpClient, this.serverURL.toString(), "getHealth"));
|
|
13488
13511
|
}
|
|
13489
13512
|
}, _callee5, this);
|
|
13490
13513
|
}));
|
|
@@ -13659,7 +13682,7 @@ var RpcServer = function () {
|
|
|
13659
13682
|
for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13660
13683
|
keys[_key] = arguments[_key];
|
|
13661
13684
|
}
|
|
13662
|
-
return postObject(this.serverURL.toString(), "getLedgerEntries", {
|
|
13685
|
+
return postObject(this.httpClient, this.serverURL.toString(), "getLedgerEntries", {
|
|
13663
13686
|
keys: keys.map(function (k) {
|
|
13664
13687
|
return k.toXDR("base64");
|
|
13665
13688
|
})
|
|
@@ -13746,7 +13769,7 @@ var RpcServer = function () {
|
|
|
13746
13769
|
if (raw.status !== api/* Api */.j.GetTransactionStatus.NOT_FOUND) {
|
|
13747
13770
|
Object.assign(foundInfo, (0,parsers/* parseTransactionInfo */.WC)(raw));
|
|
13748
13771
|
}
|
|
13749
|
-
var result =
|
|
13772
|
+
var result = server_objectSpread({
|
|
13750
13773
|
status: raw.status,
|
|
13751
13774
|
txHash: hash,
|
|
13752
13775
|
latestLedger: raw.latestLedger,
|
|
@@ -13771,7 +13794,7 @@ var RpcServer = function () {
|
|
|
13771
13794
|
return server_regenerator().w(function (_context10) {
|
|
13772
13795
|
while (1) switch (_context10.n) {
|
|
13773
13796
|
case 0:
|
|
13774
|
-
return _context10.a(2, postObject(this.serverURL.toString(), "getTransaction", {
|
|
13797
|
+
return _context10.a(2, postObject(this.httpClient, this.serverURL.toString(), "getTransaction", {
|
|
13775
13798
|
hash: hash
|
|
13776
13799
|
}));
|
|
13777
13800
|
}
|
|
@@ -13815,7 +13838,7 @@ var RpcServer = function () {
|
|
|
13815
13838
|
return server_regenerator().w(function (_context12) {
|
|
13816
13839
|
while (1) switch (_context12.n) {
|
|
13817
13840
|
case 0:
|
|
13818
|
-
return _context12.a(2, postObject(this.serverURL.toString(), "getTransactions", request));
|
|
13841
|
+
return _context12.a(2, postObject(this.httpClient, this.serverURL.toString(), "getTransactions", request));
|
|
13819
13842
|
}
|
|
13820
13843
|
}, _callee12, this);
|
|
13821
13844
|
}));
|
|
@@ -13848,9 +13871,9 @@ var RpcServer = function () {
|
|
|
13848
13871
|
return server_regenerator().w(function (_context14) {
|
|
13849
13872
|
while (1) switch (_context14.n) {
|
|
13850
13873
|
case 0:
|
|
13851
|
-
return _context14.a(2, postObject(this.serverURL.toString(), "getEvents",
|
|
13874
|
+
return _context14.a(2, postObject(this.httpClient, this.serverURL.toString(), "getEvents", server_objectSpread(server_objectSpread({
|
|
13852
13875
|
filters: (_request$filters = request.filters) !== null && _request$filters !== void 0 ? _request$filters : [],
|
|
13853
|
-
pagination:
|
|
13876
|
+
pagination: server_objectSpread(server_objectSpread({}, request.cursor && {
|
|
13854
13877
|
cursor: request.cursor
|
|
13855
13878
|
}), request.limit && {
|
|
13856
13879
|
limit: request.limit
|
|
@@ -13875,7 +13898,7 @@ var RpcServer = function () {
|
|
|
13875
13898
|
return server_regenerator().w(function (_context15) {
|
|
13876
13899
|
while (1) switch (_context15.n) {
|
|
13877
13900
|
case 0:
|
|
13878
|
-
return _context15.a(2, postObject(this.serverURL.toString(), "getNetwork"));
|
|
13901
|
+
return _context15.a(2, postObject(this.httpClient, this.serverURL.toString(), "getNetwork"));
|
|
13879
13902
|
}
|
|
13880
13903
|
}, _callee15, this);
|
|
13881
13904
|
}));
|
|
@@ -13891,7 +13914,7 @@ var RpcServer = function () {
|
|
|
13891
13914
|
return server_regenerator().w(function (_context16) {
|
|
13892
13915
|
while (1) switch (_context16.n) {
|
|
13893
13916
|
case 0:
|
|
13894
|
-
return _context16.a(2, postObject(this.serverURL.toString(), "getLatestLedger"));
|
|
13917
|
+
return _context16.a(2, postObject(this.httpClient, this.serverURL.toString(), "getLatestLedger"));
|
|
13895
13918
|
}
|
|
13896
13919
|
}, _callee16, this);
|
|
13897
13920
|
}));
|
|
@@ -13923,7 +13946,7 @@ var RpcServer = function () {
|
|
|
13923
13946
|
return server_regenerator().w(function (_context18) {
|
|
13924
13947
|
while (1) switch (_context18.n) {
|
|
13925
13948
|
case 0:
|
|
13926
|
-
return _context18.a(2, postObject(this.serverURL.toString(), "simulateTransaction",
|
|
13949
|
+
return _context18.a(2, postObject(this.httpClient, this.serverURL.toString(), "simulateTransaction", server_objectSpread({
|
|
13927
13950
|
transaction: transaction.toXDR(),
|
|
13928
13951
|
authMode: authMode
|
|
13929
13952
|
}, addlResources !== undefined && {
|
|
@@ -13989,7 +14012,7 @@ var RpcServer = function () {
|
|
|
13989
14012
|
return server_regenerator().w(function (_context21) {
|
|
13990
14013
|
while (1) switch (_context21.n) {
|
|
13991
14014
|
case 0:
|
|
13992
|
-
return _context21.a(2, postObject(this.serverURL.toString(), "sendTransaction", {
|
|
14015
|
+
return _context21.a(2, postObject(this.httpClient, this.serverURL.toString(), "sendTransaction", {
|
|
13993
14016
|
transaction: transaction.toXDR()
|
|
13994
14017
|
}));
|
|
13995
14018
|
}
|
|
@@ -14028,7 +14051,7 @@ var RpcServer = function () {
|
|
|
14028
14051
|
case 3:
|
|
14029
14052
|
_context22.p = 3;
|
|
14030
14053
|
_context22.n = 4;
|
|
14031
|
-
return
|
|
14054
|
+
return this.httpClient.post("".concat(friendbotUrl, "?addr=").concat(encodeURIComponent(account)));
|
|
14032
14055
|
case 4:
|
|
14033
14056
|
response = _context22.v;
|
|
14034
14057
|
if (response.data.result_meta_xdr) {
|
|
@@ -14084,7 +14107,7 @@ var RpcServer = function () {
|
|
|
14084
14107
|
return server_regenerator().w(function (_context23) {
|
|
14085
14108
|
while (1) switch (_context23.n) {
|
|
14086
14109
|
case 0:
|
|
14087
|
-
return _context23.a(2, postObject(this.serverURL.toString(), "getFeeStats"));
|
|
14110
|
+
return _context23.a(2, postObject(this.httpClient, this.serverURL.toString(), "getFeeStats"));
|
|
14088
14111
|
}
|
|
14089
14112
|
}, _callee23, this);
|
|
14090
14113
|
}));
|
|
@@ -14100,7 +14123,7 @@ var RpcServer = function () {
|
|
|
14100
14123
|
return server_regenerator().w(function (_context24) {
|
|
14101
14124
|
while (1) switch (_context24.n) {
|
|
14102
14125
|
case 0:
|
|
14103
|
-
return _context24.a(2, postObject(this.serverURL.toString(), "getVersionInfo"));
|
|
14126
|
+
return _context24.a(2, postObject(this.httpClient, this.serverURL.toString(), "getVersionInfo"));
|
|
14104
14127
|
}
|
|
14105
14128
|
}, _callee24, this);
|
|
14106
14129
|
}));
|
|
@@ -14189,6 +14212,48 @@ var RpcServer = function () {
|
|
|
14189
14212
|
}
|
|
14190
14213
|
return getSACBalance;
|
|
14191
14214
|
}())
|
|
14215
|
+
}, {
|
|
14216
|
+
key: "getLedgers",
|
|
14217
|
+
value: (function () {
|
|
14218
|
+
var _getLedgers2 = server_asyncToGenerator(server_regenerator().m(function _callee26(request) {
|
|
14219
|
+
return server_regenerator().w(function (_context26) {
|
|
14220
|
+
while (1) switch (_context26.n) {
|
|
14221
|
+
case 0:
|
|
14222
|
+
return _context26.a(2, this._getLedgers(request).then(function (raw) {
|
|
14223
|
+
var result = {
|
|
14224
|
+
ledgers: (raw.ledgers || []).map(parsers/* parseRawLedger */.$E),
|
|
14225
|
+
latestLedger: raw.latestLedger,
|
|
14226
|
+
latestLedgerCloseTime: raw.latestLedgerCloseTime,
|
|
14227
|
+
oldestLedger: raw.oldestLedger,
|
|
14228
|
+
oldestLedgerCloseTime: raw.oldestLedgerCloseTime,
|
|
14229
|
+
cursor: raw.cursor
|
|
14230
|
+
};
|
|
14231
|
+
return result;
|
|
14232
|
+
}));
|
|
14233
|
+
}
|
|
14234
|
+
}, _callee26, this);
|
|
14235
|
+
}));
|
|
14236
|
+
function getLedgers(_x31) {
|
|
14237
|
+
return _getLedgers2.apply(this, arguments);
|
|
14238
|
+
}
|
|
14239
|
+
return getLedgers;
|
|
14240
|
+
}())
|
|
14241
|
+
}, {
|
|
14242
|
+
key: "_getLedgers",
|
|
14243
|
+
value: function () {
|
|
14244
|
+
var _getLedgers3 = server_asyncToGenerator(server_regenerator().m(function _callee27(request) {
|
|
14245
|
+
return server_regenerator().w(function (_context27) {
|
|
14246
|
+
while (1) switch (_context27.n) {
|
|
14247
|
+
case 0:
|
|
14248
|
+
return _context27.a(2, postObject(this.httpClient, this.serverURL.toString(), "getLedgers", request));
|
|
14249
|
+
}
|
|
14250
|
+
}, _callee27, this);
|
|
14251
|
+
}));
|
|
14252
|
+
function _getLedgers(_x32) {
|
|
14253
|
+
return _getLedgers3.apply(this, arguments);
|
|
14254
|
+
}
|
|
14255
|
+
return _getLedgers;
|
|
14256
|
+
}()
|
|
14192
14257
|
}]);
|
|
14193
14258
|
}();
|
|
14194
14259
|
;// ./src/rpc/index.ts
|
|
@@ -14197,7 +14262,6 @@ var RpcServer = function () {
|
|
|
14197
14262
|
|
|
14198
14263
|
|
|
14199
14264
|
|
|
14200
|
-
|
|
14201
14265
|
/* harmony default export */ const rpc = (module.exports);
|
|
14202
14266
|
|
|
14203
14267
|
/***/ }),
|
|
@@ -19098,7 +19162,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19098
19162
|
// EXPORTS
|
|
19099
19163
|
__webpack_require__.d(__webpack_exports__, {
|
|
19100
19164
|
AccountResponse: () => (/* reexport */ AccountResponse),
|
|
19101
|
-
AxiosClient: () => (/* reexport */ horizon_axios_client),
|
|
19102
19165
|
HorizonApi: () => (/* reexport */ HorizonApi),
|
|
19103
19166
|
SERVER_TIME_MAP: () => (/* reexport */ SERVER_TIME_MAP),
|
|
19104
19167
|
Server: () => (/* reexport */ HorizonServer),
|
|
@@ -22237,43 +22300,50 @@ var errors = __webpack_require__(976);
|
|
|
22237
22300
|
var http_client = __webpack_require__(983);
|
|
22238
22301
|
;// ./src/horizon/horizon_axios_client.ts
|
|
22239
22302
|
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); }
|
|
22303
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22304
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22305
|
+
function _defineProperty(e, r, t) { return (r = horizon_axios_client_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
22306
|
+
function horizon_axios_client_toPropertyKey(t) { var i = horizon_axios_client_toPrimitive(t, "string"); return "symbol" == horizon_axios_client_typeof(i) ? i : i + ""; }
|
|
22307
|
+
function horizon_axios_client_toPrimitive(t, r) { if ("object" != horizon_axios_client_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != horizon_axios_client_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22240
22308
|
|
|
22241
22309
|
|
|
22242
|
-
var version = "14.
|
|
22310
|
+
var version = "14.3.1";
|
|
22243
22311
|
var SERVER_TIME_MAP = {};
|
|
22244
|
-
var AxiosClient = (0,http_client/* create */.vt)({
|
|
22245
|
-
headers: {
|
|
22246
|
-
"X-Client-Name": "js-stellar-sdk",
|
|
22247
|
-
"X-Client-Version": version
|
|
22248
|
-
}
|
|
22249
|
-
});
|
|
22250
22312
|
function toSeconds(ms) {
|
|
22251
22313
|
return Math.floor(ms / 1000);
|
|
22252
22314
|
}
|
|
22253
|
-
|
|
22254
|
-
var
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
var
|
|
22263
|
-
if (
|
|
22264
|
-
|
|
22265
|
-
|
|
22266
|
-
|
|
22267
|
-
|
|
22268
|
-
|
|
22269
|
-
|
|
22270
|
-
|
|
22271
|
-
|
|
22272
|
-
|
|
22273
|
-
|
|
22274
|
-
|
|
22275
|
-
|
|
22276
|
-
|
|
22315
|
+
function createHttpClient(headers) {
|
|
22316
|
+
var httpClient = (0,http_client/* create */.vt)({
|
|
22317
|
+
headers: _objectSpread(_objectSpread({}, headers), {}, {
|
|
22318
|
+
"X-Client-Name": "js-stellar-sdk",
|
|
22319
|
+
"X-Client-Version": version
|
|
22320
|
+
})
|
|
22321
|
+
});
|
|
22322
|
+
httpClient.interceptors.response.use(function (response) {
|
|
22323
|
+
var hostname = URI_default()(response.config.url).hostname();
|
|
22324
|
+
var serverTime = 0;
|
|
22325
|
+
if (response.headers instanceof Headers) {
|
|
22326
|
+
var dateHeader = response.headers.get("date");
|
|
22327
|
+
if (dateHeader) {
|
|
22328
|
+
serverTime = toSeconds(Date.parse(dateHeader));
|
|
22329
|
+
}
|
|
22330
|
+
} else if (horizon_axios_client_typeof(response.headers) === "object" && "date" in response.headers) {
|
|
22331
|
+
var responseHeader = response.headers;
|
|
22332
|
+
if (typeof responseHeader.date === "string") {
|
|
22333
|
+
serverTime = toSeconds(Date.parse(responseHeader.date));
|
|
22334
|
+
}
|
|
22335
|
+
}
|
|
22336
|
+
var localTimeRecorded = toSeconds(new Date().getTime());
|
|
22337
|
+
if (!Number.isNaN(serverTime)) {
|
|
22338
|
+
SERVER_TIME_MAP[hostname] = {
|
|
22339
|
+
serverTime: serverTime,
|
|
22340
|
+
localTimeRecorded: localTimeRecorded
|
|
22341
|
+
};
|
|
22342
|
+
}
|
|
22343
|
+
return response;
|
|
22344
|
+
});
|
|
22345
|
+
return httpClient;
|
|
22346
|
+
}
|
|
22277
22347
|
function getCurrentServerTime(hostname) {
|
|
22278
22348
|
var entry = SERVER_TIME_MAP[hostname];
|
|
22279
22349
|
if (!entry || !entry.localTimeRecorded || !entry.serverTime) {
|
|
@@ -22308,13 +22378,14 @@ var EventSource;
|
|
|
22308
22378
|
if (false) // removed by dead control flow
|
|
22309
22379
|
{ var _ref, _anyGlobal$EventSourc, _anyGlobal$window; }
|
|
22310
22380
|
var CallBuilder = function () {
|
|
22311
|
-
function CallBuilder(serverUrl) {
|
|
22312
|
-
var neighborRoot = arguments.length >
|
|
22381
|
+
function CallBuilder(serverUrl, httpClient) {
|
|
22382
|
+
var neighborRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
22313
22383
|
call_builder_classCallCheck(this, CallBuilder);
|
|
22314
22384
|
this.url = serverUrl.clone();
|
|
22315
22385
|
this.filter = [];
|
|
22316
22386
|
this.originalSegments = this.url.segment() || [];
|
|
22317
22387
|
this.neighborRoot = neighborRoot;
|
|
22388
|
+
this.httpClient = httpClient;
|
|
22318
22389
|
}
|
|
22319
22390
|
return call_builder_createClass(CallBuilder, [{
|
|
22320
22391
|
key: "call",
|
|
@@ -22522,7 +22593,7 @@ var CallBuilder = function () {
|
|
|
22522
22593
|
if (url.protocol() === "") {
|
|
22523
22594
|
url = url.protocol(this.url.protocol());
|
|
22524
22595
|
}
|
|
22525
|
-
return _context3.a(2,
|
|
22596
|
+
return _context3.a(2, this.httpClient.get(url.toString()).then(function (response) {
|
|
22526
22597
|
return response.data;
|
|
22527
22598
|
}).catch(this._handleNetworkError));
|
|
22528
22599
|
}
|
|
@@ -22645,10 +22716,10 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
22645
22716
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22646
22717
|
|
|
22647
22718
|
var AccountCallBuilder = function (_CallBuilder) {
|
|
22648
|
-
function AccountCallBuilder(serverUrl) {
|
|
22719
|
+
function AccountCallBuilder(serverUrl, httpClient) {
|
|
22649
22720
|
var _this;
|
|
22650
22721
|
account_call_builder_classCallCheck(this, AccountCallBuilder);
|
|
22651
|
-
_this = _callSuper(this, AccountCallBuilder, [serverUrl]);
|
|
22722
|
+
_this = _callSuper(this, AccountCallBuilder, [serverUrl, httpClient]);
|
|
22652
22723
|
_this.url.segment("accounts");
|
|
22653
22724
|
return _this;
|
|
22654
22725
|
}
|
|
@@ -22656,7 +22727,7 @@ var AccountCallBuilder = function (_CallBuilder) {
|
|
|
22656
22727
|
return account_call_builder_createClass(AccountCallBuilder, [{
|
|
22657
22728
|
key: "accountId",
|
|
22658
22729
|
value: function accountId(id) {
|
|
22659
|
-
var builder = new CallBuilder(this.url.clone());
|
|
22730
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
22660
22731
|
builder.filter.push([id]);
|
|
22661
22732
|
return builder;
|
|
22662
22733
|
}
|
|
@@ -22702,10 +22773,10 @@ function assets_call_builder_inherits(t, e) { if ("function" != typeof e && null
|
|
|
22702
22773
|
function assets_call_builder_setPrototypeOf(t, e) { return assets_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, assets_call_builder_setPrototypeOf(t, e); }
|
|
22703
22774
|
|
|
22704
22775
|
var AssetsCallBuilder = function (_CallBuilder) {
|
|
22705
|
-
function AssetsCallBuilder(serverUrl) {
|
|
22776
|
+
function AssetsCallBuilder(serverUrl, httpClient) {
|
|
22706
22777
|
var _this;
|
|
22707
22778
|
assets_call_builder_classCallCheck(this, AssetsCallBuilder);
|
|
22708
|
-
_this = assets_call_builder_callSuper(this, AssetsCallBuilder, [serverUrl]);
|
|
22779
|
+
_this = assets_call_builder_callSuper(this, AssetsCallBuilder, [serverUrl, httpClient]);
|
|
22709
22780
|
_this.url.segment("assets");
|
|
22710
22781
|
return _this;
|
|
22711
22782
|
}
|
|
@@ -22740,10 +22811,10 @@ function claimable_balances_call_builder_inherits(t, e) { if ("function" != type
|
|
|
22740
22811
|
function claimable_balances_call_builder_setPrototypeOf(t, e) { return claimable_balances_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, claimable_balances_call_builder_setPrototypeOf(t, e); }
|
|
22741
22812
|
|
|
22742
22813
|
var ClaimableBalanceCallBuilder = function (_CallBuilder) {
|
|
22743
|
-
function ClaimableBalanceCallBuilder(serverUrl) {
|
|
22814
|
+
function ClaimableBalanceCallBuilder(serverUrl, httpClient) {
|
|
22744
22815
|
var _this;
|
|
22745
22816
|
claimable_balances_call_builder_classCallCheck(this, ClaimableBalanceCallBuilder);
|
|
22746
|
-
_this = claimable_balances_call_builder_callSuper(this, ClaimableBalanceCallBuilder, [serverUrl]);
|
|
22817
|
+
_this = claimable_balances_call_builder_callSuper(this, ClaimableBalanceCallBuilder, [serverUrl, httpClient]);
|
|
22747
22818
|
_this.url.segment("claimable_balances");
|
|
22748
22819
|
return _this;
|
|
22749
22820
|
}
|
|
@@ -22751,7 +22822,7 @@ var ClaimableBalanceCallBuilder = function (_CallBuilder) {
|
|
|
22751
22822
|
return claimable_balances_call_builder_createClass(ClaimableBalanceCallBuilder, [{
|
|
22752
22823
|
key: "claimableBalance",
|
|
22753
22824
|
value: function claimableBalance(claimableBalanceId) {
|
|
22754
|
-
var builder = new CallBuilder(this.url.clone());
|
|
22825
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
22755
22826
|
builder.filter.push([claimableBalanceId]);
|
|
22756
22827
|
return builder;
|
|
22757
22828
|
}
|
|
@@ -22791,10 +22862,10 @@ function effect_call_builder_inherits(t, e) { if ("function" != typeof e && null
|
|
|
22791
22862
|
function effect_call_builder_setPrototypeOf(t, e) { return effect_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, effect_call_builder_setPrototypeOf(t, e); }
|
|
22792
22863
|
|
|
22793
22864
|
var EffectCallBuilder = function (_CallBuilder) {
|
|
22794
|
-
function EffectCallBuilder(serverUrl) {
|
|
22865
|
+
function EffectCallBuilder(serverUrl, httpClient) {
|
|
22795
22866
|
var _this;
|
|
22796
22867
|
effect_call_builder_classCallCheck(this, EffectCallBuilder);
|
|
22797
|
-
_this = effect_call_builder_callSuper(this, EffectCallBuilder, [serverUrl, "effects"]);
|
|
22868
|
+
_this = effect_call_builder_callSuper(this, EffectCallBuilder, [serverUrl, httpClient, "effects"]);
|
|
22798
22869
|
_this.url.segment("effects");
|
|
22799
22870
|
return _this;
|
|
22800
22871
|
}
|
|
@@ -22842,10 +22913,10 @@ function friendbot_builder_inherits(t, e) { if ("function" != typeof e && null !
|
|
|
22842
22913
|
function friendbot_builder_setPrototypeOf(t, e) { return friendbot_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, friendbot_builder_setPrototypeOf(t, e); }
|
|
22843
22914
|
|
|
22844
22915
|
var FriendbotBuilder = function (_CallBuilder) {
|
|
22845
|
-
function FriendbotBuilder(serverUrl, address) {
|
|
22916
|
+
function FriendbotBuilder(serverUrl, httpClient, address) {
|
|
22846
22917
|
var _this;
|
|
22847
22918
|
friendbot_builder_classCallCheck(this, FriendbotBuilder);
|
|
22848
|
-
_this = friendbot_builder_callSuper(this, FriendbotBuilder, [serverUrl]);
|
|
22919
|
+
_this = friendbot_builder_callSuper(this, FriendbotBuilder, [serverUrl, httpClient]);
|
|
22849
22920
|
_this.url.segment("friendbot");
|
|
22850
22921
|
_this.url.setQuery("addr", address);
|
|
22851
22922
|
return _this;
|
|
@@ -22869,10 +22940,10 @@ function ledger_call_builder_inherits(t, e) { if ("function" != typeof e && null
|
|
|
22869
22940
|
function ledger_call_builder_setPrototypeOf(t, e) { return ledger_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, ledger_call_builder_setPrototypeOf(t, e); }
|
|
22870
22941
|
|
|
22871
22942
|
var LedgerCallBuilder = function (_CallBuilder) {
|
|
22872
|
-
function LedgerCallBuilder(serverUrl) {
|
|
22943
|
+
function LedgerCallBuilder(serverUrl, httpClient) {
|
|
22873
22944
|
var _this;
|
|
22874
22945
|
ledger_call_builder_classCallCheck(this, LedgerCallBuilder);
|
|
22875
|
-
_this = ledger_call_builder_callSuper(this, LedgerCallBuilder, [serverUrl]);
|
|
22946
|
+
_this = ledger_call_builder_callSuper(this, LedgerCallBuilder, [serverUrl, httpClient]);
|
|
22876
22947
|
_this.url.segment("ledgers");
|
|
22877
22948
|
return _this;
|
|
22878
22949
|
}
|
|
@@ -22901,10 +22972,10 @@ function liquidity_pool_call_builder_inherits(t, e) { if ("function" != typeof e
|
|
|
22901
22972
|
function liquidity_pool_call_builder_setPrototypeOf(t, e) { return liquidity_pool_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, liquidity_pool_call_builder_setPrototypeOf(t, e); }
|
|
22902
22973
|
|
|
22903
22974
|
var LiquidityPoolCallBuilder = function (_CallBuilder) {
|
|
22904
|
-
function LiquidityPoolCallBuilder(serverUrl) {
|
|
22975
|
+
function LiquidityPoolCallBuilder(serverUrl, httpClient) {
|
|
22905
22976
|
var _this;
|
|
22906
22977
|
liquidity_pool_call_builder_classCallCheck(this, LiquidityPoolCallBuilder);
|
|
22907
|
-
_this = liquidity_pool_call_builder_callSuper(this, LiquidityPoolCallBuilder, [serverUrl]);
|
|
22978
|
+
_this = liquidity_pool_call_builder_callSuper(this, LiquidityPoolCallBuilder, [serverUrl, httpClient]);
|
|
22908
22979
|
_this.url.segment("liquidity_pools");
|
|
22909
22980
|
return _this;
|
|
22910
22981
|
}
|
|
@@ -22933,7 +23004,7 @@ var LiquidityPoolCallBuilder = function (_CallBuilder) {
|
|
|
22933
23004
|
if (!id.match(/[a-fA-F0-9]{64}/)) {
|
|
22934
23005
|
throw new TypeError("".concat(id, " does not look like a liquidity pool ID"));
|
|
22935
23006
|
}
|
|
22936
|
-
var builder = new CallBuilder(this.url.clone());
|
|
23007
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
22937
23008
|
builder.filter.push([id.toLowerCase()]);
|
|
22938
23009
|
return builder;
|
|
22939
23010
|
}
|
|
@@ -22955,10 +23026,10 @@ function offer_call_builder_inherits(t, e) { if ("function" != typeof e && null
|
|
|
22955
23026
|
function offer_call_builder_setPrototypeOf(t, e) { return offer_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, offer_call_builder_setPrototypeOf(t, e); }
|
|
22956
23027
|
|
|
22957
23028
|
var OfferCallBuilder = function (_CallBuilder) {
|
|
22958
|
-
function OfferCallBuilder(serverUrl) {
|
|
23029
|
+
function OfferCallBuilder(serverUrl, httpClient) {
|
|
22959
23030
|
var _this;
|
|
22960
23031
|
offer_call_builder_classCallCheck(this, OfferCallBuilder);
|
|
22961
|
-
_this = offer_call_builder_callSuper(this, OfferCallBuilder, [serverUrl, "offers"]);
|
|
23032
|
+
_this = offer_call_builder_callSuper(this, OfferCallBuilder, [serverUrl, httpClient, "offers"]);
|
|
22962
23033
|
_this.url.segment("offers");
|
|
22963
23034
|
return _this;
|
|
22964
23035
|
}
|
|
@@ -22966,7 +23037,7 @@ var OfferCallBuilder = function (_CallBuilder) {
|
|
|
22966
23037
|
return offer_call_builder_createClass(OfferCallBuilder, [{
|
|
22967
23038
|
key: "offer",
|
|
22968
23039
|
value: function offer(offerId) {
|
|
22969
|
-
var builder = new CallBuilder(this.url.clone());
|
|
23040
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
22970
23041
|
builder.filter.push([offerId]);
|
|
22971
23042
|
return builder;
|
|
22972
23043
|
}
|
|
@@ -23029,10 +23100,10 @@ function operation_call_builder_inherits(t, e) { if ("function" != typeof e && n
|
|
|
23029
23100
|
function operation_call_builder_setPrototypeOf(t, e) { return operation_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, operation_call_builder_setPrototypeOf(t, e); }
|
|
23030
23101
|
|
|
23031
23102
|
var OperationCallBuilder = function (_CallBuilder) {
|
|
23032
|
-
function OperationCallBuilder(serverUrl) {
|
|
23103
|
+
function OperationCallBuilder(serverUrl, httpClient) {
|
|
23033
23104
|
var _this;
|
|
23034
23105
|
operation_call_builder_classCallCheck(this, OperationCallBuilder);
|
|
23035
|
-
_this = operation_call_builder_callSuper(this, OperationCallBuilder, [serverUrl, "operations"]);
|
|
23106
|
+
_this = operation_call_builder_callSuper(this, OperationCallBuilder, [serverUrl, httpClient, "operations"]);
|
|
23036
23107
|
_this.url.segment("operations");
|
|
23037
23108
|
return _this;
|
|
23038
23109
|
}
|
|
@@ -23040,7 +23111,7 @@ var OperationCallBuilder = function (_CallBuilder) {
|
|
|
23040
23111
|
return operation_call_builder_createClass(OperationCallBuilder, [{
|
|
23041
23112
|
key: "operation",
|
|
23042
23113
|
value: function operation(operationId) {
|
|
23043
|
-
var builder = new CallBuilder(this.url.clone());
|
|
23114
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
23044
23115
|
builder.filter.push([operationId]);
|
|
23045
23116
|
return builder;
|
|
23046
23117
|
}
|
|
@@ -23093,10 +23164,10 @@ function orderbook_call_builder_inherits(t, e) { if ("function" != typeof e && n
|
|
|
23093
23164
|
function orderbook_call_builder_setPrototypeOf(t, e) { return orderbook_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, orderbook_call_builder_setPrototypeOf(t, e); }
|
|
23094
23165
|
|
|
23095
23166
|
var OrderbookCallBuilder = function (_CallBuilder) {
|
|
23096
|
-
function OrderbookCallBuilder(serverUrl, selling, buying) {
|
|
23167
|
+
function OrderbookCallBuilder(serverUrl, httpClient, selling, buying) {
|
|
23097
23168
|
var _this;
|
|
23098
23169
|
orderbook_call_builder_classCallCheck(this, OrderbookCallBuilder);
|
|
23099
|
-
_this = orderbook_call_builder_callSuper(this, OrderbookCallBuilder, [serverUrl]);
|
|
23170
|
+
_this = orderbook_call_builder_callSuper(this, OrderbookCallBuilder, [serverUrl, httpClient]);
|
|
23100
23171
|
_this.url.segment("order_book");
|
|
23101
23172
|
if (!selling.isNative()) {
|
|
23102
23173
|
_this.url.setQuery("selling_asset_type", selling.getAssetType());
|
|
@@ -23133,10 +23204,10 @@ function payment_call_builder_inherits(t, e) { if ("function" != typeof e && nul
|
|
|
23133
23204
|
function payment_call_builder_setPrototypeOf(t, e) { return payment_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, payment_call_builder_setPrototypeOf(t, e); }
|
|
23134
23205
|
|
|
23135
23206
|
var PaymentCallBuilder = function (_CallBuilder) {
|
|
23136
|
-
function PaymentCallBuilder(serverUrl) {
|
|
23207
|
+
function PaymentCallBuilder(serverUrl, httpClient) {
|
|
23137
23208
|
var _this;
|
|
23138
23209
|
payment_call_builder_classCallCheck(this, PaymentCallBuilder);
|
|
23139
|
-
_this = payment_call_builder_callSuper(this, PaymentCallBuilder, [serverUrl, "payments"]);
|
|
23210
|
+
_this = payment_call_builder_callSuper(this, PaymentCallBuilder, [serverUrl, httpClient, "payments"]);
|
|
23140
23211
|
_this.url.segment("payments");
|
|
23141
23212
|
return _this;
|
|
23142
23213
|
}
|
|
@@ -23180,10 +23251,10 @@ function strict_receive_path_call_builder_inherits(t, e) { if ("function" != typ
|
|
|
23180
23251
|
function strict_receive_path_call_builder_setPrototypeOf(t, e) { return strict_receive_path_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, strict_receive_path_call_builder_setPrototypeOf(t, e); }
|
|
23181
23252
|
|
|
23182
23253
|
var StrictReceivePathCallBuilder = function (_CallBuilder) {
|
|
23183
|
-
function StrictReceivePathCallBuilder(serverUrl, source, destinationAsset, destinationAmount) {
|
|
23254
|
+
function StrictReceivePathCallBuilder(serverUrl, httpClient, source, destinationAsset, destinationAmount) {
|
|
23184
23255
|
var _this;
|
|
23185
23256
|
strict_receive_path_call_builder_classCallCheck(this, StrictReceivePathCallBuilder);
|
|
23186
|
-
_this = strict_receive_path_call_builder_callSuper(this, StrictReceivePathCallBuilder, [serverUrl]);
|
|
23257
|
+
_this = strict_receive_path_call_builder_callSuper(this, StrictReceivePathCallBuilder, [serverUrl, httpClient]);
|
|
23187
23258
|
_this.url.segment("paths/strict-receive");
|
|
23188
23259
|
if (typeof source === "string") {
|
|
23189
23260
|
_this.url.setQuery("source_account", source);
|
|
@@ -23225,10 +23296,10 @@ function strict_send_path_call_builder_inherits(t, e) { if ("function" != typeof
|
|
|
23225
23296
|
function strict_send_path_call_builder_setPrototypeOf(t, e) { return strict_send_path_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, strict_send_path_call_builder_setPrototypeOf(t, e); }
|
|
23226
23297
|
|
|
23227
23298
|
var StrictSendPathCallBuilder = function (_CallBuilder) {
|
|
23228
|
-
function StrictSendPathCallBuilder(serverUrl, sourceAsset, sourceAmount, destination) {
|
|
23299
|
+
function StrictSendPathCallBuilder(serverUrl, httpClient, sourceAsset, sourceAmount, destination) {
|
|
23229
23300
|
var _this;
|
|
23230
23301
|
strict_send_path_call_builder_classCallCheck(this, StrictSendPathCallBuilder);
|
|
23231
|
-
_this = strict_send_path_call_builder_callSuper(this, StrictSendPathCallBuilder, [serverUrl]);
|
|
23302
|
+
_this = strict_send_path_call_builder_callSuper(this, StrictSendPathCallBuilder, [serverUrl, httpClient]);
|
|
23232
23303
|
_this.url.segment("paths/strict-send");
|
|
23233
23304
|
if (sourceAsset.isNative()) {
|
|
23234
23305
|
_this.url.setQuery("source_asset_type", "native");
|
|
@@ -23272,10 +23343,10 @@ function trade_aggregation_call_builder_setPrototypeOf(t, e) { return trade_aggr
|
|
|
23272
23343
|
|
|
23273
23344
|
var allowedResolutions = [60000, 300000, 900000, 3600000, 86400000, 604800000];
|
|
23274
23345
|
var TradeAggregationCallBuilder = function (_CallBuilder) {
|
|
23275
|
-
function TradeAggregationCallBuilder(serverUrl, base, counter, start_time, end_time, resolution, offset) {
|
|
23346
|
+
function TradeAggregationCallBuilder(serverUrl, httpClient, base, counter, start_time, end_time, resolution, offset) {
|
|
23276
23347
|
var _this;
|
|
23277
23348
|
trade_aggregation_call_builder_classCallCheck(this, TradeAggregationCallBuilder);
|
|
23278
|
-
_this = trade_aggregation_call_builder_callSuper(this, TradeAggregationCallBuilder, [serverUrl]);
|
|
23349
|
+
_this = trade_aggregation_call_builder_callSuper(this, TradeAggregationCallBuilder, [serverUrl, httpClient]);
|
|
23279
23350
|
_this.url.segment("trade_aggregations");
|
|
23280
23351
|
if (!base.isNative()) {
|
|
23281
23352
|
_this.url.setQuery("base_asset_type", base.getAssetType());
|
|
@@ -23341,10 +23412,10 @@ function trades_call_builder_inherits(t, e) { if ("function" != typeof e && null
|
|
|
23341
23412
|
function trades_call_builder_setPrototypeOf(t, e) { return trades_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, trades_call_builder_setPrototypeOf(t, e); }
|
|
23342
23413
|
|
|
23343
23414
|
var TradesCallBuilder = function (_CallBuilder) {
|
|
23344
|
-
function TradesCallBuilder(serverUrl) {
|
|
23415
|
+
function TradesCallBuilder(serverUrl, httpClient) {
|
|
23345
23416
|
var _this;
|
|
23346
23417
|
trades_call_builder_classCallCheck(this, TradesCallBuilder);
|
|
23347
|
-
_this = trades_call_builder_callSuper(this, TradesCallBuilder, [serverUrl, "trades"]);
|
|
23418
|
+
_this = trades_call_builder_callSuper(this, TradesCallBuilder, [serverUrl, httpClient, "trades"]);
|
|
23348
23419
|
_this.url.segment("trades");
|
|
23349
23420
|
return _this;
|
|
23350
23421
|
}
|
|
@@ -23408,10 +23479,10 @@ function transaction_call_builder_inherits(t, e) { if ("function" != typeof e &&
|
|
|
23408
23479
|
function transaction_call_builder_setPrototypeOf(t, e) { return transaction_call_builder_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, transaction_call_builder_setPrototypeOf(t, e); }
|
|
23409
23480
|
|
|
23410
23481
|
var TransactionCallBuilder = function (_CallBuilder) {
|
|
23411
|
-
function TransactionCallBuilder(serverUrl) {
|
|
23482
|
+
function TransactionCallBuilder(serverUrl, httpClient) {
|
|
23412
23483
|
var _this;
|
|
23413
23484
|
transaction_call_builder_classCallCheck(this, TransactionCallBuilder);
|
|
23414
|
-
_this = transaction_call_builder_callSuper(this, TransactionCallBuilder, [serverUrl, "transactions"]);
|
|
23485
|
+
_this = transaction_call_builder_callSuper(this, TransactionCallBuilder, [serverUrl, httpClient, "transactions"]);
|
|
23415
23486
|
_this.url.segment("transactions");
|
|
23416
23487
|
return _this;
|
|
23417
23488
|
}
|
|
@@ -23419,7 +23490,7 @@ var TransactionCallBuilder = function (_CallBuilder) {
|
|
|
23419
23490
|
return transaction_call_builder_createClass(TransactionCallBuilder, [{
|
|
23420
23491
|
key: "transaction",
|
|
23421
23492
|
value: function transaction(transactionId) {
|
|
23422
|
-
var builder = new CallBuilder(this.url.clone());
|
|
23493
|
+
var builder = new CallBuilder(this.url.clone(), this.httpClient);
|
|
23423
23494
|
builder.filter.push([transactionId]);
|
|
23424
23495
|
return builder;
|
|
23425
23496
|
}
|
|
@@ -23453,9 +23524,9 @@ var TransactionCallBuilder = function (_CallBuilder) {
|
|
|
23453
23524
|
}(CallBuilder);
|
|
23454
23525
|
;// ./src/horizon/server.ts
|
|
23455
23526
|
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); }
|
|
23456
|
-
function
|
|
23457
|
-
function
|
|
23458
|
-
function
|
|
23527
|
+
function server_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23528
|
+
function server_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? server_ownKeys(Object(t), !0).forEach(function (r) { server_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : server_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23529
|
+
function server_defineProperty(e, r, t) { return (r = server_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23459
23530
|
function server_regenerator() { var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return server_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (server_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, server_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, server_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), server_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", server_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), server_regeneratorDefine2(u), server_regeneratorDefine2(u, o, "Generator"), server_regeneratorDefine2(u, n, function () { return this; }), server_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (server_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
23460
23531
|
function server_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } server_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { server_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, server_regeneratorDefine2(e, r, n, t); }
|
|
23461
23532
|
function server_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
@@ -23514,13 +23585,7 @@ var HorizonServer = function () {
|
|
|
23514
23585
|
if (opts.headers) {
|
|
23515
23586
|
Object.assign(customHeaders, opts.headers);
|
|
23516
23587
|
}
|
|
23517
|
-
|
|
23518
|
-
horizon_axios_client.interceptors.request.use(function (config) {
|
|
23519
|
-
config.headers = config.headers || {};
|
|
23520
|
-
config.headers = Object.assign(config.headers, customHeaders);
|
|
23521
|
-
return config;
|
|
23522
|
-
});
|
|
23523
|
-
}
|
|
23588
|
+
this.httpClient = createHttpClient(customHeaders);
|
|
23524
23589
|
if (this.serverURL.protocol() !== "https" && !allowHttp) {
|
|
23525
23590
|
throw new Error("Cannot connect to insecure horizon server");
|
|
23526
23591
|
}
|
|
@@ -23556,7 +23621,7 @@ var HorizonServer = function () {
|
|
|
23556
23621
|
});
|
|
23557
23622
|
case 2:
|
|
23558
23623
|
_context.n = 3;
|
|
23559
|
-
return
|
|
23624
|
+
return this.httpClient.get(this.serverURL.toString());
|
|
23560
23625
|
case 3:
|
|
23561
23626
|
return _context.a(2, this.fetchTimebounds(seconds, true));
|
|
23562
23627
|
}
|
|
@@ -23596,7 +23661,7 @@ var HorizonServer = function () {
|
|
|
23596
23661
|
return server_regenerator().w(function (_context3) {
|
|
23597
23662
|
while (1) switch (_context3.n) {
|
|
23598
23663
|
case 0:
|
|
23599
|
-
cb = new CallBuilder(
|
|
23664
|
+
cb = new CallBuilder(this.serverURL, this.httpClient);
|
|
23600
23665
|
cb.filter.push(["fee_stats"]);
|
|
23601
23666
|
return _context3.a(2, cb.call());
|
|
23602
23667
|
}
|
|
@@ -23615,7 +23680,7 @@ var HorizonServer = function () {
|
|
|
23615
23680
|
return server_regenerator().w(function (_context4) {
|
|
23616
23681
|
while (1) switch (_context4.n) {
|
|
23617
23682
|
case 0:
|
|
23618
|
-
cb = new CallBuilder(
|
|
23683
|
+
cb = new CallBuilder(this.serverURL, this.httpClient);
|
|
23619
23684
|
return _context4.a(2, cb.call());
|
|
23620
23685
|
}
|
|
23621
23686
|
}, _callee4, this);
|
|
@@ -23646,7 +23711,7 @@ var HorizonServer = function () {
|
|
|
23646
23711
|
return this.checkMemoRequired(transaction);
|
|
23647
23712
|
case 1:
|
|
23648
23713
|
tx = encodeURIComponent(transaction.toEnvelope().toXDR().toString("base64"));
|
|
23649
|
-
return _context5.a(2,
|
|
23714
|
+
return _context5.a(2, this.httpClient.post(this.serverURL.segment("transactions").toString(), "tx=".concat(tx), {
|
|
23650
23715
|
timeout: SUBMIT_TRANSACTION_TIMEOUT,
|
|
23651
23716
|
headers: {
|
|
23652
23717
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -23749,7 +23814,7 @@ var HorizonServer = function () {
|
|
|
23749
23814
|
return !!result;
|
|
23750
23815
|
});
|
|
23751
23816
|
}
|
|
23752
|
-
return
|
|
23817
|
+
return server_objectSpread(server_objectSpread({}, response.data), {}, {
|
|
23753
23818
|
offerResults: hasManageOffer ? offerResults : undefined
|
|
23754
23819
|
});
|
|
23755
23820
|
}).catch(function (response) {
|
|
@@ -23787,7 +23852,7 @@ var HorizonServer = function () {
|
|
|
23787
23852
|
return this.checkMemoRequired(transaction);
|
|
23788
23853
|
case 1:
|
|
23789
23854
|
tx = encodeURIComponent(transaction.toEnvelope().toXDR().toString("base64"));
|
|
23790
|
-
return _context6.a(2,
|
|
23855
|
+
return _context6.a(2, this.httpClient.post(this.serverURL.segment("transactions_async").toString(), "tx=".concat(tx), {
|
|
23791
23856
|
headers: {
|
|
23792
23857
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
23793
23858
|
}
|
|
@@ -23810,77 +23875,77 @@ var HorizonServer = function () {
|
|
|
23810
23875
|
}, {
|
|
23811
23876
|
key: "accounts",
|
|
23812
23877
|
value: function accounts() {
|
|
23813
|
-
return new AccountCallBuilder(
|
|
23878
|
+
return new AccountCallBuilder(this.serverURL, this.httpClient);
|
|
23814
23879
|
}
|
|
23815
23880
|
}, {
|
|
23816
23881
|
key: "claimableBalances",
|
|
23817
23882
|
value: function claimableBalances() {
|
|
23818
|
-
return new ClaimableBalanceCallBuilder(
|
|
23883
|
+
return new ClaimableBalanceCallBuilder(this.serverURL, this.httpClient);
|
|
23819
23884
|
}
|
|
23820
23885
|
}, {
|
|
23821
23886
|
key: "ledgers",
|
|
23822
23887
|
value: function ledgers() {
|
|
23823
|
-
return new LedgerCallBuilder(
|
|
23888
|
+
return new LedgerCallBuilder(this.serverURL, this.httpClient);
|
|
23824
23889
|
}
|
|
23825
23890
|
}, {
|
|
23826
23891
|
key: "transactions",
|
|
23827
23892
|
value: function transactions() {
|
|
23828
|
-
return new TransactionCallBuilder(
|
|
23893
|
+
return new TransactionCallBuilder(this.serverURL, this.httpClient);
|
|
23829
23894
|
}
|
|
23830
23895
|
}, {
|
|
23831
23896
|
key: "offers",
|
|
23832
23897
|
value: function offers() {
|
|
23833
|
-
return new OfferCallBuilder(
|
|
23898
|
+
return new OfferCallBuilder(this.serverURL, this.httpClient);
|
|
23834
23899
|
}
|
|
23835
23900
|
}, {
|
|
23836
23901
|
key: "orderbook",
|
|
23837
23902
|
value: function orderbook(selling, buying) {
|
|
23838
|
-
return new OrderbookCallBuilder(
|
|
23903
|
+
return new OrderbookCallBuilder(this.serverURL, this.httpClient, selling, buying);
|
|
23839
23904
|
}
|
|
23840
23905
|
}, {
|
|
23841
23906
|
key: "trades",
|
|
23842
23907
|
value: function trades() {
|
|
23843
|
-
return new TradesCallBuilder(
|
|
23908
|
+
return new TradesCallBuilder(this.serverURL, this.httpClient);
|
|
23844
23909
|
}
|
|
23845
23910
|
}, {
|
|
23846
23911
|
key: "operations",
|
|
23847
23912
|
value: function operations() {
|
|
23848
|
-
return new OperationCallBuilder(
|
|
23913
|
+
return new OperationCallBuilder(this.serverURL, this.httpClient);
|
|
23849
23914
|
}
|
|
23850
23915
|
}, {
|
|
23851
23916
|
key: "liquidityPools",
|
|
23852
23917
|
value: function liquidityPools() {
|
|
23853
|
-
return new LiquidityPoolCallBuilder(
|
|
23918
|
+
return new LiquidityPoolCallBuilder(this.serverURL, this.httpClient);
|
|
23854
23919
|
}
|
|
23855
23920
|
}, {
|
|
23856
23921
|
key: "strictReceivePaths",
|
|
23857
23922
|
value: function strictReceivePaths(source, destinationAsset, destinationAmount) {
|
|
23858
|
-
return new StrictReceivePathCallBuilder(
|
|
23923
|
+
return new StrictReceivePathCallBuilder(this.serverURL, this.httpClient, source, destinationAsset, destinationAmount);
|
|
23859
23924
|
}
|
|
23860
23925
|
}, {
|
|
23861
23926
|
key: "strictSendPaths",
|
|
23862
23927
|
value: function strictSendPaths(sourceAsset, sourceAmount, destination) {
|
|
23863
|
-
return new StrictSendPathCallBuilder(
|
|
23928
|
+
return new StrictSendPathCallBuilder(this.serverURL, this.httpClient, sourceAsset, sourceAmount, destination);
|
|
23864
23929
|
}
|
|
23865
23930
|
}, {
|
|
23866
23931
|
key: "payments",
|
|
23867
23932
|
value: function payments() {
|
|
23868
|
-
return new PaymentCallBuilder(
|
|
23933
|
+
return new PaymentCallBuilder(this.serverURL, this.httpClient);
|
|
23869
23934
|
}
|
|
23870
23935
|
}, {
|
|
23871
23936
|
key: "effects",
|
|
23872
23937
|
value: function effects() {
|
|
23873
|
-
return new EffectCallBuilder(
|
|
23938
|
+
return new EffectCallBuilder(this.serverURL, this.httpClient);
|
|
23874
23939
|
}
|
|
23875
23940
|
}, {
|
|
23876
23941
|
key: "friendbot",
|
|
23877
23942
|
value: function friendbot(address) {
|
|
23878
|
-
return new FriendbotBuilder(
|
|
23943
|
+
return new FriendbotBuilder(this.serverURL, this.httpClient, address);
|
|
23879
23944
|
}
|
|
23880
23945
|
}, {
|
|
23881
23946
|
key: "assets",
|
|
23882
23947
|
value: function assets() {
|
|
23883
|
-
return new AssetsCallBuilder(
|
|
23948
|
+
return new AssetsCallBuilder(this.serverURL, this.httpClient);
|
|
23884
23949
|
}
|
|
23885
23950
|
}, {
|
|
23886
23951
|
key: "loadAccount",
|
|
@@ -23906,7 +23971,7 @@ var HorizonServer = function () {
|
|
|
23906
23971
|
}, {
|
|
23907
23972
|
key: "tradeAggregation",
|
|
23908
23973
|
value: function tradeAggregation(base, counter, start_time, end_time, resolution, offset) {
|
|
23909
|
-
return new TradeAggregationCallBuilder(
|
|
23974
|
+
return new TradeAggregationCallBuilder(this.serverURL, this.httpClient, base, counter, start_time, end_time, resolution, offset);
|
|
23910
23975
|
}
|
|
23911
23976
|
}, {
|
|
23912
23977
|
key: "checkMemoRequired",
|
|
@@ -24017,6 +24082,7 @@ var HorizonServer = function () {
|
|
|
24017
24082
|
"use strict";
|
|
24018
24083
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24019
24084
|
/* harmony export */ $D: () => (/* binding */ parseRawLedgerEntries),
|
|
24085
|
+
/* harmony export */ $E: () => (/* binding */ parseRawLedger),
|
|
24020
24086
|
/* harmony export */ Af: () => (/* binding */ parseRawSendTransaction),
|
|
24021
24087
|
/* harmony export */ WC: () => (/* binding */ parseTransactionInfo),
|
|
24022
24088
|
/* harmony export */ fG: () => (/* binding */ parseRawEvents),
|
|
@@ -24190,6 +24256,28 @@ function parseRawSimulation(sim) {
|
|
|
24190
24256
|
}
|
|
24191
24257
|
return parseSuccessful(sim, base);
|
|
24192
24258
|
}
|
|
24259
|
+
function parseRawLedger(raw) {
|
|
24260
|
+
if (!raw.metadataXdr || !raw.headerXdr) {
|
|
24261
|
+
var missingFields;
|
|
24262
|
+
if (!raw.metadataXdr && !raw.headerXdr) {
|
|
24263
|
+
missingFields = "metadataXdr and headerXdr";
|
|
24264
|
+
} else if (!raw.metadataXdr) {
|
|
24265
|
+
missingFields = "metadataXdr";
|
|
24266
|
+
} else {
|
|
24267
|
+
missingFields = "headerXdr";
|
|
24268
|
+
}
|
|
24269
|
+
throw new TypeError("invalid ledger missing fields: ".concat(missingFields));
|
|
24270
|
+
}
|
|
24271
|
+
var metadataXdr = _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_0__.xdr.LedgerCloseMeta.fromXDR(raw.metadataXdr, "base64");
|
|
24272
|
+
var headerXdr = _stellar_stellar_base__WEBPACK_IMPORTED_MODULE_0__.xdr.LedgerHeaderHistoryEntry.fromXDR(raw.headerXdr, "base64");
|
|
24273
|
+
return {
|
|
24274
|
+
hash: raw.hash,
|
|
24275
|
+
sequence: raw.sequence,
|
|
24276
|
+
ledgerCloseTime: raw.ledgerCloseTime,
|
|
24277
|
+
metadataXdr: metadataXdr,
|
|
24278
|
+
headerXdr: headerXdr
|
|
24279
|
+
};
|
|
24280
|
+
}
|
|
24193
24281
|
|
|
24194
24282
|
/***/ }),
|
|
24195
24283
|
|
|
@@ -24423,10 +24511,7 @@ var NetworkError = function (_Error) {
|
|
|
24423
24511
|
function NetworkError(message, response) {
|
|
24424
24512
|
var _this;
|
|
24425
24513
|
_classCallCheck(this, NetworkError);
|
|
24426
|
-
var trueProto = (this instanceof NetworkError ? this.constructor : void 0).prototype;
|
|
24427
24514
|
_this = _callSuper(this, NetworkError, [message]);
|
|
24428
|
-
_this.__proto__ = trueProto;
|
|
24429
|
-
_this.constructor = NetworkError;
|
|
24430
24515
|
_this.response = response;
|
|
24431
24516
|
return _this;
|
|
24432
24517
|
}
|
|
@@ -24454,15 +24539,9 @@ function not_found_inherits(t, e) { if ("function" != typeof e && null !== e) th
|
|
|
24454
24539
|
function not_found_setPrototypeOf(t, e) { return not_found_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, not_found_setPrototypeOf(t, e); }
|
|
24455
24540
|
|
|
24456
24541
|
var NotFoundError = function (_NetworkError) {
|
|
24457
|
-
function NotFoundError(
|
|
24458
|
-
var _this;
|
|
24542
|
+
function NotFoundError() {
|
|
24459
24543
|
not_found_classCallCheck(this, NotFoundError);
|
|
24460
|
-
|
|
24461
|
-
_this = not_found_callSuper(this, NotFoundError, [message, response]);
|
|
24462
|
-
_this.__proto__ = trueProto;
|
|
24463
|
-
_this.constructor = NotFoundError;
|
|
24464
|
-
_this.name = "NotFoundError";
|
|
24465
|
-
return _this;
|
|
24544
|
+
return not_found_callSuper(this, NotFoundError, arguments);
|
|
24466
24545
|
}
|
|
24467
24546
|
not_found_inherits(NotFoundError, _NetworkError);
|
|
24468
24547
|
return not_found_createClass(NotFoundError);
|
|
@@ -24483,15 +24562,9 @@ function bad_request_inherits(t, e) { if ("function" != typeof e && null !== e)
|
|
|
24483
24562
|
function bad_request_setPrototypeOf(t, e) { return bad_request_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, bad_request_setPrototypeOf(t, e); }
|
|
24484
24563
|
|
|
24485
24564
|
var BadRequestError = function (_NetworkError) {
|
|
24486
|
-
function BadRequestError(
|
|
24487
|
-
var _this;
|
|
24565
|
+
function BadRequestError() {
|
|
24488
24566
|
bad_request_classCallCheck(this, BadRequestError);
|
|
24489
|
-
|
|
24490
|
-
_this = bad_request_callSuper(this, BadRequestError, [message, response]);
|
|
24491
|
-
_this.__proto__ = trueProto;
|
|
24492
|
-
_this.constructor = BadRequestError;
|
|
24493
|
-
_this.name = "BadRequestError";
|
|
24494
|
-
return _this;
|
|
24567
|
+
return bad_request_callSuper(this, BadRequestError, arguments);
|
|
24495
24568
|
}
|
|
24496
24569
|
bad_request_inherits(BadRequestError, _NetworkError);
|
|
24497
24570
|
return bad_request_createClass(BadRequestError);
|
|
@@ -24512,15 +24585,9 @@ function bad_response_inherits(t, e) { if ("function" != typeof e && null !== e)
|
|
|
24512
24585
|
function bad_response_setPrototypeOf(t, e) { return bad_response_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, bad_response_setPrototypeOf(t, e); }
|
|
24513
24586
|
|
|
24514
24587
|
var BadResponseError = function (_NetworkError) {
|
|
24515
|
-
function BadResponseError(
|
|
24516
|
-
var _this;
|
|
24588
|
+
function BadResponseError() {
|
|
24517
24589
|
bad_response_classCallCheck(this, BadResponseError);
|
|
24518
|
-
|
|
24519
|
-
_this = bad_response_callSuper(this, BadResponseError, [message, response]);
|
|
24520
|
-
_this.__proto__ = trueProto;
|
|
24521
|
-
_this.constructor = BadResponseError;
|
|
24522
|
-
_this.name = "BadResponseError";
|
|
24523
|
-
return _this;
|
|
24590
|
+
return bad_response_callSuper(this, BadResponseError, arguments);
|
|
24524
24591
|
}
|
|
24525
24592
|
bad_response_inherits(BadResponseError, _NetworkError);
|
|
24526
24593
|
return bad_response_createClass(BadResponseError);
|
|
@@ -24546,11 +24613,7 @@ var AccountRequiresMemoError = function (_Error) {
|
|
|
24546
24613
|
function AccountRequiresMemoError(message, accountId, operationIndex) {
|
|
24547
24614
|
var _this;
|
|
24548
24615
|
account_requires_memo_classCallCheck(this, AccountRequiresMemoError);
|
|
24549
|
-
var trueProto = (this instanceof AccountRequiresMemoError ? this.constructor : void 0).prototype;
|
|
24550
24616
|
_this = account_requires_memo_callSuper(this, AccountRequiresMemoError, [message]);
|
|
24551
|
-
_this.__proto__ = trueProto;
|
|
24552
|
-
_this.constructor = AccountRequiresMemoError;
|
|
24553
|
-
_this.name = "AccountRequiresMemoError";
|
|
24554
24617
|
_this.accountId = accountId;
|
|
24555
24618
|
_this.operationIndex = operationIndex;
|
|
24556
24619
|
return _this;
|