@cobo/cobo-waas2 1.14.0 → 1.16.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 (216) hide show
  1. package/README.md +70 -5
  2. package/dist/ApiClient.js +2 -3
  3. package/dist/PreRequestScript.js +1 -1
  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 +26 -26
  9. package/dist/api/PaymentApi.js +16 -16
  10. package/dist/api/StakingsApi.js +28 -28
  11. package/dist/api/TransactionsApi.js +16 -8
  12. package/dist/api/WalletsApi.js +121 -70
  13. package/dist/api/WalletsExchangeWalletApi.js +8 -8
  14. package/dist/api/WalletsMPCWalletsApi.js +20 -20
  15. package/dist/crypto/ApiSigner.js +1 -2
  16. package/dist/index.js +420 -0
  17. package/dist/model/AddressBook.js +18 -0
  18. package/dist/model/AppWorkflow.js +173 -0
  19. package/dist/model/AppWorkflowField.js +137 -0
  20. package/dist/model/AppWorkflowPolicy.js +144 -0
  21. package/dist/model/ApprovalEntry.js +148 -0
  22. package/dist/model/ApprovalRequest.js +178 -0
  23. package/dist/model/ApprovalRequestDetail.js +176 -0
  24. package/dist/model/ApprovalStatus.js +71 -0
  25. package/dist/model/ApprovalUser.js +146 -0
  26. package/dist/model/BabylonStakeExtra.js +16 -0
  27. package/dist/model/BankAccount.js +18 -0
  28. package/dist/model/BatchCheckUtxo201Response.js +107 -0
  29. package/dist/model/BatchCheckUtxoRequest.js +142 -0
  30. package/dist/model/BatchUTXOParam.js +123 -0
  31. package/dist/model/ChainInfo.js +9 -0
  32. package/dist/model/CreateApprovalRequest201Response.js +109 -0
  33. package/dist/model/CreateSettlement.js +4 -29
  34. package/dist/model/CreateStakeActivityExtra.js +6 -0
  35. package/dist/model/CreateTokenListingRequest201Response.js +2 -2
  36. package/dist/model/CreateTokenListingRequestRequest.js +4 -4
  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/FeeStationTransfer.js +1 -1
  42. package/dist/model/ListApprovalRequests200Response.js +123 -0
  43. package/dist/model/Merchant.js +18 -0
  44. package/dist/model/MpcTransferSource.js +1 -1
  45. package/dist/model/Order.js +49 -0
  46. package/dist/model/PaymentOrderEventData.js +64 -0
  47. package/dist/model/PaymentRefundEventData.js +77 -0
  48. package/dist/model/PaymentSettlementEvent.js +46 -0
  49. package/dist/model/PaymentTransaction.js +13 -0
  50. package/dist/model/PolicyAction.js +123 -0
  51. package/dist/model/PolicyActionContent.js +167 -0
  52. package/dist/model/PolicyActionType.js +66 -0
  53. package/dist/model/PolicyCondition.js +148 -0
  54. package/dist/model/PolicyFieldOperator.js +76 -0
  55. package/dist/model/PolicyFieldValueType.js +61 -0
  56. package/dist/model/Refund.js +53 -0
  57. package/dist/model/RequestApproval.js +188 -0
  58. package/dist/model/RevokeApprovalRequest201Response.js +118 -0
  59. package/dist/model/RevokeApprovalRequestRequest.js +110 -0
  60. package/dist/model/Settlement.js +31 -0
  61. package/dist/model/SettlementDetail.js +57 -0
  62. package/dist/model/SettlementInfo.js +31 -0
  63. package/dist/model/SwapActivity.js +3 -3
  64. package/dist/model/SwapActivityApprovers.js +122 -0
  65. package/dist/model/SwapActivityDetail.js +36 -6
  66. package/dist/model/SwapApproversStatus.js +66 -0
  67. package/dist/model/SwapQuote.js +49 -4
  68. package/dist/model/SwapToken.js +2 -2
  69. package/dist/model/TSSBaseRequestEventData.js +163 -0
  70. package/dist/model/TSSCallbackActionType.js +61 -0
  71. package/dist/model/TSSCallbackRequest.js +122 -0
  72. package/dist/model/TSSCallbackRequestType.js +76 -0
  73. package/dist/model/TSSCallbackResponse.js +118 -0
  74. package/dist/model/TSSCurve.js +61 -0
  75. package/dist/model/TSSCurveType.js +61 -0
  76. package/dist/model/TSSEvent.js +158 -0
  77. package/dist/model/TSSEventData.js +278 -0
  78. package/dist/model/TSSEventDataType.js +71 -0
  79. package/dist/model/TSSEventType.js +136 -0
  80. package/dist/model/TSSGroup.js +221 -0
  81. package/dist/model/TSSGroupType.js +61 -0
  82. package/dist/model/TSSGroups.js +1 -1
  83. package/dist/model/TSSKeyGenEventData.js +228 -0
  84. package/dist/model/TSSKeyGenExtra.js +154 -0
  85. package/dist/model/TSSKeyGenRequest.js +130 -0
  86. package/dist/model/TSSKeyReshareEventData.js +228 -0
  87. package/dist/model/TSSKeyReshareExtra.js +169 -0
  88. package/dist/model/TSSKeyReshareRequest.js +177 -0
  89. package/dist/model/TSSKeyShareSignDetail.js +100 -0
  90. package/dist/model/TSSKeyShareSignEventData.js +228 -0
  91. package/dist/model/TSSKeyShareSignExtra.js +171 -0
  92. package/dist/model/TSSKeyShareSignRequest.js +146 -0
  93. package/dist/model/TSSKeyShareSignSignature.js +126 -0
  94. package/dist/model/TSSKeyShareSignSignatures.js +107 -0
  95. package/dist/model/TSSKeySignEventData.js +228 -0
  96. package/dist/model/TSSKeySignExtra.js +203 -0
  97. package/dist/model/TSSKeySignRequest.js +192 -0
  98. package/dist/model/TSSParticipant.js +113 -0
  99. package/dist/model/TSSProtocol.js +66 -0
  100. package/dist/model/TSSRequestTypeEenum.js +71 -0
  101. package/dist/model/TSSSignature.js +139 -0
  102. package/dist/model/TSSSignatureType.js +66 -0
  103. package/dist/model/TSSSignatures.js +125 -0
  104. package/dist/model/TSSStatus.js +96 -0
  105. package/dist/model/TokenListing.js +10 -10
  106. package/dist/model/TokenListingEventData.js +15 -15
  107. package/dist/model/TransactionCoboCategory.js +102 -7
  108. package/dist/model/TransactionRbfSource.js +1 -1
  109. package/dist/model/TransactionSubStatus.js +35 -0
  110. package/dist/model/UTXO.js +9 -0
  111. package/dist/model/WebhookEventData.js +15 -9
  112. package/docs/AddressBook.md +2 -0
  113. package/docs/AddressBooksApi.md +2 -2
  114. package/docs/AppWorkflow.md +12 -0
  115. package/docs/AppWorkflowField.md +11 -0
  116. package/docs/AppWorkflowPolicy.md +10 -0
  117. package/docs/AppWorkflowsApi.md +273 -0
  118. package/docs/ApprovalEntry.md +11 -0
  119. package/docs/ApprovalRequest.md +13 -0
  120. package/docs/ApprovalRequestDetail.md +13 -0
  121. package/docs/ApprovalStatus.md +16 -0
  122. package/docs/ApprovalUser.md +12 -0
  123. package/docs/BabylonStakeExtra.md +1 -0
  124. package/docs/BankAccount.md +2 -0
  125. package/docs/BatchCheckUtxo201Response.md +9 -0
  126. package/docs/BatchCheckUtxoRequest.md +10 -0
  127. package/docs/BatchUTXOParam.md +10 -0
  128. package/docs/ChainInfo.md +1 -0
  129. package/docs/CreateApprovalRequest201Response.md +9 -0
  130. package/docs/CreateSettlement.md +2 -2
  131. package/docs/CreateStakeActivityExtra.md +1 -0
  132. package/docs/CreateTokenListingRequest201Response.md +1 -1
  133. package/docs/CreateTokenListingRequestRequest.md +2 -2
  134. package/docs/CustodialWeb3TransferSource.md +1 -1
  135. package/docs/DevelopersApi.md +2 -2
  136. package/docs/DevelopersWebhooksApi.md +6 -6
  137. package/docs/EstimateContractCallFeeParams.md +1 -0
  138. package/docs/EstimateFeeParams.md +1 -0
  139. package/docs/EstimateTransferFeeParams.md +1 -0
  140. package/docs/FeeStationApi.md +14 -14
  141. package/docs/ListApprovalRequests200Response.md +10 -0
  142. package/docs/Merchant.md +2 -0
  143. package/docs/MpcTransferSource.md +1 -1
  144. package/docs/Order.md +3 -0
  145. package/docs/PaymentApi.md +8 -8
  146. package/docs/PaymentOrderEventData.md +3 -0
  147. package/docs/PaymentRefundEventData.md +5 -0
  148. package/docs/PaymentSettlementEvent.md +3 -0
  149. package/docs/PaymentTransaction.md +1 -0
  150. package/docs/PolicyAction.md +10 -0
  151. package/docs/PolicyActionContent.md +25 -0
  152. package/docs/PolicyActionType.md +14 -0
  153. package/docs/PolicyCondition.md +12 -0
  154. package/docs/PolicyFieldOperator.md +18 -0
  155. package/docs/PolicyFieldValueType.md +12 -0
  156. package/docs/Refund.md +5 -0
  157. package/docs/RequestApproval.md +13 -0
  158. package/docs/RevokeApprovalRequest201Response.md +10 -0
  159. package/docs/RevokeApprovalRequestRequest.md +9 -0
  160. package/docs/Settlement.md +3 -0
  161. package/docs/SettlementDetail.md +5 -0
  162. package/docs/SettlementInfo.md +3 -0
  163. package/docs/StakingsApi.md +14 -14
  164. package/docs/SwapActivity.md +3 -3
  165. package/docs/SwapActivityApprovers.md +10 -0
  166. package/docs/SwapActivityDetail.md +4 -3
  167. package/docs/SwapApproversStatus.md +14 -0
  168. package/docs/SwapQuote.md +3 -0
  169. package/docs/SwapToken.md +2 -2
  170. package/docs/TSSBaseRequestEventData.md +14 -0
  171. package/docs/TSSCallbackActionType.md +12 -0
  172. package/docs/TSSCallbackRequest.md +12 -0
  173. package/docs/TSSCallbackRequestType.md +18 -0
  174. package/docs/TSSCallbackResponse.md +12 -0
  175. package/docs/TSSCurve.md +12 -0
  176. package/docs/TSSCurveType.md +12 -0
  177. package/docs/TSSEvent.md +13 -0
  178. package/docs/TSSEventData.md +16 -0
  179. package/docs/TSSEventDataType.md +16 -0
  180. package/docs/TSSEventType.md +42 -0
  181. package/docs/TSSGroup.md +19 -0
  182. package/docs/TSSGroupType.md +12 -0
  183. package/docs/TSSKeyGenEventData.md +16 -0
  184. package/docs/TSSKeyGenExtra.md +13 -0
  185. package/docs/TSSKeyGenRequest.md +13 -0
  186. package/docs/TSSKeyReshareEventData.md +16 -0
  187. package/docs/TSSKeyReshareExtra.md +14 -0
  188. package/docs/TSSKeyReshareRequest.md +17 -0
  189. package/docs/TSSKeyShareSignDetail.md +10 -0
  190. package/docs/TSSKeyShareSignEventData.md +16 -0
  191. package/docs/TSSKeyShareSignExtra.md +13 -0
  192. package/docs/TSSKeyShareSignRequest.md +12 -0
  193. package/docs/TSSKeyShareSignSignature.md +12 -0
  194. package/docs/TSSKeyShareSignSignatures.md +9 -0
  195. package/docs/TSSKeySignEventData.md +16 -0
  196. package/docs/TSSKeySignExtra.md +15 -0
  197. package/docs/TSSKeySignRequest.md +18 -0
  198. package/docs/TSSParticipant.md +11 -0
  199. package/docs/TSSProtocol.md +14 -0
  200. package/docs/TSSRequestTypeEenum.md +16 -0
  201. package/docs/TSSSignature.md +13 -0
  202. package/docs/TSSSignatureType.md +14 -0
  203. package/docs/TSSSignatures.md +11 -0
  204. package/docs/TSSStatus.md +26 -0
  205. package/docs/TokenListing.md +6 -6
  206. package/docs/TokenListingEventData.md +6 -6
  207. package/docs/TransactionCoboCategory.md +41 -3
  208. package/docs/TransactionRbfSource.md +1 -1
  209. package/docs/TransactionSubStatus.md +14 -0
  210. package/docs/TransactionsApi.md +8 -4
  211. package/docs/UTXO.md +1 -0
  212. package/docs/WalletsApi.md +91 -36
  213. package/docs/WalletsExchangeWalletApi.md +4 -4
  214. package/docs/WalletsMPCWalletsApi.md +10 -10
  215. package/docs/WebhookEventData.md +8 -7
  216. package/package.json +1 -1
