@openweb3-io/wallet 0.1.2 → 0.1.3
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/dist/index.d.ts +2 -14
- package/dist/index.js +87 -167
- package/dist/index.js.map +1 -1
- package/dist/openapi/apis/AddressesApi.js +170 -191
- package/dist/openapi/apis/AddressesApi.js.map +1 -1
- package/dist/openapi/apis/CurrenciesApi.js +94 -111
- package/dist/openapi/apis/CurrenciesApi.js.map +1 -1
- package/dist/openapi/apis/ExchangesApi.js +278 -311
- package/dist/openapi/apis/ExchangesApi.js.map +1 -1
- package/dist/openapi/apis/NetworksApi.js +48 -61
- package/dist/openapi/apis/NetworksApi.js.map +1 -1
- package/dist/openapi/apis/RatesApi.js +105 -122
- package/dist/openapi/apis/RatesApi.js.map +1 -1
- package/dist/openapi/apis/TransactionsApi.js +256 -285
- package/dist/openapi/apis/TransactionsApi.js.map +1 -1
- package/dist/openapi/apis/WalletsApi.js +243 -272
- package/dist/openapi/apis/WalletsApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEndpointsApi.js +190 -219
- package/dist/openapi/apis/WebhookEndpointsApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEventTypesApi.js +31 -44
- package/dist/openapi/apis/WebhookEventTypesApi.js.map +1 -1
- package/dist/openapi/apis/WebhookEventsApi.js +83 -100
- package/dist/openapi/apis/WebhookEventsApi.js.map +1 -1
- package/dist/openapi/dist/apis/AddressesApi.d.ts +12 -0
- package/dist/openapi/dist/apis/AddressesApi.js +222 -0
- package/dist/openapi/dist/apis/AddressesApi.js.map +1 -0
- package/dist/openapi/dist/apis/CurrenciesApi.d.ts +10 -0
- package/dist/openapi/dist/apis/CurrenciesApi.js +140 -0
- package/dist/openapi/dist/apis/CurrenciesApi.js.map +1 -0
- package/dist/openapi/dist/apis/ExchangesApi.d.ts +18 -0
- package/dist/openapi/dist/apis/ExchangesApi.js +348 -0
- package/dist/openapi/dist/apis/ExchangesApi.js.map +1 -0
- package/dist/openapi/dist/apis/NetworksApi.d.ts +8 -0
- package/dist/openapi/dist/apis/NetworksApi.js +88 -0
- package/dist/openapi/dist/apis/NetworksApi.js.map +1 -0
- package/dist/openapi/dist/apis/RatesApi.d.ts +10 -0
- package/dist/openapi/dist/apis/RatesApi.js +151 -0
- package/dist/openapi/dist/apis/RatesApi.js.map +1 -0
- package/dist/openapi/dist/apis/TransactionsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/TransactionsApi.js +320 -0
- package/dist/openapi/dist/apis/TransactionsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WalletsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/WalletsApi.js +307 -0
- package/dist/openapi/dist/apis/WalletsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.d.ts +16 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.js +254 -0
- package/dist/openapi/dist/apis/WebhookEndpointsApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.d.ts +8 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.js +71 -0
- package/dist/openapi/dist/apis/WebhookEventTypesApi.js.map +1 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.d.ts +10 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.js +129 -0
- package/dist/openapi/dist/apis/WebhookEventsApi.js.map +1 -0
- package/dist/openapi/dist/apis/baseapi.d.ts +14 -0
- package/dist/openapi/dist/apis/baseapi.js +25 -0
- package/dist/openapi/dist/apis/baseapi.js.map +1 -0
- package/dist/openapi/dist/apis/exception.d.ts +5 -0
- package/dist/openapi/dist/apis/exception.js +12 -0
- package/dist/openapi/dist/apis/exception.js.map +1 -0
- package/dist/openapi/dist/auth/auth.d.ts +9 -0
- package/dist/openapi/dist/auth/auth.js +27 -0
- package/dist/openapi/dist/auth/auth.js.map +1 -0
- package/dist/openapi/dist/configuration.d.ts +6 -0
- package/dist/openapi/dist/configuration.js +21 -0
- package/dist/openapi/dist/configuration.js.map +1 -0
- package/dist/openapi/dist/http/http.d.ts +40 -0
- package/dist/openapi/dist/http/http.js +171 -0
- package/dist/openapi/dist/http/http.js.map +1 -0
- package/dist/openapi/dist/http/isomorphic-fetch.d.ts +3 -0
- package/dist/openapi/dist/http/isomorphic-fetch.js +31 -0
- package/dist/openapi/dist/http/isomorphic-fetch.js.map +1 -0
- package/dist/openapi/dist/index.d.ts +7 -0
- package/dist/openapi/dist/index.js +31 -0
- package/dist/openapi/dist/index.js.map +1 -0
- package/dist/openapi/dist/middleware.d.ts +6 -0
- package/dist/openapi/dist/middleware.js +17 -0
- package/dist/openapi/dist/middleware.js.map +1 -0
- package/dist/openapi/dist/models/Account.d.ts +17 -0
- package/dist/openapi/dist/models/Account.js +51 -0
- package/dist/openapi/dist/models/Account.js.map +1 -0
- package/dist/openapi/dist/models/Address.d.ts +17 -0
- package/dist/openapi/dist/models/Address.js +33 -0
- package/dist/openapi/dist/models/Address.js.map +1 -0
- package/dist/openapi/dist/models/ChainNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/ChainNetwork.js +63 -0
- package/dist/openapi/dist/models/ChainNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CreateEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/CreateEndpoint.js +57 -0
- package/dist/openapi/dist/models/CreateEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/CreateExchange.d.ts +17 -0
- package/dist/openapi/dist/models/CreateExchange.js +45 -0
- package/dist/openapi/dist/models/CreateExchange.js.map +1 -0
- package/dist/openapi/dist/models/CreateTransferRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateTransferRequest.js +39 -0
- package/dist/openapi/dist/models/CreateTransferRequest.js.map +1 -0
- package/dist/openapi/dist/models/CreateTransferResponse.d.ts +17 -0
- package/dist/openapi/dist/models/CreateTransferResponse.js +21 -0
- package/dist/openapi/dist/models/CreateTransferResponse.js.map +1 -0
- package/dist/openapi/dist/models/CreateWalletRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWalletRequest.js +27 -0
- package/dist/openapi/dist/models/CreateWalletRequest.js.map +1 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.js +21 -0
- package/dist/openapi/dist/models/CreateWithdrawReply.js.map +1 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.d.ts +17 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.js +57 -0
- package/dist/openapi/dist/models/CreateWithdrawRequest.js.map +1 -0
- package/dist/openapi/dist/models/Currency.d.ts +17 -0
- package/dist/openapi/dist/models/Currency.js +135 -0
- package/dist/openapi/dist/models/Currency.js.map +1 -0
- package/dist/openapi/dist/models/CurrencyNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/CurrencyNetwork.js +135 -0
- package/dist/openapi/dist/models/CurrencyNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CurrencyPair.d.ts +17 -0
- package/dist/openapi/dist/models/CurrencyPair.js +27 -0
- package/dist/openapi/dist/models/CurrencyPair.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageAccount.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageAccount.js +39 -0
- package/dist/openapi/dist/models/CursorPageAccount.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageAddress.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageAddress.js +39 -0
- package/dist/openapi/dist/models/CursorPageAddress.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.js +39 -0
- package/dist/openapi/dist/models/CursorPageChainNetwork.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageCurrency.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageCurrency.js +39 -0
- package/dist/openapi/dist/models/CursorPageCurrency.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.js +39 -0
- package/dist/openapi/dist/models/CursorPageEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageExchange.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageExchange.js +39 -0
- package/dist/openapi/dist/models/CursorPageExchange.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageTransaction.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageTransaction.js +39 -0
- package/dist/openapi/dist/models/CursorPageTransaction.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageWallet.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageWallet.js +39 -0
- package/dist/openapi/dist/models/CursorPageWallet.js.map +1 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.d.ts +17 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.js +39 -0
- package/dist/openapi/dist/models/CursorPageWebhookEvent.js.map +1 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.d.ts +17 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.js +21 -0
- package/dist/openapi/dist/models/DeleteWebhookEndpointResponse.js.map +1 -0
- package/dist/openapi/dist/models/Endpoint.d.ts +17 -0
- package/dist/openapi/dist/models/Endpoint.js +69 -0
- package/dist/openapi/dist/models/Endpoint.js.map +1 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.js +45 -0
- package/dist/openapi/dist/models/EstimateFeeRequest.js.map +1 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.js +27 -0
- package/dist/openapi/dist/models/EstimateFeeResponse.js.map +1 -0
- package/dist/openapi/dist/models/EstimateResponse.d.ts +17 -0
- package/dist/openapi/dist/models/EstimateResponse.js +45 -0
- package/dist/openapi/dist/models/EstimateResponse.js.map +1 -0
- package/dist/openapi/dist/models/EventType.d.ts +17 -0
- package/dist/openapi/dist/models/EventType.js +27 -0
- package/dist/openapi/dist/models/EventType.js.map +1 -0
- package/dist/openapi/dist/models/Exchange.d.ts +17 -0
- package/dist/openapi/dist/models/Exchange.js +99 -0
- package/dist/openapi/dist/models/Exchange.js.map +1 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.d.ts +17 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.js +27 -0
- package/dist/openapi/dist/models/ExchangeCurrencyPairs.js.map +1 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.js +21 -0
- package/dist/openapi/dist/models/ExchangeSubmitResponse.js.map +1 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.d.ts +17 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.js +51 -0
- package/dist/openapi/dist/models/GetCurrencyPairQuotaResponse.js.map +1 -0
- package/dist/openapi/dist/models/GetRatesRequest.d.ts +17 -0
- package/dist/openapi/dist/models/GetRatesRequest.js +21 -0
- package/dist/openapi/dist/models/GetRatesRequest.js.map +1 -0
- package/dist/openapi/dist/models/GetRatesResponse.d.ts +17 -0
- package/dist/openapi/dist/models/GetRatesResponse.js +21 -0
- package/dist/openapi/dist/models/GetRatesResponse.js.map +1 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.js +21 -0
- package/dist/openapi/dist/models/ListExchangeCurrencyPairsResponse.js.map +1 -0
- package/dist/openapi/dist/models/ModelError.d.ts +17 -0
- package/dist/openapi/dist/models/ModelError.js +27 -0
- package/dist/openapi/dist/models/ModelError.js.map +1 -0
- package/dist/openapi/dist/models/ObjectSerializer.d.ts +55 -0
- package/dist/openapi/dist/models/ObjectSerializer.js +330 -0
- package/dist/openapi/dist/models/ObjectSerializer.js.map +1 -0
- package/dist/openapi/dist/models/Rate.d.ts +17 -0
- package/dist/openapi/dist/models/Rate.js +27 -0
- package/dist/openapi/dist/models/Rate.js.map +1 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.d.ts +17 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.js +27 -0
- package/dist/openapi/dist/models/ResendWebhookEventRequest.js.map +1 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.d.ts +17 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.js +21 -0
- package/dist/openapi/dist/models/ResendWebhookEventResponse.js.map +1 -0
- package/dist/openapi/dist/models/Transaction.d.ts +17 -0
- package/dist/openapi/dist/models/Transaction.js +99 -0
- package/dist/openapi/dist/models/Transaction.js.map +1 -0
- package/dist/openapi/dist/models/TransactionDirection.d.ts +0 -0
- package/dist/openapi/dist/models/TransactionDirection.js +2 -0
- package/dist/openapi/dist/models/TransactionDirection.js.map +1 -0
- package/dist/openapi/dist/models/TransactionStatus.d.ts +0 -0
- package/dist/openapi/dist/models/TransactionStatus.js +2 -0
- package/dist/openapi/dist/models/TransactionStatus.js.map +1 -0
- package/dist/openapi/dist/models/UpdateEndpoint.d.ts +17 -0
- package/dist/openapi/dist/models/UpdateEndpoint.js +57 -0
- package/dist/openapi/dist/models/UpdateEndpoint.js.map +1 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.d.ts +17 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.js +27 -0
- package/dist/openapi/dist/models/UpdateWalletRequest.js.map +1 -0
- package/dist/openapi/dist/models/Wallet.d.ts +17 -0
- package/dist/openapi/dist/models/Wallet.js +39 -0
- package/dist/openapi/dist/models/Wallet.js.map +1 -0
- package/dist/openapi/dist/models/WebhookEvent.d.ts +17 -0
- package/dist/openapi/dist/models/WebhookEvent.js +39 -0
- package/dist/openapi/dist/models/WebhookEvent.js.map +1 -0
- package/dist/openapi/dist/models/all.d.ts +46 -0
- package/dist/openapi/dist/models/all.js +59 -0
- package/dist/openapi/dist/models/all.js.map +1 -0
- package/dist/openapi/dist/rxjsStub.d.ts +10 -0
- package/dist/openapi/dist/rxjsStub.js +32 -0
- package/dist/openapi/dist/rxjsStub.js.map +1 -0
- package/dist/openapi/dist/servers.d.ts +12 -0
- package/dist/openapi/dist/servers.js +31 -0
- package/dist/openapi/dist/servers.js.map +1 -0
- package/dist/openapi/dist/types/ObjectParamAPI.d.ts +82 -0
- package/dist/openapi/dist/types/ObjectParamAPI.js +170 -0
- package/dist/openapi/dist/types/ObjectParamAPI.js.map +1 -0
- package/dist/openapi/dist/types/ObservableAPI.d.ts +92 -0
- package/dist/openapi/dist/types/ObservableAPI.js +576 -0
- package/dist/openapi/dist/types/ObservableAPI.js.map +1 -0
- package/dist/openapi/dist/types/PromiseAPI.d.ts +82 -0
- package/dist/openapi/dist/types/PromiseAPI.js +202 -0
- package/dist/openapi/dist/types/PromiseAPI.js.map +1 -0
- package/dist/openapi/dist/util.d.ts +1 -0
- package/dist/openapi/dist/util.js +25 -0
- package/dist/openapi/dist/util.js.map +1 -0
- package/dist/openapi/http/http.js +23 -36
- package/dist/openapi/http/http.js.map +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +0 -1
- package/dist/openapi/index.js.map +1 -1
- package/dist/openapi/models/CreateTransferRequest.d.ts +3 -0
- package/dist/openapi/models/CreateTransferRequest.js +6 -0
- package/dist/openapi/models/CreateTransferRequest.js.map +1 -1
- package/dist/openapi/models/Currency.d.ts +2 -0
- package/dist/openapi/models/Currency.js +12 -0
- package/dist/openapi/models/Currency.js.map +1 -1
- package/dist/openapi/models/CurrencyNetwork.d.ts +1 -0
- package/dist/openapi/models/CurrencyNetwork.js +6 -0
- package/dist/openapi/models/CurrencyNetwork.js.map +1 -1
- package/dist/openapi/models/EstimateFeeResponse.js.map +1 -1
- package/dist/openapi/models/ObjectSerializer.d.ts +0 -7
- package/dist/openapi/models/ObjectSerializer.js +0 -21
- package/dist/openapi/models/ObjectSerializer.js.map +1 -1
- package/dist/openapi/models/all.d.ts +0 -7
- package/dist/openapi/models/all.js +0 -7
- package/dist/openapi/models/all.js.map +1 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +0 -37
- package/dist/openapi/types/ObjectParamAPI.js +14 -39
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
- package/dist/openapi/types/ObservableAPI.d.ts +0 -19
- package/dist/openapi/types/ObservableAPI.js +1 -100
- package/dist/openapi/types/ObservableAPI.js.map +1 -1
- package/dist/openapi/types/PromiseAPI.d.ts +0 -17
- package/dist/openapi/types/PromiseAPI.js +14 -45
- package/dist/openapi/types/PromiseAPI.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NetworksApiResponseProcessor = exports.NetworksApiRequestFactory = void 0;
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try {
|
|
8
|
+
step(generator.next(value));
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
reject(e);
|
|
12
|
+
} }
|
|
13
|
+
function rejected(value) { try {
|
|
14
|
+
step(generator["throw"](value));
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
reject(e);
|
|
18
|
+
} }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const baseapi_1 = require("./baseapi");
|
|
24
|
+
const http_1 = require("../http/http");
|
|
25
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
26
|
+
const exception_1 = require("./exception");
|
|
27
|
+
const util_1 = require("../util");
|
|
28
|
+
class NetworksApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
29
|
+
v1NetworksList(limit, cursor, _options) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let _config = _options || this.configuration;
|
|
32
|
+
if (limit === null || limit === undefined) {
|
|
33
|
+
throw new baseapi_1.RequiredError('Required parameter limit was null or undefined when calling v1NetworksList.');
|
|
34
|
+
}
|
|
35
|
+
const localVarPath = '/api/v1/networks';
|
|
36
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
37
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
38
|
+
if (cursor !== undefined) {
|
|
39
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
40
|
+
}
|
|
41
|
+
if (limit !== undefined) {
|
|
42
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
43
|
+
}
|
|
44
|
+
let authMethod = null;
|
|
45
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
46
|
+
if (authMethod) {
|
|
47
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
48
|
+
}
|
|
49
|
+
return requestContext;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.NetworksApiRequestFactory = NetworksApiRequestFactory;
|
|
54
|
+
class NetworksApiResponseProcessor {
|
|
55
|
+
v1NetworksList(response) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
58
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
59
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CursorPageChainNetwork", "");
|
|
60
|
+
return body;
|
|
61
|
+
}
|
|
62
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
63
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
64
|
+
throw new exception_1.ApiException(400, body);
|
|
65
|
+
}
|
|
66
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
67
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
68
|
+
throw new exception_1.ApiException(401, body);
|
|
69
|
+
}
|
|
70
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
71
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
72
|
+
throw new exception_1.ApiException(404, body);
|
|
73
|
+
}
|
|
74
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
75
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
76
|
+
throw new exception_1.ApiException(500, body);
|
|
77
|
+
}
|
|
78
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
79
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CursorPageChainNetwork", "");
|
|
80
|
+
return body;
|
|
81
|
+
}
|
|
82
|
+
let body = response.body || "";
|
|
83
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.NetworksApiResponseProcessor = NetworksApiResponseProcessor;
|
|
88
|
+
//# sourceMappingURL=NetworksApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworksApi.js","sourceRoot":"","sources":["../../../../src/open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AC/C,MAAM,IAAI,GAAG,mCAAgB,CAAC,WAAW,CAAC,mCAAgB,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;gBACxH,MAAM,IAAI,wBAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aACrC;YACD,IAAI,oBAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,EAAE;gBAC/C,MAAM,IAAI,GAAG,mCAAgB,CAAC,WAAW,CAAC,mCAAgB,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;gBACxH,MAAM,IAAI,wBAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aACrC;YACD,IAAI,QAAQ,CAAC,cAAc,IAAI,GAAG,IAAI,QAAQ,CAAC,cAAc,IAAI,GAAG,EAAE;gBAClE,MAAM,IAAI,GAAG,mCAAgB,CAAC,WAAW,CAAC,mCAAgB,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,EAAE,wBAAwB,EAAE,EAAE,CAAC,CAAC;gBACzI,OAAO,IAAI,CAAC;aACf;YACD,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/B,MAAM,IAAI,wBAAY,CAAC,QAAQ,CAAC,cAAc,EAAE,oCAAoC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACxG,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAhCD,oEAgCC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class RatesApiRequestFactory extends BaseAPIRequestFactory {
|
|
2
|
+
constructor(configuration: import("..").Configuration);
|
|
3
|
+
v1RatesEstimate(baseAmount: any, baseCurrency: any, toCurrency: any, _options: any): any;
|
|
4
|
+
v1RatesList(request: any, _options: any): any;
|
|
5
|
+
}
|
|
6
|
+
export class RatesApiResponseProcessor {
|
|
7
|
+
v1RatesEstimate(response: any): any;
|
|
8
|
+
v1RatesList(response: any): any;
|
|
9
|
+
}
|
|
10
|
+
import { BaseAPIRequestFactory } from "./baseapi";
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RatesApiResponseProcessor = exports.RatesApiRequestFactory = void 0;
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try {
|
|
8
|
+
step(generator.next(value));
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
reject(e);
|
|
12
|
+
} }
|
|
13
|
+
function rejected(value) { try {
|
|
14
|
+
step(generator["throw"](value));
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
reject(e);
|
|
18
|
+
} }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const baseapi_1 = require("./baseapi");
|
|
24
|
+
const http_1 = require("../http/http");
|
|
25
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
26
|
+
const exception_1 = require("./exception");
|
|
27
|
+
const util_1 = require("../util");
|
|
28
|
+
class RatesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
29
|
+
v1RatesEstimate(baseAmount, baseCurrency, toCurrency, _options) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let _config = _options || this.configuration;
|
|
32
|
+
if (baseAmount === null || baseAmount === undefined) {
|
|
33
|
+
throw new baseapi_1.RequiredError('Required parameter baseAmount was null or undefined when calling v1RatesEstimate.');
|
|
34
|
+
}
|
|
35
|
+
if (baseCurrency === null || baseCurrency === undefined) {
|
|
36
|
+
throw new baseapi_1.RequiredError('Required parameter baseCurrency was null or undefined when calling v1RatesEstimate.');
|
|
37
|
+
}
|
|
38
|
+
if (toCurrency === null || toCurrency === undefined) {
|
|
39
|
+
throw new baseapi_1.RequiredError('Required parameter toCurrency was null or undefined when calling v1RatesEstimate.');
|
|
40
|
+
}
|
|
41
|
+
const localVarPath = '/api/v1/rates/estimate';
|
|
42
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
43
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
44
|
+
if (baseAmount !== undefined) {
|
|
45
|
+
requestContext.setQueryParam("base_amount", ObjectSerializer_1.ObjectSerializer.serialize(baseAmount, "string", ""));
|
|
46
|
+
}
|
|
47
|
+
if (baseCurrency !== undefined) {
|
|
48
|
+
requestContext.setQueryParam("base_currency", ObjectSerializer_1.ObjectSerializer.serialize(baseCurrency, "string", ""));
|
|
49
|
+
}
|
|
50
|
+
if (toCurrency !== undefined) {
|
|
51
|
+
requestContext.setQueryParam("to_currency", ObjectSerializer_1.ObjectSerializer.serialize(toCurrency, "string", ""));
|
|
52
|
+
}
|
|
53
|
+
let authMethod = null;
|
|
54
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
55
|
+
if (authMethod) {
|
|
56
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
57
|
+
}
|
|
58
|
+
return requestContext;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
v1RatesList(request, _options) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
let _config = _options || this.configuration;
|
|
64
|
+
if (request === null || request === undefined) {
|
|
65
|
+
throw new baseapi_1.RequiredError('Required parameter request was null or undefined when calling v1RatesList.');
|
|
66
|
+
}
|
|
67
|
+
const localVarPath = '/api/v1/rates';
|
|
68
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
69
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
70
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
71
|
+
"application/json"
|
|
72
|
+
]);
|
|
73
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
74
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(request, "GetRatesRequest", ""), contentType);
|
|
75
|
+
requestContext.setBody(serializedBody);
|
|
76
|
+
let authMethod = null;
|
|
77
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
78
|
+
if (authMethod) {
|
|
79
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
80
|
+
}
|
|
81
|
+
return requestContext;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.RatesApiRequestFactory = RatesApiRequestFactory;
|
|
86
|
+
class RatesApiResponseProcessor {
|
|
87
|
+
v1RatesEstimate(response) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
90
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
91
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EstimateResponse", "");
|
|
92
|
+
return body;
|
|
93
|
+
}
|
|
94
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
95
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
96
|
+
throw new exception_1.ApiException(400, body);
|
|
97
|
+
}
|
|
98
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
99
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
100
|
+
throw new exception_1.ApiException(401, body);
|
|
101
|
+
}
|
|
102
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
103
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
104
|
+
throw new exception_1.ApiException(404, body);
|
|
105
|
+
}
|
|
106
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
107
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
108
|
+
throw new exception_1.ApiException(500, body);
|
|
109
|
+
}
|
|
110
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
111
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EstimateResponse", "");
|
|
112
|
+
return body;
|
|
113
|
+
}
|
|
114
|
+
let body = response.body || "";
|
|
115
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
v1RatesList(response) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
121
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
122
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetRatesResponse", "");
|
|
123
|
+
return body;
|
|
124
|
+
}
|
|
125
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
126
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
127
|
+
throw new exception_1.ApiException(400, body);
|
|
128
|
+
}
|
|
129
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
130
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
131
|
+
throw new exception_1.ApiException(401, body);
|
|
132
|
+
}
|
|
133
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
134
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
135
|
+
throw new exception_1.ApiException(404, body);
|
|
136
|
+
}
|
|
137
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
138
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
139
|
+
throw new exception_1.ApiException(500, body);
|
|
140
|
+
}
|
|
141
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
142
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetRatesResponse", "");
|
|
143
|
+
return body;
|
|
144
|
+
}
|
|
145
|
+
let body = response.body || "";
|
|
146
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.RatesApiResponseProcessor = RatesApiResponseProcessor;
|
|
151
|
+
//# sourceMappingURL=RatesApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatesApi.js","sourceRoot":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);
|
|
3
|
+
v1TransactionsEstimateFee(request: any, _options: any): any;
|
|
4
|
+
v1TransactionsList(limit: any, currency: any, cursor: any, direction: any, gateway: any, network: any, status: any, txhash: any, walletId: any, _options: any): any;
|
|
5
|
+
v1TransactionsRetrieve(transactionId: any, _options: any): any;
|
|
6
|
+
v1TransactionsTransfer(request: any, _options: any): any;
|
|
7
|
+
v1TransactionsWithdraw(request: any, _options: any): any;
|
|
8
|
+
}
|
|
9
|
+
export class TransactionsApiResponseProcessor {
|
|
10
|
+
v1TransactionsEstimateFee(response: any): any;
|
|
11
|
+
v1TransactionsList(response: any): any;
|
|
12
|
+
v1TransactionsRetrieve(response: any): any;
|
|
13
|
+
v1TransactionsTransfer(response: any): any;
|
|
14
|
+
v1TransactionsWithdraw(response: any): any;
|
|
15
|
+
}
|
|
16
|
+
import { BaseAPIRequestFactory } from "./baseapi";
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionsApiResponseProcessor = exports.TransactionsApiRequestFactory = void 0;
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try {
|
|
8
|
+
step(generator.next(value));
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
reject(e);
|
|
12
|
+
} }
|
|
13
|
+
function rejected(value) { try {
|
|
14
|
+
step(generator["throw"](value));
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
reject(e);
|
|
18
|
+
} }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const baseapi_1 = require("./baseapi");
|
|
24
|
+
const http_1 = require("../http/http");
|
|
25
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
26
|
+
const exception_1 = require("./exception");
|
|
27
|
+
const util_1 = require("../util");
|
|
28
|
+
class TransactionsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
29
|
+
v1TransactionsEstimateFee(request, _options) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let _config = _options || this.configuration;
|
|
32
|
+
if (request === null || request === undefined) {
|
|
33
|
+
throw new baseapi_1.RequiredError('Required parameter request was null or undefined when calling v1TransactionsEstimateFee.');
|
|
34
|
+
}
|
|
35
|
+
const localVarPath = '/api/v1/transactions/estimate_fee';
|
|
36
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
37
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
38
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
39
|
+
"application/json"
|
|
40
|
+
]);
|
|
41
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
42
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(request, "EstimateFeeRequest", ""), contentType);
|
|
43
|
+
requestContext.setBody(serializedBody);
|
|
44
|
+
let authMethod = null;
|
|
45
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
46
|
+
if (authMethod) {
|
|
47
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
48
|
+
}
|
|
49
|
+
return requestContext;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
v1TransactionsList(limit, currency, cursor, direction, gateway, network, status, txhash, walletId, _options) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
let _config = _options || this.configuration;
|
|
55
|
+
if (limit === null || limit === undefined) {
|
|
56
|
+
throw new baseapi_1.RequiredError('Required parameter limit was null or undefined when calling v1TransactionsList.');
|
|
57
|
+
}
|
|
58
|
+
const localVarPath = '/api/v1/transactions';
|
|
59
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
60
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
61
|
+
if (currency !== undefined) {
|
|
62
|
+
requestContext.setQueryParam("currency", ObjectSerializer_1.ObjectSerializer.serialize(currency, "string", ""));
|
|
63
|
+
}
|
|
64
|
+
if (cursor !== undefined) {
|
|
65
|
+
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
66
|
+
}
|
|
67
|
+
if (direction !== undefined) {
|
|
68
|
+
requestContext.setQueryParam("direction", ObjectSerializer_1.ObjectSerializer.serialize(direction, "'OUT' | 'IN'", ""));
|
|
69
|
+
}
|
|
70
|
+
if (gateway !== undefined) {
|
|
71
|
+
requestContext.setQueryParam("gateway", ObjectSerializer_1.ObjectSerializer.serialize(gateway, "string", ""));
|
|
72
|
+
}
|
|
73
|
+
if (limit !== undefined) {
|
|
74
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
75
|
+
}
|
|
76
|
+
if (network !== undefined) {
|
|
77
|
+
requestContext.setQueryParam("network", ObjectSerializer_1.ObjectSerializer.serialize(network, "string", ""));
|
|
78
|
+
}
|
|
79
|
+
if (status !== undefined) {
|
|
80
|
+
requestContext.setQueryParam("status", ObjectSerializer_1.ObjectSerializer.serialize(status, "'PROCESSING' | 'CANCELED' | 'FAILED' | 'SUCCEED'", ""));
|
|
81
|
+
}
|
|
82
|
+
if (txhash !== undefined) {
|
|
83
|
+
requestContext.setQueryParam("txhash", ObjectSerializer_1.ObjectSerializer.serialize(txhash, "string", ""));
|
|
84
|
+
}
|
|
85
|
+
if (walletId !== undefined) {
|
|
86
|
+
requestContext.setQueryParam("wallet_id", ObjectSerializer_1.ObjectSerializer.serialize(walletId, "string", ""));
|
|
87
|
+
}
|
|
88
|
+
let authMethod = null;
|
|
89
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
90
|
+
if (authMethod) {
|
|
91
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
92
|
+
}
|
|
93
|
+
return requestContext;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
v1TransactionsRetrieve(transactionId, _options) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
let _config = _options || this.configuration;
|
|
99
|
+
if (transactionId === null || transactionId === undefined) {
|
|
100
|
+
throw new baseapi_1.RequiredError('Required parameter transactionId was null or undefined when calling v1TransactionsRetrieve.');
|
|
101
|
+
}
|
|
102
|
+
const localVarPath = '/api/v1/transactions/{transactionId}'
|
|
103
|
+
.replace('{' + 'transactionId' + '}', encodeURIComponent(String(transactionId)));
|
|
104
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
105
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
106
|
+
let authMethod = null;
|
|
107
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
108
|
+
if (authMethod) {
|
|
109
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
110
|
+
}
|
|
111
|
+
return requestContext;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
v1TransactionsTransfer(request, _options) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
let _config = _options || this.configuration;
|
|
117
|
+
if (request === null || request === undefined) {
|
|
118
|
+
throw new baseapi_1.RequiredError('Required parameter request was null or undefined when calling v1TransactionsTransfer.');
|
|
119
|
+
}
|
|
120
|
+
const localVarPath = '/api/v1/transactions/transfer';
|
|
121
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
122
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
123
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
124
|
+
"application/json"
|
|
125
|
+
]);
|
|
126
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
127
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(request, "CreateTransferRequest", ""), contentType);
|
|
128
|
+
requestContext.setBody(serializedBody);
|
|
129
|
+
let authMethod = null;
|
|
130
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
131
|
+
if (authMethod) {
|
|
132
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
return requestContext;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
v1TransactionsWithdraw(request, _options) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
let _config = _options || this.configuration;
|
|
140
|
+
if (request === null || request === undefined) {
|
|
141
|
+
throw new baseapi_1.RequiredError('Required parameter request was null or undefined when calling v1TransactionsWithdraw.');
|
|
142
|
+
}
|
|
143
|
+
const localVarPath = '/api/v1/transactions/withdraw';
|
|
144
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
145
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
146
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
147
|
+
"application/json"
|
|
148
|
+
]);
|
|
149
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
150
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(request, "CreateWithdrawRequest", ""), contentType);
|
|
151
|
+
requestContext.setBody(serializedBody);
|
|
152
|
+
let authMethod = null;
|
|
153
|
+
authMethod = _config.authMethods["ApiKeyAuth"];
|
|
154
|
+
if (authMethod) {
|
|
155
|
+
yield authMethod.applySecurityAuthentication(requestContext);
|
|
156
|
+
}
|
|
157
|
+
return requestContext;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.TransactionsApiRequestFactory = TransactionsApiRequestFactory;
|
|
162
|
+
class TransactionsApiResponseProcessor {
|
|
163
|
+
v1TransactionsEstimateFee(response) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
166
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
167
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EstimateFeeResponse", "");
|
|
168
|
+
return body;
|
|
169
|
+
}
|
|
170
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
171
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
172
|
+
throw new exception_1.ApiException(400, body);
|
|
173
|
+
}
|
|
174
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
175
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
176
|
+
throw new exception_1.ApiException(401, body);
|
|
177
|
+
}
|
|
178
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
179
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
180
|
+
throw new exception_1.ApiException(404, body);
|
|
181
|
+
}
|
|
182
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
183
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
184
|
+
throw new exception_1.ApiException(500, body);
|
|
185
|
+
}
|
|
186
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
187
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EstimateFeeResponse", "");
|
|
188
|
+
return body;
|
|
189
|
+
}
|
|
190
|
+
let body = response.body || "";
|
|
191
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
v1TransactionsList(response) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
197
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CursorPageTransaction", "");
|
|
199
|
+
return body;
|
|
200
|
+
}
|
|
201
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
203
|
+
throw new exception_1.ApiException(400, body);
|
|
204
|
+
}
|
|
205
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
207
|
+
throw new exception_1.ApiException(401, body);
|
|
208
|
+
}
|
|
209
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
211
|
+
throw new exception_1.ApiException(404, body);
|
|
212
|
+
}
|
|
213
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
214
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
215
|
+
throw new exception_1.ApiException(500, body);
|
|
216
|
+
}
|
|
217
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
218
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CursorPageTransaction", "");
|
|
219
|
+
return body;
|
|
220
|
+
}
|
|
221
|
+
let body = response.body || "";
|
|
222
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
v1TransactionsRetrieve(response) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
228
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
229
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Transaction", "");
|
|
230
|
+
return body;
|
|
231
|
+
}
|
|
232
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
233
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
234
|
+
throw new exception_1.ApiException(400, body);
|
|
235
|
+
}
|
|
236
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
237
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
238
|
+
throw new exception_1.ApiException(401, body);
|
|
239
|
+
}
|
|
240
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
241
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
242
|
+
throw new exception_1.ApiException(404, body);
|
|
243
|
+
}
|
|
244
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
245
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
246
|
+
throw new exception_1.ApiException(500, body);
|
|
247
|
+
}
|
|
248
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
249
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Transaction", "");
|
|
250
|
+
return body;
|
|
251
|
+
}
|
|
252
|
+
let body = response.body || "";
|
|
253
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
v1TransactionsTransfer(response) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
259
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
260
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateTransferResponse", "");
|
|
261
|
+
return body;
|
|
262
|
+
}
|
|
263
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
264
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
265
|
+
throw new exception_1.ApiException(400, body);
|
|
266
|
+
}
|
|
267
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
268
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
269
|
+
throw new exception_1.ApiException(401, body);
|
|
270
|
+
}
|
|
271
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
272
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
273
|
+
throw new exception_1.ApiException(404, body);
|
|
274
|
+
}
|
|
275
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
276
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
277
|
+
throw new exception_1.ApiException(500, body);
|
|
278
|
+
}
|
|
279
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
280
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateTransferResponse", "");
|
|
281
|
+
return body;
|
|
282
|
+
}
|
|
283
|
+
let body = response.body || "";
|
|
284
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
v1TransactionsWithdraw(response) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
290
|
+
if (util_1.isCodeInRange("200", response.httpStatusCode)) {
|
|
291
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateWithdrawReply", "");
|
|
292
|
+
return body;
|
|
293
|
+
}
|
|
294
|
+
if (util_1.isCodeInRange("400", response.httpStatusCode)) {
|
|
295
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
296
|
+
throw new exception_1.ApiException(400, body);
|
|
297
|
+
}
|
|
298
|
+
if (util_1.isCodeInRange("401", response.httpStatusCode)) {
|
|
299
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
300
|
+
throw new exception_1.ApiException(401, body);
|
|
301
|
+
}
|
|
302
|
+
if (util_1.isCodeInRange("404", response.httpStatusCode)) {
|
|
303
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
304
|
+
throw new exception_1.ApiException(404, body);
|
|
305
|
+
}
|
|
306
|
+
if (util_1.isCodeInRange("500", response.httpStatusCode)) {
|
|
307
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Error", "");
|
|
308
|
+
throw new exception_1.ApiException(500, body);
|
|
309
|
+
}
|
|
310
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
311
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateWithdrawReply", "");
|
|
312
|
+
return body;
|
|
313
|
+
}
|
|
314
|
+
let body = response.body || "";
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
exports.TransactionsApiResponseProcessor = TransactionsApiResponseProcessor;
|
|
320
|
+
//# sourceMappingURL=TransactionsApi.js.map
|