Skip to main content

Aptos TypeScript SDK

note

This documentation is for the legacy TypeScript SDK, aka aptos. For a more robust and better SDK support, we recommend upgrading to the new TypeScript SDK @aptos-labs/ts-sdk. Take a look at the documentation and the migration guide

Aptos provides a fully supported TypeScript SDK with the source code in the Aptos-core GitHub repository. Much of the functionality of the TypeScript SDK can be found in the Rust and Python SDKs. Nevertheless, Aptos strongly encourages you to use the TypeScript SDK for app development whenever possible.

Installing the TypeScript SDK

  1. Make sure you downloaded the latest precompiled binary for the Aptos CLI.

  2. On a terminal run the below command to install the TypeScript SDK from npmjs:

    npm i aptos

    or

    yarn add aptos

    or

    pnpm add aptos
    tip

    The above command installs the TS SDK and should not be confused as installing the Aptos CLI.

Using the TypeScript SDK

See the Developer Tutorials for code examples showing how to use the Typescript SDK.

TypeScript SDK Architecture

See the TypeScript SDK Architecture for the components that make up the TypeScript SDK.

Additional information