Skip to content

feat: migrate from deprecated "aptos" package to @aptos-labs/ts-sdk v6#3601

Open
gregnazario wants to merge 1 commit intopyth-network:mainfrom
gregnazario:update-aptos-sdk
Open

feat: migrate from deprecated "aptos" package to @aptos-labs/ts-sdk v6#3601
gregnazario wants to merge 1 commit intopyth-network:mainfrom
gregnazario:update-aptos-sdk

Conversation

@gregnazario
Copy link
Copy Markdown

@gregnazario gregnazario commented Apr 3, 2026

Summary

Replace all usage of the old "aptos" npm package (v1.x) with "@aptos-labs/ts-sdk" (v6.3.1) across price_pusher, contract_manager, and aptos CLI packages. Key changes:

  • AptosClient → Aptos with AptosConfig
  • AptosAccount → Account.fromPrivateKey / Account.fromDerivationPath
  • TxnBuilderTypes payloads → declarative { function, functionArguments }
  • BCS.Serializer → Serializer (top-level import)
  • CoinClient.checkBalance → client.getAccountAPTAmount
  • Updated all resource/table query and transaction APIs

Rationale

Old SDK was deprecated

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@gregnazario gregnazario requested a review from a team as a code owner April 3, 2026 04:44
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

@gregnazario is attempting to deploy a commit to the Pyth Network Team on Vercel.

A member of the Team first needs to authorize it.

Replace all usage of the old "aptos" npm package (v1.x) with
"@aptos-labs/ts-sdk" (v6.3.1) across price_pusher, contract_manager,
and aptos CLI packages. Key changes:

- AptosClient → Aptos with AptosConfig
- AptosAccount → Account.fromPrivateKey / Account.fromDerivationPath
- TxnBuilderTypes payloads → declarative { function, functionArguments }
- BCS.Serializer → Serializer (top-level import)
- CoinClient.checkBalance → client.getAccountAPTAmount
- Updated all resource/table query and transaction APIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant