Documentation Index
Fetch the complete documentation index at: https://mintlify.com/near/near-api-ts/llms.txt
Use this file to discover all available pages before exploring further.
Package Manager Installation
Installnear-api-ts using your preferred package manager:
Requirements
Node.js Version: The library requires Node.js version 24 or higher when running in Node.js environments.
Zod Version: Requires Zod version 4.3.0 or higher (but less than 5.0.0)
Platform Support
Thenear-api-ts library is designed to work across multiple JavaScript environments:
Node.js
Full support for Node.js 24+ with ESM modules
Browser
Complete browser support with IndexedDB key storage
TypeScript
First-class TypeScript support with full type definitions
Modern Build Tools
Compatible with Vite, Webpack, and other modern bundlers
Import Paths
The library provides different entry points for different environments:Universal (Default)
Works in both Node.js and browser environments:Node.js Specific
Includes file-based key service for server environments:Browser Specific
Includes IndexedDB-based key service for browser environments:Package Structure
The package exports are configured as follows:Verify Installation
After installation, verify that the library is working correctly:Next Steps
Quickstart Guide
Build your first NEAR application
API Reference
Explore the complete API documentation