Welcome to NEAR API TypeScript
NEAR API TypeScript is a modern, type-safe library for building applications on the NEAR Protocol blockchain. Built from the ground up with TypeScript, it provides a robust and developer-friendly interface for interacting with NEAR Protocol in both browser and Node.js environments.Quick Start
Get up and running in minutes with our quickstart guide
Installation
Install the library using your preferred package manager
Core Concepts
Learn the fundamental concepts behind the library
API Reference
Explore the complete API documentation
Key Features
Type-Safe
Full TypeScript support with comprehensive type definitions for all API methods
Multi-Platform
Works seamlessly in browser, Node.js, and universal environments
Flexible Error Handling
Choose between safe (Result-based) and throwable API variants
Key Management
Built-in key services with support for memory, file, and IndexedDB storage
Transaction Building
Comprehensive transaction builder with action creators
Native Token Support
First-class support for NEAR tokens and gas units with type-safe helpers
Why NEAR API TypeScript?
Modern TypeScript-First Design
Built with modern TypeScript practices, providing excellent IDE support, autocompletion, and compile-time type checking. Every function and type is fully documented with JSDoc comments.Flexible Error Handling
Choose the error handling approach that fits your needs:- Throwable variants: Standard async functions that throw errors
- Safe variants: Return
Result<T, E>objects for functional error handling
Multi-Platform Support
Write once, run anywhere. The library automatically detects your environment and uses the appropriate implementation:- Universal: Core functionality that works everywhere
- Browser: Browser-specific features like IndexedDB key storage
- Node.js: Node-specific features like file-based key storage
Quick Example
Next Steps
Install the Library
Learn how to install NEAR API TypeScript in your project
Follow the Quickstart
Build your first NEAR application in 5 minutes
Understand Clients
Learn about RPC clients and network connections
Explore Examples
See real-world usage examples and patterns
Community and Support
- GitHub: near/near-api-ts
- Issues: Report bugs or request features on GitHub Issues
- License: MIT