@cobo/cobo-waas2 1.15.0 → 1.17.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 (140) hide show
  1. package/README.md +42 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +27 -33
  4. package/dist/api/AddressBooksApi.js +4 -4
  5. package/dist/api/AppWorkflowsApi.js +275 -0
  6. package/dist/api/DevelopersApi.js +4 -4
  7. package/dist/api/DevelopersWebhooksApi.js +12 -12
  8. package/dist/api/FeeStationApi.js +12 -12
  9. package/dist/api/OAuthApi.js +93 -6
  10. package/dist/api/PaymentApi.js +107 -161
  11. package/dist/api/StakingsApi.js +28 -28
  12. package/dist/api/TransactionsApi.js +4 -4
  13. package/dist/api/WalletsApi.js +102 -51
  14. package/dist/api/WalletsExchangeWalletApi.js +8 -8
  15. package/dist/api/WalletsMPCWalletsApi.js +20 -20
  16. package/dist/index.js +224 -14
  17. package/dist/model/AppWorkflow.js +173 -0
  18. package/dist/model/AppWorkflowField.js +137 -0
  19. package/dist/model/AppWorkflowPolicy.js +144 -0
  20. package/dist/model/ApprovalEntry.js +148 -0
  21. package/dist/model/ApprovalRequest.js +180 -0
  22. package/dist/model/ApprovalRequestDetail.js +177 -0
  23. package/dist/model/ApprovalStatus.js +71 -0
  24. package/dist/model/ApprovalUser.js +146 -0
  25. package/dist/model/BabylonStakeExtra.js +16 -0
  26. package/dist/model/BatchCheckUtxo201Response.js +107 -0
  27. package/dist/model/BatchCheckUtxoRequest.js +142 -0
  28. package/dist/model/{CreateBankAccountRequest.js → BatchUTXOParam.js} +43 -28
  29. package/dist/model/ChainInfo.js +9 -0
  30. package/dist/model/CreateApprovalRequest201Response.js +110 -0
  31. package/dist/model/CreatePaymentOrderRequest.js +5 -5
  32. package/dist/model/CreateRefundRequest.js +35 -0
  33. package/dist/model/CreateSettlement.js +39 -29
  34. package/dist/model/CreateStakeActivityExtra.js +6 -0
  35. package/dist/model/CryptoAddress.js +171 -0
  36. package/dist/model/{OrderAddressInfo.js → CustodialTransferDestination.js} +36 -46
  37. package/dist/model/CustodialWeb3TransferSource.js +1 -1
  38. package/dist/model/EstimateContractCallFeeParams.js +13 -0
  39. package/dist/model/EstimateFeeParams.js +6 -0
  40. package/dist/model/EstimateTransferFeeParams.js +13 -0
  41. package/dist/model/ExchangePermissionToken201Response.js +122 -0
  42. package/dist/model/ExchangePermissionTokenRequest.js +110 -0
  43. package/dist/model/ListApprovalRequests200Response.js +123 -0
  44. package/dist/model/MpcTransferSource.js +1 -1
  45. package/dist/model/Order.js +4 -4
  46. package/dist/model/PaymentOrderEventData.js +6 -6
  47. package/dist/model/PayoutChannel.js +61 -0
  48. package/dist/model/PolicyAction.js +123 -0
  49. package/dist/model/PolicyActionContent.js +169 -0
  50. package/dist/model/PolicyActionType.js +66 -0
  51. package/dist/model/PolicyCondition.js +148 -0
  52. package/dist/model/PolicyFieldOperator.js +76 -0
  53. package/dist/model/PolicyFieldValueType.js +61 -0
  54. package/dist/model/RefreshPermissionTokenRequest.js +110 -0
  55. package/dist/model/RequestApproval.js +188 -0
  56. package/dist/model/RevokeApprovalRequest201Response.js +119 -0
  57. package/dist/model/RevokeApprovalRequestRequest.js +110 -0
  58. package/dist/model/SettlementDetail.js +22 -0
  59. package/dist/model/SupportedToken.js +222 -0
  60. package/dist/model/SwapActivityApprovers.js +122 -0
  61. package/dist/model/SwapActivityDetail.js +30 -0
  62. package/dist/model/SwapApproversStatus.js +66 -0
  63. package/dist/model/TransactionCoboCategory.js +102 -7
  64. package/dist/model/TransactionDestination.js +4 -0
  65. package/dist/model/TransactionDestinationType.js +5 -0
  66. package/dist/model/TransactionRbfSource.js +1 -1
  67. package/dist/model/TransactionSubStatus.js +10 -0
  68. package/dist/model/TransactionTransferToWalletDestination.js +2 -2
  69. package/dist/model/TransferDestination.js +42 -14
  70. package/dist/model/TransferDestinationType.js +5 -0
  71. package/dist/model/UTXO.js +9 -0
  72. package/docs/AddressBooksApi.md +2 -2
  73. package/docs/AppWorkflow.md +12 -0
  74. package/docs/AppWorkflowField.md +11 -0
  75. package/docs/AppWorkflowPolicy.md +10 -0
  76. package/docs/AppWorkflowsApi.md +273 -0
  77. package/docs/ApprovalEntry.md +11 -0
  78. package/docs/ApprovalRequest.md +13 -0
  79. package/docs/ApprovalRequestDetail.md +13 -0
  80. package/docs/ApprovalStatus.md +16 -0
  81. package/docs/ApprovalUser.md +12 -0
  82. package/docs/BabylonStakeExtra.md +1 -0
  83. package/docs/BatchCheckUtxo201Response.md +9 -0
  84. package/docs/BatchCheckUtxoRequest.md +10 -0
  85. package/docs/BatchUTXOParam.md +10 -0
  86. package/docs/ChainInfo.md +1 -0
  87. package/docs/CreateApprovalRequest201Response.md +9 -0
  88. package/docs/CreatePaymentOrderRequest.md +1 -1
  89. package/docs/CreateRefundRequest.md +3 -0
  90. package/docs/CreateSettlement.md +5 -2
  91. package/docs/CreateStakeActivityExtra.md +1 -0
  92. package/docs/CryptoAddress.md +14 -0
  93. package/docs/CustodialTransferDestination.md +11 -0
  94. package/docs/CustodialWeb3TransferSource.md +1 -1
  95. package/docs/DevelopersApi.md +2 -2
  96. package/docs/DevelopersWebhooksApi.md +6 -6
  97. package/docs/EstimateContractCallFeeParams.md +1 -0
  98. package/docs/EstimateFeeParams.md +1 -0
  99. package/docs/EstimateTransferFeeParams.md +1 -0
  100. package/docs/ExchangePermissionToken201Response.md +12 -0
  101. package/docs/ExchangePermissionTokenRequest.md +9 -0
  102. package/docs/FeeStationApi.md +6 -6
  103. package/docs/ListApprovalRequests200Response.md +10 -0
  104. package/docs/MpcTransferSource.md +1 -1
  105. package/docs/OAuthApi.md +102 -0
  106. package/docs/Order.md +2 -2
  107. package/docs/PaymentApi.md +86 -147
  108. package/docs/PaymentOrderEventData.md +2 -2
  109. package/docs/PayoutChannel.md +12 -0
  110. package/docs/PolicyAction.md +10 -0
  111. package/docs/PolicyActionContent.md +25 -0
  112. package/docs/PolicyActionType.md +14 -0
  113. package/docs/PolicyCondition.md +12 -0
  114. package/docs/PolicyFieldOperator.md +18 -0
  115. package/docs/PolicyFieldValueType.md +12 -0
  116. package/docs/RefreshPermissionTokenRequest.md +9 -0
  117. package/docs/RequestApproval.md +13 -0
  118. package/docs/RevokeApprovalRequest201Response.md +10 -0
  119. package/docs/RevokeApprovalRequestRequest.md +9 -0
  120. package/docs/SettlementDetail.md +2 -0
  121. package/docs/StakingsApi.md +14 -14
  122. package/docs/SupportedToken.md +17 -0
  123. package/docs/SwapActivityApprovers.md +10 -0
  124. package/docs/SwapActivityDetail.md +1 -0
  125. package/docs/SwapApproversStatus.md +14 -0
  126. package/docs/TransactionCoboCategory.md +41 -3
  127. package/docs/TransactionDestinationType.md +2 -0
  128. package/docs/TransactionRbfSource.md +1 -1
  129. package/docs/TransactionSubStatus.md +4 -0
  130. package/docs/TransactionTransferToWalletDestination.md +1 -1
  131. package/docs/TransactionsApi.md +2 -2
  132. package/docs/TransferDestination.md +1 -1
  133. package/docs/TransferDestinationType.md +2 -0
  134. package/docs/UTXO.md +1 -0
  135. package/docs/WalletsApi.md +78 -23
  136. package/docs/WalletsExchangeWalletApi.md +4 -4
  137. package/docs/WalletsMPCWalletsApi.md +10 -10
  138. package/package.json +1 -1
  139. package/docs/CreateBankAccountRequest.md +0 -9
  140. package/docs/OrderAddressInfo.md +0 -12
