@shapeshiftoss/unchained-client 6.9.0 → 6.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/bitcoin/index.d.ts +0 -1
- package/dist/bitcoin/index.js +5 -2
- package/dist/bitcoin/parser/index.d.ts +0 -1
- package/dist/bitcoin/parser/index.js +43 -54
- package/dist/bitcoin/parser/utils.d.ts +0 -1
- package/dist/bitcoin/parser/utils.js +0 -1
- package/dist/bitcoin/types.d.ts +0 -1
- package/dist/bitcoin/types.js +0 -1
- package/dist/cosmos/index.d.ts +0 -1
- package/dist/cosmos/index.js +5 -2
- package/dist/cosmos/parser/index.d.ts +4 -5
- package/dist/cosmos/parser/index.js +55 -50
- package/dist/cosmos/parser/utils.d.ts +3 -4
- package/dist/cosmos/parser/utils.js +28 -25
- package/dist/cosmos/types.d.ts +4 -1
- package/dist/cosmos/types.js +0 -1
- package/dist/ethereum/index.d.ts +0 -1
- package/dist/ethereum/index.js +5 -2
- package/dist/ethereum/parser/abi/erc20.d.ts +0 -1
- package/dist/ethereum/parser/abi/erc20.js +69 -70
- package/dist/ethereum/parser/abi/foxyStaking.d.ts +0 -1
- package/dist/ethereum/parser/abi/foxyStaking.js +161 -162
- package/dist/ethereum/parser/abi/multiSig.d.ts +0 -1
- package/dist/ethereum/parser/abi/multiSig.js +79 -80
- package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts +0 -1
- package/dist/ethereum/parser/abi/shapeShiftRouter.js +119 -120
- package/dist/ethereum/parser/abi/thor.d.ts +0 -1
- package/dist/ethereum/parser/abi/thor.js +28 -29
- package/dist/ethereum/parser/abi/uniV2.d.ts +0 -1
- package/dist/ethereum/parser/abi/uniV2.js +55 -56
- package/dist/ethereum/parser/abi/weth.d.ts +3 -0
- package/dist/ethereum/parser/abi/weth.js +282 -0
- package/dist/ethereum/parser/abi/yearnVault.d.ts +0 -1
- package/dist/ethereum/parser/abi/yearnVault.js +95 -96
- package/dist/ethereum/parser/constants.d.ts +2 -1
- package/dist/ethereum/parser/constants.js +3 -2
- package/dist/ethereum/parser/foxy.d.ts +8 -9
- package/dist/ethereum/parser/foxy.js +27 -59
- package/dist/ethereum/parser/index.d.ts +1 -1
- package/dist/ethereum/parser/index.js +51 -56
- package/dist/ethereum/parser/thor.d.ts +6 -5
- package/dist/ethereum/parser/thor.js +33 -49
- package/dist/ethereum/parser/uniV2.d.ts +5 -5
- package/dist/ethereum/parser/uniV2.js +76 -83
- package/dist/ethereum/parser/utils.d.ts +0 -1
- package/dist/ethereum/parser/utils.js +2 -3
- package/dist/ethereum/parser/weth.d.ts +19 -0
- package/dist/ethereum/parser/weth.js +102 -0
- package/dist/ethereum/parser/yearn.d.ts +11 -12
- package/dist/ethereum/parser/yearn.js +51 -51
- package/dist/ethereum/parser/zrx.d.ts +1 -2
- package/dist/ethereum/parser/zrx.js +18 -30
- package/dist/ethereum/types.d.ts +0 -1
- package/dist/ethereum/types.js +0 -1
- package/dist/generated/bitcoin/api.d.ts +117 -121
- package/dist/generated/bitcoin/api.js +82 -111
- package/dist/generated/bitcoin/base.d.ts +3 -4
- package/dist/generated/bitcoin/base.js +2 -3
- package/dist/generated/bitcoin/common.d.ts +3 -4
- package/dist/generated/bitcoin/common.js +23 -39
- package/dist/generated/bitcoin/configuration.d.ts +1 -2
- package/dist/generated/bitcoin/configuration.js +1 -2
- package/dist/generated/bitcoin/index.d.ts +1 -2
- package/dist/generated/bitcoin/index.js +6 -3
- package/dist/generated/cosmos/api.d.ts +143 -144
- package/dist/generated/cosmos/api.js +89 -115
- package/dist/generated/cosmos/base.d.ts +2 -3
- package/dist/generated/cosmos/base.js +0 -1
- package/dist/generated/cosmos/common.d.ts +2 -3
- package/dist/generated/cosmos/common.js +22 -38
- package/dist/generated/cosmos/configuration.d.ts +0 -1
- package/dist/generated/cosmos/configuration.js +0 -1
- package/dist/generated/cosmos/index.d.ts +0 -1
- package/dist/generated/cosmos/index.js +5 -2
- package/dist/generated/ethereum/api.d.ts +74 -78
- package/dist/generated/ethereum/api.js +74 -101
- package/dist/generated/ethereum/base.d.ts +3 -4
- package/dist/generated/ethereum/base.js +2 -3
- package/dist/generated/ethereum/common.d.ts +3 -4
- package/dist/generated/ethereum/common.js +23 -39
- package/dist/generated/ethereum/configuration.d.ts +1 -2
- package/dist/generated/ethereum/configuration.js +1 -2
- package/dist/generated/ethereum/index.d.ts +1 -2
- package/dist/generated/ethereum/index.js +6 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5 -2
- package/dist/types.d.ts +14 -3
- package/dist/types.js +1 -1
- package/dist/utils.d.ts +2 -3
- package/dist/utils.js +23 -23
- package/dist/websocket.d.ts +1 -2
- package/dist/websocket.js +78 -80
- package/package.json +21 -13
- package/dist/bitcoin/index.d.ts.map +0 -1
- package/dist/bitcoin/index.js.map +0 -1
- package/dist/bitcoin/parser/index.d.ts.map +0 -1
- package/dist/bitcoin/parser/index.js.map +0 -1
- package/dist/bitcoin/parser/utils.d.ts.map +0 -1
- package/dist/bitcoin/parser/utils.js.map +0 -1
- package/dist/bitcoin/types.d.ts.map +0 -1
- package/dist/bitcoin/types.js.map +0 -1
- package/dist/cosmos/index.d.ts.map +0 -1
- package/dist/cosmos/index.js.map +0 -1
- package/dist/cosmos/parser/index.d.ts.map +0 -1
- package/dist/cosmos/parser/index.js.map +0 -1
- package/dist/cosmos/parser/utils.d.ts.map +0 -1
- package/dist/cosmos/parser/utils.js.map +0 -1
- package/dist/cosmos/types.d.ts.map +0 -1
- package/dist/cosmos/types.js.map +0 -1
- package/dist/ethereum/index.d.ts.map +0 -1
- package/dist/ethereum/index.js.map +0 -1
- package/dist/ethereum/parser/abi/erc20.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/erc20.js.map +0 -1
- package/dist/ethereum/parser/abi/foxyStaking.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/foxyStaking.js.map +0 -1
- package/dist/ethereum/parser/abi/multiSig.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/multiSig.js.map +0 -1
- package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/shapeShiftRouter.js.map +0 -1
- package/dist/ethereum/parser/abi/thor.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/thor.js.map +0 -1
- package/dist/ethereum/parser/abi/uniV2.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/uniV2.js.map +0 -1
- package/dist/ethereum/parser/abi/yearnVault.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/yearnVault.js.map +0 -1
- package/dist/ethereum/parser/constants.d.ts.map +0 -1
- package/dist/ethereum/parser/constants.js.map +0 -1
- package/dist/ethereum/parser/foxy.d.ts.map +0 -1
- package/dist/ethereum/parser/foxy.js.map +0 -1
- package/dist/ethereum/parser/index.d.ts.map +0 -1
- package/dist/ethereum/parser/index.js.map +0 -1
- package/dist/ethereum/parser/thor.d.ts.map +0 -1
- package/dist/ethereum/parser/thor.js.map +0 -1
- package/dist/ethereum/parser/uniV2.d.ts.map +0 -1
- package/dist/ethereum/parser/uniV2.js.map +0 -1
- package/dist/ethereum/parser/utils.d.ts.map +0 -1
- package/dist/ethereum/parser/utils.js.map +0 -1
- package/dist/ethereum/parser/yearn.d.ts.map +0 -1
- package/dist/ethereum/parser/yearn.js.map +0 -1
- package/dist/ethereum/parser/zrx.d.ts.map +0 -1
- package/dist/ethereum/parser/zrx.js.map +0 -1
- package/dist/ethereum/types.d.ts.map +0 -1
- package/dist/ethereum/types.js.map +0 -1
- package/dist/generated/bitcoin/api.d.ts.map +0 -1
- package/dist/generated/bitcoin/api.js.map +0 -1
- package/dist/generated/bitcoin/base.d.ts.map +0 -1
- package/dist/generated/bitcoin/base.js.map +0 -1
- package/dist/generated/bitcoin/common.d.ts.map +0 -1
- package/dist/generated/bitcoin/common.js.map +0 -1
- package/dist/generated/bitcoin/configuration.d.ts.map +0 -1
- package/dist/generated/bitcoin/configuration.js.map +0 -1
- package/dist/generated/bitcoin/index.d.ts.map +0 -1
- package/dist/generated/bitcoin/index.js.map +0 -1
- package/dist/generated/cosmos/api.d.ts.map +0 -1
- package/dist/generated/cosmos/api.js.map +0 -1
- package/dist/generated/cosmos/base.d.ts.map +0 -1
- package/dist/generated/cosmos/base.js.map +0 -1
- package/dist/generated/cosmos/common.d.ts.map +0 -1
- package/dist/generated/cosmos/common.js.map +0 -1
- package/dist/generated/cosmos/configuration.d.ts.map +0 -1
- package/dist/generated/cosmos/configuration.js.map +0 -1
- package/dist/generated/cosmos/index.d.ts.map +0 -1
- package/dist/generated/cosmos/index.js.map +0 -1
- package/dist/generated/ethereum/api.d.ts.map +0 -1
- package/dist/generated/ethereum/api.js.map +0 -1
- package/dist/generated/ethereum/base.d.ts.map +0 -1
- package/dist/generated/ethereum/base.js.map +0 -1
- package/dist/generated/ethereum/common.d.ts.map +0 -1
- package/dist/generated/ethereum/common.js.map +0 -1
- package/dist/generated/ethereum/configuration.d.ts.map +0 -1
- package/dist/generated/ethereum/configuration.js.map +0 -1
- package/dist/generated/ethereum/index.d.ts.map +0 -1
- package/dist/generated/ethereum/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -4934
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js.map +0 -1
|
@@ -5,22 +5,13 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 6.
|
|
8
|
+
* The version of the OpenAPI document: 6.11.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
15
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
17
|
};
|
|
@@ -32,14 +23,9 @@ const axios_1 = __importDefault(require("axios"));
|
|
|
32
23
|
const common_1 = require("./common");
|
|
33
24
|
// @ts-ignore
|
|
34
25
|
const base_1 = require("./base");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*/
|
|
39
|
-
var ValidationErrorMessageEnum;
|
|
40
|
-
(function (ValidationErrorMessageEnum) {
|
|
41
|
-
ValidationErrorMessageEnum["ValidationFailed"] = "Validation failed";
|
|
42
|
-
})(ValidationErrorMessageEnum = exports.ValidationErrorMessageEnum || (exports.ValidationErrorMessageEnum = {}));
|
|
26
|
+
exports.ValidationErrorMessageEnum = {
|
|
27
|
+
ValidationFailed: 'Validation failed'
|
|
28
|
+
};
|
|
43
29
|
/**
|
|
44
30
|
* V1Api - axios parameter creator
|
|
45
31
|
* @export
|
|
@@ -55,15 +41,15 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
55
41
|
* @param {*} [options] Override http request option.
|
|
56
42
|
* @throws {RequiredError}
|
|
57
43
|
*/
|
|
58
|
-
estimateGas: (data, from, to, value, options = {}) =>
|
|
44
|
+
estimateGas: async (data, from, to, value, options = {}) => {
|
|
59
45
|
// verify required parameter 'data' is not null or undefined
|
|
60
|
-
common_1.assertParamExists('estimateGas', 'data', data);
|
|
46
|
+
(0, common_1.assertParamExists)('estimateGas', 'data', data);
|
|
61
47
|
// verify required parameter 'from' is not null or undefined
|
|
62
|
-
common_1.assertParamExists('estimateGas', 'from', from);
|
|
48
|
+
(0, common_1.assertParamExists)('estimateGas', 'from', from);
|
|
63
49
|
// verify required parameter 'to' is not null or undefined
|
|
64
|
-
common_1.assertParamExists('estimateGas', 'to', to);
|
|
50
|
+
(0, common_1.assertParamExists)('estimateGas', 'to', to);
|
|
65
51
|
// verify required parameter 'value' is not null or undefined
|
|
66
|
-
common_1.assertParamExists('estimateGas', 'value', value);
|
|
52
|
+
(0, common_1.assertParamExists)('estimateGas', 'value', value);
|
|
67
53
|
const localVarPath = `/api/v1/gas/estimate`;
|
|
68
54
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
69
55
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -71,7 +57,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
71
57
|
if (configuration) {
|
|
72
58
|
baseOptions = configuration.baseOptions;
|
|
73
59
|
}
|
|
74
|
-
const localVarRequestOptions =
|
|
60
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
75
61
|
const localVarHeaderParameter = {};
|
|
76
62
|
const localVarQueryParameter = {};
|
|
77
63
|
if (data !== undefined) {
|
|
@@ -86,23 +72,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
86
72
|
if (value !== undefined) {
|
|
87
73
|
localVarQueryParameter['value'] = value;
|
|
88
74
|
}
|
|
89
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
75
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
90
76
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
91
|
-
localVarRequestOptions.headers =
|
|
77
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
92
78
|
return {
|
|
93
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
79
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
94
80
|
options: localVarRequestOptions,
|
|
95
81
|
};
|
|
96
|
-
}
|
|
82
|
+
},
|
|
97
83
|
/**
|
|
98
84
|
* Get account details by address
|
|
99
85
|
* @param {string} pubkey account address
|
|
100
86
|
* @param {*} [options] Override http request option.
|
|
101
87
|
* @throws {RequiredError}
|
|
102
88
|
*/
|
|
103
|
-
getAccount: (pubkey, options = {}) =>
|
|
89
|
+
getAccount: async (pubkey, options = {}) => {
|
|
104
90
|
// verify required parameter 'pubkey' is not null or undefined
|
|
105
|
-
common_1.assertParamExists('getAccount', 'pubkey', pubkey);
|
|
91
|
+
(0, common_1.assertParamExists)('getAccount', 'pubkey', pubkey);
|
|
106
92
|
const localVarPath = `/api/v1/account/{pubkey}`
|
|
107
93
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
108
94
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -111,23 +97,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
111
97
|
if (configuration) {
|
|
112
98
|
baseOptions = configuration.baseOptions;
|
|
113
99
|
}
|
|
114
|
-
const localVarRequestOptions =
|
|
100
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
115
101
|
const localVarHeaderParameter = {};
|
|
116
102
|
const localVarQueryParameter = {};
|
|
117
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
103
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
118
104
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
119
|
-
localVarRequestOptions.headers =
|
|
105
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
120
106
|
return {
|
|
121
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
107
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
122
108
|
options: localVarRequestOptions,
|
|
123
109
|
};
|
|
124
|
-
}
|
|
110
|
+
},
|
|
125
111
|
/**
|
|
126
112
|
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
127
113
|
* @param {*} [options] Override http request option.
|
|
128
114
|
* @throws {RequiredError}
|
|
129
115
|
*/
|
|
130
|
-
getGasFees: (options = {}) =>
|
|
116
|
+
getGasFees: async (options = {}) => {
|
|
131
117
|
const localVarPath = `/api/v1/gas/fees`;
|
|
132
118
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
133
119
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -135,23 +121,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
135
121
|
if (configuration) {
|
|
136
122
|
baseOptions = configuration.baseOptions;
|
|
137
123
|
}
|
|
138
|
-
const localVarRequestOptions =
|
|
124
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
139
125
|
const localVarHeaderParameter = {};
|
|
140
126
|
const localVarQueryParameter = {};
|
|
141
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
127
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
142
128
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
143
|
-
localVarRequestOptions.headers =
|
|
129
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
144
130
|
return {
|
|
145
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
131
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
132
|
options: localVarRequestOptions,
|
|
147
133
|
};
|
|
148
|
-
}
|
|
134
|
+
},
|
|
149
135
|
/**
|
|
150
136
|
* Get information about the running coinstack
|
|
151
137
|
* @param {*} [options] Override http request option.
|
|
152
138
|
* @throws {RequiredError}
|
|
153
139
|
*/
|
|
154
|
-
getInfo: (options = {}) =>
|
|
140
|
+
getInfo: async (options = {}) => {
|
|
155
141
|
const localVarPath = `/api/v1/info`;
|
|
156
142
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
157
143
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -159,17 +145,17 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
159
145
|
if (configuration) {
|
|
160
146
|
baseOptions = configuration.baseOptions;
|
|
161
147
|
}
|
|
162
|
-
const localVarRequestOptions =
|
|
148
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
163
149
|
const localVarHeaderParameter = {};
|
|
164
150
|
const localVarQueryParameter = {};
|
|
165
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
151
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
166
152
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
167
|
-
localVarRequestOptions.headers =
|
|
153
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
168
154
|
return {
|
|
169
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
155
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
170
156
|
options: localVarRequestOptions,
|
|
171
157
|
};
|
|
172
|
-
}
|
|
158
|
+
},
|
|
173
159
|
/**
|
|
174
160
|
* Get transaction history by address
|
|
175
161
|
* @param {string} pubkey account address
|
|
@@ -178,9 +164,9 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
178
164
|
* @param {*} [options] Override http request option.
|
|
179
165
|
* @throws {RequiredError}
|
|
180
166
|
*/
|
|
181
|
-
getTxHistory: (pubkey, cursor, pageSize, options = {}) =>
|
|
167
|
+
getTxHistory: async (pubkey, cursor, pageSize, options = {}) => {
|
|
182
168
|
// verify required parameter 'pubkey' is not null or undefined
|
|
183
|
-
common_1.assertParamExists('getTxHistory', 'pubkey', pubkey);
|
|
169
|
+
(0, common_1.assertParamExists)('getTxHistory', 'pubkey', pubkey);
|
|
184
170
|
const localVarPath = `/api/v1/account/{pubkey}/txs`
|
|
185
171
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
186
172
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -189,7 +175,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
189
175
|
if (configuration) {
|
|
190
176
|
baseOptions = configuration.baseOptions;
|
|
191
177
|
}
|
|
192
|
-
const localVarRequestOptions =
|
|
178
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
193
179
|
const localVarHeaderParameter = {};
|
|
194
180
|
const localVarQueryParameter = {};
|
|
195
181
|
if (cursor !== undefined) {
|
|
@@ -198,23 +184,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
198
184
|
if (pageSize !== undefined) {
|
|
199
185
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
200
186
|
}
|
|
201
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
187
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
202
188
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
203
|
-
localVarRequestOptions.headers =
|
|
189
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
204
190
|
return {
|
|
205
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
191
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
206
192
|
options: localVarRequestOptions,
|
|
207
193
|
};
|
|
208
|
-
}
|
|
194
|
+
},
|
|
209
195
|
/**
|
|
210
196
|
* Sends raw transaction to be broadcast to the node.
|
|
211
197
|
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
212
198
|
* @param {*} [options] Override http request option.
|
|
213
199
|
* @throws {RequiredError}
|
|
214
200
|
*/
|
|
215
|
-
sendTx: (sendTxBody, options = {}) =>
|
|
201
|
+
sendTx: async (sendTxBody, options = {}) => {
|
|
216
202
|
// verify required parameter 'sendTxBody' is not null or undefined
|
|
217
|
-
common_1.assertParamExists('sendTx', 'sendTxBody', sendTxBody);
|
|
203
|
+
(0, common_1.assertParamExists)('sendTx', 'sendTxBody', sendTxBody);
|
|
218
204
|
const localVarPath = `/api/v1/send`;
|
|
219
205
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
220
206
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -222,19 +208,19 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
222
208
|
if (configuration) {
|
|
223
209
|
baseOptions = configuration.baseOptions;
|
|
224
210
|
}
|
|
225
|
-
const localVarRequestOptions =
|
|
211
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
226
212
|
const localVarHeaderParameter = {};
|
|
227
213
|
const localVarQueryParameter = {};
|
|
228
214
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
229
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
215
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
230
216
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
231
|
-
localVarRequestOptions.headers =
|
|
232
|
-
localVarRequestOptions.data = common_1.serializeDataIfNeeded(sendTxBody, localVarRequestOptions, configuration);
|
|
217
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
218
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sendTxBody, localVarRequestOptions, configuration);
|
|
233
219
|
return {
|
|
234
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
220
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
235
221
|
options: localVarRequestOptions,
|
|
236
222
|
};
|
|
237
|
-
}
|
|
223
|
+
},
|
|
238
224
|
};
|
|
239
225
|
};
|
|
240
226
|
exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
@@ -243,7 +229,7 @@ exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
|
243
229
|
* @export
|
|
244
230
|
*/
|
|
245
231
|
const V1ApiFp = function (configuration) {
|
|
246
|
-
const localVarAxiosParamCreator = exports.V1ApiAxiosParamCreator(configuration);
|
|
232
|
+
const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
|
|
247
233
|
return {
|
|
248
234
|
/**
|
|
249
235
|
* Get the estimated gas cost of a transaction
|
|
@@ -254,11 +240,9 @@ const V1ApiFp = function (configuration) {
|
|
|
254
240
|
* @param {*} [options] Override http request option.
|
|
255
241
|
* @throws {RequiredError}
|
|
256
242
|
*/
|
|
257
|
-
estimateGas(data, from, to, value, options) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
261
|
-
});
|
|
243
|
+
async estimateGas(data, from, to, value, options) {
|
|
244
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.estimateGas(data, from, to, value, options);
|
|
245
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
262
246
|
},
|
|
263
247
|
/**
|
|
264
248
|
* Get account details by address
|
|
@@ -266,33 +250,27 @@ const V1ApiFp = function (configuration) {
|
|
|
266
250
|
* @param {*} [options] Override http request option.
|
|
267
251
|
* @throws {RequiredError}
|
|
268
252
|
*/
|
|
269
|
-
getAccount(pubkey, options) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
273
|
-
});
|
|
253
|
+
async getAccount(pubkey, options) {
|
|
254
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(pubkey, options);
|
|
255
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
274
256
|
},
|
|
275
257
|
/**
|
|
276
258
|
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
277
259
|
* @param {*} [options] Override http request option.
|
|
278
260
|
* @throws {RequiredError}
|
|
279
261
|
*/
|
|
280
|
-
getGasFees(options) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
284
|
-
});
|
|
262
|
+
async getGasFees(options) {
|
|
263
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGasFees(options);
|
|
264
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
285
265
|
},
|
|
286
266
|
/**
|
|
287
267
|
* Get information about the running coinstack
|
|
288
268
|
* @param {*} [options] Override http request option.
|
|
289
269
|
* @throws {RequiredError}
|
|
290
270
|
*/
|
|
291
|
-
getInfo(options) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
295
|
-
});
|
|
271
|
+
async getInfo(options) {
|
|
272
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInfo(options);
|
|
273
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
296
274
|
},
|
|
297
275
|
/**
|
|
298
276
|
* Get transaction history by address
|
|
@@ -302,11 +280,9 @@ const V1ApiFp = function (configuration) {
|
|
|
302
280
|
* @param {*} [options] Override http request option.
|
|
303
281
|
* @throws {RequiredError}
|
|
304
282
|
*/
|
|
305
|
-
getTxHistory(pubkey, cursor, pageSize, options) {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
309
|
-
});
|
|
283
|
+
async getTxHistory(pubkey, cursor, pageSize, options) {
|
|
284
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTxHistory(pubkey, cursor, pageSize, options);
|
|
285
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
310
286
|
},
|
|
311
287
|
/**
|
|
312
288
|
* Sends raw transaction to be broadcast to the node.
|
|
@@ -314,11 +290,9 @@ const V1ApiFp = function (configuration) {
|
|
|
314
290
|
* @param {*} [options] Override http request option.
|
|
315
291
|
* @throws {RequiredError}
|
|
316
292
|
*/
|
|
317
|
-
sendTx(sendTxBody, options) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
321
|
-
});
|
|
293
|
+
async sendTx(sendTxBody, options) {
|
|
294
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendTx(sendTxBody, options);
|
|
295
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
322
296
|
},
|
|
323
297
|
};
|
|
324
298
|
};
|
|
@@ -328,7 +302,7 @@ exports.V1ApiFp = V1ApiFp;
|
|
|
328
302
|
* @export
|
|
329
303
|
*/
|
|
330
304
|
const V1ApiFactory = function (configuration, basePath, axios) {
|
|
331
|
-
const localVarFp = exports.V1ApiFp(configuration);
|
|
305
|
+
const localVarFp = (0, exports.V1ApiFp)(configuration);
|
|
332
306
|
return {
|
|
333
307
|
/**
|
|
334
308
|
* Get the estimated gas cost of a transaction
|
|
@@ -405,7 +379,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
405
379
|
* @memberof V1Api
|
|
406
380
|
*/
|
|
407
381
|
estimateGas(requestParameters, options) {
|
|
408
|
-
return exports.V1ApiFp(this.configuration).estimateGas(requestParameters.data, requestParameters.from, requestParameters.to, requestParameters.value, options).then((request) => request(this.axios, this.basePath));
|
|
382
|
+
return (0, exports.V1ApiFp)(this.configuration).estimateGas(requestParameters.data, requestParameters.from, requestParameters.to, requestParameters.value, options).then((request) => request(this.axios, this.basePath));
|
|
409
383
|
}
|
|
410
384
|
/**
|
|
411
385
|
* Get account details by address
|
|
@@ -415,7 +389,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
415
389
|
* @memberof V1Api
|
|
416
390
|
*/
|
|
417
391
|
getAccount(requestParameters, options) {
|
|
418
|
-
return exports.V1ApiFp(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
392
|
+
return (0, exports.V1ApiFp)(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
419
393
|
}
|
|
420
394
|
/**
|
|
421
395
|
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
@@ -424,7 +398,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
424
398
|
* @memberof V1Api
|
|
425
399
|
*/
|
|
426
400
|
getGasFees(options) {
|
|
427
|
-
return exports.V1ApiFp(this.configuration).getGasFees(options).then((request) => request(this.axios, this.basePath));
|
|
401
|
+
return (0, exports.V1ApiFp)(this.configuration).getGasFees(options).then((request) => request(this.axios, this.basePath));
|
|
428
402
|
}
|
|
429
403
|
/**
|
|
430
404
|
* Get information about the running coinstack
|
|
@@ -433,7 +407,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
433
407
|
* @memberof V1Api
|
|
434
408
|
*/
|
|
435
409
|
getInfo(options) {
|
|
436
|
-
return exports.V1ApiFp(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
|
|
410
|
+
return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
|
|
437
411
|
}
|
|
438
412
|
/**
|
|
439
413
|
* Get transaction history by address
|
|
@@ -443,7 +417,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
443
417
|
* @memberof V1Api
|
|
444
418
|
*/
|
|
445
419
|
getTxHistory(requestParameters, options) {
|
|
446
|
-
return exports.V1ApiFp(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
420
|
+
return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
447
421
|
}
|
|
448
422
|
/**
|
|
449
423
|
* Sends raw transaction to be broadcast to the node.
|
|
@@ -453,8 +427,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
453
427
|
* @memberof V1Api
|
|
454
428
|
*/
|
|
455
429
|
sendTx(requestParameters, options) {
|
|
456
|
-
return exports.V1ApiFp(this.configuration).sendTx(requestParameters.sendTxBody, options).then((request) => request(this.axios, this.basePath));
|
|
430
|
+
return (0, exports.V1ApiFp)(this.configuration).sendTx(requestParameters.sendTxBody, options).then((request) => request(this.axios, this.basePath));
|
|
457
431
|
}
|
|
458
432
|
}
|
|
459
433
|
exports.V1Api = V1Api;
|
|
460
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 6.
|
|
5
|
+
* The version of the OpenAPI document: 6.11.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { Configuration } from "./configuration";
|
|
13
|
-
import { AxiosInstance } from 'axios';
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
29
29
|
*/
|
|
30
30
|
export interface RequestArgs {
|
|
31
31
|
url: string;
|
|
32
|
-
options:
|
|
32
|
+
options: AxiosRequestConfig;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
@@ -53,4 +53,3 @@ export declare class RequiredError extends Error {
|
|
|
53
53
|
name: "RequiredError";
|
|
54
54
|
constructor(field: string, msg?: string);
|
|
55
55
|
}
|
|
56
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 6.
|
|
8
|
+
* The version of the OpenAPI document: 6.11.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -20,7 +20,7 @@ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.B
|
|
|
20
20
|
// Some imports not used depending on template conditions
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
const axios_1 = __importDefault(require("axios"));
|
|
23
|
-
exports.BASE_PATH = "
|
|
23
|
+
exports.BASE_PATH = "https://dev-api.ethereum.shapeshift.com".replace(/\/+$/, "");
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
@@ -62,4 +62,3 @@ class RequiredError extends Error {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
exports.RequiredError = RequiredError;
|
|
65
|
-
//# sourceMappingURL=base.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 6.
|
|
5
|
+
* The version of the OpenAPI document: 6.11.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { Configuration } from "./configuration";
|
|
13
13
|
import { RequestArgs } from "./base";
|
|
14
|
-
import { AxiosInstance } from 'axios';
|
|
14
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @export
|
|
@@ -62,5 +62,4 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<
|
|
66
|
-
//# sourceMappingURL=common.d.ts.map
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -5,22 +5,13 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 6.
|
|
8
|
+
* The version of the OpenAPI document: 6.11.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
16
|
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
26
17
|
const base_1 = require("./base");
|
|
@@ -44,15 +35,13 @@ exports.assertParamExists = assertParamExists;
|
|
|
44
35
|
*
|
|
45
36
|
* @export
|
|
46
37
|
*/
|
|
47
|
-
const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
});
|
|
38
|
+
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
39
|
+
if (configuration && configuration.apiKey) {
|
|
40
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
41
|
+
? await configuration.apiKey(keyParamName)
|
|
42
|
+
: await configuration.apiKey;
|
|
43
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
44
|
+
}
|
|
56
45
|
};
|
|
57
46
|
exports.setApiKeyToObject = setApiKeyToObject;
|
|
58
47
|
/**
|
|
@@ -69,30 +58,26 @@ exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
|
69
58
|
*
|
|
70
59
|
* @export
|
|
71
60
|
*/
|
|
72
|
-
const setBearerAuthToObject = function (object, configuration) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
});
|
|
61
|
+
const setBearerAuthToObject = async function (object, configuration) {
|
|
62
|
+
if (configuration && configuration.accessToken) {
|
|
63
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
64
|
+
? await configuration.accessToken()
|
|
65
|
+
: await configuration.accessToken;
|
|
66
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
67
|
+
}
|
|
81
68
|
};
|
|
82
69
|
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
83
70
|
/**
|
|
84
71
|
*
|
|
85
72
|
* @export
|
|
86
73
|
*/
|
|
87
|
-
const setOAuthToObject = function (object, name, scopes, configuration) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
});
|
|
74
|
+
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
75
|
+
if (configuration && configuration.accessToken) {
|
|
76
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
77
|
+
? await configuration.accessToken(name, scopes)
|
|
78
|
+
: await configuration.accessToken;
|
|
79
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
80
|
+
}
|
|
96
81
|
};
|
|
97
82
|
exports.setOAuthToObject = setOAuthToObject;
|
|
98
83
|
/**
|
|
@@ -145,9 +130,8 @@ exports.toPathString = toPathString;
|
|
|
145
130
|
*/
|
|
146
131
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
147
132
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
148
|
-
const axiosRequestArgs =
|
|
133
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url };
|
|
149
134
|
return axios.request(axiosRequestArgs);
|
|
150
135
|
};
|
|
151
136
|
};
|
|
152
137
|
exports.createRequestFunction = createRequestFunction;
|
|
153
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 6.
|
|
5
|
+
* The version of the OpenAPI document: 6.11.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -81,4 +81,3 @@ export declare class Configuration {
|
|
|
81
81
|
*/
|
|
82
82
|
isJsonMime(mime: string): boolean;
|
|
83
83
|
}
|
|
84
|
-
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 6.
|
|
8
|
+
* The version of the OpenAPI document: 6.11.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -40,4 +40,3 @@ class Configuration {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.Configuration = Configuration;
|
|
43
|
-
//# sourceMappingURL=configuration.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 6.
|
|
5
|
+
* The version of the OpenAPI document: 6.11.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -11,4 +11,3 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export * from "./api";
|
|
13
13
|
export * from "./configuration";
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|