@cobo/cobo-waas2 1.9.0 → 1.10.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 (89) hide show
  1. package/README.md +40 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/DevelopersApi.js +4 -4
  4. package/dist/api/StakingsApi.js +400 -6
  5. package/dist/api/SwapsApi.js +360 -0
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/index.js +164 -3
  8. package/dist/model/AddressesEventData.js +4 -4
  9. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  10. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  11. package/dist/model/BabylonAirdropPop.js +186 -0
  12. package/dist/model/BabylonAirdropRegistration.js +172 -0
  13. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  14. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  15. package/dist/model/BabylonRegistrationStatus.js +66 -0
  16. package/dist/model/BabylonStakingRegistration.js +185 -0
  17. package/dist/model/ContractCallSource.js +6 -0
  18. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  19. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  20. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  21. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  22. package/dist/model/CreateSwapActivityRequest.js +153 -0
  23. package/dist/model/CreateSwapQuote201Response.js +264 -0
  24. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  25. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  26. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  27. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  28. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  29. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  30. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  31. package/dist/model/ListSwapActivities200Response.js +123 -0
  32. package/dist/model/MessageSignSource.js +6 -0
  33. package/dist/model/MpcContractCallSource.js +16 -0
  34. package/dist/model/MpcMessageSignSource.js +16 -0
  35. package/dist/model/MpcSigningGroup.js +27 -4
  36. package/dist/model/MpcTransferSource.js +16 -0
  37. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  38. package/dist/model/StakingPoolId.js +30 -0
  39. package/dist/model/StakingPoolType.js +15 -0
  40. package/dist/model/SwapQuote.js +203 -0
  41. package/dist/model/TransactionDestination.js +4 -4
  42. package/dist/model/TransactionRawTxInfo.js +16 -0
  43. package/dist/model/TransactionRbfSource.js +6 -0
  44. package/dist/model/TransactionUtxoChange.js +101 -0
  45. package/dist/model/TransferSource.js +6 -0
  46. package/dist/model/WebhookEventData.js +2 -2
  47. package/docs/AddressesEventData.md +1 -1
  48. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  49. package/docs/BabylonAirdropPop.md +14 -0
  50. package/docs/BabylonAirdropRegistration.md +16 -0
  51. package/docs/BabylonEligibleAirdrop.md +14 -0
  52. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  53. package/docs/BabylonRegistrationStatus.md +14 -0
  54. package/docs/BabylonStakingRegistration.md +17 -0
  55. package/docs/ContractCallSource.md +1 -0
  56. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  57. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  58. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  59. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  60. package/docs/CreateSwapActivityRequest.md +12 -0
  61. package/docs/CreateSwapQuote201Response.md +17 -0
  62. package/docs/CreateSwapQuoteRequest.md +13 -0
  63. package/docs/DevelopersApi.md +2 -2
  64. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  65. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  66. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  67. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  68. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  69. package/docs/ListEnableTokenPairs200Response.md +10 -0
  70. package/docs/ListSwapActivities200Response.md +10 -0
  71. package/docs/MessageSignSource.md +1 -0
  72. package/docs/MpcContractCallSource.md +1 -0
  73. package/docs/MpcMessageSignSource.md +1 -0
  74. package/docs/MpcSigningGroup.md +1 -1
  75. package/docs/MpcTransferSource.md +1 -0
  76. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  77. package/docs/StakingPoolId.md +12 -0
  78. package/docs/StakingPoolType.md +6 -0
  79. package/docs/StakingsApi.md +449 -1
  80. package/docs/SwapQuote.md +16 -0
  81. package/docs/SwapsApi.md +348 -0
  82. package/docs/TransactionRawTxInfo.md +1 -0
  83. package/docs/TransactionRbfSource.md +1 -0
  84. package/docs/TransactionUtxoChange.md +10 -0
  85. package/docs/TransactionsApi.md +2 -2
  86. package/docs/TransferSource.md +1 -0
  87. package/docs/WebhookEventData.md +1 -1
  88. package/package.json +2 -2
  89. package/docs/SwapSummary.md +0 -10
@@ -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 _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _SwapTokenPair = _interopRequireDefault(require("./SwapTokenPair"));
8
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
11
  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
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -25,19 +27,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
27
  *
26
28
  */
27
29
  /**
28
- * The SwapSummary model module.
29
- * @module model/SwapSummary
30
+ * The ListEnableTokenPairs200Response model module.
31
+ * @module model/ListEnableTokenPairs200Response
30
32
  */
