near-api-js

Integrate NEAR blockchain functionality into JavaScript/TypeScript apps with near-api-js.

14|3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/near/agent-skills --skill near-api-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: near-api-js
Source: https://github.com/near/agent-skills/tree/main/skills/near-api-js
Command: npx skills add https://github.com/near/agent-skills --skill near-api-js

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires [], and includes references (resource) components.

What problem does it solve?

near-api-js provides a comprehensive JavaScript/TypeScript client library to interact with NEAR, enabling developers to build, test, and deploy blockchain-enabled apps with ease.

Core Features & Use Cases

  • Account management, RPC interaction, and contract calls from browser or Node.js
  • Token operations (FT/NFT), wallet sessions, and signer utilities
  • Use Case: Build a NEAR-enabled web app that signs transactions, queries contract state, and handles wallet login seamlessly.

Quick Start

Install the library and initialize a provider and account to start sending transactions and querying NEAR data.

Frequently Asked Questions about near-api-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate NEAR blockchain functionality into a JavaScript or TypeScript app?

To integrate NEAR blockchain functionality into a JavaScript or TypeScript app, you can use a comprehensive client library that handles RPC interaction, contract calls, and account management across both browser and Node.js environments.

Can I manage NEAR wallet sessions and token operations in a web app?

Yes, you can manage NEAR wallet sessions and token operations in a web app. The client library provides built-in utilities for handling wallet login, fungible token (FT) operations, and non-fungible token (NFT) transactions.

How do I call smart contracts on the NEAR blockchain using TypeScript?

You can call smart contracts on the NEAR blockchain using TypeScript by initializing the client library provider and account objects to sign transactions and query contract state seamlessly.

Does the NEAR JavaScript client library work in both Node.js and browser environments?

Yes, the NEAR JavaScript client library works in both Node.js and browser environments, allowing developers to build, test, and deploy blockchain-enabled apps with consistent account management and signer utilities.

What is the best way to query NEAR contract state from a JavaScript application?

The best way to query NEAR contract state from a JavaScript application is using the official client library, which provides RPC interaction tools to fetch data and send transactions after standard npm installation and basic setup.