near-api-js
Guide for developing with near-api-js v7 - the JavaScript/TypeScript library for NEAR blockchain interaction. Use when: (1) building apps that interact with NEAR blockchain, (2) creating/signing transactions, (3) calling smart contracts, (4) managing accounts and keys, (5) working with NEAR RPC API, (6) handling FT/NFT tokens on NEAR, (7) using NEAR cryptographic operations (KeyPair, signing), (8) converting between NEAR units (yocto, gas), (9) gasless/meta transactions with relayers, (10) NEP-413 message signing for authentication, (11) storage deposit management for FT contracts. Triggers on
npx skills add internet-court/internet-court-skill --skill near-api-js --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# near-api-js Skill JavaScript/TypeScript library for NEAR blockchain interaction. Works in browser and Node.js. ## Quick Start ```typescript import { Account, JsonRpcProvider, KeyPairString } from "near-api-js"; import { NEAR } from "near-api-js/tokens"; // Connect to testnet const provider = new JsonRpcProvider({ url: "https://test.rpc.fastnear.com" }); // Create account with signer const account = new Account( "my-account.testnet", provider, "ed25519:..." as KeyPairString, ); // View call (read-only, via provider) const data = await provider.callFunction({ contractId: "guestbook.near-examples.testnet", method: "get_messages", args: {}, }); // Change call (requires account) await account.callFunction({ contractId: "guestbook.near-examples.testnet", methodName: "add_message", args: { text: "Hello!" }, gas: teraToGas("30"), deposit: nearToYocto("0.1"), }); ``` ## Import Cheatsheet ```typescript // Core import { Account, JsonRpcProvider, FailoverRpcProvider } from "near-api-js"; import { KeyPair, PublicKey, KeyType, KeyPairString } from "near-api-js"; // Signers import { KeyPairSigner, MultiKeySigner, Signer } from "near-api-js"; // Units import { nearToYocto, yoctoToNear, teraToGas
- Quick Start
- Import Cheatsheet
- Core Modules
- Account
- Account Management
- Provider
- Signers
- Contract (with ABI)
- Contract (without ABI)
- Seed Phrases
- Tokens
- Actions
- RPC Endpoints
- Common Patterns
What does the near-api-js skill do?
Guide for developing with near-api-js v7 - the JavaScript/TypeScript library for NEAR blockchain interaction. Use when: (1) building apps that interact with NEAR blockchain, (2) creating/signing transactions, (3) calling smart contracts, (4) managing accounts and keys, (5) working with NEAR RPC API, (6) handling FT/NFT tokens on NEAR, (7) using NEAR cryptographic operations (KeyPair, signing), (8) converting between NEAR units (yocto, gas), (9) gasless/meta transactions with relayers, (10) NEP-413 message signing for authentication, (11) storage deposit management for FT contracts. Triggers on
How do I install it?
Run `npx skills add internet-court/internet-court-skill --skill near-api-js --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From internet-court/internet-court-skill, a repository with 1,536 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.