@cobo/cobo-waas2 1.30.0 → 1.32.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 (105) hide show
  1. package/README.md +9 -36
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +4 -4
  4. package/dist/api/FeeStationApi.js +4 -4
  5. package/dist/api/PaymentApi.js +76 -929
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/api/WalletsApi.js +83 -0
  8. package/dist/index.js +35 -105
  9. package/dist/model/Balance.js +14 -0
  10. package/dist/model/BridgingFee.js +9 -0
  11. package/dist/model/ContractCallParams.js +16 -0
  12. package/dist/model/CreateDestinationBankAccount.js +26 -0
  13. package/dist/model/CreatePaymentOrderRequest.js +4 -3
  14. package/dist/model/CreateTopUpAddresses.js +2 -2
  15. package/dist/model/CreateWalletAddress.js +2 -2
  16. package/dist/model/DestinationBankAccount.js +26 -0
  17. package/dist/model/DestinationBankAccountDetail.js +26 -0
  18. package/dist/model/IntermediaryBankInfo.js +4 -6
  19. package/dist/model/MerchantBalance.js +4 -6
  20. package/dist/model/PaymentBridgeStatus.js +61 -0
  21. package/dist/model/PaymentBulkSendItem.js +9 -9
  22. package/dist/model/PaymentPayout.js +35 -4
  23. package/dist/model/PaymentPayoutDetail.js +49 -13
  24. package/dist/model/PaymentPayoutEvent.js +49 -13
  25. package/dist/model/PreCheck.js +89 -0
  26. package/dist/model/ReportType.js +5 -0
  27. package/dist/model/SkipCheckType.js +56 -0
  28. package/dist/model/SupportedToken.js +17 -17
  29. package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +26 -0
  30. package/dist/model/TransactionRawTxInfo.js +32 -1
  31. package/dist/model/TransactionSelectedUtxo.js +39 -0
  32. package/dist/model/TransactionUtxoChange.js +13 -0
  33. package/dist/model/TransferParams.js +16 -0
  34. package/dist/model/TriggerTestPaymentWebhookEventResponse.js +83 -0
  35. package/dist/model/{QueryDestinationWhitelistEnabled200Response.js → TriggerTestPaymentsWebhookEventRequest.js} +35 -26
  36. package/dist/model/UTXO.js +48 -0
  37. package/dist/model/UpdateDestinationBankAccount.js +26 -0
  38. package/dist/model/WebhookEventData.js +6 -0
  39. package/dist/model/WebhookEventType.js +25 -0
  40. package/docs/AutoSweepApi.md +2 -2
  41. package/docs/Balance.md +1 -0
  42. package/docs/BridgingFee.md +1 -0
  43. package/docs/ContractCallParams.md +1 -0
  44. package/docs/CreateDestinationBankAccount.md +2 -0
  45. package/docs/CreatePaymentOrderRequest.md +2 -2
  46. package/docs/CreateTopUpAddresses.md +1 -1
  47. package/docs/CreateWalletAddress.md +1 -1
  48. package/docs/DestinationBankAccount.md +2 -0
  49. package/docs/DestinationBankAccountDetail.md +2 -0
  50. package/docs/FeeStationApi.md +2 -2
  51. package/docs/IntermediaryBankInfo.md +1 -1
  52. package/docs/MerchantBalance.md +1 -1
  53. package/docs/PaymentApi.md +185 -1153
  54. package/docs/PaymentBridgeStatus.md +12 -0
  55. package/docs/PaymentBulkSendItem.md +5 -5
  56. package/docs/PaymentPayout.md +2 -1
  57. package/docs/PaymentPayoutDetail.md +2 -1
  58. package/docs/PaymentPayoutEvent.md +2 -1
  59. package/docs/PreCheck.md +9 -0
  60. package/docs/ReportType.md +2 -0
  61. package/docs/SkipCheckType.md +10 -0
  62. package/docs/SupportedToken.md +10 -10
  63. package/docs/TransactionDepositToAddressDestinationTxInfo.md +2 -0
  64. package/docs/TransactionRawTxInfo.md +2 -1
  65. package/docs/TransactionSelectedUtxo.md +3 -0
  66. package/docs/TransactionUtxoChange.md +1 -0
  67. package/docs/TransactionsApi.md +2 -2
  68. package/docs/TransferParams.md +1 -0
  69. package/docs/TriggerTestPaymentWebhookEventResponse.md +9 -0
  70. package/docs/TriggerTestPaymentsWebhookEventRequest.md +10 -0
  71. package/docs/UTXO.md +4 -0
  72. package/docs/UpdateDestinationBankAccount.md +2 -0
  73. package/docs/WalletsApi.md +71 -0
  74. package/docs/WebhookEventData.md +1 -0
  75. package/docs/WebhookEventType.md +10 -0
  76. package/package.json +1 -1
  77. package/dist/model/CreateCounterpartyWalletAddressRequest.js +0 -140
  78. package/dist/model/CreateDestinationBankAccountRequest.js +0 -272
  79. package/dist/model/CreateDestinationWalletAddressRequest.js +0 -140
  80. package/dist/model/DeleteCounterparty200Response.js +0 -110
  81. package/dist/model/DeleteCounterpartyWalletAddress200Response.js +0 -110
  82. package/dist/model/DeleteDestination200Response.js +0 -110
  83. package/dist/model/DeleteDestinationBankAccount200Response.js +0 -110
  84. package/dist/model/DeleteDestinationWalletAddress200Response.js +0 -110
  85. package/dist/model/EnableDestinationWhitelistRequest.js +0 -106
  86. package/dist/model/ListCounterpartyWalletAddress200Response.js +0 -123
  87. package/dist/model/ListDestinationBankAccounts200Response.js +0 -123
  88. package/dist/model/ListDestinationWalletAddresses200Response.js +0 -123
  89. package/dist/model/UpdateCounterpartyByIdRequest.js +0 -160
  90. package/dist/model/UpdateDestinationByIdRequest.js +0 -173
  91. package/docs/CreateCounterpartyWalletAddressRequest.md +0 -11
  92. package/docs/CreateDestinationBankAccountRequest.md +0 -20
  93. package/docs/CreateDestinationWalletAddressRequest.md +0 -11
  94. package/docs/DeleteCounterparty200Response.md +0 -9
  95. package/docs/DeleteCounterpartyWalletAddress200Response.md +0 -9
  96. package/docs/DeleteDestination200Response.md +0 -9
  97. package/docs/DeleteDestinationBankAccount200Response.md +0 -9
  98. package/docs/DeleteDestinationWalletAddress200Response.md +0 -9
  99. package/docs/EnableDestinationWhitelistRequest.md +0 -9
  100. package/docs/ListCounterpartyWalletAddress200Response.md +0 -10
  101. package/docs/ListDestinationBankAccounts200Response.md +0 -10
  102. package/docs/ListDestinationWalletAddresses200Response.md +0 -10
  103. package/docs/QueryDestinationWhitelistEnabled200Response.md +0 -9
  104. package/docs/UpdateCounterpartyByIdRequest.md +0 -13
  105. package/docs/UpdateDestinationByIdRequest.md +0 -14
