@cobo/cobo-waas2 1.16.0 → 1.18.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 (214) hide show
  1. package/README.md +46 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +27 -33
  4. package/dist/api/AppWorkflowsApi.js +22 -22
  5. package/dist/api/FeeStationApi.js +2 -2
  6. package/dist/api/OAuthApi.js +93 -6
  7. package/dist/api/OrganizationsApi.js +79 -0
  8. package/dist/api/PaymentApi.js +265 -55
  9. package/dist/api/TransactionsApi.js +2 -2
  10. package/dist/api/WalletsApi.js +11 -8
  11. package/dist/index.js +252 -14
  12. package/dist/model/Account.js +174 -0
  13. package/dist/model/AcquiringType.js +61 -0
  14. package/dist/model/AddressTransferDestination.js +2 -2
  15. package/dist/model/AddressesEventData.js +8 -3
  16. package/dist/model/AppWorkflow.js +7 -7
  17. package/dist/model/AppWorkflowField.js +5 -5
  18. package/dist/model/AppWorkflowPolicy.js +1 -1
  19. package/dist/model/ApprovalEntry.js +1 -1
  20. package/dist/model/ApprovalRequest.js +5 -3
  21. package/dist/model/ApprovalRequestDetail.js +2 -1
  22. package/dist/model/ApprovalUser.js +4 -4
  23. package/dist/model/BalanceUpdateInfo.js +170 -0
  24. package/dist/model/BalanceUpdateInfoEventData.js +297 -0
  25. package/dist/model/BankAccount.js +2 -2
  26. package/dist/model/ChainInfo.js +1 -1
  27. package/dist/model/ChainsEventData.js +8 -3
  28. package/dist/model/CreateApprovalRequest201Response.js +2 -1
  29. package/dist/model/CreateMerchantRequest.js +13 -0
  30. package/dist/model/CreatePaymentOrderRequest.js +14 -5
  31. package/dist/model/CreateRefundRequest.js +41 -8
  32. package/dist/model/CreateSettlement.js +28 -12
  33. package/dist/model/CreateSettlementRequestRequest.js +27 -0
  34. package/dist/model/CryptoAddress.js +171 -0
  35. package/dist/model/CustodialTransferDestination.js +137 -0
  36. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  37. package/dist/model/EstimateFeeParams.js +1 -1
  38. package/dist/model/EstimatedFILFee.js +170 -0
  39. package/dist/model/EstimatedFILFeeSlow.js +186 -0
  40. package/dist/model/EstimatedFee.js +68 -12
  41. package/dist/model/EstimatedSOLFee.js +170 -0
  42. package/dist/model/EstimatedSOLFeeSlow.js +184 -0
  43. package/dist/model/ExchangePermissionToken201Response.js +122 -0
  44. package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
  45. package/dist/model/FILBase.js +88 -0
  46. package/dist/model/FILPrice.js +114 -0
  47. package/dist/model/FeeType.js +10 -0
  48. package/dist/model/GetExchangeRate200Response.js +2 -2
  49. package/dist/model/GraphQLError.js +135 -0
  50. package/dist/model/GraphQLErrorLocationsInner.js +92 -0
  51. package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
  52. package/dist/model/GraphQLResponse.js +119 -0
  53. package/dist/model/ListTopUpPayers200Response.js +123 -0
  54. package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
  55. package/dist/model/MPCVaultEventData.js +8 -3
  56. package/dist/model/Merchant.js +15 -2
  57. package/dist/model/Order.js +16 -7
  58. package/dist/model/PayerAccount.js +189 -0
  59. package/dist/model/PaymentOrderEventData.js +33 -15
  60. package/dist/model/PaymentRefundEventData.js +66 -11
  61. package/dist/model/PaymentSettlementEvent.js +14 -9
  62. package/dist/model/PayoutChannel.js +61 -0
  63. package/dist/model/PolicyAction.js +1 -1
  64. package/dist/model/PolicyActionContent.js +6 -4
  65. package/dist/model/PolicyCondition.js +5 -5
  66. package/dist/model/RefreshPermissionTokenRequest.js +110 -0
  67. package/dist/model/Refund.js +39 -4
  68. package/dist/model/RefundStatus.js +5 -0
  69. package/dist/model/RequestApproval.js +9 -9
  70. package/dist/model/RevokeApprovalRequest201Response.js +2 -1
  71. package/dist/model/RevokeApprovalRequestRequest.js +2 -2
  72. package/dist/model/SOLBase.js +101 -0
  73. package/dist/model/SOLComputeUnit.js +101 -0
  74. package/dist/model/Settlement.js +3 -3
  75. package/dist/model/SettlementDetail.js +24 -6
  76. package/dist/model/SettlementInfo.js +11 -2
  77. package/dist/model/SupportedToken.js +222 -0
  78. package/dist/model/SwapActivityDetail.js +30 -0
  79. package/dist/model/SwapActivitySigners.js +110 -0
  80. package/dist/model/SwapQuote.js +17 -4
  81. package/dist/model/SwapSingingStatus.js +71 -0
  82. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  83. package/dist/model/TokenListingEventData.js +8 -3
  84. package/dist/model/TokensEventData.js +8 -3
  85. package/dist/model/TopUpAddress.js +230 -0
  86. package/dist/model/TransactionCoboCategory.js +20 -0
  87. package/dist/model/TransactionDestination.js +14 -38
  88. package/dist/model/TransactionDestinationType.js +5 -0
  89. package/dist/model/TransactionEvmCalldataInfo.js +1 -1
  90. package/dist/model/TransactionFILFee.js +229 -0
  91. package/dist/model/TransactionFee.js +107 -9
  92. package/dist/model/TransactionRequestFILFee.js +186 -0
  93. package/dist/model/TransactionRequestFee.js +89 -9
  94. package/dist/model/TransactionRequestSOLFee.js +168 -0
  95. package/dist/model/TransactionSOLFee.js +229 -0
  96. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  97. package/dist/model/TransactionTransferToWalletDestination.js +2 -2
  98. package/dist/model/TransactionWebhookEventData.js +8 -3
  99. package/dist/model/TransferDestination.js +44 -16
  100. package/dist/model/TransferDestinationType.js +5 -0
  101. package/dist/model/UpdateMerchantByIdRequest.js +13 -0
  102. package/dist/model/UpdateRefundByIdRequest.js +110 -0
  103. package/dist/model/UpdateTopUpAddress.js +141 -0
  104. package/dist/model/WalletInfoEventData.js +8 -3
  105. package/dist/model/WebhookEvent.js +2 -2
  106. package/dist/model/WebhookEventData.js +83 -13
  107. package/dist/model/WebhookEventDataType.js +7 -2
  108. package/dist/model/WebhookEventLog.js +2 -2
  109. package/dist/model/WebhookEventType.js +15 -0
  110. package/docs/Account.md +14 -0
  111. package/docs/AcquiringType.md +12 -0
  112. package/docs/AddressTransferDestination.md +2 -2
  113. package/docs/AddressesEventData.md +3 -1
  114. package/docs/AppWorkflow.md +3 -3
  115. package/docs/AppWorkflowField.md +2 -2
  116. package/docs/AppWorkflowsApi.md +12 -12
  117. package/docs/ApprovalRequest.md +2 -2
  118. package/docs/ApprovalRequestDetail.md +1 -1
  119. package/docs/ApprovalUser.md +2 -2
  120. package/docs/BalanceUpdateInfo.md +13 -0
  121. package/docs/BalanceUpdateInfoEventData.md +47 -0
  122. package/docs/BankAccount.md +2 -2
  123. package/docs/ChainInfo.md +1 -1
  124. package/docs/ChainsEventData.md +3 -1
  125. package/docs/CreateApprovalRequest201Response.md +1 -1
  126. package/docs/CreateMerchantRequest.md +1 -0
  127. package/docs/CreatePaymentOrderRequest.md +2 -1
  128. package/docs/CreateRefundRequest.md +5 -2
  129. package/docs/CreateSettlement.md +7 -6
  130. package/docs/CreateSettlementRequestRequest.md +3 -0
  131. package/docs/CryptoAddress.md +14 -0
  132. package/docs/CustodialTransferDestination.md +11 -0
  133. package/docs/EstimateContractCallFeeParams.md +1 -1
  134. package/docs/EstimateFeeParams.md +1 -1
  135. package/docs/EstimatedFILFee.md +13 -0
  136. package/docs/EstimatedFILFeeSlow.md +12 -0
  137. package/docs/EstimatedFee.md +3 -3
  138. package/docs/EstimatedSOLFee.md +13 -0
  139. package/docs/EstimatedSOLFeeSlow.md +12 -0
  140. package/docs/ExchangePermissionToken201Response.md +12 -0
  141. package/docs/ExchangePermissionTokenRequest.md +9 -0
  142. package/docs/FILBase.md +9 -0
  143. package/docs/FILPrice.md +11 -0
  144. package/docs/FeeStationApi.md +1 -1
  145. package/docs/FeeType.md +4 -0
  146. package/docs/GetExchangeRate200Response.md +1 -1
  147. package/docs/GraphQLError.md +11 -0
  148. package/docs/GraphQLErrorLocationsInner.md +10 -0
  149. package/docs/GraphQLRequest.md +11 -0
  150. package/docs/GraphQLResponse.md +10 -0
  151. package/docs/ListTopUpPayers200Response.md +10 -0
  152. package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
  153. package/docs/MPCVaultEventData.md +3 -1
  154. package/docs/Merchant.md +3 -2
  155. package/docs/OAuthApi.md +102 -0
  156. package/docs/Order.md +6 -5
  157. package/docs/OrganizationsApi.md +55 -0
  158. package/docs/PayerAccount.md +14 -0
  159. package/docs/PaymentApi.md +247 -29
  160. package/docs/PaymentOrderEventData.md +9 -6
  161. package/docs/PaymentRefundEventData.md +10 -5
  162. package/docs/PaymentSettlementEvent.md +6 -4
  163. package/docs/PayoutChannel.md +12 -0
  164. package/docs/PolicyActionContent.md +4 -4
  165. package/docs/PolicyCondition.md +2 -2
  166. package/docs/RefreshPermissionTokenRequest.md +9 -0
  167. package/docs/Refund.md +7 -4
  168. package/docs/RefundStatus.md +2 -0
  169. package/docs/RequestApproval.md +4 -4
  170. package/docs/RevokeApprovalRequest201Response.md +1 -1
  171. package/docs/RevokeApprovalRequestRequest.md +1 -1
  172. package/docs/SOLBase.md +10 -0
  173. package/docs/SOLComputeUnit.md +10 -0
  174. package/docs/Settlement.md +3 -3
  175. package/docs/SettlementDetail.md +8 -6
  176. package/docs/SettlementInfo.md +3 -2
  177. package/docs/SupportedToken.md +17 -0
  178. package/docs/SwapActivityDetail.md +1 -0
  179. package/docs/SwapActivitySigners.md +11 -0
  180. package/docs/SwapQuote.md +3 -2
  181. package/docs/SwapSingingStatus.md +16 -0
  182. package/docs/TSSRequestWebhookEventData.md +3 -1
  183. package/docs/TokenListingEventData.md +3 -1
  184. package/docs/TokensEventData.md +3 -1
  185. package/docs/TopUpAddress.md +18 -0
  186. package/docs/TransactionCoboCategory.md +8 -0
  187. package/docs/TransactionDestination.md +2 -2
  188. package/docs/TransactionDestinationType.md +2 -0
  189. package/docs/TransactionEvmCalldataInfo.md +1 -1
  190. package/docs/TransactionFILFee.md +16 -0
  191. package/docs/TransactionFee.md +8 -1
  192. package/docs/TransactionRequestFILFee.md +13 -0
  193. package/docs/TransactionRequestFee.md +5 -1
  194. package/docs/TransactionRequestSOLFee.md +12 -0
  195. package/docs/TransactionSOLFee.md +16 -0
  196. package/docs/TransactionTransferToAddressDestination.md +2 -2
  197. package/docs/TransactionTransferToWalletDestination.md +1 -1
  198. package/docs/TransactionWebhookEventData.md +3 -1
  199. package/docs/TransactionsApi.md +1 -1
  200. package/docs/TransferDestination.md +3 -3
  201. package/docs/TransferDestinationType.md +2 -0
  202. package/docs/UpdateMerchantByIdRequest.md +1 -0
  203. package/docs/UpdateRefundByIdRequest.md +9 -0
  204. package/docs/UpdateTopUpAddress.md +11 -0
  205. package/docs/WalletInfoEventData.md +3 -1
  206. package/docs/WalletsApi.md +6 -4
  207. package/docs/WebhookEvent.md +1 -1
  208. package/docs/WebhookEventData.md +14 -5
  209. package/docs/WebhookEventDataType.md +3 -1
  210. package/docs/WebhookEventLog.md +1 -1
  211. package/docs/WebhookEventType.md +6 -0
  212. package/package.json +1 -1
  213. package/docs/CreateBankAccountRequest.md +0 -9
  214. package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
