@cobo/cobo-waas2 1.5.0 → 1.6.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 (94) hide show
  1. package/README.md +15 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/ServerDemo.js +80 -0
  4. package/dist/api/DevelopersApi.js +79 -0
  5. package/dist/api/OAuthApi.js +8 -8
  6. package/dist/api/WalletsApi.js +58 -57
  7. package/dist/index.js +83 -6
  8. package/dist/model/AddressTransferDestination.js +2 -2
  9. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
  10. package/dist/model/BabylonStakeEstimatedFee.js +118 -0
  11. package/dist/model/BabylonValidator.js +5 -0
  12. package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
  13. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  14. package/dist/model/CreateStakeActivityExtra.js +42 -8
  15. package/dist/model/CreateUnstakeActivity.js +16 -0
  16. package/dist/model/CreateUnstakeActivityExtra.js +159 -0
  17. package/dist/model/CreateUnstakeActivityRequest.js +20 -0
  18. package/dist/model/EstimateContractCallFeeParams.js +4 -6
  19. package/dist/model/EstimateTransferFeeParams.js +4 -8
  20. package/dist/model/EstimateUnstakeFee.js +20 -0
  21. package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
  22. package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
  23. package/dist/model/EthStakeEstimatedFee.js +112 -0
  24. package/dist/model/EthStakeExtra.js +131 -0
  25. package/dist/model/EthStakingExtra.js +131 -0
  26. package/dist/model/EthUnstakeExtra.js +131 -0
  27. package/dist/model/FeeGasLimit.js +1 -2
  28. package/dist/model/GetApiKeyInfo200Response.js +251 -0
  29. package/dist/model/GetStakingEstimationFee201Response.js +144 -43
  30. package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
  31. package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
  32. package/dist/model/GetToken4XXResponse.js +12 -10
  33. package/dist/model/MPCDelegate.js +1 -1
  34. package/dist/model/MpcTransferSource.js +2 -2
  35. package/dist/model/{RefreshToken201Response.js → RefreshToken2XXResponse.js} +21 -21
  36. package/dist/model/RoleScopes.js +128 -0
  37. package/dist/model/Scopes.js +142 -0
  38. package/dist/model/SmartContractWalletInfo.js +1 -1
  39. package/dist/model/StakingPoolType.js +5 -0
  40. package/dist/model/StakingsExtra.js +36 -8
  41. package/dist/model/TransactionEvmEip1559Fee.js +2 -4
  42. package/dist/model/TransactionEvmLegacyFee.js +2 -4
  43. package/dist/model/TransactionFee.js +1 -2
  44. package/dist/model/TransactionRbfSource.js +1 -1
  45. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
  46. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
  47. package/dist/model/TransactionRequestFee.js +1 -2
  48. package/dist/model/TransactionSource.js +1 -1
  49. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
  50. package/dist/model/TransferDestination.js +2 -2
  51. package/docs/AddressTransferDestination.md +2 -2
  52. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
  53. package/docs/BabylonStakeEstimatedFee.md +12 -0
  54. package/docs/BabylonValidator.md +2 -0
  55. package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
  56. package/docs/CreateStakeActivityExtra.md +1 -0
  57. package/docs/CreateUnstakeActivity.md +1 -0
  58. package/docs/CreateUnstakeActivityExtra.md +10 -0
  59. package/docs/CreateUnstakeActivityRequest.md +1 -0
  60. package/docs/DevelopersApi.md +55 -0
  61. package/docs/EstimateContractCallFeeParams.md +1 -1
  62. package/docs/EstimateFeeParams.md +1 -1
  63. package/docs/EstimateTransferFeeParams.md +2 -2
  64. package/docs/EstimateUnstakeFee.md +1 -0
  65. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
  66. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
  67. package/docs/EthStakeEstimatedFee.md +11 -0
  68. package/docs/EthStakeExtra.md +10 -0
  69. package/docs/EthStakingExtra.md +10 -0
  70. package/docs/EthUnstakeExtra.md +10 -0
  71. package/docs/FeeGasLimit.md +1 -1
  72. package/docs/GetApiKeyInfo200Response.md +30 -0
  73. package/docs/GetStakingEstimationFee201Response.md +3 -0
  74. package/docs/GetStakingEstimationFeeRequest.md +1 -1
  75. package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
  76. package/docs/GetToken4XXResponse.md +1 -1
  77. package/docs/MpcTransferSource.md +1 -1
  78. package/docs/OAuthApi.md +4 -4
  79. package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
  80. package/docs/{RefreshToken201Response.md → RefreshToken2XXResponse.md} +1 -1
  81. package/docs/RoleScopes.md +10 -0
  82. package/docs/Scopes.md +13 -0
  83. package/docs/StakingPoolType.md +2 -0
  84. package/docs/TransactionEvmEip1559Fee.md +1 -1
  85. package/docs/TransactionEvmLegacyFee.md +1 -1
  86. package/docs/TransactionFee.md +1 -1
  87. package/docs/TransactionRbfSource.md +1 -1
  88. package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
  89. package/docs/TransactionRequestEvmLegacyFee.md +1 -1
  90. package/docs/TransactionRequestFee.md +1 -1
  91. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
  92. package/docs/TransferDestination.md +2 -2
  93. package/docs/WalletsApi.md +54 -54
  94. package/package.json +2 -1