@@ -0,0 +1,177 @@
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 _ApprovalEntry = _interopRequireDefault(require("./ApprovalEntry"));
9
+ var _ApprovalStatus = _interopRequireDefault(require("./ApprovalStatus"));
10
+ var _ApprovalUser = _interopRequireDefault(require("./ApprovalUser"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
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; } } }; }
14
+ 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; } }
15
+ 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; }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ 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); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ 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); } /**
21
+ * Cobo Wallet as a Service 2.0
22
+ *
23
+ * Contact: help@cobo.com
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The ApprovalRequestDetail model module.
32
+ * @module model/ApprovalRequestDetail
33
+ */
34
+ var ApprovalRequestDetail = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>ApprovalRequestDetail</code>.
37
+ * The information of an approval request detail.
38
+ * @alias module:model/ApprovalRequestDetail
39
+ * @param initiator {module:model/ApprovalUser}
40
+ * @param status {module:model/ApprovalStatus}
41
+ */
42
+ function ApprovalRequestDetail(initiator, status) {
43
+ _classCallCheck(this, ApprovalRequestDetail);
44
+ ApprovalRequestDetail.initialize(this, initiator, status);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(ApprovalRequestDetail, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, initiator, status) {
55
+ obj['initiator'] = initiator;
56
+ obj['status'] = status;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>ApprovalRequestDetail</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/ApprovalRequestDetail} obj Optional instance to populate.
64
+ * @return {module:model/ApprovalRequestDetail} The populated <code>ApprovalRequestDetail</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new ApprovalRequestDetail();
71
+ if (data.hasOwnProperty('approval_id')) {
72
+ obj['approval_id'] = _ApiClient["default"].convertToType(data['approval_id'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('initiator')) {
75
+ obj['initiator'] = _ApprovalUser["default"].constructFromObject(data['initiator']);
76
+ }
77
+ if (data.hasOwnProperty('approved_list')) {
78
+ obj['approved_list'] = _ApiClient["default"].convertToType(data['approved_list'], [_ApprovalEntry["default"]]);
79
+ }
80
+ if (data.hasOwnProperty('status')) {
81
+ obj['status'] = _ApprovalStatus["default"].constructFromObject(data['status']);
82
+ }
83
+ if (data.hasOwnProperty('modified_timestamp')) {
84
+ obj['modified_timestamp'] = _ApiClient["default"].convertToType(data['modified_timestamp'], 'Number');
85
+ }
86
+ }
87
+ return obj;
88
+ }
89
+
90
+ /**
91
+ * Validates the JSON data with respect to <code>ApprovalRequestDetail</code>.
92
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
93
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApprovalRequestDetail</code>.
94
+ */
95
+ }, {
96
+ key: "validateJSON",
97
+ value: function validateJSON(data) {
98
+ // check to make sure all required properties are present in the JSON string
99
+ var _iterator = _createForOfIteratorHelper(ApprovalRequestDetail.RequiredProperties),
100
+ _step;
101
+ try {
102
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
103
+ var property = _step.value;
104
+ if (!data.hasOwnProperty(property)) {
105
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
106
+ }
107
+ }
108
+ // ensure the json data is a string
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
114
+ if (data['approval_id'] && !(typeof data['approval_id'] === 'string' || data['approval_id'] instanceof String)) {
115
+ throw new Error("Expected the field `approval_id` to be a primitive type in the JSON string but got " + data['approval_id']);
116
+ }
117
+ // validate the optional field `initiator`
118
+ if (data['initiator']) {
119
+ // data not null
120
+ if (!!_ApprovalUser["default"].validateJSON) {
121
+ _ApprovalUser["default"].validateJSON(data['initiator']);
122
+ }
123
+ }
124
+ if (data['approved_list']) {
125
+ // data not null
126
+ // ensure the json data is an array
127
+ if (!Array.isArray(data['approved_list'])) {
128
+ throw new Error("Expected the field `approved_list` to be an array in the JSON data but got " + data['approved_list']);
129
+ }
130
+ // validate the optional field `approved_list` (array)
131
+ var _iterator2 = _createForOfIteratorHelper(data['approved_list']),
132
+ _step2;
133
+ try {
134
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
135
+ var item = _step2.value;
136
+ _ApprovalEntry["default"].validateJSON(item);
137
+ }
138
+ } catch (err) {
139
+ _iterator2.e(err);
140
+ } finally {
141
+ _iterator2.f();
142
+ }
143
+ ;
144
+ }
145
+ return true;
146
+ }
147
+ }]);
148
+ }();
149
+ ApprovalRequestDetail.RequiredProperties = ["initiator", "status"];
150
+
151
+ /**
152
+ * The system-generated unique ID of the approval request.
153
+ * @member {String} approval_id
154
+ */
155
+ ApprovalRequestDetail.prototype['approval_id'] = undefined;
156
+
157
+ /**
158
+ * @member {module:model/ApprovalUser} initiator
159
+ */
160
+ ApprovalRequestDetail.prototype['initiator'] = undefined;
161
+
162
+ /**
163
+ * @member {Array.<module:model/ApprovalEntry>} approved_list
164
+ */
165
+ ApprovalRequestDetail.prototype['approved_list'] = undefined;
166
+
167
+ /**
168
+ * @member {module:model/ApprovalStatus} status
169
+ */
170
+ ApprovalRequestDetail.prototype['status'] = undefined;
171
+
172
+ /**
173
+ * The time when the approval was modified, in Unix timestamp format, measured in milliseconds.
174
+ * @member {Number} modified_timestamp
175
+ */
176
+ ApprovalRequestDetail.prototype['modified_timestamp'] = undefined;
177
+ var _default = exports["default"] = ApprovalRequestDetail;
@@ -0,0 +1,71 @@
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 ApprovalStatus.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var ApprovalStatus = exports["default"] = /*#__PURE__*/function () {
31
+ function ApprovalStatus() {
32
+ _classCallCheck(this, ApprovalStatus);
33
+ /**
34
+ * value: "Pending"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Pending", "Pending");
38
+ /**
39
+ * value: "Completed"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Completed", "Completed");
43
+ /**
44
+ * value: "Failed"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "Failed", "Failed");
48
+ /**
49
+ * value: "Revoked"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "Revoked", "Revoked");
53
+ /**
54
+ * value: "unknown_default_open_api"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
58
+ }
59
+ return _createClass(ApprovalStatus, null, [{
60
+ key: "constructFromObject",
61
+ value:
62
+ /**
63
+ * Returns a <code>ApprovalStatus</code> enum value from a Javascript object name.
64
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
65
+ * @return {module:model/ApprovalStatus} The enum <code>ApprovalStatus</code> value.
66
+ */
67
+ function constructFromObject(object) {
68
+ return object;
69
+ }
70
+ }]);
71
+ }();
@@ -0,0 +1,146 @@
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 _ApprovalStatus = _interopRequireDefault(require("./ApprovalStatus"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The ApprovalUser model module.
30
+ * @module model/ApprovalUser
31
+ */
32
+ var ApprovalUser = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>ApprovalUser</code>.
35
+ * The information of the user.
36
+ * @alias module:model/ApprovalUser
37
+ * @param email {String} The user email.
38
+ * @param status {module:model/ApprovalStatus}
39
+ * @param created_timestamp {Number} The time when the approval was created, in Unix timestamp format, measured in milliseconds.
40
+ */
41
+ function ApprovalUser(email, status, created_timestamp) {
42
+ _classCallCheck(this, ApprovalUser);
43
+ ApprovalUser.initialize(this, email, status, created_timestamp);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(ApprovalUser, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, email, status, created_timestamp) {
54
+ obj['email'] = email;
55
+ obj['status'] = status;
56
+ obj['created_timestamp'] = created_timestamp;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>ApprovalUser</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/ApprovalUser} obj Optional instance to populate.
64
+ * @return {module:model/ApprovalUser} The populated <code>ApprovalUser</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new ApprovalUser();
71
+ if (data.hasOwnProperty('email')) {
72
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('name')) {
75
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('status')) {
78
+ obj['status'] = _ApprovalStatus["default"].constructFromObject(data['status']);
79
+ }
80
+ if (data.hasOwnProperty('created_timestamp')) {
81
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
82
+ }
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>ApprovalUser</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApprovalUser</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // check to make sure all required properties are present in the JSON string
96
+ var _iterator = _createForOfIteratorHelper(ApprovalUser.RequiredProperties),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var property = _step.value;
101
+ if (!data.hasOwnProperty(property)) {
102
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
+ }
104
+ }
105
+ // ensure the json data is a string
106
+ } catch (err) {
107
+ _iterator.e(err);
108
+ } finally {
109
+ _iterator.f();
110
+ }
111
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
112
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
113
+ }
114
+ // ensure the json data is a string
115
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
116
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
117
+ }
118
+ return true;
119
+ }
120
+ }]);
121
+ }();
122
+ ApprovalUser.RequiredProperties = ["email", "status", "created_timestamp"];
123
+
124
+ /**
125
+ * The user email.
126
+ * @member {String} email
127
+ */
128
+ ApprovalUser.prototype['email'] = undefined;
129
+
130
+ /**
131
+ * The user name.
132
+ * @member {String} name
133
+ */
134
+ ApprovalUser.prototype['name'] = undefined;
135
+
136
+ /**
137
+ * @member {module:model/ApprovalStatus} status
138
+ */
139
+ ApprovalUser.prototype['status'] = undefined;
140
+
141
+ /**
142
+ * The time when the approval was created, in Unix timestamp format, measured in milliseconds.
143
+ * @member {Number} created_timestamp
144
+ */
145
+ ApprovalUser.prototype['created_timestamp'] = undefined;
146
+ var _default = exports["default"] = ApprovalUser;
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _BaseStakeExtra = _interopRequireDefault(require("./BaseStakeExtra"));
9
9
  var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