@@ -0,0 +1,186 @@
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 _FILBase = _interopRequireDefault(require("./FILBase"));
9
+ var _FILPrice = _interopRequireDefault(require("./FILPrice"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The EstimatedFILFeeSlow model module.
31
+ * @module model/EstimatedFILFeeSlow
32
+ */
33
+ var EstimatedFILFeeSlow = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>EstimatedFILFeeSlow</code>.
36
+ * @alias module:model/EstimatedFILFeeSlow
37
+ * @implements module:model/FILPrice
38
+ * @implements module:model/FILBase
39
+ * @param gas_premium {String} An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee.
40
+ * @param gas_fee_cap {String} The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas.
41
+ * @param gas_limit {String} This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources.
42
+ * @param gas_base {String} This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time.
43
+ */
44
+ function EstimatedFILFeeSlow(gas_premium, gas_fee_cap, gas_limit, gas_base) {
45
+ _classCallCheck(this, EstimatedFILFeeSlow);
46
+ _FILPrice["default"].initialize(this);
47
+ _FILBase["default"].initialize(this);
48
+ EstimatedFILFeeSlow.initialize(this, gas_premium, gas_fee_cap, gas_limit, gas_base);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(EstimatedFILFeeSlow, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, gas_premium, gas_fee_cap, gas_limit, gas_base) {
59
+ obj['gas_premium'] = gas_premium;
60
+ obj['gas_fee_cap'] = gas_fee_cap;
61
+ obj['gas_limit'] = gas_limit;
62
+ obj['gas_base'] = gas_base;
63
+ }
64
+
65
+ /**
66
+ * Constructs a <code>EstimatedFILFeeSlow</code> from a plain JavaScript object, optionally creating a new instance.
67
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @param {module:model/EstimatedFILFeeSlow} obj Optional instance to populate.
70
+ * @return {module:model/EstimatedFILFeeSlow} The populated <code>EstimatedFILFeeSlow</code> instance.
71
+ */
72
+ }, {
73
+ key: "constructFromObject",
74
+ value: function constructFromObject(data, obj) {
75
+ if (data) {
76
+ obj = obj || new EstimatedFILFeeSlow();
77
+ _FILPrice["default"].constructFromObject(data, obj);
78
+ _FILBase["default"].constructFromObject(data, obj);
79
+ if (data.hasOwnProperty('gas_premium')) {
80
+ obj['gas_premium'] = _ApiClient["default"].convertToType(data['gas_premium'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('gas_fee_cap')) {
83
+ obj['gas_fee_cap'] = _ApiClient["default"].convertToType(data['gas_fee_cap'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('gas_limit')) {
86
+ obj['gas_limit'] = _ApiClient["default"].convertToType(data['gas_limit'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('gas_base')) {
89
+ obj['gas_base'] = _ApiClient["default"].convertToType(data['gas_base'], 'String');
90
+ }
91
+ }
92
+ return obj;
93
+ }
94
+
95
+ /**
96
+ * Validates the JSON data with respect to <code>EstimatedFILFeeSlow</code>.
97
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
98
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EstimatedFILFeeSlow</code>.
99
+ */
100
+ }, {
101
+ key: "validateJSON",
102
+ value: function validateJSON(data) {
103
+ // check to make sure all required properties are present in the JSON string
104
+ var _iterator = _createForOfIteratorHelper(EstimatedFILFeeSlow.RequiredProperties),
105
+ _step;
106
+ try {
107
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
108
+ var property = _step.value;
109
+ if (!data.hasOwnProperty(property)) {
110
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
111
+ }
112
+ }
113
+ // ensure the json data is a string
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ if (data['gas_premium'] && !(typeof data['gas_premium'] === 'string' || data['gas_premium'] instanceof String)) {
120
+ throw new Error("Expected the field `gas_premium` to be a primitive type in the JSON string but got " + data['gas_premium']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['gas_fee_cap'] && !(typeof data['gas_fee_cap'] === 'string' || data['gas_fee_cap'] instanceof String)) {
124
+ throw new Error("Expected the field `gas_fee_cap` to be a primitive type in the JSON string but got " + data['gas_fee_cap']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['gas_limit'] && !(typeof data['gas_limit'] === 'string' || data['gas_limit'] instanceof String)) {
128
+ throw new Error("Expected the field `gas_limit` to be a primitive type in the JSON string but got " + data['gas_limit']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['gas_base'] && !(typeof data['gas_base'] === 'string' || data['gas_base'] instanceof String)) {
132
+ throw new Error("Expected the field `gas_base` to be a primitive type in the JSON string but got " + data['gas_base']);
133
+ }
134
+ return true;
135
+ }
136
+ }]);
137
+ }();
138
+ EstimatedFILFeeSlow.RequiredProperties = ["gas_premium", "gas_fee_cap", "gas_limit", "gas_base"];
139
+
140
+ /**
141
+ * An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee.
142
+ * @member {String} gas_premium
143
+ */
144
+ EstimatedFILFeeSlow.prototype['gas_premium'] = undefined;
145
+
146
+ /**
147
+ * The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas.
148
+ * @member {String} gas_fee_cap
149
+ */
150
+ EstimatedFILFeeSlow.prototype['gas_fee_cap'] = undefined;
151
+
152
+ /**
153
+ * This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources.
154
+ * @member {String} gas_limit
155
+ */
156
+ EstimatedFILFeeSlow.prototype['gas_limit'] = undefined;
157
+
158
+ /**
159
+ * This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time.
160
+ * @member {String} gas_base
161
+ */
162
+ EstimatedFILFeeSlow.prototype['gas_base'] = undefined;
163
+
164
+ // Implement FILPrice interface:
165
+ /**
166
+ * An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee.
167
+ * @member {String} gas_premium
168
+ */
169
+ _FILPrice["default"].prototype['gas_premium'] = undefined;
170
+ /**
171
+ * The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas.
172
+ * @member {String} gas_fee_cap
173
+ */
174
+ _FILPrice["default"].prototype['gas_fee_cap'] = undefined;
175
+ /**
176
+ * This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources.
177
+ * @member {String} gas_limit
178
+ */
179
+ _FILPrice["default"].prototype['gas_limit'] = undefined;
180
+ // Implement FILBase interface:
181
+ /**
182
+ * This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time.
183
+ * @member {String} gas_base
184
+ */
185
+ _FILBase["default"].prototype['gas_base'] = undefined;
186
+ var _default = exports["default"] = EstimatedFILFeeSlow;
@@ -7,9 +7,11 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _EstimatedEvmEip1559Fee = _interopRequireDefault(require("./EstimatedEvmEip1559Fee"));
9
9
  var _EstimatedEvmLegacyFee = _interopRequireDefault(require("./EstimatedEvmLegacyFee"));
10
+ var _EstimatedFILFee = _interopRequireDefault(require("./EstimatedFILFee"));
11
+ var _EstimatedFILFeeSlow = _interopRequireDefault(require("./EstimatedFILFeeSlow"));
10
12
  var _EstimatedFixedFee = _interopRequireDefault(require("./EstimatedFixedFee"));
13
+ var _EstimatedSOLFee = _interopRequireDefault(require("./EstimatedSOLFee"));
11
14
  var _EstimatedUtxoFee = _interopRequireDefault(require("./EstimatedUtxoFee"));
12
- var _EstimatedUtxoFeeSlow = _interopRequireDefault(require("./EstimatedUtxoFeeSlow"));
13
15
  var _FeeType = _interopRequireDefault(require("./FeeType"));
14
16
  var _EstimatedFee;
15
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -37,7 +39,7 @@ var EstimatedFee = /*#__PURE__*/function () {
37
39
  /**
38
40
  * Constructs a new <code>EstimatedFee</code>.
39
41
  * @alias module:model/EstimatedFee
40
- * @param {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFixedFee|module:model/EstimatedUtxoFee)} instance The actual instance to initialize EstimatedFee.
42
+ * @param {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFILFee|module:model/EstimatedFixedFee|module:model/EstimatedSOLFee|module:model/EstimatedUtxoFee)} instance The actual instance to initialize EstimatedFee.
41
43
  */
42
44
  function EstimatedFee() {
43
45
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -66,10 +68,18 @@ var EstimatedFee = /*#__PURE__*/function () {
66
68
  this.actualInstance = _EstimatedEvmLegacyFee["default"].constructFromObject(instance);
67
69
  match++;
68
70
  break;
71
+ case "FIL":
72
+ this.actualInstance = _EstimatedFILFee["default"].constructFromObject(instance);
73
+ match++;
74
+ break;
69
75
  case "Fixed":
70
76
  this.actualInstance = _EstimatedFixedFee["default"].constructFromObject(instance);
71
77
  match++;
72
78
  break;
79
+ case "SOL":
80
+ this.actualInstance = _EstimatedSOLFee["default"].constructFromObject(instance);
81
+ match++;
82
+ break;
73
83
  case "UTXO":
74
84
  this.actualInstance = _EstimatedUtxoFee["default"].constructFromObject(instance);
75
85
  match++;
@@ -172,13 +182,59 @@ var EstimatedFee = /*#__PURE__*/function () {
172
182
  // json data failed to deserialize into EstimatedUtxoFee
173
183
  errorMessages.push("Failed to construct EstimatedUtxoFee: " + err);
174
184
  }
185
+ try {
186
+ if (instance instanceof _EstimatedSOLFee["default"]) {
187
+ this.actualInstance = instance;
188
+ } else if (!!_EstimatedSOLFee["default"].validateJSON && _EstimatedSOLFee["default"].validateJSON(instance)) {
189
+ // plain JS object
190
+ // create EstimatedSOLFee from JS object
191
+ this.actualInstance = _EstimatedSOLFee["default"].constructFromObject(instance);
192
+ } else {
193
+ if (_EstimatedSOLFee["default"].constructFromObject(instance)) {
194
+ if (!!_EstimatedSOLFee["default"].constructFromObject(instance).toJSON) {
195
+ if (_EstimatedSOLFee["default"].constructFromObject(instance).toJSON()) {
196
+ this.actualInstance = _EstimatedSOLFee["default"].constructFromObject(instance);
197
+ }
198
+ } else {
199
+ this.actualInstance = _EstimatedSOLFee["default"].constructFromObject(instance);
200
+ }
201
+ }
202
+ }
203
+ match++;
204
+ } catch (err) {
205
+ // json data failed to deserialize into EstimatedSOLFee
206
+ errorMessages.push("Failed to construct EstimatedSOLFee: " + err);
207
+ }
208
+ try {
209
+ if (instance instanceof _EstimatedFILFee["default"]) {
210
+ this.actualInstance = instance;
211
+ } else if (!!_EstimatedFILFee["default"].validateJSON && _EstimatedFILFee["default"].validateJSON(instance)) {
212
+ // plain JS object
213
+ // create EstimatedFILFee from JS object
214
+ this.actualInstance = _EstimatedFILFee["default"].constructFromObject(instance);
215
+ } else {
216
+ if (_EstimatedFILFee["default"].constructFromObject(instance)) {
217
+ if (!!_EstimatedFILFee["default"].constructFromObject(instance).toJSON) {
218
+ if (_EstimatedFILFee["default"].constructFromObject(instance).toJSON()) {
219
+ this.actualInstance = _EstimatedFILFee["default"].constructFromObject(instance);
220
+ }
221
+ } else {
222
+ this.actualInstance = _EstimatedFILFee["default"].constructFromObject(instance);
223
+ }
224
+ }
225
+ }
226
+ match++;
227
+ } catch (err) {
228
+ // json data failed to deserialize into EstimatedFILFee
229
+ errorMessages.push("Failed to construct EstimatedFILFee: " + err);
230
+ }
175
231
 
176
232
  // if (match > 1) {
177
- // throw new Error("Multiple matches found constructing `EstimatedFee` with oneOf schemas EstimatedEvmEip1559Fee, EstimatedEvmLegacyFee, EstimatedFixedFee, EstimatedUtxoFee. Input: " + JSON.stringify(instance));
233
+ // throw new Error("Multiple matches found constructing `EstimatedFee` with oneOf schemas EstimatedEvmEip1559Fee, EstimatedEvmLegacyFee, EstimatedFILFee, EstimatedFixedFee, EstimatedSOLFee, EstimatedUtxoFee. Input: " + JSON.stringify(instance));
178
234
  // } else
179
235
  if (match === 0) {
180
236
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
181
- // throw new Error("No match found constructing `EstimatedFee` with oneOf schemas EstimatedEvmEip1559Fee, EstimatedEvmLegacyFee, EstimatedFixedFee, EstimatedUtxoFee. Details: " +
237
+ // throw new Error("No match found constructing `EstimatedFee` with oneOf schemas EstimatedEvmEip1559Fee, EstimatedEvmLegacyFee, EstimatedFILFee, EstimatedFixedFee, EstimatedSOLFee, EstimatedUtxoFee. Details: " +
182
238
  // errorMessages.join(", "));
183
239
  return;
184
240
  } else {// only 1 match
@@ -197,16 +253,16 @@ var EstimatedFee = /*#__PURE__*/function () {
197
253
  key: "getActualInstance",
198
254
  value:
199
255
  /**
200
- * Gets the actual instance, which can be <code>EstimatedEvmEip1559Fee</code>, <code>EstimatedEvmLegacyFee</code>, <code>EstimatedFixedFee</code>, <code>EstimatedUtxoFee</code>.
201
- * @return {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFixedFee|module:model/EstimatedUtxoFee)} The actual instance.
256
+ * Gets the actual instance, which can be <code>EstimatedEvmEip1559Fee</code>, <code>EstimatedEvmLegacyFee</code>, <code>EstimatedFILFee</code>, <code>EstimatedFixedFee</code>, <code>EstimatedSOLFee</code>, <code>EstimatedUtxoFee</code>.
257
+ * @return {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFILFee|module:model/EstimatedFixedFee|module:model/EstimatedSOLFee|module:model/EstimatedUtxoFee)} The actual instance.
202
258
  */
203
259
  function getActualInstance() {
204
260
  return this.actualInstance;
205
261
  }
206
262
 
207
263
  /**
208
- * Sets the actual instance, which can be <code>EstimatedEvmEip1559Fee</code>, <code>EstimatedEvmLegacyFee</code>, <code>EstimatedFixedFee</code>, <code>EstimatedUtxoFee</code>.
209
- * @param {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFixedFee|module:model/EstimatedUtxoFee)} obj The actual instance.
264
+ * Sets the actual instance, which can be <code>EstimatedEvmEip1559Fee</code>, <code>EstimatedEvmLegacyFee</code>, <code>EstimatedFILFee</code>, <code>EstimatedFixedFee</code>, <code>EstimatedSOLFee</code>, <code>EstimatedUtxoFee</code>.
265
+ * @param {(module:model/EstimatedEvmEip1559Fee|module:model/EstimatedEvmLegacyFee|module:model/EstimatedFILFee|module:model/EstimatedFixedFee|module:model/EstimatedSOLFee|module:model/EstimatedUtxoFee)} obj The actual instance.
210
266
  */
211
267
  }, {
212
268
  key: "setActualInstance",
@@ -253,18 +309,18 @@ EstimatedFee.prototype['is_loop'] = undefined;
253
309
  EstimatedFee.prototype['fee_amount'] = undefined;
254
310
 
255
311
  /**
256
- * @member {module:model/EstimatedUtxoFeeSlow} slow
312
+ * @member {module:model/EstimatedFILFeeSlow} slow
257
313
  */
258
314
  EstimatedFee.prototype['slow'] = undefined;
259
315
 
260
316
  /**
261
- * @member {module:model/EstimatedUtxoFeeSlow} recommended
317
+ * @member {module:model/EstimatedFILFeeSlow} recommended
262
318
  */
263
319
  EstimatedFee.prototype['recommended'] = undefined;
264
320
 
265
321
  /**
266
- * @member {module:model/EstimatedUtxoFeeSlow} fast
322
+ * @member {module:model/EstimatedFILFeeSlow} fast
267
323
  */
268
324
  EstimatedFee.prototype['fast'] = undefined;
269
- EstimatedFee.OneOf = ["EstimatedEvmEip1559Fee", "EstimatedEvmLegacyFee", "EstimatedFixedFee", "EstimatedUtxoFee"];
325
+ EstimatedFee.OneOf = ["EstimatedEvmEip1559Fee", "EstimatedEvmLegacyFee", "EstimatedFILFee", "EstimatedFixedFee", "EstimatedSOLFee", "EstimatedUtxoFee"];
270
326
  var _default = exports["default"] = EstimatedFee;
@@ -0,0 +1,170 @@
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 _EstimatedSOLFeeSlow = _interopRequireDefault(require("./EstimatedSOLFeeSlow"));
9
+ var _FeeType = _interopRequireDefault(require("./FeeType"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The EstimatedSOLFee model module.
31
+ * @module model/EstimatedSOLFee
32
+ */
33
+ var EstimatedSOLFee = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>EstimatedSOLFee</code>.
36
+ * The estimated transaction fee based on the sol fee model.
37
+ * @alias module:model/EstimatedSOLFee
38
+ * @param fee_type {module:model/FeeType}
39
+ * @param token_id {String} The token ID of the transaction fee.
40
+ * @param recommended {module:model/EstimatedSOLFeeSlow}
41
+ */
42
+ function EstimatedSOLFee(fee_type, token_id, recommended) {
43
+ _classCallCheck(this, EstimatedSOLFee);
44
+ EstimatedSOLFee.initialize(this, fee_type, token_id, recommended);
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(EstimatedSOLFee, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, fee_type, token_id, recommended) {
55
+ obj['fee_type'] = fee_type;
56
+ obj['token_id'] = token_id;
57
+ obj['recommended'] = recommended;
58
+ }
59
+
60
+ /**
61
+ * Constructs a <code>EstimatedSOLFee</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
64
+ * @param {module:model/EstimatedSOLFee} obj Optional instance to populate.
65
+ * @return {module:model/EstimatedSOLFee} The populated <code>EstimatedSOLFee</code> instance.
66
+ */
67
+ }, {
68
+ key: "constructFromObject",
69
+ value: function constructFromObject(data, obj) {
70
+ if (data) {
71
+ obj = obj || new EstimatedSOLFee();
72
+ if (data.hasOwnProperty('fee_type')) {
73
+ obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
74
+ }
75
+ if (data.hasOwnProperty('token_id')) {
76
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('slow')) {
79
+ obj['slow'] = _EstimatedSOLFeeSlow["default"].constructFromObject(data['slow']);
80
+ }
81
+ if (data.hasOwnProperty('recommended')) {
82
+ obj['recommended'] = _EstimatedSOLFeeSlow["default"].constructFromObject(data['recommended']);
83
+ }
84
+ if (data.hasOwnProperty('fast')) {
85
+ obj['fast'] = _EstimatedSOLFeeSlow["default"].constructFromObject(data['fast']);
86
+ }
87
+ }
88
+ return obj;
89
+ }
90
+
91
+ /**
92
+ * Validates the JSON data with respect to <code>EstimatedSOLFee</code>.
93
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
94
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EstimatedSOLFee</code>.
95
+ */
96
+ }, {
97
+ key: "validateJSON",
98
+ value: function validateJSON(data) {
99
+ // check to make sure all required properties are present in the JSON string
100
+ var _iterator = _createForOfIteratorHelper(EstimatedSOLFee.RequiredProperties),
101
+ _step;
102
+ try {
103
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
104
+ var property = _step.value;
105
+ if (!data.hasOwnProperty(property)) {
106
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
107
+ }
108
+ }
109
+ // ensure the json data is a string
110
+ } catch (err) {
111
+ _iterator.e(err);
112
+ } finally {
113
+ _iterator.f();
114
+ }
115
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
116
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
117
+ }
118
+ // validate the optional field `slow`
119
+ if (data['slow']) {
120
+ // data not null
121
+ if (!!_EstimatedSOLFeeSlow["default"].validateJSON) {
122
+ _EstimatedSOLFeeSlow["default"].validateJSON(data['slow']);
123
+ }
124
+ }
125
+ // validate the optional field `recommended`
126
+ if (data['recommended']) {
127
+ // data not null
128
+ if (!!_EstimatedSOLFeeSlow["default"].validateJSON) {
129
+ _EstimatedSOLFeeSlow["default"].validateJSON(data['recommended']);
130
+ }
131
+ }
132
+ // validate the optional field `fast`
133
+ if (data['fast']) {
134
+ // data not null
135
+ if (!!_EstimatedSOLFeeSlow["default"].validateJSON) {
136
+ _EstimatedSOLFeeSlow["default"].validateJSON(data['fast']);
137
+ }
138
+ }
139
+ return true;
140
+ }
141
+ }]);
142
+ }();
143
+ EstimatedSOLFee.RequiredProperties = ["fee_type", "token_id", "recommended"];
144
+
145
+ /**
146
+ * @member {module:model/FeeType} fee_type
147
+ */
148
+ EstimatedSOLFee.prototype['fee_type'] = undefined;
149
+
150
+ /**
151
+ * The token ID of the transaction fee.
152
+ * @member {String} token_id
153
+ */
154
+ EstimatedSOLFee.prototype['token_id'] = undefined;
155
+
156
+ /**
157
+ * @member {module:model/EstimatedSOLFeeSlow} slow
158
+ */
159
+ EstimatedSOLFee.prototype['slow'] = undefined;
160
+
161
+ /**
162
+ * @member {module:model/EstimatedSOLFeeSlow} recommended
163
+ */
164
+ EstimatedSOLFee.prototype['recommended'] = undefined;
165
+
166
+ /**
167
+ * @member {module:model/EstimatedSOLFeeSlow} fast
168
+ */
169
+ EstimatedSOLFee.prototype['fast'] = undefined;
170
+ var _default = exports["default"] = EstimatedSOLFee;