Skip to content

Commit

Permalink
Merge pull request #22 from ShanshanLi-cobo/master
Browse files Browse the repository at this point in the history
release v1.4.0
  • Loading branch information
zhangjun725 authored Sep 25, 2024
2 parents 0f6fbee + 0d7e3be commit 9f7f963
Show file tree
Hide file tree
Showing 46 changed files with 474 additions and 123 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions docs/AddressBook.md
Original file line number Diff line number Diff line change
@@ -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]


4 changes: 2 additions & 2 deletions docs/AddressTransferDestination.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


1 change: 0 additions & 1 deletion docs/ContractCallSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | |


4 changes: 2 additions & 2 deletions docs/CreateKeyShareHolder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


8 changes: 4 additions & 4 deletions docs/GetToken200Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


2 changes: 1 addition & 1 deletion docs/KeyShareHolder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion docs/MessageSignParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


1 change: 0 additions & 1 deletion docs/MpcContractCallSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


18 changes: 9 additions & 9 deletions docs/OAuthApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ 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



## getToken

> 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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/RefreshToken200Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


4 changes: 2 additions & 2 deletions docs/RefreshTokenRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


2 changes: 2 additions & 0 deletions docs/TSSRequestStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

* `KeyGenerating` (value: `"KeyGenerating"`)

* `MPCProcessing` (value: `"MPCProcessing"`)

* `KeyGeneratingFailed` (value: `"KeyGeneratingFailed"`)

* `Success` (value: `"Success"`)
Expand Down
2 changes: 0 additions & 2 deletions docs/TransactionStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

* `PendingAuthorization` (value: `"PendingAuthorization"`)

* `Queued` (value: `"Queued"`)

* `PendingSignature` (value: `"PendingSignature"`)

* `Broadcasting` (value: `"Broadcasting"`)
Expand Down
Loading

0 comments on commit 9f7f963

Please sign in to comment.