@cobo/cobo-waas2 1.3.0 → 1.5.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 (128) hide show
  1. package/README.md +22 -10
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +105 -0
  4. package/dist/api/DevelopersWebhooksApi.js +43 -0
  5. package/dist/api/OAuthApi.js +18 -18
  6. package/dist/api/TransactionsApi.js +14 -14
  7. package/dist/api/WalletsApi.js +4 -4
  8. package/dist/api/WalletsExchangeWalletApi.js +4 -4
  9. package/dist/api/WalletsMPCWalletsApi.js +10 -10
  10. package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
  11. package/dist/index.js +108 -31
  12. package/dist/model/AddressBook.js +217 -0
  13. package/dist/model/AddressTransferDestination.js +2 -2
  14. package/dist/model/ApiLogDetails.js +238 -0
  15. package/dist/model/ApiLogSummary.js +161 -0
  16. package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
  17. package/dist/model/CoboSafeDelegate.js +2 -2
  18. package/dist/model/ContractCallSource.js +0 -6
  19. package/dist/model/CreateKeyShareHolder.js +2 -2
  20. package/dist/model/ErrorResponse.js +2 -2
  21. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  22. package/dist/model/EstimateFeeParams.js +2 -2
  23. package/dist/model/EstimateTransferFeeParams.js +2 -2
  24. package/dist/model/EstimatedFee.js +1 -1
  25. package/dist/model/EstimatedFixedFee.js +1 -1
  26. package/dist/model/ExchangeId.js +10 -0
  27. package/dist/model/ExtendedTokenInfo.js +17 -4
  28. package/dist/model/GetToken200Response.js +4 -4
  29. package/dist/model/KeyShareHolder.js +1 -1
  30. package/dist/model/ListAddressBooks200Response.js +123 -0
  31. package/dist/model/MPCDelegate.js +4 -4
  32. package/dist/model/MessageSignParams.js +1 -1
  33. package/dist/model/MpcContractCallSource.js +0 -9
  34. package/dist/model/{RefreshToken200Response.js → RefreshToken201Response.js} +25 -25
  35. package/dist/model/RefreshTokenRequest.js +2 -2
  36. package/dist/model/SafeWalletDelegates.js +210 -0
  37. package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
  38. package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
  39. package/dist/model/TSSRequestStatus.js +5 -0
  40. package/dist/model/TokenAssetModelType.js +61 -0
  41. package/dist/model/TokenBalanceBalance.js +6 -6
  42. package/dist/model/TokenInfo.js +11 -2
  43. package/dist/model/Transaction.js +1 -1
  44. package/dist/model/TransactionDestination.js +50 -10
  45. package/dist/model/TransactionDestinationType.js +5 -0
  46. package/dist/model/TransactionDetail.js +2 -2
  47. package/dist/model/TransactionDetails.js +2 -2
  48. package/dist/model/TransactionEvmCalldataInfo.js +177 -0
  49. package/dist/model/TransactionEvmContractDestination.js +16 -0
  50. package/dist/model/TransactionEvmContractMethod.js +136 -0
  51. package/dist/model/TransactionRawMessageSignDestination.js +120 -0
  52. package/dist/model/TransactionSignatureResult.js +1 -1
  53. package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
  54. package/dist/model/TransactionStatus.js +0 -5
  55. package/dist/model/TransactionSubStatus.js +40 -5
  56. package/dist/model/TransactionTokeApproval.js +17 -4
  57. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  58. package/dist/model/TransactionWebhookEventData.js +2 -2
  59. package/dist/model/TransferDestination.js +2 -2
  60. package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
  61. package/dist/model/{WalletBalanceSnapshot.js → TriggerTestWebhookEventRequest.js} +31 -36
  62. package/dist/model/WebhookEventData.js +1 -1
  63. package/docs/AddressBook.md +17 -0
  64. package/docs/AddressBooksApi.md +71 -0
  65. package/docs/AddressTransferDestination.md +2 -2
  66. package/docs/ApiLogDetails.md +18 -0
  67. package/docs/ApiLogSummary.md +13 -0
  68. package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
  69. package/docs/CoboSafeDelegate.md +2 -2
  70. package/docs/ContractCallSource.md +0 -1
  71. package/docs/CreateKeyShareHolder.md +2 -2
  72. package/docs/DevelopersWebhooksApi.md +53 -0
  73. package/docs/ErrorResponse.md +1 -1
  74. package/docs/EstimateContractCallFeeParams.md +1 -1
  75. package/docs/EstimateFeeParams.md +1 -1
  76. package/docs/EstimateTransferFeeParams.md +1 -1
  77. package/docs/EstimatedFee.md +1 -1
  78. package/docs/EstimatedFixedFee.md +1 -1
  79. package/docs/ExchangeId.md +4 -0
  80. package/docs/ExtendedTokenInfo.md +3 -2
  81. package/docs/GetToken200Response.md +4 -4
  82. package/docs/KeyShareHolder.md +1 -1
  83. package/docs/ListAddressBooks200Response.md +10 -0
  84. package/docs/MPCDelegate.md +2 -2
  85. package/docs/MessageSignParams.md +1 -1
  86. package/docs/MpcContractCallSource.md +0 -1
  87. package/docs/OAuthApi.md +11 -11
  88. package/docs/RefreshToken201Response.md +13 -0
  89. package/docs/RefreshTokenRequest.md +2 -2
  90. package/docs/SafeWalletDelegates.md +14 -0
  91. package/docs/SafeWalletDelegatesContractCall.md +12 -0
  92. package/docs/SafeWalletDelegatesTransfer.md +12 -0
  93. package/docs/TSSRequestStatus.md +2 -0
  94. package/docs/TokenAssetModelType.md +12 -0
  95. package/docs/TokenBalanceBalance.md +4 -4
  96. package/docs/TokenInfo.md +3 -2
  97. package/docs/Transaction.md +1 -1
  98. package/docs/TransactionDestination.md +4 -2
  99. package/docs/TransactionDestinationType.md +2 -0
  100. package/docs/TransactionDetail.md +1 -1
  101. package/docs/TransactionDetails.md +1 -1
  102. package/docs/TransactionEvmCalldataInfo.md +16 -0
  103. package/docs/TransactionEvmContractDestination.md +1 -0
  104. package/docs/TransactionEvmContractMethod.md +13 -0
  105. package/docs/TransactionRawMessageSignDestination.md +10 -0
  106. package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
  107. package/docs/TransactionSource.md +1 -1
  108. package/docs/TransactionStatus.md +0 -2
  109. package/docs/TransactionSubStatus.md +16 -2
  110. package/docs/TransactionTokeApproval.md +3 -2
  111. package/docs/TransactionTransferToAddressDestination.md +2 -2
  112. package/docs/TransactionWebhookEventData.md +1 -1
  113. package/docs/TransactionsApi.md +8 -8
  114. package/docs/TransferDestination.md +2 -2
  115. package/docs/TriggerTestWebhookEvent201Response.md +9 -0
  116. package/docs/TriggerTestWebhookEventRequest.md +10 -0
  117. package/docs/WalletsApi.md +2 -2
  118. package/docs/WalletsExchangeWalletApi.md +2 -2
  119. package/docs/WalletsMPCWalletsApi.md +5 -5
  120. package/docs/WalletsSmartContractWalletsApi.md +63 -0
  121. package/docs/WebhookEventData.md +1 -1
  122. package/package.json +2 -2
  123. package/dist/model/BookkeepingRecord.js +0 -243
  124. package/docs/BookkeepingRecord.md +0 -19
  125. package/docs/BookkeepingSummary.md +0 -12
  126. package/docs/RefreshToken200Response.md +0 -13
  127. package/docs/WalletBalanceSnapshot.md +0 -10
  128. package/docs/WalletBalanceSnapshotRecord.md +0 -13
@@ -154,13 +154,13 @@ _defineProperty(CoboSafeDelegate, "fromJSON", function (json_string) {
154
154
  CoboSafeDelegate.prototype['delegate_type'] = undefined;
155
155
 
156
156
  /**
157
- * The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
157
+ * The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
158
158
  * @member {String} wallet_id
159
159
  */
160
160
  CoboSafeDelegate.prototype['wallet_id'] = undefined;
161
161
 
162
162
  /**
163
- * The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
163
+ * The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
164
164
  * @member {String} address
165
165
  */
166
166
  CoboSafeDelegate.prototype['address'] = undefined;
@@ -194,12 +194,6 @@ ContractCallSource.prototype['wallet_id'] = undefined;
194
194
  */
195
195
  ContractCallSource.prototype['address'] = undefined;
196
196
 
197
- /**
198
- * The transaction nonce.
199
- * @member {Number} nonce
200
- */
201
- ContractCallSource.prototype['nonce'] = undefined;
202
-
203
197
  /**
204
198
  * @member {module:model/CoboSafeDelegate} delegate
205
199
  */
@@ -106,13 +106,13 @@ CreateKeyShareHolder.prototype['name'] = undefined;
106
106
  CreateKeyShareHolder.prototype['type'] = undefined;
107
107
 
108
108
  /**
109
- * Key share holder's TSS Node ID.
109
+ * Key share holder's TSS Node ID. You can obtain the TSS Node ID using either mobile co-signer or API co-signer. See the \"Primary Purposes\" row on the table in [Create a Main Group](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/create-key-share-groups#create-a-main-group).
110
110
  * @member {String} tss_node_id
111
111
  */
112
112
  CreateKeyShareHolder.prototype['tss_node_id'] = undefined;
113
113
 
114
114
  /**
115
- * Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer.
115
+ * Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer.
116
116
  * @member {Boolean} signer
117
117
  */
118
118
  CreateKeyShareHolder.prototype['signer'] = undefined;
@@ -33,7 +33,7 @@ var ErrorResponse = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>ErrorResponse</code>.
34
34
  * The response of a failed request.
35
35
  * @alias module:model/ErrorResponse
36
- * @param error_code {Number} The error code.
36
+ * @param error_code {Number} The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
37
37
  * @param error_message {String} The error description.
38
38
  * @param error_id {String} The error log ID. You can provide the error ID when submitting a ticket to help Cobo to locate the issue.
39
39
  */
@@ -118,7 +118,7 @@ var ErrorResponse = /*#__PURE__*/function () {
118
118
  ErrorResponse.RequiredProperties = ["error_code", "error_message", "error_id"];
119
119
 
120
120
  /**
121
- * The error code.
121
+ * The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
122
122
  * @member {Number} error_code
123
123
  */
124
124
  ErrorResponse.prototype['error_code'] = undefined;
@@ -37,7 +37,7 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
37
37
  * Constructs a new <code>EstimateContractCallFeeParams</code>.
38
38
  * The information about a transaction that interacts with a smart contract
39
39
  * @alias module:model/EstimateContractCallFeeParams
40
- * @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
40
+ * @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
41
41
  * @param request_type {module:model/EstimateFeeRequestType}
42
42
  * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
43
43
  * @param source {module:model/ContractCallSource}
@@ -149,7 +149,7 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
149
149
  EstimateContractCallFeeParams.RequiredProperties = ["request_id", "request_type", "chain_id", "source", "destination"];
150
150
 
151
151
  /**
152
- * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
152
+ * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
153
153
  * @member {String} request_id
154
154
  */
155
155
  EstimateContractCallFeeParams.prototype['request_id'] = undefined;
@@ -58,7 +58,7 @@ var EstimateFeeParams = /*#__PURE__*/function () {
58
58
  var discriminatorValue = instance["request_type"];
59
59
  if (discriminatorValue) {
60
60
  switch (discriminatorValue) {
61
- case "Call":
61
+ case "ContractCall":
62
62
  this.actualInstance = _EstimateContractCallFeeParams["default"].constructFromObject(instance);
63
63
  match++;
64
64
  break;
@@ -167,7 +167,7 @@ var EstimateFeeParams = /*#__PURE__*/function () {
167
167
  }]);
168
168
  }();
169
169
  /**
170
- * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
170
+ * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
171
171
  * @member {String} request_id
172
172
  */
173
173
  _EstimateFeeParams = EstimateFeeParams;
@@ -37,7 +37,7 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
37
37
  * Constructs a new <code>EstimateTransferFeeParams</code>.
38
38
  * The information about a token transfer.
39
39
  * @alias module:model/EstimateTransferFeeParams
40
- * @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
40
+ * @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
41
41
  * @param request_type {module:model/EstimateFeeRequestType}
42
42
  * @param source {module:model/TransferSource}
43
43
  * @param token_id {String} The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
@@ -149,7 +149,7 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
149
149
  EstimateTransferFeeParams.RequiredProperties = ["request_id", "request_type", "source", "token_id", "destination"];
150
150
 
151
151
  /**
152
- * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
152
+ * The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
153
153
  * @member {String} request_id
154
154
  */
155
155
  EstimateTransferFeeParams.prototype['request_id'] = undefined;
@@ -241,7 +241,7 @@ EstimatedFee.prototype['fee_type'] = undefined;
241
241
  EstimatedFee.prototype['token_id'] = undefined;
242
242
 
243
243
  /**
244
- * Whether the transaction can be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
244
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
245
245
  * @member {Boolean} is_loop
246
246
  */
247
247
  EstimatedFee.prototype['is_loop'] = undefined;
@@ -143,7 +143,7 @@ EstimatedFixedFee.prototype['fee_type'] = undefined;
143
143
  EstimatedFixedFee.prototype['token_id'] = undefined;
144
144
 
145
145
  /**
146
- * Whether the transaction can be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
146
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
147
147
  * @member {Boolean} is_loop
148
148
  */
149
149
  EstimatedFixedFee.prototype['is_loop'] = undefined;
@@ -60,6 +60,16 @@ var ExchangeId = exports["default"] = /*#__PURE__*/function () {
60
60
  * @const
61
61
  */
62
62
  _defineProperty(this, "bitget", "bitget");
63
+ /**
64
+ * value: "bitmart"
65
+ * @const
66
+ */
67
+ _defineProperty(this, "bitmart", "bitmart");
68
+ /**
69
+ * value: "bitfinex"
70
+ * @const
71
+ */
72
+ _defineProperty(this, "bitfinex", "bitfinex");
63
73
  /**
64
74
  * value: "unknown_default_open_api"
65
75
  * @const
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _TokenAssetModelType = _interopRequireDefault(require("./TokenAssetModelType"));
8
9
  var _TokenInfo = _interopRequireDefault(require("./TokenInfo"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -108,6 +109,9 @@ var ExtendedTokenInfo = /*#__PURE__*/function () {
108
109
  if (data.hasOwnProperty('custodial_minimum_deposit_threshold')) {
109
110
  obj['custodial_minimum_deposit_threshold'] = _ApiClient["default"].convertToType(data['custodial_minimum_deposit_threshold'], 'String');
110
111
  }
112
+ if (data.hasOwnProperty('asset_model_type')) {
113
+ obj['asset_model_type'] = _TokenAssetModelType["default"].constructFromObject(data['asset_model_type']);
114
+ }
111
115
  }
112
116
  return obj;
113
117
  }
@@ -250,17 +254,22 @@ ExtendedTokenInfo.prototype['can_deposit'] = false;
250
254
  ExtendedTokenInfo.prototype['can_withdraw'] = false;
251
255
 
252
256
  /**
253
- * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Loop transfers](https://loop.top/) do not have this limitation.
257
+ * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfers do not have this limitation.
254
258
  * @member {String} dust_threshold
255
259
  */
256
260
  ExtendedTokenInfo.prototype['dust_threshold'] = undefined;
257
261
 
258
262
  /**
259
- * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Loop transfers](https://loop.top/) do not have this limitation.
263
+ * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop)transfers do not have this limitation.
260
264
  * @member {String} custodial_minimum_deposit_threshold
261
265
  */
262
266
  ExtendedTokenInfo.prototype['custodial_minimum_deposit_threshold'] = undefined;
263
267
 
268
+ /**
269
+ * @member {module:model/TokenAssetModelType} asset_model_type
270
+ */
271
+ ExtendedTokenInfo.prototype['asset_model_type'] = undefined;
272
+
264
273
  // Implement TokenInfo interface:
265
274
  /**
266
275
  * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
@@ -318,13 +327,17 @@ _TokenInfo["default"].prototype['can_deposit'] = undefined;
318
327
  */
319
328
  _TokenInfo["default"].prototype['can_withdraw'] = undefined;
320
329
  /**
321
- * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Loop transfers](https://loop.top/) do not have this limitation.
330
+ * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfers do not have this limitation.
322
331
  * @member {String} dust_threshold
323
332
  */
324
333
  _TokenInfo["default"].prototype['dust_threshold'] = undefined;
325
334
  /**
326
- * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Loop transfers](https://loop.top/) do not have this limitation.
335
+ * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop)transfers do not have this limitation.
327
336
  * @member {String} custodial_minimum_deposit_threshold
328
337
  */
329
338
  _TokenInfo["default"].prototype['custodial_minimum_deposit_threshold'] = undefined;
339
+ /**
340
+ * @member {module:model/TokenAssetModelType} asset_model_type
341
+ */
342
+ _TokenInfo["default"].prototype['asset_model_type'] = undefined;
330
343
  var _default = exports["default"] = ExtendedTokenInfo;
@@ -104,7 +104,7 @@ var GetToken200Response = /*#__PURE__*/function () {
104
104
  }]);
105
105
  }();
