@cobo/cobo-waas2 1.12.0 → 1.13.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.
Files changed (159) hide show
  1. package/README.md +54 -18
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/FeeStationApi.js +18 -18
  4. package/dist/api/TransactionsApi.js +2 -2
  5. package/dist/api/WalletsApi.js +8 -8
  6. package/dist/index.js +260 -43
  7. package/dist/model/ActivityExtra.js +0 -23
  8. package/dist/model/AddressEncoding.js +15 -0
  9. package/dist/model/AddressesEventData.js +8 -3
  10. package/dist/model/BTCBIP137MessageSignDestination.js +122 -0
  11. package/dist/model/BTCBIP322MessageSignDestination.js +122 -0
  12. package/dist/model/BabylonStakingActivityDetailExtra.js +0 -39
  13. package/dist/model/{ListSwapActivities200Response.js → BankAccount.js} +51 -51
  14. package/dist/model/ChainsEventData.js +8 -3
  15. package/dist/model/CosmosAdr36MessageSignDestination.js +122 -0
  16. package/dist/model/CosmosContractCallDestination.js +152 -0
  17. package/dist/model/CosmosContractCallMessage.js +126 -0
  18. package/dist/model/CreateSettlement.js +174 -0
  19. package/dist/model/MPCVaultEventData.js +8 -3
  20. package/dist/model/{CreateSwapActivityRequest.js → Merchant.js} +45 -58
  21. package/dist/model/MessageSignDestination.js +111 -9
  22. package/dist/model/MessageSignDestinationType.js +15 -0
  23. package/dist/model/Order.js +306 -0
  24. package/dist/model/OrderStatus.js +76 -0
  25. package/dist/model/PaymentTransaction.js +201 -0
  26. package/dist/model/RefreshAddressBalancesByTokenRequest.js +2 -3
  27. package/dist/model/Refund.js +237 -0
  28. package/dist/model/RefundStatus.js +76 -0
  29. package/dist/model/RefundType.js +61 -0
  30. package/dist/model/SettleRequestStatus.js +76 -0
  31. package/dist/model/SettleStatus.js +76 -0
  32. package/dist/model/Settlement.js +168 -0
  33. package/dist/model/SettlementDetail.js +184 -0
  34. package/dist/model/SettlementInfo.js +175 -0
  35. package/dist/model/SettlementType.js +61 -0
  36. package/dist/model/SwapActivity.js +36 -5
  37. package/dist/model/SwapActivityStatus.js +66 -0
  38. package/dist/model/SwapActivityType.js +61 -0
  39. package/dist/model/SwapQuote.js +21 -34
  40. package/dist/model/{CreateSwapQuoteRequest.js → SwapToken.js} +73 -60
  41. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  42. package/dist/model/TokenListing.js +230 -0
  43. package/dist/model/TokenListingEventData.js +363 -0
  44. package/dist/model/TokenListingRequestSource.js +61 -0
  45. package/dist/model/TokenListingRequestStatus.js +66 -0
  46. package/dist/model/TokensEventData.js +8 -3
  47. package/dist/model/Transaction.js +22 -5
  48. package/dist/model/TransactionBIP137Destination.js +122 -0
  49. package/dist/model/TransactionBIP322Destination.js +122 -0
  50. package/dist/model/TransactionBabylonBusinessInfo.js +138 -0
  51. package/dist/model/TransactionBabylonTxParameters.js +168 -0
  52. package/dist/model/TransactionCoreStakeInfo.js +168 -0
  53. package/dist/model/TransactionCosmosAdr36Destination.js +122 -0
  54. package/dist/model/TransactionCosmosContractDestination.js +152 -0
  55. package/dist/model/{ListEnableTokenPairs200Response.js → TransactionCosmosMessage.js} +54 -51
  56. package/dist/model/TransactionDestination.js +172 -8
  57. package/dist/model/TransactionDestinationType.js +20 -0
  58. package/dist/model/TransactionDetail.js +29 -7
  59. package/dist/model/TransactionDetails.js +29 -7
  60. package/dist/model/TransactionExtra.js +278 -0
  61. package/dist/model/TransactionExtraType.js +66 -0
  62. package/dist/model/TransactionFuelingInfo.js +3 -3
  63. package/dist/model/TransactionMessageSignBTCEIP191Destination.js +122 -0
  64. package/dist/model/TransactionRbfSource.js +37 -9
  65. package/dist/model/TransactionSelectedUtxo.js +2 -2
  66. package/dist/model/TransactionSubStatus.js +45 -0
  67. package/dist/model/TransactionWebhookEventData.js +37 -10
  68. package/dist/model/UpdateCustodialWalletParams.js +6 -4
  69. package/dist/model/UpdateExchangeWalletParams.js +6 -4
  70. package/dist/model/UpdateMpcWalletParams.js +6 -4
  71. package/dist/model/UpdateSmartContractWalletParams.js +6 -4
  72. package/dist/model/WalletInfoEventData.js +8 -3
  73. package/dist/model/WebhookEventData.js +81 -18
  74. package/dist/model/WebhookEventDataType.js +7 -2
  75. package/dist/model/WebhookEventType.js +10 -0
  76. package/docs/ActivityExtra.md +0 -4
  77. package/docs/AddressEncoding.md +6 -0
  78. package/docs/AddressesEventData.md +3 -1
  79. package/docs/BTCBIP137MessageSignDestination.md +10 -0
  80. package/docs/BTCBIP322MessageSignDestination.md +10 -0
  81. package/docs/BabylonStakingActivityDetailExtra.md +0 -4
  82. package/docs/BankAccount.md +10 -0
  83. package/docs/ChainsEventData.md +3 -1
  84. package/docs/CosmosAdr36MessageSignDestination.md +10 -0
  85. package/docs/CosmosContractCallDestination.md +11 -0
  86. package/docs/CosmosContractCallMessage.md +10 -0
  87. package/docs/CreateSettlement.md +14 -0
  88. package/docs/FeeStationApi.md +13 -13
  89. package/docs/MPCVaultEventData.md +3 -1
  90. package/docs/Merchant.md +11 -0
  91. package/docs/MessageSignDestination.md +3 -0
  92. package/docs/MessageSignDestinationType.md +6 -0
  93. package/docs/Order.md +23 -0
  94. package/docs/OrderStatus.md +18 -0
  95. package/docs/PaymentTransaction.md +16 -0
  96. package/docs/RefreshAddressBalancesByTokenRequest.md +1 -1
  97. package/docs/Refund.md +17 -0
  98. package/docs/RefundStatus.md +18 -0
  99. package/docs/RefundType.md +12 -0
  100. package/docs/SettleRequestStatus.md +18 -0
  101. package/docs/SettleStatus.md +18 -0
  102. package/docs/Settlement.md +12 -0
  103. package/docs/SettlementDetail.md +15 -0
  104. package/docs/SettlementInfo.md +14 -0
  105. package/docs/SettlementType.md +12 -0
  106. package/docs/SwapActivity.md +4 -1
  107. package/docs/SwapActivityStatus.md +14 -0
  108. package/docs/SwapActivityType.md +12 -0
  109. package/docs/SwapQuote.md +3 -4
  110. package/docs/SwapToken.md +14 -0
  111. package/docs/TSSRequestWebhookEventData.md +3 -1
  112. package/docs/TokenListing.md +19 -0
  113. package/docs/TokenListingEventData.md +45 -0
  114. package/docs/TokenListingRequestSource.md +12 -0
  115. package/docs/TokenListingRequestStatus.md +14 -0
  116. package/docs/TokensEventData.md +3 -1
  117. package/docs/Transaction.md +4 -3
  118. package/docs/TransactionBIP137Destination.md +10 -0
  119. package/docs/TransactionBIP322Destination.md +10 -0
  120. package/docs/TransactionBabylonBusinessInfo.md +11 -0
  121. package/docs/TransactionBabylonTxParameters.md +15 -0
  122. package/docs/TransactionCoreStakeInfo.md +14 -0
  123. package/docs/TransactionCosmosAdr36Destination.md +10 -0
  124. package/docs/TransactionCosmosContractDestination.md +11 -0
  125. package/docs/TransactionCosmosMessage.md +10 -0
  126. package/docs/TransactionDestination.md +4 -0
  127. package/docs/TransactionDestinationType.md +8 -0
  128. package/docs/TransactionDetail.md +4 -3
  129. package/docs/TransactionDetails.md +4 -3
  130. package/docs/TransactionExtra.md +21 -0
  131. package/docs/TransactionExtraType.md +14 -0
  132. package/docs/TransactionFuelingInfo.md +2 -2
  133. package/docs/TransactionMessageSignBTCEIP191Destination.md +10 -0
  134. package/docs/TransactionRbfSource.md +1 -1
  135. package/docs/TransactionSelectedUtxo.md +2 -2
  136. package/docs/TransactionSubStatus.md +18 -0
  137. package/docs/TransactionWebhookEventData.md +7 -4
  138. package/docs/TransactionsApi.md +1 -1
  139. package/docs/UpdateCustodialWalletParams.md +1 -1
  140. package/docs/UpdateExchangeWalletParams.md +1 -1
  141. package/docs/UpdateMpcWalletParams.md +1 -1
  142. package/docs/UpdateSmartContractWalletParams.md +1 -1
  143. package/docs/UpdateWalletParams.md +1 -1
  144. package/docs/WalletInfoEventData.md +3 -1
  145. package/docs/WalletsApi.md +5 -5
  146. package/docs/WebhookEventData.md +16 -8
  147. package/docs/WebhookEventDataType.md +3 -1
  148. package/docs/WebhookEventType.md +4 -0
  149. package/package.json +1 -1
  150. package/dist/api/SwapsApi.js +0 -360
  151. package/dist/model/CreateSwapQuote201Response.js +0 -264
  152. package/dist/model/SwapTokenPair.js +0 -100
  153. package/docs/CreateSwapActivityRequest.md +0 -12
  154. package/docs/CreateSwapQuote201Response.md +0 -17
  155. package/docs/CreateSwapQuoteRequest.md +0 -13
  156. package/docs/ListEnableTokenPairs200Response.md +0 -10
  157. package/docs/ListSwapActivities200Response.md +0 -10
  158. package/docs/SwapTokenPair.md +0 -10
  159. package/docs/SwapsApi.md +0 -348
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SwapActivityStatus = _interopRequireDefault(require("./SwapActivityStatus"));
9
+ var _SwapActivityType = _interopRequireDefault(require("./SwapActivityType"));
8
10
  var _TransactionInitiatorType = _interopRequireDefault(require("./TransactionInitiatorType"));