@@ -0,0 +1,89 @@
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 _SkipCheckType = _interopRequireDefault(require("./SkipCheckType"));
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 PreCheck model module.
27
+ * @module model/PreCheck
28
+ */
29
+ var PreCheck = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>PreCheck</code>.
32
+ * Some validation settings for creating a transaction.
33
+ * @alias module:model/PreCheck
34
+ */
35
+ function PreCheck() {
36
+ _classCallCheck(this, PreCheck);
37
+ PreCheck.initialize(this);
38
+ }
39
+
40
+ /**
41
+ * Initializes the fields of this object.
42
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
43
+ * Only for internal use.
44
+ */
45
+ return _createClass(PreCheck, null, [{
46
+ key: "initialize",
47
+ value: function initialize(obj) {}
48
+
49
+ /**
50
+ * Constructs a <code>PreCheck</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
52
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
53
+ * @param {module:model/PreCheck} obj Optional instance to populate.
54
+ * @return {module:model/PreCheck} The populated <code>PreCheck</code> instance.
55
+ */
56
+ }, {
57
+ key: "constructFromObject",
58
+ value: function constructFromObject(data, obj) {
59
+ if (data) {
60
+ obj = obj || new PreCheck();
61
+ if (data.hasOwnProperty('skip_checks')) {
62
+ obj['skip_checks'] = _ApiClient["default"].convertToType(data['skip_checks'], [_SkipCheckType["default"]]);
63
+ }
64
+ }
65
+ return obj;
66
+ }
67
+
68
+ /**
69
+ * Validates the JSON data with respect to <code>PreCheck</code>.
70
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
71
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PreCheck</code>.
72
+ */
73
+ }, {
74
+ key: "validateJSON",
75
+ value: function validateJSON(data) {
76
+ // ensure the json data is an array
77
+ if (!Array.isArray(data['skip_checks'])) {
78
+ throw new Error("Expected the field `skip_checks` to be an array in the JSON data but got " + data['skip_checks']);
79
+ }
80
+ return true;
81
+ }
82
+ }]);
83
+ }();
84
+ /**
85
+ * Selection to skip verification.
86
+ * @member {Array.<module:model/SkipCheckType>} skip_checks
87
+ */
88
+ PreCheck.prototype['skip_checks'] = undefined;
89
+ var _default = exports["default"] = PreCheck;
@@ -100,6 +100,11 @@ var ReportType = exports["default"] = /*#__PURE__*/function () {
100
100
  * @const
101
101
  */
102
102
  _defineProperty(this, "Summary", "Summary");
103
+ /**
104
+ * value: "BulkSend"
105
+ * @const
106
+ */
107
+ _defineProperty(this, "BulkSend", "BulkSend");
103
108
  /**
104
109
  * value: "unknown_default_open_api"
105
110
  * @const
@@ -0,0 +1,56 @@
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 SkipCheckType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var SkipCheckType = exports["default"] = /*#__PURE__*/function () {
31
+ function SkipCheckType() {
32
+ _classCallCheck(this, SkipCheckType);
33
+ /**
34
+ * value: "OnchainFeeBalance"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "OnchainFeeBalance", "OnchainFeeBalance");
38
+ /**
39
+ * value: "unknown_default_open_api"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
43
+ }
44
+ return _createClass(SkipCheckType, null, [{
45
+ key: "constructFromObject",
46
+ value:
47
+ /**
48
+ * Returns a <code>SkipCheckType</code> enum value from a Javascript object name.
49
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
50
+ * @return {module:model/SkipCheckType} The enum <code>SkipCheckType</code> value.
51
+ */
52
+ function constructFromObject(object) {
53
+ return object;
54
+ }
55
+ }]);
56
+ }();
@@ -32,13 +32,13 @@ var SupportedToken = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>SupportedToken</code>.
34
34
  * @alias module:model/SupportedToken
