@cobo/cobo-waas2 1.8.0 → 1.9.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.
- package/README.md +78 -30
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +1 -1
- package/dist/api/DevelopersApi.js +3 -3
- package/dist/api/DevelopersWebhooksApi.js +8 -8
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +12 -12
- package/dist/api/TransactionsApi.js +60 -16
- package/dist/api/TravelRuleApi.js +18 -18
- package/dist/api/WalletsApi.js +84 -13
- package/dist/api/WalletsExchangeWalletApi.js +1 -1
- package/dist/api/WalletsMPCWalletsApi.js +151 -39
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +112 -7
- package/dist/model/ActivityExtra.js +5 -5
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressTransferDestination.js +36 -0
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonStakingActivityDetailExtra.js +1 -1
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +22 -22
- package/dist/model/ChangeGuardPubkey200Response.js +110 -0
- package/dist/model/ContractCallParams.js +36 -0
- package/dist/model/CoreStakingActivityDetailExtra.js +3 -3
- package/dist/model/CreateAddressRequest.js +28 -2
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/EthStakeEstimatedFee.js +1 -1
- package/dist/model/EthStakingActivityDetailExtra.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +4 -4
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/OrgInfo.js +3 -3
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SelfCustodyWallet.js +7 -7
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +1 -1
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TokenBalance.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +16 -0
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDestination.js +6 -0
- package/dist/model/TransactionRawTxInfo.js +13 -0
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionUserApprovalDetail.js +3 -3
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +36 -0
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +4 -4
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +7 -7
- package/dist/model/TravelRuleDepositLegalEntity.js +5 -5
- package/dist/model/TravelRuleDepositNaturalEntity.js +9 -9
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +3 -3
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawLegalEntity.js +2 -2
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +7 -7
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +4 -4
- package/dist/model/Vasp.js +7 -7
- package/docs/ActivityExtra.md +5 -5
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonStakingActivityDetailExtra.md +1 -1
- package/docs/{TokenBalanceBalance.md → Balance.md} +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +14 -0
- package/docs/CoreStakingActivityDetailExtra.md +3 -3
- package/docs/CreateAddressRequest.md +3 -1
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DevelopersApi.md +3 -3
- package/docs/DevelopersWebhooksApi.md +8 -8
- package/docs/EthStakeEstimatedFee.md +1 -1
- package/docs/EthStakingActivityDetailExtra.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -1
- package/docs/GetTransactionLimitation200Response.md +4 -4
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/OrgInfo.md +1 -1
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelfCustodyWallet.md +3 -3
- package/docs/StakingsApi.md +12 -12
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +1 -1
- package/docs/TSSGroups.md +1 -1
- package/docs/TokenBalance.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionRawTxInfo.md +1 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionUserApprovalDetail.md +3 -3
- package/docs/TransactionsApi.md +66 -15
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +14 -0
- package/docs/TravelRuleApi.md +13 -13
- package/docs/TravelRuleDepositExchangesOrVASP.md +2 -2
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +7 -7
- package/docs/TravelRuleDepositLegalEntity.md +3 -3
- package/docs/TravelRuleDepositNaturalEntity.md +5 -5
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +5 -5
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +1 -1
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +5 -5
- package/docs/TravelRuleWithdrawLegalEntity.md +1 -1
- package/docs/TravelRuleWithdrawNaturalEntity.md +4 -4
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +4 -4
- package/docs/Vasp.md +3 -3
- package/docs/WalletsApi.md +78 -13
- package/docs/WalletsExchangeWalletApi.md +1 -1
- package/docs/WalletsMPCWalletsApi.md +141 -27
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/package.json +1 -1
|
@@ -46,9 +46,9 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Retrieve transaction limitations
|
|
49
|
-
* This
|
|
49
|
+
* This operation retrieves Travel Rule requirements and available options for a transaction based on its transaction type and ID. Use this endpoint before submitting Travel Rule information to understand the requirements and available options for your transaction.
|
|
50
50
|
* @param {module:model/String} transaction_type The transaction type. Possible values include: - `DEPOSIT`: A deposit transaction. - `WITHDRAW`: A withdrawal transaction.
|
|
51
|
-
* @param {String} transaction_id The transaction ID
|
|
51
|
+
* @param {String} transaction_id The transaction ID.
|
|
52
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTransactionLimitation200Response} and HTTP response
|
|
53
53
|
*/
|
|
54
54
|
return _createClass(TravelRuleApi, [{
|
|
@@ -73,7 +73,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
73
73
|
};
|
|
74
74
|
var headerParams = {};
|
|
75
75
|
var formParams = {};
|
|
76
|
-
var authNames = ['OAuth2'
|
|
76
|
+
var authNames = ['OAuth2'];
|
|
77
77
|
var contentTypes = [];
|
|
78
78
|
var accepts = ['application/json'];
|
|
79
79
|
var returnType = _GetTransactionLimitation200Response["default"];
|
|
@@ -82,9 +82,9 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Retrieve transaction limitations
|
|
85
|
-
* This
|
|
85
|
+
* This operation retrieves Travel Rule requirements and available options for a transaction based on its transaction type and ID. Use this endpoint before submitting Travel Rule information to understand the requirements and available options for your transaction.
|
|
86
86
|
* @param {module:model/String} transaction_type The transaction type. Possible values include: - `DEPOSIT`: A deposit transaction. - `WITHDRAW`: A withdrawal transaction.
|
|
87
|
-
* @param {String} transaction_id The transaction ID
|
|
87
|
+
* @param {String} transaction_id The transaction ID.
|
|
88
88
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTransactionLimitation200Response}
|
|
89
89
|
*/
|
|
90
90
|
}, {
|
|
@@ -97,7 +97,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* List supported countries
|
|
100
|
-
* This operation retrieves
|
|
100
|
+
* This operation retrieves a list of supported countries that can be used when submitting Travel Rule information. Use this endpoint to obtain valid country values for: - Place of incorporation of a legal entity - Place of birth of a natural person
|
|
101
101
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ListSupportedCountries200ResponseInner>} and HTTP response
|
|
102
102
|
*/
|
|
103
103
|
}, {
|
|
@@ -111,7 +111,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
111
111
|
var queryParams = {};
|
|
112
112
|
var headerParams = {};
|
|
113
113
|
var formParams = {};
|
|
114
|
-
var authNames = ['OAuth2'
|
|
114
|
+
var authNames = ['OAuth2'];
|
|
115
115
|
var contentTypes = [];
|
|
116
116
|
var accepts = ['application/json'];
|
|
117
117
|
var returnType = [_ListSupportedCountries200ResponseInner["default"]];
|
|
@@ -120,7 +120,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* List supported countries
|
|
123
|
-
* This operation retrieves
|
|
123
|
+
* This operation retrieves a list of supported countries that can be used when submitting Travel Rule information. Use this endpoint to obtain valid country values for: - Place of incorporation of a legal entity - Place of birth of a natural person
|
|
124
124
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ListSupportedCountries200ResponseInner>}
|
|
125
125
|
*/
|
|
126
126
|
}, {
|
|
@@ -132,8 +132,8 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* Submit
|
|
136
|
-
* This operation
|
|
135
|
+
* Submit Travel Rule information for deposits
|
|
136
|
+
* This operation submits Travel Rule information for a deposit transaction.
|
|
137
137
|
* @param {Object} opts Optional parameters
|
|
138
138
|
* @param {module:model/TravelRuleDepositRequest} [TravelRuleDepositRequest]
|
|
139
139
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmitDepositTravelRuleInfo201Response} and HTTP response
|
|
@@ -150,7 +150,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
150
150
|
var queryParams = {};
|
|
151
151
|
var headerParams = {};
|
|
152
152
|
var formParams = {};
|
|
153
|
-
var authNames = ['OAuth2'
|
|
153
|
+
var authNames = ['OAuth2'];
|
|
154
154
|
var contentTypes = ['application/json'];
|
|
155
155
|
var accepts = ['application/json'];
|
|
156
156
|
var returnType = _SubmitDepositTravelRuleInfo201Response["default"];
|
|
@@ -158,8 +158,8 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Submit
|
|
162
|
-
* This operation
|
|
161
|
+
* Submit Travel Rule information for deposits
|
|
162
|
+
* This operation submits Travel Rule information for a deposit transaction.
|
|
163
163
|
* @param {Object} opts Optional parameters
|
|
164
164
|
* @param {module:model/TravelRuleDepositRequest} opts.TravelRuleDepositRequest
|
|
165
165
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmitDepositTravelRuleInfo201Response}
|
|
@@ -173,8 +173,8 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
|
-
* Submit
|
|
177
|
-
* This operation
|
|
176
|
+
* Submit Travel Rule information for withdrawals
|
|
177
|
+
* This operation submits Travel Rule information for a withdrawal transaction.
|
|
178
178
|
* @param {Object} opts Optional parameters
|
|
179
179
|
* @param {module:model/TravelRuleWithdrawRequest} [TravelRuleWithdrawRequest]
|
|
180
180
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmitDepositTravelRuleInfo201Response} and HTTP response
|
|
@@ -191,7 +191,7 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
191
191
|
var queryParams = {};
|
|
192
192
|
var headerParams = {};
|
|
193
193
|
var formParams = {};
|
|
194
|
-
var authNames = ['OAuth2'
|
|
194
|
+
var authNames = ['OAuth2'];
|
|
195
195
|
var contentTypes = ['application/json'];
|
|
196
196
|
var accepts = ['application/json'];
|
|
197
197
|
var returnType = _SubmitDepositTravelRuleInfo201Response["default"];
|
|
@@ -199,8 +199,8 @@ var TravelRuleApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* Submit
|
|
203
|
-
* This operation
|
|
202
|
+
* Submit Travel Rule information for withdrawals
|
|
203
|
+
* This operation submits Travel Rule information for a withdrawal transaction.
|
|
204
204
|
* @param {Object} opts Optional parameters
|
|
205
205
|
* @param {module:model/TravelRuleWithdrawRequest} opts.TravelRuleWithdrawRequest
|
|
206
206
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmitDepositTravelRuleInfo201Response}
|
package/dist/api/WalletsApi.js
CHANGED
|
@@ -16,6 +16,7 @@ var _CreatedWalletInfo = _interopRequireDefault(require("../model/CreatedWalletI
|
|
|
16
16
|
var _DeleteWalletById201Response = _interopRequireDefault(require("../model/DeleteWalletById201Response"));
|
|
17
17
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
18
18
|
var _ExtendedTokenInfo = _interopRequireDefault(require("../model/ExtendedTokenInfo"));
|
|
19
|
+
var _ListAddressBalancesByToken200Response = _interopRequireDefault(require("../model/ListAddressBalancesByToken200Response"));
|
|
19
20
|
var _ListAddresses200Response = _interopRequireDefault(require("../model/ListAddresses200Response"));
|
|
20
21
|
var _ListSupportedChains200Response = _interopRequireDefault(require("../model/ListSupportedChains200Response"));
|
|
21
22
|
var _ListSupportedTokens200Response = _interopRequireDefault(require("../model/ListSupportedTokens200Response"));
|
|
@@ -241,7 +242,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
241
242
|
var queryParams = {};
|
|
242
243
|
var headerParams = {};
|
|
243
244
|
var formParams = {};
|
|
244
|
-
var authNames = ['OAuth2'
|
|
245
|
+
var authNames = ['OAuth2'];
|
|
245
246
|
var contentTypes = ['application/json'];
|
|
246
247
|
var accepts = ['application/json'];
|
|
247
248
|
var returnType = [_AddressInfo["default"]];
|
|
@@ -283,7 +284,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
283
284
|
var queryParams = {};
|
|
284
285
|
var headerParams = {};
|
|
285
286
|
var formParams = {};
|
|
286
|
-
var authNames = ['OAuth2'
|
|
287
|
+
var authNames = ['OAuth2'];
|
|
287
288
|
var contentTypes = ['application/json'];
|
|
288
289
|
var accepts = ['application/json'];
|
|
289
290
|
var returnType = _CreatedWalletInfo["default"];
|
|
@@ -328,7 +329,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
328
329
|
var queryParams = {};
|
|
329
330
|
var headerParams = {};
|
|
330
331
|
var formParams = {};
|
|
331
|
-
var authNames = ['
|
|
332
|
+
var authNames = ['OAuth2'];
|
|
332
333
|
var contentTypes = [];
|
|
333
334
|
var accepts = ['application/json'];
|
|
334
335
|
var returnType = _DeleteWalletById201Response["default"];
|
|
@@ -439,7 +440,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
439
440
|
};
|
|
440
441
|
var headerParams = {};
|
|
441
442
|
var formParams = {};
|
|
442
|
-
var authNames = ['
|
|
443
|
+
var authNames = ['OAuth2'];
|
|
443
444
|
var contentTypes = [];
|
|
444
445
|
var accepts = ['application/json'];
|
|
445
446
|
var returnType = _MaxTransferableValue["default"];
|
|
@@ -532,7 +533,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
532
533
|
var queryParams = {};
|
|
533
534
|
var headerParams = {};
|
|
534
535
|
var formParams = {};
|
|
535
|
-
var authNames = ['
|
|
536
|
+
var authNames = ['OAuth2'];
|
|
536
537
|
var contentTypes = [];
|
|
537
538
|
var accepts = ['application/json'];
|
|
538
539
|
var returnType = _WalletInfo["default"];
|
|
@@ -553,6 +554,73 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
553
554
|
});
|
|
554
555
|
}
|
|
555
556
|
|
|
557
|
+
/**
|
|
558
|
+
* List address balances by token
|
|
559
|
+
* This operation retrieves a list of address balances for a specified token within a wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
560
|
+
* @param {String} wallet_id The wallet ID.
|
|
561
|
+
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
562
|
+
* @param {Object} opts Optional parameters
|
|
563
|
+
* @param {String} [addresses] A list of wallet addresses, separated by comma. For addresses requiring a memo, append the memo after the address using the '|' separator (e.g., \"address|memo\").
|
|
564
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
565
|
+
* @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.
|
|
566
|
+
* @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.
|
|
567
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAddressBalancesByToken200Response} and HTTP response
|
|
568
|
+
*/
|
|
569
|
+
}, {
|
|
570
|
+
key: "listAddressBalancesByTokenWithHttpInfo",
|
|
571
|
+
value: function listAddressBalancesByTokenWithHttpInfo(wallet_id, token_id, opts) {
|
|
572
|
+
opts = opts || {};
|
|
573
|
+
var postBody = null;
|
|
574
|
+
if (postBody && postBody.toJSON) {
|
|
575
|
+
postBody = postBody.toJSON();
|
|
576
|
+
}
|
|
577
|
+
// verify the required parameter 'wallet_id' is set
|
|
578
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
579
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling listAddressBalancesByToken");
|
|
580
|
+
}
|
|
581
|
+
// verify the required parameter 'token_id' is set
|
|
582
|
+
if (token_id === undefined || token_id === null) {
|
|
583
|
+
throw new Error("Missing the required parameter 'token_id' when calling listAddressBalancesByToken");
|
|
584
|
+
}
|
|
585
|
+
var pathParams = {
|
|
586
|
+
'wallet_id': wallet_id,
|
|
587
|
+
'token_id': token_id
|
|
588
|
+
};
|
|
589
|
+
var queryParams = {
|
|
590
|
+
'addresses': opts['addresses'],
|
|
591
|
+
'limit': opts['limit'],
|
|
592
|
+
'before': opts['before'],
|
|
593
|
+
'after': opts['after']
|
|
594
|
+
};
|
|
595
|
+
var headerParams = {};
|
|
596
|
+
var formParams = {};
|
|
597
|
+
var authNames = ['OAuth2'];
|
|
598
|
+
var contentTypes = [];
|
|
599
|
+
var accepts = ['application/json'];
|
|
600
|
+
var returnType = _ListAddressBalancesByToken200Response["default"];
|
|
601
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/tokens/{token_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* List address balances by token
|
|
606
|
+
* This operation retrieves a list of address balances for a specified token within a wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
607
|
+
* @param {String} wallet_id The wallet ID.
|
|
608
|
+
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
609
|
+
* @param {Object} opts Optional parameters
|
|
610
|
+
* @param {String} opts.addresses A list of wallet addresses, separated by comma. For addresses requiring a memo, append the memo after the address using the '|' separator (e.g., \"address|memo\").
|
|
611
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
612
|
+
* @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.
|
|
613
|
+
* @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.
|
|
614
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddressBalancesByToken200Response}
|
|
615
|
+
*/
|
|
616
|
+
}, {
|
|
617
|
+
key: "listAddressBalancesByToken",
|
|
618
|
+
value: function listAddressBalancesByToken(wallet_id, token_id, opts) {
|
|
619
|
+
return this.listAddressBalancesByTokenWithHttpInfo(wallet_id, token_id, opts).then(function (response_and_data) {
|
|
620
|
+
return response_and_data.data;
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
|
|
556
624
|
/**
|
|
557
625
|
* List wallet addresses
|
|
558
626
|
* This operation retrieves a list of addresses within a specified wallet.
|
|
@@ -589,7 +657,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
589
657
|
};
|
|
590
658
|
var headerParams = {};
|
|
591
659
|
var formParams = {};
|
|
592
|
-
var authNames = ['
|
|
660
|
+
var authNames = ['OAuth2'];
|
|
593
661
|
var contentTypes = [];
|
|
594
662
|
var accepts = ['application/json'];
|
|
595
663
|
var returnType = _ListAddresses200Response["default"];
|
|
@@ -888,7 +956,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
888
956
|
};
|
|
889
957
|
var headerParams = {};
|
|
890
958
|
var formParams = {};
|
|
891
|
-
var authNames = ['
|
|
959
|
+
var authNames = ['OAuth2'];
|
|
892
960
|
var contentTypes = [];
|
|
893
961
|
var accepts = ['application/json'];
|
|
894
962
|
var returnType = _ListTokenBalancesForAddress200Response["default"];
|
|
@@ -949,7 +1017,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
949
1017
|
};
|
|
950
1018
|
var headerParams = {};
|
|
951
1019
|
var formParams = {};
|
|
952
|
-
var authNames = ['
|
|
1020
|
+
var authNames = ['OAuth2'];
|
|
953
1021
|
var contentTypes = [];
|
|
954
1022
|
var accepts = ['application/json'];
|
|
955
1023
|
var returnType = _ListTokenBalancesForAddress200Response["default"];
|
|
@@ -982,6 +1050,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
982
1050
|
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
983
1051
|
* @param {Object} opts Optional parameters
|
|
984
1052
|
* @param {String} [address] The wallet address.
|
|
1053
|
+
* @param {String} [tx_hash]
|
|
985
1054
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
986
1055
|
* @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.
|
|
987
1056
|
* @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.
|
|
@@ -1009,13 +1078,14 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1009
1078
|
var queryParams = {
|
|
1010
1079
|
'token_id': token_id,
|
|
1011
1080
|
'address': opts['address'],
|
|
1081
|
+
'tx_hash': opts['tx_hash'],
|
|
1012
1082
|
'limit': opts['limit'],
|
|
1013
1083
|
'before': opts['before'],
|
|
1014
1084
|
'after': opts['after']
|
|
1015
1085
|
};
|
|
1016
1086
|
var headerParams = {};
|
|
1017
1087
|
var formParams = {};
|
|
1018
|
-
var authNames = ['
|
|
1088
|
+
var authNames = ['OAuth2'];
|
|
1019
1089
|
var contentTypes = [];
|
|
1020
1090
|
var accepts = ['application/json'];
|
|
1021
1091
|
var returnType = _ListUtxos200Response["default"];
|
|
@@ -1029,6 +1099,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1029
1099
|
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
1030
1100
|
* @param {Object} opts Optional parameters
|
|
1031
1101
|
* @param {String} opts.address The wallet address.
|
|
1102
|
+
* @param {String} opts.tx_hash
|
|
1032
1103
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1033
1104
|
* @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.
|
|
1034
1105
|
* @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.
|
|
@@ -1075,7 +1146,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1075
1146
|
};
|
|
1076
1147
|
var headerParams = {};
|
|
1077
1148
|
var formParams = {};
|
|
1078
|
-
var authNames = ['
|
|
1149
|
+
var authNames = ['OAuth2'];
|
|
1079
1150
|
var contentTypes = [];
|
|
1080
1151
|
var accepts = ['application/json'];
|
|
1081
1152
|
var returnType = _ListWallets200Response["default"];
|
|
@@ -1129,7 +1200,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1129
1200
|
var queryParams = {};
|
|
1130
1201
|
var headerParams = {};
|
|
1131
1202
|
var formParams = {};
|
|
1132
|
-
var authNames = ['OAuth2'
|
|
1203
|
+
var authNames = ['OAuth2'];
|
|
1133
1204
|
var contentTypes = ['application/json'];
|
|
1134
1205
|
var accepts = ['application/json'];
|
|
1135
1206
|
var returnType = _LockUtxos201Response["default"];
|
|
@@ -1178,7 +1249,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1178
1249
|
var queryParams = {};
|
|
1179
1250
|
var headerParams = {};
|
|
1180
1251
|
var formParams = {};
|
|
1181
|
-
var authNames = ['OAuth2'
|
|
1252
|
+
var authNames = ['OAuth2'];
|
|
1182
1253
|
var contentTypes = ['application/json'];
|
|
1183
1254
|
var accepts = ['application/json'];
|
|
1184
1255
|
var returnType = _LockUtxos201Response["default"];
|
|
@@ -1227,7 +1298,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1227
1298
|
var queryParams = {};
|
|
1228
1299
|
var headerParams = {};
|
|
1229
1300
|
var formParams = {};
|
|
1230
|
-
var authNames = ['OAuth2'
|
|
1301
|
+
var authNames = ['OAuth2'];
|
|
1231
1302
|
var contentTypes = ['application/json'];
|
|
1232
1303
|
var accepts = ['application/json'];
|
|
1233
1304
|
var returnType = _WalletInfo["default"];
|
|
@@ -80,7 +80,7 @@ var WalletsExchangeWalletApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
80
80
|
};
|
|
81
81
|
var headerParams = {};
|
|
82
82
|
var formParams = {};
|
|
83
|
-
var authNames = ['
|
|
83
|
+
var authNames = ['OAuth2'];
|
|
84
84
|
var contentTypes = [];
|
|
85
85
|
var accepts = ['application/json'];
|
|
86
86
|
var returnType = _ListAssetBalancesForExchangeWallet200Response["default"];
|