@cobo/cobo-waas2 1.8.0 → 1.10.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 (205) hide show
  1. package/README.md +117 -33
  2. package/dist/ApiClient.js +11 -1
  3. package/dist/api/AddressBooksApi.js +1 -1
  4. package/dist/api/DevelopersApi.js +7 -7
  5. package/dist/api/DevelopersWebhooksApi.js +8 -8
  6. package/dist/api/PrimeBrokerApi.js +317 -0
  7. package/dist/api/StakingsApi.js +412 -18
  8. package/dist/api/SwapsApi.js +360 -0
  9. package/dist/api/TransactionsApi.js +64 -20
  10. package/dist/api/TravelRuleApi.js +18 -18
  11. package/dist/api/WalletsApi.js +84 -13
  12. package/dist/api/WalletsExchangeWalletApi.js +1 -1
  13. package/dist/api/WalletsMPCWalletsApi.js +151 -39
  14. package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
  15. package/dist/index.js +276 -10
  16. package/dist/model/ActivityExtra.js +5 -5
  17. package/dist/model/AddressBalance.js +129 -0
  18. package/dist/model/AddressTransferDestination.js +36 -0
  19. package/dist/model/AddressesEventData.js +4 -4
  20. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  21. package/dist/model/ApprovalStatementStatus.js +81 -0
  22. package/dist/model/AssetBalance.js +6 -6
  23. package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
  24. package/dist/model/BabylonAirdropPop.js +186 -0
  25. package/dist/model/BabylonAirdropRegistration.js +172 -0
  26. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  27. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  28. package/dist/model/BabylonRegistrationStatus.js +66 -0
  29. package/dist/model/BabylonStakingActivityDetailExtra.js +1 -1
  30. package/dist/model/BabylonStakingRegistration.js +185 -0
  31. package/dist/model/{TokenBalanceBalance.js → Balance.js} +22 -22
  32. package/dist/model/{SwapSummary.js → ChangeGuardPubkey200Response.js} +28 -39
  33. package/dist/model/ContractCallParams.js +36 -0
  34. package/dist/model/ContractCallSource.js +6 -0
  35. package/dist/model/CoreStakingActivityDetailExtra.js +3 -3
  36. package/dist/model/CreateAddressRequest.js +28 -2
  37. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  38. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  39. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  40. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  41. package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
  42. package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
  43. package/dist/model/CreateSwapActivityRequest.js +153 -0
  44. package/dist/model/CreateSwapQuote201Response.js +264 -0
  45. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  46. package/dist/model/DeleteGuardPubkey201Response.js +110 -0
  47. package/dist/model/EthStakeEstimatedFee.js +1 -1
  48. package/dist/model/EthStakingActivityDetailExtra.js +1 -1
  49. package/dist/model/GetStakingEstimationFee201Response.js +1 -1
  50. package/dist/model/GetTransactionLimitation200Response.js +4 -4
  51. package/dist/model/GuardPubkeyStatus.js +91 -0
  52. package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
  53. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  54. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  55. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  56. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  57. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  58. package/dist/model/ListEnableTokenPairs200Response.js +123 -0
  59. package/dist/model/ListKeyShareHolders200Response.js +123 -0
  60. package/dist/model/ListSwapActivities200Response.js +123 -0
  61. package/dist/model/MessageSignDestination.js +70 -8
  62. package/dist/model/MessageSignDestinationType.js +12 -2
  63. package/dist/model/MessageSignSource.js +6 -0
  64. package/dist/model/MpcContractCallSource.js +16 -0
  65. package/dist/model/MpcMessageSignSource.js +16 -0
  66. package/dist/model/MpcSigningGroup.js +27 -4
  67. package/dist/model/MpcTransferSource.js +16 -0
  68. package/dist/model/OrgInfo.js +3 -3
  69. package/dist/model/QueryApprovalStatement200Response.js +122 -0
  70. package/dist/model/QueryGuardPubkey200Response.js +129 -0
  71. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
  72. package/dist/model/RootPubkey.js +1 -1
  73. package/dist/model/SelfCustodyWallet.js +7 -7
  74. package/dist/model/StakingPoolId.js +30 -0
  75. package/dist/model/StakingPoolType.js +15 -0
  76. package/dist/model/SubWalletAssetBalance.js +6 -6
  77. package/dist/model/SubmitDepositTravelRuleInfo201Response.js +1 -1
  78. package/dist/model/SwapQuote.js +203 -0
  79. package/dist/model/TSSGroups.js +1 -1
  80. package/dist/model/TokenBalance.js +6 -6
  81. package/dist/model/TransactionDepositToAddressDestination.js +16 -0
  82. package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
  83. package/dist/model/TransactionDestination.js +10 -4
  84. package/dist/model/TransactionRawTxInfo.js +29 -0
  85. package/dist/model/TransactionRbfSource.js +6 -0
  86. package/dist/model/TransactionSubStatus.js +5 -0
  87. package/dist/model/TransactionUserApprovalDetail.js +3 -3
  88. package/dist/model/TransactionUtxoChange.js +101 -0
  89. package/dist/model/TransferDestination.js +6 -0
  90. package/dist/model/TransferParams.js +36 -0
  91. package/dist/model/TransferSource.js +6 -0
  92. package/dist/model/TravelRuleDepositExchangesOrVASP.js +4 -4
  93. package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +7 -7
  94. package/dist/model/TravelRuleDepositLegalEntity.js +5 -5
  95. package/dist/model/TravelRuleDepositNaturalEntity.js +9 -9
  96. package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +5 -5
  97. package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +3 -3
  98. package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +5 -5
  99. package/dist/model/TravelRuleWithdrawLegalEntity.js +2 -2
  100. package/dist/model/TravelRuleWithdrawNaturalEntity.js +7 -7
  101. package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +4 -4
  102. package/dist/model/Vasp.js +7 -7
  103. package/dist/model/WebhookEventData.js +2 -2
  104. package/docs/ActivityExtra.md +5 -5
  105. package/docs/AddressBalance.md +10 -0
  106. package/docs/AddressBooksApi.md +1 -1
  107. package/docs/AddressTransferDestination.md +14 -0
  108. package/docs/AddressesEventData.md +1 -1
  109. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  110. package/docs/ApprovalStatementStatus.md +20 -0
  111. package/docs/AssetBalance.md +1 -1
  112. package/docs/BTCEIP191MessageSignDestination.md +10 -0
  113. package/docs/BabylonAirdropPop.md +14 -0
  114. package/docs/BabylonAirdropRegistration.md +16 -0
  115. package/docs/BabylonEligibleAirdrop.md +14 -0
  116. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  117. package/docs/BabylonRegistrationStatus.md +14 -0
  118. package/docs/BabylonStakingActivityDetailExtra.md +1 -1
  119. package/docs/BabylonStakingRegistration.md +17 -0
  120. package/docs/{TokenBalanceBalance.md → Balance.md} +1 -1
  121. package/docs/ChangeGuardPubkey200Response.md +9 -0
  122. package/docs/ContractCallParams.md +14 -0
  123. package/docs/ContractCallSource.md +1 -0
  124. package/docs/CoreStakingActivityDetailExtra.md +3 -3
  125. package/docs/CreateAddressRequest.md +3 -1
  126. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  127. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  128. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  129. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  130. package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
  131. package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
  132. package/docs/CreateSwapActivityRequest.md +12 -0
  133. package/docs/CreateSwapQuote201Response.md +17 -0
  134. package/docs/CreateSwapQuoteRequest.md +13 -0
  135. package/docs/DeleteGuardPubkey201Response.md +9 -0
  136. package/docs/DevelopersApi.md +5 -5
  137. package/docs/DevelopersWebhooksApi.md +8 -8
  138. package/docs/EthStakeEstimatedFee.md +1 -1
  139. package/docs/EthStakingActivityDetailExtra.md +1 -1
  140. package/docs/GetStakingEstimationFee201Response.md +1 -1
  141. package/docs/GetTransactionLimitation200Response.md +4 -4
  142. package/docs/GuardPubkeyStatus.md +24 -0
  143. package/docs/ListAddressBalancesByToken200Response.md +10 -0
  144. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  145. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  146. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  147. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  148. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  149. package/docs/ListEnableTokenPairs200Response.md +10 -0
  150. package/docs/ListKeyShareHolders200Response.md +10 -0
  151. package/docs/ListSwapActivities200Response.md +10 -0
  152. package/docs/MessageSignDestination.md +1 -0
  153. package/docs/MessageSignDestinationType.md +6 -2
  154. package/docs/MessageSignSource.md +1 -0
  155. package/docs/MpcContractCallSource.md +1 -0
  156. package/docs/MpcMessageSignSource.md +1 -0
  157. package/docs/MpcSigningGroup.md +1 -1
  158. package/docs/MpcTransferSource.md +1 -0
  159. package/docs/OrgInfo.md +1 -1
  160. package/docs/PrimeBrokerApi.md +318 -0
  161. package/docs/QueryApprovalStatement200Response.md +12 -0
  162. package/docs/QueryGuardPubkey200Response.md +11 -0
  163. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
  164. package/docs/RootPubkey.md +1 -1
  165. package/docs/SelfCustodyWallet.md +3 -3
  166. package/docs/StakingPoolId.md +12 -0
  167. package/docs/StakingPoolType.md +6 -0
  168. package/docs/StakingsApi.md +460 -12
  169. package/docs/SubWalletAssetBalance.md +1 -1
  170. package/docs/SubmitDepositTravelRuleInfo201Response.md +1 -1
  171. package/docs/SwapQuote.md +16 -0
  172. package/docs/SwapsApi.md +348 -0
  173. package/docs/TSSGroups.md +1 -1
  174. package/docs/TokenBalance.md +1 -1
  175. package/docs/TransactionDepositToAddressDestination.md +1 -0
  176. package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
  177. package/docs/TransactionDestination.md +1 -0
  178. package/docs/TransactionRawTxInfo.md +2 -0
  179. package/docs/TransactionRbfSource.md +1 -0
  180. package/docs/TransactionSubStatus.md +2 -0
  181. package/docs/TransactionUserApprovalDetail.md +3 -3
  182. package/docs/TransactionUtxoChange.md +10 -0
  183. package/docs/TransactionsApi.md +68 -17
  184. package/docs/TransferDestination.md +14 -0
  185. package/docs/TransferParams.md +14 -0
  186. package/docs/TransferSource.md +1 -0
  187. package/docs/TravelRuleApi.md +13 -13
  188. package/docs/TravelRuleDepositExchangesOrVASP.md +2 -2
  189. package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +7 -7
  190. package/docs/TravelRuleDepositLegalEntity.md +3 -3
  191. package/docs/TravelRuleDepositNaturalEntity.md +5 -5
  192. package/docs/TravelRuleDepositRequestTravelRuleInfo.md +5 -5
  193. package/docs/TravelRuleWithdrawExchangesOrVASP.md +1 -1
  194. package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +5 -5
  195. package/docs/TravelRuleWithdrawLegalEntity.md +1 -1
  196. package/docs/TravelRuleWithdrawNaturalEntity.md +4 -4
  197. package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +4 -4
  198. package/docs/Vasp.md +3 -3
  199. package/docs/WalletsApi.md +78 -13
  200. package/docs/WalletsExchangeWalletApi.md +1 -1
  201. package/docs/WalletsMPCWalletsApi.md +141 -27
  202. package/docs/WalletsSmartContractWalletsApi.md +1 -1
  203. package/docs/WebhookEventData.md +1 -1
  204. package/package.json +2 -2
  205. package/docs/SwapSummary.md +0 -10
