@cobo/cobo-waas2 1.9.0 → 1.11.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 (148) hide show
  1. package/README.md +47 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +1 -1
  4. package/dist/api/DevelopersApi.js +7 -7
  5. package/dist/api/DevelopersWebhooksApi.js +8 -8
  6. package/dist/api/StakingsApi.js +412 -18
  7. package/dist/api/SwapsApi.js +360 -0
  8. package/dist/api/TransactionsApi.js +18 -18
  9. package/dist/api/TravelRuleApi.js +4 -4
  10. package/dist/api/WalletsApi.js +19 -19
  11. package/dist/api/WalletsExchangeWalletApi.js +1 -1
  12. package/dist/api/WalletsMPCWalletsApi.js +19 -19
  13. package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
  14. package/dist/index.js +213 -3
  15. package/dist/model/AddressesEventData.js +4 -4
  16. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  17. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  18. package/dist/model/BabylonAirdropPop.js +186 -0
  19. package/dist/model/BabylonAirdropRegistration.js +172 -0
  20. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  21. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  22. package/dist/model/BabylonRegistrationStatus.js +66 -0
  23. package/dist/model/BabylonStakingRegistration.js +185 -0
  24. package/dist/model/ChainInfo.js +2 -2
  25. package/dist/model/ContractCallDestination.js +42 -8
  26. package/dist/model/ContractCallDestinationType.js +5 -0
  27. package/dist/model/ContractCallSource.js +6 -0
  28. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  29. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  30. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  31. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  32. package/dist/model/CreateSwapActivityRequest.js +153 -0
  33. package/dist/model/CreateSwapQuote201Response.js +264 -0
  34. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  35. package/dist/model/EstimatedEvmEip1559FeeSlow.js +23 -0
  36. package/dist/model/EstimatedEvmLegacyFeeSlow.js +23 -0
  37. package/dist/model/ExtendedTokenInfo.js +3 -3
  38. package/dist/model/FeeReserved.js +87 -0
  39. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  40. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  41. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  42. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  43. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  44. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  45. package/dist/model/ListSwapActivities200Response.js +123 -0
  46. package/dist/model/MaxFeeAmount.js +1 -1
  47. package/dist/model/MessageSignSource.js +6 -0
  48. package/dist/model/MpcContractCallSource.js +16 -0
  49. package/dist/model/MpcMessageSignSource.js +16 -0
  50. package/dist/model/MpcSigningGroup.js +27 -4
  51. package/dist/model/MpcTransferSource.js +16 -0
  52. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  53. package/dist/model/SolContractCallAccount.js +133 -0
  54. package/dist/model/SolContractCallDestination.js +139 -0
  55. package/dist/model/SolContractCallInstruction.js +158 -0
  56. package/dist/model/StakingPoolId.js +30 -0
  57. package/dist/model/StakingPoolType.js +15 -0
  58. package/dist/model/SwapQuote.js +203 -0
  59. package/dist/model/TokenInfo.js +2 -2
  60. package/dist/model/TransactionDestination.js +45 -11
  61. package/dist/model/TransactionDestinationType.js +5 -0
  62. package/dist/model/TransactionFee.js +1 -1
  63. package/dist/model/TransactionFixedFee.js +2 -2
  64. package/dist/model/TransactionRawTxInfo.js +16 -0
  65. package/dist/model/TransactionRbfSource.js +6 -0
  66. package/dist/model/TransactionRequestFee.js +1 -1
  67. package/dist/model/TransactionRequestFixedFee.js +2 -2
  68. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  69. package/dist/model/TransactionSolContractAccount.js +106 -0
  70. package/dist/model/TransactionSolContractDestination.js +137 -0
  71. package/dist/model/TransactionSolContractInstruction.js +134 -0
  72. package/dist/model/TransactionTokeApproval.js +3 -3
  73. package/dist/model/TransactionUtxoChange.js +101 -0
  74. package/dist/model/TransferSource.js +6 -0
  75. package/dist/model/WebhookEventData.js +2 -2
  76. package/docs/AddressBooksApi.md +1 -1
  77. package/docs/AddressesEventData.md +1 -1
  78. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  79. package/docs/BabylonAirdropPop.md +14 -0
  80. package/docs/BabylonAirdropRegistration.md +16 -0
  81. package/docs/BabylonEligibleAirdrop.md +14 -0
  82. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  83. package/docs/BabylonRegistrationStatus.md +14 -0
  84. package/docs/BabylonStakingRegistration.md +17 -0
  85. package/docs/ChainInfo.md +1 -1
  86. package/docs/ContractCallDestination.md +1 -0
  87. package/docs/ContractCallDestinationType.md +2 -0
  88. package/docs/ContractCallSource.md +1 -0
  89. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  90. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  91. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  92. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  93. package/docs/CreateSwapActivityRequest.md +12 -0
  94. package/docs/CreateSwapQuote201Response.md +17 -0
  95. package/docs/CreateSwapQuoteRequest.md +13 -0
  96. package/docs/DevelopersApi.md +5 -5
  97. package/docs/DevelopersWebhooksApi.md +8 -8
  98. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -0
  99. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -0
  100. package/docs/ExtendedTokenInfo.md +1 -1
  101. package/docs/FeeReserved.md +9 -0
  102. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  103. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  104. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  105. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  106. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  107. package/docs/ListEnableTokenPairs200Response.md +10 -0
  108. package/docs/ListSwapActivities200Response.md +10 -0
  109. package/docs/MaxFeeAmount.md +1 -1
  110. package/docs/MessageSignSource.md +1 -0
  111. package/docs/MpcContractCallSource.md +1 -0
  112. package/docs/MpcMessageSignSource.md +1 -0
  113. package/docs/MpcSigningGroup.md +1 -1
  114. package/docs/MpcTransferSource.md +1 -0
  115. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  116. package/docs/SolContractCallAccount.md +11 -0
  117. package/docs/SolContractCallDestination.md +10 -0
  118. package/docs/SolContractCallInstruction.md +11 -0
  119. package/docs/StakingPoolId.md +12 -0
  120. package/docs/StakingPoolType.md +6 -0
  121. package/docs/StakingsApi.md +461 -13
  122. package/docs/SwapQuote.md +16 -0
  123. package/docs/SwapsApi.md +348 -0
  124. package/docs/TokenInfo.md +1 -1
  125. package/docs/TransactionDestination.md +1 -0
  126. package/docs/TransactionDestinationType.md +2 -0
  127. package/docs/TransactionFee.md +1 -1
  128. package/docs/TransactionFixedFee.md +1 -1
  129. package/docs/TransactionRawTxInfo.md +1 -0
  130. package/docs/TransactionRbfSource.md +1 -0
  131. package/docs/TransactionRequestFee.md +1 -1
  132. package/docs/TransactionRequestFixedFee.md +1 -1
  133. package/docs/TransactionRequestUtxoFee.md +1 -1
  134. package/docs/TransactionSolContractAccount.md +11 -0
  135. package/docs/TransactionSolContractDestination.md +10 -0
  136. package/docs/TransactionSolContractInstruction.md +11 -0
  137. package/docs/TransactionTokeApproval.md +1 -1
  138. package/docs/TransactionUtxoChange.md +10 -0
  139. package/docs/TransactionsApi.md +16 -16
  140. package/docs/TransferSource.md +1 -0
  141. package/docs/TravelRuleApi.md +4 -4
  142. package/docs/WalletsApi.md +16 -16
  143. package/docs/WalletsExchangeWalletApi.md +1 -1
  144. package/docs/WalletsMPCWalletsApi.md +19 -19
  145. package/docs/WalletsSmartContractWalletsApi.md +1 -1
  146. package/docs/WebhookEventData.md +1 -1
  147. package/package.json +2 -2
  148. package/docs/SwapSummary.md +0 -10
@@ -50,6 +50,21 @@ var StakingPoolType = exports["default"] = /*#__PURE__*/function () {
50
50
  * @const
51
51
  */
52
52
  _defineProperty(this, "SkyFarm", "SkyFarm");
53
+ /**
54
+ * value: "BitHive"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "BitHive", "BitHive");
58
+ /**
59
+ * value: "BERABeacon"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "BERABeacon", "BERABeacon");
63
+ /**
64
+ * value: "BeraChainBGT"
65
+ * @const
66
+ */
67
+ _defineProperty(this, "BeraChainBGT", "BeraChainBGT");
53
68
  /**
54
69
  * value: "unknown_default_open_api"
55
70
  * @const
@@ -0,0 +1,203 @@
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The SwapQuote model module.
29
+ * @module model/SwapQuote
30
+ */
31
+ var SwapQuote = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>SwapQuote</code>.
34
+ * @alias module:model/SwapQuote
35
+ * @param pay_amount {String} The amount of tokens to pay.
36
+ * @param receive_amount {String} The amount of tokens to receive.
37
+ * @param fee_amount {String} The amount of tokens to pay for fee.
38
+ * @param quote_expired_timestamp {Number} The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
39
+ */
40
+ function SwapQuote(pay_amount, receive_amount, fee_amount, quote_expired_timestamp) {
41
+ _classCallCheck(this, SwapQuote);
42
+ SwapQuote.initialize(this, pay_amount, receive_amount, fee_amount, quote_expired_timestamp);
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(SwapQuote, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, pay_amount, receive_amount, fee_amount, quote_expired_timestamp) {
53
+ obj['pay_amount'] = pay_amount;
54
+ obj['receive_amount'] = receive_amount;
55
+ obj['fee_amount'] = fee_amount;
56
+ obj['quote_expired_timestamp'] = quote_expired_timestamp;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>SwapQuote</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/SwapQuote} obj Optional instance to populate.
64
+ * @return {module:model/SwapQuote} The populated <code>SwapQuote</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new SwapQuote();
71
+ if (data.hasOwnProperty('pay_amount')) {
72
+ obj['pay_amount'] = _ApiClient["default"].convertToType(data['pay_amount'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('receive_amount')) {
75
+ obj['receive_amount'] = _ApiClient["default"].convertToType(data['receive_amount'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('fee_amount')) {
78
+ obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('min_pay_amount')) {
81
+ obj['min_pay_amount'] = _ApiClient["default"].convertToType(data['min_pay_amount'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('max_pay_amount')) {
84
+ obj['max_pay_amount'] = _ApiClient["default"].convertToType(data['max_pay_amount'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('min_receive_amount')) {
87
+ obj['min_receive_amount'] = _ApiClient["default"].convertToType(data['min_receive_amount'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('max_receive_amount')) {
90
+ obj['max_receive_amount'] = _ApiClient["default"].convertToType(data['max_receive_amount'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('quote_expired_timestamp')) {
93
+ obj['quote_expired_timestamp'] = _ApiClient["default"].convertToType(data['quote_expired_timestamp'], 'Number');
94
+ }
95
+ }
96
+ return obj;
97
+ }
98
+
99
+ /**
100
+ * Validates the JSON data with respect to <code>SwapQuote</code>.
101
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
102
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapQuote</code>.
103
+ */
104
+ }, {
105
+ key: "validateJSON",
106
+ value: function validateJSON(data) {
107
+ // check to make sure all required properties are present in the JSON string
108
+ var _iterator = _createForOfIteratorHelper(SwapQuote.RequiredProperties),
109
+ _step;
110
+ try {
111
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
112
+ var property = _step.value;
113
+ if (!data.hasOwnProperty(property)) {
114
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
115
+ }
116
+ }
117
+ // ensure the json data is a string
118
+ } catch (err) {
119
+ _iterator.e(err);
120
+ } finally {
121
+ _iterator.f();
122
+ }
123
+ if (data['pay_amount'] && !(typeof data['pay_amount'] === 'string' || data['pay_amount'] instanceof String)) {
124
+ throw new Error("Expected the field `pay_amount` to be a primitive type in the JSON string but got " + data['pay_amount']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['receive_amount'] && !(typeof data['receive_amount'] === 'string' || data['receive_amount'] instanceof String)) {
128
+ throw new Error("Expected the field `receive_amount` to be a primitive type in the JSON string but got " + data['receive_amount']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
132
+ throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['min_pay_amount'] && !(typeof data['min_pay_amount'] === 'string' || data['min_pay_amount'] instanceof String)) {
136
+ throw new Error("Expected the field `min_pay_amount` to be a primitive type in the JSON string but got " + data['min_pay_amount']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['max_pay_amount'] && !(typeof data['max_pay_amount'] === 'string' || data['max_pay_amount'] instanceof String)) {
140
+ throw new Error("Expected the field `max_pay_amount` to be a primitive type in the JSON string but got " + data['max_pay_amount']);
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['min_receive_amount'] && !(typeof data['min_receive_amount'] === 'string' || data['min_receive_amount'] instanceof String)) {
144
+ throw new Error("Expected the field `min_receive_amount` to be a primitive type in the JSON string but got " + data['min_receive_amount']);
145
+ }
146
+ // ensure the json data is a string
147
+ if (data['max_receive_amount'] && !(typeof data['max_receive_amount'] === 'string' || data['max_receive_amount'] instanceof String)) {
148
+ throw new Error("Expected the field `max_receive_amount` to be a primitive type in the JSON string but got " + data['max_receive_amount']);
149
+ }
150
+ return true;
151
+ }
152
+ }]);
153
+ }();
154
+ SwapQuote.RequiredProperties = ["pay_amount", "receive_amount", "fee_amount", "quote_expired_timestamp"];
155
+
156
+ /**
157
+ * The amount of tokens to pay.
158
+ * @member {String} pay_amount
159
+ */
160
+ SwapQuote.prototype['pay_amount'] = undefined;
161
+
162
+ /**
163
+ * The amount of tokens to receive.
164
+ * @member {String} receive_amount
165
+ */
166
+ SwapQuote.prototype['receive_amount'] = undefined;
167
+
168
+ /**
169
+ * The amount of tokens to pay for fee.
170
+ * @member {String} fee_amount
171
+ */
172
+ SwapQuote.prototype['fee_amount'] = undefined;
173
+
174
+ /**
175
+ * The minimum amount of tokens to pay.
176
+ * @member {String} min_pay_amount
177
+ */
178
+ SwapQuote.prototype['min_pay_amount'] = undefined;
179
+
180
+ /**
181
+ * The maximum amount of tokens to pay.
182
+ * @member {String} max_pay_amount
183
+ */
184
+ SwapQuote.prototype['max_pay_amount'] = undefined;
185
+
186
+ /**
187
+ * The minimum amount of tokens to receive.
188
+ * @member {String} min_receive_amount
189
+ */
190
+ SwapQuote.prototype['min_receive_amount'] = undefined;
191
+
192
+ /**
193
+ * The maximum amount of tokens to receive.
194
+ * @member {String} max_receive_amount
195
+ */
196
+ SwapQuote.prototype['max_receive_amount'] = undefined;
197
+
198
+ /**
199
+ * The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
200
+ * @member {Number} quote_expired_timestamp
201
+ */
202
+ SwapQuote.prototype['quote_expired_timestamp'] = undefined;
203
+ var _default = exports["default"] = SwapQuote;
@@ -34,7 +34,7 @@ var TokenInfo = /*#__PURE__*/function () {
34
34
  * Constructs a new <code>TokenInfo</code>.
35
35
  * The token information.
36
36
  * @alias module:model/TokenInfo
37
- * @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
37
+ * @param token_id {String} The token ID, which is the unique identifier of a token.
38
38
  * @param chain_id {String} The ID of the chain on which the token operates.
39
39
  */
40
40
  function TokenInfo(token_id, chain_id) {
@@ -182,7 +182,7 @@ var TokenInfo = /*#__PURE__*/function () {
182
182
  TokenInfo.RequiredProperties = ["token_id", "chain_id"];
183
183
 
184
184
  /**
185
- * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
185
+ * The token ID, which is the unique identifier of a token.
186
186
  * @member {String} token_id
187
187
  */
188
188
  TokenInfo.prototype['token_id'] = undefined;
@@ -15,6 +15,8 @@ var _TransactionEvmContractDestination = _interopRequireDefault(require("./Trans
15
15
  var _TransactionMessageSignEIP191Destination = _interopRequireDefault(require("./TransactionMessageSignEIP191Destination"));
16
16
  var _TransactionMessageSignEIP712Destination = _interopRequireDefault(require("./TransactionMessageSignEIP712Destination"));
17
17
  var _TransactionRawMessageSignDestination = _interopRequireDefault(require("./TransactionRawMessageSignDestination"));
18
+ var _TransactionSolContractDestination = _interopRequireDefault(require("./TransactionSolContractDestination"));
19
+ var _TransactionSolContractInstruction = _interopRequireDefault(require("./TransactionSolContractInstruction"));
18
20
  var _TransactionTransferToAddressDestination = _interopRequireDefault(require("./TransactionTransferToAddressDestination"));
19
21
  var _TransactionTransferToAddressDestinationAccountOutput = _interopRequireDefault(require("./TransactionTransferToAddressDestinationAccountOutput"));
20
22
  var _TransactionTransferToAddressDestinationUtxoOutputsInner = _interopRequireDefault(require("./TransactionTransferToAddressDestinationUtxoOutputsInner"));
@@ -47,7 +49,7 @@ var TransactionDestination = /*#__PURE__*/function () {
47
49
  /**
48
50
  * Constructs a new <code>TransactionDestination</code>.
49
51
  * @alias module:model/TransactionDestination
50
- * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} instance The actual instance to initialize TransactionDestination.
52
+ * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionSolContractDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} instance The actual instance to initialize TransactionDestination.
51
53
  */
52
54
  function TransactionDestination() {
53
55
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -92,12 +94,16 @@ var TransactionDestination = /*#__PURE__*/function () {
92
94
  this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
93
95
  match++;
94
96
  break;
95
- case "EVM_Raw_Message_Signature":
97
+ case "ExchangeWallet":
98
+ this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
99
+ match++;
100
+ break;
101
+ case "Raw_Message_Signature":
96
102
  this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
97
103
  match++;
98
104
  break;
99
- case "ExchangeWallet":
100
- this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
105
+ case "SOL_Contract":
106
+ this.actualInstance = _TransactionSolContractDestination["default"].constructFromObject(instance);
101
107
  match++;
102
108
  break;
103
109
  default:
@@ -175,6 +181,29 @@ var TransactionDestination = /*#__PURE__*/function () {
175
181
  // json data failed to deserialize into TransactionEvmContractDestination
176
182
  errorMessages.push("Failed to construct TransactionEvmContractDestination: " + err);
177
183
  }
184
+ try {
185
+ if (instance instanceof _TransactionSolContractDestination["default"]) {
186
+ this.actualInstance = instance;
187
+ } else if (!!_TransactionSolContractDestination["default"].validateJSON && _TransactionSolContractDestination["default"].validateJSON(instance)) {
188
+ // plain JS object
189
+ // create TransactionSolContractDestination from JS object
190
+ this.actualInstance = _TransactionSolContractDestination["default"].constructFromObject(instance);
191
+ } else {
192
+ if (_TransactionSolContractDestination["default"].constructFromObject(instance)) {
193
+ if (!!_TransactionSolContractDestination["default"].constructFromObject(instance).toJSON) {
194
+ if (_TransactionSolContractDestination["default"].constructFromObject(instance).toJSON()) {
195
+ this.actualInstance = _TransactionSolContractDestination["default"].constructFromObject(instance);
196
+ }
197
+ } else {
198
+ this.actualInstance = _TransactionSolContractDestination["default"].constructFromObject(instance);
199
+ }
200
+ }
201
+ }
202
+ match++;
203
+ } catch (err) {
204
+ // json data failed to deserialize into TransactionSolContractDestination
205
+ errorMessages.push("Failed to construct TransactionSolContractDestination: " + err);
206
+ }
178
207
  try {
179
208
  if (instance instanceof _TransactionMessageSignEIP191Destination["default"]) {
180
209
  this.actualInstance = instance;
@@ -292,11 +321,11 @@ var TransactionDestination = /*#__PURE__*/function () {
292
321
  }
293
322
 
294
323
  // if (match > 1) {
295
- // throw new Error("Multiple matches found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Input: " + JSON.stringify(instance));
324
+ // throw new Error("Multiple matches found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionSolContractDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Input: " + JSON.stringify(instance));
296
325
  // } else
297
326
  if (match === 0) {
298
327
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
299
- // throw new Error("No match found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Details: " +
328
+ // throw new Error("No match found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionSolContractDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Details: " +
300
329
  // errorMessages.join(", "));
301
330
  return;
302
331
  } else {// only 1 match
@@ -315,16 +344,16 @@ var TransactionDestination = /*#__PURE__*/function () {
315
344
  key: "getActualInstance",
316
345
  value:
317
346
  /**
318
- * Gets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
319
- * @return {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} The actual instance.
347
+ * Gets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionSolContractDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
348
+ * @return {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionSolContractDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} The actual instance.
320
349
  */
321
350
  function getActualInstance() {
322
351
  return this.actualInstance;
323
352
  }
324
353
 
325
354
  /**
326
- * Sets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
327
- * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} obj The actual instance.
355
+ * Sets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionSolContractDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
356
+ * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionSolContractDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} obj The actual instance.
328
357
  */
329
358
  }, {
330
359
  key: "setActualInstance",
@@ -426,6 +455,11 @@ TransactionDestination.prototype['calldata'] = undefined;
426
455
  */
427
456
  TransactionDestination.prototype['calldata_info'] = undefined;
428
457
 
458
+ /**
459
+ * @member {Array.<module:model/TransactionSolContractInstruction>} instructions
460
+ */
461
+ TransactionDestination.prototype['instructions'] = undefined;
462
+
429
463
  /**
430
464
  * The raw data of the message to be signed, encoded in Base64 format.
431
465
  * @member {String} message
@@ -464,5 +498,5 @@ TransactionDestination.prototype['memo'] = undefined;
464
498
  * @member {module:model/TransactionDepositToAddressDestinationTxInfo} tx_info
465
499
  */
466
500
  TransactionDestination.prototype['tx_info'] = undefined;
467
- TransactionDestination.OneOf = ["TransactionDepositToAddressDestination", "TransactionDepositToWalletDestination", "TransactionEvmContractDestination", "TransactionMessageSignEIP191Destination", "TransactionMessageSignEIP712Destination", "TransactionRawMessageSignDestination", "TransactionTransferToAddressDestination", "TransactionTransferToWalletDestination"];
501
+ TransactionDestination.OneOf = ["TransactionDepositToAddressDestination", "TransactionDepositToWalletDestination", "TransactionEvmContractDestination", "TransactionMessageSignEIP191Destination", "TransactionMessageSignEIP712Destination", "TransactionRawMessageSignDestination", "TransactionSolContractDestination", "TransactionTransferToAddressDestination", "TransactionTransferToWalletDestination"];
468
502
  var _default = exports["default"] = TransactionDestination;
@@ -45,6 +45,11 @@ var TransactionDestinationType = exports["default"] = /*#__PURE__*/function () {
45
45
  * @const
46
46
  */
47
47
  _defineProperty(this, "EVM_Contract", "EVM_Contract");
48
+ /**
49
+ * value: "SOL_Contract"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "SOL_Contract", "SOL_Contract");
48
53
  /**
49
54
  * value: "EVM_EIP_191_Signature"
50
55
  * @const
@@ -282,7 +282,7 @@ TransactionFee.prototype['gas_limit'] = undefined;
282
282
  TransactionFee.prototype['gas_price'] = undefined;
283
283
 
284
284
  /**
285
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
285
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
286
286
  * @member {String} max_fee_amount
287
287
  */
288
288
  TransactionFee.prototype['max_fee_amount'] = undefined;
@@ -126,7 +126,7 @@ var TransactionFixedFee = /*#__PURE__*/function () {
126
126
  TransactionFixedFee.RequiredProperties = ["fee_type"];
127
127
 
128
128
  /**
129
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
129
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
130
130
  * @member {String} max_fee_amount
131
131
  */
132
132
  TransactionFixedFee.prototype['max_fee_amount'] = undefined;
@@ -150,7 +150,7 @@ TransactionFixedFee.prototype['fee_used'] = undefined;
150
150
 
151
151
  // Implement MaxFeeAmount interface:
152
152
  /**
153
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
153
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
154
154
  * @member {String} max_fee_amount
155
155
  */
156
156
  _MaxFeeAmount["default"].prototype['max_fee_amount'] = undefined;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _TransactionSelectedUtxo = _interopRequireDefault(require("./TransactionSelectedUtxo"));
9
+ var _TransactionUtxoChange = _interopRequireDefault(require("./TransactionUtxoChange"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -73,6 +74,9 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
73
74
  if (data.hasOwnProperty('unsigned_raw_tx')) {
74
75
  obj['unsigned_raw_tx'] = _ApiClient["default"].convertToType(data['unsigned_raw_tx'], 'String');
75
76
  }
77
+ if (data.hasOwnProperty('utxo_change')) {
78
+ obj['utxo_change'] = _TransactionUtxoChange["default"].constructFromObject(data['utxo_change']);
79
+ }
76
80
  }
77
81
  return obj;
78
82
  }
@@ -114,6 +118,13 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
114
118
  if (data['unsigned_raw_tx'] && !(typeof data['unsigned_raw_tx'] === 'string' || data['unsigned_raw_tx'] instanceof String)) {
115
119
  throw new Error("Expected the field `unsigned_raw_tx` to be a primitive type in the JSON string but got " + data['unsigned_raw_tx']);
116
120
  }
121
+ // validate the optional field `utxo_change`
122
+ if (data['utxo_change']) {
123
+ // data not null
124
+ if (!!_TransactionUtxoChange["default"].validateJSON) {
125
+ _TransactionUtxoChange["default"].validateJSON(data['utxo_change']);
126
+ }
127
+ }
117
128
  return true;
118
129
  }
119
130
  }]);
@@ -141,4 +152,9 @@ TransactionRawTxInfo.prototype['raw_tx'] = undefined;
141
152
  * @member {String} unsigned_raw_tx
142
153
  */
143
154
  TransactionRawTxInfo.prototype['unsigned_raw_tx'] = undefined;
155
+
156
+ /**
157
+ * @member {module:model/TransactionUtxoChange} utxo_change
158
+ */
159
+ TransactionRawTxInfo.prototype['utxo_change'] = undefined;
144
160
  var _default = exports["default"] = TransactionRawTxInfo;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
8
9
  var _MpcTransferSource = _interopRequireDefault(require("./MpcTransferSource"));
9
10
  var _TransactionUtxo = _interopRequireDefault(require("./TransactionUtxo"));
10
11
  var _WalletSubtype = _interopRequireDefault(require("./WalletSubtype"));
@@ -175,5 +176,10 @@ TransactionRbfSource.prototype['included_utxos'] = undefined;
175
176
  * @member {Array.<module:model/TransactionUtxo>} excluded_utxos
176
177
  */
177
178
  TransactionRbfSource.prototype['excluded_utxos'] = undefined;
179
+
180
+ /**
181
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
182
+ */
183
+ TransactionRbfSource.prototype['mpc_used_key_share_holder_group'] = undefined;
178
184
  TransactionRbfSource.OneOf = ["MpcTransferSource"];
179
185
  var _default = exports["default"] = TransactionRbfSource;
@@ -240,7 +240,7 @@ TransactionRequestFee.prototype['fee_type'] = undefined;
240
240
  TransactionRequestFee.prototype['token_id'] = undefined;
241
241
 
242
242
  /**
243
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
243
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
244
244
  * @member {String} max_fee_amount
245
245
  */
246
246
  TransactionRequestFee.prototype['max_fee_amount'] = undefined;
@@ -121,7 +121,7 @@ var TransactionRequestFixedFee = /*#__PURE__*/function () {
121
121
  TransactionRequestFixedFee.RequiredProperties = ["fee_type", "token_id"];
122
122
 
123
123
  /**
124
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
124
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
125
125
  * @member {String} max_fee_amount
126
126
  */
127
127
  TransactionRequestFixedFee.prototype['max_fee_amount'] = undefined;
@@ -139,7 +139,7 @@ TransactionRequestFixedFee.prototype['token_id'] = undefined;
139
139
 
140
140
  // Implement MaxFeeAmount interface:
141
141
  /**
142
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
142
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
143
143
  * @member {String} max_fee_amount
144
144
  */
145
145
  _MaxFeeAmount["default"].prototype['max_fee_amount'] = undefined;
@@ -147,7 +147,7 @@ TransactionRequestUtxoFee.prototype['fee_type'] = undefined;
147
147
  TransactionRequestUtxoFee.prototype['token_id'] = undefined;
148
148
 
149
149
  /**
150
- * The maximum fee that you are willing to pay for the transaction. The transaction will fail if the transaction fee exceeds the maximum fee.
150
+ * The maximum fee that you are willing to pay for the transaction. Provide the value without applying precision. The transaction will fail if the transaction fee exceeds the maximum fee.
151
151
  * @member {String} max_fee_amount
152
152
  */
153
153
  TransactionRequestUtxoFee.prototype['max_fee_amount'] = undefined;
@@ -0,0 +1,106 @@
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 TransactionSolContractAccount model module.
26
+ * @module model/TransactionSolContractAccount
27
+ */
28
+ var TransactionSolContractAccount = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>TransactionSolContractAccount</code>.
31
+ * sol contract instruction account
32
+ * @alias module:model/TransactionSolContractAccount
33
+ */
34
+ function TransactionSolContractAccount() {
35
+ _classCallCheck(this, TransactionSolContractAccount);
36
+ TransactionSolContractAccount.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(TransactionSolContractAccount, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>TransactionSolContractAccount</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/TransactionSolContractAccount} obj Optional instance to populate.
53
+ * @return {module:model/TransactionSolContractAccount} The populated <code>TransactionSolContractAccount</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new TransactionSolContractAccount();
60
+ if (data.hasOwnProperty('pubkey')) {
61
+ obj['pubkey'] = _ApiClient["default"].convertToType(data['pubkey'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('is_signer')) {
64
+ obj['is_signer'] = _ApiClient["default"].convertToType(data['is_signer'], 'Boolean');
65
+ }
66
+ if (data.hasOwnProperty('is_writable')) {
67
+ obj['is_writable'] = _ApiClient["default"].convertToType(data['is_writable'], 'Boolean');
68
+ }
69
+ }
70
+ return obj;
71
+ }
72
+
73
+ /**
74
+ * Validates the JSON data with respect to <code>TransactionSolContractAccount</code>.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TransactionSolContractAccount</code>.
77
+ */
78
+ }, {
79
+ key: "validateJSON",
80
+ value: function validateJSON(data) {
81
+ // ensure the json data is a string
82
+ if (data['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
83
+ throw new Error("Expected the field `pubkey` to be a primitive type in the JSON string but got " + data['pubkey']);
84
+ }
85
+ return true;
86
+ }
87
+ }]);
88
+ }();
89
+ /**
90
+ * account address. If the account is signer, pubkey needs to match the from_address parameter.
91
+ * @member {String} pubkey
92
+ */
93
+ TransactionSolContractAccount.prototype['pubkey'] = undefined;
94
+
95
+ /**
96
+ * boolean value indicating whether the account can sign transactions.
97
+ * @member {Boolean} is_signer
98
+ */
99
+ TransactionSolContractAccount.prototype['is_signer'] = undefined;
100
+
101
+ /**
102
+ * boolean value indicating whether the account can be modified.
103
+ * @member {Boolean} is_writable
104
+ */
105
+ TransactionSolContractAccount.prototype['is_writable'] = undefined;
106
+ var _default = exports["default"] = TransactionSolContractAccount;