@@ -5,12 +5,18 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BabylonStakeEstimatedFee = _interopRequireDefault(require("./BabylonStakeEstimatedFee"));
9
+ var _EstimatedFee = _interopRequireDefault(require("./EstimatedFee"));
10
+ var _EthStakeEstimatedFee = _interopRequireDefault(require("./EthStakeEstimatedFee"));
8
11
  var _FeeType = _interopRequireDefault(require("./FeeType"));
12
+ var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
13
+ var _GetStakingEstimationFee201Response;
9
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
15
  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
16
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
17
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
13
18
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _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
20
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
21
  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
22
  * Cobo Wallet as a Service 2.0
@@ -30,66 +36,160 @@ var GetStakingEstimationFee201Response = /*#__PURE__*/function () {
30
36
  /**
31
37
  * Constructs a new <code>GetStakingEstimationFee201Response</code>.
32
38
  * @alias module:model/GetStakingEstimationFee201Response
39
+ * @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} instance The actual instance to initialize GetStakingEstimationFee201Response.
33
40
  */
34
41
  function GetStakingEstimationFee201Response() {
42
+ var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
35
43
  _classCallCheck(this, GetStakingEstimationFee201Response);
36
- GetStakingEstimationFee201Response.initialize(this);
44
+ /**
45
+ * Returns the JSON representation of the actual instance.
46
+ * @return {string}
47
+ */
48
+ _defineProperty(this, "toJSON", function () {
49
+ return this.getActualInstance();
50
+ });
51
+ if (instance === null) {
52
+ this.actualInstance = null;
53
+ return;
54
+ }
55
+ var match = 0;
56
+ var errorMessages = [];
57
+ var discriminatorValue = instance["pool_type"];
58
+ if (discriminatorValue) {
59
+ switch (discriminatorValue) {
60
+ case "Babylon":
61
+ this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
62
+ match++;
63
+ break;
64
+ case "ETHBeacon":
65
+ this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
66
+ match++;
67
+ break;
68
+ default:
69
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
70
+ break;
71
+ }
72
+ return;
73
+ }
74
+ try {
75
+ if (instance instanceof _EthStakeEstimatedFee["default"]) {
76
+ this.actualInstance = instance;
77
+ } else if (!!_EthStakeEstimatedFee["default"].validateJSON && _EthStakeEstimatedFee["default"].validateJSON(instance)) {
78
+ // plain JS object
79
+ // create EthStakeEstimatedFee from JS object
80
+ this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
81
+ } else {
82
+ if (_EthStakeEstimatedFee["default"].constructFromObject(instance)) {
83
+ if (!!_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
84
+ if (_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
85
+ this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
86
+ }
87
+ } else {
88
+ this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
89
+ }
90
+ }
91
+ }
92
+ match++;
93
+ } catch (err) {
94
+ // json data failed to deserialize into EthStakeEstimatedFee
95
+ errorMessages.push("Failed to construct EthStakeEstimatedFee: " + err);
96
+ }
97
+ try {
98
+ if (instance instanceof _BabylonStakeEstimatedFee["default"]) {
99
+ this.actualInstance = instance;
100
+ } else if (!!_BabylonStakeEstimatedFee["default"].validateJSON && _BabylonStakeEstimatedFee["default"].validateJSON(instance)) {
101
+ // plain JS object
102
+ // create BabylonStakeEstimatedFee from JS object
103
+ this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
104
+ } else {
105
+ if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance)) {
106
+ if (!!_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
107
+ if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
108
+ this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
109
+ }
110
+ } else {
111
+ this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
112
+ }
113
+ }
114
+ }
115
+ match++;
116
+ } catch (err) {
117
+ // json data failed to deserialize into BabylonStakeEstimatedFee
118
+ errorMessages.push("Failed to construct BabylonStakeEstimatedFee: " + err);
119
+ }
120
+
121
+ // if (match > 1) {
122
+ // throw new Error("Multiple matches found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Input: " + JSON.stringify(instance));
123
+ // } else
124
+ if (match === 0) {
125
+ // this.actualInstance = null; // clear the actual instance in case there are multiple matches
126
+ // throw new Error("No match found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Details: " +
127
+ // errorMessages.join(", "));
128
+ return;
129
+ } else {// only 1 match
130
+ // the input is valid
131
+ }
37
132
  }
