@cobo/cobo-waas2 1.25.0 → 1.26.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 +21 -5
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +2 -2
- package/dist/api/FeeStationApi.js +6 -6
- package/dist/api/PaymentApi.js +48 -6
- package/dist/api/TokenizationApi.js +122 -4
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/index.js +105 -14
- package/dist/model/AutoFuelType.js +5 -0
- package/dist/model/CreateCryptoAddressRequest.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +8 -8
- package/dist/model/CreateRefundLinkRequest.js +129 -0
- package/dist/model/FeeStationCheckFeeStationUsage.js +28 -10
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
- package/dist/model/FeeStationSponsorTransactionDescription.js +125 -0
- package/dist/model/Link.js +2 -2
- package/dist/model/LinkDisplayInfo.js +2 -2
- package/dist/model/MerchantBalance.js +1 -1
- package/dist/model/Order.js +1 -1
- package/dist/model/OrderLinkBusinessInfo.js +11 -11
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/PaymentOrderEventData.js +2 -2
- package/dist/model/PspBalance.js +1 -1
- package/dist/model/RefundLinkBusinessInfo.js +162 -0
- package/dist/model/RefundStatus.js +10 -0
- package/dist/model/SubmitKytScreeningsReviewBody.js +1 -1
- package/dist/model/SwapQuote.js +18 -18
- package/dist/model/TokenizationERC20TokenParams.js +5 -5
- package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
- package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
- package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
- package/dist/model/TokenizationListPermissionsResponse.js +146 -0
- package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
- package/dist/model/TokenizationOperationType.js +5 -0
- package/dist/model/TokenizationPermissionAction.js +66 -0
- package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
- package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
- package/dist/model/TokenizationTokenDetailInfo.js +51 -5
- package/dist/model/TokenizationTokenInfo.js +26 -4
- package/dist/model/TokenizationTokenPermissionType.js +5 -0
- package/dist/model/TokenizationTokenStandard.js +10 -0
- package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
- package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
- package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
- package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
- package/dist/model/TransactionCoboCategory.js +35 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AutoFuelType.md +2 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/ComplianceApi.md +1 -1
- package/docs/CreateCryptoAddressRequest.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +5 -5
- package/docs/CreateRefundLinkRequest.md +10 -0
- package/docs/FeeStationApi.md +4 -4
- package/docs/FeeStationCheckFeeStationUsage.md +4 -2
- package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
- package/docs/FeeStationSponsorTransactionDescription.md +10 -0
- package/docs/Link.md +1 -1
- package/docs/LinkDisplayInfo.md +2 -2
- package/docs/MerchantBalance.md +1 -1
- package/docs/Order.md +1 -1
- package/docs/OrderLinkBusinessInfo.md +7 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/PaymentApi.md +56 -3
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PspBalance.md +1 -1
- package/docs/RefundLinkBusinessInfo.md +13 -0
- package/docs/RefundStatus.md +4 -0
- package/docs/SwapQuote.md +10 -10
- package/docs/TokenizationApi.md +120 -2
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
- package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
- package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
- package/docs/TokenizationListPermissionsResponse.md +10 -0
- package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
- package/docs/TokenizationOperationType.md +2 -0
- package/docs/TokenizationPermissionAction.md +14 -0
- package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
- package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
- package/docs/TokenizationTokenDetailInfo.md +3 -0
- package/docs/TokenizationTokenInfo.md +2 -0
- package/docs/TokenizationTokenPermissionType.md +2 -0
- package/docs/TokenizationTokenStandard.md +4 -0
- package/docs/TokenizationUpdateAddressPermissions.md +11 -0
- package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdatePermissionsParams.md +10 -0
- package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
- package/docs/TransactionCoboCategory.md +14 -0
- package/docs/TransactionsApi.md +1 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +1 -1
- package/docs/TokenizationTokenPermissionsResponse.md +0 -10
package/docs/PaymentApi.md
CHANGED
|
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
|
11
11
|
[**createOrderLink**](PaymentApi.md#createOrderLink) | **POST** /payments/links/orders | Create order link
|
|
12
12
|
[**createPaymentOrder**](PaymentApi.md#createPaymentOrder) | **POST** /payments/orders | Create pay-in order
|
|
13
13
|
[**createRefund**](PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
14
|
+
[**createRefundLink**](PaymentApi.md#createRefundLink) | **POST** /payments/links/refunds | Create refund link
|
|
14
15
|
[**createSettlementRequest**](PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
|
|
15
16
|
[**deleteCryptoAddress**](PaymentApi.md#deleteCryptoAddress) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address
|
|
16
17
|
[**getExchangeRate**](PaymentApi.md#getExchangeRate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate
|
|
@@ -255,7 +256,7 @@ Name | Type | Description | Notes
|
|
|
255
256
|
|
|
256
257
|
Create order link
|
|
257
258
|
|
|
258
|
-
This operation
|
|
259
|
+
This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link).
|
|
259
260
|
|
|
260
261
|
### Example
|
|
261
262
|
|
|
@@ -285,7 +286,7 @@ apiInstance.createOrderLink(opts).then((data) => {
|
|
|
285
286
|
|
|
286
287
|
Name | Type | Description | Notes
|
|
287
288
|
------------- | ------------- | ------------- | -------------
|
|
288
|
-
**CreateOrderLinkRequest** | [**CreateOrderLinkRequest**](CreateOrderLinkRequest.md)| The request body to create a payment link
|
|
289
|
+
**CreateOrderLinkRequest** | [**CreateOrderLinkRequest**](CreateOrderLinkRequest.md)| The request body to create a payment link for a pay-in order. | [optional]
|
|
289
290
|
|
|
290
291
|
### Return type
|
|
291
292
|
|
|
@@ -405,6 +406,58 @@ Name | Type | Description | Notes
|
|
|
405
406
|
- **Accept**: application/json
|
|
406
407
|
|
|
407
408
|
|
|
409
|
+
## createRefundLink
|
|
410
|
+
|
|
411
|
+
> Link createRefundLink(opts)
|
|
412
|
+
|
|
413
|
+
Create refund link
|
|
414
|
+
|
|
415
|
+
This operation creates a payment link for a refund.
|
|
416
|
+
|
|
417
|
+
### Example
|
|
418
|
+
|
|
419
|
+
```javascript
|
|
420
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
421
|
+
// Initialize the API client
|
|
422
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
423
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
424
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
425
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
426
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
427
|
+
// Call the API
|
|
428
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
429
|
+
const opts = {
|
|
430
|
+
'CreateRefundLinkRequest': new CoboWaas2.CreateRefundLinkRequest()
|
|
431
|
+
};
|
|
432
|
+
apiInstance.createRefundLink(opts).then((data) => {
|
|
433
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
434
|
+
}, (error) => {
|
|
435
|
+
console.error(error);
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Parameters
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
Name | Type | Description | Notes
|
|
444
|
+
------------- | ------------- | ------------- | -------------
|
|
445
|
+
**CreateRefundLinkRequest** | [**CreateRefundLinkRequest**](CreateRefundLinkRequest.md)| The request body to create a payment link for a refund. | [optional]
|
|
446
|
+
|
|
447
|
+
### Return type
|
|
448
|
+
|
|
449
|
+
[**Link**](Link.md)
|
|
450
|
+
|
|
451
|
+
### Authorization
|
|
452
|
+
|
|
453
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
454
|
+
|
|
455
|
+
### HTTP request headers
|
|
456
|
+
|
|
457
|
+
- **Content-Type**: application/json
|
|
458
|
+
- **Accept**: application/json
|
|
459
|
+
|
|
460
|
+
|
|
408
461
|
## createSettlementRequest
|
|
409
462
|
|
|
410
463
|
> Settlement createSettlementRequest(opts)
|
|
@@ -1937,7 +1990,7 @@ Name | Type | Description | Notes
|
|
|
1937
1990
|
|
|
1938
1991
|
Update top-up address
|
|
1939
1992
|
|
|
1940
|
-
This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
1993
|
+
This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. <Note> You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. </Note>
|
|
1941
1994
|
|
|
1942
1995
|
### Example
|
|
1943
1996
|
|
|
@@ -24,7 +24,7 @@ Name | Type | Description | Notes
|
|
|
24
24
|
**updated_timestamp** | **Number** | The last update time of the order, represented as a UNIX timestamp in seconds. | [optional]
|
|
25
25
|
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process. | [optional]
|
|
26
26
|
**settlement_status** | [**SettleStatus**](SettleStatus.md) | | [optional]
|
|
27
|
-
**amount_tolerance** | **String** |
|
|
27
|
+
**amount_tolerance** | **String** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional]
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
package/docs/PspBalance.md
CHANGED
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**developer_fee_amount** | **String** | The total amount of the token that has been received as developer fee. | [optional]
|
|
9
9
|
**settled_amount** | **String** | The total amount of the token that has been paid out from the developer's balance. | [optional]
|
|
10
10
|
**refunded_amount** | **String** | The total amount of the token that has been refunded from the developer's balance. | [optional]
|
|
11
|
-
**total_balance** | **String** | The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [
|
|
11
|
+
**total_balance** | **String** | The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances) | [optional]
|
|
12
12
|
**available_balance** | **String** | This field has been deprecated. | [optional]
|
|
13
13
|
|
|
14
14
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.RefundLinkBusinessInfo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**transaction_id** | **String** | The transaction ID. |
|
|
8
|
+
**amount** | **String** | The amount to refund in cryptocurrency. |
|
|
9
|
+
**refund_source** | [**RefundType**](RefundType.md) | |
|
|
10
|
+
**merchant_id** | **String** | The merchant ID, required if the refund amount source is `Merchant`. | [optional]
|
|
11
|
+
**fee_amount** | **String** | The amount of the transaction fee that the merchant will bear for the refund. | [optional]
|
|
12
|
+
|
|
13
|
+
|
package/docs/RefundStatus.md
CHANGED
package/docs/SwapQuote.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**quote_id** | **String** | The unique
|
|
8
|
-
**pay_token_id** | **String** | The ID
|
|
9
|
-
**pay_amount** | **String** | The amount of
|
|
10
|
-
**receive_token_id** | **String** | The ID
|
|
11
|
-
**receive_amount** | **String** | The amount of
|
|
12
|
-
**fee_token_id** | **String** | The ID
|
|
13
|
-
**fee_amount** | **String** | The amount of
|
|
14
|
-
**min_receive_amount** | **String** | The minimum amount of
|
|
15
|
-
**max_pay_amount** | **String** | The maximum amount of
|
|
16
|
-
**quote_expired_timestamp** | **Number** | The time when the
|
|
7
|
+
**quote_id** | **String** | The unique id of quote. |
|
|
8
|
+
**pay_token_id** | **String** | The token ID to pay. |
|
|
9
|
+
**pay_amount** | **String** | The amount of tokens to pay. |
|
|
10
|
+
**receive_token_id** | **String** | The token ID to receive. |
|
|
11
|
+
**receive_amount** | **String** | The amount of tokens to receive. |
|
|
12
|
+
**fee_token_id** | **String** | The token ID for the service fee. |
|
|
13
|
+
**fee_amount** | **String** | The amount of tokens for the service fee. |
|
|
14
|
+
**min_receive_amount** | **String** | The minimum amount of tokens to receive if the pay amount is specified. | [optional]
|
|
15
|
+
**max_pay_amount** | **String** | The maximum amount of tokens to pay if the receive amount is specified. | [optional]
|
|
16
|
+
**quote_expired_timestamp** | **Number** | The time when the quote will expire, in Unix timestamp format, measured in milliseconds. |
|
|
17
17
|
|
|
18
18
|
|
package/docs/TokenizationApi.md
CHANGED
|
@@ -15,6 +15,7 @@ Method | HTTP request | Description
|
|
|
15
15
|
[**listTokenizationAllowlistAddresses**](TokenizationApi.md#listTokenizationAllowlistAddresses) | **GET** /tokenization/tokens/{token_id}/allowlist/addresses | List addresses on allowlist
|
|
16
16
|
[**listTokenizationBlocklistAddresses**](TokenizationApi.md#listTokenizationBlocklistAddresses) | **GET** /tokenization/tokens/{token_id}/blocklist/addresses | List addresses on blocklist
|
|
17
17
|
[**listTokenizationHoldings**](TokenizationApi.md#listTokenizationHoldings) | **GET** /tokenization/tokens/{token_id}/holdings | Get token holdings information
|
|
18
|
+
[**listTokenizationPermissions**](TokenizationApi.md#listTokenizationPermissions) | **GET** /tokenization/tokens/{token_id}/permissions | List token permissions
|
|
18
19
|
[**listTokenizationSupportedChains**](TokenizationApi.md#listTokenizationSupportedChains) | **GET** /tokenization/enabled_chains | List supported chains for tokenization
|
|
19
20
|
[**mintTokenization**](TokenizationApi.md#mintTokenization) | **POST** /tokenization/tokens/{token_id}/mint | Mint tokens
|
|
20
21
|
[**pauseTokenization**](TokenizationApi.md#pauseTokenization) | **POST** /tokenization/tokens/{token_id}/pause | Pause token contract
|
|
@@ -23,6 +24,7 @@ Method | HTTP request | Description
|
|
|
23
24
|
[**updateTokenizationAllowlistActivation**](TokenizationApi.md#updateTokenizationAllowlistActivation) | **POST** /tokenization/tokens/{token_id}/allowlist/activation | Activate or deactivate allowlist
|
|
24
25
|
[**updateTokenizationAllowlistAddresses**](TokenizationApi.md#updateTokenizationAllowlistAddresses) | **POST** /tokenization/tokens/{token_id}/allowlist/addresses | Update addresses on allowlist
|
|
25
26
|
[**updateTokenizationBlocklistAddresses**](TokenizationApi.md#updateTokenizationBlocklistAddresses) | **POST** /tokenization/tokens/{token_id}/blocklist/addresses | Update addresses on blocklist
|
|
27
|
+
[**updateTokenizationPermissions**](TokenizationApi.md#updateTokenizationPermissions) | **POST** /tokenization/tokens/{token_id}/permissions | Update token permissions
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
|
|
@@ -32,7 +34,7 @@ Method | HTTP request | Description
|
|
|
32
34
|
|
|
33
35
|
Burn tokens
|
|
34
36
|
|
|
35
|
-
This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply.
|
|
37
|
+
This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens.
|
|
36
38
|
|
|
37
39
|
### Example
|
|
38
40
|
|
|
@@ -636,6 +638,68 @@ Name | Type | Description | Notes
|
|
|
636
638
|
- **Accept**: application/json
|
|
637
639
|
|
|
638
640
|
|
|
641
|
+
## listTokenizationPermissions
|
|
642
|
+
|
|
643
|
+
> TokenizationListPermissionsResponse listTokenizationPermissions(token_id, opts)
|
|
644
|
+
|
|
645
|
+
List token permissions
|
|
646
|
+
|
|
647
|
+
This operation retrieves the permission settings for a tokenization contract.
|
|
648
|
+
|
|
649
|
+
### Example
|
|
650
|
+
|
|
651
|
+
```javascript
|
|
652
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
653
|
+
// Initialize the API client
|
|
654
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
655
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
656
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
657
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
658
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
659
|
+
// Call the API
|
|
660
|
+
const apiInstance = new CoboWaas2.TokenizationApi();
|
|
661
|
+
const token_id = "ETH_USDT";
|
|
662
|
+
const opts = {
|
|
663
|
+
'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
|
|
664
|
+
'limit': 10,
|
|
665
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
666
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
667
|
+
'direction': "ASC"
|
|
668
|
+
};
|
|
669
|
+
apiInstance.listTokenizationPermissions(token_id, opts).then((data) => {
|
|
670
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
671
|
+
}, (error) => {
|
|
672
|
+
console.error(error);
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
### Parameters
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
Name | Type | Description | Notes
|
|
681
|
+
------------- | ------------- | ------------- | -------------
|
|
682
|
+
**token_id** | **String**| The token ID, which is the unique identifier of a token. |
|
|
683
|
+
**address** | **String**| The address to query permissions for. If not provided, returns all addresses with permissions. | [optional]
|
|
684
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
685
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
686
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
687
|
+
**direction** | **String**| The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. | [optional] [default to 'ASC']
|
|
688
|
+
|
|
689
|
+
### Return type
|
|
690
|
+
|
|
691
|
+
[**TokenizationListPermissionsResponse**](TokenizationListPermissionsResponse.md)
|
|
692
|
+
|
|
693
|
+
### Authorization
|
|
694
|
+
|
|
695
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
696
|
+
|
|
697
|
+
### HTTP request headers
|
|
698
|
+
|
|
699
|
+
- **Content-Type**: Not defined
|
|
700
|
+
- **Accept**: application/json
|
|
701
|
+
|
|
702
|
+
|
|
639
703
|
## listTokenizationSupportedChains
|
|
640
704
|
|
|
641
705
|
> TokenizationListEnabledChainsResponse listTokenizationSupportedChains(opts)
|
|
@@ -657,6 +721,7 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
657
721
|
// Call the API
|
|
658
722
|
const apiInstance = new CoboWaas2.TokenizationApi();
|
|
659
723
|
const opts = {
|
|
724
|
+
'token_standard': new CoboWaas2.TokenizationTokenStandard(),
|
|
660
725
|
'limit': 10,
|
|
661
726
|
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
662
727
|
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1"
|
|
@@ -674,6 +739,7 @@ apiInstance.listTokenizationSupportedChains(opts).then((data) => {
|
|
|
674
739
|
|
|
675
740
|
Name | Type | Description | Notes
|
|
676
741
|
------------- | ------------- | ------------- | -------------
|
|
742
|
+
**token_standard** | [**TokenizationTokenStandard**](.md)| Filter by token standard. | [optional]
|
|
677
743
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
678
744
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
679
745
|
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
@@ -698,7 +764,7 @@ Name | Type | Description | Notes
|
|
|
698
764
|
|
|
699
765
|
Mint tokens
|
|
700
766
|
|
|
701
|
-
This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply.
|
|
767
|
+
This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens.
|
|
702
768
|
|
|
703
769
|
### Example
|
|
704
770
|
|
|
@@ -1067,3 +1133,55 @@ Name | Type | Description | Notes
|
|
|
1067
1133
|
- **Content-Type**: application/json
|
|
1068
1134
|
- **Accept**: application/json
|
|
1069
1135
|
|
|
1136
|
+
|
|
1137
|
+
## updateTokenizationPermissions
|
|
1138
|
+
|
|
1139
|
+
> TokenizationOperationResponse updateTokenizationPermissions(token_id, TokenizationUpdatePermissionsRequest)
|
|
1140
|
+
|
|
1141
|
+
Update token permissions
|
|
1142
|
+
|
|
1143
|
+
This operation updates permission settings for a tokenization contract.
|
|
1144
|
+
|
|
1145
|
+
### Example
|
|
1146
|
+
|
|
1147
|
+
```javascript
|
|
1148
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1149
|
+
// Initialize the API client
|
|
1150
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1151
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1152
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1153
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1154
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1155
|
+
// Call the API
|
|
1156
|
+
const apiInstance = new CoboWaas2.TokenizationApi();
|
|
1157
|
+
const token_id = "ETH_USDT";
|
|
1158
|
+
const TokenizationUpdatePermissionsRequest = new CoboWaas2.TokenizationUpdatePermissionsRequest();
|
|
1159
|
+
apiInstance.updateTokenizationPermissions(token_id, TokenizationUpdatePermissionsRequest).then((data) => {
|
|
1160
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1161
|
+
}, (error) => {
|
|
1162
|
+
console.error(error);
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
### Parameters
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
Name | Type | Description | Notes
|
|
1171
|
+
------------- | ------------- | ------------- | -------------
|
|
1172
|
+
**token_id** | **String**| The token ID, which is the unique identifier of a token. |
|
|
1173
|
+
**TokenizationUpdatePermissionsRequest** | [**TokenizationUpdatePermissionsRequest**](TokenizationUpdatePermissionsRequest.md)| The request body for managing permissions. |
|
|
1174
|
+
|
|
1175
|
+
### Return type
|
|
1176
|
+
|
|
1177
|
+
[**TokenizationOperationResponse**](TokenizationOperationResponse.md)
|
|
1178
|
+
|
|
1179
|
+
### Authorization
|
|
1180
|
+
|
|
1181
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1182
|
+
|
|
1183
|
+
### HTTP request headers
|
|
1184
|
+
|
|
1185
|
+
- **Content-Type**: application/json
|
|
1186
|
+
- **Accept**: application/json
|
|
1187
|
+
|
|
@@ -9,6 +9,6 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**symbol** | **String** | The symbol of the token. |
|
|
10
10
|
**decimals** | **Number** | The number of decimals for the token (0-18). |
|
|
11
11
|
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to false]
|
|
12
|
-
**permissions** | [**
|
|
12
|
+
**permissions** | [**TokenizationERC20TokenPermissionParams**](TokenizationERC20TokenPermissionParams.md) | | [optional]
|
|
13
13
|
|
|
14
14
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationERC20WrappedTokenParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | |
|
|
8
|
+
**name** | **String** | The name of the token. |
|
|
9
|
+
**symbol** | **String** | The symbol of the token. |
|
|
10
|
+
**permissions** | [**TokenizationERC20WrappedTokenPermissionParams**](TokenizationERC20WrappedTokenPermissionParams.md) | | [optional]
|
|
11
|
+
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to false]
|
|
12
|
+
**underlying_token** | **String** | The address of the underlying token that this tokenized asset represents. |
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationERC20WrappedTokenPermissionParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**admin** | **[String]** | List of addresses for the admin role. | [optional]
|
|
8
|
+
**minter** | **[String]** | List of addresses for the minter role. | [optional]
|
|
9
|
+
**wrapper** | **[String]** | List of addresses for the wrapper role. | [optional]
|
|
10
|
+
**manager** | **[String]** | List of addresses for the manager role. | [optional]
|
|
11
|
+
**pauser** | **[String]** | List of addresses for the pauser role. | [optional]
|
|
12
|
+
**salvager** | **[String]** | List of addresses for the salvager role. | [optional]
|
|
13
|
+
**upgrader** | **[String]** | List of addresses for the upgrader role. | [optional]
|
|
14
|
+
|
|
15
|
+
|
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**token_id** | **String** | The ID of the token. |
|
|
14
14
|
**burns** | [**[TokenizationBurnTokenParamsBurnsInner]**](TokenizationBurnTokenParamsBurnsInner.md) | Details for each token burn, including amount and address to burn from. |
|
|
15
15
|
**action** | [**TokenizationUpdateAddressAction**](TokenizationUpdateAddressAction.md) | |
|
|
16
|
-
**addresses** | [**[
|
|
16
|
+
**addresses** | [**[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | |
|
|
17
17
|
**activation** | **Boolean** | Whether to activate the allowlist feature for the token. |
|
|
18
18
|
**data** | [**TokenizationContractCallParamsData**](TokenizationContractCallParamsData.md) | | [optional]
|
|
19
19
|
|
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**symbol** | **String** | The symbol of the token. |
|
|
10
10
|
**decimals** | **Number** | The number of decimals for the token (0-18). |
|
|
11
11
|
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to false]
|
|
12
|
-
**permissions** | [**
|
|
12
|
+
**permissions** | [**TokenizationSolWrappedTokenPermissionParams**](TokenizationSolWrappedTokenPermissionParams.md) | | [optional]
|
|
13
|
+
**underlying_token** | **String** | The address of the underlying token that this tokenized asset represents. |
|
|
13
14
|
|
|
14
15
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationListPermissionsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[TokenizationListPermissionsResponseDataInner]**](TokenizationListPermissionsResponseDataInner.md) | List of permissions. |
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationListPermissionsResponseDataInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**address** | **String** | The address with permissions. |
|
|
8
|
+
**permissions** | [**[TokenizationTokenPermissionType]**](TokenizationTokenPermissionType.md) | The permissions assigned to this address. |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationSOLWrappedTokenParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | |
|
|
8
|
+
**name** | **String** | The name of the token. |
|
|
9
|
+
**symbol** | **String** | The symbol of the token. |
|
|
10
|
+
**underlying_token** | **String** | The address of the underlying token that this tokenized asset represents. |
|
|
11
|
+
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to false]
|
|
12
|
+
**permissions** | [**TokenizationSolWrappedTokenPermissionParams**](TokenizationSolWrappedTokenPermissionParams.md) | | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationSolWrappedTokenPermissionParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**wrapper** | **[String]** | List of Solana wallet addresses that can perform wrap/unwrap operations. Multiple addresses can be assigned this role. | [optional]
|
|
8
|
+
**pauser** | **String** | Solana wallet address that acts as a pauser authority for the token. This authority can pause token transfers. | [optional]
|
|
9
|
+
**freezer** | **String** | Solana wallet address that acts as a freezer authority for the token. This authority can freeze token accounts. | [optional]
|
|
10
|
+
**updater** | **String** | Solana wallet address that acts as an updater authority for the token. This authority can update token metadata. | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -9,11 +9,14 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**token_address** | **String** | The address of the token contract. | [optional]
|
|
10
10
|
**token_name** | **String** | The name of the token. | [optional]
|
|
11
11
|
**token_symbol** | **String** | The unique token symbol. |
|
|
12
|
+
**token_standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | |
|
|
12
13
|
**decimals** | **Number** | The number of decimals of the token. |
|
|
13
14
|
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. | [optional]
|
|
14
15
|
**status** | [**TokenizationStatus**](TokenizationStatus.md) | |
|
|
15
16
|
**total_supply** | **String** | The total supply of the token. | [optional]
|
|
16
17
|
**holdings** | **String** | The amount of tokens held by the organization. | [optional]
|
|
18
|
+
**archived** | **Boolean** | Whether the token is archived. If the token is archived, no operations can be initiated on it. |
|
|
17
19
|
**permissions** | [**[TokenizationAddressPermission]**](TokenizationAddressPermission.md) | List of execution addresses and their permissions. | [optional]
|
|
20
|
+
**underlying_token** | [**TokenizationTokenInfo**](TokenizationTokenInfo.md) | | [optional]
|
|
18
21
|
|
|
19
22
|
|
|
@@ -9,10 +9,12 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**token_address** | **String** | The address of the token contract. | [optional]
|
|
10
10
|
**token_name** | **String** | The name of the token. | [optional]
|
|
11
11
|
**token_symbol** | **String** | The unique token symbol. |
|
|
12
|
+
**token_standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | |
|
|
12
13
|
**decimals** | **Number** | The number of decimals of the token. |
|
|
13
14
|
**token_access_activated** | **Boolean** | Whether the allowlist feature is activated for the token. | [optional]
|
|
14
15
|
**status** | [**TokenizationStatus**](TokenizationStatus.md) | |
|
|
15
16
|
**total_supply** | **String** | The total supply of the token. | [optional]
|
|
16
17
|
**holdings** | **String** | The amount of tokens held by the organization. | [optional]
|
|
18
|
+
**archived** | **Boolean** | Whether the token is archived. If the token is archived, no operations can be initiated on it. |
|
|
17
19
|
|
|
18
20
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationUpdateAddressPermissions
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**address** | **String** | The address to manage permissions for. |
|
|
8
|
+
**action** | [**TokenizationPermissionAction**](TokenizationPermissionAction.md) | |
|
|
9
|
+
**permissions** | [**[TokenizationTokenPermissionType]**](TokenizationTokenPermissionType.md) | The list of permissions to be applied. |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationUpdatePermissionsEstimateFeeParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | |
|
|
8
|
+
**addresses** | [**[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | |
|
|
9
|
+
**operation_type** | [**TokenizationOperationType**](TokenizationOperationType.md) | |
|
|
10
|
+
**token_id** | **String** | The ID of the token. |
|
|
11
|
+
**request_id** | **String** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationUpdatePermissionsParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | |
|
|
8
|
+
**addresses** | [**[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.TokenizationUpdatePermissionsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | |
|
|
8
|
+
**addresses** | [**[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | |
|
|
9
|
+
**app_initiator** | **String** | The initiator of the tokenization activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator. | [optional]
|
|
10
|
+
**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | |
|
|
11
|
+
**request_id** | **String** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -67,6 +67,20 @@
|
|
|
67
67
|
|
|
68
68
|
* `StellarChangeTrust` (value: `"StellarChangeTrust"`)
|
|
69
69
|
|
|
70
|
+
* `Tokenization` (value: `"Tokenization"`)
|
|
71
|
+
|
|
72
|
+
* `TokenizationGasSponsor` (value: `"TokenizationGasSponsor"`)
|
|
73
|
+
|
|
74
|
+
* `TokenSwap` (value: `"TokenSwap"`)
|
|
75
|
+
|
|
76
|
+
* `NonceAccountSign` (value: `"NonceAccountSign"`)
|
|
77
|
+
|
|
78
|
+
* `FeePayerSign` (value: `"FeePayerSign"`)
|
|
79
|
+
|
|
80
|
+
* `GasFeeSponsor` (value: `"GasFeeSponsor"`)
|
|
81
|
+
|
|
82
|
+
* `GasFeeSponsorRefund` (value: `"GasFeeSponsorRefund"`)
|
|
83
|
+
|
|
70
84
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
71
85
|
|
|
72
86
|
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -802,7 +802,7 @@ Name | Type | Description | Notes
|
|
|
802
802
|
|
|
803
803
|
Resend transaction
|
|
804
804
|
|
|
805
|
-
This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
805
|
+
<Note>Resending failed transactions is not supported on the Solana network.</Note> This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
806
806
|
|
|
807
807
|
### Example
|
|
808
808
|
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**name** | **String** | The merchant name. | [optional]
|
|
8
|
-
**developer_fee_rate** | **String** | The developer fee rate applied to this merchant.
|
|
8
|
+
**developer_fee_rate** | **String** | The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). | [optional]
|
|
9
9
|
|
|
10
10
|
|