31
- var SwapSummary = /*#__PURE__*/function () {
33
+ var ListEnableTokenPairs200Response = /*#__PURE__*/function () {
32
34
  /**
33
- * Constructs a new <code>SwapSummary</code>.
34
- * @alias module:model/SwapSummary
35
- * @param total_usd_value {String} The total USD value of the swap activities, represented as a string.
36
- * @param activity_count {Number} The total number of swap activities.
35
+ * Constructs a new <code>ListEnableTokenPairs200Response</code>.
36
+ * @alias module:model/ListEnableTokenPairs200Response
37
37
  */
38
- function SwapSummary(total_usd_value, activity_count) {
39
- _classCallCheck(this, SwapSummary);
40
- SwapSummary.initialize(this, total_usd_value, activity_count);
38
+ function ListEnableTokenPairs200Response() {
39
+ _classCallCheck(this, ListEnableTokenPairs200Response);
40
+ ListEnableTokenPairs200Response.initialize(this);
41
41
  }
42
42
 
43
43
  /**
@@ -45,77 +45,79 @@ var SwapSummary = /*#__PURE__*/function () {
45
45
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
46
  * Only for internal use.
47
47
  */
48
- return _createClass(SwapSummary, null, [{
48
+ return _createClass(ListEnableTokenPairs200Response, null, [{
49
49
  key: "initialize",
50
- value: function initialize(obj, total_usd_value, activity_count) {
51
- obj['total_usd_value'] = total_usd_value;
52
- obj['activity_count'] = activity_count;
53
- }
50
+ value: function initialize(obj) {}
54
51
 
55
52
  /**
56
- * Constructs a <code>SwapSummary</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Constructs a <code>ListEnableTokenPairs200Response</code> from a plain JavaScript object, optionally creating a new instance.
57
54
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
55
  * @param {Object} data The plain JavaScript object bearing properties of interest.
59
- * @param {module:model/SwapSummary} obj Optional instance to populate.
60
- * @return {module:model/SwapSummary} The populated <code>SwapSummary</code> instance.
56
+ * @param {module:model/ListEnableTokenPairs200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListEnableTokenPairs200Response} The populated <code>ListEnableTokenPairs200Response</code> instance.
61
58
  */
62
59
  }, {
63
60
  key: "constructFromObject",
64
61
  value: function constructFromObject(data, obj) {
65
62
  if (data) {
66
- obj = obj || new SwapSummary();
67
- if (data.hasOwnProperty('total_usd_value')) {
68
- obj['total_usd_value'] = _ApiClient["default"].convertToType(data['total_usd_value'], 'String');
63
+ obj = obj || new ListEnableTokenPairs200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SwapTokenPair["default"]]);
69
66
  }
70
- if (data.hasOwnProperty('activity_count')) {
71
- obj['activity_count'] = _ApiClient["default"].convertToType(data['activity_count'], 'Number');
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
72
69
  }
73
70
  }
74
71
  return obj;
75
72
  }
76
73
 
77
74
  /**
78
- * Validates the JSON data with respect to <code>SwapSummary</code>.
75
+ * Validates the JSON data with respect to <code>ListEnableTokenPairs200Response</code>.
79
76
  * @param {Object} data The plain JavaScript object bearing properties of interest.
80
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapSummary</code>.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListEnableTokenPairs200Response</code>.
81
78
  */
82
79
  }, {
83
80
  key: "validateJSON",
84
81
  value: function validateJSON(data) {
85
- // check to make sure all required properties are present in the JSON string
86
- var _iterator = _createForOfIteratorHelper(SwapSummary.RequiredProperties),
87
- _step;
88
- try {
89
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
90
- var property = _step.value;
91
- if (!data.hasOwnProperty(property)) {
92
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _SwapTokenPair["default"].validateJSON(item);
93
95
  }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
94
100
  }
95
- // ensure the json data is a string
96
- } catch (err) {
97
- _iterator.e(err);
98
- } finally {
99
- _iterator.f();
101
+ ;
100
102
  }
101
- if (data['total_usd_value'] && !(typeof data['total_usd_value'] === 'string' || data['total_usd_value'] instanceof String)) {
102
- throw new Error("Expected the field `total_usd_value` to be a primitive type in the JSON string but got " + data['total_usd_value']);
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
103
109
  }
104
110
  return true;
105
111
  }
106
112
  }]);
107
113
  }();
108
- SwapSummary.RequiredProperties = ["total_usd_value", "activity_count"];
109
-
110
114
  /**
111
- * The total USD value of the swap activities, represented as a string.
112
- * @member {String} total_usd_value
115
+ * @member {Array.<module:model/SwapTokenPair>} data
113
116
  */
114
- SwapSummary.prototype['total_usd_value'] = undefined;
117
+ ListEnableTokenPairs200Response.prototype['data'] = undefined;
115
118
 
116
119
  /**
117
- * The total number of swap activities.
118
- * @member {Number} activity_count
120
+ * @member {module:model/Pagination} pagination
119
121
  */
120
- SwapSummary.prototype['activity_count'] = undefined;
121
- var _default = exports["default"] = SwapSummary;
122
+ ListEnableTokenPairs200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListEnableTokenPairs200Response;
@@ -0,0 +1,123 @@
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
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _SwapActivity = _interopRequireDefault(require("./SwapActivity"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ 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); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The ListSwapActivities200Response model module.
31
+ * @module model/ListSwapActivities200Response
32
+ */
33
+ var ListSwapActivities200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListSwapActivities200Response</code>.
36
+ * @alias module:model/ListSwapActivities200Response
37
+ */
38
+ function ListSwapActivities200Response() {
39
+ _classCallCheck(this, ListSwapActivities200Response);
40
+ ListSwapActivities200Response.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(ListSwapActivities200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListSwapActivities200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListSwapActivities200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListSwapActivities200Response} The populated <code>ListSwapActivities200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListSwapActivities200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SwapActivity["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListSwapActivities200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListSwapActivities200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _SwapActivity["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/SwapActivity>} data
116
+ */
117
+ ListSwapActivities200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListSwapActivities200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListSwapActivities200Response;
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _MessageSignSourceType = _interopRequireDefault(require("./MessageSignSourceType"));
9
9
  var _MpcMessageSignSource = _interopRequireDefault(require("./MpcMessageSignSource"));
10
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
10
11
  var _MessageSignSource;
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
13
  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); }
@@ -164,5 +165,10 @@ MessageSignSource.prototype['wallet_id'] = undefined;
164
165
  * @member {String} address
165
166
  */
166
167
  MessageSignSource.prototype['address'] = undefined;
168
+
169
+ /**
170
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
171
+ */
172
+ MessageSignSource.prototype['mpc_used_key_share_holder_group'] = undefined;
167
173
  MessageSignSource.OneOf = ["MpcMessageSignSource"];
168
174
  var _default = exports["default"] = MessageSignSource;
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _BaseContractCallSource = _interopRequireDefault(require("./BaseContractCallSource"));
9
9
  var _ContractCallSourceType = _interopRequireDefault(require("./ContractCallSourceType"));
10
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
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); }
12
13
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -80,6 +81,9 @@ var MpcContractCallSource = /*#__PURE__*/function () {
80
81
  if (data.hasOwnProperty('address')) {
81
82
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
82
83
  }
84
+ if (data.hasOwnProperty('mpc_used_key_share_holder_group')) {
85
+ obj['mpc_used_key_share_holder_group'] = _MpcSigningGroup["default"].constructFromObject(data['mpc_used_key_share_holder_group']);
86
+ }
83
87
  }
84
88
  return obj;
85
89
  }
@@ -115,6 +119,13 @@ var MpcContractCallSource = /*#__PURE__*/function () {
115
119
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
116
120
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
117
121
  }
122
+ // validate the optional field `mpc_used_key_share_holder_group`
123
+ if (data['mpc_used_key_share_holder_group']) {
124
+ // data not null
125
+ if (!!_MpcSigningGroup["default"].validateJSON) {
126
+ _MpcSigningGroup["default"].validateJSON(data['mpc_used_key_share_holder_group']);
127
+ }
128
+ }
118
129
  return true;
119
130
  }
120
131
  }]);
@@ -138,6 +149,11 @@ MpcContractCallSource.prototype['wallet_id'] = undefined;
138
149
  */
139
150
  MpcContractCallSource.prototype['address'] = undefined;
140
151
 
152
+ /**
153
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
154
+ */
155
+ MpcContractCallSource.prototype['mpc_used_key_share_holder_group'] = undefined;
156
+
141
157
  // Implement BaseContractCallSource interface:
142
158
  /**
143
159
  * @member {module:model/ContractCallSourceType} source_type
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _MessageSignSourceType = _interopRequireDefault(require("./MessageSignSourceType"));
9
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  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); }
11
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -76,6 +77,9 @@ var MpcMessageSignSource = /*#__PURE__*/function () {
76
77
  if (data.hasOwnProperty('address')) {
77
78
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
78
79
  }
80
+ if (data.hasOwnProperty('mpc_used_key_share_holder_group')) {
81
+ obj['mpc_used_key_share_holder_group'] = _MpcSigningGroup["default"].constructFromObject(data['mpc_used_key_share_holder_group']);
82
+ }
79
83
  }
