@shapeshiftoss/unchained-client 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/generated/bitcoin/api.d.ts +482 -0
- package/dist/generated/bitcoin/api.d.ts.map +1 -0
- package/dist/generated/bitcoin/api.js +336 -0
- package/dist/generated/bitcoin/api.js.map +1 -0
- package/dist/generated/bitcoin/base.d.ts +56 -0
- package/dist/generated/bitcoin/base.d.ts.map +1 -0
- package/dist/generated/bitcoin/base.js +65 -0
- package/dist/generated/bitcoin/base.js.map +1 -0
- package/dist/generated/bitcoin/common.d.ts +66 -0
- package/dist/generated/bitcoin/common.d.ts.map +1 -0
- package/dist/generated/bitcoin/common.js +153 -0
- package/dist/generated/bitcoin/common.js.map +1 -0
- package/dist/generated/bitcoin/configuration.d.ts +84 -0
- package/dist/generated/bitcoin/configuration.d.ts.map +1 -0
- package/dist/generated/bitcoin/configuration.js +43 -0
- package/dist/generated/bitcoin/configuration.js.map +1 -0
- package/dist/generated/bitcoin/index.d.ts +14 -0
- package/dist/generated/bitcoin/index.d.ts.map +1 -0
- package/dist/generated/bitcoin/index.js +28 -0
- package/dist/generated/bitcoin/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +74 -5
- package/package.json +2 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/generated/bitcoin/api.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKjE,OAAO,EAAiC,WAAW,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAE5F;;;;GAI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,CAAC,EAAE,GAAG;IAI9E;;;;;;OAMG;IACI,QAAQ,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,GAAG;IAItE;;;;;;OAMG;IACI,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,GAAG;CAGrE"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* @shapeshiftoss/bitcoin-api
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.V1Api = exports.V1ApiFactory = exports.V1ApiFp = exports.V1ApiAxiosParamCreator = exports.ValidationErrorMessageEnum = void 0;
|
|
29
|
+
const axios_1 = __importDefault(require("axios"));
|
|
30
|
+
// Some imports not used depending on template conditions
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
const common_1 = require("./common");
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
const base_1 = require("./base");
|
|
35
|
+
/**
|
|
36
|
+
* @export
|
|
37
|
+
* @enum {string}
|
|
38
|
+
*/
|
|
39
|
+
var ValidationErrorMessageEnum;
|
|
40
|
+
(function (ValidationErrorMessageEnum) {
|
|
41
|
+
ValidationErrorMessageEnum["ValidationFailed"] = "Validation failed";
|
|
42
|
+
})(ValidationErrorMessageEnum = exports.ValidationErrorMessageEnum || (exports.ValidationErrorMessageEnum = {}));
|
|
43
|
+
/**
|
|
44
|
+
* V1Api - axios parameter creator
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
const V1ApiAxiosParamCreator = function (configuration) {
|
|
48
|
+
return {
|
|
49
|
+
/**
|
|
50
|
+
* Get balance of a pubkey Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
51
|
+
* @param {string} pubkey account pubkey
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
getBalance: (pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
57
|
+
common_1.assertParamExists('getBalance', 'pubkey', pubkey);
|
|
58
|
+
const localVarPath = `/api/v1/balance/{pubkey}`
|
|
59
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
60
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
61
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
62
|
+
let baseOptions;
|
|
63
|
+
if (configuration) {
|
|
64
|
+
baseOptions = configuration.baseOptions;
|
|
65
|
+
}
|
|
66
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
67
|
+
const localVarHeaderParameter = {};
|
|
68
|
+
const localVarQueryParameter = {};
|
|
69
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
|
70
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
72
|
+
return {
|
|
73
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
74
|
+
options: localVarRequestOptions,
|
|
75
|
+
};
|
|
76
|
+
}),
|
|
77
|
+
/**
|
|
78
|
+
* Get transaction history of a pubkey
|
|
79
|
+
* @param {string} address
|
|
80
|
+
* @param {number} [page] page number
|
|
81
|
+
* @param {number} [pageSize] page size
|
|
82
|
+
* @param {string} [contract] filter by contract address (only supported by coins which support contracts)
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
getTxHistory: (address, page, pageSize, contract, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
// verify required parameter 'address' is not null or undefined
|
|
88
|
+
common_1.assertParamExists('getTxHistory', 'address', address);
|
|
89
|
+
const localVarPath = `/api/v1/txs/{address}`
|
|
90
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
91
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
92
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
93
|
+
let baseOptions;
|
|
94
|
+
if (configuration) {
|
|
95
|
+
baseOptions = configuration.baseOptions;
|
|
96
|
+
}
|
|
97
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
98
|
+
const localVarHeaderParameter = {};
|
|
99
|
+
const localVarQueryParameter = {};
|
|
100
|
+
if (page !== undefined) {
|
|
101
|
+
localVarQueryParameter['page'] = page;
|
|
102
|
+
}
|
|
103
|
+
if (pageSize !== undefined) {
|
|
104
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
105
|
+
}
|
|
106
|
+
if (contract !== undefined) {
|
|
107
|
+
localVarQueryParameter['contract'] = contract;
|
|
108
|
+
}
|
|
109
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
|
110
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
111
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
112
|
+
return {
|
|
113
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
114
|
+
options: localVarRequestOptions,
|
|
115
|
+
};
|
|
116
|
+
}),
|
|
117
|
+
/**
|
|
118
|
+
* Get all unspent transaction outputs for a pubkey
|
|
119
|
+
* @param {string} pubkey account pubkey
|
|
120
|
+
* @param {*} [options] Override http request option.
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
*/
|
|
123
|
+
getUtxos: (pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
125
|
+
common_1.assertParamExists('getUtxos', 'pubkey', pubkey);
|
|
126
|
+
const localVarPath = `/api/v1/utxo/{pubkey}`
|
|
127
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
128
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
129
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
130
|
+
let baseOptions;
|
|
131
|
+
if (configuration) {
|
|
132
|
+
baseOptions = configuration.baseOptions;
|
|
133
|
+
}
|
|
134
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
135
|
+
const localVarHeaderParameter = {};
|
|
136
|
+
const localVarQueryParameter = {};
|
|
137
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
|
138
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
139
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
140
|
+
return {
|
|
141
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
};
|
|
144
|
+
}),
|
|
145
|
+
/**
|
|
146
|
+
* Sends raw transaction to be broadcast to the node.
|
|
147
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
148
|
+
* @param {*} [options] Override http request option.
|
|
149
|
+
* @throws {RequiredError}
|
|
150
|
+
*/
|
|
151
|
+
sendTx: (sendTxBody, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
// verify required parameter 'sendTxBody' is not null or undefined
|
|
153
|
+
common_1.assertParamExists('sendTx', 'sendTxBody', sendTxBody);
|
|
154
|
+
const localVarPath = `/api/v1/send`;
|
|
155
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
156
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
157
|
+
let baseOptions;
|
|
158
|
+
if (configuration) {
|
|
159
|
+
baseOptions = configuration.baseOptions;
|
|
160
|
+
}
|
|
161
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
162
|
+
const localVarHeaderParameter = {};
|
|
163
|
+
const localVarQueryParameter = {};
|
|
164
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
165
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
|
166
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
167
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
168
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(sendTxBody, localVarRequestOptions, configuration);
|
|
169
|
+
return {
|
|
170
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
171
|
+
options: localVarRequestOptions,
|
|
172
|
+
};
|
|
173
|
+
}),
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
exports.V1ApiAxiosParamCreator = V1ApiAxiosParamCreator;
|
|
177
|
+
/**
|
|
178
|
+
* V1Api - functional programming interface
|
|
179
|
+
* @export
|
|
180
|
+
*/
|
|
181
|
+
const V1ApiFp = function (configuration) {
|
|
182
|
+
const localVarAxiosParamCreator = exports.V1ApiAxiosParamCreator(configuration);
|
|
183
|
+
return {
|
|
184
|
+
/**
|
|
185
|
+
* Get balance of a pubkey Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
186
|
+
* @param {string} pubkey account pubkey
|
|
187
|
+
* @param {*} [options] Override http request option.
|
|
188
|
+
* @throws {RequiredError}
|
|
189
|
+
*/
|
|
190
|
+
getBalance(pubkey, options) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(pubkey, options);
|
|
193
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Get transaction history of a pubkey
|
|
198
|
+
* @param {string} address
|
|
199
|
+
* @param {number} [page] page number
|
|
200
|
+
* @param {number} [pageSize] page size
|
|
201
|
+
* @param {string} [contract] filter by contract address (only supported by coins which support contracts)
|
|
202
|
+
* @param {*} [options] Override http request option.
|
|
203
|
+
* @throws {RequiredError}
|
|
204
|
+
*/
|
|
205
|
+
getTxHistory(address, page, pageSize, contract, options) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getTxHistory(address, page, pageSize, contract, options);
|
|
208
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
/**
|
|
212
|
+
* Get all unspent transaction outputs for a pubkey
|
|
213
|
+
* @param {string} pubkey account pubkey
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
getUtxos(pubkey, options) {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUtxos(pubkey, options);
|
|
220
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Sends raw transaction to be broadcast to the node.
|
|
225
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
sendTx(sendTxBody, options) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sendTx(sendTxBody, options);
|
|
232
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
exports.V1ApiFp = V1ApiFp;
|
|
238
|
+
/**
|
|
239
|
+
* V1Api - factory interface
|
|
240
|
+
* @export
|
|
241
|
+
*/
|
|
242
|
+
const V1ApiFactory = function (configuration, basePath, axios) {
|
|
243
|
+
const localVarFp = exports.V1ApiFp(configuration);
|
|
244
|
+
return {
|
|
245
|
+
/**
|
|
246
|
+
* Get balance of a pubkey Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
247
|
+
* @param {string} pubkey account pubkey
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
getBalance(pubkey, options) {
|
|
252
|
+
return localVarFp.getBalance(pubkey, options).then((request) => request(axios, basePath));
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* Get transaction history of a pubkey
|
|
256
|
+
* @param {string} address
|
|
257
|
+
* @param {number} [page] page number
|
|
258
|
+
* @param {number} [pageSize] page size
|
|
259
|
+
* @param {string} [contract] filter by contract address (only supported by coins which support contracts)
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
getTxHistory(address, page, pageSize, contract, options) {
|
|
264
|
+
return localVarFp.getTxHistory(address, page, pageSize, contract, options).then((request) => request(axios, basePath));
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Get all unspent transaction outputs for a pubkey
|
|
268
|
+
* @param {string} pubkey account pubkey
|
|
269
|
+
* @param {*} [options] Override http request option.
|
|
270
|
+
* @throws {RequiredError}
|
|
271
|
+
*/
|
|
272
|
+
getUtxos(pubkey, options) {
|
|
273
|
+
return localVarFp.getUtxos(pubkey, options).then((request) => request(axios, basePath));
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* Sends raw transaction to be broadcast to the node.
|
|
277
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
278
|
+
* @param {*} [options] Override http request option.
|
|
279
|
+
* @throws {RequiredError}
|
|
280
|
+
*/
|
|
281
|
+
sendTx(sendTxBody, options) {
|
|
282
|
+
return localVarFp.sendTx(sendTxBody, options).then((request) => request(axios, basePath));
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
exports.V1ApiFactory = V1ApiFactory;
|
|
287
|
+
/**
|
|
288
|
+
* V1Api - object-oriented interface
|
|
289
|
+
* @export
|
|
290
|
+
* @class V1Api
|
|
291
|
+
* @extends {BaseAPI}
|
|
292
|
+
*/
|
|
293
|
+
class V1Api extends base_1.BaseAPI {
|
|
294
|
+
/**
|
|
295
|
+
* Get balance of a pubkey Examples 1. Bitcoin (address) 2. Bitcoin (xpub)
|
|
296
|
+
* @param {V1ApiGetBalanceRequest} requestParameters Request parameters.
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
* @memberof V1Api
|
|
300
|
+
*/
|
|
301
|
+
getBalance(requestParameters, options) {
|
|
302
|
+
return exports.V1ApiFp(this.configuration).getBalance(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Get transaction history of a pubkey
|
|
306
|
+
* @param {V1ApiGetTxHistoryRequest} requestParameters Request parameters.
|
|
307
|
+
* @param {*} [options] Override http request option.
|
|
308
|
+
* @throws {RequiredError}
|
|
309
|
+
* @memberof V1Api
|
|
310
|
+
*/
|
|
311
|
+
getTxHistory(requestParameters, options) {
|
|
312
|
+
return exports.V1ApiFp(this.configuration).getTxHistory(requestParameters.address, requestParameters.page, requestParameters.pageSize, requestParameters.contract, options).then((request) => request(this.axios, this.basePath));
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Get all unspent transaction outputs for a pubkey
|
|
316
|
+
* @param {V1ApiGetUtxosRequest} requestParameters Request parameters.
|
|
317
|
+
* @param {*} [options] Override http request option.
|
|
318
|
+
* @throws {RequiredError}
|
|
319
|
+
* @memberof V1Api
|
|
320
|
+
*/
|
|
321
|
+
getUtxos(requestParameters, options) {
|
|
322
|
+
return exports.V1ApiFp(this.configuration).getUtxos(requestParameters.pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Sends raw transaction to be broadcast to the node.
|
|
326
|
+
* @param {V1ApiSendTxRequest} requestParameters Request parameters.
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
* @memberof V1Api
|
|
330
|
+
*/
|
|
331
|
+
sendTx(requestParameters, options) {
|
|
332
|
+
return exports.V1ApiFp(this.configuration).sendTx(requestParameters.sendTxBody, options).then((request) => request(this.axios, this.basePath));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
exports.V1Api = V1Api;
|
|
336
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/generated/bitcoin/api.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;AAIH,kDAAiE;AACjE,yDAAyD;AACzD,aAAa;AACb,qCAA4N;AAC5N,aAAa;AACb,iCAA4F;AAgP5F;;;MAGM;AACN,IAAY,0BAEX;AAFD,WAAY,0BAA0B;IAClC,oEAAsC,CAAA;AAC1C,CAAC,EAFW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAErC;AAGD;;;GAGG;AACI,MAAM,sBAAsB,GAAG,UAAU,aAA6B;IACzE,OAAO;QACH;;;;;WAKG;QACH,UAAU,EAAE,CAAO,MAAc,EAAE,UAAe,EAAE,EAAwB,EAAE;YAC1E,8DAA8D;YAC9D,0BAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;YACjD,MAAM,YAAY,GAAG,0BAA0B;iBAC1C,OAAO,CAAC,IAAI,QAAQ,GAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAClE,oFAAoF;YACpF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,uBAAc,CAAC,CAAC;YAC7D,IAAI,WAAW,CAAC;YAChB,IAAI,aAAa,EAAE;gBACf,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC;aAC3C;YAED,MAAM,sBAAsB,iCAAK,MAAM,EAAE,KAAK,IAAK,WAAW,GAA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AAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzI,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,iBAAqC,EAAE,OAAa;QAC9D,OAAO,eAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3I,CAAC;CACJ;AA5CD,sBA4CC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @shapeshiftoss/bitcoin-api
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { Configuration } from "./configuration";
|
|
13
|
+
import { AxiosInstance } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: any;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
name: "RequiredError";
|
|
54
|
+
constructor(field: string, msg?: string);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/generated/bitcoin/base.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAoB,EAAgB,aAAa,EAAE,MAAM,OAAO,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAyC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;CAChB;AAED;;;;GAIG;AACH,qBAAa,OAAO;IAG2B,SAAS,CAAC,QAAQ,EAAE,MAAM;IAAc,SAAS,CAAC,KAAK,EAAE,aAAa;IAFjH,SAAS,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;gBAEvC,aAAa,CAAC,EAAE,aAAa,EAAY,QAAQ,GAAE,MAAkB,EAAY,KAAK,GAAE,aAA2B;CAMlI;AAED;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;IAEjB,KAAK,EAAE,MAAM;IADhC,IAAI,EAAE,eAAe,CAAmB;gBACrB,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAGjD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* @shapeshiftoss/bitcoin-api
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
// Some imports not used depending on template conditions
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const axios_1 = __importDefault(require("axios"));
|
|
23
|
+
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
exports.COLLECTION_FORMATS = {
|
|
29
|
+
csv: ",",
|
|
30
|
+
ssv: " ",
|
|
31
|
+
tsv: "\t",
|
|
32
|
+
pipes: "|",
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
class BaseAPI {
|
|
40
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
41
|
+
this.basePath = basePath;
|
|
42
|
+
this.axios = axios;
|
|
43
|
+
if (configuration) {
|
|
44
|
+
this.configuration = configuration;
|
|
45
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.BaseAPI = BaseAPI;
|
|
50
|
+
;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
* @class RequiredError
|
|
55
|
+
* @extends {Error}
|
|
56
|
+
*/
|
|
57
|
+
class RequiredError extends Error {
|
|
58
|
+
constructor(field, msg) {
|
|
59
|
+
super(msg);
|
|
60
|
+
this.field = field;
|
|
61
|
+
this.name = "RequiredError";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.RequiredError = RequiredError;
|
|
65
|
+
//# sourceMappingURL=base.js.map
|