@shapeshiftoss/unchained-client 6.10.0 → 6.12.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 +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 +0 -1
- package/dist/ethereum/parser/abi/weth.js +66 -67
- 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 +0 -1
- package/dist/ethereum/parser/constants.js +0 -1
- package/dist/ethereum/parser/foxy.d.ts +8 -9
- package/dist/ethereum/parser/foxy.js +27 -59
- package/dist/ethereum/parser/index.d.ts +0 -1
- package/dist/ethereum/parser/index.js +52 -59
- 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 +75 -82
- package/dist/ethereum/parser/utils.d.ts +0 -1
- package/dist/ethereum/parser/utils.js +2 -3
- package/dist/ethereum/parser/weth.d.ts +6 -5
- package/dist/ethereum/parser/weth.js +76 -99
- package/dist/ethereum/parser/yearn.d.ts +11 -12
- package/dist/ethereum/parser/yearn.js +51 -62
- 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 +12 -2
- package/dist/types.js +0 -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/weth.d.ts.map +0 -1
- package/dist/ethereum/parser/abi/weth.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/weth.d.ts.map +0 -1
- package/dist/ethereum/parser/weth.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 -4970
- 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/bitcoin-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
|
|
@@ -52,9 +38,9 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
52
38
|
* @param {*} [options] Override http request option.
|
|
53
39
|
* @throws {RequiredError}
|
|
54
40
|
*/
|
|
55
|
-
getAccount: (pubkey, options = {}) =>
|
|
41
|
+
getAccount: async (pubkey, options = {}) => {
|
|
56
42
|
// verify required parameter 'pubkey' is not null or undefined
|
|
57
|
-
common_1.assertParamExists('getAccount', 'pubkey', pubkey);
|
|
43
|
+
(0, common_1.assertParamExists)('getAccount', 'pubkey', pubkey);
|
|
58
44
|
const localVarPath = `/api/v1/account/{pubkey}`
|
|
59
45
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
60
46
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -63,23 +49,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
63
49
|
if (configuration) {
|
|
64
50
|
baseOptions = configuration.baseOptions;
|
|
65
51
|
}
|
|
66
|
-
const localVarRequestOptions =
|
|
52
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
67
53
|
const localVarHeaderParameter = {};
|
|
68
54
|
const localVarQueryParameter = {};
|
|
69
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
55
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
70
56
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
-
localVarRequestOptions.headers =
|
|
57
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
72
58
|
return {
|
|
73
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
59
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
74
60
|
options: localVarRequestOptions,
|
|
75
61
|
};
|
|
76
|
-
}
|
|
62
|
+
},
|
|
77
63
|
/**
|
|
78
64
|
* Get information about the running coinstack
|
|
79
65
|
* @param {*} [options] Override http request option.
|
|
80
66
|
* @throws {RequiredError}
|
|
81
67
|
*/
|
|
82
|
-
getInfo: (options = {}) =>
|
|
68
|
+
getInfo: async (options = {}) => {
|
|
83
69
|
const localVarPath = `/api/v1/info`;
|
|
84
70
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
85
71
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -87,23 +73,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
87
73
|
if (configuration) {
|
|
88
74
|
baseOptions = configuration.baseOptions;
|
|
89
75
|
}
|
|
90
|
-
const localVarRequestOptions =
|
|
76
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
91
77
|
const localVarHeaderParameter = {};
|
|
92
78
|
const localVarQueryParameter = {};
|
|
93
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
79
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
94
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
95
|
-
localVarRequestOptions.headers =
|
|
81
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
96
82
|
return {
|
|
97
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
83
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
98
84
|
options: localVarRequestOptions,
|
|
99
85
|
};
|
|
100
|
-
}
|
|
86
|
+
},
|
|
101
87
|
/**
|
|
102
88
|
* Gets current network fee estimates for \'fast\', \'average\', and \'slow\' tx confirmation times
|
|
103
89
|
* @param {*} [options] Override http request option.
|
|
104
90
|
* @throws {RequiredError}
|
|
105
91
|
*/
|
|
106
|
-
getNetworkFees: (options = {}) =>
|
|
92
|
+
getNetworkFees: async (options = {}) => {
|
|
107
93
|
const localVarPath = `/api/v1/fees`;
|
|
108
94
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
109
95
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -111,26 +97,26 @@ 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 transaction specific data directly from the node
|
|
127
113
|
* @param {string} txid transaction hash
|
|
128
114
|
* @param {*} [options] Override http request option.
|
|
129
115
|
* @throws {RequiredError}
|
|
130
116
|
*/
|
|
131
|
-
getTransaction: (txid, options = {}) =>
|
|
117
|
+
getTransaction: async (txid, options = {}) => {
|
|
132
118
|
// verify required parameter 'txid' is not null or undefined
|
|
133
|
-
common_1.assertParamExists('getTransaction', 'txid', txid);
|
|
119
|
+
(0, common_1.assertParamExists)('getTransaction', 'txid', txid);
|
|
134
120
|
const localVarPath = `/api/v1/transaction/{txid}`
|
|
135
121
|
.replace(`{${"txid"}}`, encodeURIComponent(String(txid)));
|
|
136
122
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -139,17 +125,17 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
139
125
|
if (configuration) {
|
|
140
126
|
baseOptions = configuration.baseOptions;
|
|
141
127
|
}
|
|
142
|
-
const localVarRequestOptions =
|
|
128
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
143
129
|
const localVarHeaderParameter = {};
|
|
144
130
|
const localVarQueryParameter = {};
|
|
145
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
131
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
146
132
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
147
|
-
localVarRequestOptions.headers =
|
|
133
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
148
134
|
return {
|
|
149
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
135
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
150
136
|
options: localVarRequestOptions,
|
|
151
137
|
};
|
|
152
|
-
}
|
|
138
|
+
},
|
|
153
139
|
/**
|
|
154
140
|
* Get transaction history by address or xpub
|
|
155
141
|
* @param {string} pubkey account address or xpub
|
|
@@ -158,9 +144,9 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
158
144
|
* @param {*} [options] Override http request option.
|
|
159
145
|
* @throws {RequiredError}
|
|
160
146
|
*/
|
|
161
|
-
getTxHistory: (pubkey, cursor, pageSize, options = {}) =>
|
|
147
|
+
getTxHistory: async (pubkey, cursor, pageSize, options = {}) => {
|
|
162
148
|
// verify required parameter 'pubkey' is not null or undefined
|
|
163
|
-
common_1.assertParamExists('getTxHistory', 'pubkey', pubkey);
|
|
149
|
+
(0, common_1.assertParamExists)('getTxHistory', 'pubkey', pubkey);
|
|
164
150
|
const localVarPath = `/api/v1/account/{pubkey}/txs`
|
|
165
151
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
166
152
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -169,7 +155,7 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
169
155
|
if (configuration) {
|
|
170
156
|
baseOptions = configuration.baseOptions;
|
|
171
157
|
}
|
|
172
|
-
const localVarRequestOptions =
|
|
158
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
173
159
|
const localVarHeaderParameter = {};
|
|
174
160
|
const localVarQueryParameter = {};
|
|
175
161
|
if (cursor !== undefined) {
|
|
@@ -178,23 +164,23 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
178
164
|
if (pageSize !== undefined) {
|
|
179
165
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
180
166
|
}
|
|
181
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
167
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
182
168
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
-
localVarRequestOptions.headers =
|
|
169
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
184
170
|
return {
|
|
185
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
171
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
186
172
|
options: localVarRequestOptions,
|
|
187
173
|
};
|
|
188
|
-
}
|
|
174
|
+
},
|
|
189
175
|
/**
|
|
190
176
|
* Get all unspent transaction outputs for an address or xpub Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
191
177
|
* @param {string} pubkey account address or xpub
|
|
192
178
|
* @param {*} [options] Override http request option.
|
|
193
179
|
* @throws {RequiredError}
|
|
194
180
|
*/
|
|
195
|
-
getUtxos: (pubkey, options = {}) =>
|
|
181
|
+
getUtxos: async (pubkey, options = {}) => {
|
|
196
182
|
// verify required parameter 'pubkey' is not null or undefined
|
|
197
|
-
common_1.assertParamExists('getUtxos', 'pubkey', pubkey);
|
|
183
|
+
(0, common_1.assertParamExists)('getUtxos', 'pubkey', pubkey);
|
|
198
184
|
const localVarPath = `/api/v1/account/{pubkey}/utxos`
|
|
199
185
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
200
186
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -203,26 +189,26 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
203
189
|
if (configuration) {
|
|
204
190
|
baseOptions = configuration.baseOptions;
|
|
205
191
|
}
|
|
206
|
-
const localVarRequestOptions =
|
|
192
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
207
193
|
const localVarHeaderParameter = {};
|
|
208
194
|
const localVarQueryParameter = {};
|
|
209
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
195
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
210
196
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
211
|
-
localVarRequestOptions.headers =
|
|
197
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
212
198
|
return {
|
|
213
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
199
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
214
200
|
options: localVarRequestOptions,
|
|
215
201
|
};
|
|
216
|
-
}
|
|
202
|
+
},
|
|
217
203
|
/**
|
|
218
204
|
* Sends raw transaction to be broadcast to the node.
|
|
219
205
|
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
220
206
|
* @param {*} [options] Override http request option.
|
|
221
207
|
* @throws {RequiredError}
|
|
222
208
|
*/
|
|
223
|
-
sendTx: (sendTxBody, options = {}) =>
|
|
209
|
+
sendTx: async (sendTxBody, options = {}) => {
|
|
224
210
|
// verify required parameter 'sendTxBody' is not null or undefined
|
|
225
|
-
common_1.assertParamExists('sendTx', 'sendTxBody', sendTxBody);
|
|
211
|
+
(0, common_1.assertParamExists)('sendTx', 'sendTxBody', sendTxBody);
|
|
226
212
|
const localVarPath = `/api/v1/send`;
|
|
227
213
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
228
214
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -230,19 +216,19 @@ const V1ApiAxiosParamCreator = function (configuration) {
|
|
|
230
216
|
if (configuration) {
|
|
231
217
|
baseOptions = configuration.baseOptions;
|
|
232
218
|
}
|
|
233
|
-
const localVarRequestOptions =
|
|
219
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
234
220
|
const localVarHeaderParameter = {};
|
|
235
221
|
const localVarQueryParameter = {};
|
|
236
222
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
237
|
-
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
223
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
238
224
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
239
|
-
localVarRequestOptions.headers =
|
|
240
|
-
localVarRequestOptions.data = common_1.serializeDataIfNeeded(sendTxBody, localVarRequestOptions, configuration);
|
|
225
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
226
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sendTxBody, localVarRequestOptions, configuration);
|
|
241
227
|
return {
|
|
242
|
-
url: common_1.toPathString(localVarUrlObj),
|
|
228
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
243
229
|
options: localVarRequestOptions,
|
|
244
230
|
};
|
|
245
|
-
}
|
|
231
|
+
},
|
|
246
232
|
};
|
|
247
233
|
};
|
|
248
234
|
exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
@@ -251,7 +237,7 @@ exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
|
251
237
|
* @export
|
|
252
238
|
*/
|
|
253
239
|
const V1ApiFp = function (configuration) {
|
|
254
|
-
const localVarAxiosParamCreator = exports.V1ApiAxiosParamCreator(configuration);
|
|
240
|
+
const localVarAxiosParamCreator = (0, exports.V1ApiAxiosParamCreator)(configuration);
|
|
255
241
|
return {
|
|
256
242
|
/**
|
|
257
243
|
* Get account details by address or xpub Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
@@ -259,33 +245,27 @@ const V1ApiFp = function (configuration) {
|
|
|
259
245
|
* @param {*} [options] Override http request option.
|
|
260
246
|
* @throws {RequiredError}
|
|
261
247
|
*/
|
|
262
|
-
getAccount(pubkey, options) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
266
|
-
});
|
|
248
|
+
async getAccount(pubkey, options) {
|
|
249
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(pubkey, options);
|
|
250
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
267
251
|
},
|
|
268
252
|
/**
|
|
269
253
|
* Get information about the running coinstack
|
|
270
254
|
* @param {*} [options] Override http request option.
|
|
271
255
|
* @throws {RequiredError}
|
|
272
256
|
*/
|
|
273
|
-
getInfo(options) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
277
|
-
});
|
|
257
|
+
async getInfo(options) {
|
|
258
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInfo(options);
|
|
259
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
278
260
|
},
|
|
279
261
|
/**
|
|
280
262
|
* Gets current network fee estimates for \'fast\', \'average\', and \'slow\' tx confirmation times
|
|
281
263
|
* @param {*} [options] Override http request option.
|
|
282
264
|
* @throws {RequiredError}
|
|
283
265
|
*/
|
|
284
|
-
getNetworkFees(options) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
288
|
-
});
|
|
266
|
+
async getNetworkFees(options) {
|
|
267
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNetworkFees(options);
|
|
268
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
289
269
|
},
|
|
290
270
|
/**
|
|
291
271
|
* Get transaction specific data directly from the node
|
|
@@ -293,11 +273,9 @@ const V1ApiFp = function (configuration) {
|
|
|
293
273
|
* @param {*} [options] Override http request option.
|
|
294
274
|
* @throws {RequiredError}
|
|
295
275
|
*/
|
|
296
|
-
getTransaction(txid, options) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
300
|
-
});
|
|
276
|
+
async getTransaction(txid, options) {
|
|
277
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTransaction(txid, options);
|
|
278
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
301
279
|
},
|
|
302
280
|
/**
|
|
303
281
|
* Get transaction history by address or xpub
|
|
@@ -307,11 +285,9 @@ const V1ApiFp = function (configuration) {
|
|
|
307
285
|
* @param {*} [options] Override http request option.
|
|
308
286
|
* @throws {RequiredError}
|
|
309
287
|
*/
|
|
310
|
-
getTxHistory(pubkey, cursor, pageSize, options) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
314
|
-
});
|
|
288
|
+
async getTxHistory(pubkey, cursor, pageSize, options) {
|
|
289
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTxHistory(pubkey, cursor, pageSize, options);
|
|
290
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
315
291
|
},
|
|
316
292
|
/**
|
|
317
293
|
* Get all unspent transaction outputs for an address or xpub Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
@@ -319,11 +295,9 @@ const V1ApiFp = function (configuration) {
|
|
|
319
295
|
* @param {*} [options] Override http request option.
|
|
320
296
|
* @throws {RequiredError}
|
|
321
297
|
*/
|
|
322
|
-
getUtxos(pubkey, options) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
326
|
-
});
|
|
298
|
+
async getUtxos(pubkey, options) {
|
|
299
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUtxos(pubkey, options);
|
|
300
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
327
301
|
},
|
|
328
302
|
/**
|
|
329
303
|
* Sends raw transaction to be broadcast to the node.
|
|
@@ -331,11 +305,9 @@ const V1ApiFp = function (configuration) {
|
|
|
331
305
|
* @param {*} [options] Override http request option.
|
|
332
306
|
* @throws {RequiredError}
|
|
333
307
|
*/
|
|
334
|
-
sendTx(sendTxBody, options) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
338
|
-
});
|
|
308
|
+
async sendTx(sendTxBody, options) {
|
|
309
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendTx(sendTxBody, options);
|
|
310
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
339
311
|
},
|
|
340
312
|
};
|
|
341
313
|
};
|
|
@@ -345,7 +317,7 @@ exports.V1ApiFp = V1ApiFp;
|
|
|
345
317
|
* @export
|
|
346
318
|
*/
|
|
347
319
|
const V1ApiFactory = function (configuration, basePath, axios) {
|
|
348
|
-
const localVarFp = exports.V1ApiFp(configuration);
|
|
320
|
+
const localVarFp = (0, exports.V1ApiFp)(configuration);
|
|
349
321
|
return {
|
|
350
322
|
/**
|
|
351
323
|
* Get account details by address or xpub Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
@@ -428,7 +400,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
428
400
|
* @memberof V1Api
|
|
429
401
|
*/
|
|
430
402
|
getAccount(requestParameters, options) {
|
|
431
|
-
return exports.V1ApiFp(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
403
|
+
return (0, exports.V1ApiFp)(this.configuration).getAccount(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
432
404
|
}
|
|
433
405
|
/**
|
|
434
406
|
* Get information about the running coinstack
|
|
@@ -437,7 +409,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
437
409
|
* @memberof V1Api
|
|
438
410
|
*/
|
|
439
411
|
getInfo(options) {
|
|
440
|
-
return exports.V1ApiFp(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
|
|
412
|
+
return (0, exports.V1ApiFp)(this.configuration).getInfo(options).then((request) => request(this.axios, this.basePath));
|
|
441
413
|
}
|
|
442
414
|
/**
|
|
443
415
|
* Gets current network fee estimates for \'fast\', \'average\', and \'slow\' tx confirmation times
|
|
@@ -446,7 +418,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
446
418
|
* @memberof V1Api
|
|
447
419
|
*/
|
|
448
420
|
getNetworkFees(options) {
|
|
449
|
-
return exports.V1ApiFp(this.configuration).getNetworkFees(options).then((request) => request(this.axios, this.basePath));
|
|
421
|
+
return (0, exports.V1ApiFp)(this.configuration).getNetworkFees(options).then((request) => request(this.axios, this.basePath));
|
|
450
422
|
}
|
|
451
423
|
/**
|
|
452
424
|
* Get transaction specific data directly from the node
|
|
@@ -456,7 +428,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
456
428
|
* @memberof V1Api
|
|
457
429
|
*/
|
|
458
430
|
getTransaction(requestParameters, options) {
|
|
459
|
-
return exports.V1ApiFp(this.configuration).getTransaction(requestParameters.txid, options).then((request) => request(this.axios, this.basePath));
|
|
431
|
+
return (0, exports.V1ApiFp)(this.configuration).getTransaction(requestParameters.txid, options).then((request) => request(this.axios, this.basePath));
|
|
460
432
|
}
|
|
461
433
|
/**
|
|
462
434
|
* Get transaction history by address or xpub
|
|
@@ -466,7 +438,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
466
438
|
* @memberof V1Api
|
|
467
439
|
*/
|
|
468
440
|
getTxHistory(requestParameters, options) {
|
|
469
|
-
return exports.V1ApiFp(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
441
|
+
return (0, exports.V1ApiFp)(this.configuration).getTxHistory(requestParameters.pubkey, requestParameters.cursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
470
442
|
}
|
|
471
443
|
/**
|
|
472
444
|
* Get all unspent transaction outputs for an address or xpub Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
@@ -476,7 +448,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
476
448
|
* @memberof V1Api
|
|
477
449
|
*/
|
|
478
450
|
getUtxos(requestParameters, options) {
|
|
479
|
-
return exports.V1ApiFp(this.configuration).getUtxos(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
451
|
+
return (0, exports.V1ApiFp)(this.configuration).getUtxos(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
480
452
|
}
|
|
481
453
|
/**
|
|
482
454
|
* Sends raw transaction to be broadcast to the node.
|
|
@@ -486,8 +458,7 @@ class V1Api extends base_1.BaseAPI {
|
|
|
486
458
|
* @memberof V1Api
|
|
487
459
|
*/
|
|
488
460
|
sendTx(requestParameters, options) {
|
|
489
|
-
return exports.V1ApiFp(this.configuration).sendTx(requestParameters.sendTxBody, options).then((request) => request(this.axios, this.basePath));
|
|
461
|
+
return (0, exports.V1ApiFp)(this.configuration).sendTx(requestParameters.sendTxBody, options).then((request) => request(this.axios, this.basePath));
|
|
490
462
|
}
|
|
491
463
|
}
|
|
492
464
|
exports.V1Api = V1Api;
|
|
493
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-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/bitcoin-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.bitcoin.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/bitcoin-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/bitcoin-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
|