106
106
  /**
107
- * The access token.
107
+ * The Org Access Token.
108
108
  * @member {String} access_token
109
109
  */
110
110
  GetToken200Response.prototype['access_token'] = undefined;
@@ -116,19 +116,19 @@ GetToken200Response.prototype['access_token'] = undefined;
116
116
  GetToken200Response.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
- * The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app.
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
122
  GetToken200Response.prototype['scope'] = undefined;
123
123
 
124
124
  /**
125
- * The time in seconds in which the access token expires.
125
+ * The time in seconds in which the Org Access Token expires.
126
126
  * @member {Number} expires_in
127
127
  */
128
128
  GetToken200Response.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
- * The refresh token, used to obtain a new access token when the current access token expires.
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
134
  GetToken200Response.prototype['refresh_token'] = undefined;
@@ -132,7 +132,7 @@ KeyShareHolder.prototype['tss_node_id'] = undefined;
132
132
  KeyShareHolder.prototype['online'] = undefined;
133
133
 
134
134
  /**
135
- * Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer.
135
+ * Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer.
136
136
  * @member {Boolean} signer
137
137
  */
138
138
  KeyShareHolder.prototype['signer'] = undefined;
@@ -0,0 +1,123 @@
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 _AddressBook = _interopRequireDefault(require("./AddressBook"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The ListAddressBooks200Response model module.
31
+ * @module model/ListAddressBooks200Response
32
+ */
33
+ var ListAddressBooks200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListAddressBooks200Response</code>.
36
+ * @alias module:model/ListAddressBooks200Response
37
+ */
38
+ function ListAddressBooks200Response() {
39
+ _classCallCheck(this, ListAddressBooks200Response);
40
+ ListAddressBooks200Response.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(ListAddressBooks200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListAddressBooks200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListAddressBooks200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListAddressBooks200Response} The populated <code>ListAddressBooks200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListAddressBooks200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressBook["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListAddressBooks200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAddressBooks200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _AddressBook["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/AddressBook>} data
116
+ */
117
+ ListAddressBooks200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListAddressBooks200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListAddressBooks200Response;
@@ -35,8 +35,8 @@ var MPCDelegate = /*#__PURE__*/function () {
35
35
  * The information about the MPC Wallet as the Delegate.
36
36
  * @alias module:model/MPCDelegate
37
37
  * @param delegate_type {module:model/CoboSafeDelegateType}
38
- * @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
39
- * @param address {String} The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
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}).
39
+ * @param address {String} The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
40
40
  */
41
41
  function MPCDelegate(delegate_type, wallet_id, address) {
42
42
  _classCallCheck(this, MPCDelegate);
@@ -124,13 +124,13 @@ MPCDelegate.RequiredProperties = ["delegate_type", "wallet_id", "address"];
124
124
  MPCDelegate.prototype['delegate_type'] = undefined;
125
125
 
126
126
  /**
127
- * The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
127
+ * The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
128
128
  * @member {String} wallet_id
129
129
  */
130
130
  MPCDelegate.prototype['wallet_id'] = undefined;
131
131
 
132
132
  /**
133
- * The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
133
+ * The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
134
134
  * @member {String} address
135
135
  */
136
136
  MPCDelegate.prototype['address'] = undefined;
@@ -175,7 +175,7 @@ MessageSignParams.prototype['source'] = undefined;
175
175
  MessageSignParams.prototype['destination'] = undefined;
176
176
 
177
177
  /**
178
- * The description of the message sign transaction.
178
+ * The description of the message signing transaction.
179
179
  * @member {String} description
180
180
  */
181
181
  MessageSignParams.prototype['description'] = undefined;
@@ -80,9 +80,6 @@ var MpcContractCallSource = /*#__PURE__*/function () {
80
80
  if (data.hasOwnProperty('address')) {
81
81
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
82
82
  }
83
- if (data.hasOwnProperty('nonce')) {
84
- obj['nonce'] = _ApiClient["default"].convertToType(data['nonce'], 'Number');
85
- }
86
83
  }
87
84
  return obj;
88
85
  }
@@ -141,12 +138,6 @@ MpcContractCallSource.prototype['wallet_id'] = undefined;
141
138
  */
142
139
  MpcContractCallSource.prototype['address'] = undefined;
143
140
 
144
- /**
145
- * The transaction nonce.
146
- * @member {Number} nonce
147
- */
148
- MpcContractCallSource.prototype['nonce'] = undefined;
149
-
150
141
  // Implement BaseContractCallSource interface:
151
142
  /**
152
143
  * @member {module:model/ContractCallSourceType} source_type
@@ -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 RefreshToken200Response model module.
26
- * @module model/RefreshToken200Response
25
+ * The RefreshToken201Response model module.
26
+ * @module model/RefreshToken201Response
27
27
  */
28
- var RefreshToken200Response = /*#__PURE__*/function () {
28
+ var RefreshToken201Response = /*#__PURE__*/function () {
29
29
  /**
30
- * Constructs a new <code>RefreshToken200Response</code>.
31
- * @alias module:model/RefreshToken200Response
30
+ * Constructs a new <code>RefreshToken201Response</code>.
31
+ * @alias module:model/RefreshToken201Response
32
32
  */
33
- function RefreshToken200Response() {
34
- _classCallCheck(this, RefreshToken200Response);
35
- RefreshToken200Response.initialize(this);
33
+ function RefreshToken201Response() {
34
+ _classCallCheck(this, RefreshToken201Response);
35
+ RefreshToken201Response.initialize(this);
36
36
  }
37
37
 
38
38
  /**
@@ -40,22 +40,22 @@ var RefreshToken200Response = /*#__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(RefreshToken200Response, null, [{
43
+ return _createClass(RefreshToken201Response, null, [{
44
44
  key: "initialize",
45
45
  value: function initialize(obj) {}
46
46
 
47
47
  /**
48
- * Constructs a <code>RefreshToken200Response</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Constructs a <code>RefreshToken201Response</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/RefreshToken200Response} obj Optional instance to populate.
52
- * @return {module:model/RefreshToken200Response} The populated <code>RefreshToken200Response</code> instance.
51
+ * @param {module:model/RefreshToken201Response} obj Optional instance to populate.
52
+ * @return {module:model/RefreshToken201Response} The populated <code>RefreshToken201Response</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 RefreshToken200Response();
58
+ obj = obj || new RefreshToken201Response();
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 RefreshToken200Response = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>RefreshToken200Response</code>.
79
+ * Validates the JSON data with respect to <code>RefreshToken201Response</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>RefreshToken200Response</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken201Response</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
@@ -104,32 +104,32 @@ var RefreshToken200Response = /*#__PURE__*/function () {
104
104
  }]);
105
105
  }();
106
106
  /**
107
- * The new access token.
107
+ * The new Org Access Token.
108
108
  * @member {String} access_token
109
109
  */
110
- RefreshToken200Response.prototype['access_token'] = undefined;
110
+ RefreshToken201Response.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
- RefreshToken200Response.prototype['token_type'] = undefined;
116
+ RefreshToken201Response.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
- * The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app.
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
- RefreshToken200Response.prototype['scope'] = undefined;
122
+ RefreshToken201Response.prototype['scope'] = undefined;
123
123
 
124
124
  /**
125
- * The time in seconds in which the new access token expires.
125
+ * The time in seconds in which the new Org Access Token expires.
126
126
  * @member {Number} expires_in
127
127
  */
128
- RefreshToken200Response.prototype['expires_in'] = undefined;
128
+ RefreshToken201Response.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
- * The refresh token, used to obtain another access token when the new access token expires.
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
- RefreshToken200Response.prototype['refresh_token'] = undefined;
135
- var _default = exports["default"] = RefreshToken200Response;
134
+ RefreshToken201Response.prototype['refresh_token'] = undefined;
135
+ var _default = exports["default"] = RefreshToken201Response;
@@ -94,7 +94,7 @@ var RefreshTokenRequest = /*#__PURE__*/function () {
94
94
  }]);
95
95
  }();
96
96
  /**
97
- * The App ID, a unique identifier to distinguish Cobo Portal Apps. You can get the App ID by retrieving the Manifest file after receiving the notification of app launch approval.
97
+ * The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app.
98
98
  * @member {String} client_id
99
99
  */
100
100
  RefreshTokenRequest.prototype['client_id'] = undefined;
@@ -106,7 +106,7 @@ RefreshTokenRequest.prototype['client_id'] = undefined;
106
106
  RefreshTokenRequest.prototype['grant_type'] = undefined;
107
107
 
108
108
  /**
109
- * The refresh token of the current access token.
109
+ * The Refresh Token of the current Org Access Token.
110
110
  * @member {String} refresh_token
111
111
  */
112
112
  RefreshTokenRequest.prototype['refresh_token'] = undefined;