@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,163 @@
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 _TSSEventDataType = _interopRequireDefault(require("./TSSEventDataType"));
9
+ var _TSSRequestTypeEenum = _interopRequireDefault(require("./TSSRequestTypeEenum"));
10
+ var _TSSStatus = _interopRequireDefault(require("./TSSStatus"));
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 TSSBaseRequestEventData model module.
32
+ * @module model/TSSBaseRequestEventData
33
+ */
34
+ var TSSBaseRequestEventData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>TSSBaseRequestEventData</code>.
37
+ * @alias module:model/TSSBaseRequestEventData
38
+ * @param data_type {module:model/TSSEventDataType}
39
+ */
40
+ function TSSBaseRequestEventData(data_type) {
41
+ _classCallCheck(this, TSSBaseRequestEventData);
42
+ TSSBaseRequestEventData.initialize(this, data_type);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(TSSBaseRequestEventData, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, data_type) {
53
+ obj['data_type'] = data_type;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>TSSBaseRequestEventData</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/TSSBaseRequestEventData} obj Optional instance to populate.
61
+ * @return {module:model/TSSBaseRequestEventData} The populated <code>TSSBaseRequestEventData</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new TSSBaseRequestEventData();
68
+ if (data.hasOwnProperty('data_type')) {
69
+ obj['data_type'] = _TSSEventDataType["default"].constructFromObject(data['data_type']);
70
+ }
71
+ if (data.hasOwnProperty('request_id')) {
72
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('request_type')) {
75
+ obj['request_type'] = _TSSRequestTypeEenum["default"].constructFromObject(data['request_type']);
76
+ }
77
+ if (data.hasOwnProperty('request_status')) {
78
+ obj['request_status'] = _TSSStatus["default"].constructFromObject(data['request_status']);
79
+ }
80
+ if (data.hasOwnProperty('extra_info')) {
81
+ obj['extra_info'] = _ApiClient["default"].convertToType(data['extra_info'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('failed_reason')) {
84
+ obj['failed_reason'] = _ApiClient["default"].convertToType(data['failed_reason'], 'String');
85
+ }
86
+ }
87
+ return obj;
88
+ }
89
+
90
+ /**
91
+ * Validates the JSON data with respect to <code>TSSBaseRequestEventData</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>TSSBaseRequestEventData</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(TSSBaseRequestEventData.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['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
115
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['extra_info'] && !(typeof data['extra_info'] === 'string' || data['extra_info'] instanceof String)) {
119
+ throw new Error("Expected the field `extra_info` to be a primitive type in the JSON string but got " + data['extra_info']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['failed_reason'] && !(typeof data['failed_reason'] === 'string' || data['failed_reason'] instanceof String)) {
123
+ throw new Error("Expected the field `failed_reason` to be a primitive type in the JSON string but got " + data['failed_reason']);
124
+ }
125
+ return true;
126
+ }
127
+ }]);
128
+ }();
129
+ TSSBaseRequestEventData.RequiredProperties = ["data_type"];
130
+
131
+ /**
132
+ * @member {module:model/TSSEventDataType} data_type
133
+ */
134
+ TSSBaseRequestEventData.prototype['data_type'] = undefined;
135
+
136
+ /**
137
+ * The request ID.
138
+ * @member {String} request_id
139
+ */
140
+ TSSBaseRequestEventData.prototype['request_id'] = undefined;
141
+
142
+ /**
143
+ * @member {module:model/TSSRequestTypeEenum} request_type
144
+ */
145
+ TSSBaseRequestEventData.prototype['request_type'] = undefined;
146
+
147
+ /**
148
+ * @member {module:model/TSSStatus} request_status
149
+ */
150
+ TSSBaseRequestEventData.prototype['request_status'] = undefined;
151
+
152
+ /**
153
+ * The extra info.
154
+ * @member {String} extra_info
155
+ */
156
+ TSSBaseRequestEventData.prototype['extra_info'] = undefined;
157
+
158
+ /**
159
+ * The failed reason.
160
+ * @member {String} failed_reason
161
+ */
162
+ TSSBaseRequestEventData.prototype['failed_reason'] = undefined;
163
+ var _default = exports["default"] = TSSBaseRequestEventData;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class TSSCallbackActionType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var TSSCallbackActionType = exports["default"] = /*#__PURE__*/function () {
31
+ function TSSCallbackActionType() {
32
+ _classCallCheck(this, TSSCallbackActionType);
33
+ /**
34
+ * value: "APPROVE"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "APPROVE", "APPROVE");
38
+ /**
39
+ * value: "REJECT"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "REJECT", "REJECT");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(TSSCallbackActionType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>TSSCallbackActionType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/TSSCallbackActionType} The enum <code>TSSCallbackActionType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -0,0 +1,122 @@
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 _TSSCallbackRequestType = _interopRequireDefault(require("./TSSCallbackRequestType"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ * The TSSCallbackRequest model module.
27
+ * @module model/TSSCallbackRequest
28
+ */
29
+ var TSSCallbackRequest = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>TSSCallbackRequest</code>.
32
+ * @alias module:model/TSSCallbackRequest
33
+ */
34
+ function TSSCallbackRequest() {
35
+ _classCallCheck(this, TSSCallbackRequest);
36
+ TSSCallbackRequest.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(TSSCallbackRequest, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>TSSCallbackRequest</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/TSSCallbackRequest} obj Optional instance to populate.
53
+ * @return {module:model/TSSCallbackRequest} The populated <code>TSSCallbackRequest</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new TSSCallbackRequest();
60
+ if (data.hasOwnProperty('request_id')) {
61
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('request_type')) {
64
+ obj['request_type'] = _TSSCallbackRequestType["default"].constructFromObject(data['request_type']);
65
+ }
66
+ if (data.hasOwnProperty('request_detail')) {
67
+ obj['request_detail'] = _ApiClient["default"].convertToType(data['request_detail'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('extra_info')) {
70
+ obj['extra_info'] = _ApiClient["default"].convertToType(data['extra_info'], 'String');
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>TSSCallbackRequest</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSCallbackRequest</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // ensure the json data is a string
85
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
86
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
87
+ }
88
+ // ensure the json data is a string
89
+ if (data['request_detail'] && !(typeof data['request_detail'] === 'string' || data['request_detail'] instanceof String)) {
90
+ throw new Error("Expected the field `request_detail` to be a primitive type in the JSON string but got " + data['request_detail']);
91
+ }
92
+ // ensure the json data is a string
93
+ if (data['extra_info'] && !(typeof data['extra_info'] === 'string' || data['extra_info'] instanceof String)) {
94
+ throw new Error("Expected the field `extra_info` to be a primitive type in the JSON string but got " + data['extra_info']);
95
+ }
96
+ return true;
97
+ }
98
+ }]);
99
+ }();
100
+ /**
101
+ * he unique ID of the callback request.
102
+ * @member {String} request_id
103
+ */
104
+ TSSCallbackRequest.prototype['request_id'] = undefined;
105
+
106
+ /**
107
+ * @member {module:model/TSSCallbackRequestType} request_type
108
+ */
109
+ TSSCallbackRequest.prototype['request_type'] = undefined;
110
+
111
+ /**
112
+ * Details specific to the request type. The structure varies depending on the request type. The content is a JSON-serialized string.
113
+ * @member {String} request_detail
114
+ */
115
+ TSSCallbackRequest.prototype['request_detail'] = undefined;
116
+
117
+ /**
118
+ * Additional contextual information. The structure varies depending on the request type. The content is a JSON-serialized string.
119
+ * @member {String} extra_info
120
+ */
121
+ TSSCallbackRequest.prototype['extra_info'] = undefined;
122
+ var _default = exports["default"] = TSSCallbackRequest;
@@ -0,0 +1,76 @@
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 TSSCallbackRequestType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var TSSCallbackRequestType = exports["default"] = /*#__PURE__*/function () {
31
+ function TSSCallbackRequestType() {
32
+ _classCallCheck(this, TSSCallbackRequestType);
33
+ /**
34
+ * value: 0
35
+ * @const
36
+ */
37
+ _defineProperty(this, "PING", 0);
38
+ /**
39
+ * value: 1
40
+ * @const
41
+ */
42
+ _defineProperty(this, "KEYGEN", 1);
43
+ /**
44
+ * value: 2
45
+ * @const
46
+ */
47
+ _defineProperty(this, "KEYSIGN", 2);
48
+ /**
49
+ * value: 3
50
+ * @const
51
+ */
52
+ _defineProperty(this, "KEYRESHARE", 3);
53
+ /**
54
+ * value: 5
55
+ * @const
56
+ */
57
+ _defineProperty(this, "KEYSHARESIGN", 5);
58
+ /**
59
+ * value: 11184809
60
+ * @const
61
+ */
62
+ _defineProperty(this, "unknown_default_open_api", 11184809);
63
+ }
64
+ return _createClass(TSSCallbackRequestType, null, [{
65
+ key: "constructFromObject",
66
+ value:
67
+ /**
68
+ * Returns a <code>TSSCallbackRequestType</code> enum value from a Javascript object name.
69
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
70
+ * @return {module:model/TSSCallbackRequestType} The enum <code>TSSCallbackRequestType</code> value.
71
+ */
72
+ function constructFromObject(object) {
73
+ return object;
74
+ }
75
+ }]);
76
+ }();
@@ -0,0 +1,118 @@
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 _TSSCallbackActionType = _interopRequireDefault(require("./TSSCallbackActionType"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ * The TSSCallbackResponse model module.
27
+ * @module model/TSSCallbackResponse
28
+ */
29
+ var TSSCallbackResponse = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>TSSCallbackResponse</code>.
32
+ * @alias module:model/TSSCallbackResponse
33
+ */
34
+ function TSSCallbackResponse() {
35
+ _classCallCheck(this, TSSCallbackResponse);
36
+ TSSCallbackResponse.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(TSSCallbackResponse, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>TSSCallbackResponse</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/TSSCallbackResponse} obj Optional instance to populate.
53
+ * @return {module:model/TSSCallbackResponse} The populated <code>TSSCallbackResponse</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new TSSCallbackResponse();
60
+ if (data.hasOwnProperty('request_id')) {
61
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('status')) {
64
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'Number');
65
+ }
66
+ if (data.hasOwnProperty('action')) {
67
+ obj['action'] = _TSSCallbackActionType["default"].constructFromObject(data['action']);
68
+ }
69
+ if (data.hasOwnProperty('error')) {
70
+ obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>TSSCallbackResponse</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSCallbackResponse</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // ensure the json data is a string
85
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
86
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
87
+ }
88
+ // ensure the json data is a string
89
+ if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
90
+ throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
91
+ }
92
+ return true;
93
+ }
94
+ }]);
95
+ }();
96
+ /**
97
+ * The unique ID of the callback request.
98
+ * @member {String} request_id
99
+ */
100
+ TSSCallbackResponse.prototype['request_id'] = undefined;
101
+
102
+ /**
103
+ * The response status code. 0 indicates success. Any other value indicates that an error occurred while processing the request in the callback server.
104
+ * @member {Number} status
105
+ */
106
+ TSSCallbackResponse.prototype['status'] = undefined;
107
+
108
+ /**
109
+ * @member {module:model/TSSCallbackActionType} action
110
+ */
111
+ TSSCallbackResponse.prototype['action'] = undefined;
112
+
113
+ /**
114
+ * The error message. - When status is not 0, Contains internal error messages from the callback server. - When status is 0 and action is REJECT, Contains the specific reason for the rejection.
115
+ * @member {String} error
116
+ */
117
+ TSSCallbackResponse.prototype['error'] = undefined;
118
+ var _default = exports["default"] = TSSCallbackResponse;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class TSSCurve.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var TSSCurve = exports["default"] = /*#__PURE__*/function () {
31
+ function TSSCurve() {
32
+ _classCallCheck(this, TSSCurve);
33
+ /**
34
+ * value: 0
35
+ * @const
36
+ */
37
+ _defineProperty(this, "SECP256K1", 0);
38
+ /**
39
+ * value: 2
40
+ * @const
41
+ */
42
+ _defineProperty(this, "ED25519", 2);
43
+ /**
44
+ * value: 11184809
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", 11184809);
48
+ }
49
+ return _createClass(TSSCurve, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>TSSCurve</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/TSSCurve} The enum <code>TSSCurve</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();