The Legacy TypeScript SDK package aptos
is deprecated and will be replaced by the new TypeScript SDK. Please refer to the new TypeScript SDK for the latest features and updates.
Legacy TypeScript SDK
This documentation is for the Legacy TypeScript SDK, aka aptos
. For a more robust SDK with better support, please upgrade to the new TypeScript SDK @aptos-labs/ts-sdk
. Take a look at the documentation and the migration guide.
Aptos provides a fully supported Legacy TypeScript SDK with the source code in the Aptos-core GitHub repository.
Installing the Legacy TypeScript SDK
-
Make sure you downloaded the latest precompiled binary for the Aptos CLI.
-
On a terminal run the below command to install the Legacy TypeScript SDK from npmjs:
Terminalnpm i aptos
or
Terminalyarn add aptos
or
Terminalpnpm add aptos
The above command installs the TS SDK and should not be confused as installing the Aptos CLI.
Using the Legacy TypeScript SDK
See the Developer Tutorials for code examples showing how to use the Legacy Typescript SDK.
Legacy TypeScript SDK Architecture
See the Legacy TypeScript SDK Architecture for the components that make up the Legacy TypeScript SDK.