38
133
 
39
134
  /**
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.
135
+ * Constructs a <code>GetStakingEstimationFee201Response</code> from a plain JavaScript object, optionally creating a new instance.
136
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
137
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
138
+ * @param {module:model/GetStakingEstimationFee201Response} obj Optional instance to populate.
139
+ * @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
43
140
  */
44
- return _createClass(GetStakingEstimationFee201Response, null, [{
45
- key: "initialize",
46
- value: function initialize(obj) {}
47
-
141
+ return _createClass(GetStakingEstimationFee201Response, [{
142
+ key: "getActualInstance",
143
+ value:
48
144
  /**
49
- * Constructs a <code>GetStakingEstimationFee201Response</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/GetStakingEstimationFee201Response} obj Optional instance to populate.
53
- * @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
145
+ * Gets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
146
+ * @return {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} The actual instance.
54
147
  */
55
- }, {
56
- key: "constructFromObject",
57
- value: function constructFromObject(data, obj) {
58
- if (data) {
59
- obj = obj || new GetStakingEstimationFee201Response();
60
- if (data.hasOwnProperty('fee_type')) {
61
- obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
62
- }
63
- if (data.hasOwnProperty('fee_amount')) {
64
- obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
65
- }
66
- if (data.hasOwnProperty('token_id')) {
67
- obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
- }
69
- }
70
- return obj;
148
+ function getActualInstance() {
149
+ return this.actualInstance;
71
150
  }
72
151
 
73
152
  /**
74
- * Validates the JSON data with respect to <code>GetStakingEstimationFee201Response</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>GetStakingEstimationFee201Response</code>.
153
+ * Sets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
154
+ * @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} obj The actual instance.
77
155
  */
78
156
  }, {
79
- key: "validateJSON",
80
- value: function validateJSON(data) {
81
- // ensure the json data is a string
82
- if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
83
- throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
84
- }
85
- // ensure the json data is a string
86
- if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
87
- throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
88
- }
89
- return true;
157
+ key: "setActualInstance",
158
+ value: function setActualInstance(obj) {
159
+ this.actualInstance = GetStakingEstimationFee201Response.constructFromObject(obj).getActualInstance();
160
+ }
161
+ }], [{
162
+ key: "constructFromObject",
163
+ value: function constructFromObject(data, obj) {
164
+ return new GetStakingEstimationFee201Response(data);
90
165
  }
91
166
  }]);
92
167
  }();
168
+ /**
169
+ * @member {module:model/StakingPoolType} pool_type
170
+ */
171
+ _GetStakingEstimationFee201Response = GetStakingEstimationFee201Response;
172
+ /**
173
+ * Create an instance of GetStakingEstimationFee201Response from a JSON string.
174
+ * @param {string} json_string JSON string.
175
+ * @return {module:model/GetStakingEstimationFee201Response} An instance of GetStakingEstimationFee201Response.
176
+ */
177
+ _defineProperty(GetStakingEstimationFee201Response, "fromJSON", function (json_string) {
178
+ return _GetStakingEstimationFee201Response.constructFromObject(JSON.parse(json_string));
179
+ });
180
+ GetStakingEstimationFee201Response.prototype['pool_type'] = undefined;
181
+
182
+ /**
183
+ * @member {module:model/EstimatedFee} fee
184
+ */
185
+ GetStakingEstimationFee201Response.prototype['fee'] = undefined;
186
+
187
+ /**
188
+ * A list of public keys associated with the Ethereum validators for this staking operation.
189
+ * @member {Array.<String>} validator_pubkeys
190
+ */
191
+ GetStakingEstimationFee201Response.prototype['validator_pubkeys'] = undefined;
192
+
93
193
  /**
94
194
  * @member {module:model/FeeType} fee_type
95
195
  */
@@ -106,4 +206,5 @@ GetStakingEstimationFee201Response.prototype['fee_amount'] = undefined;
106
206
  * @member {String} token_id
107
207
  */
108
208
  GetStakingEstimationFee201Response.prototype['token_id'] = undefined;
209
+ GetStakingEstimationFee201Response.OneOf = ["BabylonStakeEstimatedFee", "EthStakeEstimatedFee"];
109
210
  var _default = exports["default"] = GetStakingEstimationFee201Response;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ActivityType = _interopRequireDefault(require("./ActivityType"));
9
- var _CreateStakeActivityExtra = _interopRequireDefault(require("./CreateStakeActivityExtra"));
9
+ var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
10
10
  var _EstimateStakeFee = _interopRequireDefault(require("./EstimateStakeFee"));
11
11
  var _EstimateUnstakeFee = _interopRequireDefault(require("./EstimateUnstakeFee"));
12
12
  var _EstimateWithdrawFee = _interopRequireDefault(require("./EstimateWithdrawFee"));
@@ -237,7 +237,7 @@ GetStakingEstimationFeeRequest.prototype['amount'] = undefined;
237
237
  GetStakingEstimationFeeRequest.prototype['fee'] = undefined;
238
238
 
239
239
  /**
240
- * @member {module:model/CreateStakeActivityExtra} extra
240
+ * @member {module:model/CreateUnstakeActivityExtra} extra
241
241
  */
242
242
  GetStakingEstimationFeeRequest.prototype['extra'] = undefined;
243
243
 
@@ -22,17 +22,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
22
22
  *
23
23
  */
24
24
  /**
25
- * The GetToken200Response model module.
26
- * @module model/GetToken200Response
25
+ * The GetToken2XXResponse model module.
26
+ * @module model/GetToken2XXResponse
27
27
  */
28
- var GetToken200Response = /*#__PURE__*/function () {
28
+ var GetToken2XXResponse = /*#__PURE__*/function () {
29
29
  /**
30
- * Constructs a new <code>GetToken200Response</code>.
31
- * @alias module:model/GetToken200Response
30
+ * Constructs a new <code>GetToken2XXResponse</code>.
31
+ * @alias module:model/GetToken2XXResponse
32
32
  */
33
- function GetToken200Response() {
34
- _classCallCheck(this, GetToken200Response);
35
- GetToken200Response.initialize(this);
33
+ function GetToken2XXResponse() {
34
+ _classCallCheck(this, GetToken2XXResponse);
35
+ GetToken2XXResponse.initialize(this);
36
36
  }
37
37
 
38
38
  /**
@@ -40,22 +40,22 @@ var GetToken200Response = /*#__PURE__*/function () {
40
40
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
41
  * Only for internal use.
42
42
  */
43
- return _createClass(GetToken200Response, null, [{
43
+ return _createClass(GetToken2XXResponse, null, [{
44
44
  key: "initialize",
45
45
  value: function initialize(obj) {}
46
46
 
47
47
  /**
48
- * Constructs a <code>GetToken200Response</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Constructs a <code>GetToken2XXResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
49
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
50
  * @param {Object} data The plain JavaScript object bearing properties of interest.
51
- * @param {module:model/GetToken200Response} obj Optional instance to populate.
52
- * @return {module:model/GetToken200Response} The populated <code>GetToken200Response</code> instance.
51
+ * @param {module:model/GetToken2XXResponse} obj Optional instance to populate.
52
+ * @return {module:model/GetToken2XXResponse} The populated <code>GetToken2XXResponse</code> instance.
53
53
  */
54
54
  }, {
55
55
  key: "constructFromObject",
56
56
  value: function constructFromObject(data, obj) {
57
57
  if (data) {
58
- obj = obj || new GetToken200Response();
58
+ obj = obj || new GetToken2XXResponse();
59
59
  if (data.hasOwnProperty('access_token')) {
60
60
  obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
61
61
  }
@@ -76,9 +76,9 @@ var GetToken200Response = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>GetToken200Response</code>.
79
+ * Validates the JSON data with respect to <code>GetToken2XXResponse</code>.
80
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
81
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetToken200Response</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetToken2XXResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
@@ -107,29 +107,29 @@ var GetToken200Response = /*#__PURE__*/function () {
107
107
  * The Org Access Token.
108
108
  * @member {String} access_token
109
109
  */
110
- GetToken200Response.prototype['access_token'] = undefined;
110
+ GetToken2XXResponse.prototype['access_token'] = undefined;
111
111
 
112
112
  /**
113
113
  * The type of the tokens, which is Bearer.
114
114
  * @member {String} token_type
115
115
  */
116
- GetToken200Response.prototype['token_type'] = undefined;
116
+ GetToken2XXResponse.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
119
  * The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app.
120
120
  * @member {String} scope
121
121
  */
122
- GetToken200Response.prototype['scope'] = undefined;
122
+ GetToken2XXResponse.prototype['scope'] = undefined;
123
123
 
124
124
  /**
125
125
  * The time in seconds in which the Org Access Token expires.
126
126
  * @member {Number} expires_in
127
127
  */
128
- GetToken200Response.prototype['expires_in'] = undefined;
128
+ GetToken2XXResponse.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
131
  * The Refresh Token, used to obtain a new Org Access Token when the current Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change.
132
132
  * @member {String} refresh_token
133
133
  */
134
- GetToken200Response.prototype['refresh_token'] = undefined;
135
- var _default = exports["default"] = GetToken200Response;
134
+ GetToken2XXResponse.prototype['refresh_token'] = undefined;
135
+ var _default = exports["default"] = GetToken2XXResponse;
@@ -34,10 +34,11 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
34
34
  * The response of a failed request.
35
35
  * @alias module:model/GetToken4XXResponse
36
36
  * @param error {String} The error name.
37
+ * @param error_description {String} The error description.
37
38
  */
38
- function GetToken4XXResponse(error) {
39
+ function GetToken4XXResponse(error, error_description) {
39
40
  _classCallCheck(this, GetToken4XXResponse);
40
- GetToken4XXResponse.initialize(this, error);
41
+ GetToken4XXResponse.initialize(this, error, error_description);
41
42
  }
42
43
 
43
44
  /**
@@ -47,8 +48,9 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
47
48
  */
48
49
  return _createClass(GetToken4XXResponse, null, [{
49
50
  key: "initialize",
50
- value: function initialize(obj, error) {
51
+ value: function initialize(obj, error, error_description) {
51
52
  obj['error'] = error;
53
+ obj['error_description'] = error_description;
52
54
  }
53
55
 
54
56
  /**
@@ -66,8 +68,8 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
66
68
  if (data.hasOwnProperty('error')) {
67
69
  obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
68
70
  }
69
- if (data.hasOwnProperty('error_message')) {
70
- obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
71
+ if (data.hasOwnProperty('error_description')) {
72
+ obj['error_description'] = _ApiClient["default"].convertToType(data['error_description'], 'String');
71
73
  }
72
74
  }
73
75
  return obj;
@@ -101,14 +103,14 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
101
103
  throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
102
104
  }
103
105
  // ensure the json data is a string
104
- if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
105
- throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
106
+ if (data['error_description'] && !(typeof data['error_description'] === 'string' || data['error_description'] instanceof String)) {
107
+ throw new Error("Expected the field `error_description` to be a primitive type in the JSON string but got " + data['error_description']);
106
108
  }
107
109
  return true;
108
110
  }
109
111
  }]);
110
112
  }();
111
- GetToken4XXResponse.RequiredProperties = ["error"];
113
+ GetToken4XXResponse.RequiredProperties = ["error", "error_description"];
112
114
 
113
115
  /**
114
116
  * The error name.
@@ -118,7 +120,7 @@ GetToken4XXResponse.prototype['error'] = undefined;
118
120
 
119
121
  /**
120
122
  * The error description.
121
- * @member {String} error_message
123
+ * @member {String} error_description
122
124
  */
123
- GetToken4XXResponse.prototype['error_message'] = undefined;
125
+ GetToken4XXResponse.prototype['error_description'] = undefined;
124
126
  var _default = exports["default"] = GetToken4XXResponse;
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var MPCDelegate = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>MPCDelegate</code>.
35
- * The information about the MPC Wallet as the Delegate.
35
+ * The information about the MPC Wallet as the Delegate. You can call the [List Delegates](/v2/api-references/wallets--smart-contract-wallets/list-delegates) operation to retrieve the applicable Delegates.
36
36
  * @alias module:model/MPCDelegate
37
37
  * @param delegate_type {module:model/CoboSafeDelegateType}
38
38
  * @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  var MpcTransferSource = /*#__PURE__*/function () {
34
34
  /**
35
35
  * Constructs a new <code>MpcTransferSource</code>.
36
- * The information about the transaction source types &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. If you specify both the &#x60;address&#x60; or &#x60;included_utxos&#x60; properties, the specified included UTXOs must belong to the address. Switch between the tabs to display the properties for different transaction sources.
36
+ * The information about the transaction source types &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. You need to provide either the &#x60;address&#x60; or &#x60;included_utxos&#x60; property. If neither property is provided, the transfer will fail. Switch between the tabs to display the properties for different transaction sources.
37
37
  * @alias module:model/MpcTransferSource
38
38
  * @param source_type {module:model/WalletSubtype}
39
39
  * @param wallet_id {String} The wallet ID.
@@ -177,7 +177,7 @@ MpcTransferSource.prototype['source_type'] = undefined;
177
177
  MpcTransferSource.prototype['wallet_id'] = undefined;
178
178
 
179
179
  /**
180
- * The wallet address.
180
+ * The wallet address. If you want to specify the UTXOs to be used, please provide the `included_utxos` property. If you specify both the `address` and `included_utxos` properties, the specified included UTXOs must belong to the address. You need to provide either the `address` or `included_utxos` property. If neither property is provided, the transfer will fail.
181
181
  * @member {String} address
182
182
  */
183
183
  MpcTransferSource.prototype['address'] = undefined;
@@ -22,17 +22,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
22
22
  *
23
23
  */
24
24
  /**
25
- * The RefreshToken201Response model module.
26
- * @module model/RefreshToken201Response
25
+ * The RefreshToken2XXResponse model module.
26
+ * @module model/RefreshToken2XXResponse
27
27
  */
28
- var RefreshToken201Response = /*#__PURE__*/function () {
28
+ var RefreshToken2XXResponse = /*#__PURE__*/function () {
29
29
  /**
30
- * Constructs a new <code>RefreshToken201Response</code>.
31
- * @alias module:model/RefreshToken201Response
30
+ * Constructs a new <code>RefreshToken2XXResponse</code>.
31
+ * @alias module:model/RefreshToken2XXResponse
32
32
  */
33
- function RefreshToken201Response() {
34
- _classCallCheck(this, RefreshToken201Response);
35
- RefreshToken201Response.initialize(this);
33
+ function RefreshToken2XXResponse() {
34
+ _classCallCheck(this, RefreshToken2XXResponse);
35
+ RefreshToken2XXResponse.initialize(this);
36
36
  }
37
37
 
38
38
  /**
@@ -40,22 +40,22 @@ var RefreshToken201Response = /*#__PURE__*/function () {
40
40
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
41
  * Only for internal use.
42
42
  */
43
- return _createClass(RefreshToken201Response, null, [{
43
+ return _createClass(RefreshToken2XXResponse, null, [{
44
44
  key: "initialize",
45
45
  value: function initialize(obj) {}
46
46
 
47
47
  /**
48
- * Constructs a <code>RefreshToken201Response</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Constructs a <code>RefreshToken2XXResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
49
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
50
  * @param {Object} data The plain JavaScript object bearing properties of interest.
51
- * @param {module:model/RefreshToken201Response} obj Optional instance to populate.
52
- * @return {module:model/RefreshToken201Response} The populated <code>RefreshToken201Response</code> instance.
51
+ * @param {module:model/RefreshToken2XXResponse} obj Optional instance to populate.
52
+ * @return {module:model/RefreshToken2XXResponse} The populated <code>RefreshToken2XXResponse</code> instance.
53
53
  */
54
54
  }, {
55
55
  key: "constructFromObject",
56
56
  value: function constructFromObject(data, obj) {
57
57
  if (data) {
58
- obj = obj || new RefreshToken201Response();
58
+ obj = obj || new RefreshToken2XXResponse();
59
59
  if (data.hasOwnProperty('access_token')) {
60
60
  obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
61
61
  }
@@ -76,9 +76,9 @@ var RefreshToken201Response = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>RefreshToken201Response</code>.
79
+ * Validates the JSON data with respect to <code>RefreshToken2XXResponse</code>.
80
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
81
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken201Response</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken2XXResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
@@ -107,29 +107,29 @@ var RefreshToken201Response = /*#__PURE__*/function () {
107
107
  * The new Org Access Token.
108
108
  * @member {String} access_token
109
109
  */
110
- RefreshToken201Response.prototype['access_token'] = undefined;
110
+ RefreshToken2XXResponse.prototype['access_token'] = undefined;
111
111
 
112
112
  /**
113
113
  * The type of the tokens, which is Bearer.
114
114
  * @member {String} token_type
115
115
  */
116
- RefreshToken201Response.prototype['token_type'] = undefined;
116
+ RefreshToken2XXResponse.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
119
  * The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app.
120
120
  * @member {String} scope
121
121
  */
122
- RefreshToken201Response.prototype['scope'] = undefined;
122
+ RefreshToken2XXResponse.prototype['scope'] = undefined;
123
123
 
124
124
  /**
125
125
  * The time in seconds in which the new Org Access Token expires.
126
126
  * @member {Number} expires_in
127
127
  */
128
- RefreshToken201Response.prototype['expires_in'] = undefined;
128
+ RefreshToken2XXResponse.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
131
  * The Refresh Token, used to obtain another Org Access Token when the new Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change.
132
132
  * @member {String} refresh_token
133
133
  */
134
- RefreshToken201Response.prototype['refresh_token'] = undefined;
135
- var _default = exports["default"] = RefreshToken201Response;
134
+ RefreshToken2XXResponse.prototype['refresh_token'] = undefined;
135
+ var _default = exports["default"] = RefreshToken2XXResponse;