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