This article is targeted at WaaS 1.0 users who are considering upgrading to WaaS 2.0. It introduces the benefits of the upgrade and provides step-by-step instructions to successfully complete the upgrade process.
Benefits of the upgrade
WaaS 2.0 is a complete upgrade from Cobo’s initial WaaS offering. By upgrading to 2.0, you can benefit from the following key features:
- A more holistic approach to accessing Cobo’s wallet technologies through a unified API for all four of Cobo’s wallet types.
- More webhook event types, including transaction and TSS request-related events, and more to come.
- Flexible usage models for MPC Wallets, including Organization-Controlled Wallets and User-Controlled Wallets.
- Programmatic control of smart contract wallets such as Safe with fine-grained access controls.
- Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more.
By upgrading to 2.0, you can also enjoy the full features of Cobo Portal, including a powerful developer console where you can monitor API activities, view logs, and oversee webhook events and callback messages.
With the WaaS 2.0 API, you not only can integrate Cobo’s powerful wallet capabilities directly into your applications, but also build Cobo Portal Apps to significantly expand the capabilities of Cobo Portal.
For a complete introduction to WaaS 2.0, see Introduction to WaaS 2.0.
Differences between 1.0 and 2.0
The following table lists the major differences between the 1.0 and 2.0 versions:
| WaaS 1.0 | WaaS 2.0 |
|---|
| API design | HTTP endpoints supporting the GET and POST methods. | RESTful API structured into distinct domains, such as wallets, transactions, and webhooks. The API follows resource-oriented design principles for endpoint definition and supports standard HTTP methods including GET, POST, PUT, and DELETE. |
| API key and authentication | - The API key is wallet-specific, meaning it can only be used to access the associated wallet.
- An SECP256k1 signature is used for authenticating an API request.
| - The API key is organization-specific and can be used to access multiple wallets. For more information, refer to Register an API key.
- An ED25519 signature is used for authenticating an API request.
|
| Transaction notification | Supports transaction status-related events only. | |
| Withdrawal confirmation | A mechanism used for confirming withdrawals initiated through WaaS API. | - This feature is called “Callback” in 2.0.
- The data structure of the callback message differs from 1.0.
|
| Supported wallet types | - Custodial Wallets
- MPC Wallets
| |
| Asset model | - A coin is considered a unique asset type.
- A coin represents a specific pairing of a chain and a cryptocurrency, such as ETH_USDT.
| - A token is considered a unique asset type, except for Exchange Wallets, which consider an “asset” to be a unique asset type.
- A token represents a specific pairing of a chain and a cryptocurrency, such as ETH_USDT.
- An asset represents a cryptocurrency stored in your linked exchange account, such as USDT.
|
| Balance model | - [Custodial Wallets] Coin balances can be calculated for an entire wallet but not for each address.
- [MPC Wallets] Coin balances can be calculated for each address within the wallet, but not for an entire wallet.
| - [Custodial Wallets] Token balances can be calculated for the entire wallet but not for each address.
- [MPC Wallets] Token balances can be calculated for the entire wallet or each address.
|
| Balances and amounts | - Balances and amounts are denominated in the smallest units of the cryptocurrency. For example, Bitcoin balances and amounts are denominated in Satoshis.
- The parameters
abs_balance and abs_amount are denominated in the primary unit of the cryptocurrency, such as BTC for Bitcoin.
| - Balances and amounts are denominated in the primary unit of the cryptocurrency, such as BTC for Bitcoin.
- As an example, for a deposit of 1.2 BTC, the deposit amount is recorded as
120,000,000 in 1.0 and 1.2 in 2.0.
|
| Address generation | - [Custodial Wallets] Addresses are generated based on a specified coin, such as ETH_USDT, and can then be used by all coins on the same chain.
- [MPC Wallets] Addresses are generated based on a specified chain, such as ETH, and can then be used by all coins on the same chain.
| [Custodial Wallets / MPC Wallets] Addresses are generated based on a specified chain, such as ETH, and can then be used by all tokens on the same chain. |
| Transaction ID | The unique ID of a transaction. | - The transaction ID in 2.0 follows the UUID format which differs from the format used in 1.0.
- The transaction ID in 1.0 is termed as “Cobo ID” in 2.0. You can continue to use Cobo ID to query a transaction.
|
Upgrade to 2.0
This section introduces the detailed steps to upgrade from WaaS 1.0 to 2.0.
Prerequisites
Reach out to our support team at help@cobo.com to migrate from Cobo Custody to Cobo Portal.
Get started with WaaS 2.0
Follow the instructions in Get started with WaaS 2.0 to set up your account, create and register your API key, integrate a WaaS SDK if necessary, and send your first API request to the WaaS 2.0 service.
Rewrite your code
Once you complete the initial setup, it is time to rewrite your code by replacing the 1.0 API operations with 2.0 operations. Refer to API operation comparison for a detailed comparison between 1.0 and 2.0 API operations.
You can also refer to Get started with Custodial Wallets (Asset Wallets) for a step-by-step guide on how to create a Custodial Wallet (Asset Wallet), generate wallet addresses, and receive and withdraw tokens. Guides for other wallet types will be available in the future.
Set up webhook and callback endpoints
Set up the webhook and callback endpoints and register them in Cobo Portal. To learn the detailed steps of the setup, see Set up a callback or webhook endpoint. To register the endpoint, see Register a webhook endpoint and Register a callback endpoint.
The endpoints you set up for WaaS 1.0 will not receive any messages from the WaaS 2.0 service.
API operation comparison
The following table lists the API operations needed for common wallet operations in WaaS 1.0 and 2.0 respectively. You can refer to this table when migrating your code from 1.0 to 2.0.
| WaaS 1.0 | WaaS 2.0 |
|---|
| Create a wallet | Not supported since the API key is wallet-specific | Create wallet |
| Create an address | | Create addresses in wallet |
| Withdraw tokens | | Transfer token |
| RBF transaction (Speed up) | [MPC Wallets] Speedup Transaction | Speed up transaction |
| RBF transaction (Drop) | [MPC Wallets] Drop Transaction | Drop transaction |
| RBF transaction (Resend) | Not supported | Resend transaction |
| RBF transaction (Cancel) | Not supported | Cancel transaction |
| Call a contract | Not supported | Call smart contract |
| Sign a message | Not supported | Sign message |
| Query a transaction | | |