35
- * @param token_id {String} Unique identifier of the token
36
- * @param name {String} Full name of the token
37
- * @param symbol {String} Symbol representation of the token
38
- * @param decimal {Number} Number of decimal places for the token
39
- * @param token_address {String} Contract address of the token (may be null for native coins)
40
- * @param chain_id {String} Identifier of the blockchain where the token exists
41
- * @param chain_symbol {String} Symbol of the underlying blockchain
35
+ * @param token_id {String} The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`.
36
+ * @param name {String} The full name of the token.
37
+ * @param symbol {String} The symbol of the token.
38
+ * @param decimal {Number} The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value.
39
+ * @param token_address {String} The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum).
40
+ * @param chain_id {String} The ID of the chain on which the token exists.
41
+ * @param chain_symbol {String} The symbol of the chain on which the token exists.
42
42
  */
43
43
  function SupportedToken(token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
44
44
  _classCallCheck(this, SupportedToken);
@@ -170,61 +170,61 @@ var SupportedToken = /*#__PURE__*/function () {
170
170
  SupportedToken.RequiredProperties = ["token_id", "name", "symbol", "decimal", "token_address", "chain_id", "chain_symbol"];
171
171
 
172
172
  /**
173
- * Unique identifier of the token
173
+ * The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`.
174
174
  * @member {String} token_id
175
175
  */
176
176
  SupportedToken.prototype['token_id'] = undefined;
177
177
 
178
178
  /**
179
- * Full name of the token
179
+ * The full name of the token.
180
180
  * @member {String} name
181
181
  */
182
182
  SupportedToken.prototype['name'] = undefined;
183
183
 
184
184
  /**
185
- * Symbol representation of the token
185
+ * The symbol of the token.
186
186
  * @member {String} symbol
187
187
  */