80
84
  return obj;
81
85
  }
@@ -111,6 +115,13 @@ var MpcMessageSignSource = /*#__PURE__*/function () {
111
115
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
112
116
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
113
117
  }
118
+ // validate the optional field `mpc_used_key_share_holder_group`
119
+ if (data['mpc_used_key_share_holder_group']) {
120
+ // data not null
121
+ if (!!_MpcSigningGroup["default"].validateJSON) {
122
+ _MpcSigningGroup["default"].validateJSON(data['mpc_used_key_share_holder_group']);
123
+ }
124
+ }
114
125
  return true;
115
126
  }
116
127
  }]);
@@ -133,4 +144,9 @@ MpcMessageSignSource.prototype['wallet_id'] = undefined;
133
144
  * @member {String} address
134
145
  */
135
146
  MpcMessageSignSource.prototype['address'] = undefined;
147
+
148
+ /**
149
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
150
+ */
151
+ MpcMessageSignSource.prototype['mpc_used_key_share_holder_group'] = undefined;
136
152
  var _default = exports["default"] = MpcMessageSignSource;
@@ -7,6 +7,9 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10
13
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
14
  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
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
@@ -30,10 +33,11 @@ var MpcSigningGroup = /*#__PURE__*/function () {
30
33
  * Constructs a new <code>MpcSigningGroup</code>.
31
34
  * The information about the Signing Group of an MPC Wallet.
32
35
  * @alias module:model/MpcSigningGroup
36
+ * @param used_key_share_holder_group_id {String} The ID of the Signing Group.
33
37
  */
34
- function MpcSigningGroup() {
38
+ function MpcSigningGroup(used_key_share_holder_group_id) {
35
39
  _classCallCheck(this, MpcSigningGroup);
36
- MpcSigningGroup.initialize(this);
40
+ MpcSigningGroup.initialize(this, used_key_share_holder_group_id);
37
41
  }
38
42
 
39
43
  /**
@@ -43,7 +47,9 @@ var MpcSigningGroup = /*#__PURE__*/function () {
43
47
  */
44
48
  return _createClass(MpcSigningGroup, null, [{
45
49
  key: "initialize",
46
- value: function initialize(obj) {}
50
+ value: function initialize(obj, used_key_share_holder_group_id) {
51
+ obj['used_key_share_holder_group_id'] = used_key_share_holder_group_id;
52
+ }
47
53
 
48
54
  /**
49
55
  * Constructs a <code>MpcSigningGroup</code> from a plain JavaScript object, optionally creating a new instance.
@@ -75,7 +81,22 @@ var MpcSigningGroup = /*#__PURE__*/function () {
75
81
  }, {
76
82
  key: "validateJSON",
77
83
  value: function validateJSON(data) {
78
- // ensure the json data is a string
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(MpcSigningGroup.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ // ensure the json data is a string
95
+ } catch (err) {
96
+ _iterator.e(err);
97
+ } finally {
98
+ _iterator.f();
99
+ }
79
100
  if (data['used_key_share_holder_group_id'] && !(typeof data['used_key_share_holder_group_id'] === 'string' || data['used_key_share_holder_group_id'] instanceof String)) {
80
101
  throw new Error("Expected the field `used_key_share_holder_group_id` to be a primitive type in the JSON string but got " + data['used_key_share_holder_group_id']);
81
102
  }
@@ -87,6 +108,8 @@ var MpcSigningGroup = /*#__PURE__*/function () {
87
108
  }
88
109
  }]);
89
110
  }();
111
+ MpcSigningGroup.RequiredProperties = ["used_key_share_holder_group_id"];
112
+
90
113
  /**
91
114
  * The ID of the Signing Group.
92
115
  * @member {String} used_key_share_holder_group_id
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
8
9
  var _TransactionUtxo = _interopRequireDefault(require("./TransactionUtxo"));
9
10
  var _WalletSubtype = _interopRequireDefault(require("./WalletSubtype"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -82,6 +83,9 @@ var MpcTransferSource = /*#__PURE__*/function () {
82
83
  if (data.hasOwnProperty('excluded_utxos')) {
83
84
  obj['excluded_utxos'] = _ApiClient["default"].convertToType(data['excluded_utxos'], [_TransactionUtxo["default"]]);
84
85
  }
86
+ if (data.hasOwnProperty('mpc_used_key_share_holder_group')) {
87
+ obj['mpc_used_key_share_holder_group'] = _MpcSigningGroup["default"].constructFromObject(data['mpc_used_key_share_holder_group']);
88
+ }
85
89
  }
86
90
  return obj;
87
91
  }
@@ -159,6 +163,13 @@ var MpcTransferSource = /*#__PURE__*/function () {
159
163
  }
160
164
  ;
161
165
  }
166
+ // validate the optional field `mpc_used_key_share_holder_group`
167
+ if (data['mpc_used_key_share_holder_group']) {
168
+ // data not null
169
+ if (!!_MpcSigningGroup["default"].validateJSON) {
170
+ _MpcSigningGroup["default"].validateJSON(data['mpc_used_key_share_holder_group']);
171
+ }
172
+ }
162
173
  return true;
163
174
  }
164
175
  }]);
