@cobo/cobo-waas2 1.1.2 → 1.2.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 (125) hide show
  1. package/README.md +16 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/OAuthApi.js +16 -15
  4. package/dist/api/TransactionsApi.js +18 -18
  5. package/dist/api/WalletsApi.js +123 -12
  6. package/dist/api/WalletsExchangeWalletApi.js +254 -0
  7. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  8. package/dist/index.js +56 -0
  9. package/dist/model/AddressInfo.js +1 -1
  10. package/dist/model/AddressTransferDestination.js +3 -3
  11. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  12. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  13. package/dist/model/AssetInfo.js +2 -2
  14. package/dist/model/BabylonStakeExtra.js +9 -0
  15. package/dist/model/CheckAddressValidity200Response.js +2 -2
  16. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  17. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  18. package/dist/model/ContractCallDestination.js +1 -1
  19. package/dist/model/CreateStakeActivity.js +14 -1
  20. package/dist/model/CreateStakeActivityExtra.js +6 -0
  21. package/dist/model/CreateTssRequestRequest.js +13 -0
  22. package/dist/model/CreateUnstakeActivity.js +13 -0
  23. package/dist/model/CreateWithdrawActivity.js +13 -0
  24. package/dist/model/CreatedWalletInfo.js +12 -0
  25. package/dist/model/EstimateStakeFee.js +19 -1
  26. package/dist/model/EstimateUnstakeFee.js +18 -0
  27. package/dist/model/EstimateWithdrawFee.js +18 -0
  28. package/dist/model/EvmContractCallDestination.js +1 -1
  29. package/dist/model/ExchangeId.js +5 -0
  30. package/dist/model/ExchangeTransferDestination.js +16 -16
  31. package/dist/model/ExchangeTransferSource.js +14 -14
  32. package/dist/model/GetToken200Response.js +4 -4
  33. package/dist/model/KeyShareHolder.js +13 -0
  34. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  35. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  36. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  37. package/dist/model/MPCWalletInfo.js +26 -0
  38. package/dist/model/RefreshToken200Response.js +135 -0
  39. package/dist/model/RefreshTokenRequest.js +2 -2
  40. package/dist/model/SmartContractWalletType.js +2 -2
  41. package/dist/model/SubWalletAssetBalance.js +10 -10
  42. package/dist/model/TSSRequest.js +23 -1
  43. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  44. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  45. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  46. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  47. package/dist/model/TransactionDestination.js +5 -5
  48. package/dist/model/TransactionEvmContractDestination.js +1 -1
  49. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  50. package/dist/model/TransactionMPCWalletSource.js +13 -0
  51. package/dist/model/TransactionSource.js +8 -2
  52. package/dist/model/TransactionSubStatus.js +5 -0
  53. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  54. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  55. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  56. package/dist/model/TransactionWebhookEventData.js +8 -3
  57. package/dist/model/TransferDestination.js +6 -6
  58. package/dist/model/TransferParams.js +2 -2
  59. package/dist/model/TransferSource.js +3 -3
  60. package/dist/model/WalletInfo.js +12 -0
  61. package/dist/model/WebhookEventData.js +49 -15
  62. package/dist/model/WebhookEventDataType.js +7 -2
  63. package/dist/model/WebhookEventType.js +24 -4
  64. package/docs/AddressInfo.md +1 -1
  65. package/docs/AddressTransferDestination.md +2 -2
  66. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  67. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  68. package/docs/AssetInfo.md +1 -1
  69. package/docs/BabylonStakeExtra.md +1 -0
  70. package/docs/CheckAddressValidity200Response.md +1 -1
  71. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  72. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  73. package/docs/ContractCallDestination.md +1 -1
  74. package/docs/CreateStakeActivity.md +1 -0
  75. package/docs/CreateStakeActivityExtra.md +1 -0
  76. package/docs/CreateTssRequestRequest.md +1 -0
  77. package/docs/CreateUnstakeActivity.md +1 -0
  78. package/docs/CreateWithdrawActivity.md +1 -0
  79. package/docs/CreatedWalletInfo.md +2 -0
  80. package/docs/DevelopersWebhooksApi.md +78 -69
  81. package/docs/EstimateStakeFee.md +1 -0
  82. package/docs/EstimateUnstakeFee.md +1 -0
  83. package/docs/EstimateWithdrawFee.md +1 -0
  84. package/docs/EvmContractCallDestination.md +1 -1
  85. package/docs/ExchangeId.md +2 -0
  86. package/docs/ExchangeTransferDestination.md +2 -2
  87. package/docs/ExchangeTransferSource.md +1 -1
  88. package/docs/GetToken200Response.md +4 -4
  89. package/docs/KeyShareHolder.md +1 -0
  90. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  91. package/docs/ListExchanges200ResponseInner.md +10 -0
  92. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  93. package/docs/MPCWalletInfo.md +2 -0
  94. package/docs/OAuthApi.md +26 -24
  95. package/docs/RefreshToken200Response.md +13 -0
  96. package/docs/RefreshTokenRequest.md +2 -2
  97. package/docs/SmartContractWalletType.md +1 -1
  98. package/docs/SubWalletAssetBalance.md +2 -2
  99. package/docs/TSSRequest.md +2 -0
  100. package/docs/TSSRequestWebhookEventData.md +29 -0
  101. package/docs/TransactionDepositFromWalletSource.md +1 -1
  102. package/docs/TransactionDepositToAddressDestination.md +1 -1
  103. package/docs/TransactionDepositToWalletDestination.md +2 -2
  104. package/docs/TransactionDestination.md +3 -3
  105. package/docs/TransactionEvmContractDestination.md +1 -1
  106. package/docs/TransactionExchangeWalletSource.md +1 -1
  107. package/docs/TransactionMPCWalletSource.md +1 -0
  108. package/docs/TransactionSource.md +2 -1
  109. package/docs/TransactionSubStatus.md +2 -0
  110. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  111. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  112. package/docs/TransactionTransferToWalletDestination.md +2 -2
  113. package/docs/TransactionWebhookEventData.md +3 -1
  114. package/docs/TransactionsApi.md +98 -88
  115. package/docs/TransferDestination.md +4 -4
  116. package/docs/TransferParams.md +1 -1
  117. package/docs/TransferSource.md +1 -1
  118. package/docs/WalletInfo.md +2 -0
  119. package/docs/WalletsApi.md +316 -187
  120. package/docs/WalletsExchangeWalletApi.md +230 -0
  121. package/docs/WalletsMPCWalletsApi.md +153 -135
  122. package/docs/WebhookEventData.md +10 -5
  123. package/docs/WebhookEventDataType.md +3 -1
  124. package/docs/WebhookEventType.md +12 -4
  125. package/package.json +1 -1