188
188
  SupportedToken.prototype['symbol'] = undefined;
189
189
 
190
190
  /**
191
- * Number of decimal places for the token
191
+ * The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value.
192
192
  * @member {Number} decimal
193
193
  */
194
194
  SupportedToken.prototype['decimal'] = undefined;
195
195
 
196
196
  /**
197
- * Contract address of the token (may be null for native coins)
197
+ * The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum).
198
198
  * @member {String} token_address
199
199
  */
200
200
  SupportedToken.prototype['token_address'] = undefined;
201
201
 
202
202
  /**
203
- * Identifier of the blockchain where the token exists
203
+ * The ID of the chain on which the token exists.
204
204
  * @member {String} chain_id
205
205
  */
206
206
  SupportedToken.prototype['chain_id'] = undefined;
207
207
 
208
208
  /**
209
- * Symbol of the underlying blockchain
209
+ * The symbol of the chain on which the token exists.
210
210
  * @member {String} chain_symbol
211
211
  */
212
212
  SupportedToken.prototype['chain_symbol'] = undefined;
213
213
 
214
214
  /**
215
- * URL to the blockchain's icon image
215
+ * The URL of the chain icon image.
216
216
  * @member {String} chain_icon_url
217
217
  */
218
218
  SupportedToken.prototype['chain_icon_url'] = undefined;
219
219
 
220
220
  /**
221
- * URL to the token's icon image
221
+ * The URL of the token icon image.
222
222
  * @member {String} token_icon_url
223
223
  */
224
224
  SupportedToken.prototype['token_icon_url'] = undefined;
225
225
 
226
226
  /**
227
- * Whether the token is supported by the off-ramp service.
227
+ * Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp.
228
228
  * @member {Boolean} can_off_ramp
229
229
  */
230
230
  SupportedToken.prototype['can_off_ramp'] = undefined;
@@ -59,6 +59,12 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
59
59
  if (data.hasOwnProperty('vout_n')) {
60
60
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
61
61
  }
62
+ if (data.hasOwnProperty('object_id')) {
63
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('version')) {
66
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
67
+ }
62
68
  }
63
69
  return obj;
64
70
  }
@@ -71,6 +77,14 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
71
77
  }, {
72
78
  key: "validateJSON",
73
79
  value: function validateJSON(data) {
80
+ // ensure the json data is a string
81
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
82
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
83
+ }
84
+ // ensure the json data is a string
85
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
86
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
87
+ }
74
88
  return true;
75
89
  }
76
90
  }]);
@@ -80,4 +94,16 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
80
94
  * @member {Number} vout_n
81
95
  */
82
96
  TransactionDepositToAddressDestinationTxInfo.prototype['vout_n'] = undefined;
97
+
98
+ /**
99
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
100
+ * @member {String} object_id
101
+ */
102
+ TransactionDepositToAddressDestinationTxInfo.prototype['object_id'] = undefined;
103
+
104
+ /**
105
+ * Object version number.
106
+ * @member {String} version
107
+ */
108
+ TransactionDepositToAddressDestinationTxInfo.prototype['version'] = undefined;
83
109
  var _default = exports["default"] = TransactionDepositToAddressDestinationTxInfo;
@@ -75,7 +75,10 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
75
75
  obj['unsigned_raw_tx'] = _ApiClient["default"].convertToType(data['unsigned_raw_tx'], 'String');
76
76
  }
77
77
  if (data.hasOwnProperty('utxo_change')) {
78
- obj['utxo_change'] = _TransactionUtxoChange["default"].constructFromObject(data['utxo_change']);
78
+ obj['utxo_change'] = _ApiClient["default"].convertToType(data['utxo_change'], _TransactionUtxoChange["default"]);
79
+ }
80
+ if (data.hasOwnProperty('utxo_changes')) {
81
+ obj['utxo_changes'] = _ApiClient["default"].convertToType(data['utxo_changes'], [_TransactionUtxoChange["default"]]);
79
82
  }
80
83
  }
81
84
  return obj;
@@ -125,6 +128,27 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
125
128
  _TransactionUtxoChange["default"].validateJSON(data['utxo_change']);
126
129
  }
127
130
  }