9
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -60,8 +62,14 @@ var SwapActivity = /*#__PURE__*/function () {
60
62
  if (data.hasOwnProperty('activity_id')) {
61
63
  obj['activity_id'] = _ApiClient["default"].convertToType(data['activity_id'], 'String');
62
64
  }
65
+ if (data.hasOwnProperty('activity_type')) {
66
+ obj['activity_type'] = _SwapActivityType["default"].constructFromObject(data['activity_type']);
67
+ }
63
68
  if (data.hasOwnProperty('status')) {
64
- obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
69
+ obj['status'] = _SwapActivityStatus["default"].constructFromObject(data['status']);
70
+ }
71
+ if (data.hasOwnProperty('request_id')) {
72
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
65
73
  }
66
74
  if (data.hasOwnProperty('wallet_id')) {
67
75
  obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
@@ -87,6 +95,9 @@ var SwapActivity = /*#__PURE__*/function () {
87
95
  if (data.hasOwnProperty('initiator_type')) {
88
96
  obj['initiator_type'] = _TransactionInitiatorType["default"].constructFromObject(data['initiator_type']);
89
97
  }
98
+ if (data.hasOwnProperty('description')) {
99
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
100
+ }
90
101
  if (data.hasOwnProperty('created_timestamp')) {
91
102
  obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
92
103
  }
@@ -110,8 +121,8 @@ var SwapActivity = /*#__PURE__*/function () {
110
121
  throw new Error("Expected the field `activity_id` to be a primitive type in the JSON string but got " + data['activity_id']);
111
122
  }
112
123
  // ensure the json data is a string
113
- if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
114
- throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
124
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
125
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
115
126
  }
116
127
  // ensure the json data is a string
117
128
  if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
@@ -141,6 +152,10 @@ var SwapActivity = /*#__PURE__*/function () {
141
152
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
142
153
  throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
143
154
  }
155
+ // ensure the json data is a string
156
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
157
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
158
+ }
144
159
  return true;
145
160
  }
146
161
  }]);
@@ -152,11 +167,21 @@ var SwapActivity = /*#__PURE__*/function () {
152
167
  SwapActivity.prototype['activity_id'] = undefined;
153
168
 
154
169
  /**
155
- * The status of the swap activity.
156
- * @member {String} status
170
+ * @member {module:model/SwapActivityType} activity_type
171
+ */
172
+ SwapActivity.prototype['activity_type'] = undefined;
173
+
174
+ /**
175
+ * @member {module:model/SwapActivityStatus} status
157
176
  */
158
177
  SwapActivity.prototype['status'] = undefined;
159
178
 
179
+ /**
180
+ * The request id of the swap activity.
181
+ * @member {String} request_id
182
+ */
183
+ SwapActivity.prototype['request_id'] = undefined;
184
+
160
185
  /**
161
186
  * The unique identifier of the wallet.
162
187
  * @member {String} wallet_id
@@ -204,6 +229,12 @@ SwapActivity.prototype['initiator'] = undefined;
204
229
  */
205
230
  SwapActivity.prototype['initiator_type'] = undefined;
206
231
 
232
+ /**
233
+ * The description of the swap activity.
234
+ * @member {String} description
235
+ */
236
+ SwapActivity.prototype['description'] = undefined;
237
+
207
238
  /**
208
239
  * The time when the swap activity was created, in Unix timestamp format, measured in milliseconds.
209
240
  * @member {Number} created_timestamp
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class SwapActivityStatus.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var SwapActivityStatus = exports["default"] = /*#__PURE__*/function () {
31
+ function SwapActivityStatus() {
32
+ _classCallCheck(this, SwapActivityStatus);
33
+ /**
34
+ * value: "Success"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Success", "Success");
38
+ /**
39
+ * value: "Processing"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Processing", "Processing");
43
+ /**
44
+ * value: "Failed"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "Failed", "Failed");
48
+ /**
49
+ * value: "unknown_default_open_api"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
53
+ }
54
+ return _createClass(SwapActivityStatus, null, [{
55
+ key: "constructFromObject",
56
+ value:
57
+ /**
58
+ * Returns a <code>SwapActivityStatus</code> enum value from a Javascript object name.
59
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
60
+ * @return {module:model/SwapActivityStatus} The enum <code>SwapActivityStatus</code> value.
61
+ */
62
+ function constructFromObject(object) {
63
+ return object;
64
+ }
65
+ }]);
66
+ }();
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class SwapActivityType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var SwapActivityType = exports["default"] = /*#__PURE__*/function () {
31
+ function SwapActivityType() {
32
+ _classCallCheck(this, SwapActivityType);
33
+ /**
34
+ * value: "Bridge"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Bridge", "Bridge");
38
+ /**
39
+ * value: "Exchange"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Exchange", "Exchange");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(SwapActivityType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>SwapActivityType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/SwapActivityType} The enum <code>SwapActivityType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -68,6 +68,9 @@ var SwapQuote = /*#__PURE__*/function () {
68
68
  value: function constructFromObject(data, obj) {
69
69
  if (data) {
70
70
  obj = obj || new SwapQuote();
71
+ if (data.hasOwnProperty('quote_id')) {
72
+ obj['quote_id'] = _ApiClient["default"].convertToType(data['quote_id'], 'String');
73
+ }
71
74
  if (data.hasOwnProperty('pay_amount')) {
72
75
  obj['pay_amount'] = _ApiClient["default"].convertToType(data['pay_amount'], 'String');
73
76
  }
@@ -77,17 +80,11 @@ var SwapQuote = /*#__PURE__*/function () {
77
80
  if (data.hasOwnProperty('fee_amount')) {
78
81
  obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
79
82
  }
80
- if (data.hasOwnProperty('min_pay_amount')) {
81
- obj['min_pay_amount'] = _ApiClient["default"].convertToType(data['min_pay_amount'], 'String');
82
- }
83
- if (data.hasOwnProperty('max_pay_amount')) {
84
- obj['max_pay_amount'] = _ApiClient["default"].convertToType(data['max_pay_amount'], 'String');
85
- }
86
83
  if (data.hasOwnProperty('min_receive_amount')) {
87
84
  obj['min_receive_amount'] = _ApiClient["default"].convertToType(data['min_receive_amount'], 'String');
88
85
  }
89
- if (data.hasOwnProperty('max_receive_amount')) {
90
- obj['max_receive_amount'] = _ApiClient["default"].convertToType(data['max_receive_amount'], 'String');
86
+ if (data.hasOwnProperty('max_pay_amount')) {
87
+ obj['max_pay_amount'] = _ApiClient["default"].convertToType(data['max_pay_amount'], 'String');
91
88
  }
92
89
  if (data.hasOwnProperty('quote_expired_timestamp')) {
93
90
  obj['quote_expired_timestamp'] = _ApiClient["default"].convertToType(data['quote_expired_timestamp'], 'Number');
@@ -120,6 +117,10 @@ var SwapQuote = /*#__PURE__*/function () {
120
117
  } finally {
121
118
  _iterator.f();
122
119
  }
120
+ if (data['quote_id'] && !(typeof data['quote_id'] === 'string' || data['quote_id'] instanceof String)) {
121
+ throw new Error("Expected the field `quote_id` to be a primitive type in the JSON string but got " + data['quote_id']);
122
+ }
123
+ // ensure the json data is a string
123
124
  if (data['pay_amount'] && !(typeof data['pay_amount'] === 'string' || data['pay_amount'] instanceof String)) {
124
125
  throw new Error("Expected the field `pay_amount` to be a primitive type in the JSON string but got " + data['pay_amount']);
125
126
  }
@@ -132,20 +133,12 @@ var SwapQuote = /*#__PURE__*/function () {
132
133
  throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
133
134
  }
134
135
  // ensure the json data is a string
135
- if (data['min_pay_amount'] && !(typeof data['min_pay_amount'] === 'string' || data['min_pay_amount'] instanceof String)) {
136
- throw new Error("Expected the field `min_pay_amount` to be a primitive type in the JSON string but got " + data['min_pay_amount']);
137
- }
138
- // ensure the json data is a string
139
- if (data['max_pay_amount'] && !(typeof data['max_pay_amount'] === 'string' || data['max_pay_amount'] instanceof String)) {
140
- throw new Error("Expected the field `max_pay_amount` to be a primitive type in the JSON string but got " + data['max_pay_amount']);
141
- }
142
- // ensure the json data is a string
143
136
  if (data['min_receive_amount'] && !(typeof data['min_receive_amount'] === 'string' || data['min_receive_amount'] instanceof String)) {
144
137
  throw new Error("Expected the field `min_receive_amount` to be a primitive type in the JSON string but got " + data['min_receive_amount']);
145
138
  }
146
139
  // ensure the json data is a string
147
- if (data['max_receive_amount'] && !(typeof data['max_receive_amount'] === 'string' || data['max_receive_amount'] instanceof String)) {
148
- throw new Error("Expected the field `max_receive_amount` to be a primitive type in the JSON string but got " + data['max_receive_amount']);
140
+ if (data['max_pay_amount'] && !(typeof data['max_pay_amount'] === 'string' || data['max_pay_amount'] instanceof String)) {
141
+ throw new Error("Expected the field `max_pay_amount` to be a primitive type in the JSON string but got " + data['max_pay_amount']);
149
142
  }
150
143
  return true;
151
144
  }
@@ -153,6 +146,12 @@ var SwapQuote = /*#__PURE__*/function () {
153
146
  }();
154
147
  SwapQuote.RequiredProperties = ["pay_amount", "receive_amount", "fee_amount", "quote_expired_timestamp"];
155
148
 
149
+ /**
150
+ * The unique id of quote.
151
+ * @member {String} quote_id
152
+ */
153
+ SwapQuote.prototype['quote_id'] = undefined;
154
+
156
155
  /**
157
156
  * The amount of tokens to pay.
158
157
  * @member {String} pay_amount
@@ -172,28 +171,16 @@ SwapQuote.prototype['receive_amount'] = undefined;
172
171
  SwapQuote.prototype['fee_amount'] = undefined;
173
172
 
174
173
  /**
175
- * The minimum amount of tokens to pay.
176
- * @member {String} min_pay_amount
177
- */
178
- SwapQuote.prototype['min_pay_amount'] = undefined;
179
-
180
- /**
181
- * The maximum amount of tokens to pay.
182
- * @member {String} max_pay_amount
183
- */
184
- SwapQuote.prototype['max_pay_amount'] = undefined;
185
-
186
- /**
187
- * The minimum amount of tokens to receive.
174
+ * The minimum amount of tokens to receive if the pay amount is specified.
188
175
  * @member {String} min_receive_amount
189
176
  */
190
177
  SwapQuote.prototype['min_receive_amount'] = undefined;
191
178
 
192
179
  /**
193
- * The maximum amount of tokens to receive.
194
- * @member {String} max_receive_amount
180
+ * The maximum amount of tokens to pay if the receive amount is specified.
181
+ * @member {String} max_pay_amount
195
182
  */
196
- SwapQuote.prototype['max_receive_amount'] = undefined;
183
+ SwapQuote.prototype['max_pay_amount'] = undefined;
197
184
 
198
185
  /**
199
186
  * The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
@@ -25,20 +25,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
25
  *
26
26
  */
27
27
  /**
28
- * The CreateSwapQuoteRequest model module.
29
- * @module model/CreateSwapQuoteRequest
28
+ * The SwapToken model module.
29
+ * @module model/SwapToken
30
30
  */
31
- var CreateSwapQuoteRequest = /*#__PURE__*/function () {
31
+ var SwapToken = /*#__PURE__*/function () {
32
32
  /**
33
- * Constructs a new <code>CreateSwapQuoteRequest</code>.
34
- * @alias module:model/CreateSwapQuoteRequest
35
- * @param wallet_id {String} The unique identifier of the wallet.
36
- * @param pay_token_id {String} Unique id of the token to pay.
37
- * @param receive_token_id {String} Unique id of the token to receive.
33
+ * Constructs a new <code>SwapToken</code>.
34
+ * @alias module:model/SwapToken
35
+ * @param token_id {String} The token id.
36
+ * @param chain_id {String} The chain id.
37
+ * @param asset_id {String} The asset id.
38
38
  */
39
- function CreateSwapQuoteRequest(wallet_id, pay_token_id, receive_token_id) {
40
- _classCallCheck(this, CreateSwapQuoteRequest);
41
- CreateSwapQuoteRequest.initialize(this, wallet_id, pay_token_id, receive_token_id);
39
+ function SwapToken(token_id, chain_id, asset_id) {
40
+ _classCallCheck(this, SwapToken);
41
+ SwapToken.initialize(this, token_id, chain_id, asset_id);
42
42
  }
43
43
 
44
44
  /**
@@ -46,55 +46,58 @@ var CreateSwapQuoteRequest = /*#__PURE__*/function () {
46
46
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
47
  * Only for internal use.
48
48
  */
49
- return _createClass(CreateSwapQuoteRequest, null, [{
49
+ return _createClass(SwapToken, null, [{
50
50
  key: "initialize",
51
- value: function initialize(obj, wallet_id, pay_token_id, receive_token_id) {
52
- obj['wallet_id'] = wallet_id;
53
- obj['pay_token_id'] = pay_token_id;
54
- obj['receive_token_id'] = receive_token_id;
51
+ value: function initialize(obj, token_id, chain_id, asset_id) {
52
+ obj['token_id'] = token_id;
53
+ obj['chain_id'] = chain_id;
54
+ obj['asset_id'] = asset_id;
55
55
  }
56
56
 
57
57
  /**
58
- * Constructs a <code>CreateSwapQuoteRequest</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Constructs a <code>SwapToken</code> from a plain JavaScript object, optionally creating a new instance.
59
59
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
60
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/CreateSwapQuoteRequest} obj Optional instance to populate.
62
- * @return {module:model/CreateSwapQuoteRequest} The populated <code>CreateSwapQuoteRequest</code> instance.
61
+ * @param {module:model/SwapToken} obj Optional instance to populate.
62
+ * @return {module:model/SwapToken} The populated <code>SwapToken</code> instance.
63
63
  */
64
64
  }, {
65
65
  key: "constructFromObject",
66
66
  value: function constructFromObject(data, obj) {
67
67
  if (data) {
68
- obj = obj || new CreateSwapQuoteRequest();
69
- if (data.hasOwnProperty('wallet_id')) {
70
- obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
68
+ obj = obj || new SwapToken();
69
+ if (data.hasOwnProperty('token_id')) {
70
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
71
71
  }
72
- if (data.hasOwnProperty('pay_token_id')) {
73
- obj['pay_token_id'] = _ApiClient["default"].convertToType(data['pay_token_id'], 'String');
72
+ if (data.hasOwnProperty('chain_id')) {
73
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
74
74
  }
75
- if (data.hasOwnProperty('receive_token_id')) {
76
- obj['receive_token_id'] = _ApiClient["default"].convertToType(data['receive_token_id'], 'String');
75
+ if (data.hasOwnProperty('asset_id')) {
76
+ obj['asset_id'] = _ApiClient["default"].convertToType(data['asset_id'], 'String');
77
77
  }
78
- if (data.hasOwnProperty('pay_amount')) {
79
- obj['pay_amount'] = _ApiClient["default"].convertToType(data['pay_amount'], 'String');
78
+ if (data.hasOwnProperty('token_address')) {
79
+ obj['token_address'] = _ApiClient["default"].convertToType(data['token_address'], 'String');
80
80
  }
81
- if (data.hasOwnProperty('receive_amount')) {
82
- obj['receive_amount'] = _ApiClient["default"].convertToType(data['receive_amount'], 'String');
81
+ if (data.hasOwnProperty('min_amount')) {
82
+ obj['min_amount'] = _ApiClient["default"].convertToType(data['min_amount'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('max_amount')) {
85
+ obj['max_amount'] = _ApiClient["default"].convertToType(data['max_amount'], 'String');
83
86
  }
84
87
  }
85
88
  return obj;
86
89
  }
87
90
 
88
91
  /**
89
- * Validates the JSON data with respect to <code>CreateSwapQuoteRequest</code>.
92
+ * Validates the JSON data with respect to <code>SwapToken</code>.
90
93
  * @param {Object} data The plain JavaScript object bearing properties of interest.
91
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSwapQuoteRequest</code>.
94
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapToken</code>.
92
95
  */
93
96
  }, {
94
97
  key: "validateJSON",
95
98
  value: function validateJSON(data) {
96
99
  // check to make sure all required properties are present in the JSON string
97
- var _iterator = _createForOfIteratorHelper(CreateSwapQuoteRequest.RequiredProperties),
100
+ var _iterator = _createForOfIteratorHelper(SwapToken.RequiredProperties),
98
101
  _step;
99
102
  try {
100
103
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -109,58 +112,68 @@ var CreateSwapQuoteRequest = /*#__PURE__*/function () {
109
112
  } finally {
110
113
  _iterator.f();
111
114
  }
112
- if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
113
- throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
115
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
116
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
117
+ }
118
+ // ensure the json data is a string
119
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
120
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
114
121
  }
115
122
  // ensure the json data is a string
116
- if (data['pay_token_id'] && !(typeof data['pay_token_id'] === 'string' || data['pay_token_id'] instanceof String)) {
117
- throw new Error("Expected the field `pay_token_id` to be a primitive type in the JSON string but got " + data['pay_token_id']);
123
+ if (data['asset_id'] && !(typeof data['asset_id'] === 'string' || data['asset_id'] instanceof String)) {
124
+ throw new Error("Expected the field `asset_id` to be a primitive type in the JSON string but got " + data['asset_id']);
118
125
  }
119
126
  // ensure the json data is a string
120
- if (data['receive_token_id'] && !(typeof data['receive_token_id'] === 'string' || data['receive_token_id'] instanceof String)) {
121
- throw new Error("Expected the field `receive_token_id` to be a primitive type in the JSON string but got " + data['receive_token_id']);
127
+ if (data['token_address'] && !(typeof data['token_address'] === 'string' || data['token_address'] instanceof String)) {
128
+ throw new Error("Expected the field `token_address` to be a primitive type in the JSON string but got " + data['token_address']);
122
129
  }
123
130
  // ensure the json data is a string
124
- if (data['pay_amount'] && !(typeof data['pay_amount'] === 'string' || data['pay_amount'] instanceof String)) {
125
- throw new Error("Expected the field `pay_amount` to be a primitive type in the JSON string but got " + data['pay_amount']);
131
+ if (data['min_amount'] && !(typeof data['min_amount'] === 'string' || data['min_amount'] instanceof String)) {
132
+ throw new Error("Expected the field `min_amount` to be a primitive type in the JSON string but got " + data['min_amount']);
126
133
  }
127
134
  // ensure the json data is a string
128
- if (data['receive_amount'] && !(typeof data['receive_amount'] === 'string' || data['receive_amount'] instanceof String)) {
129
- throw new Error("Expected the field `receive_amount` to be a primitive type in the JSON string but got " + data['receive_amount']);
135
+ if (data['max_amount'] && !(typeof data['max_amount'] === 'string' || data['max_amount'] instanceof String)) {
136
+ throw new Error("Expected the field `max_amount` to be a primitive type in the JSON string but got " + data['max_amount']);
130
137
  }
131
138
  return true;
132
139
  }
133
140
  }]);
134
141
  }();
135
- CreateSwapQuoteRequest.RequiredProperties = ["wallet_id", "pay_token_id", "receive_token_id"];
142
+ SwapToken.RequiredProperties = ["token_id", "chain_id", "asset_id"];
143
+
144
+ /**
145
+ * The token id.
146
+ * @member {String} token_id
147
+ */
148
+ SwapToken.prototype['token_id'] = undefined;
136
149
 
137
150
  /**
138
- * The unique identifier of the wallet.
139
- * @member {String} wallet_id
151
+ * The chain id.
152
+ * @member {String} chain_id
140
153
  */
141
- CreateSwapQuoteRequest.prototype['wallet_id'] = undefined;
154
+ SwapToken.prototype['chain_id'] = undefined;
142
155
 
143
156
  /**
144
- * Unique id of the token to pay.
145
- * @member {String} pay_token_id
157
+ * The asset id.
158
+ * @member {String} asset_id
146
159
  */
147
- CreateSwapQuoteRequest.prototype['pay_token_id'] = undefined;
160
+ SwapToken.prototype['asset_id'] = undefined;
148
161
 
149
162
  /**
150
- * Unique id of the token to receive.
151
- * @member {String} receive_token_id
163
+ * The token address.
164
+ * @member {String} token_address
152
165
  */
153
- CreateSwapQuoteRequest.prototype['receive_token_id'] = undefined;
166
+ SwapToken.prototype['token_address'] = undefined;
154
167
 
155
168
  /**
156
- * Amount of tokens to pay. For example \"0.5 BTC\". Note: Either pay_amount or receive_amount must be provided, but not both.
157
- * @member {String} pay_amount
169
+ * The minimum amount to swap.
170
+ * @member {String} min_amount
158
171
  */
159
- CreateSwapQuoteRequest.prototype['pay_amount'] = undefined;
172
+ SwapToken.prototype['min_amount'] = undefined;
160
173
 
161
174
  /**
162
- * Amount of tokens to receive. For example \"0.5 ETH_WBTC\". Note: Either pay_amount or receive_amount must be provided, but not both.
163
- * @member {String} receive_amount
175
+ * The maximum amount to swap.
176
+ * @member {String} max_amount
164
177
  */
165
- CreateSwapQuoteRequest.prototype['receive_amount'] = undefined;
166
- var _default = exports["default"] = CreateSwapQuoteRequest;
178
+ SwapToken.prototype['max_amount'] = undefined;
179
+ var _default = exports["default"] = SwapToken;
@@ -39,7 +39,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
39
39
  * @alias module:model/TSSRequestWebhookEventData
40
40
  * @implements module:model/WebhookEventDataType
41
41
  * @implements module:model/TSSRequest
42
- * @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data.
42
+ * @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data.
43
43
  */
44
44
  function TSSRequestWebhookEventData(data_type) {
45
45
  _classCallCheck(this, TSSRequestWebhookEventData);
@@ -154,7 +154,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
154
154
  TSSRequestWebhookEventData.RequiredProperties = ["data_type"];
155
155
 
156
156
  /**
157
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data.
157
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data.
158
158
  * @member {module:model/TSSRequestWebhookEventData.DataTypeEnum} data_type
159
159
  */
160
160
  TSSRequestWebhookEventData.prototype['data_type'] = undefined;
@@ -200,7 +200,7 @@ TSSRequestWebhookEventData.prototype['created_timestamp'] = undefined;
200
200
 
201
201
  // Implement WebhookEventDataType interface:
202
202
  /**
203
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data.
203
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data.
204
204
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
205
205
  */
206
206
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -279,6 +279,11 @@ TSSRequestWebhookEventData['DataTypeEnum'] = {
279
279
  * @const
280
280
  */
281
281
  "Tokens": "Tokens",
282
+ /**
283
+ * value: "TokenListing"
284
+ * @const
285
+ */
286
+ "TokenListing": "TokenListing",
282
287
  /**
283
288
  * value: "unknown_default_open_api"
284
289
  * @const