@shapeshiftoss/unchained-client 9.1.1 → 9.3.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.
Files changed (60) hide show
  1. package/dist/bitcoin/parser/index.d.ts +1 -0
  2. package/dist/bitcoin/parser/index.js +2 -1
  3. package/dist/dogecoin/index.d.ts +3 -0
  4. package/dist/dogecoin/index.js +19 -0
  5. package/dist/evm/avalanche/parser/index.d.ts +2 -2
  6. package/dist/evm/ethereum/parser/foxy.d.ts +3 -3
  7. package/dist/evm/ethereum/parser/index.d.ts +2 -2
  8. package/dist/evm/ethereum/parser/thor.d.ts +3 -3
  9. package/dist/evm/ethereum/parser/uniV2.d.ts +5 -5
  10. package/dist/evm/ethereum/parser/weth.d.ts +3 -3
  11. package/dist/evm/ethereum/parser/yearn.d.ts +3 -3
  12. package/dist/evm/ethereum/parser/zrx.d.ts +3 -3
  13. package/dist/evm/index.d.ts +2 -0
  14. package/dist/evm/index.js +3 -1
  15. package/dist/evm/parser/types.d.ts +2 -3
  16. package/dist/generated/avalanche/api.d.ts +121 -152
  17. package/dist/generated/avalanche/api.js +5 -5
  18. package/dist/generated/avalanche/base.d.ts +1 -1
  19. package/dist/generated/avalanche/base.js +1 -1
  20. package/dist/generated/avalanche/common.d.ts +1 -1
  21. package/dist/generated/avalanche/common.js +1 -1
  22. package/dist/generated/avalanche/configuration.d.ts +1 -1
  23. package/dist/generated/avalanche/configuration.js +1 -1
  24. package/dist/generated/avalanche/index.d.ts +1 -1
  25. package/dist/generated/avalanche/index.js +1 -1
  26. package/dist/generated/bitcoin/api.d.ts +45 -76
  27. package/dist/generated/bitcoin/api.js +1 -1
  28. package/dist/generated/bitcoin/base.d.ts +1 -1
  29. package/dist/generated/bitcoin/base.js +1 -1
  30. package/dist/generated/bitcoin/common.d.ts +1 -1
  31. package/dist/generated/bitcoin/common.js +1 -1
  32. package/dist/generated/bitcoin/configuration.d.ts +1 -1
  33. package/dist/generated/bitcoin/configuration.js +1 -1
  34. package/dist/generated/bitcoin/index.d.ts +1 -1
  35. package/dist/generated/bitcoin/index.js +1 -1
  36. package/dist/generated/dogecoin/api.d.ts +1010 -0
  37. package/dist/generated/dogecoin/api.js +521 -0
  38. package/dist/generated/dogecoin/base.d.ts +55 -0
  39. package/dist/generated/dogecoin/base.js +64 -0
  40. package/dist/generated/dogecoin/common.d.ts +65 -0
  41. package/dist/generated/dogecoin/common.js +137 -0
  42. package/dist/generated/dogecoin/configuration.d.ts +83 -0
  43. package/dist/generated/dogecoin/configuration.js +42 -0
  44. package/dist/generated/dogecoin/index.d.ts +13 -0
  45. package/dist/generated/dogecoin/index.js +31 -0
  46. package/dist/generated/ethereum/api.d.ts +117 -148
  47. package/dist/generated/ethereum/api.js +1 -1
  48. package/dist/generated/ethereum/base.d.ts +1 -1
  49. package/dist/generated/ethereum/base.js +1 -1
  50. package/dist/generated/ethereum/common.d.ts +1 -1
  51. package/dist/generated/ethereum/common.js +1 -1
  52. package/dist/generated/ethereum/configuration.d.ts +1 -1
  53. package/dist/generated/ethereum/configuration.js +1 -1
  54. package/dist/generated/ethereum/index.d.ts +1 -1
  55. package/dist/generated/ethereum/index.js +1 -1
  56. package/dist/index.d.ts +4 -1
  57. package/dist/index.js +5 -2
  58. package/dist/websocket.d.ts +11 -3
  59. package/dist/websocket.js +124 -97
  60. package/package.json +2 -2
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @shapeshiftoss/dogecoin-api
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 7.2.0
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 { RequestArgs } from "./base";
14
+ import { AxiosInstance, AxiosResponse } from 'axios';
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const DUMMY_BASE_URL = "https://example.com";
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
+ /**
27
+ *
28
+ * @export
29
+ */
30
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration | undefined) => Promise<void>;
31
+ /**
32
+ *
33
+ * @export
34
+ */
35
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration | undefined) => void;
36
+ /**
37
+ *
38
+ * @export
39
+ */
40
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration | undefined) => Promise<void>;
41
+ /**
42
+ *
43
+ * @export
44
+ */
45
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration | undefined) => Promise<void>;
46
+ /**
47
+ *
48
+ * @export
49
+ */
50
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration | undefined) => any;
56
+ /**
57
+ *
58
+ * @export
59
+ */
60
+ export declare const toPathString: (url: URL) => string;
61
+ /**
62
+ *
63
+ * @export
64
+ */
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>;
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * @shapeshiftoss/dogecoin-api
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 7.2.0
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
+ Object.defineProperty(exports, "__esModule", { value: true });
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;
17
+ const base_1 = require("./base");
18
+ /**
19
+ *
20
+ * @export
21
+ */
22
+ exports.DUMMY_BASE_URL = 'https://example.com';
23
+ /**
24
+ *
25
+ * @throws {RequiredError}
26
+ * @export
27
+ */
28
+ const assertParamExists = function (functionName, paramName, paramValue) {
29
+ if (paramValue === null || paramValue === undefined) {
30
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
31
+ }
32
+ };
33
+ exports.assertParamExists = assertParamExists;
34
+ /**
35
+ *
36
+ * @export
37
+ */
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
+ }
45
+ };
46
+ exports.setApiKeyToObject = setApiKeyToObject;
47
+ /**
48
+ *
49
+ * @export
50
+ */
51
+ const setBasicAuthToObject = function (object, configuration) {
52
+ if (configuration && (configuration.username || configuration.password)) {
53
+ object["auth"] = { username: configuration.username, password: configuration.password };
54
+ }
55
+ };
56
+ exports.setBasicAuthToObject = setBasicAuthToObject;
57
+ /**
58
+ *
59
+ * @export
60
+ */
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
+ }
68
+ };
69
+ exports.setBearerAuthToObject = setBearerAuthToObject;
70
+ /**
71
+ *
72
+ * @export
73
+ */
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
+ }
81
+ };
82
+ exports.setOAuthToObject = setOAuthToObject;
83
+ /**
84
+ *
85
+ * @export
86
+ */
87
+ const setSearchParams = function (url, ...objects) {
88
+ const searchParams = new URLSearchParams(url.search);
89
+ for (const object of objects) {
90
+ for (const key in object) {
91
+ if (Array.isArray(object[key])) {
92
+ searchParams.delete(key);
93
+ for (const item of object[key]) {
94
+ searchParams.append(key, item);
95
+ }
96
+ }
97
+ else {
98
+ searchParams.set(key, object[key]);
99
+ }
100
+ }
101
+ }
102
+ url.search = searchParams.toString();
103
+ };
104
+ exports.setSearchParams = setSearchParams;
105
+ /**
106
+ *
107
+ * @export
108
+ */
109
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
110
+ const nonString = typeof value !== 'string';
111
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
112
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
113
+ : nonString;
114
+ return needsSerialization
115
+ ? JSON.stringify(value !== undefined ? value : {})
116
+ : (value || "");
117
+ };
118
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
119
+ /**
120
+ *
121
+ * @export
122
+ */
123
+ const toPathString = function (url) {
124
+ return url.pathname + url.search + url.hash;
125
+ };
126
+ exports.toPathString = toPathString;
127
+ /**
128
+ *
129
+ * @export
130
+ */
131
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
132
+ return (axios = globalAxios, basePath = BASE_PATH) => {
133
+ const axiosRequestArgs = { ...axiosArgs.options, url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url };
134
+ return axios.request(axiosRequestArgs);
135
+ };
136
+ };
137
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @shapeshiftoss/dogecoin-api
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 7.2.0
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
+ export interface ConfigurationParameters {
13
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
+ basePath?: string;
18
+ baseOptions?: any;
19
+ formDataCtor?: new () => any;
20
+ }
21
+ export declare class Configuration {
22
+ /**
23
+ * parameter for apiKey security
24
+ * @param name security name
25
+ * @memberof Configuration
26
+ */
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ /**
29
+ * parameter for basic security
30
+ *
31
+ * @type {string}
32
+ * @memberof Configuration
33
+ */
34
+ username?: string;
35
+ /**
36
+ * parameter for basic security
37
+ *
38
+ * @type {string}
39
+ * @memberof Configuration
40
+ */
41
+ password?: string;
42
+ /**
43
+ * parameter for oauth2 security
44
+ * @param name security name
45
+ * @param scopes oauth2 scope
46
+ * @memberof Configuration
47
+ */
48
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
49
+ /**
50
+ * override base path
51
+ *
52
+ * @type {string}
53
+ * @memberof Configuration
54
+ */
55
+ basePath?: string;
56
+ /**
57
+ * base options for axios calls
58
+ *
59
+ * @type {any}
60
+ * @memberof Configuration
61
+ */
62
+ baseOptions?: any;
63
+ /**
64
+ * The FormData constructor that will be used to create multipart form data
65
+ * requests. You can inject this here so that execution environments that
66
+ * do not support the FormData class can still run the generated client.
67
+ *
68
+ * @type {new () => FormData}
69
+ */
70
+ formDataCtor?: new () => any;
71
+ constructor(param?: ConfigurationParameters);
72
+ /**
73
+ * Check if the given MIME is a JSON MIME.
74
+ * JSON MIME examples:
75
+ * application/json
76
+ * application/json; charset=UTF8
77
+ * APPLICATION/JSON
78
+ * application/vnd.company+json
79
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
80
+ * @return True if the given MIME is JSON, false otherwise.
81
+ */
82
+ isJsonMime(mime: string): boolean;
83
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * @shapeshiftoss/dogecoin-api
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 7.2.0
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ constructor(param = {}) {
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.basePath = param.basePath;
24
+ this.baseOptions = param.baseOptions;
25
+ this.formDataCtor = param.formDataCtor;
26
+ }
27
+ /**
28
+ * Check if the given MIME is a JSON MIME.
29
+ * JSON MIME examples:
30
+ * application/json
31
+ * application/json; charset=UTF8
32
+ * APPLICATION/JSON
33
+ * application/vnd.company+json
34
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
35
+ * @return True if the given MIME is JSON, false otherwise.
36
+ */
37
+ isJsonMime(mime) {
38
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
39
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
40
+ }
41
+ }
42
+ exports.Configuration = Configuration;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @shapeshiftoss/dogecoin-api
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 7.2.0
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
+ export * from "./api";
13
+ export * from "./configuration";
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * @shapeshiftoss/dogecoin-api
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 7.2.0
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api"), exports);
31
+ __exportStar(require("./configuration"), exports);