|
1 | 1 | --- |
2 | 2 | title: Versioning & Compatibility |
3 | | -description: How SDK versions map to Stellar protocol versions, and why this site documents only the current major. |
| 3 | +description: Why to use the latest @stellar/stellar-sdk, where these docs apply, and how to find older docs and release notes. |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Versioning & Compatibility |
7 | 7 |
|
8 | | -## SDK ↔ Protocol mapping |
9 | | - |
10 | | -Each major version of `@stellar/stellar-sdk` is built against a |
11 | | -specific Stellar protocol version. From v27 onwards the SDK major |
12 | | -matches the protocol major (v27 → Protocol 27, v28 → Protocol 28, …). |
13 | | -For majors before v27, the protocol target is documented in the |
14 | | -[release notes](https://github.com/stellar/js-stellar-sdk/releases) of |
15 | | -the relevant tag. |
16 | | - |
17 | | -| SDK major | Protocol | Status | |
18 | | -| --- | --- | --- | |
19 | | -| 15.x | (see release notes) | Current | |
20 | | - |
21 | | -> The mapping table is intentionally minimal pre-v27. After v27 the |
22 | | -> table becomes 1:1 and self-explanatory. |
23 | | -
|
24 | | -## Why older majors aren't network-compatible |
25 | | - |
26 | | -The Stellar network upgrades its protocol periodically. Once an |
27 | | -upgrade ships, transactions built with an SDK major that targets an |
28 | | -older protocol may use deprecated XDR shapes or fail validation. A |
29 | | -keypair or strkey doesn't depend on the protocol version, so basic key |
30 | | -manipulation remains usable across majors — but anything that |
31 | | -constructs, signs, or submits a transaction is protocol-bound. |
32 | | - |
33 | | -Always use the SDK major that matches the protocol of the network |
34 | | -you're targeting (mainnet, testnet, or futurenet — each may run a |
35 | | -different protocol during a rollout window). |
36 | | - |
37 | | -## Single-version docs policy |
38 | | - |
39 | | -This site documents only the **current major** of |
40 | | -`@stellar/stellar-sdk`. We do not maintain a documentation archive |
41 | | -for older majors. The maintenance cost — keeping multiple parallel |
42 | | -reference trees in sync, ensuring cross-version links don't rot, |
43 | | -running multiple builds — outweighs the benefit, given that older |
44 | | -majors are rarely the right choice for new development (per the |
45 | | -network-compatibility note above). |
46 | | - |
47 | | -## Finding docs for older versions |
48 | | - |
49 | | -To browse documentation for a specific older SDK version: |
50 | | - |
51 | | -1. Find the matching Git tag in the |
52 | | - [stellar/js-stellar-sdk releases](https://github.com/stellar/js-stellar-sdk/releases) |
53 | | - page. |
54 | | -2. Browse the `docs/` directory at that ref on GitHub. The reference |
55 | | - pages under `docs/reference/` are committed at each release and |
56 | | - their inline source links point to the source files at that |
57 | | - release's commit SHA, so the link targets resolve correctly even |
58 | | - when the docs site itself only shows the current major. |
| 8 | +## Use the latest version |
| 9 | + |
| 10 | +We recommend always using the latest version of `@stellar/stellar-sdk` |
| 11 | +so your application keeps working as expected on the Stellar network. |
| 12 | +The network upgrades its protocol periodically, and an older SDK may |
| 13 | +not handle newer data — for example, newer XDR can fail to render when |
| 14 | +an older SDK version is used. |
| 15 | + |
| 16 | +You can check the protocol version a network currently runs from its |
| 17 | +Horizon root endpoint, in the `current_protocol_version` field — for |
| 18 | +example, [horizon.stellar.org](https://horizon.stellar.org/) for |
| 19 | +Mainnet. Each network (Testnet, Futurenet) exposes its own Horizon |
| 20 | +root. |
| 21 | + |
| 22 | +## These docs cover the latest version only |
| 23 | + |
| 24 | +This site documents only the latest version of `@stellar/stellar-sdk`. |
| 25 | +To read docs for an older version, find its Git tag on the |
| 26 | +[releases page](https://github.com/stellar/js-stellar-sdk/releases) and |
| 27 | +browse the `docs/` directory at that ref on GitHub. |
| 28 | + |
| 29 | +## What's new in each version |
| 30 | + |
| 31 | +See the |
| 32 | +[release notes](https://github.com/stellar/js-stellar-sdk/releases) for |
| 33 | +what changed in each release — breaking changes are clearly marked. |
0 commit comments