Upgrade stellar-sdk and make signing key required#233
Upgrade stellar-sdk and make signing key required#233CassioMG merged 3 commits intorelease/2.0.0from
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Stellar SDK from version 13.0.0-beta.1 to 14.5.0, bumps the minimum Node.js requirement from 18 to 20, and enforces that the server signing key is required for SEP-10 authentication. The changes address API compatibility issues introduced by the major version upgrade and improve the security posture by requiring explicit signing key validation.
Changes:
- Upgraded
@stellar/stellar-sdkdependency from13.0.0-beta.1to14.5.0across all three packages - Updated minimum Node.js version from 18 to 20 in all package.json files and CI workflows
- Made
serverSigningKeyrequired for SEP-10 authentication and removed fallback validation logic - Fixed Soroban contract address encoding to use
Address.fromScAddress()instead of deprecatedStrKey.encodeContract() - Updated build configuration (Babel and webpack) to target Node 20 and support BigInt literals
- Added
MissingSigningKeyErrorexception for when an anchor's TOML lacks the required SIGNING_KEY
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updated stellar-sdk dependencies and transitive dependencies; added @noble/curves and @noble/hashes |
| babel.config.js | Configured @babel/preset-env to target Node 20 |
| README.md | Updated prerequisite from Node >=18 to Node >=20 |
| @stellar/typescript-wallet-sdk/webpack.config.js | Added bigIntLiteral: true to output environment config |
| @stellar/typescript-wallet-sdk/test/integration/recovery.test.ts | Added required signingKey fields to recovery server test configurations |
| @stellar/typescript-wallet-sdk/test/auth.test.ts | Removed local readChallengeTx tests and made serverSigningKey required in test setup |
| @stellar/typescript-wallet-sdk/src/walletSdk/Types/recovery.ts | Changed signingKey from optional to required in RecoveryServer type |
| @stellar/typescript-wallet-sdk/src/walletSdk/Recovery/index.ts | Simplified sep10Auth to pass signingKey directly without conditional spread |
| @stellar/typescript-wallet-sdk/src/walletSdk/Exceptions/index.ts | Added MissingSigningKeyError class |
| @stellar/typescript-wallet-sdk/src/walletSdk/Auth/index.ts | Made serverSigningKey required; removed local readChallengeTx fallback and conditional logic |
| @stellar/typescript-wallet-sdk/src/walletSdk/Anchor/index.ts | Added validation to throw MissingSigningKeyError when TOML lacks SIGNING_KEY |
| @stellar/typescript-wallet-sdk/package.json | Updated stellar-sdk to 14.5.0 and node engine to >=20 |
| @stellar/typescript-wallet-sdk-soroban/src/Helpers/scValByType.ts | Replaced StrKey.encodeContract with Address.fromScAddress for contract addresses |
| @stellar/typescript-wallet-sdk-soroban/src/Helpers/getTokenInvocationArgs.ts | Replaced StrKey.encodeContract with Address.fromScAddress for contract addresses |
| @stellar/typescript-wallet-sdk-soroban/src/Helpers/getInvocationDetails.ts | Replaced StrKey.encodeContract with Address.fromScAddress; removed unused StrKey import |
| @stellar/typescript-wallet-sdk-soroban/package.json | Updated stellar-sdk to 14.5.0 and node engine to >=20 |
| @stellar/typescript-wallet-sdk-km/test/keyManager.test.ts | Updated error message assertions to remove InvalidChallengeError prefix (SDK v14 throws plain Error) |
| @stellar/typescript-wallet-sdk-km/package.json | Updated stellar-sdk to 14.5.0 and node engine to >=20 |
| .github/workflows/*.yml | Updated all 10 workflows from node-version 18 to 20 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Upgrades
@stellar/stellar-sdkfrom13.0.0-beta.1to14.5.0across all three packages, bumps the minimum Node version from 18 to 20, and makes the server'ssigningKeyrequired for SEP-10 authentication.Changes
Stellar SDK upgrade (
13.0.0-beta.1→14.5.0)@stellar/stellar-sdkdependency in all 3package.jsonfilesHash/Buffertype mismatch intypescript-wallet-sdk-sorobanby replacingStrKey.encodeContract(contractId())withAddress.fromScAddress(contractAddress()).toString()(3 files)keyManager.test.ts— SDK v14 throws plainErrorinstead ofInvalidChallengeError(4 tests)Node 18 → 20
engines.nodefrom>=18to>=20in all 3package.jsonfilesnode-versionfrom18to20in all 10 GitHub Actions workflowsREADME.mdtargets: { node: "20" }inbabel.config.jsso@babel/preset-envno longer transpiles BigInt**toMath.pow()(which crashes at runtime)output.environment.bigIntLiteral: truetowebpack.config.jsso webpack knows the target environment supports BigInt literalsSEP-10 signing key
Auth/index.ts: MadeserverSigningKeyrequired inSep10Paramsand the class. Removed theif/elsebranching — now always delegates toWebAuth.readChallengeTx(). Deleted localreadChallengeTxfallback function.Exceptions/index.ts: AddedMissingSigningKeyErrorfor when an anchor's TOML doesn't publishSIGNING_KEY.Anchor/index.ts:sep10()now throwsMissingSigningKeyErrorif the TOML lacksSIGNING_KEY.Types/recovery.ts: MadeRecoveryServer.signingKeyrequired.Recovery/index.ts: Simplifiedsep10Auth()— passesserver.signingKeydirectly instead of conditional spread.Breaking Changes
@stellar/stellar-sdkupgraded from13.0.0-beta.1to14.5.0— a major version bump that may affect consumers depending on SDK types directly.Sep10constructor now requiresserverSigningKey— callers that previously omitted it will get a compile-time error.Anchor.sep10()now throwsMissingSigningKeyErrorif the anchor'sstellar.tomldoes not publish aSIGNING_KEY.RecoveryServer.signingKeyis now required — all recovery server configurations must include asigningKey.