Migrate ts sdk over to mysten sdk v2 and bump up npm package version to 2.0.0-beta.0#286
Migrate ts sdk over to mysten sdk v2 and bump up npm package version to 2.0.0-beta.0#286nikita-seedlabs wants to merge 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the TypeScript Pro SDK to the Mysten Sui SDK v2 ecosystem and prepares a 2.0.0-beta.0 release, updating build configuration and consumer-facing examples/docs accordingly.
Changes:
- Bump TS SDK package version to
2.0.0-beta.0, update dependencies to Mysten v2, and adjust lockfiles. - Switch TS build output/config toward ESM-only (remove CJS build config and update tsconfigs).
- Update README/docs/example to the new
SuiClientinitialization shape (addingnetwork).
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ts/sdk/yarn.lock | Updates dependency graph/versions for Mysten v2 + library-sui beta. |
| ts/sdk/package-lock.json | Mirrors lockfile updates, including new transitive deps and engine constraints. |
| ts/sdk/package.json | Bumps version to 2.0.0-beta.0, moves to ESM-only exports/build, updates deps/peer deps. |
| ts/sdk/tsconfig.types.json | Updates declaration build to ESNext + Bundler resolution and removes path mapping. |
| ts/sdk/tsconfig.example.json | Updates example TS config to ESNext + Bundler resolution. |
| ts/sdk/tsconfig.esm.json | Updates ESM build TS config to ESNext + Bundler resolution. |
| ts/sdk/tsconfig.cjs.json | Removes CJS build config. |
| ts/sdk/example.ts | Updates SuiClient construction to include network. |
| ts/sdk/docs/batch-claim-rewards-guide.md | Updates example client initialization to include network. |
| ts/sdk/README.md | Updates quickstart client initialization to include network. |
Files not reviewed (1)
- ts/sdk/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
nit: Looks like pro-sdk has both a yarn.lock and package-lock.json files. Probably worth keeping just one and making sure it sticks to either npm install or yarn install.
| signer, | ||
| "mainnet", // or "testnet" for staging | ||
| new SuiClient({ url: "https://fullnode.mainnet.sui.io:443" }) | ||
| new SuiClient({ url: "https://fullnode.mainnet.sui.io:443", network: "mainnet" }) |
There was a problem hiding this comment.
I think these examples should now use SuiJsonRpcClient instead of SuiClient.
There was a problem hiding this comment.
I think there's something missing in the code as well, because the constructor of BluefinProSdk should also be updated to accept either a SuiJsonRpcClient or a ClientWithCoreApi, and then likely this change will cause some other things to be needed to be updated accordingly.
There was a problem hiding this comment.
@lucasfronza it looks like we need to update the bluefin aggregator sdk to mysten v2 to resolve yarn dependencies here https://github.com/fireflyprotocol/bluefin7k-typescript-sdk/blob/d906868d1e30dc0b57685d3eb3f9da6ef4de94eb/package.json#L75. Forced it to use v2 in the meantime
Migrates typescript pro-sdk over to use mysten v2 sdk