Skip to content

Commit 64da816

Browse files
ElliotFriendclaudeCopilot
authored
chore(sdk-examples): update JS SDK import path to scoped package (#2498)
* chore(sdk-examples): update JS SDK import path to scoped package The JavaScript SDK was renamed from the unscoped `stellar-sdk` npm package to `@stellar/stellar-sdk` in v11.0.0 (current latest v15.1.0). The unscoped package is deprecated and pins to a pre-v11 release. Update all 16 import/require statements across 12 docs pages to the scoped `@stellar/stellar-sdk` package name. No API usage changed — these pages already use current APIs (Horizon.Server, rpc namespace, etc.). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent f619b40 commit 64da816

12 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/build/apps/example-application-tutorial/confirmation-modal.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The basic parts of this component look like this:
7272
import { CopyIcon } from "svelte-feather-icons";
7373
import { errorMessage } from "$lib/stores/alertsStore";
7474
import { walletStore } from "$lib/stores/walletStore";
75-
import { Networks, TransactionBuilder } from "stellar-sdk";
75+
import { Networks, TransactionBuilder } from "@stellar/stellar-sdk";
7676
7777
// A Svelte "context" is used to control when to `open` and `close` a given
7878
// modal from within other components
@@ -110,7 +110,7 @@ We can now use this modal component whenever we need to confirm something from t
110110

111111
```html title="/src/routes/signup/+page.svelte"
112112
<script>
113-
import { Keypair } from "stellar-sdk";
113+
import { Keypair } from "@stellar/stellar-sdk";
114114
import TruncatedKey from "$lib/components/TruncatedKey.svelte";
115115
import ConfirmationModal from "$lib/components/ConfirmationModal.svelte";
116116
import { goto } from "$app/navigation";

docs/build/apps/example-application-tutorial/contacts-list.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This tutorial code is simplified for display here. The code is fully typed, docu
3030
```js title="/src/lib/stores/contactsStore.js"
3131
import { v4 as uuidv4 } from "uuid";
3232
import { persisted } from "svelte-local-storage-store";
33-
import { StrKey } from "stellar-sdk";
33+
import { StrKey } from "@stellar/stellar-sdk";
3434
import { error } from "@sveltejs/kit";
3535
import { get } from "svelte/store";
3636

docs/build/apps/wallet/sep24.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ suspend fun depositDifferentAccount(): InteractiveFlowResponse {
262262
```
263263

264264
```typescript
265-
import { Memo, MemoText } from "stellar-sdk";
265+
import { Memo, MemoText } from "@stellar/stellar-sdk";
266266

267267
const recipientAccount = "G...";
268268
const depositDifferentAccount = async (): Promise<InteractiveFlowResponse> => {

docs/build/guides/basics/verify-trustlines.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ To check if a trustline exists for a specific asset, you can use the Stellar RPC
2121
<CodeExample>
2222

2323
```js
24-
import { Asset, StrKey, xdr } from "stellar-sdk";
25-
import { Server } from "stellar-sdk/rpc";
24+
import { Asset, StrKey, xdr } from "@stellar/stellar-sdk";
25+
import { Server } from "@stellar/stellar-sdk/rpc";
2626

2727
// Initialize Soroban RPC server for testnet
2828
const rpc = new Server("https://soroban-testnet.stellar.org");
@@ -138,7 +138,7 @@ Given a receiver address, the following code snippet demonstrates how to check i
138138
<CodeExample>
139139

140140
```js
141-
import * as StellarSdk from "stellar-sdk";
141+
import * as StellarSdk from "@stellar/stellar-sdk";
142142

143143
// Initialize Horizon server for testnet
144144
const server = new StellarSdk.Horizon.Server(
@@ -245,9 +245,9 @@ Given a receiver addresss, the following code snippet demonstrates how to simula
245245
<CodeExample>
246246

247247
```js
248-
import { Asset, Networks } from "stellar-sdk";
248+
import { Asset, Networks } from "@stellar/stellar-sdk";
249249
import { Client } from "sac";
250-
import { Server } from "stellar-sdk/rpc";
250+
import { Server } from "@stellar/stellar-sdk/rpc";
251251

252252
// Initialize Soroban RPC server for testnet
253253
const rpc = new Server("https://soroban-testnet.stellar.org");

docs/data/apis/horizon/api-reference/structure/pagination/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To move between pages of a collection of records, use the links in the `next` an
3838
<CodeExample title="Example Request">
3939

4040
```js
41-
var StellarSdk = require("stellar-sdk");
41+
var StellarSdk = require("@stellar/stellar-sdk");
4242
var server = new StellarSdk.Horizon.Server(
4343
"https://horizon-testnet.stellar.org",
4444
);

docs/data/apis/horizon/api-reference/structure/pagination/page-arguments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ curl "https://horizon-testnet.stellar.org/ledgers/26478723/operations?cursor=113
3737
```
3838

3939
```js
40-
var StellarSdk = require("stellar-sdk");
40+
var StellarSdk = require("@stellar/stellar-sdk");
4141
var server = new StellarSdk.Horizon.Server(
4242
"https://horizon-testnet.stellar.org",
4343
);

docs/learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ The following code sets up the accounts and defines some helper functions. These
148148
<CodeExample>
149149

150150
```js
151-
const sdk = require("stellar-sdk");
151+
const sdk = require("@stellar/stellar-sdk");
152152
const BigNumber = require("bignumber.js");
153153

154-
let server = new sdk.Server("https://horizon-testnet.stellar.org");
154+
let server = new sdk.Horizon.Server("https://horizon-testnet.stellar.org");
155155

156156
/// Helps simplify creating & signing a transaction.
157157
function buildTx(source, signer, ...ops) {

docs/platforms/stellar-disbursement-platform/admin-guide/making-your-wallet-sdp-ready.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Below is a JavaScript snippet demonstrating how to verify the signature:
105105
```js
106106
#!/usr/bin/env node
107107

108-
const { Keypair } = require("stellar-sdk");
108+
const { Keypair } = require("@stellar/stellar-sdk");
109109

110110
// The SDP's stellar.toml SIGNING_KEY
111111
//

docs/tokens/control-asset-access.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The following example sets authorization to be both required and revocable:
113113
<CodeExample>
114114

115115
```js
116-
var StellarSdk = require("stellar-sdk");
116+
var StellarSdk = require("@stellar/stellar-sdk");
117117
var server = new StellarSdk.Horizon.Server(
118118
"https://horizon-testnet.stellar.org",
119119
);

docs/tokens/how-to-issue-an-asset.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ If you’d like to avoid your users having to deal with trustlines or XLM, consi
201201
<CodeExample>
202202

203203
```js
204-
const StellarSdk = require("stellar-sdk");
204+
const StellarSdk = require("@stellar/stellar-sdk");
205205
const server = new StellarSdk.Horizon.Server(
206206
"https://horizon-testnet.stellar.org",
207207
);
@@ -497,7 +497,7 @@ transaction, _ := txnbuild.NewTransaction(
497497
<CodeExample title="Issuing an Asset">
498498
499499
```js
500-
var StellarSdk = require("stellar-sdk");
500+
var StellarSdk = require("@stellar/stellar-sdk");
501501
var server = new StellarSdk.Horizon.Server(
502502
"https://horizon-testnet.stellar.org",
503503
);

0 commit comments

Comments
 (0)