@@ -191,12 +191,24 @@ CreatedWalletInfo.prototype['org_id'] = undefined;
191
191
  */
192
192
  CreatedWalletInfo.prototype['project_id'] = undefined;
193
193
 
194
+ /**
195
+ * The project name.
196
+ * @member {String} project_name
197
+ */
198
+ CreatedWalletInfo.prototype['project_name'] = undefined;
199
+
194
200
  /**
195
201
  * The ID of the owning vault.
196
202
  * @member {String} vault_id
197
203
  */
198
204
  CreatedWalletInfo.prototype['vault_id'] = undefined;
199
205
 
206
+ /**
207
+ * The vault name.
208
+ * @member {String} vault_name
209
+ */
210
+ CreatedWalletInfo.prototype['vault_name'] = undefined;
211
+
200
212
  /**
201
213
  * The API key of your exchange account.
202
214
  * @member {String} apikey
@@ -85,6 +85,9 @@ var EstimateStakeFee = /*#__PURE__*/function () {
85
85
  if (data.hasOwnProperty('activity_type')) {
86
86
  obj['activity_type'] = _ActivityType["default"].constructFromObject(data['activity_type']);
87
87
  }
88
+ if (data.hasOwnProperty('request_id')) {
89
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
90
+ }
88
91
  if (data.hasOwnProperty('source')) {
89
92
  obj['source'] = _StakingSource["default"].constructFromObject(data['source']);
90
93
  }
@@ -122,12 +125,16 @@ var EstimateStakeFee = /*#__PURE__*/function () {
122
125
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
123
126
  }
124
127
  }
125
- // validate the optional field `source`
128
+ // ensure the json data is a string
126
129
  } catch (err) {
127
130
  _iterator.e(err);
128
131
  } finally {
129
132
  _iterator.f();
130
133
  }
134
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
135
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
136
+ }
137
+ // validate the optional field `source`
131
138
  if (data['source']) {
132
139
  // data not null
133
140
  if (!!_StakingSource["default"].validateJSON) {
@@ -167,6 +174,12 @@ EstimateStakeFee.RequiredProperties = ["activity_type", "pool_id", "amount", "fe
167
174
  */
168
175
  EstimateStakeFee.prototype['activity_type'] = undefined;
169
176
 
177
+ /**
178
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
179
+ * @member {String} request_id
180
+ */
181
+ EstimateStakeFee.prototype['request_id'] = undefined;
182
+
170
183
  /**
171
184
  * @member {module:model/StakingSource} source
172
185
  */
@@ -200,6 +213,11 @@ EstimateStakeFee.prototype['extra'] = undefined;
200
213
  */
201
214
  _BaseEstimateStakingFee["default"].prototype['activity_type'] = undefined;
202
215
  // Implement CreateStakeActivity interface:
216
+ /**
217
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
218
+ * @member {String} request_id
219
+ */
220
+ _CreateStakeActivity["default"].prototype['request_id'] = undefined;
203
221
  /**
204
222
  * @member {module:model/StakingSource} source
205
223
  */
@@ -77,6 +77,9 @@ var EstimateUnstakeFee = /*#__PURE__*/function () {
77
77
  if (data.hasOwnProperty('activity_type')) {
78
78
  obj['activity_type'] = _ActivityType["default"].constructFromObject(data['activity_type']);
79
79
  }
80
+ if (data.hasOwnProperty('request_id')) {
81
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
82
+ }
80
83
  if (data.hasOwnProperty('staking_id')) {
81
84
  obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
82
85
  }
@@ -114,6 +117,10 @@ var EstimateUnstakeFee = /*#__PURE__*/function () {
114
117
  } finally {
115
118
  _iterator.f();
116
119
  }
120
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
121
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
122
+ }
123
+ // ensure the json data is a string
117
124
  if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
118
125
  throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
119
126
  }
@@ -139,6 +146,12 @@ EstimateUnstakeFee.RequiredProperties = ["activity_type", "staking_id"];
139
146
  */
140
147
  EstimateUnstakeFee.prototype['activity_type'] = undefined;
141
148
 
149
+ /**
150
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
151
+ * @member {String} request_id
152
+ */
153
+ EstimateUnstakeFee.prototype['request_id'] = undefined;
154
+
142
155
  /**
143
156
  * The id of the related staking.
144
157
  * @member {String} staking_id
@@ -162,6 +175,11 @@ EstimateUnstakeFee.prototype['fee'] = undefined;
162
175
  */
163
176
  _BaseEstimateStakingFee["default"].prototype['activity_type'] = undefined;
164
177
  // Implement CreateUnstakeActivity interface:
178
+ /**
179
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
180
+ * @member {String} request_id
181
+ */
182
+ _CreateUnstakeActivity["default"].prototype['request_id'] = undefined;
165
183
  /**
166
184
  * The id of the related staking.
167
185
  * @member {String} staking_id
@@ -79,6 +79,9 @@ var EstimateWithdrawFee = /*#__PURE__*/function () {
79
79
  if (data.hasOwnProperty('activity_type')) {
80
80
  obj['activity_type'] = _ActivityType["default"].constructFromObject(data['activity_type']);
81
81
  }
82
+ if (data.hasOwnProperty('request_id')) {
83
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
84
+ }
82
85
  if (data.hasOwnProperty('staking_id')) {
83
86
  obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
84
87
  }
@@ -119,6 +122,10 @@ var EstimateWithdrawFee = /*#__PURE__*/function () {
119
122
  } finally {
120
123
  _iterator.f();
121
124
  }
125
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
126
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
127
+ }
128
+ // ensure the json data is a string
122
129
  if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
123
130
  throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
124
131
  }
@@ -148,6 +155,12 @@ EstimateWithdrawFee.RequiredProperties = ["activity_type", "staking_id", "fee"];
148
155
  */
149
156
  EstimateWithdrawFee.prototype['activity_type'] = undefined;
150
157
 
158
+ /**
159
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
160
+ * @member {String} request_id
161
+ */
162
+ EstimateWithdrawFee.prototype['request_id'] = undefined;
163
+
151
164
  /**
152
165
  * The id of the related staking.
153
166
  * @member {String} staking_id
@@ -177,6 +190,11 @@ EstimateWithdrawFee.prototype['fee'] = undefined;
177
190
  */
178
191
  _BaseEstimateStakingFee["default"].prototype['activity_type'] = undefined;
179
192
  // Implement CreateWithdrawActivity interface:
193
+ /**
194
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
195
+ * @member {String} request_id
196
+ */
197
+ _CreateWithdrawActivity["default"].prototype['request_id'] = undefined;
180
198
  /**
181
199
  * The id of the related staking.
182
200
  * @member {String} staking_id
@@ -133,7 +133,7 @@ EvmContractCallDestination.prototype['destination_type'] = undefined;
133
133
  EvmContractCallDestination.prototype['address'] = undefined;
134
134
 
135
135
  /**
136
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
136
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
137
137
  * @member {String} value
138
138
  */
139
139
  EvmContractCallDestination.prototype['value'] = undefined;
@@ -55,6 +55,11 @@ var ExchangeId = exports["default"] = /*#__PURE__*/function () {
55
55
  * @const
56
56
  */
57
57
  _defineProperty(this, "gate", "gate");
58
+ /**
59
+ * value: "bitget"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "bitget", "bitget");
58
63
  /**
59
64
  * value: "unknown_default_open_api"
60
65
  * @const
@@ -32,16 +32,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var ExchangeTransferDestination = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>ExchangeTransferDestination</code>.
35
- * The information about the transaction destination type &#x60;ExchangeWallet&#x60;. An Exchange Wallet (Sub Account) as the transaction destination can only receives token transfers from another Exchange Wallet.
35
+ * The information about the transaction destination type &#x60;ExchangeWallet&#x60;. An Exchange Wallet (Sub Account) can only receive asset transfers from another Exchange Wallet.
36
36
  * @alias module:model/ExchangeTransferDestination
37
37
  * @param destination_type {module:model/TransferDestinationType}
38
38
  * @param wallet_id {String} The wallet ID.
39
- * @param sub_wallet_id {String} The exchange trading account or the sub-wallet ID.
40
- * @param amount {String} The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
39
+ * @param trading_account_type {String} The trading account type.
40
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
41
41
  */
42
- function ExchangeTransferDestination(destination_type, wallet_id, sub_wallet_id, amount) {
42
+ function ExchangeTransferDestination(destination_type, wallet_id, trading_account_type, amount) {
43
43
  _classCallCheck(this, ExchangeTransferDestination);
44
- ExchangeTransferDestination.initialize(this, destination_type, wallet_id, sub_wallet_id, amount);
44
+ ExchangeTransferDestination.initialize(this, destination_type, wallet_id, trading_account_type, amount);
45
45
  }
46
46
 
47
47
  /**
@@ -51,10 +51,10 @@ var ExchangeTransferDestination = /*#__PURE__*/function () {
51
51
  */
52
52
  return _createClass(ExchangeTransferDestination, null, [{
53
53
  key: "initialize",
54
- value: function initialize(obj, destination_type, wallet_id, sub_wallet_id, amount) {
54
+ value: function initialize(obj, destination_type, wallet_id, trading_account_type, amount) {
55
55
  obj['destination_type'] = destination_type;
56
56
  obj['wallet_id'] = wallet_id;
57
- obj['sub_wallet_id'] = sub_wallet_id;
57
+ obj['trading_account_type'] = trading_account_type;
58
58
  obj['amount'] = amount;
59
59
  }
60
60
 
@@ -76,8 +76,8 @@ var ExchangeTransferDestination = /*#__PURE__*/function () {
76
76
  if (data.hasOwnProperty('wallet_id')) {
77
77
  obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
78
78
  }
79
- if (data.hasOwnProperty('sub_wallet_id')) {
80
- obj['sub_wallet_id'] = _ApiClient["default"].convertToType(data['sub_wallet_id'], 'String');
79
+ if (data.hasOwnProperty('trading_account_type')) {
80
+ obj['trading_account_type'] = _ApiClient["default"].convertToType(data['trading_account_type'], 'String');
81
81
  }
82
82
  if (data.hasOwnProperty('amount')) {
83
83
  obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
@@ -114,8 +114,8 @@ var ExchangeTransferDestination = /*#__PURE__*/function () {
114
114
  throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
115
115
  }
116
116
  // ensure the json data is a string
117
- if (data['sub_wallet_id'] && !(typeof data['sub_wallet_id'] === 'string' || data['sub_wallet_id'] instanceof String)) {
118
- throw new Error("Expected the field `sub_wallet_id` to be a primitive type in the JSON string but got " + data['sub_wallet_id']);
117
+ if (data['trading_account_type'] && !(typeof data['trading_account_type'] === 'string' || data['trading_account_type'] instanceof String)) {
118
+ throw new Error("Expected the field `trading_account_type` to be a primitive type in the JSON string but got " + data['trading_account_type']);
119
119
  }
120
120
  // ensure the json data is a string
121
121
  if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
@@ -125,7 +125,7 @@ var ExchangeTransferDestination = /*#__PURE__*/function () {
125
125
  }
126
126
  }]);
127
127
  }();
128
- ExchangeTransferDestination.RequiredProperties = ["destination_type", "wallet_id", "sub_wallet_id", "amount"];
128
+ ExchangeTransferDestination.RequiredProperties = ["destination_type", "wallet_id", "trading_account_type", "amount"];
129
129
 
130
130
  /**
131
131
  * @member {module:model/TransferDestinationType} destination_type
@@ -139,13 +139,13 @@ ExchangeTransferDestination.prototype['destination_type'] = undefined;
139
139
  ExchangeTransferDestination.prototype['wallet_id'] = undefined;
140
140
 
141
141
  /**
142
- * The exchange trading account or the sub-wallet ID.
143
- * @member {String} sub_wallet_id
142
+ * The trading account type.
143
+ * @member {String} trading_account_type
144
144
  */
145
- ExchangeTransferDestination.prototype['sub_wallet_id'] = undefined;
145
+ ExchangeTransferDestination.prototype['trading_account_type'] = undefined;
146
146
 
147
147
  /**
148
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
148
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
149
149
  * @member {String} amount
150
150
  */
151
151
  ExchangeTransferDestination.prototype['amount'] = undefined;
@@ -32,15 +32,15 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var ExchangeTransferSource = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>ExchangeTransferSource</code>.
35
- * The information about the transaction source types &#x60;Main&#x60; and &#x60;Sub&#x60;. An Exchange Wallet (Sub Account) as the transaction source can only transfer tokens to another Exchange Wallet.
35
+ * The information about the transaction source types &#x60;Main&#x60; and &#x60;Sub&#x60;. Assets in an Exchange Wallet (Sub Account) can only be transferred to another Exchange Wallet.
36
36
  * @alias module:model/ExchangeTransferSource
37
37
  * @param source_type {module:model/WalletSubtype}
38
38
  * @param wallet_id {String} The wallet ID.
39
- * @param sub_wallet_id {String} The exchange trading account or the sub-wallet ID.
39
+ * @param trading_account_type {String} The trading account type.
40
40
  */
41
- function ExchangeTransferSource(source_type, wallet_id, sub_wallet_id) {
41
+ function ExchangeTransferSource(source_type, wallet_id, trading_account_type) {
42
42
  _classCallCheck(this, ExchangeTransferSource);
43
- ExchangeTransferSource.initialize(this, source_type, wallet_id, sub_wallet_id);
43
+ ExchangeTransferSource.initialize(this, source_type, wallet_id, trading_account_type);
44
44
  }
45
45
 
46
46
  /**
@@ -50,10 +50,10 @@ var ExchangeTransferSource = /*#__PURE__*/function () {
50
50
  */
51
51
  return _createClass(ExchangeTransferSource, null, [{
52
52
  key: "initialize",
53
- value: function initialize(obj, source_type, wallet_id, sub_wallet_id) {
53
+ value: function initialize(obj, source_type, wallet_id, trading_account_type) {
54
54
  obj['source_type'] = source_type;
55
55
  obj['wallet_id'] = wallet_id;
56
- obj['sub_wallet_id'] = sub_wallet_id;
56
+ obj['trading_account_type'] = trading_account_type;
57
57
  }
58
58
 
59
59
  /**
@@ -74,8 +74,8 @@ var ExchangeTransferSource = /*#__PURE__*/function () {
74
74
  if (data.hasOwnProperty('wallet_id')) {
75
75
  obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
76
76
  }
77
- if (data.hasOwnProperty('sub_wallet_id')) {
78
- obj['sub_wallet_id'] = _ApiClient["default"].convertToType(data['sub_wallet_id'], 'String');
77
+ if (data.hasOwnProperty('trading_account_type')) {
78
+ obj['trading_account_type'] = _ApiClient["default"].convertToType(data['trading_account_type'], 'String');
79
79
  }
80
80
  }
81
81
  return obj;
@@ -109,14 +109,14 @@ var ExchangeTransferSource = /*#__PURE__*/function () {
109
109
  throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
110
110
  }
111
111
  // ensure the json data is a string
112
- if (data['sub_wallet_id'] && !(typeof data['sub_wallet_id'] === 'string' || data['sub_wallet_id'] instanceof String)) {
113
- throw new Error("Expected the field `sub_wallet_id` to be a primitive type in the JSON string but got " + data['sub_wallet_id']);
112
+ if (data['trading_account_type'] && !(typeof data['trading_account_type'] === 'string' || data['trading_account_type'] instanceof String)) {
113
+ throw new Error("Expected the field `trading_account_type` to be a primitive type in the JSON string but got " + data['trading_account_type']);
114
114
  }
115
115
  return true;
116
116
  }
117
117
  }]);
118
118
  }();
119
- ExchangeTransferSource.RequiredProperties = ["source_type", "wallet_id", "sub_wallet_id"];
119
+ ExchangeTransferSource.RequiredProperties = ["source_type", "wallet_id", "trading_account_type"];
120
120
 
121
121
  /**
122
122
  * @member {module:model/WalletSubtype} source_type
@@ -130,8 +130,8 @@ ExchangeTransferSource.prototype['source_type'] = undefined;
130
130
  ExchangeTransferSource.prototype['wallet_id'] = undefined;
131
131
 
132
132
  /**
133
- * The exchange trading account or the sub-wallet ID.
134
- * @member {String} sub_wallet_id
133
+ * The trading account type.
134
+ * @member {String} trading_account_type
135
135
  */
136
- ExchangeTransferSource.prototype['sub_wallet_id'] = undefined;
136
+ ExchangeTransferSource.prototype['trading_account_type'] = undefined;
137
137
  var _default = exports["default"] = ExchangeTransferSource;
@@ -104,19 +104,19 @@ var GetToken200Response = /*#__PURE__*/function () {
104
104
  }]);
105
105
  }();
106
106
  /**
107
- * The access token, used by Cobo Portal Apps to access specific resources of other organizations.
107
+ * The access token.
108
108
  * @member {String} access_token
109
109
  */
110
110
  GetToken200Response.prototype['access_token'] = undefined;
111
111
 
112
112
  /**
113
- * The type of the tokens.
113
+ * The type of the tokens, which is Bearer.
114
114
  * @member {String} token_type
115
115
  */
116
116
  GetToken200Response.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
- * The scope of the access token. This property value is empty by design.
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.
120
120
  * @member {String} scope
121
121
  */
122
122
  GetToken200Response.prototype['scope'] = undefined;
@@ -128,7 +128,7 @@ GetToken200Response.prototype['scope'] = undefined;
128
128
  GetToken200Response.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
- * The refresh token, used by Cobo Portal Apps to obtain new access tokens when the access token expires.
131
+ * The refresh token, used to obtain a new access token when the current access token expires.
132
132
  * @member {String} refresh_token
133
133
  */
134
134
  GetToken200Response.prototype['refresh_token'] = undefined;
@@ -77,6 +77,9 @@ var KeyShareHolder = /*#__PURE__*/function () {
77
77
  if (data.hasOwnProperty('status')) {
78
78
  obj['status'] = _KeyShareHolderStatus["default"].constructFromObject(data['status']);
79
79
  }
80
+ if (data.hasOwnProperty('account_id')) {
81
+ obj['account_id'] = _ApiClient["default"].convertToType(data['account_id'], 'String');
82
+ }
80
83
  }
81
84
  return obj;
82
85
  }
@@ -97,6 +100,10 @@ var KeyShareHolder = /*#__PURE__*/function () {
97
100
  if (data['tss_node_id'] && !(typeof data['tss_node_id'] === 'string' || data['tss_node_id'] instanceof String)) {
98
101
  throw new Error("Expected the field `tss_node_id` to be a primitive type in the JSON string but got " + data['tss_node_id']);
99
102
  }
103
+ // ensure the json data is a string
104
+ if (data['account_id'] && !(typeof data['account_id'] === 'string' || data['account_id'] instanceof String)) {
105
+ throw new Error("Expected the field `account_id` to be a primitive type in the JSON string but got " + data['account_id']);
106
+ }
100
107
  return true;
101
108
  }
102
109
  }]);
@@ -134,4 +141,10 @@ KeyShareHolder.prototype['signer'] = undefined;
134
141
  * @member {module:model/KeyShareHolderStatus} status
135
142
  */
136
143
  KeyShareHolder.prototype['status'] = undefined;
144
+
145
+ /**
146
+ * The key share holder's Cobo Portal account ID.
147
+ * @member {String} account_id
148
+ */
149
+ KeyShareHolder.prototype['account_id'] = undefined;
137
150
  var _default = exports["default"] = KeyShareHolder;
@@ -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 _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _SubWalletAssetBalance = _interopRequireDefault(require("./SubWalletAssetBalance"));
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: support@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 ListAssetBalancesForExchangeWallet200Response model module.
31
+ * @module model/ListAssetBalancesForExchangeWallet200Response
32
+ */
33
+ var ListAssetBalancesForExchangeWallet200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListAssetBalancesForExchangeWallet200Response</code>.
36
+ * @alias module:model/ListAssetBalancesForExchangeWallet200Response
37
+ */
38
+ function ListAssetBalancesForExchangeWallet200Response() {
39
+ _classCallCheck(this, ListAssetBalancesForExchangeWallet200Response);
40
+ ListAssetBalancesForExchangeWallet200Response.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(ListAssetBalancesForExchangeWallet200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListAssetBalancesForExchangeWallet200Response</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/ListAssetBalancesForExchangeWallet200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListAssetBalancesForExchangeWallet200Response} The populated <code>ListAssetBalancesForExchangeWallet200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListAssetBalancesForExchangeWallet200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SubWalletAssetBalance["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>ListAssetBalancesForExchangeWallet200Response</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>ListAssetBalancesForExchangeWallet200Response</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
+ _SubWalletAssetBalance["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/SubWalletAssetBalance>} data
116
+ */
117
+ ListAssetBalancesForExchangeWallet200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListAssetBalancesForExchangeWallet200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListAssetBalancesForExchangeWallet200Response;