Skip to main content

TypeScript SDK

The official TypeScript/JavaScript client for the Legend API.

Installation

For signing transactions, you’ll also need viem:

Quick start

Client configuration

Accounts

Plans

Yield

Swaps

Transfers

Borrowing

Leverage

Migration

Sign and execute

Reference data

Error handling

TypeScript types

All methods return typed responses. Key types: