diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8841ff63..9fb106ab 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -10,6 +10,7 @@ docs/ActivityInitiator.md docs/ActivityStatus.md docs/ActivityTimeline.md docs/ActivityType.md +docs/AddressBook.md docs/AddressEncoding.md docs/AddressInfo.md docs/AddressTransferDestination.md @@ -301,6 +302,7 @@ src/model/ActivityInitiator.js src/model/ActivityStatus.js src/model/ActivityTimeline.js src/model/ActivityType.js +src/model/AddressBook.js src/model/AddressEncoding.js src/model/AddressInfo.js src/model/AddressTransferDestination.js @@ -577,6 +579,7 @@ test/model/ActivityInitiator.spec.js test/model/ActivityStatus.spec.js test/model/ActivityTimeline.spec.js test/model/ActivityType.spec.js +test/model/AddressBook.spec.js test/model/AddressEncoding.spec.js test/model/AddressInfo.spec.js test/model/AddressTransferDestination.spec.js diff --git a/README.md b/README.md index 25ba988c..1cda3ca0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v2 -- Package version: 1.3.0 +- Package version: 1.4.0 - Generator version: 7.6.0 - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas) @@ -70,8 +70,8 @@ Class | Method | HTTP request | Description *CoboWaas2.DevelopersWebhooksApi* | [**listWebhookEvents**](docs/DevelopersWebhooksApi.md#listWebhookEvents) | **GET** /webhooks/endpoints/{endpoint_id}/events | List all webhook events *CoboWaas2.DevelopersWebhooksApi* | [**retryWebhookEventById**](docs/DevelopersWebhooksApi.md#retryWebhookEventById) | **POST** /webhooks/endpoints/{endpoint_id}/events/{event_id}/retry | Retry event *CoboWaas2.DevelopersWebhooksApi* | [**updateWebhookEndpointById**](docs/DevelopersWebhooksApi.md#updateWebhookEndpointById) | **PUT** /webhooks/endpoints/{endpoint_id} | Update webhook endpoint -*CoboWaas2.OAuthApi* | [**getToken**](docs/OAuthApi.md#getToken) | **GET** /oauth/token | Get access token -*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh access token +*CoboWaas2.OAuthApi* | [**getToken**](docs/OAuthApi.md#getToken) | **GET** /oauth/token | Get Org Access Token +*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token *CoboWaas2.StakingsApi* | [**createStakeActivity**](docs/StakingsApi.md#createStakeActivity) | **POST** /stakings/activities/stake | Create stake activity *CoboWaas2.StakingsApi* | [**createUnstakeActivity**](docs/StakingsApi.md#createUnstakeActivity) | **POST** /stakings/activities/unstake | Create unstake activity *CoboWaas2.StakingsApi* | [**createWithdrawActivity**](docs/StakingsApi.md#createWithdrawActivity) | **POST** /stakings/activities/withdraw | Create withdraw activity @@ -148,6 +148,7 @@ Class | Method | HTTP request | Description - [CoboWaas2.ActivityStatus](docs/ActivityStatus.md) - [CoboWaas2.ActivityTimeline](docs/ActivityTimeline.md) - [CoboWaas2.ActivityType](docs/ActivityType.md) + - [CoboWaas2.AddressBook](docs/AddressBook.md) - [CoboWaas2.AddressEncoding](docs/AddressEncoding.md) - [CoboWaas2.AddressInfo](docs/AddressInfo.md) - [CoboWaas2.AddressTransferDestination](docs/AddressTransferDestination.md) diff --git a/docs/AddressBook.md b/docs/AddressBook.md new file mode 100644 index 00000000..5664a749 --- /dev/null +++ b/docs/AddressBook.md @@ -0,0 +1,16 @@ +# CoboWaas2.AddressBook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **String** | | +**entry_id** | **String** | | +**address** | **String** | address. | +**memo** | **String** | memo. | [optional] +**wallet_name** | **String** | wallet name. | [optional] +**wallet_type** | [**WalletType**](WalletType.md) | | [optional] +**label** | **String** | The label to address. | +**email** | **String** | email. | [optional] + + diff --git a/docs/AddressTransferDestination.md b/docs/AddressTransferDestination.md index 4d075993..2aa91aac 100644 --- a/docs/AddressTransferDestination.md +++ b/docs/AddressTransferDestination.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **account_output** | [**AddressTransferDestinationAccountOutput**](AddressTransferDestinationAccountOutput.md) | | [optional] **utxo_outputs** | [**[AddressTransferDestinationUtxoOutputsInner]**](AddressTransferDestinationUtxoOutputsInner.md) | | [optional] **change_address** | **String** | The address used to receive the remaining funds or change from the transaction. | [optional] -**force_internal** | **Boolean** | Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note> | [optional] -**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note> | [optional] +**force_internal** | **Boolean** | Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. | [optional] +**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. | [optional] diff --git a/docs/ContractCallSource.md b/docs/ContractCallSource.md index 99471fe4..68bda7f6 100644 --- a/docs/ContractCallSource.md +++ b/docs/ContractCallSource.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **source_type** | [**ContractCallSourceType**](ContractCallSourceType.md) | | **wallet_id** | **String** | The wallet ID. | **address** | **String** | The wallet address. | -**nonce** | **Number** | The transaction nonce. | [optional] **delegate** | [**CoboSafeDelegate**](CoboSafeDelegate.md) | | diff --git a/docs/CreateKeyShareHolder.md b/docs/CreateKeyShareHolder.md index c0ea1583..09c16d31 100644 --- a/docs/CreateKeyShareHolder.md +++ b/docs/CreateKeyShareHolder.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Key share holder's name. | [optional] **type** | [**KeyShareHolderType**](KeyShareHolderType.md) | | [optional] -**tss_node_id** | **String** | Key share holder's TSS Node ID. | [optional] -**signer** | **Boolean** | Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer. | [optional] +**tss_node_id** | **String** | Key share holder's TSS Node ID. You can obtain the TSS Node ID using either mobile co-signer or API co-signer. See the \"Primary Purposes\" row on the table in [Create a Main Group](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/create-key-share-groups#create-a-main-group). | [optional] +**signer** | **Boolean** | Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer. | [optional] diff --git a/docs/GetToken200Response.md b/docs/GetToken200Response.md index 59b2baf4..d36e4e65 100644 --- a/docs/GetToken200Response.md +++ b/docs/GetToken200Response.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**access_token** | **String** | The access token. | [optional] +**access_token** | **String** | The Org Access Token. | [optional] **token_type** | **String** | The type of the tokens, which is Bearer. | [optional] -**scope** | **String** | The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. | [optional] -**expires_in** | **Number** | The time in seconds in which the access token expires. | [optional] -**refresh_token** | **String** | The refresh token, used to obtain a new access token when the current access token expires. | [optional] +**scope** | **String** | The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app. | [optional] +**expires_in** | **Number** | The time in seconds in which the Org Access Token expires. | [optional] +**refresh_token** | **String** | The Refresh Token, used to obtain a new Org Access Token when the current Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change. | [optional] diff --git a/docs/KeyShareHolder.md b/docs/KeyShareHolder.md index 4417326b..7ff85f33 100644 --- a/docs/KeyShareHolder.md +++ b/docs/KeyShareHolder.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **type** | [**KeyShareHolderType**](KeyShareHolderType.md) | | [optional] **tss_node_id** | **String** | The key share holder's TSS Node ID. | [optional] **online** | **Boolean** | Whether the key share holder's TSS Node is online. - `true`: The TSS Node is online. - `false`: The TSS Node is offline. | [optional] -**signer** | **Boolean** | Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer. | [optional] +**signer** | **Boolean** | Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer. | [optional] **status** | [**KeyShareHolderStatus**](KeyShareHolderStatus.md) | | [optional] **account_id** | **String** | The key share holder's Cobo Portal account ID. | [optional] diff --git a/docs/MessageSignParams.md b/docs/MessageSignParams.md index 9efa480a..32509217 100644 --- a/docs/MessageSignParams.md +++ b/docs/MessageSignParams.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **chain_id** | **String** | 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). | **source** | [**MessageSignSource**](MessageSignSource.md) | | **destination** | [**MessageSignDestination**](MessageSignDestination.md) | | -**description** | **String** | The description of the message sign transaction. | [optional] +**description** | **String** | The description of the message signing transaction. | [optional] **category_names** | **[String]** | The custom category for you to identify your transactions. | [optional] diff --git a/docs/MpcContractCallSource.md b/docs/MpcContractCallSource.md index 6d2b64d7..f2a1d5c6 100644 --- a/docs/MpcContractCallSource.md +++ b/docs/MpcContractCallSource.md @@ -7,6 +7,5 @@ Name | Type | Description | Notes **source_type** | [**ContractCallSourceType**](ContractCallSourceType.md) | | **wallet_id** | **String** | The wallet ID. | **address** | **String** | The wallet address. | -**nonce** | **Number** | The transaction nonce. | [optional] diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index 1b42d099..3f82836b 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -4,8 +4,8 @@ All URIs are relative to *https://api.dev.cobo.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getToken**](OAuthApi.md#getToken) | **GET** /oauth/token | Get access token -[**refreshToken**](OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh access token +[**getToken**](OAuthApi.md#getToken) | **GET** /oauth/token | Get Org Access Token +[**refreshToken**](OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token @@ -13,9 +13,9 @@ Method | HTTP request | Description > GetToken200Response getToken(client_id, org_id, grant_type) -Get access token +Get Org Access Token -<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. +<Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client 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 Org Access Token and a Refresh Token. For security purposes, Org 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 Org Access Token and a new Refresh Token. ### Example @@ -45,8 +45,8 @@ apiInstance.getToken(client_id, org_id, grant_type).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client_id** | **String**| 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. | - **org_id** | **String**| 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. | + **client_id** | **String**| The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app. | + **org_id** | **String**| Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file. | **grant_type** | **String**| The OAuth grant type. Set the value as `org_implicit`. | ### Return type @@ -67,9 +67,9 @@ Name | Type | Description | Notes > RefreshToken200Response refreshToken(RefreshTokenRequest) -Refresh access token +Refresh Org Access Token -<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. +<Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token. ### Example @@ -97,7 +97,7 @@ apiInstance.refreshToken(RefreshTokenRequest).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **RefreshTokenRequest** | [**RefreshTokenRequest**](RefreshTokenRequest.md)| The request body for refreshing an access token. | + **RefreshTokenRequest** | [**RefreshTokenRequest**](RefreshTokenRequest.md)| The request body for refreshing an Org Access Token. | ### Return type diff --git a/docs/RefreshToken200Response.md b/docs/RefreshToken200Response.md index d0e523d2..a43b12e0 100644 --- a/docs/RefreshToken200Response.md +++ b/docs/RefreshToken200Response.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**access_token** | **String** | The new access token. | [optional] +**access_token** | **String** | The new Org Access Token. | [optional] **token_type** | **String** | The type of the tokens, which is Bearer. | [optional] -**scope** | **String** | The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. | [optional] -**expires_in** | **Number** | The time in seconds in which the new access token expires. | [optional] -**refresh_token** | **String** | The refresh token, used to obtain another access token when the new access token expires. | [optional] +**scope** | **String** | The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app. | [optional] +**expires_in** | **Number** | The time in seconds in which the new Org Access Token expires. | [optional] +**refresh_token** | **String** | The Refresh Token, used to obtain another Org Access Token when the new Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change. | [optional] diff --git a/docs/RefreshTokenRequest.md b/docs/RefreshTokenRequest.md index 0a6683e6..d720342a 100644 --- a/docs/RefreshTokenRequest.md +++ b/docs/RefreshTokenRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_id** | **String** | 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. | [optional] +**client_id** | **String** | The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app. | [optional] **grant_type** | **String** | The OAuth grant type. Set the value as `refresh_token`. | [optional] -**refresh_token** | **String** | The refresh token of the current access token. | [optional] +**refresh_token** | **String** | The Refresh Token of the current Org Access Token. | [optional] diff --git a/docs/TSSRequestStatus.md b/docs/TSSRequestStatus.md index 6638a655..0f8a4e00 100644 --- a/docs/TSSRequestStatus.md +++ b/docs/TSSRequestStatus.md @@ -9,6 +9,8 @@ * `KeyGenerating` (value: `"KeyGenerating"`) +* `MPCProcessing` (value: `"MPCProcessing"`) + * `KeyGeneratingFailed` (value: `"KeyGeneratingFailed"`) * `Success` (value: `"Success"`) diff --git a/docs/TransactionStatus.md b/docs/TransactionStatus.md index a8b3184c..e3bec6ac 100644 --- a/docs/TransactionStatus.md +++ b/docs/TransactionStatus.md @@ -9,8 +9,6 @@ * `PendingAuthorization` (value: `"PendingAuthorization"`) -* `Queued` (value: `"Queued"`) - * `PendingSignature` (value: `"PendingSignature"`) * `Broadcasting` (value: `"Broadcasting"`) diff --git a/docs/TransactionSubStatus.md b/docs/TransactionSubStatus.md index 4698da97..a13caa8d 100644 --- a/docs/TransactionSubStatus.md +++ b/docs/TransactionSubStatus.md @@ -5,8 +5,6 @@ * `RejectedKYT` (value: `"RejectedKYT"`) -* `RejectedTravelRule` (value: `"RejectedTravelRule"`) - * `PendingDoubleCheck` (value: `"PendingDoubleCheck"`) * `PendingSpenderCheck` (value: `"PendingSpenderCheck"`) @@ -39,6 +37,8 @@ * `FailedOnChain` (value: `"FailedOnChain"`) +* `Reverting` (value: `"Reverting"`) + * `Queue` (value: `"Queue"`) * `PendingBlockConfirmations` (value: `"PendingBlockConfirmations"`) @@ -51,6 +51,20 @@ * `OnchainRejection` (value: `"OnchainRejection"`) +* `RejectedTravelRule` (value: `"RejectedTravelRule"`) + +* `RejectedTravelRuleDueToCompliance` (value: `"RejectedTravelRuleDueToCompliance"`) + +* `PendingTravelRuleInfo` (value: `"PendingTravelRuleInfo"`) + +* `PendingTravelRuleCheck` (value: `"PendingTravelRuleCheck"`) + +* `RejectedTravelRuleDueToUnsupportedToken` (value: `"RejectedTravelRuleDueToUnsupportedToken"`) + +* `SignatureVerificationSuccess` (value: `"SignatureVerificationSuccess"`) + +* `SignatureVerificationFailed` (value: `"SignatureVerificationFailed"`) + * `unknown_default_open_api` (value: `"unknown_default_open_api"`) diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index e108d364..49d79d99 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -263,7 +263,7 @@ apiInstance.createMessageSignTransaction(opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **MessageSignParams** | [**MessageSignParams**](MessageSignParams.md)| The request body to create a message sign transaction | [optional] + **MessageSignParams** | [**MessageSignParams**](MessageSignParams.md)| The request body to create a message signing transaction | [optional] ### Return type diff --git a/docs/TransferDestination.md b/docs/TransferDestination.md index 606fe823..00105e0f 100644 --- a/docs/TransferDestination.md +++ b/docs/TransferDestination.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **account_output** | [**AddressTransferDestinationAccountOutput**](AddressTransferDestinationAccountOutput.md) | | [optional] **utxo_outputs** | [**[AddressTransferDestinationUtxoOutputsInner]**](AddressTransferDestinationUtxoOutputsInner.md) | | [optional] **change_address** | **String** | The address used to receive the remaining funds or change from the transaction. | [optional] -**force_internal** | **Boolean** | Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note> | [optional] -**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note> | [optional] +**force_internal** | **Boolean** | Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. | [optional] +**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. | [optional] **wallet_id** | **String** | The wallet ID. | **trading_account_type** | **String** | The trading account type. | **amount** | **String** | The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`. | diff --git a/docs/WalletsApi.md b/docs/WalletsApi.md index f6b7838a..3bf68ee1 100644 --- a/docs/WalletsApi.md +++ b/docs/WalletsApi.md @@ -1051,7 +1051,7 @@ Name | Type | Description | Notes List all wallets -This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. <Note>You must specify either the wallet type or subtype, or both.</Note> +This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. ### Example diff --git a/docs/WalletsMPCWalletsApi.md b/docs/WalletsMPCWalletsApi.md index 8f95523d..2d0c2370 100644 --- a/docs/WalletsMPCWalletsApi.md +++ b/docs/WalletsMPCWalletsApi.md @@ -83,7 +83,7 @@ Name | Type | Description | Notes Create key share holder group -This operation creates a key share holder group for a specified vault. +This operation creates a key share holder group for a specified vault. <Note>This operation will not return the `tss_key_share_groups` property until key shares have been created using the [Create TSS request](/v2/api-references/wallets--mpc-wallets/create-tss-request) operation. Creating a wallet with the [Create wallet](/v2/api-references/wallets/create-wallet) operation is only possible after you've completed the previous actions.</Note> ### Example diff --git a/package.json b/package.json index 22a59ff1..4aea0a20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cobo/cobo-waas2", - "version": "1.3.0", + "version": "1.4.0", "description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s WaaS API offering. It enables you to access Cobo’s full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo’s [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ", "license": "GPL 2.0", "main": "dist/index.js", diff --git a/src/ApiClient.js b/src/ApiClient.js index 6c35dd7a..1d047270 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -57,7 +57,7 @@ class ApiClient { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'cobo-waas2-js-sdk/1.3.0' + 'User-Agent': 'cobo-waas2-js-sdk/1.4.0' }; /** diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index cad72a86..ea4a4ab8 100644 --- a/src/api/OAuthApi.js +++ b/src/api/OAuthApi.js @@ -37,10 +37,10 @@ export default class OAuthApi { /** - * Get access token - * 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. 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. - * @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. - * @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. + * Get Org Access Token + * This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key. This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client 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 Org Access Token and a Refresh Token. For security purposes, Org 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 Org Access Token and a new Refresh Token. + * @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app. + * @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file. * @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken200Response} and HTTP response */ @@ -86,10 +86,10 @@ export default class OAuthApi { } /** - * Get access token - * 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. 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. - * @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. - * @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. + * Get Org Access Token + * This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key. This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client 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 Org Access Token and a Refresh Token. For security purposes, Org 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 Org Access Token and a new Refresh Token. + * @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app. + * @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file. * @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetToken200Response} */ @@ -102,9 +102,9 @@ export default class OAuthApi { /** - * Refresh access token - * 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. 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. - * @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an access token. + * Refresh Org Access Token + * This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key. This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token. + * @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an Org Access Token. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RefreshToken200Response} and HTTP response */ refreshTokenWithHttpInfo(RefreshTokenRequest) { @@ -138,9 +138,9 @@ export default class OAuthApi { } /** - * Refresh access token - * 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. 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. - * @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an access token. + * Refresh Org Access Token + * This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key. This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token. + * @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an Org Access Token. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RefreshToken200Response} */ refreshToken(RefreshTokenRequest) { diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index 968d274e..45f3719b 100644 --- a/src/api/TransactionsApi.js +++ b/src/api/TransactionsApi.js @@ -263,7 +263,7 @@ export default class TransactionsApi { * Sign message * 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). This operation only applies to transactions from MPC Wallets. * @param {Object} opts Optional parameters - * @param {module:model/MessageSignParams} [MessageSignParams] The request body to create a message sign transaction + * @param {module:model/MessageSignParams} [MessageSignParams] The request body to create a message signing transaction * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response */ createMessageSignTransactionWithHttpInfo(opts) { @@ -297,7 +297,7 @@ export default class TransactionsApi { * Sign message * 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). This operation only applies to transactions from MPC Wallets. * @param {Object} opts Optional parameters - * @param {module:model/MessageSignParams} opts.MessageSignParams The request body to create a message sign transaction + * @param {module:model/MessageSignParams} opts.MessageSignParams The request body to create a message signing transaction * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response} */ createMessageSignTransaction(opts) { diff --git a/src/api/WalletsApi.js b/src/api/WalletsApi.js index 0985ae93..b8e2f6fa 100644 --- a/src/api/WalletsApi.js +++ b/src/api/WalletsApi.js @@ -1158,7 +1158,7 @@ export default class WalletsApi { /** * List all wallets - * This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. You must specify either the wallet type or subtype, or both. + * This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. * @param {Object} opts Optional parameters * @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) * @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}) @@ -1205,7 +1205,7 @@ export default class WalletsApi { /** * List all wallets - * This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. You must specify either the wallet type or subtype, or both. + * This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. * @param {Object} opts Optional parameters * @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) * @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}) diff --git a/src/api/WalletsMPCWalletsApi.js b/src/api/WalletsMPCWalletsApi.js index 3b5a037e..46860db9 100644 --- a/src/api/WalletsMPCWalletsApi.js +++ b/src/api/WalletsMPCWalletsApi.js @@ -111,7 +111,7 @@ export default class WalletsMPCWalletsApi { /** * Create key share holder group - * This operation creates a key share holder group for a specified vault. + * This operation creates a key share holder group for a specified vault. This operation will not return the `tss_key_share_groups` property until key shares have been created using the [Create TSS request](/v2/api-references/wallets--mpc-wallets/create-tss-request) operation. Creating a wallet with the [Create wallet](/v2/api-references/wallets/create-wallet) operation is only possible after you've completed the previous actions. * @param {String} vault_id The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallet/list-all-mpc-vaults). * @param {Object} opts Optional parameters * @param {module:model/CreateKeyShareHolderGroupRequest} [CreateKeyShareHolderGroupRequest] The request body to create a key share holder group. @@ -151,7 +151,7 @@ export default class WalletsMPCWalletsApi { /** * Create key share holder group - * This operation creates a key share holder group for a specified vault. + * This operation creates a key share holder group for a specified vault. This operation will not return the `tss_key_share_groups` property until key shares have been created using the [Create TSS request](/v2/api-references/wallets--mpc-wallets/create-tss-request) operation. Creating a wallet with the [Create wallet](/v2/api-references/wallets/create-wallet) operation is only possible after you've completed the previous actions. * @param {String} vault_id The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallet/list-all-mpc-vaults). * @param {Object} opts Optional parameters * @param {module:model/CreateKeyShareHolderGroupRequest} opts.CreateKeyShareHolderGroupRequest The request body to create a key share holder group. diff --git a/src/index.js b/src/index.js index 083518ab..d417d22a 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,7 @@ import ActivityInitiator from './model/ActivityInitiator'; import ActivityStatus from './model/ActivityStatus'; import ActivityTimeline from './model/ActivityTimeline'; import ActivityType from './model/ActivityType'; +import AddressBook from './model/AddressBook'; import AddressEncoding from './model/AddressEncoding'; import AddressInfo from './model/AddressInfo'; import AddressTransferDestination from './model/AddressTransferDestination'; @@ -319,7 +320,7 @@ import WalletsMPCWalletsApi from './api/WalletsMPCWalletsApi'; * *

* @module index -* @version 1.3.0 +* @version 1.4.0 */ export { Env, @@ -365,6 +366,12 @@ export { */ ActivityType, + /** + * The AddressBook model constructor. + * @property {module:model/AddressBook} + */ + AddressBook, + /** * The AddressEncoding model constructor. * @property {module:model/AddressEncoding} diff --git a/src/model/AddressBook.js b/src/model/AddressBook.js new file mode 100644 index 00000000..2cfba8eb --- /dev/null +++ b/src/model/AddressBook.js @@ -0,0 +1,185 @@ +/** + * Cobo Wallet as a Service 2.0 + * + * Contact: help@cobo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import WalletType from './WalletType'; + +/** + * The AddressBook model module. + * @module model/AddressBook + */ +class AddressBook { + /** + * Constructs a new AddressBook. + * The data for address book entry information. + * @alias module:model/AddressBook + * @param org_id {String} + * @param entry_id {String} + * @param address {String} address. + * @param label {String} The label to address. + */ + constructor(org_id, entry_id, address, label) { + + AddressBook.initialize(this, org_id, entry_id, address, label); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, org_id, entry_id, address, label) { + obj['org_id'] = org_id; + obj['entry_id'] = entry_id; + obj['address'] = address; + obj['label'] = label; + } + + /** + * Constructs a AddressBook from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/AddressBook} obj Optional instance to populate. + * @return {module:model/AddressBook} The populated AddressBook instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new AddressBook(); + + if (data.hasOwnProperty('org_id')) { + obj['org_id'] = ApiClient.convertToType(data['org_id'], 'String'); + } + if (data.hasOwnProperty('entry_id')) { + obj['entry_id'] = ApiClient.convertToType(data['entry_id'], 'String'); + } + if (data.hasOwnProperty('address')) { + obj['address'] = ApiClient.convertToType(data['address'], 'String'); + } + if (data.hasOwnProperty('memo')) { + obj['memo'] = ApiClient.convertToType(data['memo'], 'String'); + } + if (data.hasOwnProperty('wallet_name')) { + obj['wallet_name'] = ApiClient.convertToType(data['wallet_name'], 'String'); + } + if (data.hasOwnProperty('wallet_type')) { + obj['wallet_type'] = WalletType.constructFromObject(data['wallet_type']); + } + if (data.hasOwnProperty('label')) { + obj['label'] = ApiClient.convertToType(data['label'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to AddressBook. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to AddressBook. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of AddressBook.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['org_id'] && !(typeof data['org_id'] === 'string' || data['org_id'] instanceof String)) { + throw new Error("Expected the field `org_id` to be a primitive type in the JSON string but got " + data['org_id']); + } + // ensure the json data is a string + if (data['entry_id'] && !(typeof data['entry_id'] === 'string' || data['entry_id'] instanceof String)) { + throw new Error("Expected the field `entry_id` to be a primitive type in the JSON string but got " + data['entry_id']); + } + // ensure the json data is a string + if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { + throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); + } + // ensure the json data is a string + if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) { + throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']); + } + // ensure the json data is a string + if (data['wallet_name'] && !(typeof data['wallet_name'] === 'string' || data['wallet_name'] instanceof String)) { + throw new Error("Expected the field `wallet_name` to be a primitive type in the JSON string but got " + data['wallet_name']); + } + // ensure the json data is a string + if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) { + throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']); + } + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + + return true; + } + + +} + +AddressBook.RequiredProperties = ["org_id", "entry_id", "address", "label"]; + +/** + * @member {String} org_id + */ +AddressBook.prototype['org_id'] = undefined; + +/** + * @member {String} entry_id + */ +AddressBook.prototype['entry_id'] = undefined; + +/** + * address. + * @member {String} address + */ +AddressBook.prototype['address'] = undefined; + +/** + * memo. + * @member {String} memo + */ +AddressBook.prototype['memo'] = undefined; + +/** + * wallet name. + * @member {String} wallet_name + */ +AddressBook.prototype['wallet_name'] = undefined; + +/** + * @member {module:model/WalletType} wallet_type + */ +AddressBook.prototype['wallet_type'] = undefined; + +/** + * The label to address. + * @member {String} label + */ +AddressBook.prototype['label'] = undefined; + +/** + * email. + * @member {String} email + */ +AddressBook.prototype['email'] = undefined; + + + + + + +export default AddressBook; + diff --git a/src/model/AddressTransferDestination.js b/src/model/AddressTransferDestination.js index db19c28e..d57c5fe8 100644 --- a/src/model/AddressTransferDestination.js +++ b/src/model/AddressTransferDestination.js @@ -135,13 +135,13 @@ AddressTransferDestination.prototype['utxo_outputs'] = undefined; AddressTransferDestination.prototype['change_address'] = undefined; /** - * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. + * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. * @member {Boolean} force_internal */ AddressTransferDestination.prototype['force_internal'] = undefined; /** - * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. + * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. * @member {Boolean} force_external */ AddressTransferDestination.prototype['force_external'] = undefined; diff --git a/src/model/ContractCallSource.js b/src/model/ContractCallSource.js index 19494ced..1855b994 100644 --- a/src/model/ContractCallSource.js +++ b/src/model/ContractCallSource.js @@ -180,12 +180,6 @@ ContractCallSource.prototype['wallet_id'] = undefined; */ ContractCallSource.prototype['address'] = undefined; -/** - * The transaction nonce. - * @member {Number} nonce - */ -ContractCallSource.prototype['nonce'] = undefined; - /** * @member {module:model/CoboSafeDelegate} delegate */ diff --git a/src/model/CreateKeyShareHolder.js b/src/model/CreateKeyShareHolder.js index f78a867f..1962ca95 100644 --- a/src/model/CreateKeyShareHolder.js +++ b/src/model/CreateKeyShareHolder.js @@ -97,13 +97,13 @@ CreateKeyShareHolder.prototype['name'] = undefined; CreateKeyShareHolder.prototype['type'] = undefined; /** - * Key share holder's TSS Node ID. + * Key share holder's TSS Node ID. You can obtain the TSS Node ID using either mobile co-signer or API co-signer. See the \"Primary Purposes\" row on the table in [Create a Main Group](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/create-key-share-groups#create-a-main-group). * @member {String} tss_node_id */ CreateKeyShareHolder.prototype['tss_node_id'] = undefined; /** - * Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer. + * Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer. * @member {Boolean} signer */ CreateKeyShareHolder.prototype['signer'] = undefined; diff --git a/src/model/EstimateFeeParams.js b/src/model/EstimateFeeParams.js index 1e3b938e..85f6a5ce 100644 --- a/src/model/EstimateFeeParams.js +++ b/src/model/EstimateFeeParams.js @@ -38,7 +38,7 @@ class EstimateFeeParams { if (discriminatorValue) { switch(discriminatorValue) { - case "Call": + case "ContractCall": this.actualInstance = EstimateContractCallFeeParams.constructFromObject(instance); match++; break; diff --git a/src/model/GetToken200Response.js b/src/model/GetToken200Response.js index 0a0766e9..1e35ba23 100644 --- a/src/model/GetToken200Response.js +++ b/src/model/GetToken200Response.js @@ -95,7 +95,7 @@ class GetToken200Response { /** - * The access token. + * The Org Access Token. * @member {String} access_token */ GetToken200Response.prototype['access_token'] = undefined; @@ -107,19 +107,19 @@ GetToken200Response.prototype['access_token'] = undefined; GetToken200Response.prototype['token_type'] = undefined; /** - * The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. + * The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app. * @member {String} scope */ GetToken200Response.prototype['scope'] = undefined; /** - * The time in seconds in which the access token expires. + * The time in seconds in which the Org Access Token expires. * @member {Number} expires_in */ GetToken200Response.prototype['expires_in'] = undefined; /** - * The refresh token, used to obtain a new access token when the current access token expires. + * The Refresh Token, used to obtain a new Org Access Token when the current Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change. * @member {String} refresh_token */ GetToken200Response.prototype['refresh_token'] = undefined; diff --git a/src/model/KeyShareHolder.js b/src/model/KeyShareHolder.js index fbfb2855..4c657f19 100644 --- a/src/model/KeyShareHolder.js +++ b/src/model/KeyShareHolder.js @@ -123,7 +123,7 @@ KeyShareHolder.prototype['tss_node_id'] = undefined; KeyShareHolder.prototype['online'] = undefined; /** - * Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer. + * Whether the key share holder has been selected as the designated transaction signer. For example, in a 2-3 [Threshold Signature Scheme (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss), Cobo will serve as one signer, and you can choose one of the other two key share holders to act as the second transaction signer. - `true`: The key share holder is a designated transaction signer. - `false`: The key share holder is not a designated transaction signer. * @member {Boolean} signer */ KeyShareHolder.prototype['signer'] = undefined; diff --git a/src/model/MessageSignParams.js b/src/model/MessageSignParams.js index 5bae9811..d2bc70eb 100644 --- a/src/model/MessageSignParams.js +++ b/src/model/MessageSignParams.js @@ -149,7 +149,7 @@ MessageSignParams.prototype['source'] = undefined; MessageSignParams.prototype['destination'] = undefined; /** - * The description of the message sign transaction. + * The description of the message signing transaction. * @member {String} description */ MessageSignParams.prototype['description'] = undefined; diff --git a/src/model/MpcContractCallSource.js b/src/model/MpcContractCallSource.js index 13ec79e0..e10e01c2 100644 --- a/src/model/MpcContractCallSource.js +++ b/src/model/MpcContractCallSource.js @@ -63,9 +63,6 @@ class MpcContractCallSource { if (data.hasOwnProperty('address')) { obj['address'] = ApiClient.convertToType(data['address'], 'String'); } - if (data.hasOwnProperty('nonce')) { - obj['nonce'] = ApiClient.convertToType(data['nonce'], 'Number'); - } } return obj; } @@ -116,12 +113,6 @@ MpcContractCallSource.prototype['wallet_id'] = undefined; */ MpcContractCallSource.prototype['address'] = undefined; -/** - * The transaction nonce. - * @member {Number} nonce - */ -MpcContractCallSource.prototype['nonce'] = undefined; - // Implement BaseContractCallSource interface: /** diff --git a/src/model/RefreshToken200Response.js b/src/model/RefreshToken200Response.js index f2520eea..390210c3 100644 --- a/src/model/RefreshToken200Response.js +++ b/src/model/RefreshToken200Response.js @@ -95,7 +95,7 @@ class RefreshToken200Response { /** - * The new access token. + * The new Org Access Token. * @member {String} access_token */ RefreshToken200Response.prototype['access_token'] = undefined; @@ -107,19 +107,19 @@ RefreshToken200Response.prototype['access_token'] = undefined; RefreshToken200Response.prototype['token_type'] = undefined; /** - * The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. + * The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app. * @member {String} scope */ RefreshToken200Response.prototype['scope'] = undefined; /** - * The time in seconds in which the new access token expires. + * The time in seconds in which the new Org Access Token expires. * @member {Number} expires_in */ RefreshToken200Response.prototype['expires_in'] = undefined; /** - * The refresh token, used to obtain another access token when the new access token expires. + * The Refresh Token, used to obtain another Org Access Token when the new Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change. * @member {String} refresh_token */ RefreshToken200Response.prototype['refresh_token'] = undefined; diff --git a/src/model/RefreshTokenRequest.js b/src/model/RefreshTokenRequest.js index d11e5127..d5165339 100644 --- a/src/model/RefreshTokenRequest.js +++ b/src/model/RefreshTokenRequest.js @@ -85,7 +85,7 @@ class RefreshTokenRequest { /** - * 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. + * The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app. * @member {String} client_id */ RefreshTokenRequest.prototype['client_id'] = undefined; @@ -97,7 +97,7 @@ RefreshTokenRequest.prototype['client_id'] = undefined; RefreshTokenRequest.prototype['grant_type'] = undefined; /** - * The refresh token of the current access token. + * The Refresh Token of the current Org Access Token. * @member {String} refresh_token */ RefreshTokenRequest.prototype['refresh_token'] = undefined; diff --git a/src/model/TSSRequestStatus.js b/src/model/TSSRequestStatus.js index ee354851..4a70dfa7 100644 --- a/src/model/TSSRequestStatus.js +++ b/src/model/TSSRequestStatus.js @@ -38,6 +38,13 @@ export default class TSSRequestStatus { "KeyGenerating" = "KeyGenerating"; + /** + * value: "MPCProcessing" + * @const + */ + "MPCProcessing" = "MPCProcessing"; + + /** * value: "KeyGeneratingFailed" * @const diff --git a/src/model/TransactionSignatureResult.js b/src/model/TransactionSignatureResult.js index 044ef28a..5f2d92e5 100644 --- a/src/model/TransactionSignatureResult.js +++ b/src/model/TransactionSignatureResult.js @@ -19,7 +19,7 @@ import TransactionResultType from './TransactionResultType'; class TransactionSignatureResult { /** * Constructs a new TransactionSignatureResult. - * The result of a message sign transaction. + * The result of a message signing transaction. * @alias module:model/TransactionSignatureResult * @param signature {String} The raw data of the signature. */ diff --git a/src/model/TransactionStatus.js b/src/model/TransactionStatus.js index d011bc6e..2c4ad27d 100644 --- a/src/model/TransactionStatus.js +++ b/src/model/TransactionStatus.js @@ -38,13 +38,6 @@ export default class TransactionStatus { "PendingAuthorization" = "PendingAuthorization"; - /** - * value: "Queued" - * @const - */ - "Queued" = "Queued"; - - /** * value: "PendingSignature" * @const diff --git a/src/model/TransactionSubStatus.js b/src/model/TransactionSubStatus.js index 65cfff7d..31432667 100644 --- a/src/model/TransactionSubStatus.js +++ b/src/model/TransactionSubStatus.js @@ -24,13 +24,6 @@ export default class TransactionSubStatus { "RejectedKYT" = "RejectedKYT"; - /** - * value: "RejectedTravelRule" - * @const - */ - "RejectedTravelRule" = "RejectedTravelRule"; - - /** * value: "PendingDoubleCheck" * @const @@ -143,6 +136,13 @@ export default class TransactionSubStatus { "FailedOnChain" = "FailedOnChain"; + /** + * value: "Reverting" + * @const + */ + "Reverting" = "Reverting"; + + /** * value: "Queue" * @const @@ -185,6 +185,55 @@ export default class TransactionSubStatus { "OnchainRejection" = "OnchainRejection"; + /** + * value: "RejectedTravelRule" + * @const + */ + "RejectedTravelRule" = "RejectedTravelRule"; + + + /** + * value: "RejectedTravelRuleDueToCompliance" + * @const + */ + "RejectedTravelRuleDueToCompliance" = "RejectedTravelRuleDueToCompliance"; + + + /** + * value: "PendingTravelRuleInfo" + * @const + */ + "PendingTravelRuleInfo" = "PendingTravelRuleInfo"; + + + /** + * value: "PendingTravelRuleCheck" + * @const + */ + "PendingTravelRuleCheck" = "PendingTravelRuleCheck"; + + + /** + * value: "RejectedTravelRuleDueToUnsupportedToken" + * @const + */ + "RejectedTravelRuleDueToUnsupportedToken" = "RejectedTravelRuleDueToUnsupportedToken"; + + + /** + * value: "SignatureVerificationSuccess" + * @const + */ + "SignatureVerificationSuccess" = "SignatureVerificationSuccess"; + + + /** + * value: "SignatureVerificationFailed" + * @const + */ + "SignatureVerificationFailed" = "SignatureVerificationFailed"; + + /** * value: "unknown_default_open_api" * @const diff --git a/src/model/TransferDestination.js b/src/model/TransferDestination.js index a636c24c..0bd3d5e8 100644 --- a/src/model/TransferDestination.js +++ b/src/model/TransferDestination.js @@ -182,13 +182,13 @@ TransferDestination.prototype['utxo_outputs'] = undefined; TransferDestination.prototype['change_address'] = undefined; /** - * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. + * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. * @member {Boolean} force_internal */ TransferDestination.prototype['force_internal'] = undefined; /** - * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. + * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`. * @member {Boolean} force_external */ TransferDestination.prototype['force_external'] = undefined; diff --git a/test/model/AddressBook.spec.js b/test/model/AddressBook.spec.js new file mode 100644 index 00000000..71c3bc6b --- /dev/null +++ b/test/model/AddressBook.spec.js @@ -0,0 +1,105 @@ +/** + * Cobo Wallet as a Service 2.0 + * + * Contact: help@cobo.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.CoboWaas2); + } +}(this, function(expect, CoboWaas2) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new CoboWaas2.AddressBook(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AddressBook', function() { + it('should create an instance of AddressBook', function() { + // uncomment below and update the code to test AddressBook + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be.a(CoboWaas2.AddressBook); + }); + + it('should have the property org_id (base name: "org_id")', function() { + // uncomment below and update the code to test the property org_id + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property entry_id (base name: "entry_id")', function() { + // uncomment below and update the code to test the property entry_id + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property address (base name: "address")', function() { + // uncomment below and update the code to test the property address + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property memo (base name: "memo")', function() { + // uncomment below and update the code to test the property memo + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property wallet_name (base name: "wallet_name")', function() { + // uncomment below and update the code to test the property wallet_name + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property wallet_type (base name: "wallet_type")', function() { + // uncomment below and update the code to test the property wallet_type + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property label (base name: "label")', function() { + // uncomment below and update the code to test the property label + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new CoboWaas2.AddressBook(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ContractCallSource.spec.js b/test/model/ContractCallSource.spec.js index 561c1261..0b2bb524 100644 --- a/test/model/ContractCallSource.spec.js +++ b/test/model/ContractCallSource.spec.js @@ -70,12 +70,6 @@ //expect(instance).to.be(); }); - it('should have the property nonce (base name: "nonce")', function() { - // uncomment below and update the code to test the property nonce - //var instance = new CoboWaas2.ContractCallSource(); - //expect(instance).to.be(); - }); - it('should have the property delegate (base name: "delegate")', function() { // uncomment below and update the code to test the property delegate //var instance = new CoboWaas2.ContractCallSource(); diff --git a/test/model/MpcContractCallSource.spec.js b/test/model/MpcContractCallSource.spec.js index 8663215b..19172c2e 100644 --- a/test/model/MpcContractCallSource.spec.js +++ b/test/model/MpcContractCallSource.spec.js @@ -70,12 +70,6 @@ //expect(instance).to.be(); }); - it('should have the property nonce (base name: "nonce")', function() { - // uncomment below and update the code to test the property nonce - //var instance = new CoboWaas2.MpcContractCallSource(); - //expect(instance).to.be(); - }); - }); }));