Practical overview
When it fits
Use it when a browser or Node.js application needs a JavaScript or TypeScript connection to Stellar Horizon or Soroban RPC, or needs Stellar transaction construction and signing facilities.
Who it is for
- JavaScript and TypeScript developers building Stellar applications.
- Teams creating browser interfaces or Node.js services for Stellar.
- Developers building Soroban clients through JSON-RPC.
Documented uses
- Query Stellar Horizon data and network history.
- Communicate with Horizon REST endpoints and Soroban JSON-RPC.
- Construct and sign Stellar transactions.
- Submit transactions through a Stellar Horizon instance.
- Generate TypeScript bindings for Stellar smart contracts through the CLI.
Requirements & limits
The public repository identifies the project as open source under the Apache-2.0 license. The package is available through npm, pnpm, yarn, Deno's npm support and a documented browser CDN path.
- Choose the full package when the application needs Horizon, Soroban RPC or related networking features.
- Use the /base subpath when only offline primitives such as StrKey, Keypair, TransactionBuilder or XDR are needed.
- Consider the native-fetch default or documented Axios build according to the application's HTTP transport needs.
- Review version and protocol compatibility before using an older SDK release; the repository identifies version 16 and version 17 as the relevant choices described in its documentation.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add Stellar JS SDK to a JavaScript project
Install the SDK and import its JavaScript or TypeScript modules.
Before you start
- A JavaScript or TypeScript project using npm, pnpm, yarn or Deno's npm support.
Steps
Install @stellar/stellar-sdk with npm, pnpm, yarn or Deno's npm support.
Import the SDK with CommonJS or ES module syntax.
For browser use, add the documented CDN bundle instead of a package-manager installation.
Expected outcome
The project has access to Stellar SDK modules for Horizon, Soroban RPC and Stellar transaction operations.
Guide limitations
- The guide covers installation and importing; it does not document a complete application workflow or transaction submission sequence.
- The CDN requires a specific SDK version number from the releases page.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 1 October 2026
- Original website title
- stellar/js-stellar-sdk · Official homepage title · retained in its source language

