The JavaScript SDK (JS SDK) connects your application to the Alibaba Cloud Blockchain as a Service platform. Use it to submit transactions, manage accounts, deploy and call smart contracts, run queries, execute local transactions, and subscribe to on-chain events.
The SDK supports TLS and HTTPS protocols and runs in Node.js, browsers, and web applications:
TLS — requires Node.js
HTTPS — runs directly in the browser; Node.js is not required
Key concepts
| Concept | Description |
|---|---|
| Transaction | An operation submitted to the blockchain, such as transferring assets or invoking a smart contract |
| Account | A blockchain identity used to sign and send transactions |
| Smart contract | A program deployed on the blockchain that defines business logic; the JS SDK supports Solidity contracts |
| Event subscription | A mechanism to listen for on-chain events emitted by smart contracts |
| Local transaction | A read-only call that runs smart contract logic locally without broadcasting to the chain |
What the JS SDK does
The JS SDK provides a standardized interface for API calls to the blockchain platform. It supports:
Submitting and tracking transactions
Creating and managing accounts
Deploying Solidity smart contracts
Calling smart contract methods
Running read-only queries and local transactions
Subscribing to on-chain events
Environment support
| Environment | TLS | HTTPS |
|---|---|---|
| Node.js | Supported | Supported |
| Browser | Not supported | Supported |
| Web application | Not supported | Supported |
Use TLS for server-side workloads in Node.js. Use HTTPS for browser-based or web application integrations.
Release notes
| Version | Supported blockchain | Improved feature | Download |
|---|---|---|---|
| 0.2.27 | Standard blockchains | TLS and HTTPS protocol support; account and smart contract operations; event subscriptions; Solidity smart contracts | Download SDK |
Next steps
Download the SDK, add it to your project, and connect to the blockchain platform using TLS or HTTPS depending on your runtime environment.