@cobo/cobo-waas2 1.1.2 → 1.2.1
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 +16 -3
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +640 -0
- package/dist/api/OAuthApi.js +16 -15
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +123 -12
- package/dist/api/WalletsExchangeWalletApi.js +254 -0
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/index.js +56 -0
- package/dist/model/AddressInfo.js +1 -1
- package/dist/model/AddressTransferDestination.js +3 -3
- package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/AssetInfo.js +2 -2
- package/dist/model/BabylonStakeExtra.js +9 -0
- package/dist/model/CheckAddressValidity200Response.js +2 -2
- package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
- package/dist/model/CoboSafeDelegate.js +27 -2
- package/dist/model/ContractCallDestination.js +24 -3
- package/dist/model/ContractCallSource.js +41 -4
- package/dist/model/CreateSmartContractWalletParams.js +23 -2
- package/dist/model/CreateStakeActivity.js +14 -1
- package/dist/model/CreateStakeActivityExtra.js +57 -6
- package/dist/model/CreateTssRequestRequest.js +13 -0
- package/dist/model/CreateUnstakeActivity.js +13 -0
- package/dist/model/CreateWalletParams.js +51 -6
- package/dist/model/CreateWithdrawActivity.js +13 -0
- package/dist/model/CreatedWalletInfo.js +63 -6
- package/dist/model/EstimateFeeParams.js +37 -4
- package/dist/model/EstimateStakeFee.js +19 -1
- package/dist/model/EstimateUnstakeFee.js +18 -0
- package/dist/model/EstimateWithdrawFee.js +18 -0
- package/dist/model/EstimatedFee.js +65 -8
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/ExchangeId.js +5 -0
- package/dist/model/ExchangeTransferDestination.js +16 -16
- package/dist/model/ExchangeTransferSource.js +14 -14
- package/dist/model/FeeRate.js +65 -8
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +13 -0
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
- package/dist/model/ListExchanges200ResponseInner.js +122 -0
- package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
- package/dist/model/MPCWalletInfo.js +26 -0
- package/dist/model/MessageSignDestination.js +37 -4
- package/dist/model/MessageSignSource.js +27 -2
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +20 -4
- package/dist/model/RefreshToken200Response.js +135 -0
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SmartContractWalletInfo.js +23 -2
- package/dist/model/SmartContractWalletType.js +2 -2
- package/dist/model/StakingSource.js +41 -4
- package/dist/model/SubWalletAssetBalance.js +10 -10
- package/dist/model/TSSRequest.js +23 -1
- package/dist/model/TSSRequestWebhookEventData.js +263 -0
- package/dist/model/TransactionDepositFromWalletSource.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +2 -2
- package/dist/model/TransactionDepositToWalletDestination.js +9 -9
- package/dist/model/TransactionDestination.js +112 -19
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +6 -6
- package/dist/model/TransactionFee.js +65 -8
- package/dist/model/TransactionMPCWalletSource.js +13 -0
- package/dist/model/TransactionRbfSource.js +27 -2
- package/dist/model/TransactionRequestFee.js +65 -8
- package/dist/model/TransactionResult.js +23 -2
- package/dist/model/TransactionSource.js +123 -16
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +9 -9
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +43 -10
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/TransferSource.js +76 -11
- package/dist/model/UpdateWalletParams.js +65 -8
- package/dist/model/WalletInfo.js +77 -8
- package/dist/model/WebhookEventData.js +84 -17
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +24 -4
- package/docs/AddressInfo.md +1 -1
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AssetInfo.md +1 -1
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/CheckAddressValidity200Response.md +1 -1
- package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +1 -0
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTssRequestRequest.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateWithdrawActivity.md +1 -0
- package/docs/CreatedWalletInfo.md +2 -0
- package/docs/DevelopersWebhooksApi.md +78 -69
- package/docs/EstimateStakeFee.md +1 -0
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimateWithdrawFee.md +1 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeId.md +2 -0
- package/docs/ExchangeTransferDestination.md +2 -2
- package/docs/ExchangeTransferSource.md +1 -1
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -0
- package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
- package/docs/ListExchanges200ResponseInner.md +10 -0
- package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
- package/docs/MPCWalletInfo.md +2 -0
- package/docs/OAuthApi.md +26 -24
- package/docs/RefreshToken200Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SmartContractWalletType.md +1 -1
- package/docs/SubWalletAssetBalance.md +2 -2
- package/docs/TSSRequest.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +29 -0
- package/docs/TransactionDepositFromWalletSource.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +2 -2
- package/docs/TransactionDestination.md +3 -3
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionExchangeWalletSource.md +1 -1
- package/docs/TransactionMPCWalletSource.md +1 -0
- package/docs/TransactionSource.md +2 -1
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +98 -88
- package/docs/TransferDestination.md +4 -4
- package/docs/TransferParams.md +1 -1
- package/docs/TransferSource.md +1 -1
- package/docs/WalletInfo.md +2 -0
- package/docs/WalletsApi.md +316 -187
- package/docs/WalletsExchangeWalletApi.md +230 -0
- package/docs/WalletsMPCWalletsApi.md +153 -135
- package/docs/WebhookEventData.md +10 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +12 -4
- package/package.json +1 -1
package/dist/api/OAuthApi.js
CHANGED
|
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
9
|
var _GetToken200Response = _interopRequireDefault(require("../model/GetToken200Response"));
|
|
10
10
|
var _GetToken4XXResponse = _interopRequireDefault(require("../model/GetToken4XXResponse"));
|
|
11
|
+
var _RefreshToken200Response = _interopRequireDefault(require("../model/RefreshToken200Response"));
|
|
11
12
|
var _RefreshTokenRequest = _interopRequireDefault(require("../model/RefreshTokenRequest"));
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
14
|
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); }
|
|
@@ -43,11 +44,11 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
|
-
* Get
|
|
47
|
-
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
47
|
+
* Get access token
|
|
48
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an access token and a refresh token with a specified App ID, Organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an access token and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-access-token) to get a new access token and a new refresh token.
|
|
48
49
|
* @param {String} client_id The App ID, a unique identifier to distinguish Cobo Portal Apps. You can get the App ID by retrieving the Manifest file after receiving the notification of app launch approval.
|
|
49
|
-
* @param {String} org_id
|
|
50
|
-
* @param {String} grant_type The
|
|
50
|
+
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the Organization ID by retrieving the Manifest file after receiving the notification of app launch approval.
|
|
51
|
+
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
51
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken200Response} and HTTP response
|
|
52
53
|
*/
|
|
53
54
|
return _createClass(OAuthApi, [{
|
|
@@ -85,11 +86,11 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
|
-
* Get
|
|
89
|
-
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
89
|
+
* Get access token
|
|
90
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an access token and a refresh token with a specified App ID, Organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an access token and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-access-token) to get a new access token and a new refresh token.
|
|
90
91
|
* @param {String} client_id The App ID, a unique identifier to distinguish Cobo Portal Apps. You can get the App ID by retrieving the Manifest file after receiving the notification of app launch approval.
|
|
91
|
-
* @param {String} org_id
|
|
92
|
-
* @param {String} grant_type The
|
|
92
|
+
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the Organization ID by retrieving the Manifest file after receiving the notification of app launch approval.
|
|
93
|
+
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
93
94
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetToken200Response}
|
|
94
95
|
*/
|
|
95
96
|
}, {
|
|
@@ -101,10 +102,10 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
/**
|
|
104
|
-
* Refresh
|
|
105
|
-
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
105
|
+
* Refresh access token
|
|
106
|
+
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new access token with a specified App ID, grant type and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new access token and a new refresh token.
|
|
106
107
|
* @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an access token.
|
|
107
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
108
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RefreshToken200Response} and HTTP response
|
|
108
109
|
*/
|
|
109
110
|
}, {
|
|
110
111
|
key: "refreshTokenWithHttpInfo",
|
|
@@ -124,15 +125,15 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
124
125
|
var authNames = ['CoboAuth'];
|
|
125
126
|
var contentTypes = ['application/json'];
|
|
126
127
|
var accepts = ['application/json'];
|
|
127
|
-
var returnType =
|
|
128
|
+
var returnType = _RefreshToken200Response["default"];
|
|
128
129
|
return this.apiClient.callApi('/oauth/token', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
/**
|
|
132
|
-
* Refresh
|
|
133
|
-
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
133
|
+
* Refresh access token
|
|
134
|
+
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new access token with a specified App ID, grant type and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new access token and a new refresh token.
|
|
134
135
|
* @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an access token.
|
|
135
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
136
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RefreshToken200Response}
|
|
136
137
|
*/
|
|
137
138
|
}, {
|
|
138
139
|
key: "refreshToken",
|
|
@@ -51,7 +51,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Cancel transaction
|
|
54
|
-
* This operation cancels a specified transaction. A transaction can be cancelled if its status is either of the following: - `Submitted` - `PendingScreening` - `PendingAuthorization` - `PendingSignature` A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets.</Note>
|
|
54
|
+
* This operation cancels a specified transaction. A transaction can be cancelled if its status is either of the following: - `Submitted` - `PendingScreening` - `PendingAuthorization` - `PendingSignature` A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets.</Note>
|
|
55
55
|
* @param {String} transaction_id The transaction ID.
|
|
56
56
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
|
|
57
57
|
*/
|
|
@@ -81,7 +81,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Cancel transaction
|
|
84
|
-
* This operation cancels a specified transaction. A transaction can be cancelled if its status is either of the following: - `Submitted` - `PendingScreening` - `PendingAuthorization` - `PendingSignature` A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets.</Note>
|
|
84
|
+
* This operation cancels a specified transaction. A transaction can be cancelled if its status is either of the following: - `Submitted` - `PendingScreening` - `PendingAuthorization` - `PendingSignature` A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets.</Note>
|
|
85
85
|
* @param {String} transaction_id The transaction ID.
|
|
86
86
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
|
|
87
87
|
*/
|
|
@@ -95,7 +95,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Call smart contract
|
|
98
|
-
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to blockchains that have a similar architecture to Ethereum.</Note>
|
|
98
|
+
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from MPC Wallets or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</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>
|
|
99
99
|
* @param {Object} opts Optional parameters
|
|
100
100
|
* @param {module:model/ContractCallParams} [ContractCallParams] The request body for making a contract call.
|
|
101
101
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
|
|
@@ -121,7 +121,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* Call smart contract
|
|
124
|
-
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to blockchains that have a similar architecture to Ethereum.</Note>
|
|
124
|
+
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from MPC Wallets or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</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>
|
|
125
125
|
* @param {Object} opts Optional parameters
|
|
126
126
|
* @param {module:model/ContractCallParams} opts.ContractCallParams The request body for making a contract call.
|
|
127
127
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
|
|
@@ -136,7 +136,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Sign message
|
|
139
|
-
* This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](/v2/api-references/transactions/get-transaction-information). <Note>
|
|
139
|
+
* This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](/v2/api-references/transactions/get-transaction-information). <Note>This operation only applies to transactions from MPC Wallets.</Note>
|
|
140
140
|
* @param {Object} opts Optional parameters
|
|
141
141
|
* @param {module:model/MessageSignParams} [MessageSignParams] The request body to create a message sign transaction
|
|
142
142
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
|
|
@@ -162,7 +162,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* Sign message
|
|
165
|
-
* This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](/v2/api-references/transactions/get-transaction-information). <Note>
|
|
165
|
+
* This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](/v2/api-references/transactions/get-transaction-information). <Note>This operation only applies to transactions from MPC Wallets.</Note>
|
|
166
166
|
* @param {Object} opts Optional parameters
|
|
167
167
|
* @param {module:model/MessageSignParams} opts.MessageSignParams The request body to create a message sign transaction
|
|
168
168
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
|
|
@@ -177,7 +177,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* Transfer token
|
|
180
|
-
* The operation transfers your assets from a wallet created on Cobo Protal 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>
|
|
180
|
+
* The operation transfers your assets from a wallet created on Cobo Protal 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>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>
|
|
181
181
|
* @param {Object} opts Optional parameters
|
|
182
182
|
* @param {module:model/TransferParams} [TransferParams] The request body to create a transfer transaction
|
|
183
183
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
|
|
@@ -203,7 +203,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Transfer token
|
|
206
|
-
* The operation transfers your assets from a wallet created on Cobo Protal 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>
|
|
206
|
+
* The operation transfers your assets from a wallet created on Cobo Protal 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>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>
|
|
207
207
|
* @param {Object} opts Optional parameters
|
|
208
208
|
* @param {module:model/TransferParams} opts.TransferParams The request body to create a transfer transaction
|
|
209
209
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
|
|
@@ -218,7 +218,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Drop transaction
|
|
221
|
-
* This operation drops a specified transaction. Dropping a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It has a higher transaction fee to incentivize miners to prioritize its confirmation over the original one. A transaction can be dropped if its status is `Broadcasting`. <ul> <li>For EVM chains, this RBF transaction has a transfer amount of `0` and the sending address is the same as the receiving address.</li> <li>For UTXO chains, this RBF transaction has a transfer amount of `0` and the destination address is the same as the change address in the original transaction.</li> </ul>
|
|
221
|
+
* This operation drops a specified transaction. Dropping a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It has a higher transaction fee to incentivize miners to prioritize its confirmation over the original one. A transaction can be dropped if its status is `Broadcasting`. <ul> <li>For EVM chains, this RBF transaction has a transfer amount of `0` and the sending address is the same as the receiving address.</li> <li>For UTXO chains, this RBF transaction has a transfer amount of `0` and the destination address is the same as the change address in the original transaction.</li> </ul> A transaction request for tracking is returned upon successful operation. <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 drop 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>
|
|
222
222
|
* @param {String} transaction_id The transaction ID.
|
|
223
223
|
* @param {Object} opts Optional parameters
|
|
224
224
|
* @param {module:model/TransactionRbf} [TransactionRbf] The request body to drop or to speed up transactions
|
|
@@ -251,7 +251,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
253
|
* Drop transaction
|
|
254
|
-
* This operation drops a specified transaction. Dropping a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It has a higher transaction fee to incentivize miners to prioritize its confirmation over the original one. A transaction can be dropped if its status is `Broadcasting`. <ul> <li>For EVM chains, this RBF transaction has a transfer amount of `0` and the sending address is the same as the receiving address.</li> <li>For UTXO chains, this RBF transaction has a transfer amount of `0` and the destination address is the same as the change address in the original transaction.</li> </ul>
|
|
254
|
+
* This operation drops a specified transaction. Dropping a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It has a higher transaction fee to incentivize miners to prioritize its confirmation over the original one. A transaction can be dropped if its status is `Broadcasting`. <ul> <li>For EVM chains, this RBF transaction has a transfer amount of `0` and the sending address is the same as the receiving address.</li> <li>For UTXO chains, this RBF transaction has a transfer amount of `0` and the destination address is the same as the change address in the original transaction.</li> </ul> A transaction request for tracking is returned upon successful operation. <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 drop 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>
|
|
255
255
|
* @param {String} transaction_id The transaction ID.
|
|
256
256
|
* @param {Object} opts Optional parameters
|
|
257
257
|
* @param {module:model/TransactionRbf} opts.TransactionRbf The request body to drop or to speed up transactions
|
|
@@ -359,12 +359,12 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
359
359
|
* @param {String} [transaction_ids] A list of transaction IDs, separated by comma.
|
|
360
360
|
* @param {String} [transaction_hashes] A list of transaction hashes, separated by comma.
|
|
361
361
|
* @param {String} [types] A list of transaction types, separated by comma. Possible values include: - `Deposit`: A deposit transaction. - `Withdrawal`: A withdrawal transaction. - `ContractCall`: A transaction that interacts with a smart contract. - `MessageSign`: A transaction that signs a message. - `ExternalSafeTx`: A transaction to a Smart Contract Wallet (Safe{Wallet}) that requires one or multiple signatures to be executed.
|
|
362
|
-
* @param {String} [statuses] A list of transaction statuses, separated by comma. Possible values include: - `Submitted`: The transaction is submitted. - `PendingScreening`: The transaction is pending screening by Risk Control. - `PendingAuthorization`: The transaction is pending approvals. - `PendingSignature`: The transaction is pending signature. - `Broadcasting`: The transaction is being broadcast. - `Confirming`: The transaction is waiting for the required number of confirmations. - `Completed`: The transaction is completed. - `Failed`: The transaction failed. - `Rejected`: The transaction is rejected. - `Pending`: The transaction is
|
|
362
|
+
* @param {String} [statuses] A list of transaction statuses, separated by comma. Possible values include: - `Submitted`: The transaction is submitted. - `PendingScreening`: The transaction is pending screening by Risk Control. - `PendingAuthorization`: The transaction is pending approvals. - `PendingSignature`: The transaction is pending signature. - `Broadcasting`: The transaction is being broadcast. - `Confirming`: The transaction is waiting for the required number of confirmations. - `Completed`: The transaction is completed. - `Failed`: The transaction failed. - `Rejected`: The transaction is rejected. - `Pending`: The transaction is waiting to be included in the next block of the blockchain.
|
|
363
363
|
* @param {String} [wallet_ids] A list of wallet IDs, separated by comma.
|
|
364
364
|
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
365
365
|
* @param {String} [token_ids] A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
366
366
|
* @param {String} [asset_ids] (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
367
|
-
* @param {String} [vault_id]
|
|
367
|
+
* @param {String} [vault_id] The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
368
368
|
* @param {String} [project_id] The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
369
369
|
* @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time.
|
|
370
370
|
* @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time.
|
|
@@ -419,12 +419,12 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
419
419
|
* @param {String} opts.transaction_ids A list of transaction IDs, separated by comma.
|
|
420
420
|
* @param {String} opts.transaction_hashes A list of transaction hashes, separated by comma.
|
|
421
421
|
* @param {String} opts.types A list of transaction types, separated by comma. Possible values include: - `Deposit`: A deposit transaction. - `Withdrawal`: A withdrawal transaction. - `ContractCall`: A transaction that interacts with a smart contract. - `MessageSign`: A transaction that signs a message. - `ExternalSafeTx`: A transaction to a Smart Contract Wallet (Safe{Wallet}) that requires one or multiple signatures to be executed.
|
|
422
|
-
* @param {String} opts.statuses A list of transaction statuses, separated by comma. Possible values include: - `Submitted`: The transaction is submitted. - `PendingScreening`: The transaction is pending screening by Risk Control. - `PendingAuthorization`: The transaction is pending approvals. - `PendingSignature`: The transaction is pending signature. - `Broadcasting`: The transaction is being broadcast. - `Confirming`: The transaction is waiting for the required number of confirmations. - `Completed`: The transaction is completed. - `Failed`: The transaction failed. - `Rejected`: The transaction is rejected. - `Pending`: The transaction is
|
|
422
|
+
* @param {String} opts.statuses A list of transaction statuses, separated by comma. Possible values include: - `Submitted`: The transaction is submitted. - `PendingScreening`: The transaction is pending screening by Risk Control. - `PendingAuthorization`: The transaction is pending approvals. - `PendingSignature`: The transaction is pending signature. - `Broadcasting`: The transaction is being broadcast. - `Confirming`: The transaction is waiting for the required number of confirmations. - `Completed`: The transaction is completed. - `Failed`: The transaction failed. - `Rejected`: The transaction is rejected. - `Pending`: The transaction is waiting to be included in the next block of the blockchain.
|
|
423
423
|
* @param {String} opts.wallet_ids A list of wallet IDs, separated by comma.
|
|
424
424
|
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
425
425
|
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
426
426
|
* @param {String} opts.asset_ids (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
427
|
-
* @param {String} opts.vault_id
|
|
427
|
+
* @param {String} opts.vault_id The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
428
428
|
* @param {String} opts.project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
429
429
|
* @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time.
|
|
430
430
|
* @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time.
|
|
@@ -443,7 +443,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
443
443
|
|
|
444
444
|
/**
|
|
445
445
|
* Resend transaction
|
|
446
|
-
* This operation resends a specified transaction. Resending a transaction initiates a new attempt to process the transaction that failed previously. A transaction can be resent if its status is `failed`. A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions in the SOL token
|
|
446
|
+
* This operation resends a specified transaction. Resending a transaction initiates a new attempt to process the transaction that failed previously. A transaction can be resent if its status is `failed`. A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
447
447
|
* @param {String} transaction_id The transaction ID.
|
|
448
448
|
* @param {Object} opts Optional parameters
|
|
449
449
|
* @param {module:model/TransactionResend} [TransactionResend] The request body to resend transactions
|
|
@@ -476,7 +476,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
* Resend transaction
|
|
479
|
-
* This operation resends a specified transaction. Resending a transaction initiates a new attempt to process the transaction that failed previously. A transaction can be resent if its status is `failed`. A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions in the SOL token
|
|
479
|
+
* This operation resends a specified transaction. Resending a transaction initiates a new attempt to process the transaction that failed previously. A transaction can be resent if its status is `failed`. A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
480
480
|
* @param {String} transaction_id The transaction ID.
|
|
481
481
|
* @param {Object} opts Optional parameters
|
|
482
482
|
* @param {module:model/TransactionResend} opts.TransactionResend The request body to resend transactions
|
|
@@ -492,7 +492,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
492
492
|
|
|
493
493
|
/**
|
|
494
494
|
* Speed up transaction
|
|
495
|
-
* This operation accelerates a specified transaction. Speeding up a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It shares the same inputs but has a higher transaction fee to incentivize miners to prioritize its confirmation over the previous one. A transaction can be accelerated if its status is `Broadcasting`. A transaction request for tracking is returned upon successful operation.
|
|
495
|
+
* This operation accelerates a specified transaction. Speeding up a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It shares the same inputs but has a higher transaction fee to incentivize miners to prioritize its confirmation over the previous one. A transaction can be accelerated if its status is `Broadcasting`. A transaction request for tracking is returned upon successful operation. <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>
|
|
496
496
|
* @param {String} transaction_id The transaction ID.
|
|
497
497
|
* @param {Object} opts Optional parameters
|
|
498
498
|
* @param {module:model/TransactionRbf} [TransactionRbf] The request body to drop or to speed up transactions
|
|
@@ -525,7 +525,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
525
525
|
|
|
526
526
|
/**
|
|
527
527
|
* Speed up transaction
|
|
528
|
-
* This operation accelerates a specified transaction. Speeding up a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It shares the same inputs but has a higher transaction fee to incentivize miners to prioritize its confirmation over the previous one. A transaction can be accelerated if its status is `Broadcasting`. A transaction request for tracking is returned upon successful operation.
|
|
528
|
+
* This operation accelerates a specified transaction. Speeding up a transaction will trigger an Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It shares the same inputs but has a higher transaction fee to incentivize miners to prioritize its confirmation over the previous one. A transaction can be accelerated if its status is `Broadcasting`. A transaction request for tracking is returned upon successful operation. <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>
|
|
529
529
|
* @param {String} transaction_id The transaction ID.
|
|
530
530
|
* @param {Object} opts Optional parameters
|
|
531
531
|
* @param {module:model/TransactionRbf} opts.TransactionRbf The request body to drop or to speed up transactions
|
package/dist/api/WalletsApi.js
CHANGED
|
@@ -8,6 +8,8 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _AddressInfo = _interopRequireDefault(require("../model/AddressInfo"));
|
|
9
9
|
var _ChainInfo = _interopRequireDefault(require("../model/ChainInfo"));
|
|
10
10
|
var _CheckAddressValidity200Response = _interopRequireDefault(require("../model/CheckAddressValidity200Response"));
|
|
11
|
+
var _CheckAddressesValidity200ResponseInner = _interopRequireDefault(require("../model/CheckAddressesValidity200ResponseInner"));
|
|
12
|
+
var _CheckLoopTransfers200ResponseInner = _interopRequireDefault(require("../model/CheckLoopTransfers200ResponseInner"));
|
|
11
13
|
var _CreateAddressRequest = _interopRequireDefault(require("../model/CreateAddressRequest"));
|
|
12
14
|
var _CreateWalletParams = _interopRequireDefault(require("../model/CreateWalletParams"));
|
|
13
15
|
var _CreatedWalletInfo = _interopRequireDefault(require("../model/CreatedWalletInfo"));
|
|
@@ -111,6 +113,115 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Check addresses validity
|
|
118
|
+
* This operation verifies if given addresses are valid for a specific chain.
|
|
119
|
+
* @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
120
|
+
* @param {String} addresses A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses.
|
|
121
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CheckAddressesValidity200ResponseInner>} and HTTP response
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "checkAddressesValidityWithHttpInfo",
|
|
125
|
+
value: function checkAddressesValidityWithHttpInfo(chain_id, addresses) {
|
|
126
|
+
var postBody = null;
|
|
127
|
+
if (postBody && postBody.toJSON) {
|
|
128
|
+
postBody = postBody.toJSON();
|
|
129
|
+
}
|
|
130
|
+
// verify the required parameter 'chain_id' is set
|
|
131
|
+
if (chain_id === undefined || chain_id === null) {
|
|
132
|
+
throw new Error("Missing the required parameter 'chain_id' when calling checkAddressesValidity");
|
|
133
|
+
}
|
|
134
|
+
// verify the required parameter 'addresses' is set
|
|
135
|
+
if (addresses === undefined || addresses === null) {
|
|
136
|
+
throw new Error("Missing the required parameter 'addresses' when calling checkAddressesValidity");
|
|
137
|
+
}
|
|
138
|
+
var pathParams = {};
|
|
139
|
+
var queryParams = {
|
|
140
|
+
'chain_id': chain_id,
|
|
141
|
+
'addresses': addresses
|
|
142
|
+
};
|
|
143
|
+
var headerParams = {};
|
|
144
|
+
var formParams = {};
|
|
145
|
+
var authNames = ['CoboAuth'];
|
|
146
|
+
var contentTypes = [];
|
|
147
|
+
var accepts = ['application/json'];
|
|
148
|
+
var returnType = [_CheckAddressesValidity200ResponseInner["default"]];
|
|
149
|
+
return this.apiClient.callApi('/wallets/check_addresses_validity', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Check addresses validity
|
|
154
|
+
* This operation verifies if given addresses are valid for a specific chain.
|
|
155
|
+
* @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
156
|
+
* @param {String} addresses A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses.
|
|
157
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CheckAddressesValidity200ResponseInner>}
|
|
158
|
+
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "checkAddressesValidity",
|
|
161
|
+
value: function checkAddressesValidity(chain_id, addresses) {
|
|
162
|
+
return this.checkAddressesValidityWithHttpInfo(chain_id, addresses).then(function (response_and_data) {
|
|
163
|
+
return response_and_data.data;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Check Loop transfers
|
|
169
|
+
* This operation verifies if the transactions from a given source wallet to a list of destination addresses can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
|
|
170
|
+
* @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](/v2/api-references/wallets/list-enabled-tokens).
|
|
171
|
+
* @param {String} source_wallet_id The source wallet ID.
|
|
172
|
+
* @param {String} destination_addresses A list of destination wallet addresses, separated by comma.
|
|
173
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CheckLoopTransfers200ResponseInner>} and HTTP response
|
|
174
|
+
*/
|
|
175
|
+
}, {
|
|
176
|
+
key: "checkLoopTransfersWithHttpInfo",
|
|
177
|
+
value: function checkLoopTransfersWithHttpInfo(token_id, source_wallet_id, destination_addresses) {
|
|
178
|
+
var postBody = null;
|
|
179
|
+
if (postBody && postBody.toJSON) {
|
|
180
|
+
postBody = postBody.toJSON();
|
|
181
|
+
}
|
|
182
|
+
// verify the required parameter 'token_id' is set
|
|
183
|
+
if (token_id === undefined || token_id === null) {
|
|
184
|
+
throw new Error("Missing the required parameter 'token_id' when calling checkLoopTransfers");
|
|
185
|
+
}
|
|
186
|
+
// verify the required parameter 'source_wallet_id' is set
|
|
187
|
+
if (source_wallet_id === undefined || source_wallet_id === null) {
|
|
188
|
+
throw new Error("Missing the required parameter 'source_wallet_id' when calling checkLoopTransfers");
|
|
189
|
+
}
|
|
190
|
+
// verify the required parameter 'destination_addresses' is set
|
|
191
|
+
if (destination_addresses === undefined || destination_addresses === null) {
|
|
192
|
+
throw new Error("Missing the required parameter 'destination_addresses' when calling checkLoopTransfers");
|
|
193
|
+
}
|
|
194
|
+
var pathParams = {};
|
|
195
|
+
var queryParams = {
|
|
196
|
+
'token_id': token_id,
|
|
197
|
+
'source_wallet_id': source_wallet_id,
|
|
198
|
+
'destination_addresses': destination_addresses
|
|
199
|
+
};
|
|
200
|
+
var headerParams = {};
|
|
201
|
+
var formParams = {};
|
|
202
|
+
var authNames = ['CoboAuth'];
|
|
203
|
+
var contentTypes = [];
|
|
204
|
+
var accepts = ['application/json'];
|
|
205
|
+
var returnType = [_CheckLoopTransfers200ResponseInner["default"]];
|
|
206
|
+
return this.apiClient.callApi('/wallets/check_loop_transfers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Check Loop transfers
|
|
211
|
+
* This operation verifies if the transactions from a given source wallet to a list of destination addresses can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
|
|
212
|
+
* @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](/v2/api-references/wallets/list-enabled-tokens).
|
|
213
|
+
* @param {String} source_wallet_id The source wallet ID.
|
|
214
|
+
* @param {String} destination_addresses A list of destination wallet addresses, separated by comma.
|
|
215
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CheckLoopTransfers200ResponseInner>}
|
|
216
|
+
*/
|
|
217
|
+
}, {
|
|
218
|
+
key: "checkLoopTransfers",
|
|
219
|
+
value: function checkLoopTransfers(token_id, source_wallet_id, destination_addresses) {
|
|
220
|
+
return this.checkLoopTransfersWithHttpInfo(token_id, source_wallet_id, destination_addresses).then(function (response_and_data) {
|
|
221
|
+
return response_and_data.data;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
114
225
|
/**
|
|
115
226
|
* Create addresses in wallet
|
|
116
227
|
* This operation generates one or more addresses within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
|
|
@@ -162,7 +273,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
162
273
|
|
|
163
274
|
/**
|
|
164
275
|
* Create wallet
|
|
165
|
-
* This operation creates a wallet with the provided information.
|
|
276
|
+
* This operation creates a wallet with the provided information. <Note>This operation is not applicable to Smart Contract Wallets.</Note>
|
|
166
277
|
* @param {Object} opts Optional parameters
|
|
167
278
|
* @param {module:model/CreateWalletParams} [CreateWalletParams] The request body to create a wallet
|
|
168
279
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreatedWalletInfo} and HTTP response
|
|
@@ -188,7 +299,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
188
299
|
|
|
189
300
|
/**
|
|
190
301
|
* Create wallet
|
|
191
|
-
* This operation creates a wallet with the provided information.
|
|
302
|
+
* This operation creates a wallet with the provided information. <Note>This operation is not applicable to Smart Contract Wallets.</Note>
|
|
192
303
|
* @param {Object} opts Optional parameters
|
|
193
304
|
* @param {module:model/CreateWalletParams} opts.CreateWalletParams The request body to create a wallet
|
|
194
305
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreatedWalletInfo}
|
|
@@ -678,7 +789,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
678
789
|
|
|
679
790
|
/**
|
|
680
791
|
* List supported chains
|
|
681
|
-
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
|
|
792
|
+
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported chains [here](https://www.cobo.com/chains). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
|
|
682
793
|
* @param {Object} opts Optional parameters
|
|
683
794
|
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
684
795
|
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
@@ -716,7 +827,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
716
827
|
|
|
717
828
|
/**
|
|
718
829
|
* List supported chains
|
|
719
|
-
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
|
|
830
|
+
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported chains [here](https://www.cobo.com/chains). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
|
|
720
831
|
* @param {Object} opts Optional parameters
|
|
721
832
|
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
722
833
|
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
@@ -736,7 +847,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
736
847
|
|
|
737
848
|
/**
|
|
738
849
|
* List supported tokens
|
|
739
|
-
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
|
|
850
|
+
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported tokens [here](https://www.cobo.com/tokens). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
|
|
740
851
|
* @param {Object} opts Optional parameters
|
|
741
852
|
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
742
853
|
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
@@ -776,7 +887,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
776
887
|
|
|
777
888
|
/**
|
|
778
889
|
* List supported tokens
|
|
779
|
-
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
|
|
890
|
+
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported tokens [here](https://www.cobo.com/tokens). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
|
|
780
891
|
* @param {Object} opts Optional parameters
|
|
781
892
|
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
782
893
|
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
@@ -797,7 +908,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
797
908
|
|
|
798
909
|
/**
|
|
799
910
|
* List token balances by address
|
|
800
|
-
* The operation retrieves a list of token balances for a specified address within
|
|
911
|
+
* The operation retrieves a list of token balances for a specified address within a wallet. <Note>This operation is applicable to MPC Wallets and Smart Contract Wallets only.</Note>
|
|
801
912
|
* @param {String} wallet_id The wallet ID.
|
|
802
913
|
* @param {String} address The wallet address.
|
|
803
914
|
* @param {Object} opts Optional parameters
|
|
@@ -844,7 +955,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
844
955
|
|
|
845
956
|
/**
|
|
846
957
|
* List token balances by address
|
|
847
|
-
* The operation retrieves a list of token balances for a specified address within
|
|
958
|
+
* The operation retrieves a list of token balances for a specified address within a wallet. <Note>This operation is applicable to MPC Wallets and Smart Contract Wallets only.</Note>
|
|
848
959
|
* @param {String} wallet_id The wallet ID.
|
|
849
960
|
* @param {String} address The wallet address.
|
|
850
961
|
* @param {Object} opts Optional parameters
|
|
@@ -864,7 +975,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
864
975
|
|
|
865
976
|
/**
|
|
866
977
|
* List token balances by wallet
|
|
867
|
-
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to
|
|
978
|
+
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is not applicable to Exchange Wallets.</Note>
|
|
868
979
|
* @param {String} wallet_id The wallet ID.
|
|
869
980
|
* @param {Object} opts Optional parameters
|
|
870
981
|
* @param {String} [token_ids] A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
@@ -905,7 +1016,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
905
1016
|
|
|
906
1017
|
/**
|
|
907
1018
|
* List token balances by wallet
|
|
908
|
-
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to
|
|
1019
|
+
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is not applicable to Exchange Wallets.</Note>
|
|
909
1020
|
* @param {String} wallet_id The wallet ID.
|
|
910
1021
|
* @param {Object} opts Optional parameters
|
|
911
1022
|
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
@@ -996,7 +1107,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
996
1107
|
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
997
1108
|
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
998
1109
|
* @param {String} [project_id] The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
999
|
-
* @param {String} [vault_id]
|
|
1110
|
+
* @param {String} [vault_id] The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
1000
1111
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1001
1112
|
* @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - 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 `before` to `infinity`, the last page of data is returned.
|
|
1002
1113
|
* @param {String} [after] An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - 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.
|
|
@@ -1036,7 +1147,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1036
1147
|
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
1037
1148
|
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
1038
1149
|
* @param {String} opts.project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
1039
|
-
* @param {String} opts.vault_id
|
|
1150
|
+
* @param {String} opts.vault_id The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
1040
1151
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1041
1152
|
* @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - 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 `before` to `infinity`, the last page of data is returned.
|
|
1042
1153
|
* @param {String} opts.after An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - 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.
|