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
- Create a project directory and initialize NPM:
- 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.
- 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.
- Create a file
index.js in the root directory and paste the following code into it.
- Set the API secret.
- 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