Skip to main content
Try Cobo WaaS Skill in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀

Overview

This guide introduces how to get started with using the Cobo WaaS 2.0 JavaScript SDK, which allows you to integrate the WaaS service into your existing application using the JavaScript programming language. To learn more about the initial setup steps necessary for utilizing the WaaS API, see Send your first request. You can go to GitHub to access the source code of the SDK.

Prerequisites

Create a project and install the SDK

  1. Create a project directory and initialize NPM:
  1. Install the SDK:
The directory structure after installation is as follows:
If your project already has package.json and package-lock.json, you can directly copy them to the root directory and run npm install to pull dependencies.
  1. Create a file index.js in the root directory and paste the following code into it.
The directory structure after installation is as follows:
If your project already has package.json and package-lock.json, you can directly copy them to the root directory and run npm install to pull dependencies.
  1. Create a file index.js in the root directory and paste the following code into it.

Configure API key and HTTP host

  1. Set the API secret.
  1. Select which environment you want to use.

Code sample

For operation-specific documentation and sample code, see the docs folder in the WaaS SDK GitHub repository.

List supported chains

Example response is as follows:

Create a wallet