@@ -0,0 +1,171 @@
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 _KeyShareHolderGroup = _interopRequireDefault(require("./KeyShareHolderGroup"));
9
+ var _MPCProject = _interopRequireDefault(require("./MPCProject"));
10
+ var _MPCVault = _interopRequireDefault(require("./MPCVault"));
11
+ var _MPCWalletInfo = _interopRequireDefault(require("./MPCWalletInfo"));
12
+ var _OrgInfo = _interopRequireDefault(require("./OrgInfo"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ 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); }
15
+ 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; } } }; }
16
+ 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; } }
17
+ 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; }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Cobo Wallet as a Service 2.0
24
+ *
25
+ * Contact: help@cobo.com
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * The TSSKeyShareSignExtra model module.
34
+ * @module model/TSSKeyShareSignExtra
35
+ */
36
+ var TSSKeyShareSignExtra = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>TSSKeyShareSignExtra</code>.
39
+ * @alias module:model/TSSKeyShareSignExtra
40
+ */
41
+ function TSSKeyShareSignExtra() {
42
+ _classCallCheck(this, TSSKeyShareSignExtra);
43
+ TSSKeyShareSignExtra.initialize(this);
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(TSSKeyShareSignExtra, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj) {}
54
+
55
+ /**
56
+ * Constructs a <code>TSSKeyShareSignExtra</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/TSSKeyShareSignExtra} obj Optional instance to populate.
60
+ * @return {module:model/TSSKeyShareSignExtra} The populated <code>TSSKeyShareSignExtra</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new TSSKeyShareSignExtra();
67
+ if (data.hasOwnProperty('org')) {
68
+ obj['org'] = _OrgInfo["default"].constructFromObject(data['org']);
69
+ }
70
+ if (data.hasOwnProperty('project')) {
71
+ obj['project'] = _MPCProject["default"].constructFromObject(data['project']);
72
+ }
73
+ if (data.hasOwnProperty('vault')) {
74
+ obj['vault'] = _MPCVault["default"].constructFromObject(data['vault']);
75
+ }
76
+ if (data.hasOwnProperty('wallet')) {
77
+ obj['wallet'] = _MPCWalletInfo["default"].constructFromObject(data['wallet']);
78
+ }
79
+ if (data.hasOwnProperty('validity_key_share_holder_groups')) {
80
+ obj['validity_key_share_holder_groups'] = _ApiClient["default"].convertToType(data['validity_key_share_holder_groups'], [_KeyShareHolderGroup["default"]]);
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>TSSKeyShareSignExtra</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyShareSignExtra</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // validate the optional field `org`
95
+ if (data['org']) {
96
+ // data not null
97
+ if (!!_OrgInfo["default"].validateJSON) {
98
+ _OrgInfo["default"].validateJSON(data['org']);
99
+ }
100
+ }
101
+ // validate the optional field `project`
102
+ if (data['project']) {
103
+ // data not null
104
+ if (!!_MPCProject["default"].validateJSON) {
105
+ _MPCProject["default"].validateJSON(data['project']);
106
+ }
107
+ }
108
+ // validate the optional field `vault`
109
+ if (data['vault']) {
110
+ // data not null
111
+ if (!!_MPCVault["default"].validateJSON) {
112
+ _MPCVault["default"].validateJSON(data['vault']);
113
+ }
114
+ }
115
+ // validate the optional field `wallet`
116
+ if (data['wallet']) {
117
+ // data not null
118
+ if (!!_MPCWalletInfo["default"].validateJSON) {
119
+ _MPCWalletInfo["default"].validateJSON(data['wallet']);
120
+ }
121
+ }
122
+ if (data['validity_key_share_holder_groups']) {
123
+ // data not null
124
+ // ensure the json data is an array
125
+ if (!Array.isArray(data['validity_key_share_holder_groups'])) {
126
+ throw new Error("Expected the field `validity_key_share_holder_groups` to be an array in the JSON data but got " + data['validity_key_share_holder_groups']);
127
+ }
128
+ // validate the optional field `validity_key_share_holder_groups` (array)
129
+ var _iterator = _createForOfIteratorHelper(data['validity_key_share_holder_groups']),
130
+ _step;
131
+ try {
132
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
133
+ var item = _step.value;
134
+ _KeyShareHolderGroup["default"].validateJSON(item);
135
+ }
136
+ } catch (err) {
137
+ _iterator.e(err);
138
+ } finally {
139
+ _iterator.f();
140
+ }
141
+ ;
142
+ }
143
+ return true;
144
+ }
145
+ }]);
146
+ }();
147
+ /**
148
+ * @member {module:model/OrgInfo} org
149
+ */
150
+ TSSKeyShareSignExtra.prototype['org'] = undefined;
151
+
152
+ /**
153
+ * @member {module:model/MPCProject} project
154
+ */
155
+ TSSKeyShareSignExtra.prototype['project'] = undefined;
156
+
157
+ /**
158
+ * @member {module:model/MPCVault} vault
159
+ */
160
+ TSSKeyShareSignExtra.prototype['vault'] = undefined;
161
+
162
+ /**
163
+ * @member {module:model/MPCWalletInfo} wallet
164
+ */
165
+ TSSKeyShareSignExtra.prototype['wallet'] = undefined;
166
+
167
+ /**
168
+ * @member {Array.<module:model/KeyShareHolderGroup>} validity_key_share_holder_groups
169
+ */
170
+ TSSKeyShareSignExtra.prototype['validity_key_share_holder_groups'] = undefined;
171
+ var _default = exports["default"] = TSSKeyShareSignExtra;
@@ -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 _TSSKeyShareSignDetail = _interopRequireDefault(require("./TSSKeyShareSignDetail"));
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 TSSKeyShareSignRequest model module.
30
+ * @module model/TSSKeyShareSignRequest
31
+ */
32
+ var TSSKeyShareSignRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>TSSKeyShareSignRequest</code>.
35
+ * @alias module:model/TSSKeyShareSignRequest
36
+ */
37
+ function TSSKeyShareSignRequest() {
38
+ _classCallCheck(this, TSSKeyShareSignRequest);
39
+ TSSKeyShareSignRequest.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(TSSKeyShareSignRequest, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>TSSKeyShareSignRequest</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/TSSKeyShareSignRequest} obj Optional instance to populate.
56
+ * @return {module:model/TSSKeyShareSignRequest} The populated <code>TSSKeyShareSignRequest</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new TSSKeyShareSignRequest();
63
+ if (data.hasOwnProperty('node_id')) {
64
+ obj['node_id'] = _ApiClient["default"].convertToType(data['node_id'], 'String');
65
+ }
66
+ if (data.hasOwnProperty('task_id')) {
67
+ obj['task_id'] = _ApiClient["default"].convertToType(data['task_id'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('details')) {
70
+ obj['details'] = _ApiClient["default"].convertToType(data['details'], [_TSSKeyShareSignDetail["default"]]);
71
+ }
72
+ if (data.hasOwnProperty('biz_task_id')) {
73
+ obj['biz_task_id'] = _ApiClient["default"].convertToType(data['biz_task_id'], 'String');
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>TSSKeyShareSignRequest</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyShareSignRequest</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // ensure the json data is a string
88
+ if (data['node_id'] && !(typeof data['node_id'] === 'string' || data['node_id'] instanceof String)) {
89
+ throw new Error("Expected the field `node_id` to be a primitive type in the JSON string but got " + data['node_id']);
90
+ }
91
+ // ensure the json data is a string
92
+ if (data['task_id'] && !(typeof data['task_id'] === 'string' || data['task_id'] instanceof String)) {
93
+ throw new Error("Expected the field `task_id` to be a primitive type in the JSON string but got " + data['task_id']);
94
+ }
95
+ if (data['details']) {
96
+ // data not null
97
+ // ensure the json data is an array
98
+ if (!Array.isArray(data['details'])) {
99
+ throw new Error("Expected the field `details` to be an array in the JSON data but got " + data['details']);
100
+ }
101
+ // validate the optional field `details` (array)
102
+ var _iterator = _createForOfIteratorHelper(data['details']),
103
+ _step;
104
+ try {
105
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
106
+ var item = _step.value;
107
+ _TSSKeyShareSignDetail["default"].validateJSON(item);
108
+ }
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
114
+ ;
115
+ }
116
+ // ensure the json data is a string
117
+ if (data['biz_task_id'] && !(typeof data['biz_task_id'] === 'string' || data['biz_task_id'] instanceof String)) {
118
+ throw new Error("Expected the field `biz_task_id` to be a primitive type in the JSON string but got " + data['biz_task_id']);
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ /**
125
+ * The node ID of the key share holder.
126
+ * @member {String} node_id
127
+ */
128
+ TSSKeyShareSignRequest.prototype['node_id'] = undefined;
129
+
130
+ /**
131
+ * The task ID.
132
+ * @member {String} task_id
133
+ */
134
+ TSSKeyShareSignRequest.prototype['task_id'] = undefined;
135
+
136
+ /**
137
+ * @member {Array.<module:model/TSSKeyShareSignDetail>} details
138
+ */
139
+ TSSKeyShareSignRequest.prototype['details'] = undefined;
140
+
141
+ /**
142
+ * The business task ID. This field contains the key share sign request ID.
143
+ * @member {String} biz_task_id
144
+ */
145
+ TSSKeyShareSignRequest.prototype['biz_task_id'] = undefined;
146
+ var _default = exports["default"] = TSSKeyShareSignRequest;
@@ -0,0 +1,126 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The TSSKeyShareSignSignature model module.
26
+ * @module model/TSSKeyShareSignSignature
27
+ */
28
+ var TSSKeyShareSignSignature = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>TSSKeyShareSignSignature</code>.
31
+ * @alias module:model/TSSKeyShareSignSignature
32
+ */
33
+ function TSSKeyShareSignSignature() {
34
+ _classCallCheck(this, TSSKeyShareSignSignature);
35
+ TSSKeyShareSignSignature.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(TSSKeyShareSignSignature, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>TSSKeyShareSignSignature</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/TSSKeyShareSignSignature} obj Optional instance to populate.
52
+ * @return {module:model/TSSKeyShareSignSignature} The populated <code>TSSKeyShareSignSignature</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new TSSKeyShareSignSignature();
59
+ if (data.hasOwnProperty('group_id')) {
60
+ obj['group_id'] = _ApiClient["default"].convertToType(data['group_id'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('signed_msg')) {
63
+ obj['signed_msg'] = _ApiClient["default"].convertToType(data['signed_msg'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('msg_hash')) {
66
+ obj['msg_hash'] = _ApiClient["default"].convertToType(data['msg_hash'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('signature')) {
69
+ obj['signature'] = _ApiClient["default"].convertToType(data['signature'], 'String');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>TSSKeyShareSignSignature</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyShareSignSignature</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // ensure the json data is a string
84
+ if (data['group_id'] && !(typeof data['group_id'] === 'string' || data['group_id'] instanceof String)) {
85
+ throw new Error("Expected the field `group_id` to be a primitive type in the JSON string but got " + data['group_id']);
86
+ }
87
+ // ensure the json data is a string
88
+ if (data['signed_msg'] && !(typeof data['signed_msg'] === 'string' || data['signed_msg'] instanceof String)) {
89
+ throw new Error("Expected the field `signed_msg` to be a primitive type in the JSON string but got " + data['signed_msg']);
90
+ }
91
+ // ensure the json data is a string
92
+ if (data['msg_hash'] && !(typeof data['msg_hash'] === 'string' || data['msg_hash'] instanceof String)) {
93
+ throw new Error("Expected the field `msg_hash` to be a primitive type in the JSON string but got " + data['msg_hash']);
94
+ }
95
+ // ensure the json data is a string
96
+ if (data['signature'] && !(typeof data['signature'] === 'string' || data['signature'] instanceof String)) {
97
+ throw new Error("Expected the field `signature` to be a primitive type in the JSON string but got " + data['signature']);
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ /**
104
+ * The TSS key share group ID.
105
+ * @member {String} group_id
106
+ */
107
+ TSSKeyShareSignSignature.prototype['group_id'] = undefined;
108
+
109
+ /**
110
+ * The hexadecimal encoded signed message.
111
+ * @member {String} signed_msg
112
+ */
113
+ TSSKeyShareSignSignature.prototype['signed_msg'] = undefined;
114
+
115
+ /**
116
+ * The message hash.
117
+ * @member {String} msg_hash
118
+ */
119
+ TSSKeyShareSignSignature.prototype['msg_hash'] = undefined;
120
+
121
+ /**
122
+ * The signature.
123
+ * @member {String} signature
124
+ */
125
+ TSSKeyShareSignSignature.prototype['signature'] = undefined;
126
+ var _default = exports["default"] = TSSKeyShareSignSignature;
@@ -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 _TSSKeyShareSignSignature = _interopRequireDefault(require("./TSSKeyShareSignSignature"));
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 TSSKeyShareSignSignatures model module.
30
+ * @module model/TSSKeyShareSignSignatures
31
+ */
32
+ var TSSKeyShareSignSignatures = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>TSSKeyShareSignSignatures</code>.
35
+ * @alias module:model/TSSKeyShareSignSignatures
36
+ */
37
+ function TSSKeyShareSignSignatures() {
38
+ _classCallCheck(this, TSSKeyShareSignSignatures);
39
+ TSSKeyShareSignSignatures.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(TSSKeyShareSignSignatures, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>TSSKeyShareSignSignatures</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/TSSKeyShareSignSignatures} obj Optional instance to populate.
56
+ * @return {module:model/TSSKeyShareSignSignatures} The populated <code>TSSKeyShareSignSignatures</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new TSSKeyShareSignSignatures();
63
+ if (data.hasOwnProperty('signatures')) {
64
+ obj['signatures'] = _ApiClient["default"].convertToType(data['signatures'], [_TSSKeyShareSignSignature["default"]]);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>TSSKeyShareSignSignatures</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>TSSKeyShareSignSignatures</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ if (data['signatures']) {
79
+ // data not null
80
+ // ensure the json data is an array
81
+ if (!Array.isArray(data['signatures'])) {
82
+ throw new Error("Expected the field `signatures` to be an array in the JSON data but got " + data['signatures']);
83
+ }
84
+ // validate the optional field `signatures` (array)
85
+ var _iterator = _createForOfIteratorHelper(data['signatures']),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var item = _step.value;
90
+ _TSSKeyShareSignSignature["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/TSSKeyShareSignSignature>} signatures
105
+ */
106
+ TSSKeyShareSignSignatures.prototype['signatures'] = undefined;
107
+ var _default = exports["default"] = TSSKeyShareSignSignatures;