near-kit_skill

This skill enables efficient NEAR Protocol development with a TypeScript toolkit for view, call, transfer, and type-safe contracts.

5

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill near/agent-skills --skill near-kit

  • SKILL.md6.4 KB

Overview

This skill is a TypeScript library for interacting with the NEAR Protocol using a simple, fetch-like API. It covers read-only views, signed calls, token transfers, transaction composition, key management, wallet integration, React bindings, sandbox testing, and meta-transaction/message signing utilities. The API emphasizes type safety, developer ergonomics, and readable unit formats for amounts and gas.

How this skill works

The library exposes a Near client that performs view calls, signed contract calls, and token transfers. It provides a transaction builder to chain actions atomically and utilities for key stores, rotating keys, and sandbox testing. Additional modules include type-safe contract wrappers, React providers/hooks for client-side integrations, and adapters for Wallet Selector and HOT Connect.

When to use it

  • Building backend scripts or bots that sign and send transactions on NEAR
  • Creating front-end dApps with wallet integration and React hooks
  • Writing tests and local workflows using a sandbox environment
  • Composing complex, multi-action transactions atomically
  • Implementing meta-transactions (NEP-366) or message signing (NEP-413) flows

Best practices

  • Provide a defaultSignerId or keyStore for any operation that requires signing to avoid runtime failures
  • Use the type-safe Contract wrapper to get compile-time method signatures and reduce runtime errors
  • Prefer the transaction builder for multi-action operations to ensure atomicity
  • Use human-readable units (e.g., "1 NEAR", "30 Tgas") and parse with provided utilities for consistency
  • Integrate the React provider at the app root and use hooks (useView/useCall) to leverage caching and request state

Example use cases

  • Read on-chain contract state with near.view and display it in React with useView
  • Create and send a signed transfer or call from a server using a FileKeyStore or rotating key store
  • Build a front-end sign-in and transaction flow using HOT Connect or Wallet Selector adapters
  • Write integration tests that spin up a local Sandbox, create accounts, fund them, and run transactions
  • Compose a meta-transaction that delegates gas/payment using NEP-366 and sign messages per NEP-413

FAQ

Yes. It supports server-side key stores and browser wallet adapters. Use file or rotating key stores in Node and wallet adapters (HOT Connect, Wallet Selector) in the browser.

How do amounts and gas accept input?

Amounts accept human-readable strings, numbers, or canonical strings (e.g., "1 NEAR", "10", 10). Gas accepts formats like "30 Tgas" and parses to native bigint units.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational