@dynamic-labs/sdk-api-core 0.0.911 → 0.0.913

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 (83) hide show
  1. package/package.json +1 -1
  2. package/src/apis/SDKApi.cjs +128 -0
  3. package/src/apis/SDKApi.d.ts +51 -1
  4. package/src/apis/SDKApi.js +128 -0
  5. package/src/apis/WaasApi.cjs +2 -0
  6. package/src/apis/WaasApi.js +2 -0
  7. package/src/index.cjs +76 -20
  8. package/src/index.js +17 -5
  9. package/src/models/Checkout.cjs +0 -2
  10. package/src/models/Checkout.d.ts +0 -6
  11. package/src/models/Checkout.js +0 -2
  12. package/src/models/CheckoutCreateRequest.cjs +0 -2
  13. package/src/models/CheckoutCreateRequest.d.ts +0 -6
  14. package/src/models/CheckoutCreateRequest.js +0 -2
  15. package/src/models/CheckoutTransaction.cjs +5 -5
  16. package/src/models/CheckoutTransaction.d.ts +5 -5
  17. package/src/models/CheckoutTransaction.js +5 -5
  18. package/src/models/CheckoutTransactionCreateRequest.cjs +2 -2
  19. package/src/models/CheckoutTransactionCreateRequest.d.ts +2 -2
  20. package/src/models/CheckoutTransactionCreateRequest.js +2 -2
  21. package/src/models/CheckoutUpdateRequest.cjs +0 -2
  22. package/src/models/CheckoutUpdateRequest.d.ts +0 -6
  23. package/src/models/CheckoutUpdateRequest.js +0 -2
  24. package/src/models/{CheckoutEvmApprovalData.cjs → SwapEvmApprovalData.cjs} +7 -7
  25. package/src/models/{CheckoutEvmApprovalData.d.ts → SwapEvmApprovalData.d.ts} +8 -8
  26. package/src/models/{CheckoutEvmApprovalData.js → SwapEvmApprovalData.js} +5 -5
  27. package/src/models/SwapEvmTransactionData.cjs +47 -0
  28. package/src/models/SwapEvmTransactionData.d.ts +69 -0
  29. package/src/models/SwapEvmTransactionData.js +41 -0
  30. package/src/models/SwapFee.cjs +42 -0
  31. package/src/models/SwapFee.d.ts +52 -0
  32. package/src/models/SwapFee.js +36 -0
  33. package/src/models/SwapGasCost.cjs +38 -0
  34. package/src/models/SwapGasCost.d.ts +40 -0
  35. package/src/models/SwapGasCost.js +32 -0
  36. package/src/models/{CheckoutPsbtTransactionData.cjs → SwapPsbtTransactionData.cjs} +7 -7
  37. package/src/models/SwapPsbtTransactionData.d.ts +27 -0
  38. package/src/models/{CheckoutPsbtTransactionData.js → SwapPsbtTransactionData.js} +5 -5
  39. package/src/models/SwapQuoteRequest.cjs +51 -0
  40. package/src/models/SwapQuoteRequest.d.ts +60 -0
  41. package/src/models/SwapQuoteRequest.js +45 -0
  42. package/src/models/SwapQuoteRequestSide.cjs +42 -0
  43. package/src/models/SwapQuoteRequestSide.d.ts +52 -0
  44. package/src/models/SwapQuoteRequestSide.js +36 -0
  45. package/src/models/SwapQuoteResponse.cjs +51 -0
  46. package/src/models/SwapQuoteResponse.d.ts +73 -0
  47. package/src/models/SwapQuoteResponse.js +45 -0
  48. package/src/models/SwapQuoteResponseSide.cjs +42 -0
  49. package/src/models/SwapQuoteResponseSide.d.ts +52 -0
  50. package/src/models/SwapQuoteResponseSide.js +36 -0
  51. package/src/models/{CheckoutSerializedTransactionData.cjs → SwapSerializedTransactionData.cjs} +7 -7
  52. package/src/models/SwapSerializedTransactionData.d.ts +27 -0
  53. package/src/models/{CheckoutSerializedTransactionData.js → SwapSerializedTransactionData.js} +5 -5
  54. package/src/models/SwapSigningPayload.cjs +48 -0
  55. package/src/models/SwapSigningPayload.d.ts +62 -0
  56. package/src/models/SwapSigningPayload.js +42 -0
  57. package/src/models/SwapStatusRequest.cjs +38 -0
  58. package/src/models/SwapStatusRequest.d.ts +40 -0
  59. package/src/models/SwapStatusRequest.js +32 -0
  60. package/src/models/SwapStatusRequestChain.cjs +36 -0
  61. package/src/models/SwapStatusRequestChain.d.ts +34 -0
  62. package/src/models/SwapStatusRequestChain.js +30 -0
  63. package/src/models/SwapStatusResponse.cjs +56 -0
  64. package/src/models/SwapStatusResponse.d.ts +73 -0
  65. package/src/models/SwapStatusResponse.js +50 -0
  66. package/src/models/SwapStep.cjs +48 -0
  67. package/src/models/SwapStep.d.ts +66 -0
  68. package/src/models/SwapStep.js +42 -0
  69. package/src/models/SwapStepSide.cjs +40 -0
  70. package/src/models/SwapStepSide.d.ts +46 -0
  71. package/src/models/SwapStepSide.js +34 -0
  72. package/src/models/SwapToken.cjs +47 -0
  73. package/src/models/SwapToken.d.ts +69 -0
  74. package/src/models/SwapToken.js +41 -0
  75. package/src/models/index.d.ts +17 -5
  76. package/src/models/CheckoutEvmTransactionData.cjs +0 -39
  77. package/src/models/CheckoutEvmTransactionData.d.ts +0 -45
  78. package/src/models/CheckoutEvmTransactionData.js +0 -33
  79. package/src/models/CheckoutPsbtTransactionData.d.ts +0 -27
  80. package/src/models/CheckoutSerializedTransactionData.d.ts +0 -27
  81. package/src/models/CheckoutSigningPayload.cjs +0 -48
  82. package/src/models/CheckoutSigningPayload.d.ts +0 -62
  83. package/src/models/CheckoutSigningPayload.js +0 -42
@@ -0,0 +1,36 @@
1
+ import { exists } from '../runtime.js';
2
+ import { SwapTokenFromJSON, SwapTokenToJSON } from './SwapToken.js';
3
+
4
+ /* tslint:disable */
5
+ function SwapFeeFromJSON(json) {
6
+ return SwapFeeFromJSONTyped(json);
7
+ }
8
+ function SwapFeeFromJSONTyped(json, ignoreDiscriminator) {
9
+ if ((json === undefined) || (json === null)) {
10
+ return json;
11
+ }
12
+ return {
13
+ 'amount': json['amount'],
14
+ 'amountUSD': !exists(json, 'amountUSD') ? undefined : json['amountUSD'],
15
+ 'included': json['included'],
16
+ 'name': json['name'],
17
+ 'token': SwapTokenFromJSON(json['token']),
18
+ };
19
+ }
20
+ function SwapFeeToJSON(value) {
21
+ if (value === undefined) {
22
+ return undefined;
23
+ }
24
+ if (value === null) {
25
+ return null;
26
+ }
27
+ return {
28
+ 'amount': value.amount,
29
+ 'amountUSD': value.amountUSD,
30
+ 'included': value.included,
31
+ 'name': value.name,
32
+ 'token': SwapTokenToJSON(value.token),
33
+ };
34
+ }
35
+
36
+ export { SwapFeeFromJSON, SwapFeeFromJSONTyped, SwapFeeToJSON };
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+ var SwapToken = require('./SwapToken.cjs');
7
+
8
+ /* tslint:disable */
9
+ function SwapGasCostFromJSON(json) {
10
+ return SwapGasCostFromJSONTyped(json);
11
+ }
12
+ function SwapGasCostFromJSONTyped(json, ignoreDiscriminator) {
13
+ if ((json === undefined) || (json === null)) {
14
+ return json;
15
+ }
16
+ return {
17
+ 'amount': json['amount'],
18
+ 'amountUSD': !runtime.exists(json, 'amountUSD') ? undefined : json['amountUSD'],
19
+ 'token': SwapToken.SwapTokenFromJSON(json['token']),
20
+ };
21
+ }
22
+ function SwapGasCostToJSON(value) {
23
+ if (value === undefined) {
24
+ return undefined;
25
+ }
26
+ if (value === null) {
27
+ return null;
28
+ }
29
+ return {
30
+ 'amount': value.amount,
31
+ 'amountUSD': value.amountUSD,
32
+ 'token': SwapToken.SwapTokenToJSON(value.token),
33
+ };
34
+ }
35
+
36
+ exports.SwapGasCostFromJSON = SwapGasCostFromJSON;
37
+ exports.SwapGasCostFromJSONTyped = SwapGasCostFromJSONTyped;
38
+ exports.SwapGasCostToJSON = SwapGasCostToJSON;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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 { SwapToken } from './SwapToken';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SwapGasCost
17
+ */
18
+ export interface SwapGasCost {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof SwapGasCost
23
+ */
24
+ amount: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof SwapGasCost
29
+ */
30
+ amountUSD?: string;
31
+ /**
32
+ *
33
+ * @type {SwapToken}
34
+ * @memberof SwapGasCost
35
+ */
36
+ token: SwapToken;
37
+ }
38
+ export declare function SwapGasCostFromJSON(json: any): SwapGasCost;
39
+ export declare function SwapGasCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapGasCost;
40
+ export declare function SwapGasCostToJSON(value?: SwapGasCost | null): any;
@@ -0,0 +1,32 @@
1
+ import { exists } from '../runtime.js';
2
+ import { SwapTokenFromJSON, SwapTokenToJSON } from './SwapToken.js';
3
+
4
+ /* tslint:disable */
5
+ function SwapGasCostFromJSON(json) {
6
+ return SwapGasCostFromJSONTyped(json);
7
+ }
8
+ function SwapGasCostFromJSONTyped(json, ignoreDiscriminator) {
9
+ if ((json === undefined) || (json === null)) {
10
+ return json;
11
+ }
12
+ return {
13
+ 'amount': json['amount'],
14
+ 'amountUSD': !exists(json, 'amountUSD') ? undefined : json['amountUSD'],
15
+ 'token': SwapTokenFromJSON(json['token']),
16
+ };
17
+ }
18
+ function SwapGasCostToJSON(value) {
19
+ if (value === undefined) {
20
+ return undefined;
21
+ }
22
+ if (value === null) {
23
+ return null;
24
+ }
25
+ return {
26
+ 'amount': value.amount,
27
+ 'amountUSD': value.amountUSD,
28
+ 'token': SwapTokenToJSON(value.token),
29
+ };
30
+ }
31
+
32
+ export { SwapGasCostFromJSON, SwapGasCostFromJSONTyped, SwapGasCostToJSON };
@@ -15,10 +15,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
15
15
  * https://openapi-generator.tech
16
16
  * Do not edit the class manually.
17
17
  */
18
- function CheckoutPsbtTransactionDataFromJSON(json) {
19
- return CheckoutPsbtTransactionDataFromJSONTyped(json);
18
+ function SwapPsbtTransactionDataFromJSON(json) {
19
+ return SwapPsbtTransactionDataFromJSONTyped(json);
20
20
  }
21
- function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
21
+ function SwapPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
22
22
  if ((json === undefined) || (json === null)) {
23
23
  return json;
24
24
  }
@@ -26,7 +26,7 @@ function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
26
26
  'psbt': json['psbt'],
27
27
  };
28
28
  }
29
- function CheckoutPsbtTransactionDataToJSON(value) {
29
+ function SwapPsbtTransactionDataToJSON(value) {
30
30
  if (value === undefined) {
31
31
  return undefined;
32
32
  }
@@ -38,6 +38,6 @@ function CheckoutPsbtTransactionDataToJSON(value) {
38
38
  };
39
39
  }
40
40
 
41
- exports.CheckoutPsbtTransactionDataFromJSON = CheckoutPsbtTransactionDataFromJSON;
42
- exports.CheckoutPsbtTransactionDataFromJSONTyped = CheckoutPsbtTransactionDataFromJSONTyped;
43
- exports.CheckoutPsbtTransactionDataToJSON = CheckoutPsbtTransactionDataToJSON;
41
+ exports.SwapPsbtTransactionDataFromJSON = SwapPsbtTransactionDataFromJSON;
42
+ exports.SwapPsbtTransactionDataFromJSONTyped = SwapPsbtTransactionDataFromJSONTyped;
43
+ exports.SwapPsbtTransactionDataToJSON = SwapPsbtTransactionDataToJSON;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SwapPsbtTransactionData
16
+ */
17
+ export interface SwapPsbtTransactionData {
18
+ /**
19
+ * Base64-encoded unsigned PSBT
20
+ * @type {string}
21
+ * @memberof SwapPsbtTransactionData
22
+ */
23
+ psbt: string;
24
+ }
25
+ export declare function SwapPsbtTransactionDataFromJSON(json: any): SwapPsbtTransactionData;
26
+ export declare function SwapPsbtTransactionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapPsbtTransactionData;
27
+ export declare function SwapPsbtTransactionDataToJSON(value?: SwapPsbtTransactionData | null): any;
@@ -11,10 +11,10 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- function CheckoutPsbtTransactionDataFromJSON(json) {
15
- return CheckoutPsbtTransactionDataFromJSONTyped(json);
14
+ function SwapPsbtTransactionDataFromJSON(json) {
15
+ return SwapPsbtTransactionDataFromJSONTyped(json);
16
16
  }
17
- function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
17
+ function SwapPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
18
18
  if ((json === undefined) || (json === null)) {
19
19
  return json;
20
20
  }
@@ -22,7 +22,7 @@ function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
22
22
  'psbt': json['psbt'],
23
23
  };
24
24
  }
25
- function CheckoutPsbtTransactionDataToJSON(value) {
25
+ function SwapPsbtTransactionDataToJSON(value) {
26
26
  if (value === undefined) {
27
27
  return undefined;
28
28
  }
@@ -34,4 +34,4 @@ function CheckoutPsbtTransactionDataToJSON(value) {
34
34
  };
35
35
  }
36
36
 
37
- export { CheckoutPsbtTransactionDataFromJSON, CheckoutPsbtTransactionDataFromJSONTyped, CheckoutPsbtTransactionDataToJSON };
37
+ export { SwapPsbtTransactionDataFromJSON, SwapPsbtTransactionDataFromJSONTyped, SwapPsbtTransactionDataToJSON };
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+ var SwapQuoteRequestSide = require('./SwapQuoteRequestSide.cjs');
7
+
8
+ /* tslint:disable */
9
+ /**
10
+ * @export
11
+ * @enum {string}
12
+ */
13
+ exports.SwapQuoteRequestOrderEnum = void 0;
14
+ (function (SwapQuoteRequestOrderEnum) {
15
+ SwapQuoteRequestOrderEnum["Cheapest"] = "CHEAPEST";
16
+ SwapQuoteRequestOrderEnum["Fastest"] = "FASTEST";
17
+ })(exports.SwapQuoteRequestOrderEnum || (exports.SwapQuoteRequestOrderEnum = {}));
18
+ function SwapQuoteRequestFromJSON(json) {
19
+ return SwapQuoteRequestFromJSONTyped(json);
20
+ }
21
+ function SwapQuoteRequestFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'from': SwapQuoteRequestSide.SwapQuoteRequestSideFromJSON(json['from']),
27
+ 'maxPriceImpact': !runtime.exists(json, 'maxPriceImpact') ? undefined : json['maxPriceImpact'],
28
+ 'order': !runtime.exists(json, 'order') ? undefined : json['order'],
29
+ 'slippage': !runtime.exists(json, 'slippage') ? undefined : json['slippage'],
30
+ 'to': SwapQuoteRequestSide.SwapQuoteRequestSideFromJSON(json['to']),
31
+ };
32
+ }
33
+ function SwapQuoteRequestToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'from': SwapQuoteRequestSide.SwapQuoteRequestSideToJSON(value.from),
42
+ 'maxPriceImpact': value.maxPriceImpact,
43
+ 'order': value.order,
44
+ 'slippage': value.slippage,
45
+ 'to': SwapQuoteRequestSide.SwapQuoteRequestSideToJSON(value.to),
46
+ };
47
+ }
48
+
49
+ exports.SwapQuoteRequestFromJSON = SwapQuoteRequestFromJSON;
50
+ exports.SwapQuoteRequestFromJSONTyped = SwapQuoteRequestFromJSONTyped;
51
+ exports.SwapQuoteRequestToJSON = SwapQuoteRequestToJSON;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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 { SwapQuoteRequestSide } from './SwapQuoteRequestSide';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SwapQuoteRequest
17
+ */
18
+ export interface SwapQuoteRequest {
19
+ /**
20
+ *
21
+ * @type {SwapQuoteRequestSide}
22
+ * @memberof SwapQuoteRequest
23
+ */
24
+ from: SwapQuoteRequestSide;
25
+ /**
26
+ * The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.
27
+ * @type {number}
28
+ * @memberof SwapQuoteRequest
29
+ */
30
+ maxPriceImpact?: number;
31
+ /**
32
+ * Route optimization preference.
33
+ * @type {string}
34
+ * @memberof SwapQuoteRequest
35
+ */
36
+ order?: SwapQuoteRequestOrderEnum;
37
+ /**
38
+ * Slippage tolerance (e.g. 0.005 for 0.5%)
39
+ * @type {number}
40
+ * @memberof SwapQuoteRequest
41
+ */
42
+ slippage?: number;
43
+ /**
44
+ *
45
+ * @type {SwapQuoteRequestSide}
46
+ * @memberof SwapQuoteRequest
47
+ */
48
+ to: SwapQuoteRequestSide;
49
+ }
50
+ /**
51
+ * @export
52
+ * @enum {string}
53
+ */
54
+ export declare enum SwapQuoteRequestOrderEnum {
55
+ Cheapest = "CHEAPEST",
56
+ Fastest = "FASTEST"
57
+ }
58
+ export declare function SwapQuoteRequestFromJSON(json: any): SwapQuoteRequest;
59
+ export declare function SwapQuoteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteRequest;
60
+ export declare function SwapQuoteRequestToJSON(value?: SwapQuoteRequest | null): any;
@@ -0,0 +1,45 @@
1
+ import { exists } from '../runtime.js';
2
+ import { SwapQuoteRequestSideFromJSON, SwapQuoteRequestSideToJSON } from './SwapQuoteRequestSide.js';
3
+
4
+ /* tslint:disable */
5
+ /**
6
+ * @export
7
+ * @enum {string}
8
+ */
9
+ var SwapQuoteRequestOrderEnum;
10
+ (function (SwapQuoteRequestOrderEnum) {
11
+ SwapQuoteRequestOrderEnum["Cheapest"] = "CHEAPEST";
12
+ SwapQuoteRequestOrderEnum["Fastest"] = "FASTEST";
13
+ })(SwapQuoteRequestOrderEnum || (SwapQuoteRequestOrderEnum = {}));
14
+ function SwapQuoteRequestFromJSON(json) {
15
+ return SwapQuoteRequestFromJSONTyped(json);
16
+ }
17
+ function SwapQuoteRequestFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'from': SwapQuoteRequestSideFromJSON(json['from']),
23
+ 'maxPriceImpact': !exists(json, 'maxPriceImpact') ? undefined : json['maxPriceImpact'],
24
+ 'order': !exists(json, 'order') ? undefined : json['order'],
25
+ 'slippage': !exists(json, 'slippage') ? undefined : json['slippage'],
26
+ 'to': SwapQuoteRequestSideFromJSON(json['to']),
27
+ };
28
+ }
29
+ function SwapQuoteRequestToJSON(value) {
30
+ if (value === undefined) {
31
+ return undefined;
32
+ }
33
+ if (value === null) {
34
+ return null;
35
+ }
36
+ return {
37
+ 'from': SwapQuoteRequestSideToJSON(value.from),
38
+ 'maxPriceImpact': value.maxPriceImpact,
39
+ 'order': value.order,
40
+ 'slippage': value.slippage,
41
+ 'to': SwapQuoteRequestSideToJSON(value.to),
42
+ };
43
+ }
44
+
45
+ export { SwapQuoteRequestFromJSON, SwapQuoteRequestFromJSONTyped, SwapQuoteRequestOrderEnum, SwapQuoteRequestToJSON };
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+ var ChainEnum = require('./ChainEnum.cjs');
7
+
8
+ /* tslint:disable */
9
+ function SwapQuoteRequestSideFromJSON(json) {
10
+ return SwapQuoteRequestSideFromJSONTyped(json);
11
+ }
12
+ function SwapQuoteRequestSideFromJSONTyped(json, ignoreDiscriminator) {
13
+ if ((json === undefined) || (json === null)) {
14
+ return json;
15
+ }
16
+ return {
17
+ 'address': json['address'],
18
+ 'amount': !runtime.exists(json, 'amount') ? undefined : json['amount'],
19
+ 'chainId': json['chainId'],
20
+ 'chainName': ChainEnum.ChainEnumFromJSON(json['chainName']),
21
+ 'tokenAddress': json['tokenAddress'],
22
+ };
23
+ }
24
+ function SwapQuoteRequestSideToJSON(value) {
25
+ if (value === undefined) {
26
+ return undefined;
27
+ }
28
+ if (value === null) {
29
+ return null;
30
+ }
31
+ return {
32
+ 'address': value.address,
33
+ 'amount': value.amount,
34
+ 'chainId': value.chainId,
35
+ 'chainName': ChainEnum.ChainEnumToJSON(value.chainName),
36
+ 'tokenAddress': value.tokenAddress,
37
+ };
38
+ }
39
+
40
+ exports.SwapQuoteRequestSideFromJSON = SwapQuoteRequestSideFromJSON;
41
+ exports.SwapQuoteRequestSideFromJSONTyped = SwapQuoteRequestSideFromJSONTyped;
42
+ exports.SwapQuoteRequestSideToJSON = SwapQuoteRequestSideToJSON;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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 { ChainEnum } from './ChainEnum';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SwapQuoteRequestSide
17
+ */
18
+ export interface SwapQuoteRequestSide {
19
+ /**
20
+ * Valid blockchain wallet address, must be an alphanumeric string without any special characters
21
+ * @type {string}
22
+ * @memberof SwapQuoteRequestSide
23
+ */
24
+ address: string;
25
+ /**
26
+ * Token amount in raw units. Only one side (from or to) should specify an amount.
27
+ * @type {string}
28
+ * @memberof SwapQuoteRequestSide
29
+ */
30
+ amount?: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof SwapQuoteRequestSide
35
+ */
36
+ chainId: string;
37
+ /**
38
+ *
39
+ * @type {ChainEnum}
40
+ * @memberof SwapQuoteRequestSide
41
+ */
42
+ chainName: ChainEnum;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof SwapQuoteRequestSide
47
+ */
48
+ tokenAddress: string;
49
+ }
50
+ export declare function SwapQuoteRequestSideFromJSON(json: any): SwapQuoteRequestSide;
51
+ export declare function SwapQuoteRequestSideFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteRequestSide;
52
+ export declare function SwapQuoteRequestSideToJSON(value?: SwapQuoteRequestSide | null): any;
@@ -0,0 +1,36 @@
1
+ import { exists } from '../runtime.js';
2
+ import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
3
+
4
+ /* tslint:disable */
5
+ function SwapQuoteRequestSideFromJSON(json) {
6
+ return SwapQuoteRequestSideFromJSONTyped(json);
7
+ }
8
+ function SwapQuoteRequestSideFromJSONTyped(json, ignoreDiscriminator) {
9
+ if ((json === undefined) || (json === null)) {
10
+ return json;
11
+ }
12
+ return {
13
+ 'address': json['address'],
14
+ 'amount': !exists(json, 'amount') ? undefined : json['amount'],
15
+ 'chainId': json['chainId'],
16
+ 'chainName': ChainEnumFromJSON(json['chainName']),
17
+ 'tokenAddress': json['tokenAddress'],
18
+ };
19
+ }
20
+ function SwapQuoteRequestSideToJSON(value) {
21
+ if (value === undefined) {
22
+ return undefined;
23
+ }
24
+ if (value === null) {
25
+ return null;
26
+ }
27
+ return {
28
+ 'address': value.address,
29
+ 'amount': value.amount,
30
+ 'chainId': value.chainId,
31
+ 'chainName': ChainEnumToJSON(value.chainName),
32
+ 'tokenAddress': value.tokenAddress,
33
+ };
34
+ }
35
+
36
+ export { SwapQuoteRequestSideFromJSON, SwapQuoteRequestSideFromJSONTyped, SwapQuoteRequestSideToJSON };
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+ var SwapFee = require('./SwapFee.cjs');
7
+ var SwapQuoteResponseSide = require('./SwapQuoteResponseSide.cjs');
8
+ var SwapSigningPayload = require('./SwapSigningPayload.cjs');
9
+ var SwapStep = require('./SwapStep.cjs');
10
+
11
+ /* tslint:disable */
12
+ function SwapQuoteResponseFromJSON(json) {
13
+ return SwapQuoteResponseFromJSONTyped(json);
14
+ }
15
+ function SwapQuoteResponseFromJSONTyped(json, ignoreDiscriminator) {
16
+ if ((json === undefined) || (json === null)) {
17
+ return json;
18
+ }
19
+ return {
20
+ 'approvalAddress': !runtime.exists(json, 'approvalAddress') ? undefined : json['approvalAddress'],
21
+ 'feeCosts': !runtime.exists(json, 'feeCosts') ? undefined : (json['feeCosts'].map(SwapFee.SwapFeeFromJSON)),
22
+ 'from': SwapQuoteResponseSide.SwapQuoteResponseSideFromJSON(json['from']),
23
+ 'gasCostUSD': !runtime.exists(json, 'gasCostUSD') ? undefined : json['gasCostUSD'],
24
+ 'id': json['id'],
25
+ 'signingPayload': !runtime.exists(json, 'signingPayload') ? undefined : SwapSigningPayload.SwapSigningPayloadFromJSON(json['signingPayload']),
26
+ 'steps': (json['steps'].map(SwapStep.SwapStepFromJSON)),
27
+ 'to': SwapQuoteResponseSide.SwapQuoteResponseSideFromJSON(json['to']),
28
+ };
29
+ }
30
+ function SwapQuoteResponseToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'approvalAddress': value.approvalAddress,
39
+ 'feeCosts': value.feeCosts === undefined ? undefined : (value.feeCosts.map(SwapFee.SwapFeeToJSON)),
40
+ 'from': SwapQuoteResponseSide.SwapQuoteResponseSideToJSON(value.from),
41
+ 'gasCostUSD': value.gasCostUSD,
42
+ 'id': value.id,
43
+ 'signingPayload': SwapSigningPayload.SwapSigningPayloadToJSON(value.signingPayload),
44
+ 'steps': (value.steps.map(SwapStep.SwapStepToJSON)),
45
+ 'to': SwapQuoteResponseSide.SwapQuoteResponseSideToJSON(value.to),
46
+ };
47
+ }
48
+
49
+ exports.SwapQuoteResponseFromJSON = SwapQuoteResponseFromJSON;
50
+ exports.SwapQuoteResponseFromJSONTyped = SwapQuoteResponseFromJSONTyped;
51
+ exports.SwapQuoteResponseToJSON = SwapQuoteResponseToJSON;
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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 { SwapFee } from './SwapFee';
13
+ import { SwapQuoteResponseSide } from './SwapQuoteResponseSide';
14
+ import { SwapSigningPayload } from './SwapSigningPayload';
15
+ import { SwapStep } from './SwapStep';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SwapQuoteResponse
20
+ */
21
+ export interface SwapQuoteResponse {
22
+ /**
23
+ * Address that needs token approval (spender), if applicable
24
+ * @type {string}
25
+ * @memberof SwapQuoteResponse
26
+ */
27
+ approvalAddress?: string;
28
+ /**
29
+ *
30
+ * @type {Array<SwapFee>}
31
+ * @memberof SwapQuoteResponse
32
+ */
33
+ feeCosts?: Array<SwapFee>;
34
+ /**
35
+ *
36
+ * @type {SwapQuoteResponseSide}
37
+ * @memberof SwapQuoteResponse
38
+ */
39
+ from: SwapQuoteResponseSide;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof SwapQuoteResponse
44
+ */
45
+ gasCostUSD?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof SwapQuoteResponse
50
+ */
51
+ id: string;
52
+ /**
53
+ *
54
+ * @type {SwapSigningPayload}
55
+ * @memberof SwapQuoteResponse
56
+ */
57
+ signingPayload?: SwapSigningPayload;
58
+ /**
59
+ *
60
+ * @type {Array<SwapStep>}
61
+ * @memberof SwapQuoteResponse
62
+ */
63
+ steps: Array<SwapStep>;
64
+ /**
65
+ *
66
+ * @type {SwapQuoteResponseSide}
67
+ * @memberof SwapQuoteResponse
68
+ */
69
+ to: SwapQuoteResponseSide;
70
+ }
71
+ export declare function SwapQuoteResponseFromJSON(json: any): SwapQuoteResponse;
72
+ export declare function SwapQuoteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteResponse;
73
+ export declare function SwapQuoteResponseToJSON(value?: SwapQuoteResponse | null): any;