Aptos Names

K
Account

This documentation is using @aptos-labs/ts-sdk v6.0.0

Installation

Install the Aptos TypeScript SDK in your project to get started with the Aptos Name Service.

Prerequisites

  • Node.js 18 or higher
  • A package manager (npm, yarn, or pnpm)

Install the Package

Install the @aptos-labs/ts-sdk package using your preferred package manager:

Using pnpm

pnpm add @aptos-labs/ts-sdk

Using npm

npm install @aptos-labs/ts-sdk

Using yarn

yarn add @aptos-labs/ts-sdk

Verify Installation

After installation, you can verify it's working by importing the SDK:

export function verifyInstallation() {
  // Create a client instance
  const aptos = new Aptos(new AptosConfig({ network: Network.MAINNET }));

  console.log("TS SDK installed successfully!");

  return aptos;
}