Migrating SDK from AugustDigital to Upshift
The August SDK is now the Upshift SDK. This guide covers the new package name, the renamed exports, and every breaking change between @augustdigital/sdk 9.16.0 and @upshiftfinance/sdk 0.8.0.
The August JavaScript SDK is now published as @upshiftfinance/sdk. @augustdigital/sdk stops at 9.16.0 and will not get new features or fixes. All new work ships to the new package only.
The new package's code continues from @augustdigital/sdk@9.16.0, but its version numbers restart at 0.x. @upshiftfinance/sdk@1.0.0 is newer than @augustdigital/sdk@9.16.0, not a downgrade.
For most integrations the upgrade comes down to three changes:
- Swap the package.
- Replace
AugustwithUpshiftin imports and identifiers. - Rename one environment variable.
The other breaking changes below affect you only if you manage SwapRouter approvals yourself.
TL;DR checklist
- [ ]
npm uninstall @augustdigital/sdk && npm install @upshiftfinance/sdk - [ ] Rewrite imports from
@augustdigital/sdkto@upshiftfinance/sdk - [ ] Rename
AugustSDKtoUpshiftSDK, and every otherAugust*export toUpshift* - [ ] Rename the env var
AUGUST_SDK_DISABLE_CURATOR_ALERTStoUPSHIFT_SDK_DISABLE_CURATOR_ALERTS - [ ] Update
catchblocks andinstanceof/.namechecks to theUpshift*Errorclasses - [ ] If you use the companion packages, switch them too:
@upshiftfinance/react,@upshiftfinance/config,@upshiftfinance/cli,@upshiftfinance/mcp - [ ] Check the section below if you use SwapRouter deposits with manual approvals
1. Install the new package
# npm
npm uninstall @augustdigital/sdk
npm install @upshiftfinance/sdk
# pnpm
pnpm remove @augustdigital/sdk
pnpm add @upshiftfinance/sdk
# yarn
yarn remove @augustdigital/sdk
yarn add @upshiftfinance/sdkviem@^2 is still an optional peer dependency. If you pinned a range like ^9.x, use ^1.0.0 for the new package.
Do not install both packages side by side. Each one keeps its own caches and error classes, so an instanceof check against one package will not match errors thrown by the other.
2. Rename imports and identifiers
There are no deprecated August* aliases. Code that still uses them will fail to compile, or fail at runtime in plain JavaScript.
// Before
import AugustSDK, { AugustSDKError, isAugustSDKError } from '@augustdigital/sdk';
const sdk = new AugustSDK({ /* ... */ });
// After
import UpshiftSDK, { UpshiftSDKError, isUpshiftSDKError } from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({ /* ... */ });Constructor config, method names and return shapes are unchanged.
Full rename table
Before (@augustdigital/sdk) | After (@upshiftfinance/sdk) |
|---|---|
AugustSDK (default export) | UpshiftSDK |
AugustSDKError | UpshiftSDKError |
AugustValidationError and every other August*Error | UpshiftValidationError / Upshift*Error |
AugustErrorCode | UpshiftErrorCode |
AugustErrorOptions | UpshiftErrorOptions |
isAugustSDKError | isUpshiftSDKError |
AugustBase / IAugustBase | UpshiftBase / IUpshiftBase |
AugustApi | UpshiftApi |
AugustVaults | UpshiftVaults |
AugustSubAccounts | UpshiftSubAccounts |
fetchAugustPublic | fetchUpshiftPublic |
fetchAugustWithKey | fetchUpshiftWithKey |
fetchAugustWithBearer | fetchUpshiftWithBearer |
verifyAugustKey | verifyUpshiftKey |
IFetchAugustMethods / IFetchAugustOptions | IFetchUpshiftMethods / IFetchUpshiftOptions |
In most codebases a find-and-replace does the job:
# Review the diff before committing
grep -rl '@augustdigital/sdk' src | xargs sed -i '' 's#@augustdigital/sdk#@upshiftfinance/sdk#g'
grep -rlE '\bAugust[A-Z]|\bisAugust|fetchAugust|verifyAugust|IFetchAugust|IAugustBase' src \
| xargs sed -i '' -E 's/\bAugust([A-Z])/Upshift\1/g; s/isAugust/isUpshift/g; s/(fetch|verify|IFetch)August/\1Upshift/g; s/IAugustBase/IUpshiftBase/g'The error classes report new .name values, for example 'UpshiftSDKError' and 'UpshiftValidationError'. If you match errors by name instead of with instanceof, or if your logging, Sentry or alerting rules filter on these strings, update them as well.
The error code values (INVALID_INPUT, INVALID_CHAIN, NO_SIGNER, NETWORK_ERROR, …) did not change.
3. Other breaking changes
These affect you only if you use the feature named in each heading.
SwapRouter deposits
On Monad, Base, Flare, Citrea, Fluent and Avalanche, a deposit of an asset the vault accepts now goes through the SwapRouter. If you manage approvals yourself instead of calling sdk.approve, approve getDepositRoute(...).spender, which is the router, not the vault. A native-token deposit into a wrapped-native vault goes through depositNativeToken.
getVault error wrapping
getVault now rethrows typed UpshiftSDKError subclasses (rate limit, server, validation, …) unchanged, where it used to wrap them in a plain Error. Other failures are wrapped in UpshiftSDKError (code UNKNOWN) with the original error as cause. If you parsed err.message to classify failures, switch to instanceof or err.code.
4. Improvements you get by upgrading
- Native ESM.
import UpshiftSDK from '@upshiftfinance/sdk'works in ESM projects ("type": "module", Vite SSR, vitest, tsx). The package now has anexportsmap, andrequire()and deeplib/*imports keep working. viemis optional. Bundlers no longer fail with "Could not resolve 'viem'" when it is not installed.- Factory subgraphs. Vault history is read from per-chain factory subgraphs, with automatic fallback to per-vault subgraphs when a factory subgraph is unhealthy. Legacy TokenizedPool vaults are supported.
The full release notes are in the package CHANGELOG.
What happens to @augustdigital/sdk?
Version 9.16.0 stays on npm, so existing installs keep working. It will not get fixes, new chains or new vault types. It will be marked deprecated on npm after the next major release of @upshiftfinance/sdk. Migrate now: our backend infrastructure has changed, and some vault history data may not load correctly through @augustdigital/sdk.
Questions? Email support@upshift.finance or visit upshift.finance.