@cobo/cobo-waas2 1.5.0 → 1.7.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 (166) hide show
  1. package/README.md +31 -5
  2. package/dist/ApiClient.js +56 -6
  3. package/dist/ServerDemo.js +80 -0
  4. package/dist/api/DevelopersApi.js +79 -0
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/OAuthApi.js +8 -8
  7. package/dist/api/StakingsApi.js +91 -7
  8. package/dist/api/TransactionsApi.js +4 -4
  9. package/dist/api/WalletsApi.js +58 -57
  10. package/dist/crypto/Ed25519Signer.js +36 -0
  11. package/dist/crypto/Secp256k1Signer.js +36 -0
  12. package/dist/index.js +153 -13
  13. package/dist/model/Activity.js +4 -8
  14. package/dist/model/ActivityAction.js +20 -0
  15. package/dist/model/ActivityType.js +5 -0
  16. package/dist/model/AddressTransferDestination.js +2 -2
  17. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
  18. package/dist/model/AutoFuelType.js +61 -0
  19. package/dist/model/BabylonStakeEstimatedFee.js +118 -0
  20. package/dist/model/BabylonValidator.js +9 -12
  21. package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
  22. package/dist/model/ContractCallParams.js +9 -0
  23. package/dist/model/CoreStakeExtra.js +170 -0
  24. package/dist/model/CoreStakingExtra.js +187 -0
  25. package/dist/model/CreateClaimActivity.js +139 -0
  26. package/dist/model/CreateClaimActivityRequest.js +182 -0
  27. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  28. package/dist/model/CreateStakeActivity.js +4 -8
  29. package/dist/model/CreateStakeActivityExtra.js +94 -8
  30. package/dist/model/CreateStakeActivityRequest.js +5 -10
  31. package/dist/model/CreateUnstakeActivity.js +16 -0
  32. package/dist/model/CreateUnstakeActivityExtra.js +159 -0
  33. package/dist/model/CreateUnstakeActivityRequest.js +20 -0
  34. package/dist/model/CreateWithdrawActivity.js +0 -13
  35. package/dist/model/CreateWithdrawActivityRequest.js +0 -18
  36. package/dist/model/EstimateClaimFee.js +145 -0
  37. package/dist/model/EstimateContractCallFeeParams.js +6 -8
  38. package/dist/model/EstimateFeeParams.js +1 -1
  39. package/dist/model/EstimateStakeFee.js +5 -10
  40. package/dist/model/EstimateTransferFeeParams.js +4 -8
  41. package/dist/model/EstimateUnstakeFee.js +20 -0
  42. package/dist/model/EstimateWithdrawFee.js +0 -18
  43. package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
  44. package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
  45. package/dist/model/EstimatedFee.js +1 -1
  46. package/dist/model/EstimatedFixedFee.js +4 -4
  47. package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
  48. package/dist/model/EthStakeEstimatedFee.js +112 -0
  49. package/dist/model/EthStakeExtra.js +131 -0
  50. package/dist/model/EthStakingExtra.js +162 -0
  51. package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
  52. package/dist/model/EthUnstakeExtra.js +131 -0
  53. package/dist/model/FeeAmount.js +1 -1
  54. package/dist/model/FeeGasLimit.js +1 -2
  55. package/dist/model/FeeRate.js +1 -1
  56. package/dist/model/FixedFeeRate.js +2 -2
  57. package/dist/model/GetApiKeyInfo200Response.js +251 -0
  58. package/dist/model/GetStakingEstimationFee201Response.js +144 -43
  59. package/dist/model/GetStakingEstimationFeeRequest.js +41 -19
  60. package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
  61. package/dist/model/GetToken4XXResponse.js +12 -10
  62. package/dist/model/MPCDelegate.js +1 -1
  63. package/dist/model/MPCProject.js +4 -4
  64. package/dist/model/MpcTransferSource.js +2 -2
  65. package/dist/model/Pagination.js +2 -2
  66. package/dist/model/{RefreshToken201Response.js → RefreshToken2XXResponse.js} +21 -21
  67. package/dist/model/RoleScopes.js +128 -0
  68. package/dist/model/Scopes.js +142 -0
  69. package/dist/model/SmartContractWalletInfo.js +1 -1
  70. package/dist/model/StakingPoolId.js +81 -0
  71. package/dist/model/StakingPoolType.js +10 -0
  72. package/dist/model/Stakings.js +10 -14
  73. package/dist/model/StakingsExtra.js +95 -8
  74. package/dist/model/TransactionEvmEip1559Fee.js +2 -4
  75. package/dist/model/TransactionEvmLegacyFee.js +2 -4
  76. package/dist/model/TransactionFee.js +1 -2
  77. package/dist/model/TransactionRbf.js +9 -0
  78. package/dist/model/TransactionRbfSource.js +1 -1
  79. package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -3
  80. package/dist/model/TransactionRequestEvmLegacyFee.js +2 -3
  81. package/dist/model/TransactionRequestFee.js +1 -2
  82. package/dist/model/TransactionRequestFixedFee.js +1 -1
  83. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  84. package/dist/model/TransactionSource.js +1 -1
  85. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
  86. package/dist/model/TransferDestination.js +2 -2
  87. package/dist/model/TransferParams.js +9 -0
  88. package/docs/Activity.md +1 -1
  89. package/docs/ActivityAction.md +8 -0
  90. package/docs/ActivityType.md +2 -0
  91. package/docs/AddressTransferDestination.md +2 -2
  92. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
  93. package/docs/AutoFuelType.md +12 -0
  94. package/docs/BabylonStakeEstimatedFee.md +12 -0
  95. package/docs/BabylonValidator.md +6 -4
  96. package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
  97. package/docs/ContractCallParams.md +1 -0
  98. package/docs/CoreStakeExtra.md +13 -0
  99. package/docs/CoreStakingExtra.md +14 -0
  100. package/docs/CreateClaimActivity.md +11 -0
  101. package/docs/CreateClaimActivityRequest.md +12 -0
  102. package/docs/CreateStakeActivity.md +1 -1
  103. package/docs/CreateStakeActivityExtra.md +5 -0
  104. package/docs/CreateStakeActivityRequest.md +1 -1
  105. package/docs/CreateUnstakeActivity.md +1 -0
  106. package/docs/CreateUnstakeActivityExtra.md +10 -0
  107. package/docs/CreateUnstakeActivityRequest.md +1 -0
  108. package/docs/CreateWithdrawActivity.md +0 -1
  109. package/docs/CreateWithdrawActivityRequest.md +0 -1
  110. package/docs/DevelopersApi.md +55 -0
  111. package/docs/DevelopersWebhooksApi.md +1 -1
  112. package/docs/EstimateClaimFee.md +11 -0
  113. package/docs/EstimateContractCallFeeParams.md +2 -2
  114. package/docs/EstimateFeeParams.md +2 -2
  115. package/docs/EstimateStakeFee.md +1 -1
  116. package/docs/EstimateTransferFeeParams.md +2 -2
  117. package/docs/EstimateUnstakeFee.md +1 -0
  118. package/docs/EstimateWithdrawFee.md +0 -1
  119. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
  120. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
  121. package/docs/EstimatedFee.md +1 -1
  122. package/docs/EstimatedFixedFee.md +1 -1
  123. package/docs/EstimatedUtxoFeeSlow.md +1 -1
  124. package/docs/EthStakeEstimatedFee.md +11 -0
  125. package/docs/EthStakeExtra.md +10 -0
  126. package/docs/EthStakingExtra.md +11 -0
  127. package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
  128. package/docs/EthUnstakeExtra.md +10 -0
  129. package/docs/FeeAmount.md +1 -1
  130. package/docs/FeeGasLimit.md +1 -1
  131. package/docs/FeeRate.md +1 -1
  132. package/docs/FixedFeeRate.md +1 -1
  133. package/docs/GetApiKeyInfo200Response.md +30 -0
  134. package/docs/GetStakingEstimationFee201Response.md +3 -0
  135. package/docs/GetStakingEstimationFeeRequest.md +3 -4
  136. package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
  137. package/docs/GetToken4XXResponse.md +1 -1
  138. package/docs/MPCProject.md +1 -1
  139. package/docs/MpcTransferSource.md +1 -1
  140. package/docs/OAuthApi.md +4 -4
  141. package/docs/Pagination.md +1 -1
  142. package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -4
  143. package/docs/{RefreshToken201Response.md → RefreshToken2XXResponse.md} +1 -1
  144. package/docs/RoleScopes.md +10 -0
  145. package/docs/Scopes.md +13 -0
  146. package/docs/StakingPoolId.md +20 -0
  147. package/docs/StakingPoolType.md +4 -0
  148. package/docs/Stakings.md +2 -2
  149. package/docs/StakingsApi.md +108 -2
  150. package/docs/StakingsExtra.md +5 -0
  151. package/docs/TransactionEvmEip1559Fee.md +1 -1
  152. package/docs/TransactionEvmLegacyFee.md +1 -1
  153. package/docs/TransactionFee.md +1 -1
  154. package/docs/TransactionRbf.md +1 -0
  155. package/docs/TransactionRbfSource.md +1 -1
  156. package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
  157. package/docs/TransactionRequestEvmLegacyFee.md +1 -1
  158. package/docs/TransactionRequestFee.md +1 -1
  159. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
  160. package/docs/TransactionsApi.md +2 -2
  161. package/docs/TransferDestination.md +2 -2
  162. package/docs/TransferParams.md +1 -0
  163. package/docs/WalletsApi.md +54 -54
  164. package/package.json +4 -2
  165. package/dist/model/StakingsValidatorInfo.js +0 -140
  166. package/docs/StakingsValidatorInfo.md +0 -13