@@ -0,0 +1,360 @@
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 _CreateSwapActivityRequest = _interopRequireDefault(require("../model/CreateSwapActivityRequest"));
9
+ var _CreateSwapQuote201Response = _interopRequireDefault(require("../model/CreateSwapQuote201Response"));
10
+ var _CreateSwapQuoteRequest = _interopRequireDefault(require("../model/CreateSwapQuoteRequest"));
11
+ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
12
+ var _ListEnableTokenPairs200Response = _interopRequireDefault(require("../model/ListEnableTokenPairs200Response"));
13
+ var _ListSwapActivities200Response = _interopRequireDefault(require("../model/ListSwapActivities200Response"));
14
+ var _SwapActivity = _interopRequireDefault(require("../model/SwapActivity"));
15
+ var _SwapQuote = _interopRequireDefault(require("../model/SwapQuote"));
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
+ 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); }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Cobo Wallet as a Service 2.0
24
+ *
25
+ * Contact: help@cobo.com
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * Swaps service.
34
+ * @module api/SwapsApi
35
+ */
36
+ var SwapsApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new SwapsApi.
39
+ * @alias module:api/SwapsApi
40
+ * @class
41
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
42
+ * default to {@link module:ApiClient#instance} if unspecified.
43
+ */
44
+ function SwapsApi(apiClient) {
45
+ _classCallCheck(this, SwapsApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Create Swap Activity
51
+ * This operation to create a swap activity.
52
+ * @param {module:model/CreateSwapActivityRequest} CreateSwapActivityRequest The request body for creating a swap activity.
53
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SwapActivity} and HTTP response
54
+ */
55
+ return _createClass(SwapsApi, [{
56
+ key: "createSwapActivityWithHttpInfo",
57
+ value: function createSwapActivityWithHttpInfo(CreateSwapActivityRequest) {
58
+ var postBody = CreateSwapActivityRequest;
59
+ if (postBody && postBody.toJSON) {
60
+ postBody = postBody.toJSON();
61
+ }
62
+ // verify the required parameter 'CreateSwapActivityRequest' is set
63
+ if (CreateSwapActivityRequest === undefined || CreateSwapActivityRequest === null) {
64
+ throw new Error("Missing the required parameter 'CreateSwapActivityRequest' when calling createSwapActivity");
65
+ }
66
+ var pathParams = {};
67
+ var queryParams = {};
68
+ var headerParams = {};
69
+ var formParams = {};
70
+ var authNames = ['OAuth2'];
71
+ var contentTypes = ['application/json'];
72
+ var accepts = ['application/json'];
73
+ var returnType = _SwapActivity["default"];
74
+ return this.apiClient.callApi('/swaps/swap', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
75
+ }
76
+
77
+ /**
78
+ * Create Swap Activity
79
+ * This operation to create a swap activity.
80
+ * @param {module:model/CreateSwapActivityRequest} CreateSwapActivityRequest The request body for creating a swap activity.
81
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SwapActivity}
82
+ */
83
+ }, {
84
+ key: "createSwapActivity",
85
+ value: function createSwapActivity(CreateSwapActivityRequest) {
86
+ return this.createSwapActivityWithHttpInfo(CreateSwapActivityRequest).then(function (response_and_data) {
87
+ return response_and_data.data;
88
+ });
89
+ }
90
+
91
+ /**
92
+ * Create Swap Quote
93
+ * This operation retrieves a quote for swapping between two tokens. Either pay_amount or receive_amount must be provided.
94
+ * @param {module:model/CreateSwapQuoteRequest} CreateSwapQuoteRequest The request body for creating a swap activity.
95
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateSwapQuote201Response} and HTTP response
96
+ */
97
+ }, {
98
+ key: "createSwapQuoteWithHttpInfo",
99
+ value: function createSwapQuoteWithHttpInfo(CreateSwapQuoteRequest) {
100
+ var postBody = CreateSwapQuoteRequest;
101
+ if (postBody && postBody.toJSON) {
102
+ postBody = postBody.toJSON();
103
+ }
104
+ // verify the required parameter 'CreateSwapQuoteRequest' is set
105
+ if (CreateSwapQuoteRequest === undefined || CreateSwapQuoteRequest === null) {
106
+ throw new Error("Missing the required parameter 'CreateSwapQuoteRequest' when calling createSwapQuote");
107
+ }
108
+ var pathParams = {};
109
+ var queryParams = {};
110
+ var headerParams = {};
111
+ var formParams = {};
112
+ var authNames = ['OAuth2'];
113
+ var contentTypes = ['application/json'];
114
+ var accepts = ['application/json'];
115
+ var returnType = _CreateSwapQuote201Response["default"];
116
+ return this.apiClient.callApi('/swaps/quote', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
117
+ }
118
+
119
+ /**
120
+ * Create Swap Quote
121
+ * This operation retrieves a quote for swapping between two tokens. Either pay_amount or receive_amount must be provided.
122
+ * @param {module:model/CreateSwapQuoteRequest} CreateSwapQuoteRequest The request body for creating a swap activity.
123
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateSwapQuote201Response}
124
+ */
125
+ }, {
126
+ key: "createSwapQuote",
127
+ value: function createSwapQuote(CreateSwapQuoteRequest) {
128
+ return this.createSwapQuoteWithHttpInfo(CreateSwapQuoteRequest).then(function (response_and_data) {
129
+ return response_and_data.data;
130
+ });
131
+ }
132
+
133
+ /**
134
+ * Get Swap Activity Details
135
+ * This operation retrieves the details of a swap activity.
136
+ * @param {String} activity_id The unique id of the activity.
137
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SwapActivity} and HTTP response
138
+ */
139
+ }, {
140
+ key: "getSwapActivityWithHttpInfo",
141
+ value: function getSwapActivityWithHttpInfo(activity_id) {
142
+ var postBody = null;
143
+ if (postBody && postBody.toJSON) {
144
+ postBody = postBody.toJSON();
145
+ }
146
+ // verify the required parameter 'activity_id' is set
147
+ if (activity_id === undefined || activity_id === null) {
148
+ throw new Error("Missing the required parameter 'activity_id' when calling getSwapActivity");
149
+ }
150
+ var pathParams = {
151
+ 'activity_id': activity_id
152
+ };
153
+ var queryParams = {};
154
+ var headerParams = {};
155
+ var formParams = {};
156
+ var authNames = ['CoboAuth'];
157
+ var contentTypes = [];
158
+ var accepts = ['application/json'];
159
+ var returnType = _SwapActivity["default"];
160
+ return this.apiClient.callApi('/swaps/activities/{activity_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
161
+ }
162
+
163
+ /**
164
+ * Get Swap Activity Details
165
+ * This operation retrieves the details of a swap activity.
166
+ * @param {String} activity_id The unique id of the activity.
167
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SwapActivity}
168
+ */
169
+ }, {
170
+ key: "getSwapActivity",
171
+ value: function getSwapActivity(activity_id) {
172
+ return this.getSwapActivityWithHttpInfo(activity_id).then(function (response_and_data) {
173
+ return response_and_data.data;
174
+ });
175
+ }
176
+
177
+ /**
178
+ * Get Current Swap Rate
179
+ * This operation retrieves the current market exchange rate and estimated amount for swapping between two tokens. Either pay_amount or receive_amount must be provided.
180
+ * @param {String} wallet_id The wallet ID.
181
+ * @param {String} pay_token_id Unique id of the token to pay.
182
+ * @param {String} receive_token_id Unique id of the token to receive.
183
+ * @param {Object} opts Optional parameters
184
+ * @param {String} [pay_amount] The amount of pay token to swap.
185
+ * @param {String} [receive_amount] The amount of token to receive.
186
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SwapQuote} and HTTP response
187
+ */
188
+ }, {
189
+ key: "getSwapQuoteWithHttpInfo",
190
+ value: function getSwapQuoteWithHttpInfo(wallet_id, pay_token_id, receive_token_id, opts) {
191
+ opts = opts || {};
192
+ var postBody = null;
193
+ if (postBody && postBody.toJSON) {
194
+ postBody = postBody.toJSON();
195
+ }
196
+ // verify the required parameter 'wallet_id' is set
197
+ if (wallet_id === undefined || wallet_id === null) {
198
+ throw new Error("Missing the required parameter 'wallet_id' when calling getSwapQuote");
199
+ }
200
+ // verify the required parameter 'pay_token_id' is set
201
+ if (pay_token_id === undefined || pay_token_id === null) {
202
+ throw new Error("Missing the required parameter 'pay_token_id' when calling getSwapQuote");
203
+ }
204
+ // verify the required parameter 'receive_token_id' is set
205
+ if (receive_token_id === undefined || receive_token_id === null) {
206
+ throw new Error("Missing the required parameter 'receive_token_id' when calling getSwapQuote");
207
+ }
208
+ var pathParams = {};
209
+ var queryParams = {
210
+ 'wallet_id': wallet_id,
211
+ 'pay_token_id': pay_token_id,
212
+ 'receive_token_id': receive_token_id,
213
+ 'pay_amount': opts['pay_amount'],
214
+ 'receive_amount': opts['receive_amount']
215
+ };
216
+ var headerParams = {};
217
+ var formParams = {};
218
+ var authNames = ['CoboAuth'];
219
+ var contentTypes = [];
220
+ var accepts = ['application/json'];
221
+ var returnType = _SwapQuote["default"];
222
+ return this.apiClient.callApi('/swaps/quote', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
223
+ }
224
+
225
+ /**
226
+ * Get Current Swap Rate
227
+ * This operation retrieves the current market exchange rate and estimated amount for swapping between two tokens. Either pay_amount or receive_amount must be provided.
228
+ * @param {String} wallet_id The wallet ID.
229
+ * @param {String} pay_token_id Unique id of the token to pay.
230
+ * @param {String} receive_token_id Unique id of the token to receive.
231
+ * @param {Object} opts Optional parameters
232
+ * @param {String} opts.pay_amount The amount of pay token to swap.
233
+ * @param {String} opts.receive_amount The amount of token to receive.
234
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SwapQuote}
235
+ */
236
+ }, {
237
+ key: "getSwapQuote",
238
+ value: function getSwapQuote(wallet_id, pay_token_id, receive_token_id, opts) {
239
+ return this.getSwapQuoteWithHttpInfo(wallet_id, pay_token_id, receive_token_id, opts).then(function (response_and_data) {
240
+ return response_and_data.data;
241
+ });
242
+ }
243
+
244
+ /**
245
+ * List Supported Token Pairs
246
+ * This operation retrieves all supported token pairs for swaps in a specified wallet.
247
+ * @param {Object} opts Optional parameters
248
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
249
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
250
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
251
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListEnableTokenPairs200Response} and HTTP response
252
+ */
253
+ }, {
254
+ key: "listEnableTokenPairsWithHttpInfo",
255
+ value: function listEnableTokenPairsWithHttpInfo(opts) {
256
+ opts = opts || {};
257
+ var postBody = null;
258
+ if (postBody && postBody.toJSON) {
259
+ postBody = postBody.toJSON();
260
+ }
261
+ var pathParams = {};
262
+ var queryParams = {
263
+ 'limit': opts['limit'],
264
+ 'before': opts['before'],
265
+ 'after': opts['after']
266
+ };
267
+ var headerParams = {};
268
+ var formParams = {};
269
+ var authNames = ['CoboAuth'];
270
+ var contentTypes = [];
271
+ var accepts = ['application/json'];
272
+ var returnType = _ListEnableTokenPairs200Response["default"];
273
+ return this.apiClient.callApi('/swaps/enabled_pairs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
274
+ }
275
+
276
+ /**
277
+ * List Supported Token Pairs
278
+ * This operation retrieves all supported token pairs for swaps in a specified wallet.
279
+ * @param {Object} opts Optional parameters
280
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
281
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
282
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
283
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListEnableTokenPairs200Response}
284
+ */
285
+ }, {
286
+ key: "listEnableTokenPairs",
287
+ value: function listEnableTokenPairs(opts) {
288
+ return this.listEnableTokenPairsWithHttpInfo(opts).then(function (response_and_data) {
289
+ return response_and_data.data;
290
+ });
291
+ }
292
+
293
+ /**
294
+ * List Swap Activities
295
+ * This operation retrieves a list of swap activities.
296
+ * @param {Object} opts Optional parameters
297
+ * @param {module:model/String} [status]
298
+ * @param {Number} [min_updated_timestamp] The start time of the query. All staking activities updated after the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds.
299
+ * @param {Number} [max_updated_timestamp] The end time of the query. All staking activities updated before the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds.
300
+ * @param {String} [initiator] The activity initiator, which is your API key by default. You can also specify the initiator when creating the activity.
301
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
302
+ * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
303
+ * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
304
+ * @param {String} [sort_by = '')] The field used for sorting.
305
+ * @param {module:model/String} [direction = '')] The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order.
306
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSwapActivities200Response} and HTTP response
307
+ */
308
+ }, {
309
+ key: "listSwapActivitiesWithHttpInfo",
310
+ value: function listSwapActivitiesWithHttpInfo(opts) {
311
+ opts = opts || {};
312
+ var postBody = null;
313
+ if (postBody && postBody.toJSON) {
314
+ postBody = postBody.toJSON();
315
+ }
316
+ var pathParams = {};
317
+ var queryParams = {
318
+ 'status': opts['status'],
319
+ 'min_updated_timestamp': opts['min_updated_timestamp'],
320
+ 'max_updated_timestamp': opts['max_updated_timestamp'],
321
+ 'initiator': opts['initiator'],
322
+ 'limit': opts['limit'],
323
+ 'before': opts['before'],
324
+ 'after': opts['after'],
325
+ 'sort_by': opts['sort_by'],
326
+ 'direction': opts['direction']
327
+ };
328
+ var headerParams = {};
329
+ var formParams = {};
330
+ var authNames = ['CoboAuth'];
331
+ var contentTypes = [];
332
+ var accepts = ['application/json'];
333
+ var returnType = _ListSwapActivities200Response["default"];
334
+ return this.apiClient.callApi('/swaps/activities', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
335
+ }
336
+
337
+ /**
338
+ * List Swap Activities
339
+ * This operation retrieves a list of swap activities.
340
+ * @param {Object} opts Optional parameters
341
+ * @param {module:model/String} opts.status
342
+ * @param {Number} opts.min_updated_timestamp The start time of the query. All staking activities updated after the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds.
343
+ * @param {Number} opts.max_updated_timestamp The end time of the query. All staking activities updated before the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds.
344
+ * @param {String} opts.initiator The activity initiator, which is your API key by default. You can also specify the initiator when creating the activity.
345
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
346
+ * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
347
+ * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
348
+ * @param {String} opts.sort_by The field used for sorting. (default to '')
349
+ * @param {module:model/String} opts.direction The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. (default to '')
350
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSwapActivities200Response}
351
+ */
352
+ }, {
353
+ key: "listSwapActivities",
354
+ value: function listSwapActivities(opts) {
355
+ return this.listSwapActivitiesWithHttpInfo(opts).then(function (response_and_data) {
356
+ return response_and_data.data;
357
+ });
358
+ }
359
+ }]);
360
+ }();
@@ -72,7 +72,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
72
72
  var queryParams = {};
73
73
  var headerParams = {};
74
74
  var formParams = {};
75
- var authNames = ['CoboAuth'];
75
+ var authNames = ['OAuth2'];
76
76
  var contentTypes = ['application/json'];
77
77
  var accepts = ['application/json'];
78
78
  var returnType = [_BroadcastSignedTransactions201ResponseInner["default"]];
@@ -117,7 +117,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
117
117
  var queryParams = {};
118
118
  var headerParams = {};
119
119
  var formParams = {};
120
- var authNames = ['CoboAuth'];
120
+ var authNames = ['OAuth2'];
121
121
  var contentTypes = [];
122
122
  var accepts = ['application/json'];
123
123
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -173,7 +173,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
173
173
  };
174
174
  var headerParams = {};
175
175
  var formParams = {};
176
- var authNames = ['CoboAuth'];
176
+ var authNames = ['OAuth2'];
177
177
  var contentTypes = [];
178
178
  var accepts = ['application/json'];
179
179
  var returnType = [_CheckLoopTransfers200ResponseInner["default"]];
@@ -215,7 +215,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
215
215
  var queryParams = {};
216
216
  var headerParams = {};
217
217
  var formParams = {};
218
- var authNames = ['OAuth2', 'CoboAuth'];
218
+ var authNames = ['OAuth2'];
219
219
  var contentTypes = ['application/json'];
220
220
  var accepts = ['application/json'];
221
221
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -256,7 +256,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
256
256
  var queryParams = {};
257
257
  var headerParams = {};
258
258
  var formParams = {};
259
- var authNames = ['OAuth2', 'CoboAuth'];
259
+ var authNames = ['OAuth2'];
260
260
  var contentTypes = ['application/json'];
261
261
  var accepts = ['application/json'];
262
262
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -280,7 +280,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
280
280
 
281
281
  /**
282
282
  * Transfer token
283
- * The operation transfers your assets from a wallet created on Cobo Portal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>If you make transfers from Custodial Wallets, do not set the fee-related properties. Otherwise, the transaction will fail.</Note> <Note>You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the <code>utxo_outputs</code> property to specify the destination addresses.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
283
+ * The operation transfers your assets from a wallet created on Cobo Portal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>If you make transfers from Custodial Wallets (Asset Wallets) and Exchange Wallets, do not set the fee-related properties, as they will not take effects.</Note> <Note>You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the <code>utxo_outputs</code> property to specify the destination addresses.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
284
284
  * @param {Object} opts Optional parameters
285
285
  * @param {module:model/TransferParams} [TransferParams] The request body to create a transfer transaction
286
286
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
@@ -297,7 +297,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
297
297
  var queryParams = {};
298
298
  var headerParams = {};
299
299
  var formParams = {};
300
- var authNames = ['OAuth2', 'CoboAuth'];
300
+ var authNames = ['OAuth2'];
301
301
  var contentTypes = ['application/json'];
302
302
  var accepts = ['application/json'];
303
303
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -306,7 +306,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
306
306
 
307
307
  /**
308
308
  * Transfer token
309
- * The operation transfers your assets from a wallet created on Cobo Portal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>If you make transfers from Custodial Wallets, do not set the fee-related properties. Otherwise, the transaction will fail.</Note> <Note>You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the <code>utxo_outputs</code> property to specify the destination addresses.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
309
+ * The operation transfers your assets from a wallet created on Cobo Portal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>If you make transfers from Custodial Wallets (Asset Wallets) and Exchange Wallets, do not set the fee-related properties, as they will not take effects.</Note> <Note>You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the <code>utxo_outputs</code> property to specify the destination addresses.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
310
310
  * @param {Object} opts Optional parameters
311
311
  * @param {module:model/TransferParams} opts.TransferParams The request body to create a transfer transaction
312
312
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
@@ -345,7 +345,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
345
345
  var queryParams = {};
346
346
  var headerParams = {};
347
347
  var formParams = {};
348
- var authNames = ['CoboAuth'];
348
+ var authNames = ['OAuth2'];
349
349
  var contentTypes = ['application/json'];
350
350
  var accepts = ['application/json'];
351
351
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -387,7 +387,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
387
387
  var queryParams = {};
388
388
  var headerParams = {};
389
389
  var formParams = {};
390
- var authNames = ['CoboAuth'];
390
+ var authNames = ['OAuth2'];
391
391
  var contentTypes = ['application/json'];
392
392
  var accepts = ['application/json'];
393
393
  var returnType = _EstimatedFee["default"];
@@ -410,7 +410,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
410
410
  }
411
411
 
412
412
  /**
413
- * Get transaction approval information
413
+ * Get transaction approval details
414
414
  * This operation retrieves approval detailed information about a specified transaction.
415
415
  * @param {String} transaction_id The transaction ID.
416
416
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TransactionApprovalDetail} and HTTP response
@@ -440,7 +440,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
440
440
  }
441
441
 
442
442
  /**
443
- * Get transaction approval information
443
+ * Get transaction approval details
444
444
  * This operation retrieves approval detailed information about a specified transaction.
445
445
  * @param {String} transaction_id The transaction ID.
446
446
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TransactionApprovalDetail}
@@ -476,7 +476,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
476
476
  var queryParams = {};
477
477
  var headerParams = {};
478
478
  var formParams = {};
479
- var authNames = ['CoboAuth'];
479
+ var authNames = ['OAuth2'];
480
480
  var contentTypes = [];
481
481
  var accepts = ['application/json'];
482
482
  var returnType = _TransactionDetail["default"];
@@ -550,7 +550,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
550
550
  };
551
551
  var headerParams = {};
552
552
  var formParams = {};
553
- var authNames = ['CoboAuth'];
553
+ var authNames = ['OAuth2'];
554
554
  var contentTypes = [];
555
555
  var accepts = ['application/json'];
556
556
  var returnType = _ListTransactions200Response["default"];
@@ -590,7 +590,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
590
590
 
591
591
  /**
592
592
  * Resend transaction
593
- * This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
593
+ * This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
594
594
  * @param {String} transaction_id The transaction ID.
595
595
  * @param {Object} opts Optional parameters
596
596
  * @param {module:model/TransactionResend} [TransactionResend] The request body to resend transactions
@@ -614,7 +614,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
614
614
  var queryParams = {};
615
615
  var headerParams = {};
616
616
  var formParams = {};
617
- var authNames = ['CoboAuth'];
617
+ var authNames = ['OAuth2'];
618
618
  var contentTypes = ['application/json'];
619
619
  var accepts = ['application/json'];
620
620
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -623,7 +623,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
623
623
 
624
624
  /**
625
625
  * Resend transaction
626
- * This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
626
+ * This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
627
627
  * @param {String} transaction_id The transaction ID.
628
628
  * @param {Object} opts Optional parameters
629
629
  * @param {module:model/TransactionResend} opts.TransactionResend The request body to resend transactions
@@ -637,9 +637,53 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
637
637
  });
638
638
  }
639
639
 
640
+ /**
641
+ * Sign and broadcast transaction
642
+ * This operation signs and broadcasts a specified transaction. To call this operation, the following conditions must be met: - The `transaction_process_type` of the transaction must be set to `BuildOnly` when you call the [Transfer token](https://www.cobo.com/developers/v2/api-references/transactions/transfer-token) or [Call smart contract](https://www.cobo.com/developers/v2/api-references/transactions/call-smart-contract) operation. - The transaction status must be `Built`.
643
+ * @param {String} transaction_id The transaction ID.
644
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
645
+ */
646
+ }, {
647
+ key: "signAndBroadcastTransactionByIdWithHttpInfo",
648
+ value: function signAndBroadcastTransactionByIdWithHttpInfo(transaction_id) {
649
+ var postBody = null;
650
+ if (postBody && postBody.toJSON) {
651
+ postBody = postBody.toJSON();
652
+ }
653
+ // verify the required parameter 'transaction_id' is set
654
+ if (transaction_id === undefined || transaction_id === null) {
655
+ throw new Error("Missing the required parameter 'transaction_id' when calling signAndBroadcastTransactionById");
656
+ }
657
+ var pathParams = {
658
+ 'transaction_id': transaction_id
659
+ };
660
+ var queryParams = {};
661
+ var headerParams = {};
662
+ var formParams = {};
663
+ var authNames = ['CoboAuth'];
664
+ var contentTypes = [];
665
+ var accepts = ['application/json'];
666
+ var returnType = _CreateTransferTransaction201Response["default"];
667
+ return this.apiClient.callApi('/transactions/{transaction_id}/sign_and_broadcast', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
668
+ }
669
+
670
+ /**
671
+ * Sign and broadcast transaction
672
+ * This operation signs and broadcasts a specified transaction. To call this operation, the following conditions must be met: - The `transaction_process_type` of the transaction must be set to `BuildOnly` when you call the [Transfer token](https://www.cobo.com/developers/v2/api-references/transactions/transfer-token) or [Call smart contract](https://www.cobo.com/developers/v2/api-references/transactions/call-smart-contract) operation. - The transaction status must be `Built`.
673
+ * @param {String} transaction_id The transaction ID.
674
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
675
+ */
676
+ }, {
677
+ key: "signAndBroadcastTransactionById",
678
+ value: function signAndBroadcastTransactionById(transaction_id) {
679
+ return this.signAndBroadcastTransactionByIdWithHttpInfo(transaction_id).then(function (response_and_data) {
680
+ return response_and_data.data;
681
+ });
682
+ }
683
+
640
684
  /**
641
685
  * Speed up transaction
642
- * This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
686
+ * This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
643
687
  * @param {String} transaction_id The transaction ID.
644
688
  * @param {Object} opts Optional parameters
645
689
  * @param {module:model/TransactionRbf} [TransactionRbf] The request body to drop or to speed up transactions
@@ -663,7 +707,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
663
707
  var queryParams = {};
664
708
  var headerParams = {};
665
709
  var formParams = {};
666
- var authNames = ['CoboAuth'];
710
+ var authNames = ['OAuth2'];
667
711
  var contentTypes = ['application/json'];
668
712
  var accepts = ['application/json'];
669
713
  var returnType = _CreateTransferTransaction201Response["default"];
@@ -672,7 +716,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
672
716
 
673
717
  /**
674
718
  * Speed up transaction
675
- * This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
719
+ * This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
676
720
  * @param {String} transaction_id The transaction ID.
677
721
  * @param {Object} opts Optional parameters
678
722
  * @param {module:model/TransactionRbf} opts.TransactionRbf The request body to drop or to speed up transactions