131
+ if (data['utxo_changes']) {
132
+ // data not null
133
+ // ensure the json data is an array
134
+ if (!Array.isArray(data['utxo_changes'])) {
135
+ throw new Error("Expected the field `utxo_changes` to be an array in the JSON data but got " + data['utxo_changes']);
136
+ }
137
+ // validate the optional field `utxo_changes` (array)
138
+ var _iterator2 = _createForOfIteratorHelper(data['utxo_changes']),
139
+ _step2;
140
+ try {
141
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
142
+ var _item = _step2.value;
143
+ _TransactionUtxoChange["default"].validateJSON(_item);
144
+ }
145
+ } catch (err) {
146
+ _iterator2.e(err);
147
+ } finally {
148
+ _iterator2.f();
149
+ }
150
+ ;
151
+ }
128
152
  return true;
129
153
  }
130
154
  }]);
@@ -154,7 +178,14 @@ TransactionRawTxInfo.prototype['raw_tx'] = undefined;
154
178
  TransactionRawTxInfo.prototype['unsigned_raw_tx'] = undefined;
155
179
 
156
180
  /**
181
+ * Deprecated. Use `utxo_changes` instead.
157
182
  * @member {module:model/TransactionUtxoChange} utxo_change
158
183
  */
159
184
  TransactionRawTxInfo.prototype['utxo_change'] = undefined;
185
+
186
+ /**
187
+ * The UTXO change outputs in the transaction.
188
+ * @member {Array.<module:model/TransactionUtxoChange>} utxo_changes
189
+ */
190
+ TransactionRawTxInfo.prototype['utxo_changes'] = undefined;
160
191
  var _default = exports["default"] = TransactionRawTxInfo;
@@ -63,6 +63,9 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('vout_n')) {
64
64
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  if (data.hasOwnProperty('address')) {
67
70
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
68
71
  }
@@ -75,6 +78,12 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
75
78
  if (data.hasOwnProperty('revealed_script')) {
76
79
  obj['revealed_script'] = _ApiClient["default"].convertToType(data['revealed_script'], 'String');
77
80
  }
81
+ if (data.hasOwnProperty('object_id')) {
82
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('version')) {
85
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
86
+ }
78
87
  }
79
88
  return obj;
80
89
  }
@@ -92,6 +101,10 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
92
101
  throw new Error("Expected the field `tx_hash` to be a primitive type in the JSON string but got " + data['tx_hash']);
93
102
  }
94
103
  // ensure the json data is a string
104
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
105
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
106
+ }
107
+ // ensure the json data is a string
95
108
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
96
109
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
97
110
  }
@@ -107,6 +120,14 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
107
120
  if (data['revealed_script'] && !(typeof data['revealed_script'] === 'string' || data['revealed_script'] instanceof String)) {
108
121
  throw new Error("Expected the field `revealed_script` to be a primitive type in the JSON string but got " + data['revealed_script']);
109
122
  }
123
+ // ensure the json data is a string
124
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
125
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
126
+ }
127
+ // ensure the json data is a string
128
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
129
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
130
+ }
110
131
  return true;
111
132
  }
112
133
  }]);
@@ -123,6 +144,12 @@ TransactionSelectedUtxo.prototype['tx_hash'] = undefined;
123
144
  */
124
145
  TransactionSelectedUtxo.prototype['vout_n'] = undefined;
125
146
 
147
+ /**
148
+ * The token ID of the UTXO.
149
+ * @member {String} token_id
150
+ */
151
+ TransactionSelectedUtxo.prototype['token_id'] = undefined;
152
+
126
153
  /**
127
154
  * The address of the UTXO.
128
155
  * @member {String} address
@@ -146,4 +173,16 @@ TransactionSelectedUtxo.prototype['redeem_script'] = undefined;
146
173
  * @member {String} revealed_script
147
174
  */
148
175
  TransactionSelectedUtxo.prototype['revealed_script'] = undefined;
176
+
177
+ /**
178
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
179
+ * @member {String} object_id
180
+ */
181
+ TransactionSelectedUtxo.prototype['object_id'] = undefined;
182
+
183
+ /**
184
+ * Object version number.
185
+ * @member {String} version
186
+ */
187
+ TransactionSelectedUtxo.prototype['version'] = undefined;
149
188
  var _default = exports["default"] = TransactionSelectedUtxo;
@@ -63,6 +63,9 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('value')) {
64
64
  obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  }