@@ -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}).
@@ -72,8 +72,8 @@ var MPCProject = /*#__PURE__*/function () {
72
72
  if (data.hasOwnProperty('threshold')) {
73
73
  obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
74
74
  }
75
- if (data.hasOwnProperty('create_timestamp')) {
76
- obj['create_timestamp'] = _ApiClient["default"].convertToType(data['create_timestamp'], 'Number');
75
+ if (data.hasOwnProperty('created_timestamp')) {
76
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
77
77
  }
78
78
  }
79
79
  return obj;
@@ -135,7 +135,7 @@ MPCProject.prototype['threshold'] = undefined;
135
135
 
136
136
  /**
137
137
  * The project's creation time in Unix timestamp format, measured in milliseconds.
138
- * @member {Number} create_timestamp
138
+ * @member {Number} created_timestamp
139
139
  */
140
- MPCProject.prototype['create_timestamp'] = undefined;
140
+ MPCProject.prototype['created_timestamp'] = undefined;
141
141
  var _default = exports["default"] = MPCProject;
@@ -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. It is recommended to specify no more than 100 included UTXOs to ensure optimal transaction processing. 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;
@@ -35,7 +35,7 @@ var Pagination = /*#__PURE__*/function () {
35
35
  * @alias module:model/Pagination
36
36
  * @param before {String} An object ID that serves as a starting point for retrieving data in reverse chronological order for the next request. If this property is empty, it means that you have reached the start of the data records.
37
37
  * @param after {String} An object ID that acts as a starting point for retrieving data in chronological order for the next request. If this property is empty, it means that you have reached the end of the data records.
38
- * @param total_count {Number} The total number of records that match the query, across all pages.
38
+ * @param total_count {Number} The total number of records that match the query criteria, unaffected by the pagination parameters (`before` , `after`, and `limit`).
39
39
  */
40
40
  function Pagination(before, after, total_count) {
41
41
  _classCallCheck(this, Pagination);
@@ -130,7 +130,7 @@ Pagination.prototype['before'] = undefined;
130
130
  Pagination.prototype['after'] = undefined;
131
131
 
132
132
  /**
133
- * The total number of records that match the query, across all pages.
133
+ * The total number of records that match the query criteria, unaffected by the pagination parameters (`before` , `after`, and `limit`).
134
134
  * @member {Number} total_count
135
135
  */
136
136
  Pagination.prototype['total_count'] = 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;
@@ -0,0 +1,128 @@
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 _Scopes = _interopRequireDefault(require("./Scopes"));
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 _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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The RoleScopes model module.
30
+ * @module model/RoleScopes
31
+ */
32
+ var RoleScopes = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>RoleScopes</code>.
35
+ * @alias module:model/RoleScopes
36
+ * @param role_name {String} The user role associated with this API key.
37
+ * @param scopes {module:model/Scopes}
38
+ */
39
+ function RoleScopes(role_name, scopes) {
40
+ _classCallCheck(this, RoleScopes);
41
+ RoleScopes.initialize(this, role_name, scopes);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ return _createClass(RoleScopes, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, role_name, scopes) {
52
+ obj['role_name'] = role_name;
53
+ obj['scopes'] = scopes;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>RoleScopes</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/RoleScopes} obj Optional instance to populate.
61
+ * @return {module:model/RoleScopes} The populated <code>RoleScopes</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new RoleScopes();
68
+ if (data.hasOwnProperty('role_name')) {
69
+ obj['role_name'] = _ApiClient["default"].convertToType(data['role_name'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('scopes')) {
72
+ obj['scopes'] = _Scopes["default"].constructFromObject(data['scopes']);
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>RoleScopes</code>.
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>RoleScopes</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(RoleScopes.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['role_name'] && !(typeof data['role_name'] === 'string' || data['role_name'] instanceof String)) {
103
+ throw new Error("Expected the field `role_name` to be a primitive type in the JSON string but got " + data['role_name']);
104
+ }
105
+ // validate the optional field `scopes`
106
+ if (data['scopes']) {
107
+ // data not null
108
+ if (!!_Scopes["default"].validateJSON) {
109
+ _Scopes["default"].validateJSON(data['scopes']);
110
+ }
111
+ }
112
+ return true;
113
+ }
114
+ }]);
115
+ }();
116
+ RoleScopes.RequiredProperties = ["role_name", "scopes"];
117
+
118
+ /**
119
+ * The user role associated with this API key.
120
+ * @member {String} role_name
121
+ */
122
+ RoleScopes.prototype['role_name'] = undefined;
123
+
124
+ /**
125
+ * @member {module:model/Scopes} scopes
126
+ */
127
+ RoleScopes.prototype['scopes'] = undefined;
128
+ var _default = exports["default"] = RoleScopes;
@@ -0,0 +1,142 @@
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 _WalletSubtype = _interopRequireDefault(require("./WalletSubtype"));
9
+ var _WalletType = _interopRequireDefault(require("./WalletType"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ 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); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ 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); } /**
17
+ * Cobo Wallet as a Service 2.0
18
+ *
19
+ * Contact: help@cobo.com
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The Scopes model module.
28
+ * @module model/Scopes
29
+ */
30
+ var Scopes = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>Scopes</code>.
33
+ * The wallet scopes associated with this API key.
34
+ * @alias module:model/Scopes
35
+ */
36
+ function Scopes() {
37
+ _classCallCheck(this, Scopes);
38
+ Scopes.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(Scopes, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>Scopes</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/Scopes} obj Optional instance to populate.
55
+ * @return {module:model/Scopes} The populated <code>Scopes</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new Scopes();
62
+ if (data.hasOwnProperty('wallet_types')) {
63
+ obj['wallet_types'] = _ApiClient["default"].convertToType(data['wallet_types'], [_WalletType["default"]]);
64
+ }
65
+ if (data.hasOwnProperty('wallet_subtypes')) {
66
+ obj['wallet_subtypes'] = _ApiClient["default"].convertToType(data['wallet_subtypes'], [_WalletSubtype["default"]]);
67
+ }
68
+ if (data.hasOwnProperty('wallet_ids')) {
69
+ obj['wallet_ids'] = _ApiClient["default"].convertToType(data['wallet_ids'], ['String']);
70
+ }
71
+ if (data.hasOwnProperty('vault_ids')) {
72
+ obj['vault_ids'] = _ApiClient["default"].convertToType(data['vault_ids'], ['String']);
73
+ }
74
+ if (data.hasOwnProperty('project_ids')) {
75
+ obj['project_ids'] = _ApiClient["default"].convertToType(data['project_ids'], ['String']);
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>Scopes</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Scopes</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // ensure the json data is an array
90
+ if (!Array.isArray(data['wallet_types'])) {
91
+ throw new Error("Expected the field `wallet_types` to be an array in the JSON data but got " + data['wallet_types']);
92
+ }
93
+ // ensure the json data is an array
94
+ if (!Array.isArray(data['wallet_subtypes'])) {
95
+ throw new Error("Expected the field `wallet_subtypes` to be an array in the JSON data but got " + data['wallet_subtypes']);
96
+ }
97
+ // ensure the json data is an array
98
+ if (!Array.isArray(data['wallet_ids'])) {
99
+ throw new Error("Expected the field `wallet_ids` to be an array in the JSON data but got " + data['wallet_ids']);
100
+ }
101
+ // ensure the json data is an array
102
+ if (!Array.isArray(data['vault_ids'])) {
103
+ throw new Error("Expected the field `vault_ids` to be an array in the JSON data but got " + data['vault_ids']);
104
+ }
105
+ // ensure the json data is an array
106
+ if (!Array.isArray(data['project_ids'])) {
107
+ throw new Error("Expected the field `project_ids` to be an array in the JSON data but got " + data['project_ids']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ /**
114
+ * The list of wallet types that this API key can access. Possible values include: - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
115
+ * @member {Array.<module:model/WalletType>} wallet_types
116
+ */
117
+ Scopes.prototype['wallet_types'] = undefined;
118
+
119
+ /**
120
+ * The list of wallet sub-types that this API key can access. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
121
+ * @member {Array.<module:model/WalletSubtype>} wallet_subtypes
122
+ */
123
+ Scopes.prototype['wallet_subtypes'] = undefined;
124
+
125
+ /**
126
+ * The list of wallet IDs that this API key can access.
127
+ * @member {Array.<String>} wallet_ids
128
+ */
129
+ Scopes.prototype['wallet_ids'] = undefined;
130
+
131
+ /**
132
+ * (Applicable to MPC Wallets only) The list of vault IDs that this API key can access.
133
+ * @member {Array.<String>} vault_ids
134
+ */
135
+ Scopes.prototype['vault_ids'] = undefined;
136
+
137
+ /**
138
+ * (Applicable to MPC Wallets only) The list of project IDs that this API key can access.
139
+ * @member {Array.<String>} project_ids
140
+ */
141
+ Scopes.prototype['project_ids'] = undefined;
142
+ var _default = exports["default"] = Scopes;
@@ -57,7 +57,7 @@ var SmartContractWalletInfo = /*#__PURE__*/function () {
57
57
  var discriminatorValue = instance["smart_contract_wallet_type"];
58
58
  if (discriminatorValue) {
59
59
  switch (discriminatorValue) {
60
- case "Safe":
60
+ case "Safe{Wallet}":
61
61
  this.actualInstance = _SafeWallet["default"].constructFromObject(instance);
62
62
  match++;
63
63
  break;