@@ -191,4 +202,9 @@ MpcTransferSource.prototype['included_utxos'] = undefined;
191
202
  * @member {Array.<module:model/TransactionUtxo>} excluded_utxos
192
203
  */
193
204
  MpcTransferSource.prototype['excluded_utxos'] = undefined;
205
+
206
+ /**
207
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
208
+ */
209
+ MpcTransferSource.prototype['mpc_used_key_share_holder_group'] = undefined;
194
210
  var _default = exports["default"] = MpcTransferSource;
@@ -33,7 +33,7 @@ var QueryGuardPubkey200ResponseAddressesInner = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>QueryGuardPubkey200ResponseAddressesInner</code>.
34
34
  * @alias module:model/QueryGuardPubkey200ResponseAddressesInner
35
35
  * @param address {String} The wallet address.
36
- * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
36
+ * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
37
37
  */
38
38
  function QueryGuardPubkey200ResponseAddressesInner(address, chain_id) {
39
39
  _classCallCheck(this, QueryGuardPubkey200ResponseAddressesInner);
@@ -118,7 +118,7 @@ QueryGuardPubkey200ResponseAddressesInner.RequiredProperties = ["address", "chai
118
118
  QueryGuardPubkey200ResponseAddressesInner.prototype['address'] = undefined;
119
119
 
120
120
  /**
121
- * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
121
+ * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
122
122
  * @member {String} chain_id
123
123
  */
124
124
  QueryGuardPubkey200ResponseAddressesInner.prototype['chain_id'] = undefined;
@@ -65,6 +65,36 @@ var StakingPoolId = exports["default"] = /*#__PURE__*/function () {
65
65
  * @const
66
66
  */
67
67
  _defineProperty(this, "sky_farm_eth_usdc", "sky_farm_eth_usdc");
68
+ /**
69
+ * value: "bithive_signet"
70
+ * @const
71
+ */
72
+ _defineProperty(this, "bithive_signet", "bithive_signet");
73
+ /**
74
+ * value: "bithive"
75
+ * @const
76
+ */
77
+ _defineProperty(this, "bithive", "bithive");
78
+ /**
79
+ * value: "beacon_bera"
80
+ * @const
81
+ */
82
+ _defineProperty(this, "beacon_bera", "beacon_bera");
83
+ /**
84
+ * value: "beacon_bera_testnet"
85
+ * @const
86
+ */
87
+ _defineProperty(this, "beacon_bera_testnet", "beacon_bera_testnet");
88
+ /**
89
+ * value: "berachain_bgt"
90
+ * @const
91
+ */
92
+ _defineProperty(this, "berachain_bgt", "berachain_bgt");
93
+ /**
94
+ * value: "berachain_bgt_testnet"
95
+ * @const
96
+ */
97
+ _defineProperty(this, "berachain_bgt_testnet", "berachain_bgt_testnet");
68
98
  /**
69
99
  * value: "unknown_default_open_api"
70
100
  * @const
@@ -50,6 +50,21 @@ var StakingPoolType = exports["default"] = /*#__PURE__*/function () {
50
50
  * @const
51
51
  */
52
52
  _defineProperty(this, "SkyFarm", "SkyFarm");
53
+ /**
54
+ * value: "BitHive"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "BitHive", "BitHive");
58
+ /**
59
+ * value: "BERABeacon"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "BERABeacon", "BERABeacon");
63
+ /**
64
+ * value: "BeraChainBGT"
65
+ * @const
66
+ */
67
+ _defineProperty(this, "BeraChainBGT", "BeraChainBGT");
53
68
  /**
54
69
  * value: "unknown_default_open_api"
55
70
  * @const