67
70
  return obj;
68
71
  }
@@ -83,6 +86,10 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
83
86
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
84
87
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
85
88
  }
89
+ // ensure the json data is a string
90
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
91
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
92
+ }
86
93
  return true;
87
94
  }
88
95
  }]);
@@ -98,4 +105,10 @@ TransactionUtxoChange.prototype['address'] = undefined;
98
105
  * @member {String} value
99
106
  */
100
107
  TransactionUtxoChange.prototype['value'] = undefined;
108
+
109
+ /**
110
+ * The token ID of the UTXO change output.
111
+ * @member {String} token_id
112
+ */
113
+ TransactionUtxoChange.prototype['token_id'] = undefined;
101
114
  var _default = exports["default"] = TransactionUtxoChange;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _AutoFuelType = _interopRequireDefault(require("./AutoFuelType"));
9
+ var _PreCheck = _interopRequireDefault(require("./PreCheck"));
9
10
  var _TransactionProcessType = _interopRequireDefault(require("./TransactionProcessType"));
10
11
  var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
11
12
  var _TransferDestination = _interopRequireDefault(require("./TransferDestination"));
@@ -101,6 +102,9 @@ var TransferParams = /*#__PURE__*/function () {
101
102
  if (data.hasOwnProperty('auto_fuel')) {
102
103
  obj['auto_fuel'] = _AutoFuelType["default"].constructFromObject(data['auto_fuel']);
103
104
  }
105
+ if (data.hasOwnProperty('pre_check')) {
106
+ obj['pre_check'] = _PreCheck["default"].constructFromObject(data['pre_check']);
107
+ }
104
108
  }
105
109
  return obj;
106
110
  }
@@ -165,6 +169,13 @@ var TransferParams = /*#__PURE__*/function () {
165
169
  _TransactionRequestFee["default"].validateJSON(data['fee']);
166
170
  }
167
171
  }
172
+ // validate the optional field `pre_check`
173
+ if (data['pre_check']) {
174
+ // data not null
175
+ if (!!_PreCheck["default"].validateJSON) {
176
+ _PreCheck["default"].validateJSON(data['pre_check']);
177
+ }
178
+ }
168
179
  return true;
169
180
  }
170
181
  }]);
@@ -219,4 +230,9 @@ TransferParams.prototype['transaction_process_type'] = undefined;
219
230
  * @member {module:model/AutoFuelType} auto_fuel
220
231
  */
221
232
  TransferParams.prototype['auto_fuel'] = undefined;
233
+
234
+ /**
235
+ * @member {module:model/PreCheck} pre_check
236
+ */
237
+ TransferParams.prototype['pre_check'] = undefined;
222
238
  var _default = exports["default"] = TransferParams;
@@ -0,0 +1,83 @@
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 TriggerTestPaymentWebhookEventResponse model module.
26
+ * @module model/TriggerTestPaymentWebhookEventResponse
27
+ */
28
+ var TriggerTestPaymentWebhookEventResponse = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>TriggerTestPaymentWebhookEventResponse</code>.
31
+ * @alias module:model/TriggerTestPaymentWebhookEventResponse
32
+ */
33
+ function TriggerTestPaymentWebhookEventResponse() {
34
+ _classCallCheck(this, TriggerTestPaymentWebhookEventResponse);
35
+ TriggerTestPaymentWebhookEventResponse.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(TriggerTestPaymentWebhookEventResponse, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>TriggerTestPaymentWebhookEventResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/TriggerTestPaymentWebhookEventResponse} obj Optional instance to populate.
52
+ * @return {module:model/TriggerTestPaymentWebhookEventResponse} The populated <code>TriggerTestPaymentWebhookEventResponse</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new TriggerTestPaymentWebhookEventResponse();
59
+ if (data.hasOwnProperty('triggered')) {
60
+ obj['triggered'] = _ApiClient["default"].convertToType(data['triggered'], 'Boolean');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ return true;
75
+ }
76
+ }]);
77
+ }();
78
+ /**
79
+ * Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered.
80
+ * @member {Boolean} triggered
81
+ */
82
+ TriggerTestPaymentWebhookEventResponse.prototype['triggered'] = undefined;
83
+ var _default = exports["default"] = TriggerTestPaymentWebhookEventResponse;