10
+ var _StakingSource = _interopRequireDefault(require("./StakingSource"));
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; } } }; }
@@ -83,6 +84,9 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
83
84
  if (data.hasOwnProperty('auto_broadcast')) {
84
85
  obj['auto_broadcast'] = _ApiClient["default"].convertToType(data['auto_broadcast'], 'Boolean');
85
86
  }
87
+ if (data.hasOwnProperty('babylon_address')) {
88
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
89
+ }
86
90
  }
87
91
  return obj;
88
92
  }
@@ -114,6 +118,13 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
114
118
  if (data['finality_provider_public_key'] && !(typeof data['finality_provider_public_key'] === 'string' || data['finality_provider_public_key'] instanceof String)) {
115
119
  throw new Error("Expected the field `finality_provider_public_key` to be a primitive type in the JSON string but got " + data['finality_provider_public_key']);
116
120
  }
121
+ // validate the optional field `babylon_address`
122
+ if (data['babylon_address']) {
123
+ // data not null
124
+ if (!!_StakingSource["default"].validateJSON) {
125
+ _StakingSource["default"].validateJSON(data['babylon_address']);
126
+ }
127
+ }
117
128
  return true;
118
129
  }
119
130
  }]);
@@ -143,6 +154,11 @@ BabylonStakeExtra.prototype['stake_block_time'] = undefined;
143
154
  */
