ts-sdk-client
Installation
SKILL.md
TypeScript SDK: Aptos Client
Purpose
Guide creation and configuration of the Aptos client and AptosConfig in @aptos-labs/ts-sdk. One client
instance is used for all read/write and account/transaction APIs.
ALWAYS
- Create one Aptos instance per app (singleton) and reuse it – avoid multiple
new Aptos(config)for the same network. - Configure network via
AptosConfig– useNetwork.TESTNETorNetwork.MAINNET(or custom endpoints). - Use environment variables for network/URLs in production – e.g.
process.env.APTOS_NETWORKorimport.meta.env.VITE_APP_NETWORK. - Use
Network.TESTNETas default for development – devnet resets frequently.