Practical overview
When it fits
Use it when JavaScript or TypeScript code needs to query NEAR or construct and submit blockchain interactions through RPC. For browser frontend login flows, the project points to separate NEAR web login documentation.
Who it is for
- JavaScript and TypeScript developers building NEAR-connected backend services.
- Developers creating command-line tools or scripts that interact with NEAR.
- Application developers who need account, key, transaction, smart-contract or RPC functionality.
Documented uses
- Make read-only RPC calls, including contract function calls.
- Build and sign transactions that call contracts or transfer tokens.
- Manage accounts and keys used for NEAR interactions.
- Convert between NEAR and yoctoNEAR units and between gas units.
Requirements & limits
The package can be added through npm, Yarn or pnpm. The repository identifies the project as MIT-licensed.
- Read-only provider calls do not require a signing account in the illustrated flow; changing state requires an account to sign.
- RPC access requires a configured endpoint; the README examples use testnet and mainnet endpoints.
- The library supports both browser and Node.js use, while its README directs frontend login work to separate web login documentation.
- The repository describes failover RPC provider support and signing separately from transaction broadcasting.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Near API Js in a JavaScript project
Add the library to a project so it can be imported for NEAR integration.
Before you start
- An existing JavaScript or TypeScript project.
- npm, Yarn or pnpm.
Steps
Use npm, Yarn or pnpm to add the
near-api-jspackage to the project.Import the required functions and classes from
near-api-jsin project code.
Expected outcome
The library is added to the project and available for use in its code.
Guide limitations
- This setup does not configure an RPC provider or demonstrate a completed blockchain request.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- near/near-api-js · Official homepage title · retained in its source language