144
155
  BabylonStakeExtra.prototype['auto_broadcast'] = undefined;
145
156
 
157
+ /**
158
+ * @member {module:model/StakingSource} babylon_address
159
+ */
160
+ BabylonStakeExtra.prototype['babylon_address'] = undefined;
161
+
146
162
  // Implement BaseStakeExtra interface:
147
163
  /**
148
164
  * @member {module:model/StakingPoolType} pool_type
@@ -0,0 +1,107 @@
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 _UTXO = _interopRequireDefault(require("./UTXO"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The BatchCheckUtxo201Response model module.
30
+ * @module model/BatchCheckUtxo201Response
31
+ */
32
+ var BatchCheckUtxo201Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>BatchCheckUtxo201Response</code>.
35
+ * @alias module:model/BatchCheckUtxo201Response
36
+ */
37
+ function BatchCheckUtxo201Response() {
38
+ _classCallCheck(this, BatchCheckUtxo201Response);
39
+ BatchCheckUtxo201Response.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(BatchCheckUtxo201Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>BatchCheckUtxo201Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/BatchCheckUtxo201Response} obj Optional instance to populate.
56
+ * @return {module:model/BatchCheckUtxo201Response} The populated <code>BatchCheckUtxo201Response</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new BatchCheckUtxo201Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_UTXO["default"]]);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>BatchCheckUtxo201Response</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BatchCheckUtxo201Response</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ if (data['data']) {
79
+ // data not null
80
+ // ensure the json data is an array
81
+ if (!Array.isArray(data['data'])) {
82
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
83
+ }
84
+ // validate the optional field `data` (array)
85
+ var _iterator = _createForOfIteratorHelper(data['data']),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var item = _step.value;
90
+ _UTXO["default"].validateJSON(item);
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
97
+ ;
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ /**
104
+ * @member {Array.<module:model/UTXO>} data
105
+ */
106
+ BatchCheckUtxo201Response.prototype['data'] = undefined;
107
+ var _default = exports["default"] = BatchCheckUtxo201Response;